Space_Invaders/Debug/Space_Invaders.list
Thomas d74fef766f Deplacement joueur fonctionnel
Problème de config. Je supprime la config de Léo et on garde la mienne
Le deplacement du joueur est fonctionnel et borné correctement. Il faudrait rajouter une limite arbitraire horizontale définie par la position des monstres
2021-04-19 19:49:11 +02:00

80400 lines
3 MiB

Space_Invaders.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 000001c8 08000000 08000000 00010000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .text 0001dcc0 080001d0 080001d0 000101d0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 000050d0 0801de90 0801de90 0002de90 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .ARM.extab 00000000 08022f60 08022f60 000400e8 2**0
CONTENTS
4 .ARM 00000008 08022f60 08022f60 00032f60 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .preinit_array 00000000 08022f68 08022f68 000400e8 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .init_array 00000004 08022f68 08022f68 00032f68 2**2
CONTENTS, ALLOC, LOAD, DATA
7 .fini_array 00000004 08022f6c 08022f6c 00032f6c 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .data 000000e8 20000000 08022f70 00040000 2**2
CONTENTS, ALLOC, LOAD, DATA
9 .bss 0000f760 200000e8 08023058 000400e8 2**2
ALLOC
10 ._user_heap_stack 00000600 2000f848 08023058 0004f848 2**0
ALLOC
11 .ARM.attributes 00000030 00000000 00000000 000400e8 2**0
CONTENTS, READONLY
12 .debug_info 00055c67 00000000 00000000 00040118 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_abbrev 00009e35 00000000 00000000 00095d7f 2**0
CONTENTS, READONLY, DEBUGGING
14 .debug_aranges 00003580 00000000 00000000 0009fbb8 2**3
CONTENTS, READONLY, DEBUGGING
15 .debug_ranges 00003288 00000000 00000000 000a3138 2**3
CONTENTS, READONLY, DEBUGGING
16 .debug_macro 0003df8f 00000000 00000000 000a63c0 2**0
CONTENTS, READONLY, DEBUGGING
17 .debug_line 0003e2be 00000000 00000000 000e434f 2**0
CONTENTS, READONLY, DEBUGGING
18 .debug_str 001332f7 00000000 00000000 0012260d 2**0
CONTENTS, READONLY, DEBUGGING
19 .comment 0000007b 00000000 00000000 00255904 2**0
CONTENTS, READONLY
20 .debug_frame 0000e6d0 00000000 00000000 00255980 2**2
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
080001d0 <__do_global_dtors_aux>:
80001d0: b510 push {r4, lr}
80001d2: 4c05 ldr r4, [pc, #20] ; (80001e8 <__do_global_dtors_aux+0x18>)
80001d4: 7823 ldrb r3, [r4, #0]
80001d6: b933 cbnz r3, 80001e6 <__do_global_dtors_aux+0x16>
80001d8: 4b04 ldr r3, [pc, #16] ; (80001ec <__do_global_dtors_aux+0x1c>)
80001da: b113 cbz r3, 80001e2 <__do_global_dtors_aux+0x12>
80001dc: 4804 ldr r0, [pc, #16] ; (80001f0 <__do_global_dtors_aux+0x20>)
80001de: f3af 8000 nop.w
80001e2: 2301 movs r3, #1
80001e4: 7023 strb r3, [r4, #0]
80001e6: bd10 pop {r4, pc}
80001e8: 200000e8 .word 0x200000e8
80001ec: 00000000 .word 0x00000000
80001f0: 0801de78 .word 0x0801de78
080001f4 <frame_dummy>:
80001f4: b508 push {r3, lr}
80001f6: 4b03 ldr r3, [pc, #12] ; (8000204 <frame_dummy+0x10>)
80001f8: b11b cbz r3, 8000202 <frame_dummy+0xe>
80001fa: 4903 ldr r1, [pc, #12] ; (8000208 <frame_dummy+0x14>)
80001fc: 4803 ldr r0, [pc, #12] ; (800020c <frame_dummy+0x18>)
80001fe: f3af 8000 nop.w
8000202: bd08 pop {r3, pc}
8000204: 00000000 .word 0x00000000
8000208: 200000ec .word 0x200000ec
800020c: 0801de78 .word 0x0801de78
08000210 <memchr>:
8000210: f001 01ff and.w r1, r1, #255 ; 0xff
8000214: 2a10 cmp r2, #16
8000216: db2b blt.n 8000270 <memchr+0x60>
8000218: f010 0f07 tst.w r0, #7
800021c: d008 beq.n 8000230 <memchr+0x20>
800021e: f810 3b01 ldrb.w r3, [r0], #1
8000222: 3a01 subs r2, #1
8000224: 428b cmp r3, r1
8000226: d02d beq.n 8000284 <memchr+0x74>
8000228: f010 0f07 tst.w r0, #7
800022c: b342 cbz r2, 8000280 <memchr+0x70>
800022e: d1f6 bne.n 800021e <memchr+0xe>
8000230: b4f0 push {r4, r5, r6, r7}
8000232: ea41 2101 orr.w r1, r1, r1, lsl #8
8000236: ea41 4101 orr.w r1, r1, r1, lsl #16
800023a: f022 0407 bic.w r4, r2, #7
800023e: f07f 0700 mvns.w r7, #0
8000242: 2300 movs r3, #0
8000244: e8f0 5602 ldrd r5, r6, [r0], #8
8000248: 3c08 subs r4, #8
800024a: ea85 0501 eor.w r5, r5, r1
800024e: ea86 0601 eor.w r6, r6, r1
8000252: fa85 f547 uadd8 r5, r5, r7
8000256: faa3 f587 sel r5, r3, r7
800025a: fa86 f647 uadd8 r6, r6, r7
800025e: faa5 f687 sel r6, r5, r7
8000262: b98e cbnz r6, 8000288 <memchr+0x78>
8000264: d1ee bne.n 8000244 <memchr+0x34>
8000266: bcf0 pop {r4, r5, r6, r7}
8000268: f001 01ff and.w r1, r1, #255 ; 0xff
800026c: f002 0207 and.w r2, r2, #7
8000270: b132 cbz r2, 8000280 <memchr+0x70>
8000272: f810 3b01 ldrb.w r3, [r0], #1
8000276: 3a01 subs r2, #1
8000278: ea83 0301 eor.w r3, r3, r1
800027c: b113 cbz r3, 8000284 <memchr+0x74>
800027e: d1f8 bne.n 8000272 <memchr+0x62>
8000280: 2000 movs r0, #0
8000282: 4770 bx lr
8000284: 3801 subs r0, #1
8000286: 4770 bx lr
8000288: 2d00 cmp r5, #0
800028a: bf06 itte eq
800028c: 4635 moveq r5, r6
800028e: 3803 subeq r0, #3
8000290: 3807 subne r0, #7
8000292: f015 0f01 tst.w r5, #1
8000296: d107 bne.n 80002a8 <memchr+0x98>
8000298: 3001 adds r0, #1
800029a: f415 7f80 tst.w r5, #256 ; 0x100
800029e: bf02 ittt eq
80002a0: 3001 addeq r0, #1
80002a2: f415 3fc0 tsteq.w r5, #98304 ; 0x18000
80002a6: 3001 addeq r0, #1
80002a8: bcf0 pop {r4, r5, r6, r7}
80002aa: 3801 subs r0, #1
80002ac: 4770 bx lr
80002ae: bf00 nop
080002b0 <__aeabi_uldivmod>:
80002b0: b953 cbnz r3, 80002c8 <__aeabi_uldivmod+0x18>
80002b2: b94a cbnz r2, 80002c8 <__aeabi_uldivmod+0x18>
80002b4: 2900 cmp r1, #0
80002b6: bf08 it eq
80002b8: 2800 cmpeq r0, #0
80002ba: bf1c itt ne
80002bc: f04f 31ff movne.w r1, #4294967295
80002c0: f04f 30ff movne.w r0, #4294967295
80002c4: f000 b972 b.w 80005ac <__aeabi_idiv0>
80002c8: f1ad 0c08 sub.w ip, sp, #8
80002cc: e96d ce04 strd ip, lr, [sp, #-16]!
80002d0: f000 f806 bl 80002e0 <__udivmoddi4>
80002d4: f8dd e004 ldr.w lr, [sp, #4]
80002d8: e9dd 2302 ldrd r2, r3, [sp, #8]
80002dc: b004 add sp, #16
80002de: 4770 bx lr
080002e0 <__udivmoddi4>:
80002e0: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
80002e4: 9e08 ldr r6, [sp, #32]
80002e6: 4604 mov r4, r0
80002e8: 4688 mov r8, r1
80002ea: 2b00 cmp r3, #0
80002ec: d14b bne.n 8000386 <__udivmoddi4+0xa6>
80002ee: 428a cmp r2, r1
80002f0: 4615 mov r5, r2
80002f2: d967 bls.n 80003c4 <__udivmoddi4+0xe4>
80002f4: fab2 f282 clz r2, r2
80002f8: b14a cbz r2, 800030e <__udivmoddi4+0x2e>
80002fa: f1c2 0720 rsb r7, r2, #32
80002fe: fa01 f302 lsl.w r3, r1, r2
8000302: fa20 f707 lsr.w r7, r0, r7
8000306: 4095 lsls r5, r2
8000308: ea47 0803 orr.w r8, r7, r3
800030c: 4094 lsls r4, r2
800030e: ea4f 4e15 mov.w lr, r5, lsr #16
8000312: 0c23 lsrs r3, r4, #16
8000314: fbb8 f7fe udiv r7, r8, lr
8000318: fa1f fc85 uxth.w ip, r5
800031c: fb0e 8817 mls r8, lr, r7, r8
8000320: ea43 4308 orr.w r3, r3, r8, lsl #16
8000324: fb07 f10c mul.w r1, r7, ip
8000328: 4299 cmp r1, r3
800032a: d909 bls.n 8000340 <__udivmoddi4+0x60>
800032c: 18eb adds r3, r5, r3
800032e: f107 30ff add.w r0, r7, #4294967295
8000332: f080 811b bcs.w 800056c <__udivmoddi4+0x28c>
8000336: 4299 cmp r1, r3
8000338: f240 8118 bls.w 800056c <__udivmoddi4+0x28c>
800033c: 3f02 subs r7, #2
800033e: 442b add r3, r5
8000340: 1a5b subs r3, r3, r1
8000342: b2a4 uxth r4, r4
8000344: fbb3 f0fe udiv r0, r3, lr
8000348: fb0e 3310 mls r3, lr, r0, r3
800034c: ea44 4403 orr.w r4, r4, r3, lsl #16
8000350: fb00 fc0c mul.w ip, r0, ip
8000354: 45a4 cmp ip, r4
8000356: d909 bls.n 800036c <__udivmoddi4+0x8c>
8000358: 192c adds r4, r5, r4
800035a: f100 33ff add.w r3, r0, #4294967295
800035e: f080 8107 bcs.w 8000570 <__udivmoddi4+0x290>
8000362: 45a4 cmp ip, r4
8000364: f240 8104 bls.w 8000570 <__udivmoddi4+0x290>
8000368: 3802 subs r0, #2
800036a: 442c add r4, r5
800036c: ea40 4007 orr.w r0, r0, r7, lsl #16
8000370: eba4 040c sub.w r4, r4, ip
8000374: 2700 movs r7, #0
8000376: b11e cbz r6, 8000380 <__udivmoddi4+0xa0>
8000378: 40d4 lsrs r4, r2
800037a: 2300 movs r3, #0
800037c: e9c6 4300 strd r4, r3, [r6]
8000380: 4639 mov r1, r7
8000382: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
8000386: 428b cmp r3, r1
8000388: d909 bls.n 800039e <__udivmoddi4+0xbe>
800038a: 2e00 cmp r6, #0
800038c: f000 80eb beq.w 8000566 <__udivmoddi4+0x286>
8000390: 2700 movs r7, #0
8000392: e9c6 0100 strd r0, r1, [r6]
8000396: 4638 mov r0, r7
8000398: 4639 mov r1, r7
800039a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
800039e: fab3 f783 clz r7, r3
80003a2: 2f00 cmp r7, #0
80003a4: d147 bne.n 8000436 <__udivmoddi4+0x156>
80003a6: 428b cmp r3, r1
80003a8: d302 bcc.n 80003b0 <__udivmoddi4+0xd0>
80003aa: 4282 cmp r2, r0
80003ac: f200 80fa bhi.w 80005a4 <__udivmoddi4+0x2c4>
80003b0: 1a84 subs r4, r0, r2
80003b2: eb61 0303 sbc.w r3, r1, r3
80003b6: 2001 movs r0, #1
80003b8: 4698 mov r8, r3
80003ba: 2e00 cmp r6, #0
80003bc: d0e0 beq.n 8000380 <__udivmoddi4+0xa0>
80003be: e9c6 4800 strd r4, r8, [r6]
80003c2: e7dd b.n 8000380 <__udivmoddi4+0xa0>
80003c4: b902 cbnz r2, 80003c8 <__udivmoddi4+0xe8>
80003c6: deff udf #255 ; 0xff
80003c8: fab2 f282 clz r2, r2
80003cc: 2a00 cmp r2, #0
80003ce: f040 808f bne.w 80004f0 <__udivmoddi4+0x210>
80003d2: 1b49 subs r1, r1, r5
80003d4: ea4f 4e15 mov.w lr, r5, lsr #16
80003d8: fa1f f885 uxth.w r8, r5
80003dc: 2701 movs r7, #1
80003de: fbb1 fcfe udiv ip, r1, lr
80003e2: 0c23 lsrs r3, r4, #16
80003e4: fb0e 111c mls r1, lr, ip, r1
80003e8: ea43 4301 orr.w r3, r3, r1, lsl #16
80003ec: fb08 f10c mul.w r1, r8, ip
80003f0: 4299 cmp r1, r3
80003f2: d907 bls.n 8000404 <__udivmoddi4+0x124>
80003f4: 18eb adds r3, r5, r3
80003f6: f10c 30ff add.w r0, ip, #4294967295
80003fa: d202 bcs.n 8000402 <__udivmoddi4+0x122>
80003fc: 4299 cmp r1, r3
80003fe: f200 80cd bhi.w 800059c <__udivmoddi4+0x2bc>
8000402: 4684 mov ip, r0
8000404: 1a59 subs r1, r3, r1
8000406: b2a3 uxth r3, r4
8000408: fbb1 f0fe udiv r0, r1, lr
800040c: fb0e 1410 mls r4, lr, r0, r1
8000410: ea43 4404 orr.w r4, r3, r4, lsl #16
8000414: fb08 f800 mul.w r8, r8, r0
8000418: 45a0 cmp r8, r4
800041a: d907 bls.n 800042c <__udivmoddi4+0x14c>
800041c: 192c adds r4, r5, r4
800041e: f100 33ff add.w r3, r0, #4294967295
8000422: d202 bcs.n 800042a <__udivmoddi4+0x14a>
8000424: 45a0 cmp r8, r4
8000426: f200 80b6 bhi.w 8000596 <__udivmoddi4+0x2b6>
800042a: 4618 mov r0, r3
800042c: eba4 0408 sub.w r4, r4, r8
8000430: ea40 400c orr.w r0, r0, ip, lsl #16
8000434: e79f b.n 8000376 <__udivmoddi4+0x96>
8000436: f1c7 0c20 rsb ip, r7, #32
800043a: 40bb lsls r3, r7
800043c: fa22 fe0c lsr.w lr, r2, ip
8000440: ea4e 0e03 orr.w lr, lr, r3
8000444: fa01 f407 lsl.w r4, r1, r7
8000448: fa20 f50c lsr.w r5, r0, ip
800044c: fa21 f30c lsr.w r3, r1, ip
8000450: ea4f 481e mov.w r8, lr, lsr #16
8000454: 4325 orrs r5, r4
8000456: fbb3 f9f8 udiv r9, r3, r8
800045a: 0c2c lsrs r4, r5, #16
800045c: fb08 3319 mls r3, r8, r9, r3
8000460: fa1f fa8e uxth.w sl, lr
8000464: ea44 4303 orr.w r3, r4, r3, lsl #16
8000468: fb09 f40a mul.w r4, r9, sl
800046c: 429c cmp r4, r3
800046e: fa02 f207 lsl.w r2, r2, r7
8000472: fa00 f107 lsl.w r1, r0, r7
8000476: d90b bls.n 8000490 <__udivmoddi4+0x1b0>
8000478: eb1e 0303 adds.w r3, lr, r3
800047c: f109 30ff add.w r0, r9, #4294967295
8000480: f080 8087 bcs.w 8000592 <__udivmoddi4+0x2b2>
8000484: 429c cmp r4, r3
8000486: f240 8084 bls.w 8000592 <__udivmoddi4+0x2b2>
800048a: f1a9 0902 sub.w r9, r9, #2
800048e: 4473 add r3, lr
8000490: 1b1b subs r3, r3, r4
8000492: b2ad uxth r5, r5
8000494: fbb3 f0f8 udiv r0, r3, r8
8000498: fb08 3310 mls r3, r8, r0, r3
800049c: ea45 4403 orr.w r4, r5, r3, lsl #16
80004a0: fb00 fa0a mul.w sl, r0, sl
80004a4: 45a2 cmp sl, r4
80004a6: d908 bls.n 80004ba <__udivmoddi4+0x1da>
80004a8: eb1e 0404 adds.w r4, lr, r4
80004ac: f100 33ff add.w r3, r0, #4294967295
80004b0: d26b bcs.n 800058a <__udivmoddi4+0x2aa>
80004b2: 45a2 cmp sl, r4
80004b4: d969 bls.n 800058a <__udivmoddi4+0x2aa>
80004b6: 3802 subs r0, #2
80004b8: 4474 add r4, lr
80004ba: ea40 4009 orr.w r0, r0, r9, lsl #16
80004be: fba0 8902 umull r8, r9, r0, r2
80004c2: eba4 040a sub.w r4, r4, sl
80004c6: 454c cmp r4, r9
80004c8: 46c2 mov sl, r8
80004ca: 464b mov r3, r9
80004cc: d354 bcc.n 8000578 <__udivmoddi4+0x298>
80004ce: d051 beq.n 8000574 <__udivmoddi4+0x294>
80004d0: 2e00 cmp r6, #0
80004d2: d069 beq.n 80005a8 <__udivmoddi4+0x2c8>
80004d4: ebb1 050a subs.w r5, r1, sl
80004d8: eb64 0403 sbc.w r4, r4, r3
80004dc: fa04 fc0c lsl.w ip, r4, ip
80004e0: 40fd lsrs r5, r7
80004e2: 40fc lsrs r4, r7
80004e4: ea4c 0505 orr.w r5, ip, r5
80004e8: e9c6 5400 strd r5, r4, [r6]
80004ec: 2700 movs r7, #0
80004ee: e747 b.n 8000380 <__udivmoddi4+0xa0>
80004f0: f1c2 0320 rsb r3, r2, #32
80004f4: fa20 f703 lsr.w r7, r0, r3
80004f8: 4095 lsls r5, r2
80004fa: fa01 f002 lsl.w r0, r1, r2
80004fe: fa21 f303 lsr.w r3, r1, r3
8000502: ea4f 4e15 mov.w lr, r5, lsr #16
8000506: 4338 orrs r0, r7
8000508: 0c01 lsrs r1, r0, #16
800050a: fbb3 f7fe udiv r7, r3, lr
800050e: fa1f f885 uxth.w r8, r5
8000512: fb0e 3317 mls r3, lr, r7, r3
8000516: ea41 4103 orr.w r1, r1, r3, lsl #16
800051a: fb07 f308 mul.w r3, r7, r8
800051e: 428b cmp r3, r1
8000520: fa04 f402 lsl.w r4, r4, r2
8000524: d907 bls.n 8000536 <__udivmoddi4+0x256>
8000526: 1869 adds r1, r5, r1
8000528: f107 3cff add.w ip, r7, #4294967295
800052c: d22f bcs.n 800058e <__udivmoddi4+0x2ae>
800052e: 428b cmp r3, r1
8000530: d92d bls.n 800058e <__udivmoddi4+0x2ae>
8000532: 3f02 subs r7, #2
8000534: 4429 add r1, r5
8000536: 1acb subs r3, r1, r3
8000538: b281 uxth r1, r0
800053a: fbb3 f0fe udiv r0, r3, lr
800053e: fb0e 3310 mls r3, lr, r0, r3
8000542: ea41 4103 orr.w r1, r1, r3, lsl #16
8000546: fb00 f308 mul.w r3, r0, r8
800054a: 428b cmp r3, r1
800054c: d907 bls.n 800055e <__udivmoddi4+0x27e>
800054e: 1869 adds r1, r5, r1
8000550: f100 3cff add.w ip, r0, #4294967295
8000554: d217 bcs.n 8000586 <__udivmoddi4+0x2a6>
8000556: 428b cmp r3, r1
8000558: d915 bls.n 8000586 <__udivmoddi4+0x2a6>
800055a: 3802 subs r0, #2
800055c: 4429 add r1, r5
800055e: 1ac9 subs r1, r1, r3
8000560: ea40 4707 orr.w r7, r0, r7, lsl #16
8000564: e73b b.n 80003de <__udivmoddi4+0xfe>
8000566: 4637 mov r7, r6
8000568: 4630 mov r0, r6
800056a: e709 b.n 8000380 <__udivmoddi4+0xa0>
800056c: 4607 mov r7, r0
800056e: e6e7 b.n 8000340 <__udivmoddi4+0x60>
8000570: 4618 mov r0, r3
8000572: e6fb b.n 800036c <__udivmoddi4+0x8c>
8000574: 4541 cmp r1, r8
8000576: d2ab bcs.n 80004d0 <__udivmoddi4+0x1f0>
8000578: ebb8 0a02 subs.w sl, r8, r2
800057c: eb69 020e sbc.w r2, r9, lr
8000580: 3801 subs r0, #1
8000582: 4613 mov r3, r2
8000584: e7a4 b.n 80004d0 <__udivmoddi4+0x1f0>
8000586: 4660 mov r0, ip
8000588: e7e9 b.n 800055e <__udivmoddi4+0x27e>
800058a: 4618 mov r0, r3
800058c: e795 b.n 80004ba <__udivmoddi4+0x1da>
800058e: 4667 mov r7, ip
8000590: e7d1 b.n 8000536 <__udivmoddi4+0x256>
8000592: 4681 mov r9, r0
8000594: e77c b.n 8000490 <__udivmoddi4+0x1b0>
8000596: 3802 subs r0, #2
8000598: 442c add r4, r5
800059a: e747 b.n 800042c <__udivmoddi4+0x14c>
800059c: f1ac 0c02 sub.w ip, ip, #2
80005a0: 442b add r3, r5
80005a2: e72f b.n 8000404 <__udivmoddi4+0x124>
80005a4: 4638 mov r0, r7
80005a6: e708 b.n 80003ba <__udivmoddi4+0xda>
80005a8: 4637 mov r7, r6
80005aa: e6e9 b.n 8000380 <__udivmoddi4+0xa0>
080005ac <__aeabi_idiv0>:
80005ac: 4770 bx lr
80005ae: bf00 nop
080005b0 <vApplicationIdleHook>:
void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName);
void vApplicationMallocFailedHook(void);
/* USER CODE BEGIN 2 */
__weak void vApplicationIdleHook( void )
{
80005b0: b480 push {r7}
80005b2: af00 add r7, sp, #0
specified, or call vTaskDelay()). If the application makes use of the
vTaskDelete() API function (as this demo application does) then it is also
important that vApplicationIdleHook() is permitted to return to its calling
function, because it is the responsibility of the idle task to clean up
memory allocated by the kernel to any task that has since been deleted. */
}
80005b4: bf00 nop
80005b6: 46bd mov sp, r7
80005b8: f85d 7b04 ldr.w r7, [sp], #4
80005bc: 4770 bx lr
080005be <vApplicationStackOverflowHook>:
/* USER CODE END 2 */
/* USER CODE BEGIN 4 */
__weak void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName)
{
80005be: b480 push {r7}
80005c0: b083 sub sp, #12
80005c2: af00 add r7, sp, #0
80005c4: 6078 str r0, [r7, #4]
80005c6: 6039 str r1, [r7, #0]
/* Run time stack overflow checking is performed if
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook function is
called if a stack overflow is detected. */
}
80005c8: bf00 nop
80005ca: 370c adds r7, #12
80005cc: 46bd mov sp, r7
80005ce: f85d 7b04 ldr.w r7, [sp], #4
80005d2: 4770 bx lr
080005d4 <vApplicationMallocFailedHook>:
/* USER CODE END 4 */
/* USER CODE BEGIN 5 */
__weak void vApplicationMallocFailedHook(void)
{
80005d4: b480 push {r7}
80005d6: af00 add r7, sp, #0
demo application. If heap_1.c or heap_2.c are used, then the size of the
heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in
FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used
to query the size of free heap space that remains (although it does not
provide information on how the remaining heap might be fragmented). */
}
80005d8: bf00 nop
80005da: 46bd mov sp, r7
80005dc: f85d 7b04 ldr.w r7, [sp], #4
80005e0: 4770 bx lr
...
080005e4 <vApplicationGetIdleTaskMemory>:
/* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
static StaticTask_t xIdleTaskTCBBuffer;
static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
{
80005e4: b480 push {r7}
80005e6: b085 sub sp, #20
80005e8: af00 add r7, sp, #0
80005ea: 60f8 str r0, [r7, #12]
80005ec: 60b9 str r1, [r7, #8]
80005ee: 607a str r2, [r7, #4]
*ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
80005f0: 68fb ldr r3, [r7, #12]
80005f2: 4a07 ldr r2, [pc, #28] ; (8000610 <vApplicationGetIdleTaskMemory+0x2c>)
80005f4: 601a str r2, [r3, #0]
*ppxIdleTaskStackBuffer = &xIdleStack[0];
80005f6: 68bb ldr r3, [r7, #8]
80005f8: 4a06 ldr r2, [pc, #24] ; (8000614 <vApplicationGetIdleTaskMemory+0x30>)
80005fa: 601a str r2, [r3, #0]
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
80005fc: 687b ldr r3, [r7, #4]
80005fe: 2280 movs r2, #128 ; 0x80
8000600: 601a str r2, [r3, #0]
/* place for user code */
}
8000602: bf00 nop
8000604: 3714 adds r7, #20
8000606: 46bd mov sp, r7
8000608: f85d 7b04 ldr.w r7, [sp], #4
800060c: 4770 bx lr
800060e: bf00 nop
8000610: 20000104 .word 0x20000104
8000614: 2000015c .word 0x2000015c
08000618 <ft5336_Init>:
* from MCU to FT5336 : ie I2C channel initialization (if required).
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
* @retval None
*/
void ft5336_Init(uint16_t DeviceAddr)
{
8000618: b580 push {r7, lr}
800061a: b082 sub sp, #8
800061c: af00 add r7, sp, #0
800061e: 4603 mov r3, r0
8000620: 80fb strh r3, [r7, #6]
/* Wait at least 200ms after power up before accessing registers
* Trsi timing (Time of starting to report point after resetting) from FT5336GQQ datasheet */
TS_IO_Delay(200);
8000622: 20c8 movs r0, #200 ; 0xc8
8000624: f002 fae4 bl 8002bf0 <TS_IO_Delay>
/* Initialize I2C link if needed */
ft5336_I2C_InitializeIfRequired();
8000628: f000 fa7a bl 8000b20 <ft5336_I2C_InitializeIfRequired>
}
800062c: bf00 nop
800062e: 3708 adds r7, #8
8000630: 46bd mov sp, r7
8000632: bd80 pop {r7, pc}
08000634 <ft5336_Reset>:
* @note : Not applicable to FT5336.
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
* @retval None
*/
void ft5336_Reset(uint16_t DeviceAddr)
{
8000634: b480 push {r7}
8000636: b083 sub sp, #12
8000638: af00 add r7, sp, #0
800063a: 4603 mov r3, r0
800063c: 80fb strh r3, [r7, #6]
/* Do nothing */
/* No software reset sequence available in FT5336 IC */
}
800063e: bf00 nop
8000640: 370c adds r7, #12
8000642: 46bd mov sp, r7
8000644: f85d 7b04 ldr.w r7, [sp], #4
8000648: 4770 bx lr
0800064a <ft5336_ReadID>:
* able to read the FT5336 device ID, and verify this is a FT5336.
* @param DeviceAddr: I2C FT5336 Slave address.
* @retval The Device ID (two bytes).
*/
uint16_t ft5336_ReadID(uint16_t DeviceAddr)
{
800064a: b580 push {r7, lr}
800064c: b084 sub sp, #16
800064e: af00 add r7, sp, #0
8000650: 4603 mov r3, r0
8000652: 80fb strh r3, [r7, #6]
volatile uint8_t ucReadId = 0;
8000654: 2300 movs r3, #0
8000656: 737b strb r3, [r7, #13]
uint8_t nbReadAttempts = 0;
8000658: 2300 movs r3, #0
800065a: 73fb strb r3, [r7, #15]
uint8_t bFoundDevice = 0; /* Device not found by default */
800065c: 2300 movs r3, #0
800065e: 73bb strb r3, [r7, #14]
/* Initialize I2C link if needed */
ft5336_I2C_InitializeIfRequired();
8000660: f000 fa5e bl 8000b20 <ft5336_I2C_InitializeIfRequired>
/* At maximum 4 attempts to read ID : exit at first finding of the searched device ID */
for(nbReadAttempts = 0; ((nbReadAttempts < 3) && !(bFoundDevice)); nbReadAttempts++)
8000664: 2300 movs r3, #0
8000666: 73fb strb r3, [r7, #15]
8000668: e010 b.n 800068c <ft5336_ReadID+0x42>
{
/* Read register FT5336_CHIP_ID_REG as DeviceID detection */
ucReadId = TS_IO_Read(DeviceAddr, FT5336_CHIP_ID_REG);
800066a: 88fb ldrh r3, [r7, #6]
800066c: b2db uxtb r3, r3
800066e: 21a8 movs r1, #168 ; 0xa8
8000670: 4618 mov r0, r3
8000672: f002 fa9f bl 8002bb4 <TS_IO_Read>
8000676: 4603 mov r3, r0
8000678: 737b strb r3, [r7, #13]
/* Found the searched device ID ? */
if(ucReadId == FT5336_ID_VALUE)
800067a: 7b7b ldrb r3, [r7, #13]
800067c: b2db uxtb r3, r3
800067e: 2b51 cmp r3, #81 ; 0x51
8000680: d101 bne.n 8000686 <ft5336_ReadID+0x3c>
{
/* Set device as found */
bFoundDevice = 1;
8000682: 2301 movs r3, #1
8000684: 73bb strb r3, [r7, #14]
for(nbReadAttempts = 0; ((nbReadAttempts < 3) && !(bFoundDevice)); nbReadAttempts++)
8000686: 7bfb ldrb r3, [r7, #15]
8000688: 3301 adds r3, #1
800068a: 73fb strb r3, [r7, #15]
800068c: 7bfb ldrb r3, [r7, #15]
800068e: 2b02 cmp r3, #2
8000690: d802 bhi.n 8000698 <ft5336_ReadID+0x4e>
8000692: 7bbb ldrb r3, [r7, #14]
8000694: 2b00 cmp r3, #0
8000696: d0e8 beq.n 800066a <ft5336_ReadID+0x20>
}
}
/* Return the device ID value */
return (ucReadId);
8000698: 7b7b ldrb r3, [r7, #13]
800069a: b2db uxtb r3, r3
800069c: b29b uxth r3, r3
}
800069e: 4618 mov r0, r3
80006a0: 3710 adds r7, #16
80006a2: 46bd mov sp, r7
80006a4: bd80 pop {r7, pc}
080006a6 <ft5336_TS_Start>:
* @brief Configures the touch Screen IC device to start detecting touches
* @param DeviceAddr: Device address on communication Bus (I2C slave address).
* @retval None.
*/
void ft5336_TS_Start(uint16_t DeviceAddr)
{
80006a6: b580 push {r7, lr}
80006a8: b082 sub sp, #8
80006aa: af00 add r7, sp, #0
80006ac: 4603 mov r3, r0
80006ae: 80fb strh r3, [r7, #6]
/* Minimum static configuration of FT5336 */
FT5336_ASSERT(ft5336_TS_Configure(DeviceAddr));
80006b0: 88fb ldrh r3, [r7, #6]
80006b2: 4618 mov r0, r3
80006b4: f000 fa44 bl 8000b40 <ft5336_TS_Configure>
/* By default set FT5336 IC in Polling mode : no INT generation on FT5336 for new touch available */
/* Note TS_INT is active low */
ft5336_TS_DisableIT(DeviceAddr);
80006b8: 88fb ldrh r3, [r7, #6]
80006ba: 4618 mov r0, r3
80006bc: f000 f932 bl 8000924 <ft5336_TS_DisableIT>
}
80006c0: bf00 nop
80006c2: 3708 adds r7, #8
80006c4: 46bd mov sp, r7
80006c6: bd80 pop {r7, pc}
080006c8 <ft5336_TS_DetectTouch>:
* variables).
* @param DeviceAddr: Device address on communication Bus.
* @retval : Number of active touches detected (can be 0, 1 or 2).
*/
uint8_t ft5336_TS_DetectTouch(uint16_t DeviceAddr)
{
80006c8: b580 push {r7, lr}
80006ca: b084 sub sp, #16
80006cc: af00 add r7, sp, #0
80006ce: 4603 mov r3, r0
80006d0: 80fb strh r3, [r7, #6]
volatile uint8_t nbTouch = 0;
80006d2: 2300 movs r3, #0
80006d4: 73fb strb r3, [r7, #15]
/* Read register FT5336_TD_STAT_REG to check number of touches detection */
nbTouch = TS_IO_Read(DeviceAddr, FT5336_TD_STAT_REG);
80006d6: 88fb ldrh r3, [r7, #6]
80006d8: b2db uxtb r3, r3
80006da: 2102 movs r1, #2
80006dc: 4618 mov r0, r3
80006de: f002 fa69 bl 8002bb4 <TS_IO_Read>
80006e2: 4603 mov r3, r0
80006e4: 73fb strb r3, [r7, #15]
nbTouch &= FT5336_TD_STAT_MASK;
80006e6: 7bfb ldrb r3, [r7, #15]
80006e8: b2db uxtb r3, r3
80006ea: f003 030f and.w r3, r3, #15
80006ee: b2db uxtb r3, r3
80006f0: 73fb strb r3, [r7, #15]
if(nbTouch > FT5336_MAX_DETECTABLE_TOUCH)
80006f2: 7bfb ldrb r3, [r7, #15]
80006f4: b2db uxtb r3, r3
80006f6: 2b05 cmp r3, #5
80006f8: d901 bls.n 80006fe <ft5336_TS_DetectTouch+0x36>
{
/* If invalid number of touch detected, set it to zero */
nbTouch = 0;
80006fa: 2300 movs r3, #0
80006fc: 73fb strb r3, [r7, #15]
}
/* Update ft5336 driver internal global : current number of active touches */
ft5336_handle.currActiveTouchNb = nbTouch;
80006fe: 7bfb ldrb r3, [r7, #15]
8000700: b2da uxtb r2, r3
8000702: 4b05 ldr r3, [pc, #20] ; (8000718 <ft5336_TS_DetectTouch+0x50>)
8000704: 705a strb r2, [r3, #1]
/* Reset current active touch index on which to work on */
ft5336_handle.currActiveTouchIdx = 0;
8000706: 4b04 ldr r3, [pc, #16] ; (8000718 <ft5336_TS_DetectTouch+0x50>)
8000708: 2200 movs r2, #0
800070a: 709a strb r2, [r3, #2]
return(nbTouch);
800070c: 7bfb ldrb r3, [r7, #15]
800070e: b2db uxtb r3, r3
}
8000710: 4618 mov r0, r3
8000712: 3710 adds r7, #16
8000714: 46bd mov sp, r7
8000716: bd80 pop {r7, pc}
8000718: 2000035c .word 0x2000035c
0800071c <ft5336_TS_GetXY>:
* @param X: Pointer to X position value
* @param Y: Pointer to Y position value
* @retval None.
*/
void ft5336_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y)
{
800071c: b580 push {r7, lr}
800071e: b086 sub sp, #24
8000720: af00 add r7, sp, #0
8000722: 4603 mov r3, r0
8000724: 60b9 str r1, [r7, #8]
8000726: 607a str r2, [r7, #4]
8000728: 81fb strh r3, [r7, #14]
volatile uint8_t ucReadData = 0;
800072a: 2300 movs r3, #0
800072c: 74fb strb r3, [r7, #19]
static uint16_t coord;
uint8_t regAddressXLow = 0;
800072e: 2300 movs r3, #0
8000730: 75fb strb r3, [r7, #23]
uint8_t regAddressXHigh = 0;
8000732: 2300 movs r3, #0
8000734: 75bb strb r3, [r7, #22]
uint8_t regAddressYLow = 0;
8000736: 2300 movs r3, #0
8000738: 757b strb r3, [r7, #21]
uint8_t regAddressYHigh = 0;
800073a: 2300 movs r3, #0
800073c: 753b strb r3, [r7, #20]
if(ft5336_handle.currActiveTouchIdx < ft5336_handle.currActiveTouchNb)
800073e: 4b6d ldr r3, [pc, #436] ; (80008f4 <ft5336_TS_GetXY+0x1d8>)
8000740: 789a ldrb r2, [r3, #2]
8000742: 4b6c ldr r3, [pc, #432] ; (80008f4 <ft5336_TS_GetXY+0x1d8>)
8000744: 785b ldrb r3, [r3, #1]
8000746: 429a cmp r2, r3
8000748: f080 80cf bcs.w 80008ea <ft5336_TS_GetXY+0x1ce>
{
switch(ft5336_handle.currActiveTouchIdx)
800074c: 4b69 ldr r3, [pc, #420] ; (80008f4 <ft5336_TS_GetXY+0x1d8>)
800074e: 789b ldrb r3, [r3, #2]
8000750: 2b09 cmp r3, #9
8000752: d871 bhi.n 8000838 <ft5336_TS_GetXY+0x11c>
8000754: a201 add r2, pc, #4 ; (adr r2, 800075c <ft5336_TS_GetXY+0x40>)
8000756: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800075a: bf00 nop
800075c: 08000785 .word 0x08000785
8000760: 08000797 .word 0x08000797
8000764: 080007a9 .word 0x080007a9
8000768: 080007bb .word 0x080007bb
800076c: 080007cd .word 0x080007cd
8000770: 080007df .word 0x080007df
8000774: 080007f1 .word 0x080007f1
8000778: 08000803 .word 0x08000803
800077c: 08000815 .word 0x08000815
8000780: 08000827 .word 0x08000827
{
case 0 :
regAddressXLow = FT5336_P1_XL_REG;
8000784: 2304 movs r3, #4
8000786: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P1_XH_REG;
8000788: 2303 movs r3, #3
800078a: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P1_YL_REG;
800078c: 2306 movs r3, #6
800078e: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P1_YH_REG;
8000790: 2305 movs r3, #5
8000792: 753b strb r3, [r7, #20]
break;
8000794: e051 b.n 800083a <ft5336_TS_GetXY+0x11e>
case 1 :
regAddressXLow = FT5336_P2_XL_REG;
8000796: 230a movs r3, #10
8000798: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P2_XH_REG;
800079a: 2309 movs r3, #9
800079c: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P2_YL_REG;
800079e: 230c movs r3, #12
80007a0: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P2_YH_REG;
80007a2: 230b movs r3, #11
80007a4: 753b strb r3, [r7, #20]
break;
80007a6: e048 b.n 800083a <ft5336_TS_GetXY+0x11e>
case 2 :
regAddressXLow = FT5336_P3_XL_REG;
80007a8: 2310 movs r3, #16
80007aa: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P3_XH_REG;
80007ac: 230f movs r3, #15
80007ae: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P3_YL_REG;
80007b0: 2312 movs r3, #18
80007b2: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P3_YH_REG;
80007b4: 2311 movs r3, #17
80007b6: 753b strb r3, [r7, #20]
break;
80007b8: e03f b.n 800083a <ft5336_TS_GetXY+0x11e>
case 3 :
regAddressXLow = FT5336_P4_XL_REG;
80007ba: 2316 movs r3, #22
80007bc: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P4_XH_REG;
80007be: 2315 movs r3, #21
80007c0: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P4_YL_REG;
80007c2: 2318 movs r3, #24
80007c4: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P4_YH_REG;
80007c6: 2317 movs r3, #23
80007c8: 753b strb r3, [r7, #20]
break;
80007ca: e036 b.n 800083a <ft5336_TS_GetXY+0x11e>
case 4 :
regAddressXLow = FT5336_P5_XL_REG;
80007cc: 231c movs r3, #28
80007ce: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P5_XH_REG;
80007d0: 231b movs r3, #27
80007d2: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P5_YL_REG;
80007d4: 231e movs r3, #30
80007d6: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P5_YH_REG;
80007d8: 231d movs r3, #29
80007da: 753b strb r3, [r7, #20]
break;
80007dc: e02d b.n 800083a <ft5336_TS_GetXY+0x11e>
case 5 :
regAddressXLow = FT5336_P6_XL_REG;
80007de: 2322 movs r3, #34 ; 0x22
80007e0: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P6_XH_REG;
80007e2: 2321 movs r3, #33 ; 0x21
80007e4: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P6_YL_REG;
80007e6: 2324 movs r3, #36 ; 0x24
80007e8: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P6_YH_REG;
80007ea: 2323 movs r3, #35 ; 0x23
80007ec: 753b strb r3, [r7, #20]
break;
80007ee: e024 b.n 800083a <ft5336_TS_GetXY+0x11e>
case 6 :
regAddressXLow = FT5336_P7_XL_REG;
80007f0: 2328 movs r3, #40 ; 0x28
80007f2: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P7_XH_REG;
80007f4: 2327 movs r3, #39 ; 0x27
80007f6: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P7_YL_REG;
80007f8: 232a movs r3, #42 ; 0x2a
80007fa: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P7_YH_REG;
80007fc: 2329 movs r3, #41 ; 0x29
80007fe: 753b strb r3, [r7, #20]
break;
8000800: e01b b.n 800083a <ft5336_TS_GetXY+0x11e>
case 7 :
regAddressXLow = FT5336_P8_XL_REG;
8000802: 232e movs r3, #46 ; 0x2e
8000804: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P8_XH_REG;
8000806: 232d movs r3, #45 ; 0x2d
8000808: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P8_YL_REG;
800080a: 2330 movs r3, #48 ; 0x30
800080c: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P8_YH_REG;
800080e: 232f movs r3, #47 ; 0x2f
8000810: 753b strb r3, [r7, #20]
break;
8000812: e012 b.n 800083a <ft5336_TS_GetXY+0x11e>
case 8 :
regAddressXLow = FT5336_P9_XL_REG;
8000814: 2334 movs r3, #52 ; 0x34
8000816: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P9_XH_REG;
8000818: 2333 movs r3, #51 ; 0x33
800081a: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P9_YL_REG;
800081c: 2336 movs r3, #54 ; 0x36
800081e: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P9_YH_REG;
8000820: 2335 movs r3, #53 ; 0x35
8000822: 753b strb r3, [r7, #20]
break;
8000824: e009 b.n 800083a <ft5336_TS_GetXY+0x11e>
case 9 :
regAddressXLow = FT5336_P10_XL_REG;
8000826: 233a movs r3, #58 ; 0x3a
8000828: 75fb strb r3, [r7, #23]
regAddressXHigh = FT5336_P10_XH_REG;
800082a: 2339 movs r3, #57 ; 0x39
800082c: 75bb strb r3, [r7, #22]
regAddressYLow = FT5336_P10_YL_REG;
800082e: 233c movs r3, #60 ; 0x3c
8000830: 757b strb r3, [r7, #21]
regAddressYHigh = FT5336_P10_YH_REG;
8000832: 233b movs r3, #59 ; 0x3b
8000834: 753b strb r3, [r7, #20]
break;
8000836: e000 b.n 800083a <ft5336_TS_GetXY+0x11e>
default :
break;
8000838: bf00 nop
} /* end switch(ft5336_handle.currActiveTouchIdx) */
/* Read low part of X position */
ucReadData = TS_IO_Read(DeviceAddr, regAddressXLow);
800083a: 89fb ldrh r3, [r7, #14]
800083c: b2db uxtb r3, r3
800083e: 7dfa ldrb r2, [r7, #23]
8000840: 4611 mov r1, r2
8000842: 4618 mov r0, r3
8000844: f002 f9b6 bl 8002bb4 <TS_IO_Read>
8000848: 4603 mov r3, r0
800084a: 74fb strb r3, [r7, #19]
coord = (ucReadData & FT5336_TOUCH_POS_LSB_MASK) >> FT5336_TOUCH_POS_LSB_SHIFT;
800084c: 7cfb ldrb r3, [r7, #19]
800084e: b2db uxtb r3, r3
8000850: b29a uxth r2, r3
8000852: 4b29 ldr r3, [pc, #164] ; (80008f8 <ft5336_TS_GetXY+0x1dc>)
8000854: 801a strh r2, [r3, #0]
/* Read high part of X position */
ucReadData = TS_IO_Read(DeviceAddr, regAddressXHigh);
8000856: 89fb ldrh r3, [r7, #14]
8000858: b2db uxtb r3, r3
800085a: 7dba ldrb r2, [r7, #22]
800085c: 4611 mov r1, r2
800085e: 4618 mov r0, r3
8000860: f002 f9a8 bl 8002bb4 <TS_IO_Read>
8000864: 4603 mov r3, r0
8000866: 74fb strb r3, [r7, #19]
coord |= ((ucReadData & FT5336_TOUCH_POS_MSB_MASK) >> FT5336_TOUCH_POS_MSB_SHIFT) << 8;
8000868: 7cfb ldrb r3, [r7, #19]
800086a: b2db uxtb r3, r3
800086c: 021b lsls r3, r3, #8
800086e: f403 6370 and.w r3, r3, #3840 ; 0xf00
8000872: b21a sxth r2, r3
8000874: 4b20 ldr r3, [pc, #128] ; (80008f8 <ft5336_TS_GetXY+0x1dc>)
8000876: 881b ldrh r3, [r3, #0]
8000878: b21b sxth r3, r3
800087a: 4313 orrs r3, r2
800087c: b21b sxth r3, r3
800087e: b29a uxth r2, r3
8000880: 4b1d ldr r3, [pc, #116] ; (80008f8 <ft5336_TS_GetXY+0x1dc>)
8000882: 801a strh r2, [r3, #0]
/* Send back ready X position to caller */
*X = coord;
8000884: 4b1c ldr r3, [pc, #112] ; (80008f8 <ft5336_TS_GetXY+0x1dc>)
8000886: 881a ldrh r2, [r3, #0]
8000888: 68bb ldr r3, [r7, #8]
800088a: 801a strh r2, [r3, #0]
/* Read low part of Y position */
ucReadData = TS_IO_Read(DeviceAddr, regAddressYLow);
800088c: 89fb ldrh r3, [r7, #14]
800088e: b2db uxtb r3, r3
8000890: 7d7a ldrb r2, [r7, #21]
8000892: 4611 mov r1, r2
8000894: 4618 mov r0, r3
8000896: f002 f98d bl 8002bb4 <TS_IO_Read>
800089a: 4603 mov r3, r0
800089c: 74fb strb r3, [r7, #19]
coord = (ucReadData & FT5336_TOUCH_POS_LSB_MASK) >> FT5336_TOUCH_POS_LSB_SHIFT;
800089e: 7cfb ldrb r3, [r7, #19]
80008a0: b2db uxtb r3, r3
80008a2: b29a uxth r2, r3
80008a4: 4b14 ldr r3, [pc, #80] ; (80008f8 <ft5336_TS_GetXY+0x1dc>)
80008a6: 801a strh r2, [r3, #0]
/* Read high part of Y position */
ucReadData = TS_IO_Read(DeviceAddr, regAddressYHigh);
80008a8: 89fb ldrh r3, [r7, #14]
80008aa: b2db uxtb r3, r3
80008ac: 7d3a ldrb r2, [r7, #20]
80008ae: 4611 mov r1, r2
80008b0: 4618 mov r0, r3
80008b2: f002 f97f bl 8002bb4 <TS_IO_Read>
80008b6: 4603 mov r3, r0
80008b8: 74fb strb r3, [r7, #19]
coord |= ((ucReadData & FT5336_TOUCH_POS_MSB_MASK) >> FT5336_TOUCH_POS_MSB_SHIFT) << 8;
80008ba: 7cfb ldrb r3, [r7, #19]
80008bc: b2db uxtb r3, r3
80008be: 021b lsls r3, r3, #8
80008c0: f403 6370 and.w r3, r3, #3840 ; 0xf00
80008c4: b21a sxth r2, r3
80008c6: 4b0c ldr r3, [pc, #48] ; (80008f8 <ft5336_TS_GetXY+0x1dc>)
80008c8: 881b ldrh r3, [r3, #0]
80008ca: b21b sxth r3, r3
80008cc: 4313 orrs r3, r2
80008ce: b21b sxth r3, r3
80008d0: b29a uxth r2, r3
80008d2: 4b09 ldr r3, [pc, #36] ; (80008f8 <ft5336_TS_GetXY+0x1dc>)
80008d4: 801a strh r2, [r3, #0]
/* Send back ready Y position to caller */
*Y = coord;
80008d6: 4b08 ldr r3, [pc, #32] ; (80008f8 <ft5336_TS_GetXY+0x1dc>)
80008d8: 881a ldrh r2, [r3, #0]
80008da: 687b ldr r3, [r7, #4]
80008dc: 801a strh r2, [r3, #0]
ft5336_handle.currActiveTouchIdx++; /* next call will work on next touch */
80008de: 4b05 ldr r3, [pc, #20] ; (80008f4 <ft5336_TS_GetXY+0x1d8>)
80008e0: 789b ldrb r3, [r3, #2]
80008e2: 3301 adds r3, #1
80008e4: b2da uxtb r2, r3
80008e6: 4b03 ldr r3, [pc, #12] ; (80008f4 <ft5336_TS_GetXY+0x1d8>)
80008e8: 709a strb r2, [r3, #2]
} /* of if(ft5336_handle.currActiveTouchIdx < ft5336_handle.currActiveTouchNb) */
}
80008ea: bf00 nop
80008ec: 3718 adds r7, #24
80008ee: 46bd mov sp, r7
80008f0: bd80 pop {r7, pc}
80008f2: bf00 nop
80008f4: 2000035c .word 0x2000035c
80008f8: 20000360 .word 0x20000360
080008fc <ft5336_TS_EnableIT>:
* connected to MCU as EXTI.
* @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT5336).
* @retval None
*/
void ft5336_TS_EnableIT(uint16_t DeviceAddr)
{
80008fc: b580 push {r7, lr}
80008fe: b084 sub sp, #16
8000900: af00 add r7, sp, #0
8000902: 4603 mov r3, r0
8000904: 80fb strh r3, [r7, #6]
uint8_t regValue = 0;
8000906: 2300 movs r3, #0
8000908: 73fb strb r3, [r7, #15]
regValue = (FT5336_G_MODE_INTERRUPT_TRIGGER & (FT5336_G_MODE_INTERRUPT_MASK >> FT5336_G_MODE_INTERRUPT_SHIFT)) << FT5336_G_MODE_INTERRUPT_SHIFT;
800090a: 2301 movs r3, #1
800090c: 73fb strb r3, [r7, #15]
/* Set interrupt trigger mode in FT5336_GMODE_REG */
TS_IO_Write(DeviceAddr, FT5336_GMODE_REG, regValue);
800090e: 88fb ldrh r3, [r7, #6]
8000910: b2db uxtb r3, r3
8000912: 7bfa ldrb r2, [r7, #15]
8000914: 21a4 movs r1, #164 ; 0xa4
8000916: 4618 mov r0, r3
8000918: f002 f932 bl 8002b80 <TS_IO_Write>
}
800091c: bf00 nop
800091e: 3710 adds r7, #16
8000920: 46bd mov sp, r7
8000922: bd80 pop {r7, pc}
08000924 <ft5336_TS_DisableIT>:
* connected to MCU as EXTI.
* @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT5336).
* @retval None
*/
void ft5336_TS_DisableIT(uint16_t DeviceAddr)
{
8000924: b580 push {r7, lr}
8000926: b084 sub sp, #16
8000928: af00 add r7, sp, #0
800092a: 4603 mov r3, r0
800092c: 80fb strh r3, [r7, #6]
uint8_t regValue = 0;
800092e: 2300 movs r3, #0
8000930: 73fb strb r3, [r7, #15]
regValue = (FT5336_G_MODE_INTERRUPT_POLLING & (FT5336_G_MODE_INTERRUPT_MASK >> FT5336_G_MODE_INTERRUPT_SHIFT)) << FT5336_G_MODE_INTERRUPT_SHIFT;
8000932: 2300 movs r3, #0
8000934: 73fb strb r3, [r7, #15]
/* Set interrupt polling mode in FT5336_GMODE_REG */
TS_IO_Write(DeviceAddr, FT5336_GMODE_REG, regValue);
8000936: 88fb ldrh r3, [r7, #6]
8000938: b2db uxtb r3, r3
800093a: 7bfa ldrb r2, [r7, #15]
800093c: 21a4 movs r1, #164 ; 0xa4
800093e: 4618 mov r0, r3
8000940: f002 f91e bl 8002b80 <TS_IO_Write>
}
8000944: bf00 nop
8000946: 3710 adds r7, #16
8000948: 46bd mov sp, r7
800094a: bd80 pop {r7, pc}
0800094c <ft5336_TS_ITStatus>:
* @note : This feature is not applicable to FT5336.
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
* @retval TS interrupts status : always return 0 here
*/
uint8_t ft5336_TS_ITStatus(uint16_t DeviceAddr)
{
800094c: b480 push {r7}
800094e: b083 sub sp, #12
8000950: af00 add r7, sp, #0
8000952: 4603 mov r3, r0
8000954: 80fb strh r3, [r7, #6]
/* Always return 0 as feature not applicable to FT5336 */
return 0;
8000956: 2300 movs r3, #0
}
8000958: 4618 mov r0, r3
800095a: 370c adds r7, #12
800095c: 46bd mov sp, r7
800095e: f85d 7b04 ldr.w r7, [sp], #4
8000962: 4770 bx lr
08000964 <ft5336_TS_ClearIT>:
* @note : This feature is not applicable to FT5336.
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
* @retval None
*/
void ft5336_TS_ClearIT(uint16_t DeviceAddr)
{
8000964: b480 push {r7}
8000966: b083 sub sp, #12
8000968: af00 add r7, sp, #0
800096a: 4603 mov r3, r0
800096c: 80fb strh r3, [r7, #6]
/* Nothing to be done here for FT5336 */
}
800096e: bf00 nop
8000970: 370c adds r7, #12
8000972: 46bd mov sp, r7
8000974: f85d 7b04 ldr.w r7, [sp], #4
8000978: 4770 bx lr
0800097a <ft5336_TS_GetGestureID>:
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
* @param pGestureId : Pointer to get last touch gesture Identification.
* @retval None.
*/
void ft5336_TS_GetGestureID(uint16_t DeviceAddr, uint32_t * pGestureId)
{
800097a: b580 push {r7, lr}
800097c: b084 sub sp, #16
800097e: af00 add r7, sp, #0
8000980: 4603 mov r3, r0
8000982: 6039 str r1, [r7, #0]
8000984: 80fb strh r3, [r7, #6]
volatile uint8_t ucReadData = 0;
8000986: 2300 movs r3, #0
8000988: 73fb strb r3, [r7, #15]
ucReadData = TS_IO_Read(DeviceAddr, FT5336_GEST_ID_REG);
800098a: 88fb ldrh r3, [r7, #6]
800098c: b2db uxtb r3, r3
800098e: 2101 movs r1, #1
8000990: 4618 mov r0, r3
8000992: f002 f90f bl 8002bb4 <TS_IO_Read>
8000996: 4603 mov r3, r0
8000998: 73fb strb r3, [r7, #15]
* pGestureId = ucReadData;
800099a: 7bfb ldrb r3, [r7, #15]
800099c: b2db uxtb r3, r3
800099e: 461a mov r2, r3
80009a0: 683b ldr r3, [r7, #0]
80009a2: 601a str r2, [r3, #0]
}
80009a4: bf00 nop
80009a6: 3710 adds r7, #16
80009a8: 46bd mov sp, r7
80009aa: bd80 pop {r7, pc}
080009ac <ft5336_TS_GetTouchInfo>:
void ft5336_TS_GetTouchInfo(uint16_t DeviceAddr,
uint32_t touchIdx,
uint32_t * pWeight,
uint32_t * pArea,
uint32_t * pEvent)
{
80009ac: b580 push {r7, lr}
80009ae: b086 sub sp, #24
80009b0: af00 add r7, sp, #0
80009b2: 60b9 str r1, [r7, #8]
80009b4: 607a str r2, [r7, #4]
80009b6: 603b str r3, [r7, #0]
80009b8: 4603 mov r3, r0
80009ba: 81fb strh r3, [r7, #14]
volatile uint8_t ucReadData = 0;
80009bc: 2300 movs r3, #0
80009be: 753b strb r3, [r7, #20]
uint8_t regAddressXHigh = 0;
80009c0: 2300 movs r3, #0
80009c2: 75fb strb r3, [r7, #23]
uint8_t regAddressPWeight = 0;
80009c4: 2300 movs r3, #0
80009c6: 75bb strb r3, [r7, #22]
uint8_t regAddressPMisc = 0;
80009c8: 2300 movs r3, #0
80009ca: 757b strb r3, [r7, #21]
if(touchIdx < ft5336_handle.currActiveTouchNb)
80009cc: 4b4d ldr r3, [pc, #308] ; (8000b04 <ft5336_TS_GetTouchInfo+0x158>)
80009ce: 785b ldrb r3, [r3, #1]
80009d0: 461a mov r2, r3
80009d2: 68bb ldr r3, [r7, #8]
80009d4: 4293 cmp r3, r2
80009d6: f080 8090 bcs.w 8000afa <ft5336_TS_GetTouchInfo+0x14e>
{
switch(touchIdx)
80009da: 68bb ldr r3, [r7, #8]
80009dc: 2b09 cmp r3, #9
80009de: d85d bhi.n 8000a9c <ft5336_TS_GetTouchInfo+0xf0>
80009e0: a201 add r2, pc, #4 ; (adr r2, 80009e8 <ft5336_TS_GetTouchInfo+0x3c>)
80009e2: f852 f023 ldr.w pc, [r2, r3, lsl #2]
80009e6: bf00 nop
80009e8: 08000a11 .word 0x08000a11
80009ec: 08000a1f .word 0x08000a1f
80009f0: 08000a2d .word 0x08000a2d
80009f4: 08000a3b .word 0x08000a3b
80009f8: 08000a49 .word 0x08000a49
80009fc: 08000a57 .word 0x08000a57
8000a00: 08000a65 .word 0x08000a65
8000a04: 08000a73 .word 0x08000a73
8000a08: 08000a81 .word 0x08000a81
8000a0c: 08000a8f .word 0x08000a8f
{
case 0 :
regAddressXHigh = FT5336_P1_XH_REG;
8000a10: 2303 movs r3, #3
8000a12: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P1_WEIGHT_REG;
8000a14: 2307 movs r3, #7
8000a16: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P1_MISC_REG;
8000a18: 2308 movs r3, #8
8000a1a: 757b strb r3, [r7, #21]
break;
8000a1c: e03f b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 1 :
regAddressXHigh = FT5336_P2_XH_REG;
8000a1e: 2309 movs r3, #9
8000a20: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P2_WEIGHT_REG;
8000a22: 230d movs r3, #13
8000a24: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P2_MISC_REG;
8000a26: 230e movs r3, #14
8000a28: 757b strb r3, [r7, #21]
break;
8000a2a: e038 b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 2 :
regAddressXHigh = FT5336_P3_XH_REG;
8000a2c: 230f movs r3, #15
8000a2e: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P3_WEIGHT_REG;
8000a30: 2313 movs r3, #19
8000a32: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P3_MISC_REG;
8000a34: 2314 movs r3, #20
8000a36: 757b strb r3, [r7, #21]
break;
8000a38: e031 b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 3 :
regAddressXHigh = FT5336_P4_XH_REG;
8000a3a: 2315 movs r3, #21
8000a3c: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P4_WEIGHT_REG;
8000a3e: 2319 movs r3, #25
8000a40: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P4_MISC_REG;
8000a42: 231a movs r3, #26
8000a44: 757b strb r3, [r7, #21]
break;
8000a46: e02a b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 4 :
regAddressXHigh = FT5336_P5_XH_REG;
8000a48: 231b movs r3, #27
8000a4a: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P5_WEIGHT_REG;
8000a4c: 231f movs r3, #31
8000a4e: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P5_MISC_REG;
8000a50: 2320 movs r3, #32
8000a52: 757b strb r3, [r7, #21]
break;
8000a54: e023 b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 5 :
regAddressXHigh = FT5336_P6_XH_REG;
8000a56: 2321 movs r3, #33 ; 0x21
8000a58: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P6_WEIGHT_REG;
8000a5a: 2325 movs r3, #37 ; 0x25
8000a5c: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P6_MISC_REG;
8000a5e: 2326 movs r3, #38 ; 0x26
8000a60: 757b strb r3, [r7, #21]
break;
8000a62: e01c b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 6 :
regAddressXHigh = FT5336_P7_XH_REG;
8000a64: 2327 movs r3, #39 ; 0x27
8000a66: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P7_WEIGHT_REG;
8000a68: 232b movs r3, #43 ; 0x2b
8000a6a: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P7_MISC_REG;
8000a6c: 232c movs r3, #44 ; 0x2c
8000a6e: 757b strb r3, [r7, #21]
break;
8000a70: e015 b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 7 :
regAddressXHigh = FT5336_P8_XH_REG;
8000a72: 232d movs r3, #45 ; 0x2d
8000a74: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P8_WEIGHT_REG;
8000a76: 2331 movs r3, #49 ; 0x31
8000a78: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P8_MISC_REG;
8000a7a: 2332 movs r3, #50 ; 0x32
8000a7c: 757b strb r3, [r7, #21]
break;
8000a7e: e00e b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 8 :
regAddressXHigh = FT5336_P9_XH_REG;
8000a80: 2333 movs r3, #51 ; 0x33
8000a82: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P9_WEIGHT_REG;
8000a84: 2337 movs r3, #55 ; 0x37
8000a86: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P9_MISC_REG;
8000a88: 2338 movs r3, #56 ; 0x38
8000a8a: 757b strb r3, [r7, #21]
break;
8000a8c: e007 b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
case 9 :
regAddressXHigh = FT5336_P10_XH_REG;
8000a8e: 2339 movs r3, #57 ; 0x39
8000a90: 75fb strb r3, [r7, #23]
regAddressPWeight = FT5336_P10_WEIGHT_REG;
8000a92: 233d movs r3, #61 ; 0x3d
8000a94: 75bb strb r3, [r7, #22]
regAddressPMisc = FT5336_P10_MISC_REG;
8000a96: 233e movs r3, #62 ; 0x3e
8000a98: 757b strb r3, [r7, #21]
break;
8000a9a: e000 b.n 8000a9e <ft5336_TS_GetTouchInfo+0xf2>
default :
break;
8000a9c: bf00 nop
} /* end switch(touchIdx) */
/* Read Event Id of touch index */
ucReadData = TS_IO_Read(DeviceAddr, regAddressXHigh);
8000a9e: 89fb ldrh r3, [r7, #14]
8000aa0: b2db uxtb r3, r3
8000aa2: 7dfa ldrb r2, [r7, #23]
8000aa4: 4611 mov r1, r2
8000aa6: 4618 mov r0, r3
8000aa8: f002 f884 bl 8002bb4 <TS_IO_Read>
8000aac: 4603 mov r3, r0
8000aae: 753b strb r3, [r7, #20]
* pEvent = (ucReadData & FT5336_TOUCH_EVT_FLAG_MASK) >> FT5336_TOUCH_EVT_FLAG_SHIFT;
8000ab0: 7d3b ldrb r3, [r7, #20]
8000ab2: b2db uxtb r3, r3
8000ab4: 119b asrs r3, r3, #6
8000ab6: f003 0203 and.w r2, r3, #3
8000aba: 6a3b ldr r3, [r7, #32]
8000abc: 601a str r2, [r3, #0]
/* Read weight of touch index */
ucReadData = TS_IO_Read(DeviceAddr, regAddressPWeight);
8000abe: 89fb ldrh r3, [r7, #14]
8000ac0: b2db uxtb r3, r3
8000ac2: 7dba ldrb r2, [r7, #22]
8000ac4: 4611 mov r1, r2
8000ac6: 4618 mov r0, r3
8000ac8: f002 f874 bl 8002bb4 <TS_IO_Read>
8000acc: 4603 mov r3, r0
8000ace: 753b strb r3, [r7, #20]
* pWeight = (ucReadData & FT5336_TOUCH_WEIGHT_MASK) >> FT5336_TOUCH_WEIGHT_SHIFT;
8000ad0: 7d3b ldrb r3, [r7, #20]
8000ad2: b2db uxtb r3, r3
8000ad4: 461a mov r2, r3
8000ad6: 687b ldr r3, [r7, #4]
8000ad8: 601a str r2, [r3, #0]
/* Read area of touch index */
ucReadData = TS_IO_Read(DeviceAddr, regAddressPMisc);
8000ada: 89fb ldrh r3, [r7, #14]
8000adc: b2db uxtb r3, r3
8000ade: 7d7a ldrb r2, [r7, #21]
8000ae0: 4611 mov r1, r2
8000ae2: 4618 mov r0, r3
8000ae4: f002 f866 bl 8002bb4 <TS_IO_Read>
8000ae8: 4603 mov r3, r0
8000aea: 753b strb r3, [r7, #20]
* pArea = (ucReadData & FT5336_TOUCH_AREA_MASK) >> FT5336_TOUCH_AREA_SHIFT;
8000aec: 7d3b ldrb r3, [r7, #20]
8000aee: b2db uxtb r3, r3
8000af0: 111b asrs r3, r3, #4
8000af2: f003 0204 and.w r2, r3, #4
8000af6: 683b ldr r3, [r7, #0]
8000af8: 601a str r2, [r3, #0]
} /* of if(touchIdx < ft5336_handle.currActiveTouchNb) */
}
8000afa: bf00 nop
8000afc: 3718 adds r7, #24
8000afe: 46bd mov sp, r7
8000b00: bd80 pop {r7, pc}
8000b02: bf00 nop
8000b04: 2000035c .word 0x2000035c
08000b08 <ft5336_Get_I2C_InitializedStatus>:
* @brief Return the status of I2C was initialized or not.
* @param None.
* @retval : I2C initialization status.
*/
static uint8_t ft5336_Get_I2C_InitializedStatus(void)
{
8000b08: b480 push {r7}
8000b0a: af00 add r7, sp, #0
return(ft5336_handle.i2cInitialized);
8000b0c: 4b03 ldr r3, [pc, #12] ; (8000b1c <ft5336_Get_I2C_InitializedStatus+0x14>)
8000b0e: 781b ldrb r3, [r3, #0]
}
8000b10: 4618 mov r0, r3
8000b12: 46bd mov sp, r7
8000b14: f85d 7b04 ldr.w r7, [sp], #4
8000b18: 4770 bx lr
8000b1a: bf00 nop
8000b1c: 2000035c .word 0x2000035c
08000b20 <ft5336_I2C_InitializeIfRequired>:
* @brief I2C initialize if needed.
* @param None.
* @retval : None.
*/
static void ft5336_I2C_InitializeIfRequired(void)
{
8000b20: b580 push {r7, lr}
8000b22: af00 add r7, sp, #0
if(ft5336_Get_I2C_InitializedStatus() == FT5336_I2C_NOT_INITIALIZED)
8000b24: f7ff fff0 bl 8000b08 <ft5336_Get_I2C_InitializedStatus>
8000b28: 4603 mov r3, r0
8000b2a: 2b00 cmp r3, #0
8000b2c: d104 bne.n 8000b38 <ft5336_I2C_InitializeIfRequired+0x18>
{
/* Initialize TS IO BUS layer (I2C) */
TS_IO_Init();
8000b2e: f002 f81d bl 8002b6c <TS_IO_Init>
/* Set state to initialized */
ft5336_handle.i2cInitialized = FT5336_I2C_INITIALIZED;
8000b32: 4b02 ldr r3, [pc, #8] ; (8000b3c <ft5336_I2C_InitializeIfRequired+0x1c>)
8000b34: 2201 movs r2, #1
8000b36: 701a strb r2, [r3, #0]
}
}
8000b38: bf00 nop
8000b3a: bd80 pop {r7, pc}
8000b3c: 2000035c .word 0x2000035c
08000b40 <ft5336_TS_Configure>:
* @brief Basic static configuration of TouchScreen
* @param DeviceAddr: FT5336 Device address for communication on I2C Bus.
* @retval Status FT5336_STATUS_OK or FT5336_STATUS_NOT_OK.
*/
static uint32_t ft5336_TS_Configure(uint16_t DeviceAddr)
{
8000b40: b480 push {r7}
8000b42: b085 sub sp, #20
8000b44: af00 add r7, sp, #0
8000b46: 4603 mov r3, r0
8000b48: 80fb strh r3, [r7, #6]
uint32_t status = FT5336_STATUS_OK;
8000b4a: 2300 movs r3, #0
8000b4c: 60fb str r3, [r7, #12]
/* Nothing special to be done for FT5336 */
return(status);
8000b4e: 68fb ldr r3, [r7, #12]
}
8000b50: 4618 mov r0, r3
8000b52: 3714 adds r7, #20
8000b54: 46bd mov sp, r7
8000b56: f85d 7b04 ldr.w r7, [sp], #4
8000b5a: 4770 bx lr
08000b5c <main>:
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
8000b5c: b5b0 push {r4, r5, r7, lr}
8000b5e: b0c2 sub sp, #264 ; 0x108
8000b60: af00 add r7, sp, #0
/* USER CODE BEGIN 1 */
char text[50] = {};
8000b62: f107 03d4 add.w r3, r7, #212 ; 0xd4
8000b66: 2232 movs r2, #50 ; 0x32
8000b68: 2100 movs r1, #0
8000b6a: 4618 mov r0, r3
8000b6c: f01c f8bb bl 801cce6 <memset>
static TS_StateTypeDef TS_State;
ADC_ChannelConfTypeDef sConfig = {0};
8000b70: f107 03c4 add.w r3, r7, #196 ; 0xc4
8000b74: 2200 movs r2, #0
8000b76: 601a str r2, [r3, #0]
8000b78: 605a str r2, [r3, #4]
8000b7a: 609a str r2, [r3, #8]
8000b7c: 60da str r2, [r3, #12]
sConfig.Rank = ADC_REGULAR_RANK_1;
8000b7e: 2301 movs r3, #1
8000b80: f8c7 30c8 str.w r3, [r7, #200] ; 0xc8
sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
8000b84: 2300 movs r3, #0
8000b86: f8c7 30cc str.w r3, [r7, #204] ; 0xcc
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
8000b8a: f004 fba8 bl 80052de <HAL_Init>
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
8000b8e: f000 f989 bl 8000ea4 <SystemClock_Config>
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
8000b92: f001 f85d bl 8001c50 <MX_GPIO_Init>
MX_ADC3_Init();
8000b96: f000 fa8b bl 80010b0 <MX_ADC3_Init>
MX_I2C1_Init();
8000b9a: f000 fb59 bl 8001250 <MX_I2C1_Init>
MX_I2C3_Init();
8000b9e: f000 fb97 bl 80012d0 <MX_I2C3_Init>
MX_LTDC_Init();
8000ba2: f000 fbd5 bl 8001350 <MX_LTDC_Init>
MX_RTC_Init();
8000ba6: f000 fc69 bl 800147c <MX_RTC_Init>
MX_SPI2_Init();
8000baa: f000 fd0d bl 80015c8 <MX_SPI2_Init>
MX_TIM1_Init();
8000bae: f000 fd49 bl 8001644 <MX_TIM1_Init>
MX_TIM2_Init();
8000bb2: f000 fd9b bl 80016ec <MX_TIM2_Init>
MX_TIM3_Init();
8000bb6: f000 fde7 bl 8001788 <MX_TIM3_Init>
MX_TIM5_Init();
8000bba: f000 fe73 bl 80018a4 <MX_TIM5_Init>
MX_TIM8_Init();
8000bbe: f000 febf bl 8001940 <MX_TIM8_Init>
MX_USART1_UART_Init();
8000bc2: f000 ff97 bl 8001af4 <MX_USART1_UART_Init>
MX_USART6_UART_Init();
8000bc6: f000 ffc5 bl 8001b54 <MX_USART6_UART_Init>
MX_DAC_Init();
8000bca: f000 fae5 bl 8001198 <MX_DAC_Init>
MX_UART7_Init();
8000bce: f000 ff61 bl 8001a94 <MX_UART7_Init>
MX_FMC_Init();
8000bd2: f000 ffef bl 8001bb4 <MX_FMC_Init>
MX_DMA2D_Init();
8000bd6: f000 fb09 bl 80011ec <MX_DMA2D_Init>
MX_CRC_Init();
8000bda: f000 fabb bl 8001154 <MX_CRC_Init>
MX_RNG_Init();
8000bde: f000 fc39 bl 8001454 <MX_RNG_Init>
MX_ADC1_Init();
8000be2: f000 fa13 bl 800100c <MX_ADC1_Init>
/* USER CODE BEGIN 2 */
BSP_LCD_Init();
8000be6: f002 f80f bl 8002c08 <BSP_LCD_Init>
BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);
8000bea: f04f 4140 mov.w r1, #3221225472 ; 0xc0000000
8000bee: 2000 movs r0, #0
8000bf0: f002 f8a2 bl 8002d38 <BSP_LCD_LayerDefaultInit>
BSP_LCD_LayerDefaultInit(1,
LCD_FB_START_ADDRESS + BSP_LCD_GetXSize() * BSP_LCD_GetYSize() * 4);
8000bf4: f002 f878 bl 8002ce8 <BSP_LCD_GetXSize>
8000bf8: 4604 mov r4, r0
8000bfa: f002 f889 bl 8002d10 <BSP_LCD_GetYSize>
8000bfe: 4603 mov r3, r0
8000c00: fb03 f304 mul.w r3, r3, r4
BSP_LCD_LayerDefaultInit(1,
8000c04: f103 5340 add.w r3, r3, #805306368 ; 0x30000000
8000c08: 009b lsls r3, r3, #2
8000c0a: 4619 mov r1, r3
8000c0c: 2001 movs r0, #1
8000c0e: f002 f893 bl 8002d38 <BSP_LCD_LayerDefaultInit>
BSP_LCD_DisplayOn();
8000c12: f002 fe0b bl 800382c <BSP_LCD_DisplayOn>
BSP_LCD_SelectLayer(1);
8000c16: 2001 movs r0, #1
8000c18: f002 f8ee bl 8002df8 <BSP_LCD_SelectLayer>
BSP_LCD_Clear(LCD_COLOR_BLACK);
8000c1c: f04f 407f mov.w r0, #4278190080 ; 0xff000000
8000c20: f002 f95c bl 8002edc <BSP_LCD_Clear>
BSP_LCD_SetFont(&Font12);
8000c24: 4887 ldr r0, [pc, #540] ; (8000e44 <main+0x2e8>)
8000c26: f002 f929 bl 8002e7c <BSP_LCD_SetFont>
BSP_LCD_SetTextColor(LCD_COLOR_BLUE);
8000c2a: 4887 ldr r0, [pc, #540] ; (8000e48 <main+0x2ec>)
8000c2c: f002 f8f4 bl 8002e18 <BSP_LCD_SetTextColor>
BSP_LCD_SetBackColor(LCD_COLOR_BLACK);
8000c30: f04f 407f mov.w r0, #4278190080 ; 0xff000000
8000c34: f002 f908 bl 8002e48 <BSP_LCD_SetBackColor>
BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
8000c38: f002 f856 bl 8002ce8 <BSP_LCD_GetXSize>
8000c3c: 4603 mov r3, r0
8000c3e: b29c uxth r4, r3
8000c40: f002 f866 bl 8002d10 <BSP_LCD_GetYSize>
8000c44: 4603 mov r3, r0
8000c46: b29b uxth r3, r3
8000c48: 4619 mov r1, r3
8000c4a: 4620 mov r0, r4
8000c4c: f003 fa00 bl 8004050 <BSP_TS_Init>
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
/* Create the queue(s) */
/* definition and creation of Queue_E */
osMessageQDef(Queue_E, 16, uint16_t);
8000c50: 4b7e ldr r3, [pc, #504] ; (8000e4c <main+0x2f0>)
8000c52: f107 04b4 add.w r4, r7, #180 ; 0xb4
8000c56: cb0f ldmia r3, {r0, r1, r2, r3}
8000c58: e884 000f stmia.w r4, {r0, r1, r2, r3}
Queue_EHandle = osMessageCreate(osMessageQ(Queue_E), NULL);
8000c5c: f107 03b4 add.w r3, r7, #180 ; 0xb4
8000c60: 2100 movs r1, #0
8000c62: 4618 mov r0, r3
8000c64: f00c fedc bl 800da20 <osMessageCreate>
8000c68: 4602 mov r2, r0
8000c6a: 4b79 ldr r3, [pc, #484] ; (8000e50 <main+0x2f4>)
8000c6c: 601a str r2, [r3, #0]
/* definition and creation of Queue_F */
osMessageQDef(Queue_F, 1, uint8_t);
8000c6e: 4b79 ldr r3, [pc, #484] ; (8000e54 <main+0x2f8>)
8000c70: f107 04a4 add.w r4, r7, #164 ; 0xa4
8000c74: cb0f ldmia r3, {r0, r1, r2, r3}
8000c76: e884 000f stmia.w r4, {r0, r1, r2, r3}
Queue_FHandle = osMessageCreate(osMessageQ(Queue_F), NULL);
8000c7a: f107 03a4 add.w r3, r7, #164 ; 0xa4
8000c7e: 2100 movs r1, #0
8000c80: 4618 mov r0, r3
8000c82: f00c fecd bl 800da20 <osMessageCreate>
8000c86: 4602 mov r2, r0
8000c88: 4b73 ldr r3, [pc, #460] ; (8000e58 <main+0x2fc>)
8000c8a: 601a str r2, [r3, #0]
/* definition and creation of Queue_J */
osMessageQDef(Queue_J, 16, uint16_t);
8000c8c: 4b6f ldr r3, [pc, #444] ; (8000e4c <main+0x2f0>)
8000c8e: f107 0494 add.w r4, r7, #148 ; 0x94
8000c92: cb0f ldmia r3, {r0, r1, r2, r3}
8000c94: e884 000f stmia.w r4, {r0, r1, r2, r3}
Queue_JHandle = osMessageCreate(osMessageQ(Queue_J), NULL);
8000c98: f107 0394 add.w r3, r7, #148 ; 0x94
8000c9c: 2100 movs r1, #0
8000c9e: 4618 mov r0, r3
8000ca0: f00c febe bl 800da20 <osMessageCreate>
8000ca4: 4602 mov r2, r0
8000ca6: 4b6d ldr r3, [pc, #436] ; (8000e5c <main+0x300>)
8000ca8: 601a str r2, [r3, #0]
/* definition and creation of Queue_P */
osMessageQDef(Queue_P, 16, uint16_t);
8000caa: 4b68 ldr r3, [pc, #416] ; (8000e4c <main+0x2f0>)
8000cac: f107 0484 add.w r4, r7, #132 ; 0x84
8000cb0: cb0f ldmia r3, {r0, r1, r2, r3}
8000cb2: e884 000f stmia.w r4, {r0, r1, r2, r3}
Queue_PHandle = osMessageCreate(osMessageQ(Queue_P), NULL);
8000cb6: f107 0384 add.w r3, r7, #132 ; 0x84
8000cba: 2100 movs r1, #0
8000cbc: 4618 mov r0, r3
8000cbe: f00c feaf bl 800da20 <osMessageCreate>
8000cc2: 4602 mov r2, r0
8000cc4: 4b66 ldr r3, [pc, #408] ; (8000e60 <main+0x304>)
8000cc6: 601a str r2, [r3, #0]
/* definition and creation of Queue_N */
osMessageQDef(Queue_N, 16, uint16_t);
8000cc8: 4b60 ldr r3, [pc, #384] ; (8000e4c <main+0x2f0>)
8000cca: f107 0474 add.w r4, r7, #116 ; 0x74
8000cce: cb0f ldmia r3, {r0, r1, r2, r3}
8000cd0: e884 000f stmia.w r4, {r0, r1, r2, r3}
Queue_NHandle = osMessageCreate(osMessageQ(Queue_N), NULL);
8000cd4: f107 0374 add.w r3, r7, #116 ; 0x74
8000cd8: 2100 movs r1, #0
8000cda: 4618 mov r0, r3
8000cdc: f00c fea0 bl 800da20 <osMessageCreate>
8000ce0: 4602 mov r2, r0
8000ce2: 4b60 ldr r3, [pc, #384] ; (8000e64 <main+0x308>)
8000ce4: 601a str r2, [r3, #0]
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* Create the thread(s) */
/* definition and creation of GameMaster */
osThreadDef(GameMaster, f_GameMaster, osPriorityNormal, 0, 128);
8000ce6: 4b60 ldr r3, [pc, #384] ; (8000e68 <main+0x30c>)
8000ce8: f107 0458 add.w r4, r7, #88 ; 0x58
8000cec: 461d mov r5, r3
8000cee: cd0f ldmia r5!, {r0, r1, r2, r3}
8000cf0: c40f stmia r4!, {r0, r1, r2, r3}
8000cf2: e895 0007 ldmia.w r5, {r0, r1, r2}
8000cf6: e884 0007 stmia.w r4, {r0, r1, r2}
GameMasterHandle = osThreadCreate(osThread(GameMaster), NULL);
8000cfa: f107 0358 add.w r3, r7, #88 ; 0x58
8000cfe: 2100 movs r1, #0
8000d00: 4618 mov r0, r3
8000d02: f00c fccc bl 800d69e <osThreadCreate>
8000d06: 4602 mov r2, r0
8000d08: 4b58 ldr r3, [pc, #352] ; (8000e6c <main+0x310>)
8000d0a: 601a str r2, [r3, #0]
/* definition and creation of Joueur_1 */
osThreadDef(Joueur_1, f_Joueur_1, osPriorityNormal, 0, 128);
8000d0c: 4b58 ldr r3, [pc, #352] ; (8000e70 <main+0x314>)
8000d0e: f107 043c add.w r4, r7, #60 ; 0x3c
8000d12: 461d mov r5, r3
8000d14: cd0f ldmia r5!, {r0, r1, r2, r3}
8000d16: c40f stmia r4!, {r0, r1, r2, r3}
8000d18: e895 0007 ldmia.w r5, {r0, r1, r2}
8000d1c: e884 0007 stmia.w r4, {r0, r1, r2}
Joueur_1Handle = osThreadCreate(osThread(Joueur_1), NULL);
8000d20: f107 033c add.w r3, r7, #60 ; 0x3c
8000d24: 2100 movs r1, #0
8000d26: 4618 mov r0, r3
8000d28: f00c fcb9 bl 800d69e <osThreadCreate>
8000d2c: 4602 mov r2, r0
8000d2e: 4b51 ldr r3, [pc, #324] ; (8000e74 <main+0x318>)
8000d30: 601a str r2, [r3, #0]
/* definition and creation of Block_Enemie */
osThreadDef(Block_Enemie, f_block_enemie, osPriorityIdle, 0, 128);
8000d32: 4b51 ldr r3, [pc, #324] ; (8000e78 <main+0x31c>)
8000d34: f107 0420 add.w r4, r7, #32
8000d38: 461d mov r5, r3
8000d3a: cd0f ldmia r5!, {r0, r1, r2, r3}
8000d3c: c40f stmia r4!, {r0, r1, r2, r3}
8000d3e: e895 0007 ldmia.w r5, {r0, r1, r2}
8000d42: e884 0007 stmia.w r4, {r0, r1, r2}
Block_EnemieHandle = osThreadCreate(osThread(Block_Enemie), NULL);
8000d46: f107 0320 add.w r3, r7, #32
8000d4a: 2100 movs r1, #0
8000d4c: 4618 mov r0, r3
8000d4e: f00c fca6 bl 800d69e <osThreadCreate>
8000d52: 4602 mov r2, r0
8000d54: 4b49 ldr r3, [pc, #292] ; (8000e7c <main+0x320>)
8000d56: 601a str r2, [r3, #0]
/* definition and creation of Projectile */
osThreadDef(Projectile, f_projectile, osPriorityNormal, 0, 128);
8000d58: 1d3b adds r3, r7, #4
8000d5a: 4a49 ldr r2, [pc, #292] ; (8000e80 <main+0x324>)
8000d5c: 461c mov r4, r3
8000d5e: 4615 mov r5, r2
8000d60: cd0f ldmia r5!, {r0, r1, r2, r3}
8000d62: c40f stmia r4!, {r0, r1, r2, r3}
8000d64: e895 0007 ldmia.w r5, {r0, r1, r2}
8000d68: e884 0007 stmia.w r4, {r0, r1, r2}
ProjectileHandle = osThreadCreate(osThread(Projectile), NULL);
8000d6c: 1d3b adds r3, r7, #4
8000d6e: 2100 movs r1, #0
8000d70: 4618 mov r0, r3
8000d72: f00c fc94 bl 800d69e <osThreadCreate>
8000d76: 4602 mov r2, r0
8000d78: 4b42 ldr r3, [pc, #264] ; (8000e84 <main+0x328>)
8000d7a: 601a str r2, [r3, #0]
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* Start scheduler */
osKernelStart();
8000d7c: f00c fc78 bl 800d670 <osKernelStart>
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* Code de base */
HAL_GPIO_WritePin(LED13_GPIO_Port, LED13_Pin,
8000d80: f44f 7180 mov.w r1, #256 ; 0x100
8000d84: 4840 ldr r0, [pc, #256] ; (8000e88 <main+0x32c>)
8000d86: f007 f9ef bl 8008168 <HAL_GPIO_ReadPin>
8000d8a: 4603 mov r3, r0
8000d8c: 461a mov r2, r3
8000d8e: f44f 4180 mov.w r1, #16384 ; 0x4000
8000d92: 483e ldr r0, [pc, #248] ; (8000e8c <main+0x330>)
8000d94: f007 fa00 bl 8008198 <HAL_GPIO_WritePin>
HAL_GPIO_ReadPin(BP1_GPIO_Port, BP1_Pin));
HAL_GPIO_WritePin(LED14_GPIO_Port, LED14_Pin,
8000d98: f44f 4100 mov.w r1, #32768 ; 0x8000
8000d9c: 483a ldr r0, [pc, #232] ; (8000e88 <main+0x32c>)
8000d9e: f007 f9e3 bl 8008168 <HAL_GPIO_ReadPin>
8000da2: 4603 mov r3, r0
8000da4: 461a mov r2, r3
8000da6: 2120 movs r1, #32
8000da8: 4839 ldr r0, [pc, #228] ; (8000e90 <main+0x334>)
8000daa: f007 f9f5 bl 8008198 <HAL_GPIO_WritePin>
HAL_GPIO_ReadPin(BP2_GPIO_Port, BP2_Pin));
sprintf(text, "BP1 : %d", HAL_GPIO_ReadPin(BP1_GPIO_Port, BP1_Pin));
8000dae: f44f 7180 mov.w r1, #256 ; 0x100
8000db2: 4835 ldr r0, [pc, #212] ; (8000e88 <main+0x32c>)
8000db4: f007 f9d8 bl 8008168 <HAL_GPIO_ReadPin>
8000db8: 4603 mov r3, r0
8000dba: 461a mov r2, r3
8000dbc: f107 03d4 add.w r3, r7, #212 ; 0xd4
8000dc0: 4934 ldr r1, [pc, #208] ; (8000e94 <main+0x338>)
8000dc2: 4618 mov r0, r3
8000dc4: f01b ffe4 bl 801cd90 <siprintf>
BSP_LCD_DisplayStringAtLine(5, (uint8_t *)text);
8000dc8: f107 03d4 add.w r3, r7, #212 ; 0xd4
8000dcc: 4619 mov r1, r3
8000dce: 2005 movs r0, #5
8000dd0: f002 f9b4 bl 800313c <BSP_LCD_DisplayStringAtLine>
;
sConfig.Channel = ADC_CHANNEL_7;
8000dd4: 2307 movs r3, #7
8000dd6: f8c7 30c4 str.w r3, [r7, #196] ; 0xc4
HAL_ADC_ConfigChannel(&hadc3, &sConfig);
8000dda: f107 03c4 add.w r3, r7, #196 ; 0xc4
8000dde: 4619 mov r1, r3
8000de0: 482d ldr r0, [pc, #180] ; (8000e98 <main+0x33c>)
8000de2: f004 fc61 bl 80056a8 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
8000de6: 482c ldr r0, [pc, #176] ; (8000e98 <main+0x33c>)
8000de8: f004 fb0c bl 8005404 <HAL_ADC_Start>
sConfig.Channel = ADC_CHANNEL_6;
8000dec: 2306 movs r3, #6
8000dee: f8c7 30c4 str.w r3, [r7, #196] ; 0xc4
HAL_ADC_ConfigChannel(&hadc3, &sConfig);
8000df2: f107 03c4 add.w r3, r7, #196 ; 0xc4
8000df6: 4619 mov r1, r3
8000df8: 4827 ldr r0, [pc, #156] ; (8000e98 <main+0x33c>)
8000dfa: f004 fc55 bl 80056a8 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
8000dfe: 4826 ldr r0, [pc, #152] ; (8000e98 <main+0x33c>)
8000e00: f004 fb00 bl 8005404 <HAL_ADC_Start>
sConfig.Channel = ADC_CHANNEL_8;
8000e04: 2308 movs r3, #8
8000e06: f8c7 30c4 str.w r3, [r7, #196] ; 0xc4
HAL_ADC_ConfigChannel(&hadc3, &sConfig);
8000e0a: f107 03c4 add.w r3, r7, #196 ; 0xc4
8000e0e: 4619 mov r1, r3
8000e10: 4821 ldr r0, [pc, #132] ; (8000e98 <main+0x33c>)
8000e12: f004 fc49 bl 80056a8 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
8000e16: 4820 ldr r0, [pc, #128] ; (8000e98 <main+0x33c>)
8000e18: f004 faf4 bl 8005404 <HAL_ADC_Start>
HAL_ADC_Start(&hadc1);
8000e1c: 481f ldr r0, [pc, #124] ; (8000e9c <main+0x340>)
8000e1e: f004 faf1 bl 8005404 <HAL_ADC_Start>
BSP_TS_GetState(&TS_State);
8000e22: 481f ldr r0, [pc, #124] ; (8000ea0 <main+0x344>)
8000e24: f003 f954 bl 80040d0 <BSP_TS_GetState>
if (TS_State.touchDetected)
8000e28: 4b1d ldr r3, [pc, #116] ; (8000ea0 <main+0x344>)
8000e2a: 781b ldrb r3, [r3, #0]
8000e2c: 2b00 cmp r3, #0
8000e2e: d0a7 beq.n 8000d80 <main+0x224>
{
BSP_LCD_FillCircle(TS_State.touchX[0], TS_State.touchY[0], 4);
8000e30: 4b1b ldr r3, [pc, #108] ; (8000ea0 <main+0x344>)
8000e32: 8858 ldrh r0, [r3, #2]
8000e34: 4b1a ldr r3, [pc, #104] ; (8000ea0 <main+0x344>)
8000e36: 899b ldrh r3, [r3, #12]
8000e38: 2204 movs r2, #4
8000e3a: 4619 mov r1, r3
8000e3c: f002 fc56 bl 80036ec <BSP_LCD_FillCircle>
HAL_GPIO_WritePin(LED13_GPIO_Port, LED13_Pin,
8000e40: e79e b.n 8000d80 <main+0x224>
8000e42: bf00 nop
8000e44: 20000058 .word 0x20000058
8000e48: ff0000ff .word 0xff0000ff
8000e4c: 0801de9c .word 0x0801de9c
8000e50: 20008e34 .word 0x20008e34
8000e54: 0801deac .word 0x0801deac
8000e58: 20008ca0 .word 0x20008ca0
8000e5c: 200089ec .word 0x200089ec
8000e60: 20008ca4 .word 0x20008ca4
8000e64: 20008c1c .word 0x20008c1c
8000e68: 0801dec8 .word 0x0801dec8
8000e6c: 20008db0 .word 0x20008db0
8000e70: 0801def0 .word 0x0801def0
8000e74: 20008a60 .word 0x20008a60
8000e78: 0801df1c .word 0x0801df1c
8000e7c: 20008e6c .word 0x20008e6c
8000e80: 0801df44 .word 0x0801df44
8000e84: 20008cbc .word 0x20008cbc
8000e88: 40020000 .word 0x40020000
8000e8c: 40021c00 .word 0x40021c00
8000e90: 40021000 .word 0x40021000
8000e94: 0801de90 .word 0x0801de90
8000e98: 20008bd4 .word 0x20008bd4
8000e9c: 20008b8c .word 0x20008b8c
8000ea0: 20000364 .word 0x20000364
08000ea4 <SystemClock_Config>:
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
8000ea4: b580 push {r7, lr}
8000ea6: b0b4 sub sp, #208 ; 0xd0
8000ea8: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
8000eaa: f107 03a0 add.w r3, r7, #160 ; 0xa0
8000eae: 2230 movs r2, #48 ; 0x30
8000eb0: 2100 movs r1, #0
8000eb2: 4618 mov r0, r3
8000eb4: f01b ff17 bl 801cce6 <memset>
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
8000eb8: f107 038c add.w r3, r7, #140 ; 0x8c
8000ebc: 2200 movs r2, #0
8000ebe: 601a str r2, [r3, #0]
8000ec0: 605a str r2, [r3, #4]
8000ec2: 609a str r2, [r3, #8]
8000ec4: 60da str r2, [r3, #12]
8000ec6: 611a str r2, [r3, #16]
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
8000ec8: f107 0308 add.w r3, r7, #8
8000ecc: 2284 movs r2, #132 ; 0x84
8000ece: 2100 movs r1, #0
8000ed0: 4618 mov r0, r3
8000ed2: f01b ff08 bl 801cce6 <memset>
/** Configure LSE Drive Capability
*/
HAL_PWR_EnableBkUpAccess();
8000ed6: f008 faa1 bl 800941c <HAL_PWR_EnableBkUpAccess>
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
8000eda: 4b49 ldr r3, [pc, #292] ; (8001000 <SystemClock_Config+0x15c>)
8000edc: 6c1b ldr r3, [r3, #64] ; 0x40
8000ede: 4a48 ldr r2, [pc, #288] ; (8001000 <SystemClock_Config+0x15c>)
8000ee0: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8000ee4: 6413 str r3, [r2, #64] ; 0x40
8000ee6: 4b46 ldr r3, [pc, #280] ; (8001000 <SystemClock_Config+0x15c>)
8000ee8: 6c1b ldr r3, [r3, #64] ; 0x40
8000eea: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8000eee: 607b str r3, [r7, #4]
8000ef0: 687b ldr r3, [r7, #4]
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
8000ef2: 4b44 ldr r3, [pc, #272] ; (8001004 <SystemClock_Config+0x160>)
8000ef4: 681b ldr r3, [r3, #0]
8000ef6: 4a43 ldr r2, [pc, #268] ; (8001004 <SystemClock_Config+0x160>)
8000ef8: f443 4340 orr.w r3, r3, #49152 ; 0xc000
8000efc: 6013 str r3, [r2, #0]
8000efe: 4b41 ldr r3, [pc, #260] ; (8001004 <SystemClock_Config+0x160>)
8000f00: 681b ldr r3, [r3, #0]
8000f02: f403 4340 and.w r3, r3, #49152 ; 0xc000
8000f06: 603b str r3, [r7, #0]
8000f08: 683b ldr r3, [r7, #0]
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE;
8000f0a: 2309 movs r3, #9
8000f0c: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
8000f10: f44f 3380 mov.w r3, #65536 ; 0x10000
8000f14: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
8000f18: 2301 movs r3, #1
8000f1a: f8c7 30b4 str.w r3, [r7, #180] ; 0xb4
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
8000f1e: 2302 movs r3, #2
8000f20: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
8000f24: f44f 0380 mov.w r3, #4194304 ; 0x400000
8000f28: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
RCC_OscInitStruct.PLL.PLLM = 25;
8000f2c: 2319 movs r3, #25
8000f2e: f8c7 30c0 str.w r3, [r7, #192] ; 0xc0
RCC_OscInitStruct.PLL.PLLN = 400;
8000f32: f44f 73c8 mov.w r3, #400 ; 0x190
8000f36: f8c7 30c4 str.w r3, [r7, #196] ; 0xc4
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
8000f3a: 2302 movs r3, #2
8000f3c: f8c7 30c8 str.w r3, [r7, #200] ; 0xc8
RCC_OscInitStruct.PLL.PLLQ = 9;
8000f40: 2309 movs r3, #9
8000f42: f8c7 30cc str.w r3, [r7, #204] ; 0xcc
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
8000f46: f107 03a0 add.w r3, r7, #160 ; 0xa0
8000f4a: 4618 mov r0, r3
8000f4c: f008 fac6 bl 80094dc <HAL_RCC_OscConfig>
8000f50: 4603 mov r3, r0
8000f52: 2b00 cmp r3, #0
8000f54: d001 beq.n 8000f5a <SystemClock_Config+0xb6>
{
Error_Handler();
8000f56: f001 fcaf bl 80028b8 <Error_Handler>
}
/** Activate the Over-Drive mode
*/
if (HAL_PWREx_EnableOverDrive() != HAL_OK)
8000f5a: f008 fa6f bl 800943c <HAL_PWREx_EnableOverDrive>
8000f5e: 4603 mov r3, r0
8000f60: 2b00 cmp r3, #0
8000f62: d001 beq.n 8000f68 <SystemClock_Config+0xc4>
{
Error_Handler();
8000f64: f001 fca8 bl 80028b8 <Error_Handler>
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
8000f68: 230f movs r3, #15
8000f6a: f8c7 308c str.w r3, [r7, #140] ; 0x8c
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
8000f6e: 2302 movs r3, #2
8000f70: f8c7 3090 str.w r3, [r7, #144] ; 0x90
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
8000f74: 2300 movs r3, #0
8000f76: f8c7 3094 str.w r3, [r7, #148] ; 0x94
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
8000f7a: f44f 53a0 mov.w r3, #5120 ; 0x1400
8000f7e: f8c7 3098 str.w r3, [r7, #152] ; 0x98
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
8000f82: f44f 5380 mov.w r3, #4096 ; 0x1000
8000f86: f8c7 309c str.w r3, [r7, #156] ; 0x9c
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_6) != HAL_OK)
8000f8a: f107 038c add.w r3, r7, #140 ; 0x8c
8000f8e: 2106 movs r1, #6
8000f90: 4618 mov r0, r3
8000f92: f008 fd47 bl 8009a24 <HAL_RCC_ClockConfig>
8000f96: 4603 mov r3, r0
8000f98: 2b00 cmp r3, #0
8000f9a: d001 beq.n 8000fa0 <SystemClock_Config+0xfc>
{
Error_Handler();
8000f9c: f001 fc8c bl 80028b8 <Error_Handler>
}
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC|RCC_PERIPHCLK_RTC
8000fa0: 4b19 ldr r3, [pc, #100] ; (8001008 <SystemClock_Config+0x164>)
8000fa2: 60bb str r3, [r7, #8]
|RCC_PERIPHCLK_USART1|RCC_PERIPHCLK_USART6
|RCC_PERIPHCLK_UART7|RCC_PERIPHCLK_I2C1
|RCC_PERIPHCLK_I2C3|RCC_PERIPHCLK_CLK48;
PeriphClkInitStruct.PLLSAI.PLLSAIN = 384;
8000fa4: f44f 73c0 mov.w r3, #384 ; 0x180
8000fa8: 61fb str r3, [r7, #28]
PeriphClkInitStruct.PLLSAI.PLLSAIR = 5;
8000faa: 2305 movs r3, #5
8000fac: 627b str r3, [r7, #36] ; 0x24
PeriphClkInitStruct.PLLSAI.PLLSAIQ = 2;
8000fae: 2302 movs r3, #2
8000fb0: 623b str r3, [r7, #32]
PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV8;
8000fb2: 2303 movs r3, #3
8000fb4: 62bb str r3, [r7, #40] ; 0x28
PeriphClkInitStruct.PLLSAIDivQ = 1;
8000fb6: 2301 movs r3, #1
8000fb8: 633b str r3, [r7, #48] ; 0x30
PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_8;
8000fba: f44f 3300 mov.w r3, #131072 ; 0x20000
8000fbe: 637b str r3, [r7, #52] ; 0x34
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
8000fc0: f44f 7300 mov.w r3, #512 ; 0x200
8000fc4: 63bb str r3, [r7, #56] ; 0x38
PeriphClkInitStruct.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2;
8000fc6: 2300 movs r3, #0
8000fc8: 64fb str r3, [r7, #76] ; 0x4c
PeriphClkInitStruct.Usart6ClockSelection = RCC_USART6CLKSOURCE_PCLK2;
8000fca: 2300 movs r3, #0
8000fcc: 663b str r3, [r7, #96] ; 0x60
PeriphClkInitStruct.Uart7ClockSelection = RCC_UART7CLKSOURCE_PCLK1;
8000fce: 2300 movs r3, #0
8000fd0: 667b str r3, [r7, #100] ; 0x64
PeriphClkInitStruct.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1;
8000fd2: 2300 movs r3, #0
8000fd4: 66fb str r3, [r7, #108] ; 0x6c
PeriphClkInitStruct.I2c3ClockSelection = RCC_I2C3CLKSOURCE_PCLK1;
8000fd6: 2300 movs r3, #0
8000fd8: 677b str r3, [r7, #116] ; 0x74
PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48SOURCE_PLLSAIP;
8000fda: f04f 6300 mov.w r3, #134217728 ; 0x8000000
8000fde: f8c7 3084 str.w r3, [r7, #132] ; 0x84
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
8000fe2: f107 0308 add.w r3, r7, #8
8000fe6: 4618 mov r0, r3
8000fe8: f008 ff20 bl 8009e2c <HAL_RCCEx_PeriphCLKConfig>
8000fec: 4603 mov r3, r0
8000fee: 2b00 cmp r3, #0
8000ff0: d001 beq.n 8000ff6 <SystemClock_Config+0x152>
{
Error_Handler();
8000ff2: f001 fc61 bl 80028b8 <Error_Handler>
}
}
8000ff6: bf00 nop
8000ff8: 37d0 adds r7, #208 ; 0xd0
8000ffa: 46bd mov sp, r7
8000ffc: bd80 pop {r7, pc}
8000ffe: bf00 nop
8001000: 40023800 .word 0x40023800
8001004: 40007000 .word 0x40007000
8001008: 00215868 .word 0x00215868
0800100c <MX_ADC1_Init>:
* @brief ADC1 Initialization Function
* @param None
* @retval None
*/
static void MX_ADC1_Init(void)
{
800100c: b580 push {r7, lr}
800100e: b084 sub sp, #16
8001010: af00 add r7, sp, #0
/* USER CODE BEGIN ADC1_Init 0 */
/* USER CODE END ADC1_Init 0 */
ADC_ChannelConfTypeDef sConfig = {0};
8001012: 463b mov r3, r7
8001014: 2200 movs r2, #0
8001016: 601a str r2, [r3, #0]
8001018: 605a str r2, [r3, #4]
800101a: 609a str r2, [r3, #8]
800101c: 60da str r2, [r3, #12]
/* USER CODE BEGIN ADC1_Init 1 */
/* USER CODE END ADC1_Init 1 */
/** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
*/
hadc1.Instance = ADC1;
800101e: 4b21 ldr r3, [pc, #132] ; (80010a4 <MX_ADC1_Init+0x98>)
8001020: 4a21 ldr r2, [pc, #132] ; (80010a8 <MX_ADC1_Init+0x9c>)
8001022: 601a str r2, [r3, #0]
hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
8001024: 4b1f ldr r3, [pc, #124] ; (80010a4 <MX_ADC1_Init+0x98>)
8001026: f44f 3280 mov.w r2, #65536 ; 0x10000
800102a: 605a str r2, [r3, #4]
hadc1.Init.Resolution = ADC_RESOLUTION_12B;
800102c: 4b1d ldr r3, [pc, #116] ; (80010a4 <MX_ADC1_Init+0x98>)
800102e: 2200 movs r2, #0
8001030: 609a str r2, [r3, #8]
hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE;
8001032: 4b1c ldr r3, [pc, #112] ; (80010a4 <MX_ADC1_Init+0x98>)
8001034: 2200 movs r2, #0
8001036: 611a str r2, [r3, #16]
hadc1.Init.ContinuousConvMode = DISABLE;
8001038: 4b1a ldr r3, [pc, #104] ; (80010a4 <MX_ADC1_Init+0x98>)
800103a: 2200 movs r2, #0
800103c: 619a str r2, [r3, #24]
hadc1.Init.DiscontinuousConvMode = DISABLE;
800103e: 4b19 ldr r3, [pc, #100] ; (80010a4 <MX_ADC1_Init+0x98>)
8001040: 2200 movs r2, #0
8001042: f883 2020 strb.w r2, [r3, #32]
hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
8001046: 4b17 ldr r3, [pc, #92] ; (80010a4 <MX_ADC1_Init+0x98>)
8001048: 2200 movs r2, #0
800104a: 62da str r2, [r3, #44] ; 0x2c
hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
800104c: 4b15 ldr r3, [pc, #84] ; (80010a4 <MX_ADC1_Init+0x98>)
800104e: 4a17 ldr r2, [pc, #92] ; (80010ac <MX_ADC1_Init+0xa0>)
8001050: 629a str r2, [r3, #40] ; 0x28
hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
8001052: 4b14 ldr r3, [pc, #80] ; (80010a4 <MX_ADC1_Init+0x98>)
8001054: 2200 movs r2, #0
8001056: 60da str r2, [r3, #12]
hadc1.Init.NbrOfConversion = 1;
8001058: 4b12 ldr r3, [pc, #72] ; (80010a4 <MX_ADC1_Init+0x98>)
800105a: 2201 movs r2, #1
800105c: 61da str r2, [r3, #28]
hadc1.Init.DMAContinuousRequests = DISABLE;
800105e: 4b11 ldr r3, [pc, #68] ; (80010a4 <MX_ADC1_Init+0x98>)
8001060: 2200 movs r2, #0
8001062: f883 2030 strb.w r2, [r3, #48] ; 0x30
hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
8001066: 4b0f ldr r3, [pc, #60] ; (80010a4 <MX_ADC1_Init+0x98>)
8001068: 2201 movs r2, #1
800106a: 615a str r2, [r3, #20]
if (HAL_ADC_Init(&hadc1) != HAL_OK)
800106c: 480d ldr r0, [pc, #52] ; (80010a4 <MX_ADC1_Init+0x98>)
800106e: f004 f985 bl 800537c <HAL_ADC_Init>
8001072: 4603 mov r3, r0
8001074: 2b00 cmp r3, #0
8001076: d001 beq.n 800107c <MX_ADC1_Init+0x70>
{
Error_Handler();
8001078: f001 fc1e bl 80028b8 <Error_Handler>
}
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
*/
sConfig.Channel = ADC_CHANNEL_0;
800107c: 2300 movs r3, #0
800107e: 603b str r3, [r7, #0]
sConfig.Rank = ADC_REGULAR_RANK_1;
8001080: 2301 movs r3, #1
8001082: 607b str r3, [r7, #4]
sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
8001084: 2300 movs r3, #0
8001086: 60bb str r3, [r7, #8]
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
8001088: 463b mov r3, r7
800108a: 4619 mov r1, r3
800108c: 4805 ldr r0, [pc, #20] ; (80010a4 <MX_ADC1_Init+0x98>)
800108e: f004 fb0b bl 80056a8 <HAL_ADC_ConfigChannel>
8001092: 4603 mov r3, r0
8001094: 2b00 cmp r3, #0
8001096: d001 beq.n 800109c <MX_ADC1_Init+0x90>
{
Error_Handler();
8001098: f001 fc0e bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN ADC1_Init 2 */
/* USER CODE END ADC1_Init 2 */
}
800109c: bf00 nop
800109e: 3710 adds r7, #16
80010a0: 46bd mov sp, r7
80010a2: bd80 pop {r7, pc}
80010a4: 20008b8c .word 0x20008b8c
80010a8: 40012000 .word 0x40012000
80010ac: 0f000001 .word 0x0f000001
080010b0 <MX_ADC3_Init>:
* @brief ADC3 Initialization Function
* @param None
* @retval None
*/
static void MX_ADC3_Init(void)
{
80010b0: b580 push {r7, lr}
80010b2: b084 sub sp, #16
80010b4: af00 add r7, sp, #0
/* USER CODE BEGIN ADC3_Init 0 */
/* USER CODE END ADC3_Init 0 */
ADC_ChannelConfTypeDef sConfig = {0};
80010b6: 463b mov r3, r7
80010b8: 2200 movs r2, #0
80010ba: 601a str r2, [r3, #0]
80010bc: 605a str r2, [r3, #4]
80010be: 609a str r2, [r3, #8]
80010c0: 60da str r2, [r3, #12]
/* USER CODE BEGIN ADC3_Init 1 */
/* USER CODE END ADC3_Init 1 */
/** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
*/
hadc3.Instance = ADC3;
80010c2: 4b21 ldr r3, [pc, #132] ; (8001148 <MX_ADC3_Init+0x98>)
80010c4: 4a21 ldr r2, [pc, #132] ; (800114c <MX_ADC3_Init+0x9c>)
80010c6: 601a str r2, [r3, #0]
hadc3.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
80010c8: 4b1f ldr r3, [pc, #124] ; (8001148 <MX_ADC3_Init+0x98>)
80010ca: f44f 3280 mov.w r2, #65536 ; 0x10000
80010ce: 605a str r2, [r3, #4]
hadc3.Init.Resolution = ADC_RESOLUTION_12B;
80010d0: 4b1d ldr r3, [pc, #116] ; (8001148 <MX_ADC3_Init+0x98>)
80010d2: 2200 movs r2, #0
80010d4: 609a str r2, [r3, #8]
hadc3.Init.ScanConvMode = ADC_SCAN_DISABLE;
80010d6: 4b1c ldr r3, [pc, #112] ; (8001148 <MX_ADC3_Init+0x98>)
80010d8: 2200 movs r2, #0
80010da: 611a str r2, [r3, #16]
hadc3.Init.ContinuousConvMode = DISABLE;
80010dc: 4b1a ldr r3, [pc, #104] ; (8001148 <MX_ADC3_Init+0x98>)
80010de: 2200 movs r2, #0
80010e0: 619a str r2, [r3, #24]
hadc3.Init.DiscontinuousConvMode = DISABLE;
80010e2: 4b19 ldr r3, [pc, #100] ; (8001148 <MX_ADC3_Init+0x98>)
80010e4: 2200 movs r2, #0
80010e6: f883 2020 strb.w r2, [r3, #32]
hadc3.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
80010ea: 4b17 ldr r3, [pc, #92] ; (8001148 <MX_ADC3_Init+0x98>)
80010ec: 2200 movs r2, #0
80010ee: 62da str r2, [r3, #44] ; 0x2c
hadc3.Init.ExternalTrigConv = ADC_SOFTWARE_START;
80010f0: 4b15 ldr r3, [pc, #84] ; (8001148 <MX_ADC3_Init+0x98>)
80010f2: 4a17 ldr r2, [pc, #92] ; (8001150 <MX_ADC3_Init+0xa0>)
80010f4: 629a str r2, [r3, #40] ; 0x28
hadc3.Init.DataAlign = ADC_DATAALIGN_RIGHT;
80010f6: 4b14 ldr r3, [pc, #80] ; (8001148 <MX_ADC3_Init+0x98>)
80010f8: 2200 movs r2, #0
80010fa: 60da str r2, [r3, #12]
hadc3.Init.NbrOfConversion = 1;
80010fc: 4b12 ldr r3, [pc, #72] ; (8001148 <MX_ADC3_Init+0x98>)
80010fe: 2201 movs r2, #1
8001100: 61da str r2, [r3, #28]
hadc3.Init.DMAContinuousRequests = DISABLE;
8001102: 4b11 ldr r3, [pc, #68] ; (8001148 <MX_ADC3_Init+0x98>)
8001104: 2200 movs r2, #0
8001106: f883 2030 strb.w r2, [r3, #48] ; 0x30
hadc3.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
800110a: 4b0f ldr r3, [pc, #60] ; (8001148 <MX_ADC3_Init+0x98>)
800110c: 2201 movs r2, #1
800110e: 615a str r2, [r3, #20]
if (HAL_ADC_Init(&hadc3) != HAL_OK)
8001110: 480d ldr r0, [pc, #52] ; (8001148 <MX_ADC3_Init+0x98>)
8001112: f004 f933 bl 800537c <HAL_ADC_Init>
8001116: 4603 mov r3, r0
8001118: 2b00 cmp r3, #0
800111a: d001 beq.n 8001120 <MX_ADC3_Init+0x70>
{
Error_Handler();
800111c: f001 fbcc bl 80028b8 <Error_Handler>
}
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
*/
sConfig.Channel = ADC_CHANNEL_8;
8001120: 2308 movs r3, #8
8001122: 603b str r3, [r7, #0]
sConfig.Rank = ADC_REGULAR_RANK_1;
8001124: 2301 movs r3, #1
8001126: 607b str r3, [r7, #4]
sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
8001128: 2300 movs r3, #0
800112a: 60bb str r3, [r7, #8]
if (HAL_ADC_ConfigChannel(&hadc3, &sConfig) != HAL_OK)
800112c: 463b mov r3, r7
800112e: 4619 mov r1, r3
8001130: 4805 ldr r0, [pc, #20] ; (8001148 <MX_ADC3_Init+0x98>)
8001132: f004 fab9 bl 80056a8 <HAL_ADC_ConfigChannel>
8001136: 4603 mov r3, r0
8001138: 2b00 cmp r3, #0
800113a: d001 beq.n 8001140 <MX_ADC3_Init+0x90>
{
Error_Handler();
800113c: f001 fbbc bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN ADC3_Init 2 */
/* USER CODE END ADC3_Init 2 */
}
8001140: bf00 nop
8001142: 3710 adds r7, #16
8001144: 46bd mov sp, r7
8001146: bd80 pop {r7, pc}
8001148: 20008bd4 .word 0x20008bd4
800114c: 40012200 .word 0x40012200
8001150: 0f000001 .word 0x0f000001
08001154 <MX_CRC_Init>:
* @brief CRC Initialization Function
* @param None
* @retval None
*/
static void MX_CRC_Init(void)
{
8001154: b580 push {r7, lr}
8001156: af00 add r7, sp, #0
/* USER CODE END CRC_Init 0 */
/* USER CODE BEGIN CRC_Init 1 */
/* USER CODE END CRC_Init 1 */
hcrc.Instance = CRC;
8001158: 4b0d ldr r3, [pc, #52] ; (8001190 <MX_CRC_Init+0x3c>)
800115a: 4a0e ldr r2, [pc, #56] ; (8001194 <MX_CRC_Init+0x40>)
800115c: 601a str r2, [r3, #0]
hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_ENABLE;
800115e: 4b0c ldr r3, [pc, #48] ; (8001190 <MX_CRC_Init+0x3c>)
8001160: 2200 movs r2, #0
8001162: 711a strb r2, [r3, #4]
hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE;
8001164: 4b0a ldr r3, [pc, #40] ; (8001190 <MX_CRC_Init+0x3c>)
8001166: 2200 movs r2, #0
8001168: 715a strb r2, [r3, #5]
hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE;
800116a: 4b09 ldr r3, [pc, #36] ; (8001190 <MX_CRC_Init+0x3c>)
800116c: 2200 movs r2, #0
800116e: 615a str r2, [r3, #20]
hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE;
8001170: 4b07 ldr r3, [pc, #28] ; (8001190 <MX_CRC_Init+0x3c>)
8001172: 2200 movs r2, #0
8001174: 619a str r2, [r3, #24]
hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES;
8001176: 4b06 ldr r3, [pc, #24] ; (8001190 <MX_CRC_Init+0x3c>)
8001178: 2201 movs r2, #1
800117a: 621a str r2, [r3, #32]
if (HAL_CRC_Init(&hcrc) != HAL_OK)
800117c: 4804 ldr r0, [pc, #16] ; (8001190 <MX_CRC_Init+0x3c>)
800117e: f004 fdb9 bl 8005cf4 <HAL_CRC_Init>
8001182: 4603 mov r3, r0
8001184: 2b00 cmp r3, #0
8001186: d001 beq.n 800118c <MX_CRC_Init+0x38>
{
Error_Handler();
8001188: f001 fb96 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN CRC_Init 2 */
/* USER CODE END CRC_Init 2 */
}
800118c: bf00 nop
800118e: bd80 pop {r7, pc}
8001190: 20008a3c .word 0x20008a3c
8001194: 40023000 .word 0x40023000
08001198 <MX_DAC_Init>:
* @brief DAC Initialization Function
* @param None
* @retval None
*/
static void MX_DAC_Init(void)
{
8001198: b580 push {r7, lr}
800119a: b082 sub sp, #8
800119c: af00 add r7, sp, #0
/* USER CODE BEGIN DAC_Init 0 */
/* USER CODE END DAC_Init 0 */
DAC_ChannelConfTypeDef sConfig = {0};
800119e: 463b mov r3, r7
80011a0: 2200 movs r2, #0
80011a2: 601a str r2, [r3, #0]
80011a4: 605a str r2, [r3, #4]
/* USER CODE BEGIN DAC_Init 1 */
/* USER CODE END DAC_Init 1 */
/** DAC Initialization
*/
hdac.Instance = DAC;
80011a6: 4b0f ldr r3, [pc, #60] ; (80011e4 <MX_DAC_Init+0x4c>)
80011a8: 4a0f ldr r2, [pc, #60] ; (80011e8 <MX_DAC_Init+0x50>)
80011aa: 601a str r2, [r3, #0]
if (HAL_DAC_Init(&hdac) != HAL_OK)
80011ac: 480d ldr r0, [pc, #52] ; (80011e4 <MX_DAC_Init+0x4c>)
80011ae: f004 fe8b bl 8005ec8 <HAL_DAC_Init>
80011b2: 4603 mov r3, r0
80011b4: 2b00 cmp r3, #0
80011b6: d001 beq.n 80011bc <MX_DAC_Init+0x24>
{
Error_Handler();
80011b8: f001 fb7e bl 80028b8 <Error_Handler>
}
/** DAC channel OUT1 config
*/
sConfig.DAC_Trigger = DAC_TRIGGER_NONE;
80011bc: 2300 movs r3, #0
80011be: 603b str r3, [r7, #0]
sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_ENABLE;
80011c0: 2300 movs r3, #0
80011c2: 607b str r3, [r7, #4]
if (HAL_DAC_ConfigChannel(&hdac, &sConfig, DAC_CHANNEL_1) != HAL_OK)
80011c4: 463b mov r3, r7
80011c6: 2200 movs r2, #0
80011c8: 4619 mov r1, r3
80011ca: 4806 ldr r0, [pc, #24] ; (80011e4 <MX_DAC_Init+0x4c>)
80011cc: f004 fef2 bl 8005fb4 <HAL_DAC_ConfigChannel>
80011d0: 4603 mov r3, r0
80011d2: 2b00 cmp r3, #0
80011d4: d001 beq.n 80011da <MX_DAC_Init+0x42>
{
Error_Handler();
80011d6: f001 fb6f bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN DAC_Init 2 */
/* USER CODE END DAC_Init 2 */
}
80011da: bf00 nop
80011dc: 3708 adds r7, #8
80011de: 46bd mov sp, r7
80011e0: bd80 pop {r7, pc}
80011e2: bf00 nop
80011e4: 20008ca8 .word 0x20008ca8
80011e8: 40007400 .word 0x40007400
080011ec <MX_DMA2D_Init>:
* @brief DMA2D Initialization Function
* @param None
* @retval None
*/
static void MX_DMA2D_Init(void)
{
80011ec: b580 push {r7, lr}
80011ee: af00 add r7, sp, #0
/* USER CODE END DMA2D_Init 0 */
/* USER CODE BEGIN DMA2D_Init 1 */
/* USER CODE END DMA2D_Init 1 */
hdma2d.Instance = DMA2D;
80011f0: 4b15 ldr r3, [pc, #84] ; (8001248 <MX_DMA2D_Init+0x5c>)
80011f2: 4a16 ldr r2, [pc, #88] ; (800124c <MX_DMA2D_Init+0x60>)
80011f4: 601a str r2, [r3, #0]
hdma2d.Init.Mode = DMA2D_M2M;
80011f6: 4b14 ldr r3, [pc, #80] ; (8001248 <MX_DMA2D_Init+0x5c>)
80011f8: 2200 movs r2, #0
80011fa: 605a str r2, [r3, #4]
hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;
80011fc: 4b12 ldr r3, [pc, #72] ; (8001248 <MX_DMA2D_Init+0x5c>)
80011fe: 2200 movs r2, #0
8001200: 609a str r2, [r3, #8]
hdma2d.Init.OutputOffset = 0;
8001202: 4b11 ldr r3, [pc, #68] ; (8001248 <MX_DMA2D_Init+0x5c>)
8001204: 2200 movs r2, #0
8001206: 60da str r2, [r3, #12]
hdma2d.LayerCfg[1].InputOffset = 0;
8001208: 4b0f ldr r3, [pc, #60] ; (8001248 <MX_DMA2D_Init+0x5c>)
800120a: 2200 movs r2, #0
800120c: 629a str r2, [r3, #40] ; 0x28
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888;
800120e: 4b0e ldr r3, [pc, #56] ; (8001248 <MX_DMA2D_Init+0x5c>)
8001210: 2200 movs r2, #0
8001212: 62da str r2, [r3, #44] ; 0x2c
hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
8001214: 4b0c ldr r3, [pc, #48] ; (8001248 <MX_DMA2D_Init+0x5c>)
8001216: 2200 movs r2, #0
8001218: 631a str r2, [r3, #48] ; 0x30
hdma2d.LayerCfg[1].InputAlpha = 0;
800121a: 4b0b ldr r3, [pc, #44] ; (8001248 <MX_DMA2D_Init+0x5c>)
800121c: 2200 movs r2, #0
800121e: 635a str r2, [r3, #52] ; 0x34
if (HAL_DMA2D_Init(&hdma2d) != HAL_OK)
8001220: 4809 ldr r0, [pc, #36] ; (8001248 <MX_DMA2D_Init+0x5c>)
8001222: f005 f8db bl 80063dc <HAL_DMA2D_Init>
8001226: 4603 mov r3, r0
8001228: 2b00 cmp r3, #0
800122a: d001 beq.n 8001230 <MX_DMA2D_Init+0x44>
{
Error_Handler();
800122c: f001 fb44 bl 80028b8 <Error_Handler>
}
if (HAL_DMA2D_ConfigLayer(&hdma2d, 1) != HAL_OK)
8001230: 2101 movs r1, #1
8001232: 4805 ldr r0, [pc, #20] ; (8001248 <MX_DMA2D_Init+0x5c>)
8001234: f005 fa30 bl 8006698 <HAL_DMA2D_ConfigLayer>
8001238: 4603 mov r3, r0
800123a: 2b00 cmp r3, #0
800123c: d001 beq.n 8001242 <MX_DMA2D_Init+0x56>
{
Error_Handler();
800123e: f001 fb3b bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN DMA2D_Init 2 */
/* USER CODE END DMA2D_Init 2 */
}
8001242: bf00 nop
8001244: bd80 pop {r7, pc}
8001246: bf00 nop
8001248: 20008db4 .word 0x20008db4
800124c: 4002b000 .word 0x4002b000
08001250 <MX_I2C1_Init>:
* @brief I2C1 Initialization Function
* @param None
* @retval None
*/
static void MX_I2C1_Init(void)
{
8001250: b580 push {r7, lr}
8001252: af00 add r7, sp, #0
/* USER CODE END I2C1_Init 0 */
/* USER CODE BEGIN I2C1_Init 1 */
/* USER CODE END I2C1_Init 1 */
hi2c1.Instance = I2C1;
8001254: 4b1b ldr r3, [pc, #108] ; (80012c4 <MX_I2C1_Init+0x74>)
8001256: 4a1c ldr r2, [pc, #112] ; (80012c8 <MX_I2C1_Init+0x78>)
8001258: 601a str r2, [r3, #0]
hi2c1.Init.Timing = 0x00C0EAFF;
800125a: 4b1a ldr r3, [pc, #104] ; (80012c4 <MX_I2C1_Init+0x74>)
800125c: 4a1b ldr r2, [pc, #108] ; (80012cc <MX_I2C1_Init+0x7c>)
800125e: 605a str r2, [r3, #4]
hi2c1.Init.OwnAddress1 = 0;
8001260: 4b18 ldr r3, [pc, #96] ; (80012c4 <MX_I2C1_Init+0x74>)
8001262: 2200 movs r2, #0
8001264: 609a str r2, [r3, #8]
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
8001266: 4b17 ldr r3, [pc, #92] ; (80012c4 <MX_I2C1_Init+0x74>)
8001268: 2201 movs r2, #1
800126a: 60da str r2, [r3, #12]
hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
800126c: 4b15 ldr r3, [pc, #84] ; (80012c4 <MX_I2C1_Init+0x74>)
800126e: 2200 movs r2, #0
8001270: 611a str r2, [r3, #16]
hi2c1.Init.OwnAddress2 = 0;
8001272: 4b14 ldr r3, [pc, #80] ; (80012c4 <MX_I2C1_Init+0x74>)
8001274: 2200 movs r2, #0
8001276: 615a str r2, [r3, #20]
hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
8001278: 4b12 ldr r3, [pc, #72] ; (80012c4 <MX_I2C1_Init+0x74>)
800127a: 2200 movs r2, #0
800127c: 619a str r2, [r3, #24]
hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
800127e: 4b11 ldr r3, [pc, #68] ; (80012c4 <MX_I2C1_Init+0x74>)
8001280: 2200 movs r2, #0
8001282: 61da str r2, [r3, #28]
hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
8001284: 4b0f ldr r3, [pc, #60] ; (80012c4 <MX_I2C1_Init+0x74>)
8001286: 2200 movs r2, #0
8001288: 621a str r2, [r3, #32]
if (HAL_I2C_Init(&hi2c1) != HAL_OK)
800128a: 480e ldr r0, [pc, #56] ; (80012c4 <MX_I2C1_Init+0x74>)
800128c: f006 ff9e bl 80081cc <HAL_I2C_Init>
8001290: 4603 mov r3, r0
8001292: 2b00 cmp r3, #0
8001294: d001 beq.n 800129a <MX_I2C1_Init+0x4a>
{
Error_Handler();
8001296: f001 fb0f bl 80028b8 <Error_Handler>
}
/** Configure Analogue filter
*/
if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
800129a: 2100 movs r1, #0
800129c: 4809 ldr r0, [pc, #36] ; (80012c4 <MX_I2C1_Init+0x74>)
800129e: f007 fcad bl 8008bfc <HAL_I2CEx_ConfigAnalogFilter>
80012a2: 4603 mov r3, r0
80012a4: 2b00 cmp r3, #0
80012a6: d001 beq.n 80012ac <MX_I2C1_Init+0x5c>
{
Error_Handler();
80012a8: f001 fb06 bl 80028b8 <Error_Handler>
}
/** Configure Digital filter
*/
if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1, 0) != HAL_OK)
80012ac: 2100 movs r1, #0
80012ae: 4805 ldr r0, [pc, #20] ; (80012c4 <MX_I2C1_Init+0x74>)
80012b0: f007 fcef bl 8008c92 <HAL_I2CEx_ConfigDigitalFilter>
80012b4: 4603 mov r3, r0
80012b6: 2b00 cmp r3, #0
80012b8: d001 beq.n 80012be <MX_I2C1_Init+0x6e>
{
Error_Handler();
80012ba: f001 fafd bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN I2C1_Init 2 */
/* USER CODE END I2C1_Init 2 */
}
80012be: bf00 nop
80012c0: bd80 pop {r7, pc}
80012c2: bf00 nop
80012c4: 200089f0 .word 0x200089f0
80012c8: 40005400 .word 0x40005400
80012cc: 00c0eaff .word 0x00c0eaff
080012d0 <MX_I2C3_Init>:
* @brief I2C3 Initialization Function
* @param None
* @retval None
*/
static void MX_I2C3_Init(void)
{
80012d0: b580 push {r7, lr}
80012d2: af00 add r7, sp, #0
/* USER CODE END I2C3_Init 0 */
/* USER CODE BEGIN I2C3_Init 1 */
/* USER CODE END I2C3_Init 1 */
hi2c3.Instance = I2C3;
80012d4: 4b1b ldr r3, [pc, #108] ; (8001344 <MX_I2C3_Init+0x74>)
80012d6: 4a1c ldr r2, [pc, #112] ; (8001348 <MX_I2C3_Init+0x78>)
80012d8: 601a str r2, [r3, #0]
hi2c3.Init.Timing = 0x00C0EAFF;
80012da: 4b1a ldr r3, [pc, #104] ; (8001344 <MX_I2C3_Init+0x74>)
80012dc: 4a1b ldr r2, [pc, #108] ; (800134c <MX_I2C3_Init+0x7c>)
80012de: 605a str r2, [r3, #4]
hi2c3.Init.OwnAddress1 = 0;
80012e0: 4b18 ldr r3, [pc, #96] ; (8001344 <MX_I2C3_Init+0x74>)
80012e2: 2200 movs r2, #0
80012e4: 609a str r2, [r3, #8]
hi2c3.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
80012e6: 4b17 ldr r3, [pc, #92] ; (8001344 <MX_I2C3_Init+0x74>)
80012e8: 2201 movs r2, #1
80012ea: 60da str r2, [r3, #12]
hi2c3.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
80012ec: 4b15 ldr r3, [pc, #84] ; (8001344 <MX_I2C3_Init+0x74>)
80012ee: 2200 movs r2, #0
80012f0: 611a str r2, [r3, #16]
hi2c3.Init.OwnAddress2 = 0;
80012f2: 4b14 ldr r3, [pc, #80] ; (8001344 <MX_I2C3_Init+0x74>)
80012f4: 2200 movs r2, #0
80012f6: 615a str r2, [r3, #20]
hi2c3.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
80012f8: 4b12 ldr r3, [pc, #72] ; (8001344 <MX_I2C3_Init+0x74>)
80012fa: 2200 movs r2, #0
80012fc: 619a str r2, [r3, #24]
hi2c3.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
80012fe: 4b11 ldr r3, [pc, #68] ; (8001344 <MX_I2C3_Init+0x74>)
8001300: 2200 movs r2, #0
8001302: 61da str r2, [r3, #28]
hi2c3.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
8001304: 4b0f ldr r3, [pc, #60] ; (8001344 <MX_I2C3_Init+0x74>)
8001306: 2200 movs r2, #0
8001308: 621a str r2, [r3, #32]
if (HAL_I2C_Init(&hi2c3) != HAL_OK)
800130a: 480e ldr r0, [pc, #56] ; (8001344 <MX_I2C3_Init+0x74>)
800130c: f006 ff5e bl 80081cc <HAL_I2C_Init>
8001310: 4603 mov r3, r0
8001312: 2b00 cmp r3, #0
8001314: d001 beq.n 800131a <MX_I2C3_Init+0x4a>
{
Error_Handler();
8001316: f001 facf bl 80028b8 <Error_Handler>
}
/** Configure Analogue filter
*/
if (HAL_I2CEx_ConfigAnalogFilter(&hi2c3, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
800131a: 2100 movs r1, #0
800131c: 4809 ldr r0, [pc, #36] ; (8001344 <MX_I2C3_Init+0x74>)
800131e: f007 fc6d bl 8008bfc <HAL_I2CEx_ConfigAnalogFilter>
8001322: 4603 mov r3, r0
8001324: 2b00 cmp r3, #0
8001326: d001 beq.n 800132c <MX_I2C3_Init+0x5c>
{
Error_Handler();
8001328: f001 fac6 bl 80028b8 <Error_Handler>
}
/** Configure Digital filter
*/
if (HAL_I2CEx_ConfigDigitalFilter(&hi2c3, 0) != HAL_OK)
800132c: 2100 movs r1, #0
800132e: 4805 ldr r0, [pc, #20] ; (8001344 <MX_I2C3_Init+0x74>)
8001330: f007 fcaf bl 8008c92 <HAL_I2CEx_ConfigDigitalFilter>
8001334: 4603 mov r3, r0
8001336: 2b00 cmp r3, #0
8001338: d001 beq.n 800133e <MX_I2C3_Init+0x6e>
{
Error_Handler();
800133a: f001 fabd bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN I2C3_Init 2 */
/* USER CODE END I2C3_Init 2 */
}
800133e: bf00 nop
8001340: bd80 pop {r7, pc}
8001342: bf00 nop
8001344: 2000887c .word 0x2000887c
8001348: 40005c00 .word 0x40005c00
800134c: 00c0eaff .word 0x00c0eaff
08001350 <MX_LTDC_Init>:
* @brief LTDC Initialization Function
* @param None
* @retval None
*/
static void MX_LTDC_Init(void)
{
8001350: b580 push {r7, lr}
8001352: b08e sub sp, #56 ; 0x38
8001354: af00 add r7, sp, #0
/* USER CODE BEGIN LTDC_Init 0 */
/* USER CODE END LTDC_Init 0 */
LTDC_LayerCfgTypeDef pLayerCfg = {0};
8001356: 1d3b adds r3, r7, #4
8001358: 2234 movs r2, #52 ; 0x34
800135a: 2100 movs r1, #0
800135c: 4618 mov r0, r3
800135e: f01b fcc2 bl 801cce6 <memset>
/* USER CODE BEGIN LTDC_Init 1 */
/* USER CODE END LTDC_Init 1 */
hltdc.Instance = LTDC;
8001362: 4b3a ldr r3, [pc, #232] ; (800144c <MX_LTDC_Init+0xfc>)
8001364: 4a3a ldr r2, [pc, #232] ; (8001450 <MX_LTDC_Init+0x100>)
8001366: 601a str r2, [r3, #0]
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
8001368: 4b38 ldr r3, [pc, #224] ; (800144c <MX_LTDC_Init+0xfc>)
800136a: 2200 movs r2, #0
800136c: 605a str r2, [r3, #4]
hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
800136e: 4b37 ldr r3, [pc, #220] ; (800144c <MX_LTDC_Init+0xfc>)
8001370: 2200 movs r2, #0
8001372: 609a str r2, [r3, #8]
hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;
8001374: 4b35 ldr r3, [pc, #212] ; (800144c <MX_LTDC_Init+0xfc>)
8001376: 2200 movs r2, #0
8001378: 60da str r2, [r3, #12]
hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
800137a: 4b34 ldr r3, [pc, #208] ; (800144c <MX_LTDC_Init+0xfc>)
800137c: 2200 movs r2, #0
800137e: 611a str r2, [r3, #16]
hltdc.Init.HorizontalSync = 40;
8001380: 4b32 ldr r3, [pc, #200] ; (800144c <MX_LTDC_Init+0xfc>)
8001382: 2228 movs r2, #40 ; 0x28
8001384: 615a str r2, [r3, #20]
hltdc.Init.VerticalSync = 9;
8001386: 4b31 ldr r3, [pc, #196] ; (800144c <MX_LTDC_Init+0xfc>)
8001388: 2209 movs r2, #9
800138a: 619a str r2, [r3, #24]
hltdc.Init.AccumulatedHBP = 53;
800138c: 4b2f ldr r3, [pc, #188] ; (800144c <MX_LTDC_Init+0xfc>)
800138e: 2235 movs r2, #53 ; 0x35
8001390: 61da str r2, [r3, #28]
hltdc.Init.AccumulatedVBP = 11;
8001392: 4b2e ldr r3, [pc, #184] ; (800144c <MX_LTDC_Init+0xfc>)
8001394: 220b movs r2, #11
8001396: 621a str r2, [r3, #32]
hltdc.Init.AccumulatedActiveW = 533;
8001398: 4b2c ldr r3, [pc, #176] ; (800144c <MX_LTDC_Init+0xfc>)
800139a: f240 2215 movw r2, #533 ; 0x215
800139e: 625a str r2, [r3, #36] ; 0x24
hltdc.Init.AccumulatedActiveH = 283;
80013a0: 4b2a ldr r3, [pc, #168] ; (800144c <MX_LTDC_Init+0xfc>)
80013a2: f240 121b movw r2, #283 ; 0x11b
80013a6: 629a str r2, [r3, #40] ; 0x28
hltdc.Init.TotalWidth = 565;
80013a8: 4b28 ldr r3, [pc, #160] ; (800144c <MX_LTDC_Init+0xfc>)
80013aa: f240 2235 movw r2, #565 ; 0x235
80013ae: 62da str r2, [r3, #44] ; 0x2c
hltdc.Init.TotalHeigh = 285;
80013b0: 4b26 ldr r3, [pc, #152] ; (800144c <MX_LTDC_Init+0xfc>)
80013b2: f240 121d movw r2, #285 ; 0x11d
80013b6: 631a str r2, [r3, #48] ; 0x30
hltdc.Init.Backcolor.Blue = 0;
80013b8: 4b24 ldr r3, [pc, #144] ; (800144c <MX_LTDC_Init+0xfc>)
80013ba: 2200 movs r2, #0
80013bc: f883 2034 strb.w r2, [r3, #52] ; 0x34
hltdc.Init.Backcolor.Green = 0;
80013c0: 4b22 ldr r3, [pc, #136] ; (800144c <MX_LTDC_Init+0xfc>)
80013c2: 2200 movs r2, #0
80013c4: f883 2035 strb.w r2, [r3, #53] ; 0x35
hltdc.Init.Backcolor.Red = 0;
80013c8: 4b20 ldr r3, [pc, #128] ; (800144c <MX_LTDC_Init+0xfc>)
80013ca: 2200 movs r2, #0
80013cc: f883 2036 strb.w r2, [r3, #54] ; 0x36
if (HAL_LTDC_Init(&hltdc) != HAL_OK)
80013d0: 481e ldr r0, [pc, #120] ; (800144c <MX_LTDC_Init+0xfc>)
80013d2: f007 fcab bl 8008d2c <HAL_LTDC_Init>
80013d6: 4603 mov r3, r0
80013d8: 2b00 cmp r3, #0
80013da: d001 beq.n 80013e0 <MX_LTDC_Init+0x90>
{
Error_Handler();
80013dc: f001 fa6c bl 80028b8 <Error_Handler>
}
pLayerCfg.WindowX0 = 0;
80013e0: 2300 movs r3, #0
80013e2: 607b str r3, [r7, #4]
pLayerCfg.WindowX1 = 480;
80013e4: f44f 73f0 mov.w r3, #480 ; 0x1e0
80013e8: 60bb str r3, [r7, #8]
pLayerCfg.WindowY0 = 0;
80013ea: 2300 movs r3, #0
80013ec: 60fb str r3, [r7, #12]
pLayerCfg.WindowY1 = 272;
80013ee: f44f 7388 mov.w r3, #272 ; 0x110
80013f2: 613b str r3, [r7, #16]
pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565;
80013f4: 2302 movs r3, #2
80013f6: 617b str r3, [r7, #20]
pLayerCfg.Alpha = 255;
80013f8: 23ff movs r3, #255 ; 0xff
80013fa: 61bb str r3, [r7, #24]
pLayerCfg.Alpha0 = 0;
80013fc: 2300 movs r3, #0
80013fe: 61fb str r3, [r7, #28]
pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA;
8001400: f44f 63c0 mov.w r3, #1536 ; 0x600
8001404: 623b str r3, [r7, #32]
pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA;
8001406: 2307 movs r3, #7
8001408: 627b str r3, [r7, #36] ; 0x24
pLayerCfg.FBStartAdress = 0xC0000000;
800140a: f04f 4340 mov.w r3, #3221225472 ; 0xc0000000
800140e: 62bb str r3, [r7, #40] ; 0x28
pLayerCfg.ImageWidth = 480;
8001410: f44f 73f0 mov.w r3, #480 ; 0x1e0
8001414: 62fb str r3, [r7, #44] ; 0x2c
pLayerCfg.ImageHeight = 272;
8001416: f44f 7388 mov.w r3, #272 ; 0x110
800141a: 633b str r3, [r7, #48] ; 0x30
pLayerCfg.Backcolor.Blue = 0;
800141c: 2300 movs r3, #0
800141e: f887 3034 strb.w r3, [r7, #52] ; 0x34
pLayerCfg.Backcolor.Green = 0;
8001422: 2300 movs r3, #0
8001424: f887 3035 strb.w r3, [r7, #53] ; 0x35
pLayerCfg.Backcolor.Red = 0;
8001428: 2300 movs r3, #0
800142a: f887 3036 strb.w r3, [r7, #54] ; 0x36
if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)
800142e: 1d3b adds r3, r7, #4
8001430: 2200 movs r2, #0
8001432: 4619 mov r1, r3
8001434: 4805 ldr r0, [pc, #20] ; (800144c <MX_LTDC_Init+0xfc>)
8001436: f007 fe0b bl 8009050 <HAL_LTDC_ConfigLayer>
800143a: 4603 mov r3, r0
800143c: 2b00 cmp r3, #0
800143e: d001 beq.n 8001444 <MX_LTDC_Init+0xf4>
{
Error_Handler();
8001440: f001 fa3a bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN LTDC_Init 2 */
/* USER CODE END LTDC_Init 2 */
}
8001444: bf00 nop
8001446: 3738 adds r7, #56 ; 0x38
8001448: 46bd mov sp, r7
800144a: bd80 pop {r7, pc}
800144c: 20008ae4 .word 0x20008ae4
8001450: 40016800 .word 0x40016800
08001454 <MX_RNG_Init>:
* @brief RNG Initialization Function
* @param None
* @retval None
*/
static void MX_RNG_Init(void)
{
8001454: b580 push {r7, lr}
8001456: af00 add r7, sp, #0
/* USER CODE END RNG_Init 0 */
/* USER CODE BEGIN RNG_Init 1 */
/* USER CODE END RNG_Init 1 */
hrng.Instance = RNG;
8001458: 4b06 ldr r3, [pc, #24] ; (8001474 <MX_RNG_Init+0x20>)
800145a: 4a07 ldr r2, [pc, #28] ; (8001478 <MX_RNG_Init+0x24>)
800145c: 601a str r2, [r3, #0]
if (HAL_RNG_Init(&hrng) != HAL_OK)
800145e: 4805 ldr r0, [pc, #20] ; (8001474 <MX_RNG_Init+0x20>)
8001460: f009 f8d2 bl 800a608 <HAL_RNG_Init>
8001464: 4603 mov r3, r0
8001466: 2b00 cmp r3, #0
8001468: d001 beq.n 800146e <MX_RNG_Init+0x1a>
{
Error_Handler();
800146a: f001 fa25 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN RNG_Init 2 */
/* USER CODE END RNG_Init 2 */
}
800146e: bf00 nop
8001470: bd80 pop {r7, pc}
8001472: bf00 nop
8001474: 20008d20 .word 0x20008d20
8001478: 50060800 .word 0x50060800
0800147c <MX_RTC_Init>:
* @brief RTC Initialization Function
* @param None
* @retval None
*/
static void MX_RTC_Init(void)
{
800147c: b580 push {r7, lr}
800147e: b092 sub sp, #72 ; 0x48
8001480: af00 add r7, sp, #0
/* USER CODE BEGIN RTC_Init 0 */
/* USER CODE END RTC_Init 0 */
RTC_TimeTypeDef sTime = {0};
8001482: f107 0330 add.w r3, r7, #48 ; 0x30
8001486: 2200 movs r2, #0
8001488: 601a str r2, [r3, #0]
800148a: 605a str r2, [r3, #4]
800148c: 609a str r2, [r3, #8]
800148e: 60da str r2, [r3, #12]
8001490: 611a str r2, [r3, #16]
8001492: 615a str r2, [r3, #20]
RTC_DateTypeDef sDate = {0};
8001494: 2300 movs r3, #0
8001496: 62fb str r3, [r7, #44] ; 0x2c
RTC_AlarmTypeDef sAlarm = {0};
8001498: 463b mov r3, r7
800149a: 222c movs r2, #44 ; 0x2c
800149c: 2100 movs r1, #0
800149e: 4618 mov r0, r3
80014a0: f01b fc21 bl 801cce6 <memset>
/* USER CODE BEGIN RTC_Init 1 */
/* USER CODE END RTC_Init 1 */
/** Initialize RTC Only
*/
hrtc.Instance = RTC;
80014a4: 4b46 ldr r3, [pc, #280] ; (80015c0 <MX_RTC_Init+0x144>)
80014a6: 4a47 ldr r2, [pc, #284] ; (80015c4 <MX_RTC_Init+0x148>)
80014a8: 601a str r2, [r3, #0]
hrtc.Init.HourFormat = RTC_HOURFORMAT_24;
80014aa: 4b45 ldr r3, [pc, #276] ; (80015c0 <MX_RTC_Init+0x144>)
80014ac: 2200 movs r2, #0
80014ae: 605a str r2, [r3, #4]
hrtc.Init.AsynchPrediv = 127;
80014b0: 4b43 ldr r3, [pc, #268] ; (80015c0 <MX_RTC_Init+0x144>)
80014b2: 227f movs r2, #127 ; 0x7f
80014b4: 609a str r2, [r3, #8]
hrtc.Init.SynchPrediv = 255;
80014b6: 4b42 ldr r3, [pc, #264] ; (80015c0 <MX_RTC_Init+0x144>)
80014b8: 22ff movs r2, #255 ; 0xff
80014ba: 60da str r2, [r3, #12]
hrtc.Init.OutPut = RTC_OUTPUT_DISABLE;
80014bc: 4b40 ldr r3, [pc, #256] ; (80015c0 <MX_RTC_Init+0x144>)
80014be: 2200 movs r2, #0
80014c0: 611a str r2, [r3, #16]
hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH;
80014c2: 4b3f ldr r3, [pc, #252] ; (80015c0 <MX_RTC_Init+0x144>)
80014c4: 2200 movs r2, #0
80014c6: 615a str r2, [r3, #20]
hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN;
80014c8: 4b3d ldr r3, [pc, #244] ; (80015c0 <MX_RTC_Init+0x144>)
80014ca: 2200 movs r2, #0
80014cc: 619a str r2, [r3, #24]
if (HAL_RTC_Init(&hrtc) != HAL_OK)
80014ce: 483c ldr r0, [pc, #240] ; (80015c0 <MX_RTC_Init+0x144>)
80014d0: f009 f8c4 bl 800a65c <HAL_RTC_Init>
80014d4: 4603 mov r3, r0
80014d6: 2b00 cmp r3, #0
80014d8: d001 beq.n 80014de <MX_RTC_Init+0x62>
{
Error_Handler();
80014da: f001 f9ed bl 80028b8 <Error_Handler>
/* USER CODE END Check_RTC_BKUP */
/** Initialize RTC and set the Time and Date
*/
sTime.Hours = 0x0;
80014de: 2300 movs r3, #0
80014e0: f887 3030 strb.w r3, [r7, #48] ; 0x30
sTime.Minutes = 0x0;
80014e4: 2300 movs r3, #0
80014e6: f887 3031 strb.w r3, [r7, #49] ; 0x31
sTime.Seconds = 0x0;
80014ea: 2300 movs r3, #0
80014ec: f887 3032 strb.w r3, [r7, #50] ; 0x32
sTime.DayLightSaving = RTC_DAYLIGHTSAVING_NONE;
80014f0: 2300 movs r3, #0
80014f2: 643b str r3, [r7, #64] ; 0x40
sTime.StoreOperation = RTC_STOREOPERATION_RESET;
80014f4: 2300 movs r3, #0
80014f6: 647b str r3, [r7, #68] ; 0x44
if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK)
80014f8: f107 0330 add.w r3, r7, #48 ; 0x30
80014fc: 2201 movs r2, #1
80014fe: 4619 mov r1, r3
8001500: 482f ldr r0, [pc, #188] ; (80015c0 <MX_RTC_Init+0x144>)
8001502: f009 f927 bl 800a754 <HAL_RTC_SetTime>
8001506: 4603 mov r3, r0
8001508: 2b00 cmp r3, #0
800150a: d001 beq.n 8001510 <MX_RTC_Init+0x94>
{
Error_Handler();
800150c: f001 f9d4 bl 80028b8 <Error_Handler>
}
sDate.WeekDay = RTC_WEEKDAY_MONDAY;
8001510: 2301 movs r3, #1
8001512: f887 302c strb.w r3, [r7, #44] ; 0x2c
sDate.Month = RTC_MONTH_JANUARY;
8001516: 2301 movs r3, #1
8001518: f887 302d strb.w r3, [r7, #45] ; 0x2d
sDate.Date = 0x1;
800151c: 2301 movs r3, #1
800151e: f887 302e strb.w r3, [r7, #46] ; 0x2e
sDate.Year = 0x0;
8001522: 2300 movs r3, #0
8001524: f887 302f strb.w r3, [r7, #47] ; 0x2f
if (HAL_RTC_SetDate(&hrtc, &sDate, RTC_FORMAT_BCD) != HAL_OK)
8001528: f107 032c add.w r3, r7, #44 ; 0x2c
800152c: 2201 movs r2, #1
800152e: 4619 mov r1, r3
8001530: 4823 ldr r0, [pc, #140] ; (80015c0 <MX_RTC_Init+0x144>)
8001532: f009 f9cd bl 800a8d0 <HAL_RTC_SetDate>
8001536: 4603 mov r3, r0
8001538: 2b00 cmp r3, #0
800153a: d001 beq.n 8001540 <MX_RTC_Init+0xc4>
{
Error_Handler();
800153c: f001 f9bc bl 80028b8 <Error_Handler>
}
/** Enable the Alarm A
*/
sAlarm.AlarmTime.Hours = 0x0;
8001540: 2300 movs r3, #0
8001542: 703b strb r3, [r7, #0]
sAlarm.AlarmTime.Minutes = 0x0;
8001544: 2300 movs r3, #0
8001546: 707b strb r3, [r7, #1]
sAlarm.AlarmTime.Seconds = 0x0;
8001548: 2300 movs r3, #0
800154a: 70bb strb r3, [r7, #2]
sAlarm.AlarmTime.SubSeconds = 0x0;
800154c: 2300 movs r3, #0
800154e: 607b str r3, [r7, #4]
sAlarm.AlarmTime.DayLightSaving = RTC_DAYLIGHTSAVING_NONE;
8001550: 2300 movs r3, #0
8001552: 613b str r3, [r7, #16]
sAlarm.AlarmTime.StoreOperation = RTC_STOREOPERATION_RESET;
8001554: 2300 movs r3, #0
8001556: 617b str r3, [r7, #20]
sAlarm.AlarmMask = RTC_ALARMMASK_NONE;
8001558: 2300 movs r3, #0
800155a: 61bb str r3, [r7, #24]
sAlarm.AlarmSubSecondMask = RTC_ALARMSUBSECONDMASK_ALL;
800155c: 2300 movs r3, #0
800155e: 61fb str r3, [r7, #28]
sAlarm.AlarmDateWeekDaySel = RTC_ALARMDATEWEEKDAYSEL_DATE;
8001560: 2300 movs r3, #0
8001562: 623b str r3, [r7, #32]
sAlarm.AlarmDateWeekDay = 0x1;
8001564: 2301 movs r3, #1
8001566: f887 3024 strb.w r3, [r7, #36] ; 0x24
sAlarm.Alarm = RTC_ALARM_A;
800156a: f44f 7380 mov.w r3, #256 ; 0x100
800156e: 62bb str r3, [r7, #40] ; 0x28
if (HAL_RTC_SetAlarm(&hrtc, &sAlarm, RTC_FORMAT_BCD) != HAL_OK)
8001570: 463b mov r3, r7
8001572: 2201 movs r2, #1
8001574: 4619 mov r1, r3
8001576: 4812 ldr r0, [pc, #72] ; (80015c0 <MX_RTC_Init+0x144>)
8001578: f009 fa52 bl 800aa20 <HAL_RTC_SetAlarm>
800157c: 4603 mov r3, r0
800157e: 2b00 cmp r3, #0
8001580: d001 beq.n 8001586 <MX_RTC_Init+0x10a>
{
Error_Handler();
8001582: f001 f999 bl 80028b8 <Error_Handler>
}
/** Enable the Alarm B
*/
sAlarm.Alarm = RTC_ALARM_B;
8001586: f44f 7300 mov.w r3, #512 ; 0x200
800158a: 62bb str r3, [r7, #40] ; 0x28
if (HAL_RTC_SetAlarm(&hrtc, &sAlarm, RTC_FORMAT_BCD) != HAL_OK)
800158c: 463b mov r3, r7
800158e: 2201 movs r2, #1
8001590: 4619 mov r1, r3
8001592: 480b ldr r0, [pc, #44] ; (80015c0 <MX_RTC_Init+0x144>)
8001594: f009 fa44 bl 800aa20 <HAL_RTC_SetAlarm>
8001598: 4603 mov r3, r0
800159a: 2b00 cmp r3, #0
800159c: d001 beq.n 80015a2 <MX_RTC_Init+0x126>
{
Error_Handler();
800159e: f001 f98b bl 80028b8 <Error_Handler>
}
/** Enable the TimeStamp
*/
if (HAL_RTCEx_SetTimeStamp(&hrtc, RTC_TIMESTAMPEDGE_RISING, RTC_TIMESTAMPPIN_POS1) != HAL_OK)
80015a2: 2202 movs r2, #2
80015a4: 2100 movs r1, #0
80015a6: 4806 ldr r0, [pc, #24] ; (80015c0 <MX_RTC_Init+0x144>)
80015a8: f009 fbc4 bl 800ad34 <HAL_RTCEx_SetTimeStamp>
80015ac: 4603 mov r3, r0
80015ae: 2b00 cmp r3, #0
80015b0: d001 beq.n 80015b6 <MX_RTC_Init+0x13a>
{
Error_Handler();
80015b2: f001 f981 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN RTC_Init 2 */
/* USER CODE END RTC_Init 2 */
}
80015b6: bf00 nop
80015b8: 3748 adds r7, #72 ; 0x48
80015ba: 46bd mov sp, r7
80015bc: bd80 pop {r7, pc}
80015be: bf00 nop
80015c0: 20008cc0 .word 0x20008cc0
80015c4: 40002800 .word 0x40002800
080015c8 <MX_SPI2_Init>:
* @brief SPI2 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI2_Init(void)
{
80015c8: b580 push {r7, lr}
80015ca: af00 add r7, sp, #0
/* USER CODE BEGIN SPI2_Init 1 */
/* USER CODE END SPI2_Init 1 */
/* SPI2 parameter configuration*/
hspi2.Instance = SPI2;
80015cc: 4b1b ldr r3, [pc, #108] ; (800163c <MX_SPI2_Init+0x74>)
80015ce: 4a1c ldr r2, [pc, #112] ; (8001640 <MX_SPI2_Init+0x78>)
80015d0: 601a str r2, [r3, #0]
hspi2.Init.Mode = SPI_MODE_MASTER;
80015d2: 4b1a ldr r3, [pc, #104] ; (800163c <MX_SPI2_Init+0x74>)
80015d4: f44f 7282 mov.w r2, #260 ; 0x104
80015d8: 605a str r2, [r3, #4]
hspi2.Init.Direction = SPI_DIRECTION_2LINES;
80015da: 4b18 ldr r3, [pc, #96] ; (800163c <MX_SPI2_Init+0x74>)
80015dc: 2200 movs r2, #0
80015de: 609a str r2, [r3, #8]
hspi2.Init.DataSize = SPI_DATASIZE_4BIT;
80015e0: 4b16 ldr r3, [pc, #88] ; (800163c <MX_SPI2_Init+0x74>)
80015e2: f44f 7240 mov.w r2, #768 ; 0x300
80015e6: 60da str r2, [r3, #12]
hspi2.Init.CLKPolarity = SPI_POLARITY_LOW;
80015e8: 4b14 ldr r3, [pc, #80] ; (800163c <MX_SPI2_Init+0x74>)
80015ea: 2200 movs r2, #0
80015ec: 611a str r2, [r3, #16]
hspi2.Init.CLKPhase = SPI_PHASE_1EDGE;
80015ee: 4b13 ldr r3, [pc, #76] ; (800163c <MX_SPI2_Init+0x74>)
80015f0: 2200 movs r2, #0
80015f2: 615a str r2, [r3, #20]
hspi2.Init.NSS = SPI_NSS_HARD_OUTPUT;
80015f4: 4b11 ldr r3, [pc, #68] ; (800163c <MX_SPI2_Init+0x74>)
80015f6: f44f 2280 mov.w r2, #262144 ; 0x40000
80015fa: 619a str r2, [r3, #24]
hspi2.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
80015fc: 4b0f ldr r3, [pc, #60] ; (800163c <MX_SPI2_Init+0x74>)
80015fe: 2200 movs r2, #0
8001600: 61da str r2, [r3, #28]
hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB;
8001602: 4b0e ldr r3, [pc, #56] ; (800163c <MX_SPI2_Init+0x74>)
8001604: 2200 movs r2, #0
8001606: 621a str r2, [r3, #32]
hspi2.Init.TIMode = SPI_TIMODE_DISABLE;
8001608: 4b0c ldr r3, [pc, #48] ; (800163c <MX_SPI2_Init+0x74>)
800160a: 2200 movs r2, #0
800160c: 625a str r2, [r3, #36] ; 0x24
hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
800160e: 4b0b ldr r3, [pc, #44] ; (800163c <MX_SPI2_Init+0x74>)
8001610: 2200 movs r2, #0
8001612: 629a str r2, [r3, #40] ; 0x28
hspi2.Init.CRCPolynomial = 7;
8001614: 4b09 ldr r3, [pc, #36] ; (800163c <MX_SPI2_Init+0x74>)
8001616: 2207 movs r2, #7
8001618: 62da str r2, [r3, #44] ; 0x2c
hspi2.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
800161a: 4b08 ldr r3, [pc, #32] ; (800163c <MX_SPI2_Init+0x74>)
800161c: 2200 movs r2, #0
800161e: 631a str r2, [r3, #48] ; 0x30
hspi2.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
8001620: 4b06 ldr r3, [pc, #24] ; (800163c <MX_SPI2_Init+0x74>)
8001622: 2208 movs r2, #8
8001624: 635a str r2, [r3, #52] ; 0x34
if (HAL_SPI_Init(&hspi2) != HAL_OK)
8001626: 4805 ldr r0, [pc, #20] ; (800163c <MX_SPI2_Init+0x74>)
8001628: f009 fc59 bl 800aede <HAL_SPI_Init>
800162c: 4603 mov r3, r0
800162e: 2b00 cmp r3, #0
8001630: d001 beq.n 8001636 <MX_SPI2_Init+0x6e>
{
Error_Handler();
8001632: f001 f941 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN SPI2_Init 2 */
/* USER CODE END SPI2_Init 2 */
}
8001636: bf00 nop
8001638: bd80 pop {r7, pc}
800163a: bf00 nop
800163c: 200088c8 .word 0x200088c8
8001640: 40003800 .word 0x40003800
08001644 <MX_TIM1_Init>:
* @brief TIM1 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM1_Init(void)
{
8001644: b580 push {r7, lr}
8001646: b088 sub sp, #32
8001648: af00 add r7, sp, #0
/* USER CODE BEGIN TIM1_Init 0 */
/* USER CODE END TIM1_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
800164a: f107 0310 add.w r3, r7, #16
800164e: 2200 movs r2, #0
8001650: 601a str r2, [r3, #0]
8001652: 605a str r2, [r3, #4]
8001654: 609a str r2, [r3, #8]
8001656: 60da str r2, [r3, #12]
TIM_MasterConfigTypeDef sMasterConfig = {0};
8001658: 1d3b adds r3, r7, #4
800165a: 2200 movs r2, #0
800165c: 601a str r2, [r3, #0]
800165e: 605a str r2, [r3, #4]
8001660: 609a str r2, [r3, #8]
/* USER CODE BEGIN TIM1_Init 1 */
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
8001662: 4b20 ldr r3, [pc, #128] ; (80016e4 <MX_TIM1_Init+0xa0>)
8001664: 4a20 ldr r2, [pc, #128] ; (80016e8 <MX_TIM1_Init+0xa4>)
8001666: 601a str r2, [r3, #0]
htim1.Init.Prescaler = 0;
8001668: 4b1e ldr r3, [pc, #120] ; (80016e4 <MX_TIM1_Init+0xa0>)
800166a: 2200 movs r2, #0
800166c: 605a str r2, [r3, #4]
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
800166e: 4b1d ldr r3, [pc, #116] ; (80016e4 <MX_TIM1_Init+0xa0>)
8001670: 2200 movs r2, #0
8001672: 609a str r2, [r3, #8]
htim1.Init.Period = 65535;
8001674: 4b1b ldr r3, [pc, #108] ; (80016e4 <MX_TIM1_Init+0xa0>)
8001676: f64f 72ff movw r2, #65535 ; 0xffff
800167a: 60da str r2, [r3, #12]
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
800167c: 4b19 ldr r3, [pc, #100] ; (80016e4 <MX_TIM1_Init+0xa0>)
800167e: 2200 movs r2, #0
8001680: 611a str r2, [r3, #16]
htim1.Init.RepetitionCounter = 0;
8001682: 4b18 ldr r3, [pc, #96] ; (80016e4 <MX_TIM1_Init+0xa0>)
8001684: 2200 movs r2, #0
8001686: 615a str r2, [r3, #20]
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
8001688: 4b16 ldr r3, [pc, #88] ; (80016e4 <MX_TIM1_Init+0xa0>)
800168a: 2200 movs r2, #0
800168c: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim1) != HAL_OK)
800168e: 4815 ldr r0, [pc, #84] ; (80016e4 <MX_TIM1_Init+0xa0>)
8001690: f009 fcb7 bl 800b002 <HAL_TIM_Base_Init>
8001694: 4603 mov r3, r0
8001696: 2b00 cmp r3, #0
8001698: d001 beq.n 800169e <MX_TIM1_Init+0x5a>
{
Error_Handler();
800169a: f001 f90d bl 80028b8 <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
800169e: f44f 5380 mov.w r3, #4096 ; 0x1000
80016a2: 613b str r3, [r7, #16]
if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK)
80016a4: f107 0310 add.w r3, r7, #16
80016a8: 4619 mov r1, r3
80016aa: 480e ldr r0, [pc, #56] ; (80016e4 <MX_TIM1_Init+0xa0>)
80016ac: f009 ff6a bl 800b584 <HAL_TIM_ConfigClockSource>
80016b0: 4603 mov r3, r0
80016b2: 2b00 cmp r3, #0
80016b4: d001 beq.n 80016ba <MX_TIM1_Init+0x76>
{
Error_Handler();
80016b6: f001 f8ff bl 80028b8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
80016ba: 2300 movs r3, #0
80016bc: 607b str r3, [r7, #4]
sMasterConfig.MasterOutputTrigger2 = TIM_TRGO2_RESET;
80016be: 2300 movs r3, #0
80016c0: 60bb str r3, [r7, #8]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
80016c2: 2300 movs r3, #0
80016c4: 60fb str r3, [r7, #12]
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
80016c6: 1d3b adds r3, r7, #4
80016c8: 4619 mov r1, r3
80016ca: 4806 ldr r0, [pc, #24] ; (80016e4 <MX_TIM1_Init+0xa0>)
80016cc: f00a fc9e bl 800c00c <HAL_TIMEx_MasterConfigSynchronization>
80016d0: 4603 mov r3, r0
80016d2: 2b00 cmp r3, #0
80016d4: d001 beq.n 80016da <MX_TIM1_Init+0x96>
{
Error_Handler();
80016d6: f001 f8ef bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN TIM1_Init 2 */
/* USER CODE END TIM1_Init 2 */
}
80016da: bf00 nop
80016dc: 3720 adds r7, #32
80016de: 46bd mov sp, r7
80016e0: bd80 pop {r7, pc}
80016e2: bf00 nop
80016e4: 20008ce0 .word 0x20008ce0
80016e8: 40010000 .word 0x40010000
080016ec <MX_TIM2_Init>:
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{
80016ec: b580 push {r7, lr}
80016ee: b088 sub sp, #32
80016f0: af00 add r7, sp, #0
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
80016f2: f107 0310 add.w r3, r7, #16
80016f6: 2200 movs r2, #0
80016f8: 601a str r2, [r3, #0]
80016fa: 605a str r2, [r3, #4]
80016fc: 609a str r2, [r3, #8]
80016fe: 60da str r2, [r3, #12]
TIM_MasterConfigTypeDef sMasterConfig = {0};
8001700: 1d3b adds r3, r7, #4
8001702: 2200 movs r2, #0
8001704: 601a str r2, [r3, #0]
8001706: 605a str r2, [r3, #4]
8001708: 609a str r2, [r3, #8]
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
800170a: 4b1e ldr r3, [pc, #120] ; (8001784 <MX_TIM2_Init+0x98>)
800170c: f04f 4280 mov.w r2, #1073741824 ; 0x40000000
8001710: 601a str r2, [r3, #0]
htim2.Init.Prescaler = 0;
8001712: 4b1c ldr r3, [pc, #112] ; (8001784 <MX_TIM2_Init+0x98>)
8001714: 2200 movs r2, #0
8001716: 605a str r2, [r3, #4]
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
8001718: 4b1a ldr r3, [pc, #104] ; (8001784 <MX_TIM2_Init+0x98>)
800171a: 2200 movs r2, #0
800171c: 609a str r2, [r3, #8]
htim2.Init.Period = 4294967295;
800171e: 4b19 ldr r3, [pc, #100] ; (8001784 <MX_TIM2_Init+0x98>)
8001720: f04f 32ff mov.w r2, #4294967295
8001724: 60da str r2, [r3, #12]
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
8001726: 4b17 ldr r3, [pc, #92] ; (8001784 <MX_TIM2_Init+0x98>)
8001728: 2200 movs r2, #0
800172a: 611a str r2, [r3, #16]
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
800172c: 4b15 ldr r3, [pc, #84] ; (8001784 <MX_TIM2_Init+0x98>)
800172e: 2200 movs r2, #0
8001730: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
8001732: 4814 ldr r0, [pc, #80] ; (8001784 <MX_TIM2_Init+0x98>)
8001734: f009 fc65 bl 800b002 <HAL_TIM_Base_Init>
8001738: 4603 mov r3, r0
800173a: 2b00 cmp r3, #0
800173c: d001 beq.n 8001742 <MX_TIM2_Init+0x56>
{
Error_Handler();
800173e: f001 f8bb bl 80028b8 <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
8001742: f44f 5380 mov.w r3, #4096 ; 0x1000
8001746: 613b str r3, [r7, #16]
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
8001748: f107 0310 add.w r3, r7, #16
800174c: 4619 mov r1, r3
800174e: 480d ldr r0, [pc, #52] ; (8001784 <MX_TIM2_Init+0x98>)
8001750: f009 ff18 bl 800b584 <HAL_TIM_ConfigClockSource>
8001754: 4603 mov r3, r0
8001756: 2b00 cmp r3, #0
8001758: d001 beq.n 800175e <MX_TIM2_Init+0x72>
{
Error_Handler();
800175a: f001 f8ad bl 80028b8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
800175e: 2300 movs r3, #0
8001760: 607b str r3, [r7, #4]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
8001762: 2300 movs r3, #0
8001764: 60fb str r3, [r7, #12]
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
8001766: 1d3b adds r3, r7, #4
8001768: 4619 mov r1, r3
800176a: 4806 ldr r0, [pc, #24] ; (8001784 <MX_TIM2_Init+0x98>)
800176c: f00a fc4e bl 800c00c <HAL_TIMEx_MasterConfigSynchronization>
8001770: 4603 mov r3, r0
8001772: 2b00 cmp r3, #0
8001774: d001 beq.n 800177a <MX_TIM2_Init+0x8e>
{
Error_Handler();
8001776: f001 f89f bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
}
800177a: bf00 nop
800177c: 3720 adds r7, #32
800177e: 46bd mov sp, r7
8001780: bd80 pop {r7, pc}
8001782: bf00 nop
8001784: 20008df4 .word 0x20008df4
08001788 <MX_TIM3_Init>:
* @brief TIM3 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM3_Init(void)
{
8001788: b580 push {r7, lr}
800178a: b094 sub sp, #80 ; 0x50
800178c: af00 add r7, sp, #0
/* USER CODE BEGIN TIM3_Init 0 */
/* USER CODE END TIM3_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
800178e: f107 0340 add.w r3, r7, #64 ; 0x40
8001792: 2200 movs r2, #0
8001794: 601a str r2, [r3, #0]
8001796: 605a str r2, [r3, #4]
8001798: 609a str r2, [r3, #8]
800179a: 60da str r2, [r3, #12]
TIM_SlaveConfigTypeDef sSlaveConfig = {0};
800179c: f107 032c add.w r3, r7, #44 ; 0x2c
80017a0: 2200 movs r2, #0
80017a2: 601a str r2, [r3, #0]
80017a4: 605a str r2, [r3, #4]
80017a6: 609a str r2, [r3, #8]
80017a8: 60da str r2, [r3, #12]
80017aa: 611a str r2, [r3, #16]
TIM_MasterConfigTypeDef sMasterConfig = {0};
80017ac: f107 0320 add.w r3, r7, #32
80017b0: 2200 movs r2, #0
80017b2: 601a str r2, [r3, #0]
80017b4: 605a str r2, [r3, #4]
80017b6: 609a str r2, [r3, #8]
TIM_OC_InitTypeDef sConfigOC = {0};
80017b8: 1d3b adds r3, r7, #4
80017ba: 2200 movs r2, #0
80017bc: 601a str r2, [r3, #0]
80017be: 605a str r2, [r3, #4]
80017c0: 609a str r2, [r3, #8]
80017c2: 60da str r2, [r3, #12]
80017c4: 611a str r2, [r3, #16]
80017c6: 615a str r2, [r3, #20]
80017c8: 619a str r2, [r3, #24]
/* USER CODE BEGIN TIM3_Init 1 */
/* USER CODE END TIM3_Init 1 */
htim3.Instance = TIM3;
80017ca: 4b34 ldr r3, [pc, #208] ; (800189c <MX_TIM3_Init+0x114>)
80017cc: 4a34 ldr r2, [pc, #208] ; (80018a0 <MX_TIM3_Init+0x118>)
80017ce: 601a str r2, [r3, #0]
htim3.Init.Prescaler = 0;
80017d0: 4b32 ldr r3, [pc, #200] ; (800189c <MX_TIM3_Init+0x114>)
80017d2: 2200 movs r2, #0
80017d4: 605a str r2, [r3, #4]
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
80017d6: 4b31 ldr r3, [pc, #196] ; (800189c <MX_TIM3_Init+0x114>)
80017d8: 2200 movs r2, #0
80017da: 609a str r2, [r3, #8]
htim3.Init.Period = 65535;
80017dc: 4b2f ldr r3, [pc, #188] ; (800189c <MX_TIM3_Init+0x114>)
80017de: f64f 72ff movw r2, #65535 ; 0xffff
80017e2: 60da str r2, [r3, #12]
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
80017e4: 4b2d ldr r3, [pc, #180] ; (800189c <MX_TIM3_Init+0x114>)
80017e6: 2200 movs r2, #0
80017e8: 611a str r2, [r3, #16]
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
80017ea: 4b2c ldr r3, [pc, #176] ; (800189c <MX_TIM3_Init+0x114>)
80017ec: 2200 movs r2, #0
80017ee: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim3) != HAL_OK)
80017f0: 482a ldr r0, [pc, #168] ; (800189c <MX_TIM3_Init+0x114>)
80017f2: f009 fc06 bl 800b002 <HAL_TIM_Base_Init>
80017f6: 4603 mov r3, r0
80017f8: 2b00 cmp r3, #0
80017fa: d001 beq.n 8001800 <MX_TIM3_Init+0x78>
{
Error_Handler();
80017fc: f001 f85c bl 80028b8 <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
8001800: f44f 5380 mov.w r3, #4096 ; 0x1000
8001804: 643b str r3, [r7, #64] ; 0x40
if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK)
8001806: f107 0340 add.w r3, r7, #64 ; 0x40
800180a: 4619 mov r1, r3
800180c: 4823 ldr r0, [pc, #140] ; (800189c <MX_TIM3_Init+0x114>)
800180e: f009 feb9 bl 800b584 <HAL_TIM_ConfigClockSource>
8001812: 4603 mov r3, r0
8001814: 2b00 cmp r3, #0
8001816: d001 beq.n 800181c <MX_TIM3_Init+0x94>
{
Error_Handler();
8001818: f001 f84e bl 80028b8 <Error_Handler>
}
if (HAL_TIM_PWM_Init(&htim3) != HAL_OK)
800181c: 481f ldr r0, [pc, #124] ; (800189c <MX_TIM3_Init+0x114>)
800181e: f009 fc45 bl 800b0ac <HAL_TIM_PWM_Init>
8001822: 4603 mov r3, r0
8001824: 2b00 cmp r3, #0
8001826: d001 beq.n 800182c <MX_TIM3_Init+0xa4>
{
Error_Handler();
8001828: f001 f846 bl 80028b8 <Error_Handler>
}
sSlaveConfig.SlaveMode = TIM_SLAVEMODE_DISABLE;
800182c: 2300 movs r3, #0
800182e: 62fb str r3, [r7, #44] ; 0x2c
sSlaveConfig.InputTrigger = TIM_TS_ITR0;
8001830: 2300 movs r3, #0
8001832: 633b str r3, [r7, #48] ; 0x30
if (HAL_TIM_SlaveConfigSynchro(&htim3, &sSlaveConfig) != HAL_OK)
8001834: f107 032c add.w r3, r7, #44 ; 0x2c
8001838: 4619 mov r1, r3
800183a: 4818 ldr r0, [pc, #96] ; (800189c <MX_TIM3_Init+0x114>)
800183c: f009 ff5c bl 800b6f8 <HAL_TIM_SlaveConfigSynchro>
8001840: 4603 mov r3, r0
8001842: 2b00 cmp r3, #0
8001844: d001 beq.n 800184a <MX_TIM3_Init+0xc2>
{
Error_Handler();
8001846: f001 f837 bl 80028b8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
800184a: 2300 movs r3, #0
800184c: 623b str r3, [r7, #32]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
800184e: 2300 movs r3, #0
8001850: 62bb str r3, [r7, #40] ; 0x28
if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK)
8001852: f107 0320 add.w r3, r7, #32
8001856: 4619 mov r1, r3
8001858: 4810 ldr r0, [pc, #64] ; (800189c <MX_TIM3_Init+0x114>)
800185a: f00a fbd7 bl 800c00c <HAL_TIMEx_MasterConfigSynchronization>
800185e: 4603 mov r3, r0
8001860: 2b00 cmp r3, #0
8001862: d001 beq.n 8001868 <MX_TIM3_Init+0xe0>
{
Error_Handler();
8001864: f001 f828 bl 80028b8 <Error_Handler>
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
8001868: 2360 movs r3, #96 ; 0x60
800186a: 607b str r3, [r7, #4]
sConfigOC.Pulse = 0;
800186c: 2300 movs r3, #0
800186e: 60bb str r3, [r7, #8]
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
8001870: 2300 movs r3, #0
8001872: 60fb str r3, [r7, #12]
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
8001874: 2300 movs r3, #0
8001876: 617b str r3, [r7, #20]
if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
8001878: 1d3b adds r3, r7, #4
800187a: 2200 movs r2, #0
800187c: 4619 mov r1, r3
800187e: 4807 ldr r0, [pc, #28] ; (800189c <MX_TIM3_Init+0x114>)
8001880: f009 fd68 bl 800b354 <HAL_TIM_PWM_ConfigChannel>
8001884: 4603 mov r3, r0
8001886: 2b00 cmp r3, #0
8001888: d001 beq.n 800188e <MX_TIM3_Init+0x106>
{
Error_Handler();
800188a: f001 f815 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN TIM3_Init 2 */
/* USER CODE END TIM3_Init 2 */
HAL_TIM_MspPostInit(&htim3);
800188e: 4803 ldr r0, [pc, #12] ; (800189c <MX_TIM3_Init+0x114>)
8001890: f003 f9f2 bl 8004c78 <HAL_TIM_MspPostInit>
}
8001894: bf00 nop
8001896: 3750 adds r7, #80 ; 0x50
8001898: 46bd mov sp, r7
800189a: bd80 pop {r7, pc}
800189c: 20008aa4 .word 0x20008aa4
80018a0: 40000400 .word 0x40000400
080018a4 <MX_TIM5_Init>:
* @brief TIM5 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM5_Init(void)
{
80018a4: b580 push {r7, lr}
80018a6: b088 sub sp, #32
80018a8: af00 add r7, sp, #0
/* USER CODE BEGIN TIM5_Init 0 */
/* USER CODE END TIM5_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
80018aa: f107 0310 add.w r3, r7, #16
80018ae: 2200 movs r2, #0
80018b0: 601a str r2, [r3, #0]
80018b2: 605a str r2, [r3, #4]
80018b4: 609a str r2, [r3, #8]
80018b6: 60da str r2, [r3, #12]
TIM_MasterConfigTypeDef sMasterConfig = {0};
80018b8: 1d3b adds r3, r7, #4
80018ba: 2200 movs r2, #0
80018bc: 601a str r2, [r3, #0]
80018be: 605a str r2, [r3, #4]
80018c0: 609a str r2, [r3, #8]
/* USER CODE BEGIN TIM5_Init 1 */
/* USER CODE END TIM5_Init 1 */
htim5.Instance = TIM5;
80018c2: 4b1d ldr r3, [pc, #116] ; (8001938 <MX_TIM5_Init+0x94>)
80018c4: 4a1d ldr r2, [pc, #116] ; (800193c <MX_TIM5_Init+0x98>)
80018c6: 601a str r2, [r3, #0]
htim5.Init.Prescaler = 0;
80018c8: 4b1b ldr r3, [pc, #108] ; (8001938 <MX_TIM5_Init+0x94>)
80018ca: 2200 movs r2, #0
80018cc: 605a str r2, [r3, #4]
htim5.Init.CounterMode = TIM_COUNTERMODE_UP;
80018ce: 4b1a ldr r3, [pc, #104] ; (8001938 <MX_TIM5_Init+0x94>)
80018d0: 2200 movs r2, #0
80018d2: 609a str r2, [r3, #8]
htim5.Init.Period = 4294967295;
80018d4: 4b18 ldr r3, [pc, #96] ; (8001938 <MX_TIM5_Init+0x94>)
80018d6: f04f 32ff mov.w r2, #4294967295
80018da: 60da str r2, [r3, #12]
htim5.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
80018dc: 4b16 ldr r3, [pc, #88] ; (8001938 <MX_TIM5_Init+0x94>)
80018de: 2200 movs r2, #0
80018e0: 611a str r2, [r3, #16]
htim5.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
80018e2: 4b15 ldr r3, [pc, #84] ; (8001938 <MX_TIM5_Init+0x94>)
80018e4: 2200 movs r2, #0
80018e6: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim5) != HAL_OK)
80018e8: 4813 ldr r0, [pc, #76] ; (8001938 <MX_TIM5_Init+0x94>)
80018ea: f009 fb8a bl 800b002 <HAL_TIM_Base_Init>
80018ee: 4603 mov r3, r0
80018f0: 2b00 cmp r3, #0
80018f2: d001 beq.n 80018f8 <MX_TIM5_Init+0x54>
{
Error_Handler();
80018f4: f000 ffe0 bl 80028b8 <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
80018f8: f44f 5380 mov.w r3, #4096 ; 0x1000
80018fc: 613b str r3, [r7, #16]
if (HAL_TIM_ConfigClockSource(&htim5, &sClockSourceConfig) != HAL_OK)
80018fe: f107 0310 add.w r3, r7, #16
8001902: 4619 mov r1, r3
8001904: 480c ldr r0, [pc, #48] ; (8001938 <MX_TIM5_Init+0x94>)
8001906: f009 fe3d bl 800b584 <HAL_TIM_ConfigClockSource>
800190a: 4603 mov r3, r0
800190c: 2b00 cmp r3, #0
800190e: d001 beq.n 8001914 <MX_TIM5_Init+0x70>
{
Error_Handler();
8001910: f000 ffd2 bl 80028b8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
8001914: 2300 movs r3, #0
8001916: 607b str r3, [r7, #4]
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
8001918: 2300 movs r3, #0
800191a: 60fb str r3, [r7, #12]
if (HAL_TIMEx_MasterConfigSynchronization(&htim5, &sMasterConfig) != HAL_OK)
800191c: 1d3b adds r3, r7, #4
800191e: 4619 mov r1, r3
8001920: 4805 ldr r0, [pc, #20] ; (8001938 <MX_TIM5_Init+0x94>)
8001922: f00a fb73 bl 800c00c <HAL_TIMEx_MasterConfigSynchronization>
8001926: 4603 mov r3, r0
8001928: 2b00 cmp r3, #0
800192a: d001 beq.n 8001930 <MX_TIM5_Init+0x8c>
{
Error_Handler();
800192c: f000 ffc4 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN TIM5_Init 2 */
/* USER CODE END TIM5_Init 2 */
}
8001930: bf00 nop
8001932: 3720 adds r7, #32
8001934: 46bd mov sp, r7
8001936: bd80 pop {r7, pc}
8001938: 20008a64 .word 0x20008a64
800193c: 40000c00 .word 0x40000c00
08001940 <MX_TIM8_Init>:
* @brief TIM8 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM8_Init(void)
{
8001940: b580 push {r7, lr}
8001942: b09a sub sp, #104 ; 0x68
8001944: af00 add r7, sp, #0
/* USER CODE BEGIN TIM8_Init 0 */
/* USER CODE END TIM8_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
8001946: f107 0358 add.w r3, r7, #88 ; 0x58
800194a: 2200 movs r2, #0
800194c: 601a str r2, [r3, #0]
800194e: 605a str r2, [r3, #4]
8001950: 609a str r2, [r3, #8]
8001952: 60da str r2, [r3, #12]
TIM_MasterConfigTypeDef sMasterConfig = {0};
8001954: f107 034c add.w r3, r7, #76 ; 0x4c
8001958: 2200 movs r2, #0
800195a: 601a str r2, [r3, #0]
800195c: 605a str r2, [r3, #4]
800195e: 609a str r2, [r3, #8]
TIM_OC_InitTypeDef sConfigOC = {0};
8001960: f107 0330 add.w r3, r7, #48 ; 0x30
8001964: 2200 movs r2, #0
8001966: 601a str r2, [r3, #0]
8001968: 605a str r2, [r3, #4]
800196a: 609a str r2, [r3, #8]
800196c: 60da str r2, [r3, #12]
800196e: 611a str r2, [r3, #16]
8001970: 615a str r2, [r3, #20]
8001972: 619a str r2, [r3, #24]
TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};
8001974: 1d3b adds r3, r7, #4
8001976: 222c movs r2, #44 ; 0x2c
8001978: 2100 movs r1, #0
800197a: 4618 mov r0, r3
800197c: f01b f9b3 bl 801cce6 <memset>
/* USER CODE BEGIN TIM8_Init 1 */
/* USER CODE END TIM8_Init 1 */
htim8.Instance = TIM8;
8001980: 4b42 ldr r3, [pc, #264] ; (8001a8c <MX_TIM8_Init+0x14c>)
8001982: 4a43 ldr r2, [pc, #268] ; (8001a90 <MX_TIM8_Init+0x150>)
8001984: 601a str r2, [r3, #0]
htim8.Init.Prescaler = 0;
8001986: 4b41 ldr r3, [pc, #260] ; (8001a8c <MX_TIM8_Init+0x14c>)
8001988: 2200 movs r2, #0
800198a: 605a str r2, [r3, #4]
htim8.Init.CounterMode = TIM_COUNTERMODE_UP;
800198c: 4b3f ldr r3, [pc, #252] ; (8001a8c <MX_TIM8_Init+0x14c>)
800198e: 2200 movs r2, #0
8001990: 609a str r2, [r3, #8]
htim8.Init.Period = 65535;
8001992: 4b3e ldr r3, [pc, #248] ; (8001a8c <MX_TIM8_Init+0x14c>)
8001994: f64f 72ff movw r2, #65535 ; 0xffff
8001998: 60da str r2, [r3, #12]
htim8.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
800199a: 4b3c ldr r3, [pc, #240] ; (8001a8c <MX_TIM8_Init+0x14c>)
800199c: 2200 movs r2, #0
800199e: 611a str r2, [r3, #16]
htim8.Init.RepetitionCounter = 0;
80019a0: 4b3a ldr r3, [pc, #232] ; (8001a8c <MX_TIM8_Init+0x14c>)
80019a2: 2200 movs r2, #0
80019a4: 615a str r2, [r3, #20]
htim8.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
80019a6: 4b39 ldr r3, [pc, #228] ; (8001a8c <MX_TIM8_Init+0x14c>)
80019a8: 2200 movs r2, #0
80019aa: 619a str r2, [r3, #24]
if (HAL_TIM_Base_Init(&htim8) != HAL_OK)
80019ac: 4837 ldr r0, [pc, #220] ; (8001a8c <MX_TIM8_Init+0x14c>)
80019ae: f009 fb28 bl 800b002 <HAL_TIM_Base_Init>
80019b2: 4603 mov r3, r0
80019b4: 2b00 cmp r3, #0
80019b6: d001 beq.n 80019bc <MX_TIM8_Init+0x7c>
{
Error_Handler();
80019b8: f000 ff7e bl 80028b8 <Error_Handler>
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
80019bc: f44f 5380 mov.w r3, #4096 ; 0x1000
80019c0: 65bb str r3, [r7, #88] ; 0x58
if (HAL_TIM_ConfigClockSource(&htim8, &sClockSourceConfig) != HAL_OK)
80019c2: f107 0358 add.w r3, r7, #88 ; 0x58
80019c6: 4619 mov r1, r3
80019c8: 4830 ldr r0, [pc, #192] ; (8001a8c <MX_TIM8_Init+0x14c>)
80019ca: f009 fddb bl 800b584 <HAL_TIM_ConfigClockSource>
80019ce: 4603 mov r3, r0
80019d0: 2b00 cmp r3, #0
80019d2: d001 beq.n 80019d8 <MX_TIM8_Init+0x98>
{
Error_Handler();
80019d4: f000 ff70 bl 80028b8 <Error_Handler>
}
if (HAL_TIM_PWM_Init(&htim8) != HAL_OK)
80019d8: 482c ldr r0, [pc, #176] ; (8001a8c <MX_TIM8_Init+0x14c>)
80019da: f009 fb67 bl 800b0ac <HAL_TIM_PWM_Init>
80019de: 4603 mov r3, r0
80019e0: 2b00 cmp r3, #0
80019e2: d001 beq.n 80019e8 <MX_TIM8_Init+0xa8>
{
Error_Handler();
80019e4: f000 ff68 bl 80028b8 <Error_Handler>
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
80019e8: 2300 movs r3, #0
80019ea: 64fb str r3, [r7, #76] ; 0x4c
sMasterConfig.MasterOutputTrigger2 = TIM_TRGO2_RESET;
80019ec: 2300 movs r3, #0
80019ee: 653b str r3, [r7, #80] ; 0x50
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
80019f0: 2300 movs r3, #0
80019f2: 657b str r3, [r7, #84] ; 0x54
if (HAL_TIMEx_MasterConfigSynchronization(&htim8, &sMasterConfig) != HAL_OK)
80019f4: f107 034c add.w r3, r7, #76 ; 0x4c
80019f8: 4619 mov r1, r3
80019fa: 4824 ldr r0, [pc, #144] ; (8001a8c <MX_TIM8_Init+0x14c>)
80019fc: f00a fb06 bl 800c00c <HAL_TIMEx_MasterConfigSynchronization>
8001a00: 4603 mov r3, r0
8001a02: 2b00 cmp r3, #0
8001a04: d001 beq.n 8001a0a <MX_TIM8_Init+0xca>
{
Error_Handler();
8001a06: f000 ff57 bl 80028b8 <Error_Handler>
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
8001a0a: 2360 movs r3, #96 ; 0x60
8001a0c: 633b str r3, [r7, #48] ; 0x30
sConfigOC.Pulse = 0;
8001a0e: 2300 movs r3, #0
8001a10: 637b str r3, [r7, #52] ; 0x34
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
8001a12: 2300 movs r3, #0
8001a14: 63bb str r3, [r7, #56] ; 0x38
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
8001a16: 2300 movs r3, #0
8001a18: 643b str r3, [r7, #64] ; 0x40
sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
8001a1a: 2300 movs r3, #0
8001a1c: 647b str r3, [r7, #68] ; 0x44
sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
8001a1e: 2300 movs r3, #0
8001a20: 64bb str r3, [r7, #72] ; 0x48
if (HAL_TIM_PWM_ConfigChannel(&htim8, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
8001a22: f107 0330 add.w r3, r7, #48 ; 0x30
8001a26: 220c movs r2, #12
8001a28: 4619 mov r1, r3
8001a2a: 4818 ldr r0, [pc, #96] ; (8001a8c <MX_TIM8_Init+0x14c>)
8001a2c: f009 fc92 bl 800b354 <HAL_TIM_PWM_ConfigChannel>
8001a30: 4603 mov r3, r0
8001a32: 2b00 cmp r3, #0
8001a34: d001 beq.n 8001a3a <MX_TIM8_Init+0xfa>
{
Error_Handler();
8001a36: f000 ff3f bl 80028b8 <Error_Handler>
}
sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
8001a3a: 2300 movs r3, #0
8001a3c: 607b str r3, [r7, #4]
sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
8001a3e: 2300 movs r3, #0
8001a40: 60bb str r3, [r7, #8]
sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
8001a42: 2300 movs r3, #0
8001a44: 60fb str r3, [r7, #12]
sBreakDeadTimeConfig.DeadTime = 0;
8001a46: 2300 movs r3, #0
8001a48: 613b str r3, [r7, #16]
sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
8001a4a: 2300 movs r3, #0
8001a4c: 617b str r3, [r7, #20]
sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
8001a4e: f44f 5300 mov.w r3, #8192 ; 0x2000
8001a52: 61bb str r3, [r7, #24]
sBreakDeadTimeConfig.BreakFilter = 0;
8001a54: 2300 movs r3, #0
8001a56: 61fb str r3, [r7, #28]
sBreakDeadTimeConfig.Break2State = TIM_BREAK2_DISABLE;
8001a58: 2300 movs r3, #0
8001a5a: 623b str r3, [r7, #32]
sBreakDeadTimeConfig.Break2Polarity = TIM_BREAK2POLARITY_HIGH;
8001a5c: f04f 7300 mov.w r3, #33554432 ; 0x2000000
8001a60: 627b str r3, [r7, #36] ; 0x24
sBreakDeadTimeConfig.Break2Filter = 0;
8001a62: 2300 movs r3, #0
8001a64: 62bb str r3, [r7, #40] ; 0x28
sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE;
8001a66: 2300 movs r3, #0
8001a68: 62fb str r3, [r7, #44] ; 0x2c
if (HAL_TIMEx_ConfigBreakDeadTime(&htim8, &sBreakDeadTimeConfig) != HAL_OK)
8001a6a: 1d3b adds r3, r7, #4
8001a6c: 4619 mov r1, r3
8001a6e: 4807 ldr r0, [pc, #28] ; (8001a8c <MX_TIM8_Init+0x14c>)
8001a70: f00a fb5a bl 800c128 <HAL_TIMEx_ConfigBreakDeadTime>
8001a74: 4603 mov r3, r0
8001a76: 2b00 cmp r3, #0
8001a78: d001 beq.n 8001a7e <MX_TIM8_Init+0x13e>
{
Error_Handler();
8001a7a: f000 ff1d bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN TIM8_Init 2 */
/* USER CODE END TIM8_Init 2 */
HAL_TIM_MspPostInit(&htim8);
8001a7e: 4803 ldr r0, [pc, #12] ; (8001a8c <MX_TIM8_Init+0x14c>)
8001a80: f003 f8fa bl 8004c78 <HAL_TIM_MspPostInit>
}
8001a84: bf00 nop
8001a86: 3768 adds r7, #104 ; 0x68
8001a88: 46bd mov sp, r7
8001a8a: bd80 pop {r7, pc}
8001a8c: 200089ac .word 0x200089ac
8001a90: 40010400 .word 0x40010400
08001a94 <MX_UART7_Init>:
* @brief UART7 Initialization Function
* @param None
* @retval None
*/
static void MX_UART7_Init(void)
{
8001a94: b580 push {r7, lr}
8001a96: af00 add r7, sp, #0
/* USER CODE END UART7_Init 0 */
/* USER CODE BEGIN UART7_Init 1 */
/* USER CODE END UART7_Init 1 */
huart7.Instance = UART7;
8001a98: 4b14 ldr r3, [pc, #80] ; (8001aec <MX_UART7_Init+0x58>)
8001a9a: 4a15 ldr r2, [pc, #84] ; (8001af0 <MX_UART7_Init+0x5c>)
8001a9c: 601a str r2, [r3, #0]
huart7.Init.BaudRate = 115200;
8001a9e: 4b13 ldr r3, [pc, #76] ; (8001aec <MX_UART7_Init+0x58>)
8001aa0: f44f 32e1 mov.w r2, #115200 ; 0x1c200
8001aa4: 605a str r2, [r3, #4]
huart7.Init.WordLength = UART_WORDLENGTH_8B;
8001aa6: 4b11 ldr r3, [pc, #68] ; (8001aec <MX_UART7_Init+0x58>)
8001aa8: 2200 movs r2, #0
8001aaa: 609a str r2, [r3, #8]
huart7.Init.StopBits = UART_STOPBITS_1;
8001aac: 4b0f ldr r3, [pc, #60] ; (8001aec <MX_UART7_Init+0x58>)
8001aae: 2200 movs r2, #0
8001ab0: 60da str r2, [r3, #12]
huart7.Init.Parity = UART_PARITY_NONE;
8001ab2: 4b0e ldr r3, [pc, #56] ; (8001aec <MX_UART7_Init+0x58>)
8001ab4: 2200 movs r2, #0
8001ab6: 611a str r2, [r3, #16]
huart7.Init.Mode = UART_MODE_TX_RX;
8001ab8: 4b0c ldr r3, [pc, #48] ; (8001aec <MX_UART7_Init+0x58>)
8001aba: 220c movs r2, #12
8001abc: 615a str r2, [r3, #20]
huart7.Init.HwFlowCtl = UART_HWCONTROL_NONE;
8001abe: 4b0b ldr r3, [pc, #44] ; (8001aec <MX_UART7_Init+0x58>)
8001ac0: 2200 movs r2, #0
8001ac2: 619a str r2, [r3, #24]
huart7.Init.OverSampling = UART_OVERSAMPLING_16;
8001ac4: 4b09 ldr r3, [pc, #36] ; (8001aec <MX_UART7_Init+0x58>)
8001ac6: 2200 movs r2, #0
8001ac8: 61da str r2, [r3, #28]
huart7.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
8001aca: 4b08 ldr r3, [pc, #32] ; (8001aec <MX_UART7_Init+0x58>)
8001acc: 2200 movs r2, #0
8001ace: 621a str r2, [r3, #32]
huart7.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
8001ad0: 4b06 ldr r3, [pc, #24] ; (8001aec <MX_UART7_Init+0x58>)
8001ad2: 2200 movs r2, #0
8001ad4: 625a str r2, [r3, #36] ; 0x24
if (HAL_UART_Init(&huart7) != HAL_OK)
8001ad6: 4805 ldr r0, [pc, #20] ; (8001aec <MX_UART7_Init+0x58>)
8001ad8: f00a fbc2 bl 800c260 <HAL_UART_Init>
8001adc: 4603 mov r3, r0
8001ade: 2b00 cmp r3, #0
8001ae0: d001 beq.n 8001ae6 <MX_UART7_Init+0x52>
{
Error_Handler();
8001ae2: f000 fee9 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN UART7_Init 2 */
/* USER CODE END UART7_Init 2 */
}
8001ae6: bf00 nop
8001ae8: bd80 pop {r7, pc}
8001aea: bf00 nop
8001aec: 2000892c .word 0x2000892c
8001af0: 40007800 .word 0x40007800
08001af4 <MX_USART1_UART_Init>:
* @brief USART1 Initialization Function
* @param None
* @retval None
*/
static void MX_USART1_UART_Init(void)
{
8001af4: b580 push {r7, lr}
8001af6: 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;
8001af8: 4b14 ldr r3, [pc, #80] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001afa: 4a15 ldr r2, [pc, #84] ; (8001b50 <MX_USART1_UART_Init+0x5c>)
8001afc: 601a str r2, [r3, #0]
huart1.Init.BaudRate = 115200;
8001afe: 4b13 ldr r3, [pc, #76] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b00: f44f 32e1 mov.w r2, #115200 ; 0x1c200
8001b04: 605a str r2, [r3, #4]
huart1.Init.WordLength = UART_WORDLENGTH_8B;
8001b06: 4b11 ldr r3, [pc, #68] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b08: 2200 movs r2, #0
8001b0a: 609a str r2, [r3, #8]
huart1.Init.StopBits = UART_STOPBITS_1;
8001b0c: 4b0f ldr r3, [pc, #60] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b0e: 2200 movs r2, #0
8001b10: 60da str r2, [r3, #12]
huart1.Init.Parity = UART_PARITY_NONE;
8001b12: 4b0e ldr r3, [pc, #56] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b14: 2200 movs r2, #0
8001b16: 611a str r2, [r3, #16]
huart1.Init.Mode = UART_MODE_TX_RX;
8001b18: 4b0c ldr r3, [pc, #48] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b1a: 220c movs r2, #12
8001b1c: 615a str r2, [r3, #20]
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
8001b1e: 4b0b ldr r3, [pc, #44] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b20: 2200 movs r2, #0
8001b22: 619a str r2, [r3, #24]
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
8001b24: 4b09 ldr r3, [pc, #36] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b26: 2200 movs r2, #0
8001b28: 61da str r2, [r3, #28]
huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
8001b2a: 4b08 ldr r3, [pc, #32] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b2c: 2200 movs r2, #0
8001b2e: 621a str r2, [r3, #32]
huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
8001b30: 4b06 ldr r3, [pc, #24] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b32: 2200 movs r2, #0
8001b34: 625a str r2, [r3, #36] ; 0x24
if (HAL_UART_Init(&huart1) != HAL_OK)
8001b36: 4805 ldr r0, [pc, #20] ; (8001b4c <MX_USART1_UART_Init+0x58>)
8001b38: f00a fb92 bl 800c260 <HAL_UART_Init>
8001b3c: 4603 mov r3, r0
8001b3e: 2b00 cmp r3, #0
8001b40: d001 beq.n 8001b46 <MX_USART1_UART_Init+0x52>
{
Error_Handler();
8001b42: f000 feb9 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN USART1_Init 2 */
/* USER CODE END USART1_Init 2 */
}
8001b46: bf00 nop
8001b48: bd80 pop {r7, pc}
8001b4a: bf00 nop
8001b4c: 20008c20 .word 0x20008c20
8001b50: 40011000 .word 0x40011000
08001b54 <MX_USART6_UART_Init>:
* @brief USART6 Initialization Function
* @param None
* @retval None
*/
static void MX_USART6_UART_Init(void)
{
8001b54: b580 push {r7, lr}
8001b56: af00 add r7, sp, #0
/* USER CODE END USART6_Init 0 */
/* USER CODE BEGIN USART6_Init 1 */
/* USER CODE END USART6_Init 1 */
huart6.Instance = USART6;
8001b58: 4b14 ldr r3, [pc, #80] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b5a: 4a15 ldr r2, [pc, #84] ; (8001bb0 <MX_USART6_UART_Init+0x5c>)
8001b5c: 601a str r2, [r3, #0]
huart6.Init.BaudRate = 115200;
8001b5e: 4b13 ldr r3, [pc, #76] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b60: f44f 32e1 mov.w r2, #115200 ; 0x1c200
8001b64: 605a str r2, [r3, #4]
huart6.Init.WordLength = UART_WORDLENGTH_8B;
8001b66: 4b11 ldr r3, [pc, #68] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b68: 2200 movs r2, #0
8001b6a: 609a str r2, [r3, #8]
huart6.Init.StopBits = UART_STOPBITS_1;
8001b6c: 4b0f ldr r3, [pc, #60] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b6e: 2200 movs r2, #0
8001b70: 60da str r2, [r3, #12]
huart6.Init.Parity = UART_PARITY_NONE;
8001b72: 4b0e ldr r3, [pc, #56] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b74: 2200 movs r2, #0
8001b76: 611a str r2, [r3, #16]
huart6.Init.Mode = UART_MODE_TX_RX;
8001b78: 4b0c ldr r3, [pc, #48] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b7a: 220c movs r2, #12
8001b7c: 615a str r2, [r3, #20]
huart6.Init.HwFlowCtl = UART_HWCONTROL_NONE;
8001b7e: 4b0b ldr r3, [pc, #44] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b80: 2200 movs r2, #0
8001b82: 619a str r2, [r3, #24]
huart6.Init.OverSampling = UART_OVERSAMPLING_16;
8001b84: 4b09 ldr r3, [pc, #36] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b86: 2200 movs r2, #0
8001b88: 61da str r2, [r3, #28]
huart6.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
8001b8a: 4b08 ldr r3, [pc, #32] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b8c: 2200 movs r2, #0
8001b8e: 621a str r2, [r3, #32]
huart6.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
8001b90: 4b06 ldr r3, [pc, #24] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b92: 2200 movs r2, #0
8001b94: 625a str r2, [r3, #36] ; 0x24
if (HAL_UART_Init(&huart6) != HAL_OK)
8001b96: 4805 ldr r0, [pc, #20] ; (8001bac <MX_USART6_UART_Init+0x58>)
8001b98: f00a fb62 bl 800c260 <HAL_UART_Init>
8001b9c: 4603 mov r3, r0
8001b9e: 2b00 cmp r3, #0
8001ba0: d001 beq.n 8001ba6 <MX_USART6_UART_Init+0x52>
{
Error_Handler();
8001ba2: f000 fe89 bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN USART6_Init 2 */
/* USER CODE END USART6_Init 2 */
}
8001ba6: bf00 nop
8001ba8: bd80 pop {r7, pc}
8001baa: bf00 nop
8001bac: 20008d30 .word 0x20008d30
8001bb0: 40011400 .word 0x40011400
08001bb4 <MX_FMC_Init>:
/* FMC initialization function */
static void MX_FMC_Init(void)
{
8001bb4: b580 push {r7, lr}
8001bb6: b088 sub sp, #32
8001bb8: af00 add r7, sp, #0
/* USER CODE BEGIN FMC_Init 0 */
/* USER CODE END FMC_Init 0 */
FMC_SDRAM_TimingTypeDef SdramTiming = {0};
8001bba: 1d3b adds r3, r7, #4
8001bbc: 2200 movs r2, #0
8001bbe: 601a str r2, [r3, #0]
8001bc0: 605a str r2, [r3, #4]
8001bc2: 609a str r2, [r3, #8]
8001bc4: 60da str r2, [r3, #12]
8001bc6: 611a str r2, [r3, #16]
8001bc8: 615a str r2, [r3, #20]
8001bca: 619a str r2, [r3, #24]
/* USER CODE END FMC_Init 1 */
/** Perform the SDRAM1 memory initialization sequence
*/
hsdram1.Instance = FMC_SDRAM_DEVICE;
8001bcc: 4b1e ldr r3, [pc, #120] ; (8001c48 <MX_FMC_Init+0x94>)
8001bce: 4a1f ldr r2, [pc, #124] ; (8001c4c <MX_FMC_Init+0x98>)
8001bd0: 601a str r2, [r3, #0]
/* hsdram1.Init */
hsdram1.Init.SDBank = FMC_SDRAM_BANK1;
8001bd2: 4b1d ldr r3, [pc, #116] ; (8001c48 <MX_FMC_Init+0x94>)
8001bd4: 2200 movs r2, #0
8001bd6: 605a str r2, [r3, #4]
hsdram1.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;
8001bd8: 4b1b ldr r3, [pc, #108] ; (8001c48 <MX_FMC_Init+0x94>)
8001bda: 2200 movs r2, #0
8001bdc: 609a str r2, [r3, #8]
hsdram1.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
8001bde: 4b1a ldr r3, [pc, #104] ; (8001c48 <MX_FMC_Init+0x94>)
8001be0: 2204 movs r2, #4
8001be2: 60da str r2, [r3, #12]
hsdram1.Init.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_16;
8001be4: 4b18 ldr r3, [pc, #96] ; (8001c48 <MX_FMC_Init+0x94>)
8001be6: 2210 movs r2, #16
8001be8: 611a str r2, [r3, #16]
hsdram1.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
8001bea: 4b17 ldr r3, [pc, #92] ; (8001c48 <MX_FMC_Init+0x94>)
8001bec: 2240 movs r2, #64 ; 0x40
8001bee: 615a str r2, [r3, #20]
hsdram1.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_1;
8001bf0: 4b15 ldr r3, [pc, #84] ; (8001c48 <MX_FMC_Init+0x94>)
8001bf2: 2280 movs r2, #128 ; 0x80
8001bf4: 619a str r2, [r3, #24]
hsdram1.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
8001bf6: 4b14 ldr r3, [pc, #80] ; (8001c48 <MX_FMC_Init+0x94>)
8001bf8: 2200 movs r2, #0
8001bfa: 61da str r2, [r3, #28]
hsdram1.Init.SDClockPeriod = FMC_SDRAM_CLOCK_DISABLE;
8001bfc: 4b12 ldr r3, [pc, #72] ; (8001c48 <MX_FMC_Init+0x94>)
8001bfe: 2200 movs r2, #0
8001c00: 621a str r2, [r3, #32]
hsdram1.Init.ReadBurst = FMC_SDRAM_RBURST_DISABLE;
8001c02: 4b11 ldr r3, [pc, #68] ; (8001c48 <MX_FMC_Init+0x94>)
8001c04: 2200 movs r2, #0
8001c06: 625a str r2, [r3, #36] ; 0x24
hsdram1.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0;
8001c08: 4b0f ldr r3, [pc, #60] ; (8001c48 <MX_FMC_Init+0x94>)
8001c0a: 2200 movs r2, #0
8001c0c: 629a str r2, [r3, #40] ; 0x28
/* SdramTiming */
SdramTiming.LoadToActiveDelay = 16;
8001c0e: 2310 movs r3, #16
8001c10: 607b str r3, [r7, #4]
SdramTiming.ExitSelfRefreshDelay = 16;
8001c12: 2310 movs r3, #16
8001c14: 60bb str r3, [r7, #8]
SdramTiming.SelfRefreshTime = 16;
8001c16: 2310 movs r3, #16
8001c18: 60fb str r3, [r7, #12]
SdramTiming.RowCycleDelay = 16;
8001c1a: 2310 movs r3, #16
8001c1c: 613b str r3, [r7, #16]
SdramTiming.WriteRecoveryTime = 16;
8001c1e: 2310 movs r3, #16
8001c20: 617b str r3, [r7, #20]
SdramTiming.RPDelay = 16;
8001c22: 2310 movs r3, #16
8001c24: 61bb str r3, [r7, #24]
SdramTiming.RCDDelay = 16;
8001c26: 2310 movs r3, #16
8001c28: 61fb str r3, [r7, #28]
if (HAL_SDRAM_Init(&hsdram1, &SdramTiming) != HAL_OK)
8001c2a: 1d3b adds r3, r7, #4
8001c2c: 4619 mov r1, r3
8001c2e: 4806 ldr r0, [pc, #24] ; (8001c48 <MX_FMC_Init+0x94>)
8001c30: f009 f8d6 bl 800ade0 <HAL_SDRAM_Init>
8001c34: 4603 mov r3, r0
8001c36: 2b00 cmp r3, #0
8001c38: d001 beq.n 8001c3e <MX_FMC_Init+0x8a>
{
Error_Handler( );
8001c3a: f000 fe3d bl 80028b8 <Error_Handler>
}
/* USER CODE BEGIN FMC_Init 2 */
/* USER CODE END FMC_Init 2 */
}
8001c3e: bf00 nop
8001c40: 3720 adds r7, #32
8001c42: 46bd mov sp, r7
8001c44: bd80 pop {r7, pc}
8001c46: bf00 nop
8001c48: 20008e38 .word 0x20008e38
8001c4c: a0000140 .word 0xa0000140
08001c50 <MX_GPIO_Init>:
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
8001c50: b580 push {r7, lr}
8001c52: b090 sub sp, #64 ; 0x40
8001c54: af00 add r7, sp, #0
GPIO_InitTypeDef GPIO_InitStruct = {0};
8001c56: f107 032c add.w r3, r7, #44 ; 0x2c
8001c5a: 2200 movs r2, #0
8001c5c: 601a str r2, [r3, #0]
8001c5e: 605a str r2, [r3, #4]
8001c60: 609a str r2, [r3, #8]
8001c62: 60da str r2, [r3, #12]
8001c64: 611a str r2, [r3, #16]
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOE_CLK_ENABLE();
8001c66: 4bb0 ldr r3, [pc, #704] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001c68: 6b1b ldr r3, [r3, #48] ; 0x30
8001c6a: 4aaf ldr r2, [pc, #700] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001c6c: f043 0310 orr.w r3, r3, #16
8001c70: 6313 str r3, [r2, #48] ; 0x30
8001c72: 4bad ldr r3, [pc, #692] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001c74: 6b1b ldr r3, [r3, #48] ; 0x30
8001c76: f003 0310 and.w r3, r3, #16
8001c7a: 62bb str r3, [r7, #40] ; 0x28
8001c7c: 6abb ldr r3, [r7, #40] ; 0x28
__HAL_RCC_GPIOG_CLK_ENABLE();
8001c7e: 4baa ldr r3, [pc, #680] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001c80: 6b1b ldr r3, [r3, #48] ; 0x30
8001c82: 4aa9 ldr r2, [pc, #676] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001c84: f043 0340 orr.w r3, r3, #64 ; 0x40
8001c88: 6313 str r3, [r2, #48] ; 0x30
8001c8a: 4ba7 ldr r3, [pc, #668] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001c8c: 6b1b ldr r3, [r3, #48] ; 0x30
8001c8e: f003 0340 and.w r3, r3, #64 ; 0x40
8001c92: 627b str r3, [r7, #36] ; 0x24
8001c94: 6a7b ldr r3, [r7, #36] ; 0x24
__HAL_RCC_GPIOB_CLK_ENABLE();
8001c96: 4ba4 ldr r3, [pc, #656] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001c98: 6b1b ldr r3, [r3, #48] ; 0x30
8001c9a: 4aa3 ldr r2, [pc, #652] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001c9c: f043 0302 orr.w r3, r3, #2
8001ca0: 6313 str r3, [r2, #48] ; 0x30
8001ca2: 4ba1 ldr r3, [pc, #644] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001ca4: 6b1b ldr r3, [r3, #48] ; 0x30
8001ca6: f003 0302 and.w r3, r3, #2
8001caa: 623b str r3, [r7, #32]
8001cac: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOA_CLK_ENABLE();
8001cae: 4b9e ldr r3, [pc, #632] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001cb0: 6b1b ldr r3, [r3, #48] ; 0x30
8001cb2: 4a9d ldr r2, [pc, #628] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001cb4: f043 0301 orr.w r3, r3, #1
8001cb8: 6313 str r3, [r2, #48] ; 0x30
8001cba: 4b9b ldr r3, [pc, #620] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001cbc: 6b1b ldr r3, [r3, #48] ; 0x30
8001cbe: f003 0301 and.w r3, r3, #1
8001cc2: 61fb str r3, [r7, #28]
8001cc4: 69fb ldr r3, [r7, #28]
__HAL_RCC_GPIOJ_CLK_ENABLE();
8001cc6: 4b98 ldr r3, [pc, #608] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001cc8: 6b1b ldr r3, [r3, #48] ; 0x30
8001cca: 4a97 ldr r2, [pc, #604] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001ccc: f443 7300 orr.w r3, r3, #512 ; 0x200
8001cd0: 6313 str r3, [r2, #48] ; 0x30
8001cd2: 4b95 ldr r3, [pc, #596] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001cd4: 6b1b ldr r3, [r3, #48] ; 0x30
8001cd6: f403 7300 and.w r3, r3, #512 ; 0x200
8001cda: 61bb str r3, [r7, #24]
8001cdc: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOD_CLK_ENABLE();
8001cde: 4b92 ldr r3, [pc, #584] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001ce0: 6b1b ldr r3, [r3, #48] ; 0x30
8001ce2: 4a91 ldr r2, [pc, #580] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001ce4: f043 0308 orr.w r3, r3, #8
8001ce8: 6313 str r3, [r2, #48] ; 0x30
8001cea: 4b8f ldr r3, [pc, #572] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001cec: 6b1b ldr r3, [r3, #48] ; 0x30
8001cee: f003 0308 and.w r3, r3, #8
8001cf2: 617b str r3, [r7, #20]
8001cf4: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOI_CLK_ENABLE();
8001cf6: 4b8c ldr r3, [pc, #560] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001cf8: 6b1b ldr r3, [r3, #48] ; 0x30
8001cfa: 4a8b ldr r2, [pc, #556] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001cfc: f443 7380 orr.w r3, r3, #256 ; 0x100
8001d00: 6313 str r3, [r2, #48] ; 0x30
8001d02: 4b89 ldr r3, [pc, #548] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d04: 6b1b ldr r3, [r3, #48] ; 0x30
8001d06: f403 7380 and.w r3, r3, #256 ; 0x100
8001d0a: 613b str r3, [r7, #16]
8001d0c: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOK_CLK_ENABLE();
8001d0e: 4b86 ldr r3, [pc, #536] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d10: 6b1b ldr r3, [r3, #48] ; 0x30
8001d12: 4a85 ldr r2, [pc, #532] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d14: f443 6380 orr.w r3, r3, #1024 ; 0x400
8001d18: 6313 str r3, [r2, #48] ; 0x30
8001d1a: 4b83 ldr r3, [pc, #524] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d1c: 6b1b ldr r3, [r3, #48] ; 0x30
8001d1e: f403 6380 and.w r3, r3, #1024 ; 0x400
8001d22: 60fb str r3, [r7, #12]
8001d24: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOC_CLK_ENABLE();
8001d26: 4b80 ldr r3, [pc, #512] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d28: 6b1b ldr r3, [r3, #48] ; 0x30
8001d2a: 4a7f ldr r2, [pc, #508] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d2c: f043 0304 orr.w r3, r3, #4
8001d30: 6313 str r3, [r2, #48] ; 0x30
8001d32: 4b7d ldr r3, [pc, #500] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d34: 6b1b ldr r3, [r3, #48] ; 0x30
8001d36: f003 0304 and.w r3, r3, #4
8001d3a: 60bb str r3, [r7, #8]
8001d3c: 68bb ldr r3, [r7, #8]
__HAL_RCC_GPIOF_CLK_ENABLE();
8001d3e: 4b7a ldr r3, [pc, #488] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d40: 6b1b ldr r3, [r3, #48] ; 0x30
8001d42: 4a79 ldr r2, [pc, #484] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d44: f043 0320 orr.w r3, r3, #32
8001d48: 6313 str r3, [r2, #48] ; 0x30
8001d4a: 4b77 ldr r3, [pc, #476] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d4c: 6b1b ldr r3, [r3, #48] ; 0x30
8001d4e: f003 0320 and.w r3, r3, #32
8001d52: 607b str r3, [r7, #4]
8001d54: 687b ldr r3, [r7, #4]
__HAL_RCC_GPIOH_CLK_ENABLE();
8001d56: 4b74 ldr r3, [pc, #464] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d58: 6b1b ldr r3, [r3, #48] ; 0x30
8001d5a: 4a73 ldr r2, [pc, #460] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d5c: f043 0380 orr.w r3, r3, #128 ; 0x80
8001d60: 6313 str r3, [r2, #48] ; 0x30
8001d62: 4b71 ldr r3, [pc, #452] ; (8001f28 <MX_GPIO_Init+0x2d8>)
8001d64: 6b1b ldr r3, [r3, #48] ; 0x30
8001d66: f003 0380 and.w r3, r3, #128 ; 0x80
8001d6a: 603b str r3, [r7, #0]
8001d6c: 683b ldr r3, [r7, #0]
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOE, LED14_Pin|LED15_Pin, GPIO_PIN_RESET);
8001d6e: 2200 movs r2, #0
8001d70: 2160 movs r1, #96 ; 0x60
8001d72: 486e ldr r0, [pc, #440] ; (8001f2c <MX_GPIO_Init+0x2dc>)
8001d74: f006 fa10 bl 8008198 <HAL_GPIO_WritePin>
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(OTG_FS_PowerSwitchOn_GPIO_Port, OTG_FS_PowerSwitchOn_Pin, GPIO_PIN_SET);
8001d78: 2201 movs r2, #1
8001d7a: 2120 movs r1, #32
8001d7c: 486c ldr r0, [pc, #432] ; (8001f30 <MX_GPIO_Init+0x2e0>)
8001d7e: f006 fa0b bl 8008198 <HAL_GPIO_WritePin>
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LED16_GPIO_Port, LED16_Pin, GPIO_PIN_RESET);
8001d82: 2200 movs r2, #0
8001d84: 2108 movs r1, #8
8001d86: 486a ldr r0, [pc, #424] ; (8001f30 <MX_GPIO_Init+0x2e0>)
8001d88: f006 fa06 bl 8008198 <HAL_GPIO_WritePin>
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LED3_GPIO_Port, LED3_Pin, GPIO_PIN_RESET);
8001d8c: 2200 movs r2, #0
8001d8e: 2108 movs r1, #8
8001d90: 4868 ldr r0, [pc, #416] ; (8001f34 <MX_GPIO_Init+0x2e4>)
8001d92: f006 fa01 bl 8008198 <HAL_GPIO_WritePin>
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LCD_BL_CTRL_GPIO_Port, LCD_BL_CTRL_Pin, GPIO_PIN_SET);
8001d96: 2201 movs r2, #1
8001d98: 2108 movs r1, #8
8001d9a: 4867 ldr r0, [pc, #412] ; (8001f38 <MX_GPIO_Init+0x2e8>)
8001d9c: f006 f9fc bl 8008198 <HAL_GPIO_WritePin>
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LCD_DISP_GPIO_Port, LCD_DISP_Pin, GPIO_PIN_SET);
8001da0: 2201 movs r2, #1
8001da2: f44f 5180 mov.w r1, #4096 ; 0x1000
8001da6: 4863 ldr r0, [pc, #396] ; (8001f34 <MX_GPIO_Init+0x2e4>)
8001da8: f006 f9f6 bl 8008198 <HAL_GPIO_WritePin>
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOH, LED13_Pin|LED17_Pin|LED11_Pin|LED12_Pin
8001dac: 2200 movs r2, #0
8001dae: f645 6140 movw r1, #24128 ; 0x5e40
8001db2: 4862 ldr r0, [pc, #392] ; (8001f3c <MX_GPIO_Init+0x2ec>)
8001db4: f006 f9f0 bl 8008198 <HAL_GPIO_WritePin>
|LED2_Pin|LED18_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(EXT_RST_GPIO_Port, EXT_RST_Pin, GPIO_PIN_RESET);
8001db8: 2200 movs r2, #0
8001dba: 2108 movs r1, #8
8001dbc: 4860 ldr r0, [pc, #384] ; (8001f40 <MX_GPIO_Init+0x2f0>)
8001dbe: f006 f9eb bl 8008198 <HAL_GPIO_WritePin>
/*Configure GPIO pin : PE3 */
GPIO_InitStruct.Pin = GPIO_PIN_3;
8001dc2: 2308 movs r3, #8
8001dc4: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001dc6: 2300 movs r3, #0
8001dc8: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001dca: 2300 movs r3, #0
8001dcc: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
8001dce: f107 032c add.w r3, r7, #44 ; 0x2c
8001dd2: 4619 mov r1, r3
8001dd4: 4855 ldr r0, [pc, #340] ; (8001f2c <MX_GPIO_Init+0x2dc>)
8001dd6: f005 ff13 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : ULPI_D7_Pin ULPI_D6_Pin ULPI_D5_Pin ULPI_D2_Pin
ULPI_D1_Pin ULPI_D4_Pin */
GPIO_InitStruct.Pin = ULPI_D7_Pin|ULPI_D6_Pin|ULPI_D5_Pin|ULPI_D2_Pin
8001dda: f643 0323 movw r3, #14371 ; 0x3823
8001dde: 62fb str r3, [r7, #44] ; 0x2c
|ULPI_D1_Pin|ULPI_D4_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8001de0: 2302 movs r3, #2
8001de2: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001de4: 2300 movs r3, #0
8001de6: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8001de8: 2303 movs r3, #3
8001dea: 63bb str r3, [r7, #56] ; 0x38
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
8001dec: 230a movs r3, #10
8001dee: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8001df0: f107 032c add.w r3, r7, #44 ; 0x2c
8001df4: 4619 mov r1, r3
8001df6: 4853 ldr r0, [pc, #332] ; (8001f44 <MX_GPIO_Init+0x2f4>)
8001df8: f005 ff02 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : BP2_Pin BP1_Pin */
GPIO_InitStruct.Pin = BP2_Pin|BP1_Pin;
8001dfc: f44f 4301 mov.w r3, #33024 ; 0x8100
8001e00: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001e02: 2300 movs r3, #0
8001e04: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001e06: 2300 movs r3, #0
8001e08: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8001e0a: f107 032c add.w r3, r7, #44 ; 0x2c
8001e0e: 4619 mov r1, r3
8001e10: 484d ldr r0, [pc, #308] ; (8001f48 <MX_GPIO_Init+0x2f8>)
8001e12: f005 fef5 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : LED14_Pin LED15_Pin */
GPIO_InitStruct.Pin = LED14_Pin|LED15_Pin;
8001e16: 2360 movs r3, #96 ; 0x60
8001e18: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
8001e1a: 2301 movs r3, #1
8001e1c: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001e1e: 2300 movs r3, #0
8001e20: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001e22: 2300 movs r3, #0
8001e24: 63bb str r3, [r7, #56] ; 0x38
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
8001e26: f107 032c add.w r3, r7, #44 ; 0x2c
8001e2a: 4619 mov r1, r3
8001e2c: 483f ldr r0, [pc, #252] ; (8001f2c <MX_GPIO_Init+0x2dc>)
8001e2e: f005 fee7 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pin : OTG_FS_VBUS_Pin */
GPIO_InitStruct.Pin = OTG_FS_VBUS_Pin;
8001e32: f44f 5380 mov.w r3, #4096 ; 0x1000
8001e36: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001e38: 2300 movs r3, #0
8001e3a: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001e3c: 2300 movs r3, #0
8001e3e: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(OTG_FS_VBUS_GPIO_Port, &GPIO_InitStruct);
8001e40: f107 032c add.w r3, r7, #44 ; 0x2c
8001e44: 4619 mov r1, r3
8001e46: 4841 ldr r0, [pc, #260] ; (8001f4c <MX_GPIO_Init+0x2fc>)
8001e48: f005 feda bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pin : Audio_INT_Pin */
GPIO_InitStruct.Pin = Audio_INT_Pin;
8001e4c: 2340 movs r3, #64 ; 0x40
8001e4e: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_EVT_RISING;
8001e50: 4b3f ldr r3, [pc, #252] ; (8001f50 <MX_GPIO_Init+0x300>)
8001e52: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001e54: 2300 movs r3, #0
8001e56: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(Audio_INT_GPIO_Port, &GPIO_InitStruct);
8001e58: f107 032c add.w r3, r7, #44 ; 0x2c
8001e5c: 4619 mov r1, r3
8001e5e: 4834 ldr r0, [pc, #208] ; (8001f30 <MX_GPIO_Init+0x2e0>)
8001e60: f005 fece bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : OTG_FS_PowerSwitchOn_Pin LED16_Pin */
GPIO_InitStruct.Pin = OTG_FS_PowerSwitchOn_Pin|LED16_Pin;
8001e64: 2328 movs r3, #40 ; 0x28
8001e66: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
8001e68: 2301 movs r3, #1
8001e6a: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001e6c: 2300 movs r3, #0
8001e6e: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001e70: 2300 movs r3, #0
8001e72: 63bb str r3, [r7, #56] ; 0x38
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
8001e74: f107 032c add.w r3, r7, #44 ; 0x2c
8001e78: 4619 mov r1, r3
8001e7a: 482d ldr r0, [pc, #180] ; (8001f30 <MX_GPIO_Init+0x2e0>)
8001e7c: f005 fec0 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : LED3_Pin LCD_DISP_Pin */
GPIO_InitStruct.Pin = LED3_Pin|LCD_DISP_Pin;
8001e80: f241 0308 movw r3, #4104 ; 0x1008
8001e84: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
8001e86: 2301 movs r3, #1
8001e88: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001e8a: 2300 movs r3, #0
8001e8c: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001e8e: 2300 movs r3, #0
8001e90: 63bb str r3, [r7, #56] ; 0x38
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
8001e92: f107 032c add.w r3, r7, #44 ; 0x2c
8001e96: 4619 mov r1, r3
8001e98: 4826 ldr r0, [pc, #152] ; (8001f34 <MX_GPIO_Init+0x2e4>)
8001e9a: f005 feb1 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pin : uSD_Detect_Pin */
GPIO_InitStruct.Pin = uSD_Detect_Pin;
8001e9e: f44f 5300 mov.w r3, #8192 ; 0x2000
8001ea2: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001ea4: 2300 movs r3, #0
8001ea6: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001ea8: 2300 movs r3, #0
8001eaa: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(uSD_Detect_GPIO_Port, &GPIO_InitStruct);
8001eac: f107 032c add.w r3, r7, #44 ; 0x2c
8001eb0: 4619 mov r1, r3
8001eb2: 4828 ldr r0, [pc, #160] ; (8001f54 <MX_GPIO_Init+0x304>)
8001eb4: f005 fea4 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pin : LCD_BL_CTRL_Pin */
GPIO_InitStruct.Pin = LCD_BL_CTRL_Pin;
8001eb8: 2308 movs r3, #8
8001eba: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
8001ebc: 2301 movs r3, #1
8001ebe: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001ec0: 2300 movs r3, #0
8001ec2: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001ec4: 2300 movs r3, #0
8001ec6: 63bb str r3, [r7, #56] ; 0x38
HAL_GPIO_Init(LCD_BL_CTRL_GPIO_Port, &GPIO_InitStruct);
8001ec8: f107 032c add.w r3, r7, #44 ; 0x2c
8001ecc: 4619 mov r1, r3
8001ece: 481a ldr r0, [pc, #104] ; (8001f38 <MX_GPIO_Init+0x2e8>)
8001ed0: f005 fe96 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pin : OTG_FS_OverCurrent_Pin */
GPIO_InitStruct.Pin = OTG_FS_OverCurrent_Pin;
8001ed4: 2310 movs r3, #16
8001ed6: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001ed8: 2300 movs r3, #0
8001eda: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001edc: 2300 movs r3, #0
8001ede: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(OTG_FS_OverCurrent_GPIO_Port, &GPIO_InitStruct);
8001ee0: f107 032c add.w r3, r7, #44 ; 0x2c
8001ee4: 4619 mov r1, r3
8001ee6: 4812 ldr r0, [pc, #72] ; (8001f30 <MX_GPIO_Init+0x2e0>)
8001ee8: f005 fe8a bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : TP3_Pin NC2_Pin */
GPIO_InitStruct.Pin = TP3_Pin|NC2_Pin;
8001eec: f248 0304 movw r3, #32772 ; 0x8004
8001ef0: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001ef2: 2300 movs r3, #0
8001ef4: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001ef6: 2300 movs r3, #0
8001ef8: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
8001efa: f107 032c add.w r3, r7, #44 ; 0x2c
8001efe: 4619 mov r1, r3
8001f00: 480e ldr r0, [pc, #56] ; (8001f3c <MX_GPIO_Init+0x2ec>)
8001f02: f005 fe7d bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : LED13_Pin LED17_Pin LED11_Pin LED12_Pin
LED2_Pin LED18_Pin */
GPIO_InitStruct.Pin = LED13_Pin|LED17_Pin|LED11_Pin|LED12_Pin
8001f06: f645 6340 movw r3, #24128 ; 0x5e40
8001f0a: 62fb str r3, [r7, #44] ; 0x2c
|LED2_Pin|LED18_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
8001f0c: 2301 movs r3, #1
8001f0e: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001f10: 2300 movs r3, #0
8001f12: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001f14: 2300 movs r3, #0
8001f16: 63bb str r3, [r7, #56] ; 0x38
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
8001f18: f107 032c add.w r3, r7, #44 ; 0x2c
8001f1c: 4619 mov r1, r3
8001f1e: 4807 ldr r0, [pc, #28] ; (8001f3c <MX_GPIO_Init+0x2ec>)
8001f20: f005 fe6e bl 8007c00 <HAL_GPIO_Init>
8001f24: e018 b.n 8001f58 <MX_GPIO_Init+0x308>
8001f26: bf00 nop
8001f28: 40023800 .word 0x40023800
8001f2c: 40021000 .word 0x40021000
8001f30: 40020c00 .word 0x40020c00
8001f34: 40022000 .word 0x40022000
8001f38: 40022800 .word 0x40022800
8001f3c: 40021c00 .word 0x40021c00
8001f40: 40021800 .word 0x40021800
8001f44: 40020400 .word 0x40020400
8001f48: 40020000 .word 0x40020000
8001f4c: 40022400 .word 0x40022400
8001f50: 10120000 .word 0x10120000
8001f54: 40020800 .word 0x40020800
/*Configure GPIO pin : LCD_INT_Pin */
GPIO_InitStruct.Pin = LCD_INT_Pin;
8001f58: f44f 5300 mov.w r3, #8192 ; 0x2000
8001f5c: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_EVT_RISING;
8001f5e: 4b2c ldr r3, [pc, #176] ; (8002010 <MX_GPIO_Init+0x3c0>)
8001f60: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001f62: 2300 movs r3, #0
8001f64: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(LCD_INT_GPIO_Port, &GPIO_InitStruct);
8001f66: f107 032c add.w r3, r7, #44 ; 0x2c
8001f6a: 4619 mov r1, r3
8001f6c: 4829 ldr r0, [pc, #164] ; (8002014 <MX_GPIO_Init+0x3c4>)
8001f6e: f005 fe47 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pin : ULPI_NXT_Pin */
GPIO_InitStruct.Pin = ULPI_NXT_Pin;
8001f72: 2310 movs r3, #16
8001f74: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8001f76: 2302 movs r3, #2
8001f78: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001f7a: 2300 movs r3, #0
8001f7c: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8001f7e: 2303 movs r3, #3
8001f80: 63bb str r3, [r7, #56] ; 0x38
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
8001f82: 230a movs r3, #10
8001f84: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(ULPI_NXT_GPIO_Port, &GPIO_InitStruct);
8001f86: f107 032c add.w r3, r7, #44 ; 0x2c
8001f8a: 4619 mov r1, r3
8001f8c: 4822 ldr r0, [pc, #136] ; (8002018 <MX_GPIO_Init+0x3c8>)
8001f8e: f005 fe37 bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : BP_JOYSTICK_Pin RMII_RXER_Pin */
GPIO_InitStruct.Pin = BP_JOYSTICK_Pin|RMII_RXER_Pin;
8001f92: 2384 movs r3, #132 ; 0x84
8001f94: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
8001f96: 2300 movs r3, #0
8001f98: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001f9a: 2300 movs r3, #0
8001f9c: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
8001f9e: f107 032c add.w r3, r7, #44 ; 0x2c
8001fa2: 4619 mov r1, r3
8001fa4: 481d ldr r0, [pc, #116] ; (800201c <MX_GPIO_Init+0x3cc>)
8001fa6: f005 fe2b bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : ULPI_STP_Pin ULPI_DIR_Pin */
GPIO_InitStruct.Pin = ULPI_STP_Pin|ULPI_DIR_Pin;
8001faa: 2305 movs r3, #5
8001fac: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8001fae: 2302 movs r3, #2
8001fb0: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001fb2: 2300 movs r3, #0
8001fb4: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8001fb6: 2303 movs r3, #3
8001fb8: 63bb str r3, [r7, #56] ; 0x38
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
8001fba: 230a movs r3, #10
8001fbc: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8001fbe: f107 032c add.w r3, r7, #44 ; 0x2c
8001fc2: 4619 mov r1, r3
8001fc4: 4816 ldr r0, [pc, #88] ; (8002020 <MX_GPIO_Init+0x3d0>)
8001fc6: f005 fe1b bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pin : EXT_RST_Pin */
GPIO_InitStruct.Pin = EXT_RST_Pin;
8001fca: 2308 movs r3, #8
8001fcc: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
8001fce: 2301 movs r3, #1
8001fd0: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001fd2: 2300 movs r3, #0
8001fd4: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8001fd6: 2300 movs r3, #0
8001fd8: 63bb str r3, [r7, #56] ; 0x38
HAL_GPIO_Init(EXT_RST_GPIO_Port, &GPIO_InitStruct);
8001fda: f107 032c add.w r3, r7, #44 ; 0x2c
8001fde: 4619 mov r1, r3
8001fe0: 480e ldr r0, [pc, #56] ; (800201c <MX_GPIO_Init+0x3cc>)
8001fe2: f005 fe0d bl 8007c00 <HAL_GPIO_Init>
/*Configure GPIO pins : ULPI_CLK_Pin ULPI_D0_Pin */
GPIO_InitStruct.Pin = ULPI_CLK_Pin|ULPI_D0_Pin;
8001fe6: 2328 movs r3, #40 ; 0x28
8001fe8: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8001fea: 2302 movs r3, #2
8001fec: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Pull = GPIO_NOPULL;
8001fee: 2300 movs r3, #0
8001ff0: 637b str r3, [r7, #52] ; 0x34
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8001ff2: 2303 movs r3, #3
8001ff4: 63bb str r3, [r7, #56] ; 0x38
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
8001ff6: 230a movs r3, #10
8001ff8: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8001ffa: f107 032c add.w r3, r7, #44 ; 0x2c
8001ffe: 4619 mov r1, r3
8002000: 4808 ldr r0, [pc, #32] ; (8002024 <MX_GPIO_Init+0x3d4>)
8002002: f005 fdfd bl 8007c00 <HAL_GPIO_Init>
}
8002006: bf00 nop
8002008: 3740 adds r7, #64 ; 0x40
800200a: 46bd mov sp, r7
800200c: bd80 pop {r7, pc}
800200e: bf00 nop
8002010: 10120000 .word 0x10120000
8002014: 40022000 .word 0x40022000
8002018: 40021c00 .word 0x40021c00
800201c: 40021800 .word 0x40021800
8002020: 40020800 .word 0x40020800
8002024: 40020000 .word 0x40020000
08002028 <f_GameMaster>:
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_f_GameMaster */
void f_GameMaster(void const * argument)
{
8002028: b580 push {r7, lr}
800202a: b086 sub sp, #24
800202c: af00 add r7, sp, #0
800202e: 6078 str r0, [r7, #4]
/* init code for LWIP */
MX_LWIP_Init();
8002030: f00a fe80 bl 800cd34 <MX_LWIP_Init>
/* USER CODE BEGIN 5 */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
8002034: 230a movs r3, #10
8002036: 617b str r3, [r7, #20]
// Si la variable end est à 1, le jeu s'arrete.
uint8_t end = 0;
8002038: 2300 movs r3, #0
800203a: 73fb strb r3, [r7, #15]
/* Infinite loop */
for (;;)
{
xQueueReceive(Queue_FHandle, &end, 0);
800203c: 4b1b ldr r3, [pc, #108] ; (80020ac <f_GameMaster+0x84>)
800203e: 681b ldr r3, [r3, #0]
8002040: f107 010f add.w r1, r7, #15
8002044: 2200 movs r2, #0
8002046: 4618 mov r0, r3
8002048: f00c faae bl 800e5a8 <xQueueReceive>
if (end == 1){
800204c: 7bfb ldrb r3, [r7, #15]
800204e: 2b01 cmp r3, #1
8002050: d10e bne.n 8002070 <f_GameMaster+0x48>
vTaskDelete(Block_EnemieHandle);
8002052: 4b17 ldr r3, [pc, #92] ; (80020b0 <f_GameMaster+0x88>)
8002054: 681b ldr r3, [r3, #0]
8002056: 4618 mov r0, r3
8002058: f00c ffe6 bl 800f028 <vTaskDelete>
vTaskDelete(ProjectileHandle);
800205c: 4b15 ldr r3, [pc, #84] ; (80020b4 <f_GameMaster+0x8c>)
800205e: 681b ldr r3, [r3, #0]
8002060: 4618 mov r0, r3
8002062: f00c ffe1 bl 800f028 <vTaskDelete>
vTaskDelete(Joueur_1Handle);
8002066: 4b14 ldr r3, [pc, #80] ; (80020b8 <f_GameMaster+0x90>)
8002068: 681b ldr r3, [r3, #0]
800206a: 4618 mov r0, r3
800206c: f00c ffdc bl 800f028 <vTaskDelete>
//TODO L'affichage de l'écran de fin et des scores
}
if (end == 0){
8002070: 7bfb ldrb r3, [r7, #15]
8002072: 2b00 cmp r3, #0
8002074: d112 bne.n 800209c <f_GameMaster+0x74>
if (waves_left == 0){
8002076: 4b11 ldr r3, [pc, #68] ; (80020bc <f_GameMaster+0x94>)
8002078: 781b ldrb r3, [r3, #0]
800207a: 2b00 cmp r3, #0
800207c: d10e bne.n 800209c <f_GameMaster+0x74>
vTaskDelete(Block_EnemieHandle);
800207e: 4b0c ldr r3, [pc, #48] ; (80020b0 <f_GameMaster+0x88>)
8002080: 681b ldr r3, [r3, #0]
8002082: 4618 mov r0, r3
8002084: f00c ffd0 bl 800f028 <vTaskDelete>
vTaskDelete(ProjectileHandle);
8002088: 4b0a ldr r3, [pc, #40] ; (80020b4 <f_GameMaster+0x8c>)
800208a: 681b ldr r3, [r3, #0]
800208c: 4618 mov r0, r3
800208e: f00c ffcb bl 800f028 <vTaskDelete>
vTaskDelete(Joueur_1Handle);
8002092: 4b09 ldr r3, [pc, #36] ; (80020b8 <f_GameMaster+0x90>)
8002094: 681b ldr r3, [r3, #0]
8002096: 4618 mov r0, r3
8002098: f00c ffc6 bl 800f028 <vTaskDelete>
}
vTaskDelayUntil(&xLastWakeTime, xPeriodeTache);
800209c: f107 0310 add.w r3, r7, #16
80020a0: 6979 ldr r1, [r7, #20]
80020a2: 4618 mov r0, r3
80020a4: f00d f850 bl 800f148 <vTaskDelayUntil>
xQueueReceive(Queue_FHandle, &end, 0);
80020a8: e7c8 b.n 800203c <f_GameMaster+0x14>
80020aa: bf00 nop
80020ac: 20008ca0 .word 0x20008ca0
80020b0: 20008e6c .word 0x20008e6c
80020b4: 20008cbc .word 0x20008cbc
80020b8: 20008a60 .word 0x20008a60
80020bc: 20000048 .word 0x20000048
080020c0 <f_Joueur_1>:
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_f_Joueur_1 */
void f_Joueur_1(void const * argument)
{
80020c0: b580 push {r7, lr}
80020c2: b096 sub sp, #88 ; 0x58
80020c4: af00 add r7, sp, #0
80020c6: 6078 str r0, [r7, #4]
/* USER CODE BEGIN f_Joueur_1 */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
80020c8: 230a movs r3, #10
80020ca: 657b str r3, [r7, #84] ; 0x54
uint16_t Width = 20;
80020cc: 2314 movs r3, #20
80020ce: f8a7 3052 strh.w r3, [r7, #82] ; 0x52
uint16_t Height = 20;
80020d2: 2314 movs r3, #20
80020d4: f8a7 3050 strh.w r3, [r7, #80] ; 0x50
uint32_t joystick_h, joystick_v;
uint8_t stop = 1;
80020d8: 2301 movs r3, #1
80020da: f887 303b strb.w r3, [r7, #59] ; 0x3b
struct Missile missile;
ADC_ChannelConfTypeDef sConfig3 = {0};
80020de: f107 0318 add.w r3, r7, #24
80020e2: 2200 movs r2, #0
80020e4: 601a str r2, [r3, #0]
80020e6: 605a str r2, [r3, #4]
80020e8: 609a str r2, [r3, #8]
80020ea: 60da str r2, [r3, #12]
sConfig3.Rank = ADC_REGULAR_RANK_1;
80020ec: 2301 movs r3, #1
80020ee: 61fb str r3, [r7, #28]
sConfig3.SamplingTime = ADC_SAMPLETIME_3CYCLES;
80020f0: 2300 movs r3, #0
80020f2: 623b str r3, [r7, #32]
sConfig3.Channel = ADC_CHANNEL_8;
80020f4: 2308 movs r3, #8
80020f6: 61bb str r3, [r7, #24]
HAL_ADC_ConfigChannel(&hadc3, &sConfig3);
80020f8: f107 0318 add.w r3, r7, #24
80020fc: 4619 mov r1, r3
80020fe: 4872 ldr r0, [pc, #456] ; (80022c8 <f_Joueur_1+0x208>)
8002100: f003 fad2 bl 80056a8 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
8002104: 4870 ldr r0, [pc, #448] ; (80022c8 <f_Joueur_1+0x208>)
8002106: f003 f97d bl 8005404 <HAL_ADC_Start>
ADC_ChannelConfTypeDef sConfig1 = {0};
800210a: f107 0308 add.w r3, r7, #8
800210e: 2200 movs r2, #0
8002110: 601a str r2, [r3, #0]
8002112: 605a str r2, [r3, #4]
8002114: 609a str r2, [r3, #8]
8002116: 60da str r2, [r3, #12]
sConfig1.Rank = ADC_REGULAR_RANK_1;
8002118: 2301 movs r3, #1
800211a: 60fb str r3, [r7, #12]
sConfig1.SamplingTime = ADC_SAMPLETIME_3CYCLES;
800211c: 2300 movs r3, #0
800211e: 613b str r3, [r7, #16]
sConfig1.Channel = ADC_CHANNEL_0;
8002120: 2300 movs r3, #0
8002122: 60bb str r3, [r7, #8]
HAL_ADC_ConfigChannel(&hadc1, &sConfig1);
8002124: f107 0308 add.w r3, r7, #8
8002128: 4619 mov r1, r3
800212a: 4868 ldr r0, [pc, #416] ; (80022cc <f_Joueur_1+0x20c>)
800212c: f003 fabc bl 80056a8 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc1);
8002130: 4866 ldr r0, [pc, #408] ; (80022cc <f_Joueur_1+0x20c>)
8002132: f003 f967 bl 8005404 <HAL_ADC_Start>
// Paramètre de l'écran pour la reprouductibilité
uint32_t LCD_HEIGHT = BSP_LCD_GetXSize();
8002136: f000 fdd7 bl 8002ce8 <BSP_LCD_GetXSize>
800213a: 64f8 str r0, [r7, #76] ; 0x4c
uint32_t LCD_WIDTH = BSP_LCD_GetYSize();
800213c: f000 fde8 bl 8002d10 <BSP_LCD_GetYSize>
8002140: 64b8 str r0, [r7, #72] ; 0x48
/* Infinite loop */
for (;;)
{
BSP_LCD_SetTextColor(LCD_COLOR_BACKGROUND);
8002142: 4b63 ldr r3, [pc, #396] ; (80022d0 <f_Joueur_1+0x210>)
8002144: 681b ldr r3, [r3, #0]
8002146: 4618 mov r0, r3
8002148: f000 fe66 bl 8002e18 <BSP_LCD_SetTextColor>
BSP_LCD_FillRect(joueur.x, joueur.y, Width, Height);
800214c: 4b61 ldr r3, [pc, #388] ; (80022d4 <f_Joueur_1+0x214>)
800214e: 681b ldr r3, [r3, #0]
8002150: b298 uxth r0, r3
8002152: 4b60 ldr r3, [pc, #384] ; (80022d4 <f_Joueur_1+0x214>)
8002154: 685b ldr r3, [r3, #4]
8002156: b299 uxth r1, r3
8002158: f8b7 3050 ldrh.w r3, [r7, #80] ; 0x50
800215c: f8b7 2052 ldrh.w r2, [r7, #82] ; 0x52
8002160: f001 fa4a bl 80035f8 <BSP_LCD_FillRect>
// BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp)
HAL_ADC_ConfigChannel(&hadc3, &sConfig3);
8002164: f107 0318 add.w r3, r7, #24
8002168: 4619 mov r1, r3
800216a: 4857 ldr r0, [pc, #348] ; (80022c8 <f_Joueur_1+0x208>)
800216c: f003 fa9c bl 80056a8 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
8002170: 4855 ldr r0, [pc, #340] ; (80022c8 <f_Joueur_1+0x208>)
8002172: f003 f947 bl 8005404 <HAL_ADC_Start>
while (HAL_ADC_PollForConversion(&hadc3, 100) != HAL_OK);
8002176: bf00 nop
8002178: 2164 movs r1, #100 ; 0x64
800217a: 4853 ldr r0, [pc, #332] ; (80022c8 <f_Joueur_1+0x208>)
800217c: f003 fa02 bl 8005584 <HAL_ADC_PollForConversion>
8002180: 4603 mov r3, r0
8002182: 2b00 cmp r3, #0
8002184: d1f8 bne.n 8002178 <f_Joueur_1+0xb8>
joystick_h = HAL_ADC_GetValue(&hadc3);
8002186: 4850 ldr r0, [pc, #320] ; (80022c8 <f_Joueur_1+0x208>)
8002188: f003 fa80 bl 800568c <HAL_ADC_GetValue>
800218c: 6478 str r0, [r7, #68] ; 0x44
HAL_ADC_ConfigChannel(&hadc1, &sConfig1);
800218e: f107 0308 add.w r3, r7, #8
8002192: 4619 mov r1, r3
8002194: 484d ldr r0, [pc, #308] ; (80022cc <f_Joueur_1+0x20c>)
8002196: f003 fa87 bl 80056a8 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc1);
800219a: 484c ldr r0, [pc, #304] ; (80022cc <f_Joueur_1+0x20c>)
800219c: f003 f932 bl 8005404 <HAL_ADC_Start>
while (HAL_ADC_PollForConversion(&hadc1, 100) != HAL_OK);
80021a0: bf00 nop
80021a2: 2164 movs r1, #100 ; 0x64
80021a4: 4849 ldr r0, [pc, #292] ; (80022cc <f_Joueur_1+0x20c>)
80021a6: f003 f9ed bl 8005584 <HAL_ADC_PollForConversion>
80021aa: 4603 mov r3, r0
80021ac: 2b00 cmp r3, #0
80021ae: d1f8 bne.n 80021a2 <f_Joueur_1+0xe2>
joystick_v = HAL_ADC_GetValue(&hadc1);
80021b0: 4846 ldr r0, [pc, #280] ; (80022cc <f_Joueur_1+0x20c>)
80021b2: f003 fa6b bl 800568c <HAL_ADC_GetValue>
80021b6: 6438 str r0, [r7, #64] ; 0x40
if ((joueur.y < LCD_WIDTH- Width - joueur.dy)&&(joystick_h < 1900)) joueur.y += joueur.dy;
80021b8: 4b46 ldr r3, [pc, #280] ; (80022d4 <f_Joueur_1+0x214>)
80021ba: 685a ldr r2, [r3, #4]
80021bc: f8b7 3052 ldrh.w r3, [r7, #82] ; 0x52
80021c0: 6cb9 ldr r1, [r7, #72] ; 0x48
80021c2: 1acb subs r3, r1, r3
80021c4: 4943 ldr r1, [pc, #268] ; (80022d4 <f_Joueur_1+0x214>)
80021c6: 7a49 ldrb r1, [r1, #9]
80021c8: 1a5b subs r3, r3, r1
80021ca: 429a cmp r2, r3
80021cc: d20b bcs.n 80021e6 <f_Joueur_1+0x126>
80021ce: 6c7b ldr r3, [r7, #68] ; 0x44
80021d0: f240 726b movw r2, #1899 ; 0x76b
80021d4: 4293 cmp r3, r2
80021d6: d806 bhi.n 80021e6 <f_Joueur_1+0x126>
80021d8: 4b3e ldr r3, [pc, #248] ; (80022d4 <f_Joueur_1+0x214>)
80021da: 685b ldr r3, [r3, #4]
80021dc: 4a3d ldr r2, [pc, #244] ; (80022d4 <f_Joueur_1+0x214>)
80021de: 7a52 ldrb r2, [r2, #9]
80021e0: 4413 add r3, r2
80021e2: 4a3c ldr r2, [pc, #240] ; (80022d4 <f_Joueur_1+0x214>)
80021e4: 6053 str r3, [r2, #4]
if ((joueur.y > joueur.dy)&&(joystick_h > 2100)) joueur.y -= joueur.dy;
80021e6: 4b3b ldr r3, [pc, #236] ; (80022d4 <f_Joueur_1+0x214>)
80021e8: 685b ldr r3, [r3, #4]
80021ea: 4a3a ldr r2, [pc, #232] ; (80022d4 <f_Joueur_1+0x214>)
80021ec: 7a52 ldrb r2, [r2, #9]
80021ee: 4293 cmp r3, r2
80021f0: d90b bls.n 800220a <f_Joueur_1+0x14a>
80021f2: 6c7b ldr r3, [r7, #68] ; 0x44
80021f4: f640 0234 movw r2, #2100 ; 0x834
80021f8: 4293 cmp r3, r2
80021fa: d906 bls.n 800220a <f_Joueur_1+0x14a>
80021fc: 4b35 ldr r3, [pc, #212] ; (80022d4 <f_Joueur_1+0x214>)
80021fe: 685b ldr r3, [r3, #4]
8002200: 4a34 ldr r2, [pc, #208] ; (80022d4 <f_Joueur_1+0x214>)
8002202: 7a52 ldrb r2, [r2, #9]
8002204: 1a9b subs r3, r3, r2
8002206: 4a33 ldr r2, [pc, #204] ; (80022d4 <f_Joueur_1+0x214>)
8002208: 6053 str r3, [r2, #4]
if ((joueur.x < LCD_HEIGHT - Height - joueur.dx)&&(joystick_v < 1900)) joueur.x += joueur.dx;
800220a: 4b32 ldr r3, [pc, #200] ; (80022d4 <f_Joueur_1+0x214>)
800220c: 681a ldr r2, [r3, #0]
800220e: f8b7 3050 ldrh.w r3, [r7, #80] ; 0x50
8002212: 6cf9 ldr r1, [r7, #76] ; 0x4c
8002214: 1acb subs r3, r1, r3
8002216: 492f ldr r1, [pc, #188] ; (80022d4 <f_Joueur_1+0x214>)
8002218: 7a09 ldrb r1, [r1, #8]
800221a: 1a5b subs r3, r3, r1
800221c: 429a cmp r2, r3
800221e: d20b bcs.n 8002238 <f_Joueur_1+0x178>
8002220: 6c3b ldr r3, [r7, #64] ; 0x40
8002222: f240 726b movw r2, #1899 ; 0x76b
8002226: 4293 cmp r3, r2
8002228: d806 bhi.n 8002238 <f_Joueur_1+0x178>
800222a: 4b2a ldr r3, [pc, #168] ; (80022d4 <f_Joueur_1+0x214>)
800222c: 681b ldr r3, [r3, #0]
800222e: 4a29 ldr r2, [pc, #164] ; (80022d4 <f_Joueur_1+0x214>)
8002230: 7a12 ldrb r2, [r2, #8]
8002232: 4413 add r3, r2
8002234: 4a27 ldr r2, [pc, #156] ; (80022d4 <f_Joueur_1+0x214>)
8002236: 6013 str r3, [r2, #0]
if ((joueur.x > joueur.dx)&&(joystick_v > 2100)) joueur.x -= joueur.dx;
8002238: 4b26 ldr r3, [pc, #152] ; (80022d4 <f_Joueur_1+0x214>)
800223a: 681b ldr r3, [r3, #0]
800223c: 4a25 ldr r2, [pc, #148] ; (80022d4 <f_Joueur_1+0x214>)
800223e: 7a12 ldrb r2, [r2, #8]
8002240: 4293 cmp r3, r2
8002242: d90b bls.n 800225c <f_Joueur_1+0x19c>
8002244: 6c3b ldr r3, [r7, #64] ; 0x40
8002246: f640 0234 movw r2, #2100 ; 0x834
800224a: 4293 cmp r3, r2
800224c: d906 bls.n 800225c <f_Joueur_1+0x19c>
800224e: 4b21 ldr r3, [pc, #132] ; (80022d4 <f_Joueur_1+0x214>)
8002250: 681b ldr r3, [r3, #0]
8002252: 4a20 ldr r2, [pc, #128] ; (80022d4 <f_Joueur_1+0x214>)
8002254: 7a12 ldrb r2, [r2, #8]
8002256: 1a9b subs r3, r3, r2
8002258: 4a1e ldr r2, [pc, #120] ; (80022d4 <f_Joueur_1+0x214>)
800225a: 6013 str r3, [r2, #0]
BSP_LCD_SetTextColor(LCD_COLOR_BLUE);
800225c: 481e ldr r0, [pc, #120] ; (80022d8 <f_Joueur_1+0x218>)
800225e: f000 fddb bl 8002e18 <BSP_LCD_SetTextColor>
BSP_LCD_FillRect(joueur.x, joueur.y, Width, Height);
8002262: 4b1c ldr r3, [pc, #112] ; (80022d4 <f_Joueur_1+0x214>)
8002264: 681b ldr r3, [r3, #0]
8002266: b298 uxth r0, r3
8002268: 4b1a ldr r3, [pc, #104] ; (80022d4 <f_Joueur_1+0x214>)
800226a: 685b ldr r3, [r3, #4]
800226c: b299 uxth r1, r3
800226e: f8b7 3050 ldrh.w r3, [r7, #80] ; 0x50
8002272: f8b7 2052 ldrh.w r2, [r7, #82] ; 0x52
8002276: f001 f9bf bl 80035f8 <BSP_LCD_FillRect>
if (xQueueReceive(Queue_JHandle, &missile, 0) == pdPASS)
800227a: 4b18 ldr r3, [pc, #96] ; (80022dc <f_Joueur_1+0x21c>)
800227c: 681b ldr r3, [r3, #0]
800227e: f107 0128 add.w r1, r7, #40 ; 0x28
8002282: 2200 movs r2, #0
8002284: 4618 mov r0, r3
8002286: f00c f98f bl 800e5a8 <xQueueReceive>
800228a: 4603 mov r3, r0
800228c: 2b01 cmp r3, #1
800228e: d107 bne.n 80022a0 <f_Joueur_1+0x1e0>
joueur.health = joueur.health - missile.damage;
8002290: 4b10 ldr r3, [pc, #64] ; (80022d4 <f_Joueur_1+0x214>)
8002292: 7a9a ldrb r2, [r3, #10]
8002294: f897 3034 ldrb.w r3, [r7, #52] ; 0x34
8002298: 1ad3 subs r3, r2, r3
800229a: b2da uxtb r2, r3
800229c: 4b0d ldr r3, [pc, #52] ; (80022d4 <f_Joueur_1+0x214>)
800229e: 729a strb r2, [r3, #10]
// On envoie 1 si le joueur est mort et on envoie 0 si les enemis sont tous morts
if (joueur.health == 0)xQueueSend(Queue_FHandle,&stop,0);
80022a0: 4b0c ldr r3, [pc, #48] ; (80022d4 <f_Joueur_1+0x214>)
80022a2: 7a9b ldrb r3, [r3, #10]
80022a4: 2b00 cmp r3, #0
80022a6: d107 bne.n 80022b8 <f_Joueur_1+0x1f8>
80022a8: 4b0d ldr r3, [pc, #52] ; (80022e0 <f_Joueur_1+0x220>)
80022aa: 6818 ldr r0, [r3, #0]
80022ac: f107 013b add.w r1, r7, #59 ; 0x3b
80022b0: 2300 movs r3, #0
80022b2: 2200 movs r2, #0
80022b4: f00b ff48 bl 800e148 <xQueueGenericSend>
// TODO La condition sur une entrée analogique pour envoyer un missile
// struct Missile missile = {joueur.x, joueur.y,joueur.missile.dx, joueur.missile.dy, 1, joueur.missile.color, joueur.missile.damage};
// xQueueSend(Queue_NHandle,&missile,0);
vTaskDelayUntil(&xLastWakeTime, xPeriodeTache);
80022b8: f107 033c add.w r3, r7, #60 ; 0x3c
80022bc: 6d79 ldr r1, [r7, #84] ; 0x54
80022be: 4618 mov r0, r3
80022c0: f00c ff42 bl 800f148 <vTaskDelayUntil>
BSP_LCD_SetTextColor(LCD_COLOR_BACKGROUND);
80022c4: e73d b.n 8002142 <f_Joueur_1+0x82>
80022c6: bf00 nop
80022c8: 20008bd4 .word 0x20008bd4
80022cc: 20008b8c .word 0x20008b8c
80022d0: 20000044 .word 0x20000044
80022d4: 20000028 .word 0x20000028
80022d8: ff0000ff .word 0xff0000ff
80022dc: 200089ec .word 0x200089ec
80022e0: 20008ca0 .word 0x20008ca0
080022e4 <f_block_enemie>:
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_f_block_enemie */
void f_block_enemie(void const * argument)
{
80022e4: b580 push {r7, lr}
80022e6: f5ad 7d7c sub.w sp, sp, #1008 ; 0x3f0
80022ea: af00 add r7, sp, #0
80022ec: 1d3b adds r3, r7, #4
80022ee: 6018 str r0, [r3, #0]
/* USER CODE BEGIN f_block_enemie */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
80022f0: 230a movs r3, #10
80022f2: f8c7 33e4 str.w r3, [r7, #996] ; 0x3e4
uint8_t number_monsters = 30;
80022f6: 231e movs r3, #30
80022f8: f887 33ef strb.w r3, [r7, #1007] ; 0x3ef
struct Monster list_monsters[30];
uint8_t end = 0;
80022fc: f107 031f add.w r3, r7, #31
8002300: 2200 movs r2, #0
8002302: 701a strb r2, [r3, #0]
uint8_t deplacement = 1;
8002304: 2301 movs r3, #1
8002306: f887 33ee strb.w r3, [r7, #1006] ; 0x3ee
struct Missile missile;
/* Infinite loop */
for (;;)
{
xQueueReceive(Queue_EHandle, &missile, 0);
800230a: 4b52 ldr r3, [pc, #328] ; (8002454 <f_block_enemie+0x170>)
800230c: 681b ldr r3, [r3, #0]
800230e: f107 010c add.w r1, r7, #12
8002312: 2200 movs r2, #0
8002314: 4618 mov r0, r3
8002316: f00c f947 bl 800e5a8 <xQueueReceive>
if (number_monsters == 0){
800231a: f897 33ef ldrb.w r3, [r7, #1007] ; 0x3ef
800231e: 2b00 cmp r3, #0
8002320: d107 bne.n 8002332 <f_block_enemie+0x4e>
xQueueSend(Queue_FHandle, &end, 0);
8002322: 4b4d ldr r3, [pc, #308] ; (8002458 <f_block_enemie+0x174>)
8002324: 6818 ldr r0, [r3, #0]
8002326: f107 011f add.w r1, r7, #31
800232a: 2300 movs r3, #0
800232c: 2200 movs r2, #0
800232e: f00b ff0b bl 800e148 <xQueueGenericSend>
}
for (int i=0;i< number_monsters;i++){
8002332: 2300 movs r3, #0
8002334: f8c7 33e8 str.w r3, [r7, #1000] ; 0x3e8
8002338: e07a b.n 8002430 <f_block_enemie+0x14c>
if (list_monsters[i].health > 0 ){
800233a: f107 0220 add.w r2, r7, #32
800233e: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
8002342: 015b lsls r3, r3, #5
8002344: 4413 add r3, r2
8002346: 331d adds r3, #29
8002348: 781b ldrb r3, [r3, #0]
800234a: 2b00 cmp r3, #0
800234c: d06b beq.n 8002426 <f_block_enemie+0x142>
if ((missile.x == list_monsters[i].x)&&(missile.y == list_monsters[i].y))
800234e: f107 030c add.w r3, r7, #12
8002352: 881b ldrh r3, [r3, #0]
8002354: 4619 mov r1, r3
8002356: f107 0220 add.w r2, r7, #32
800235a: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
800235e: 015b lsls r3, r3, #5
8002360: 4413 add r3, r2
8002362: 681b ldr r3, [r3, #0]
8002364: 4299 cmp r1, r3
8002366: d133 bne.n 80023d0 <f_block_enemie+0xec>
8002368: f107 030c add.w r3, r7, #12
800236c: 885b ldrh r3, [r3, #2]
800236e: 4619 mov r1, r3
8002370: f107 0220 add.w r2, r7, #32
8002374: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
8002378: 015b lsls r3, r3, #5
800237a: 4413 add r3, r2
800237c: 3304 adds r3, #4
800237e: 681b ldr r3, [r3, #0]
8002380: 4299 cmp r1, r3
8002382: d125 bne.n 80023d0 <f_block_enemie+0xec>
{
list_monsters[i].health = list_monsters[i].health -1;
8002384: f107 0220 add.w r2, r7, #32
8002388: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
800238c: 015b lsls r3, r3, #5
800238e: 4413 add r3, r2
8002390: 331d adds r3, #29
8002392: 781b ldrb r3, [r3, #0]
8002394: 3b01 subs r3, #1
8002396: b2d9 uxtb r1, r3
8002398: f107 0220 add.w r2, r7, #32
800239c: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
80023a0: 015b lsls r3, r3, #5
80023a2: 4413 add r3, r2
80023a4: 331d adds r3, #29
80023a6: 460a mov r2, r1
80023a8: 701a strb r2, [r3, #0]
// Est ce que cette ligne va marcher sachant que je transmets l'adresse dans la queue ?
missile.valide = 0;
80023aa: f107 030c add.w r3, r7, #12
80023ae: 2200 movs r2, #0
80023b0: 735a strb r2, [r3, #13]
if (list_monsters[i].health == 0){
80023b2: f107 0220 add.w r2, r7, #32
80023b6: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
80023ba: 015b lsls r3, r3, #5
80023bc: 4413 add r3, r2
80023be: 331d adds r3, #29
80023c0: 781b ldrb r3, [r3, #0]
80023c2: 2b00 cmp r3, #0
80023c4: d104 bne.n 80023d0 <f_block_enemie+0xec>
//TODO explosion du plaisir ?
number_monsters = number_monsters -1;
80023c6: f897 33ef ldrb.w r3, [r7, #1007] ; 0x3ef
80023ca: 3b01 subs r3, #1
80023cc: f887 33ef strb.w r3, [r7, #1007] ; 0x3ef
}
}
BSP_LCD_DrawBitmap(list_monsters[i].x, list_monsters[i].y, &list_monsters[i].pbmp);
80023d0: f107 0220 add.w r2, r7, #32
80023d4: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
80023d8: 015b lsls r3, r3, #5
80023da: 4413 add r3, r2
80023dc: 6818 ldr r0, [r3, #0]
80023de: f107 0220 add.w r2, r7, #32
80023e2: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
80023e6: 015b lsls r3, r3, #5
80023e8: 4413 add r3, r2
80023ea: 3304 adds r3, #4
80023ec: 6819 ldr r1, [r3, #0]
80023ee: f107 0220 add.w r2, r7, #32
80023f2: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
80023f6: 015b lsls r3, r3, #5
80023f8: 3308 adds r3, #8
80023fa: 4413 add r3, r2
80023fc: 461a mov r2, r3
80023fe: f001 f84b bl 8003498 <BSP_LCD_DrawBitmap>
// On alterne le deplacement des méchants comme dans le vrai jeux
//TODO est ce que ca va posé un décalage entre l'affichage et la hitboxe ?
list_monsters[i].x = list_monsters[i].x + deplacement*2;
8002402: f107 0220 add.w r2, r7, #32
8002406: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
800240a: 015b lsls r3, r3, #5
800240c: 4413 add r3, r2
800240e: 681b ldr r3, [r3, #0]
8002410: f897 23ee ldrb.w r2, [r7, #1006] ; 0x3ee
8002414: 0052 lsls r2, r2, #1
8002416: 441a add r2, r3
8002418: f107 0120 add.w r1, r7, #32
800241c: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
8002420: 015b lsls r3, r3, #5
8002422: 440b add r3, r1
8002424: 601a str r2, [r3, #0]
for (int i=0;i< number_monsters;i++){
8002426: f8d7 33e8 ldr.w r3, [r7, #1000] ; 0x3e8
800242a: 3301 adds r3, #1
800242c: f8c7 33e8 str.w r3, [r7, #1000] ; 0x3e8
8002430: f897 33ef ldrb.w r3, [r7, #1007] ; 0x3ef
8002434: f8d7 23e8 ldr.w r2, [r7, #1000] ; 0x3e8
8002438: 429a cmp r2, r3
800243a: f6ff af7e blt.w 800233a <f_block_enemie+0x56>
}
}
deplacement = -1;
800243e: 23ff movs r3, #255 ; 0xff
8002440: f887 33ee strb.w r3, [r7, #1006] ; 0x3ee
vTaskDelayUntil(&xLastWakeTime, xPeriodeTache);
8002444: f507 7378 add.w r3, r7, #992 ; 0x3e0
8002448: f8d7 13e4 ldr.w r1, [r7, #996] ; 0x3e4
800244c: 4618 mov r0, r3
800244e: f00c fe7b bl 800f148 <vTaskDelayUntil>
xQueueReceive(Queue_EHandle, &missile, 0);
8002452: e75a b.n 800230a <f_block_enemie+0x26>
8002454: 20008e34 .word 0x20008e34
8002458: 20008ca0 .word 0x20008ca0
0800245c <f_projectile>:
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_f_projectile */
void f_projectile(void const * argument)
{
800245c: b590 push {r4, r7, lr}
800245e: b0dd sub sp, #372 ; 0x174
8002460: af00 add r7, sp, #0
8002462: 1d3b adds r3, r7, #4
8002464: 6018 str r0, [r3, #0]
/* USER CODE BEGIN f_projectile */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 5000;
8002466: f241 3388 movw r3, #5000 ; 0x1388
800246a: f8c7 3168 str.w r3, [r7, #360] ; 0x168
/* Infinite loop */
struct Missile liste_missile[20];
struct Missile missile = {70, 70, 1, 0, 0, LCD_COLOR_WHITE, 1,1};
800246e: f107 0308 add.w r3, r7, #8
8002472: 4a80 ldr r2, [pc, #512] ; (8002674 <f_projectile+0x218>)
8002474: 461c mov r4, r3
8002476: 4613 mov r3, r2
8002478: cb0f ldmia r3, {r0, r1, r2, r3}
800247a: e884 000f stmia.w r4, {r0, r1, r2, r3}
uint8_t indice = 1;
800247e: 2301 movs r3, #1
8002480: f887 3167 strb.w r3, [r7, #359] ; 0x167
liste_missile[0] = missile;
8002484: f107 0218 add.w r2, r7, #24
8002488: f107 0308 add.w r3, r7, #8
800248c: 4614 mov r4, r2
800248e: cb0f ldmia r3, {r0, r1, r2, r3}
8002490: e884 000f stmia.w r4, {r0, r1, r2, r3}
// Paramètre de l'écran pour la reprouductibilité
uint32_t LCD_HEIGHT = BSP_LCD_GetXSize();
8002494: f000 fc28 bl 8002ce8 <BSP_LCD_GetXSize>
8002498: f8c7 0160 str.w r0, [r7, #352] ; 0x160
uint32_t LCD_WIDTH = BSP_LCD_GetYSize();
800249c: f000 fc38 bl 8002d10 <BSP_LCD_GetYSize>
80024a0: f8c7 015c str.w r0, [r7, #348] ; 0x15c
for (;;)
{
//xQueueReceive(Queue_NHandle, &missile, 0);
//liste_missile[indice++] = missile;
for (int i=0;i< indice;i++)
80024a4: 2300 movs r3, #0
80024a6: f8c7 316c str.w r3, [r7, #364] ; 0x16c
80024aa: e1de b.n 800286a <f_projectile+0x40e>
{
// Si le missile n'est pas sur un bord
if (liste_missile[i].valide == 1)
80024ac: f107 0218 add.w r2, r7, #24
80024b0: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80024b4: 011b lsls r3, r3, #4
80024b6: 4413 add r3, r2
80024b8: 330d adds r3, #13
80024ba: 781b ldrb r3, [r3, #0]
80024bc: 2b01 cmp r3, #1
80024be: f040 81cf bne.w 8002860 <f_projectile+0x404>
{
// Si le missile appartient au joueur :
if (liste_missile[i].equipe == 0)
80024c2: f107 0218 add.w r2, r7, #24
80024c6: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80024ca: 011b lsls r3, r3, #4
80024cc: 4413 add r3, r2
80024ce: 3306 adds r3, #6
80024d0: 781b ldrb r3, [r3, #0]
80024d2: 2b00 cmp r3, #0
80024d4: f040 80d6 bne.w 8002684 <f_projectile+0x228>
{
if (liste_missile[i].x >= Limit_ennemis_x)
80024d8: f107 0218 add.w r2, r7, #24
80024dc: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80024e0: 011b lsls r3, r3, #4
80024e2: 4413 add r3, r2
80024e4: 881b ldrh r3, [r3, #0]
80024e6: 461a mov r2, r3
80024e8: 4b63 ldr r3, [pc, #396] ; (8002678 <f_projectile+0x21c>)
80024ea: 681b ldr r3, [r3, #0]
80024ec: 429a cmp r2, r3
80024ee: d30f bcc.n 8002510 <f_projectile+0xb4>
{
xQueueSend(Queue_EHandle, &liste_missile+indice,0);
80024f0: 4b62 ldr r3, [pc, #392] ; (800267c <f_projectile+0x220>)
80024f2: 6818 ldr r0, [r3, #0]
80024f4: f897 2167 ldrb.w r2, [r7, #359] ; 0x167
80024f8: 4613 mov r3, r2
80024fa: 009b lsls r3, r3, #2
80024fc: 4413 add r3, r2
80024fe: 019b lsls r3, r3, #6
8002500: 461a mov r2, r3
8002502: f107 0318 add.w r3, r7, #24
8002506: 1899 adds r1, r3, r2
8002508: 2300 movs r3, #0
800250a: 2200 movs r2, #0
800250c: f00b fe1c bl 800e148 <xQueueGenericSend>
// TODO Une petite animation d'explosion ?
}
if ((liste_missile[i].x > 1)&&(liste_missile[i].x < LCD_HEIGHT-1)&&(liste_missile[i].y < LCD_WIDTH-1)&&(liste_missile[i].y > 1))
8002510: f107 0218 add.w r2, r7, #24
8002514: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002518: 011b lsls r3, r3, #4
800251a: 4413 add r3, r2
800251c: 881b ldrh r3, [r3, #0]
800251e: 2b01 cmp r3, #1
8002520: f240 808a bls.w 8002638 <f_projectile+0x1dc>
8002524: f107 0218 add.w r2, r7, #24
8002528: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800252c: 011b lsls r3, r3, #4
800252e: 4413 add r3, r2
8002530: 881b ldrh r3, [r3, #0]
8002532: 461a mov r2, r3
8002534: f8d7 3160 ldr.w r3, [r7, #352] ; 0x160
8002538: 3b01 subs r3, #1
800253a: 429a cmp r2, r3
800253c: d27c bcs.n 8002638 <f_projectile+0x1dc>
800253e: f107 0218 add.w r2, r7, #24
8002542: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002546: 011b lsls r3, r3, #4
8002548: 4413 add r3, r2
800254a: 3302 adds r3, #2
800254c: 881b ldrh r3, [r3, #0]
800254e: 461a mov r2, r3
8002550: f8d7 315c ldr.w r3, [r7, #348] ; 0x15c
8002554: 3b01 subs r3, #1
8002556: 429a cmp r2, r3
8002558: d26e bcs.n 8002638 <f_projectile+0x1dc>
800255a: f107 0218 add.w r2, r7, #24
800255e: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002562: 011b lsls r3, r3, #4
8002564: 4413 add r3, r2
8002566: 3302 adds r3, #2
8002568: 881b ldrh r3, [r3, #0]
800256a: 2b01 cmp r3, #1
800256c: d964 bls.n 8002638 <f_projectile+0x1dc>
{
BSP_LCD_DrawPixel(liste_missile[i].x, liste_missile[i].y, LCD_COLOR_BACKGROUND);
800256e: f107 0218 add.w r2, r7, #24
8002572: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002576: 011b lsls r3, r3, #4
8002578: 4413 add r3, r2
800257a: 8818 ldrh r0, [r3, #0]
800257c: f107 0218 add.w r2, r7, #24
8002580: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002584: 011b lsls r3, r3, #4
8002586: 4413 add r3, r2
8002588: 3302 adds r3, #2
800258a: 8819 ldrh r1, [r3, #0]
800258c: 4b3c ldr r3, [pc, #240] ; (8002680 <f_projectile+0x224>)
800258e: 681b ldr r3, [r3, #0]
8002590: 461a mov r2, r3
8002592: f000 ff39 bl 8003408 <BSP_LCD_DrawPixel>
liste_missile[i].x = liste_missile[i].x + liste_missile[i].dx ;
8002596: f107 0218 add.w r2, r7, #24
800259a: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800259e: 011b lsls r3, r3, #4
80025a0: 4413 add r3, r2
80025a2: 881a ldrh r2, [r3, #0]
80025a4: f107 0118 add.w r1, r7, #24
80025a8: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80025ac: 011b lsls r3, r3, #4
80025ae: 440b add r3, r1
80025b0: 3304 adds r3, #4
80025b2: 781b ldrb r3, [r3, #0]
80025b4: b29b uxth r3, r3
80025b6: 4413 add r3, r2
80025b8: b299 uxth r1, r3
80025ba: f107 0218 add.w r2, r7, #24
80025be: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80025c2: 011b lsls r3, r3, #4
80025c4: 4413 add r3, r2
80025c6: 460a mov r2, r1
80025c8: 801a strh r2, [r3, #0]
liste_missile[i].y = liste_missile[i].y + liste_missile[i].dy;
80025ca: f107 0218 add.w r2, r7, #24
80025ce: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80025d2: 011b lsls r3, r3, #4
80025d4: 4413 add r3, r2
80025d6: 3302 adds r3, #2
80025d8: 881a ldrh r2, [r3, #0]
80025da: f107 0118 add.w r1, r7, #24
80025de: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80025e2: 011b lsls r3, r3, #4
80025e4: 440b add r3, r1
80025e6: 3305 adds r3, #5
80025e8: 781b ldrb r3, [r3, #0]
80025ea: b29b uxth r3, r3
80025ec: 4413 add r3, r2
80025ee: b299 uxth r1, r3
80025f0: f107 0218 add.w r2, r7, #24
80025f4: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80025f8: 011b lsls r3, r3, #4
80025fa: 4413 add r3, r2
80025fc: 3302 adds r3, #2
80025fe: 460a mov r2, r1
8002600: 801a strh r2, [r3, #0]
BSP_LCD_DrawPixel(liste_missile[i].x, liste_missile[i].y, liste_missile[i].color);
8002602: f107 0218 add.w r2, r7, #24
8002606: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800260a: 011b lsls r3, r3, #4
800260c: 4413 add r3, r2
800260e: 8818 ldrh r0, [r3, #0]
8002610: f107 0218 add.w r2, r7, #24
8002614: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002618: 011b lsls r3, r3, #4
800261a: 4413 add r3, r2
800261c: 3302 adds r3, #2
800261e: 8819 ldrh r1, [r3, #0]
8002620: f107 0218 add.w r2, r7, #24
8002624: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002628: 011b lsls r3, r3, #4
800262a: 4413 add r3, r2
800262c: 3308 adds r3, #8
800262e: 681b ldr r3, [r3, #0]
8002630: 461a mov r2, r3
8002632: f000 fee9 bl 8003408 <BSP_LCD_DrawPixel>
8002636: e113 b.n 8002860 <f_projectile+0x404>
}
//TODO test sur tous les ennemis
else
{
liste_missile[i].valide = 0;
8002638: f107 0218 add.w r2, r7, #24
800263c: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002640: 011b lsls r3, r3, #4
8002642: 4413 add r3, r2
8002644: 330d adds r3, #13
8002646: 2200 movs r2, #0
8002648: 701a strb r2, [r3, #0]
BSP_LCD_DrawPixel(liste_missile[i].x, liste_missile[i].y, LCD_COLOR_BACKGROUND);
800264a: f107 0218 add.w r2, r7, #24
800264e: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002652: 011b lsls r3, r3, #4
8002654: 4413 add r3, r2
8002656: 8818 ldrh r0, [r3, #0]
8002658: f107 0218 add.w r2, r7, #24
800265c: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002660: 011b lsls r3, r3, #4
8002662: 4413 add r3, r2
8002664: 3302 adds r3, #2
8002666: 8819 ldrh r1, [r3, #0]
8002668: 4b05 ldr r3, [pc, #20] ; (8002680 <f_projectile+0x224>)
800266a: 681b ldr r3, [r3, #0]
800266c: 461a mov r2, r3
800266e: f000 fecb bl 8003408 <BSP_LCD_DrawPixel>
8002672: e0f5 b.n 8002860 <f_projectile+0x404>
8002674: 0801df60 .word 0x0801df60
8002678: 2000004c .word 0x2000004c
800267c: 20008e34 .word 0x20008e34
8002680: 20000044 .word 0x20000044
}
}
// Si le missile appartient aux ennemis
else if (liste_missile[i].equipe == 1)
8002684: f107 0218 add.w r2, r7, #24
8002688: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800268c: 011b lsls r3, r3, #4
800268e: 4413 add r3, r2
8002690: 3306 adds r3, #6
8002692: 781b ldrb r3, [r3, #0]
8002694: 2b01 cmp r3, #1
8002696: f040 80e3 bne.w 8002860 <f_projectile+0x404>
{
if ((liste_missile[i].x == joueur.x)&&(liste_missile[i].y == joueur.y))
800269a: f107 0218 add.w r2, r7, #24
800269e: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80026a2: 011b lsls r3, r3, #4
80026a4: 4413 add r3, r2
80026a6: 881b ldrh r3, [r3, #0]
80026a8: 461a mov r2, r3
80026aa: 4b77 ldr r3, [pc, #476] ; (8002888 <f_projectile+0x42c>)
80026ac: 681b ldr r3, [r3, #0]
80026ae: 429a cmp r2, r3
80026b0: d125 bne.n 80026fe <f_projectile+0x2a2>
80026b2: f107 0218 add.w r2, r7, #24
80026b6: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80026ba: 011b lsls r3, r3, #4
80026bc: 4413 add r3, r2
80026be: 3302 adds r3, #2
80026c0: 881b ldrh r3, [r3, #0]
80026c2: 461a mov r2, r3
80026c4: 4b70 ldr r3, [pc, #448] ; (8002888 <f_projectile+0x42c>)
80026c6: 685b ldr r3, [r3, #4]
80026c8: 429a cmp r2, r3
80026ca: d118 bne.n 80026fe <f_projectile+0x2a2>
{
xQueueSend(Queue_JHandle, &liste_missile+indice,0);
80026cc: 4b6f ldr r3, [pc, #444] ; (800288c <f_projectile+0x430>)
80026ce: 6818 ldr r0, [r3, #0]
80026d0: f897 2167 ldrb.w r2, [r7, #359] ; 0x167
80026d4: 4613 mov r3, r2
80026d6: 009b lsls r3, r3, #2
80026d8: 4413 add r3, r2
80026da: 019b lsls r3, r3, #6
80026dc: 461a mov r2, r3
80026de: f107 0318 add.w r3, r7, #24
80026e2: 1899 adds r1, r3, r2
80026e4: 2300 movs r3, #0
80026e6: 2200 movs r2, #0
80026e8: f00b fd2e bl 800e148 <xQueueGenericSend>
liste_missile[i].valide = 0;
80026ec: f107 0218 add.w r2, r7, #24
80026f0: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80026f4: 011b lsls r3, r3, #4
80026f6: 4413 add r3, r2
80026f8: 330d adds r3, #13
80026fa: 2200 movs r2, #0
80026fc: 701a strb r2, [r3, #0]
// TODO Une petite animation d'explosion ?
}
if ((liste_missile[i].x > 1)&&(liste_missile[i].x < LCD_HEIGHT-1)&&(liste_missile[i].y < LCD_WIDTH-1)&&(liste_missile[i].y > 1))
80026fe: f107 0218 add.w r2, r7, #24
8002702: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002706: 011b lsls r3, r3, #4
8002708: 4413 add r3, r2
800270a: 881b ldrh r3, [r3, #0]
800270c: 2b01 cmp r3, #1
800270e: f240 808a bls.w 8002826 <f_projectile+0x3ca>
8002712: f107 0218 add.w r2, r7, #24
8002716: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800271a: 011b lsls r3, r3, #4
800271c: 4413 add r3, r2
800271e: 881b ldrh r3, [r3, #0]
8002720: 461a mov r2, r3
8002722: f8d7 3160 ldr.w r3, [r7, #352] ; 0x160
8002726: 3b01 subs r3, #1
8002728: 429a cmp r2, r3
800272a: d27c bcs.n 8002826 <f_projectile+0x3ca>
800272c: f107 0218 add.w r2, r7, #24
8002730: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002734: 011b lsls r3, r3, #4
8002736: 4413 add r3, r2
8002738: 3302 adds r3, #2
800273a: 881b ldrh r3, [r3, #0]
800273c: 461a mov r2, r3
800273e: f8d7 315c ldr.w r3, [r7, #348] ; 0x15c
8002742: 3b01 subs r3, #1
8002744: 429a cmp r2, r3
8002746: d26e bcs.n 8002826 <f_projectile+0x3ca>
8002748: f107 0218 add.w r2, r7, #24
800274c: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002750: 011b lsls r3, r3, #4
8002752: 4413 add r3, r2
8002754: 3302 adds r3, #2
8002756: 881b ldrh r3, [r3, #0]
8002758: 2b01 cmp r3, #1
800275a: d964 bls.n 8002826 <f_projectile+0x3ca>
{
BSP_LCD_DrawPixel(liste_missile[i].x, liste_missile[i].y, LCD_COLOR_BACKGROUND);
800275c: f107 0218 add.w r2, r7, #24
8002760: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002764: 011b lsls r3, r3, #4
8002766: 4413 add r3, r2
8002768: 8818 ldrh r0, [r3, #0]
800276a: f107 0218 add.w r2, r7, #24
800276e: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002772: 011b lsls r3, r3, #4
8002774: 4413 add r3, r2
8002776: 3302 adds r3, #2
8002778: 8819 ldrh r1, [r3, #0]
800277a: 4b45 ldr r3, [pc, #276] ; (8002890 <f_projectile+0x434>)
800277c: 681b ldr r3, [r3, #0]
800277e: 461a mov r2, r3
8002780: f000 fe42 bl 8003408 <BSP_LCD_DrawPixel>
liste_missile[i].x = liste_missile[i].x + liste_missile[i].dx ;
8002784: f107 0218 add.w r2, r7, #24
8002788: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800278c: 011b lsls r3, r3, #4
800278e: 4413 add r3, r2
8002790: 881a ldrh r2, [r3, #0]
8002792: f107 0118 add.w r1, r7, #24
8002796: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800279a: 011b lsls r3, r3, #4
800279c: 440b add r3, r1
800279e: 3304 adds r3, #4
80027a0: 781b ldrb r3, [r3, #0]
80027a2: b29b uxth r3, r3
80027a4: 4413 add r3, r2
80027a6: b299 uxth r1, r3
80027a8: f107 0218 add.w r2, r7, #24
80027ac: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80027b0: 011b lsls r3, r3, #4
80027b2: 4413 add r3, r2
80027b4: 460a mov r2, r1
80027b6: 801a strh r2, [r3, #0]
liste_missile[i].y = liste_missile[i].y + liste_missile[i].dy;
80027b8: f107 0218 add.w r2, r7, #24
80027bc: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80027c0: 011b lsls r3, r3, #4
80027c2: 4413 add r3, r2
80027c4: 3302 adds r3, #2
80027c6: 881a ldrh r2, [r3, #0]
80027c8: f107 0118 add.w r1, r7, #24
80027cc: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80027d0: 011b lsls r3, r3, #4
80027d2: 440b add r3, r1
80027d4: 3305 adds r3, #5
80027d6: 781b ldrb r3, [r3, #0]
80027d8: b29b uxth r3, r3
80027da: 4413 add r3, r2
80027dc: b299 uxth r1, r3
80027de: f107 0218 add.w r2, r7, #24
80027e2: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80027e6: 011b lsls r3, r3, #4
80027e8: 4413 add r3, r2
80027ea: 3302 adds r3, #2
80027ec: 460a mov r2, r1
80027ee: 801a strh r2, [r3, #0]
BSP_LCD_DrawPixel(liste_missile[i].x, liste_missile[i].y, liste_missile[i].color);
80027f0: f107 0218 add.w r2, r7, #24
80027f4: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
80027f8: 011b lsls r3, r3, #4
80027fa: 4413 add r3, r2
80027fc: 8818 ldrh r0, [r3, #0]
80027fe: f107 0218 add.w r2, r7, #24
8002802: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002806: 011b lsls r3, r3, #4
8002808: 4413 add r3, r2
800280a: 3302 adds r3, #2
800280c: 8819 ldrh r1, [r3, #0]
800280e: f107 0218 add.w r2, r7, #24
8002812: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002816: 011b lsls r3, r3, #4
8002818: 4413 add r3, r2
800281a: 3308 adds r3, #8
800281c: 681b ldr r3, [r3, #0]
800281e: 461a mov r2, r3
8002820: f000 fdf2 bl 8003408 <BSP_LCD_DrawPixel>
8002824: e01c b.n 8002860 <f_projectile+0x404>
}
else
{
liste_missile[i].valide = 0;
8002826: f107 0218 add.w r2, r7, #24
800282a: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800282e: 011b lsls r3, r3, #4
8002830: 4413 add r3, r2
8002832: 330d adds r3, #13
8002834: 2200 movs r2, #0
8002836: 701a strb r2, [r3, #0]
BSP_LCD_DrawPixel(liste_missile[i].x, liste_missile[i].y, LCD_COLOR_BACKGROUND);
8002838: f107 0218 add.w r2, r7, #24
800283c: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002840: 011b lsls r3, r3, #4
8002842: 4413 add r3, r2
8002844: 8818 ldrh r0, [r3, #0]
8002846: f107 0218 add.w r2, r7, #24
800284a: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
800284e: 011b lsls r3, r3, #4
8002850: 4413 add r3, r2
8002852: 3302 adds r3, #2
8002854: 8819 ldrh r1, [r3, #0]
8002856: 4b0e ldr r3, [pc, #56] ; (8002890 <f_projectile+0x434>)
8002858: 681b ldr r3, [r3, #0]
800285a: 461a mov r2, r3
800285c: f000 fdd4 bl 8003408 <BSP_LCD_DrawPixel>
for (int i=0;i< indice;i++)
8002860: f8d7 316c ldr.w r3, [r7, #364] ; 0x16c
8002864: 3301 adds r3, #1
8002866: f8c7 316c str.w r3, [r7, #364] ; 0x16c
800286a: f897 3167 ldrb.w r3, [r7, #359] ; 0x167
800286e: f8d7 216c ldr.w r2, [r7, #364] ; 0x16c
8002872: 429a cmp r2, r3
8002874: f6ff ae1a blt.w 80024ac <f_projectile+0x50>
}
}
}
}
vTaskDelayUntil(&xLastWakeTime, xPeriodeTache);
8002878: f507 73ac add.w r3, r7, #344 ; 0x158
800287c: f8d7 1168 ldr.w r1, [r7, #360] ; 0x168
8002880: 4618 mov r0, r3
8002882: f00c fc61 bl 800f148 <vTaskDelayUntil>
for (int i=0;i< indice;i++)
8002886: e60d b.n 80024a4 <f_projectile+0x48>
8002888: 20000028 .word 0x20000028
800288c: 200089ec .word 0x200089ec
8002890: 20000044 .word 0x20000044
08002894 <HAL_TIM_PeriodElapsedCallback>:
* a global variable "uwTick" used as application time base.
* @param htim : TIM handle
* @retval None
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
8002894: b580 push {r7, lr}
8002896: b082 sub sp, #8
8002898: af00 add r7, sp, #0
800289a: 6078 str r0, [r7, #4]
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM6) {
800289c: 687b ldr r3, [r7, #4]
800289e: 681b ldr r3, [r3, #0]
80028a0: 4a04 ldr r2, [pc, #16] ; (80028b4 <HAL_TIM_PeriodElapsedCallback+0x20>)
80028a2: 4293 cmp r3, r2
80028a4: d101 bne.n 80028aa <HAL_TIM_PeriodElapsedCallback+0x16>
HAL_IncTick();
80028a6: f002 fd27 bl 80052f8 <HAL_IncTick>
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
80028aa: bf00 nop
80028ac: 3708 adds r7, #8
80028ae: 46bd mov sp, r7
80028b0: bd80 pop {r7, pc}
80028b2: bf00 nop
80028b4: 40001000 .word 0x40001000
080028b8 <Error_Handler>:
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
80028b8: b480 push {r7}
80028ba: 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");
80028bc: b672 cpsid i
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
80028be: e7fe b.n 80028be <Error_Handler+0x6>
080028c0 <I2Cx_MspInit>:
* @brief Initializes I2C MSP.
* @param i2c_handler : I2C handler
* @retval None
*/
static void I2Cx_MspInit(I2C_HandleTypeDef *i2c_handler)
{
80028c0: b580 push {r7, lr}
80028c2: b08c sub sp, #48 ; 0x30
80028c4: af00 add r7, sp, #0
80028c6: 6078 str r0, [r7, #4]
GPIO_InitTypeDef gpio_init_structure;
if (i2c_handler == (I2C_HandleTypeDef*)(&hI2cAudioHandler))
80028c8: 687b ldr r3, [r7, #4]
80028ca: 4a51 ldr r2, [pc, #324] ; (8002a10 <I2Cx_MspInit+0x150>)
80028cc: 4293 cmp r3, r2
80028ce: d14d bne.n 800296c <I2Cx_MspInit+0xac>
{
/* AUDIO and LCD I2C MSP init */
/*** Configure the GPIOs ***/
/* Enable GPIO clock */
DISCOVERY_AUDIO_I2Cx_SCL_SDA_GPIO_CLK_ENABLE();
80028d0: 4b50 ldr r3, [pc, #320] ; (8002a14 <I2Cx_MspInit+0x154>)
80028d2: 6b1b ldr r3, [r3, #48] ; 0x30
80028d4: 4a4f ldr r2, [pc, #316] ; (8002a14 <I2Cx_MspInit+0x154>)
80028d6: f043 0380 orr.w r3, r3, #128 ; 0x80
80028da: 6313 str r3, [r2, #48] ; 0x30
80028dc: 4b4d ldr r3, [pc, #308] ; (8002a14 <I2Cx_MspInit+0x154>)
80028de: 6b1b ldr r3, [r3, #48] ; 0x30
80028e0: f003 0380 and.w r3, r3, #128 ; 0x80
80028e4: 61bb str r3, [r7, #24]
80028e6: 69bb ldr r3, [r7, #24]
/* Configure I2C Tx as alternate function */
gpio_init_structure.Pin = DISCOVERY_AUDIO_I2Cx_SCL_PIN;
80028e8: 2380 movs r3, #128 ; 0x80
80028ea: 61fb str r3, [r7, #28]
gpio_init_structure.Mode = GPIO_MODE_AF_OD;
80028ec: 2312 movs r3, #18
80028ee: 623b str r3, [r7, #32]
gpio_init_structure.Pull = GPIO_NOPULL;
80028f0: 2300 movs r3, #0
80028f2: 627b str r3, [r7, #36] ; 0x24
gpio_init_structure.Speed = GPIO_SPEED_FAST;
80028f4: 2302 movs r3, #2
80028f6: 62bb str r3, [r7, #40] ; 0x28
gpio_init_structure.Alternate = DISCOVERY_AUDIO_I2Cx_SCL_SDA_AF;
80028f8: 2304 movs r3, #4
80028fa: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(DISCOVERY_AUDIO_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
80028fc: f107 031c add.w r3, r7, #28
8002900: 4619 mov r1, r3
8002902: 4845 ldr r0, [pc, #276] ; (8002a18 <I2Cx_MspInit+0x158>)
8002904: f005 f97c bl 8007c00 <HAL_GPIO_Init>
/* Configure I2C Rx as alternate function */
gpio_init_structure.Pin = DISCOVERY_AUDIO_I2Cx_SDA_PIN;
8002908: f44f 7380 mov.w r3, #256 ; 0x100
800290c: 61fb str r3, [r7, #28]
HAL_GPIO_Init(DISCOVERY_AUDIO_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
800290e: f107 031c add.w r3, r7, #28
8002912: 4619 mov r1, r3
8002914: 4840 ldr r0, [pc, #256] ; (8002a18 <I2Cx_MspInit+0x158>)
8002916: f005 f973 bl 8007c00 <HAL_GPIO_Init>
/*** Configure the I2C peripheral ***/
/* Enable I2C clock */
DISCOVERY_AUDIO_I2Cx_CLK_ENABLE();
800291a: 4b3e ldr r3, [pc, #248] ; (8002a14 <I2Cx_MspInit+0x154>)
800291c: 6c1b ldr r3, [r3, #64] ; 0x40
800291e: 4a3d ldr r2, [pc, #244] ; (8002a14 <I2Cx_MspInit+0x154>)
8002920: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
8002924: 6413 str r3, [r2, #64] ; 0x40
8002926: 4b3b ldr r3, [pc, #236] ; (8002a14 <I2Cx_MspInit+0x154>)
8002928: 6c1b ldr r3, [r3, #64] ; 0x40
800292a: f403 0300 and.w r3, r3, #8388608 ; 0x800000
800292e: 617b str r3, [r7, #20]
8002930: 697b ldr r3, [r7, #20]
/* Force the I2C peripheral clock reset */
DISCOVERY_AUDIO_I2Cx_FORCE_RESET();
8002932: 4b38 ldr r3, [pc, #224] ; (8002a14 <I2Cx_MspInit+0x154>)
8002934: 6a1b ldr r3, [r3, #32]
8002936: 4a37 ldr r2, [pc, #220] ; (8002a14 <I2Cx_MspInit+0x154>)
8002938: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
800293c: 6213 str r3, [r2, #32]
/* Release the I2C peripheral clock reset */
DISCOVERY_AUDIO_I2Cx_RELEASE_RESET();
800293e: 4b35 ldr r3, [pc, #212] ; (8002a14 <I2Cx_MspInit+0x154>)
8002940: 6a1b ldr r3, [r3, #32]
8002942: 4a34 ldr r2, [pc, #208] ; (8002a14 <I2Cx_MspInit+0x154>)
8002944: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
8002948: 6213 str r3, [r2, #32]
/* Enable and set I2Cx Interrupt to a lower priority */
HAL_NVIC_SetPriority(DISCOVERY_AUDIO_I2Cx_EV_IRQn, 0x0F, 0);
800294a: 2200 movs r2, #0
800294c: 210f movs r1, #15
800294e: 2048 movs r0, #72 ; 0x48
8002950: f003 f9a6 bl 8005ca0 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DISCOVERY_AUDIO_I2Cx_EV_IRQn);
8002954: 2048 movs r0, #72 ; 0x48
8002956: f003 f9bf bl 8005cd8 <HAL_NVIC_EnableIRQ>
/* Enable and set I2Cx Interrupt to a lower priority */
HAL_NVIC_SetPriority(DISCOVERY_AUDIO_I2Cx_ER_IRQn, 0x0F, 0);
800295a: 2200 movs r2, #0
800295c: 210f movs r1, #15
800295e: 2049 movs r0, #73 ; 0x49
8002960: f003 f99e bl 8005ca0 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DISCOVERY_AUDIO_I2Cx_ER_IRQn);
8002964: 2049 movs r0, #73 ; 0x49
8002966: f003 f9b7 bl 8005cd8 <HAL_NVIC_EnableIRQ>
/* Enable and set I2Cx Interrupt to a lower priority */
HAL_NVIC_SetPriority(DISCOVERY_EXT_I2Cx_ER_IRQn, 0x0F, 0);
HAL_NVIC_EnableIRQ(DISCOVERY_EXT_I2Cx_ER_IRQn);
}
}
800296a: e04d b.n 8002a08 <I2Cx_MspInit+0x148>
DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_CLK_ENABLE();
800296c: 4b29 ldr r3, [pc, #164] ; (8002a14 <I2Cx_MspInit+0x154>)
800296e: 6b1b ldr r3, [r3, #48] ; 0x30
8002970: 4a28 ldr r2, [pc, #160] ; (8002a14 <I2Cx_MspInit+0x154>)
8002972: f043 0302 orr.w r3, r3, #2
8002976: 6313 str r3, [r2, #48] ; 0x30
8002978: 4b26 ldr r3, [pc, #152] ; (8002a14 <I2Cx_MspInit+0x154>)
800297a: 6b1b ldr r3, [r3, #48] ; 0x30
800297c: f003 0302 and.w r3, r3, #2
8002980: 613b str r3, [r7, #16]
8002982: 693b ldr r3, [r7, #16]
gpio_init_structure.Pin = DISCOVERY_EXT_I2Cx_SCL_PIN;
8002984: f44f 7380 mov.w r3, #256 ; 0x100
8002988: 61fb str r3, [r7, #28]
gpio_init_structure.Mode = GPIO_MODE_AF_OD;
800298a: 2312 movs r3, #18
800298c: 623b str r3, [r7, #32]
gpio_init_structure.Pull = GPIO_NOPULL;
800298e: 2300 movs r3, #0
8002990: 627b str r3, [r7, #36] ; 0x24
gpio_init_structure.Speed = GPIO_SPEED_FAST;
8002992: 2302 movs r3, #2
8002994: 62bb str r3, [r7, #40] ; 0x28
gpio_init_structure.Alternate = DISCOVERY_EXT_I2Cx_SCL_SDA_AF;
8002996: 2304 movs r3, #4
8002998: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
800299a: f107 031c add.w r3, r7, #28
800299e: 4619 mov r1, r3
80029a0: 481e ldr r0, [pc, #120] ; (8002a1c <I2Cx_MspInit+0x15c>)
80029a2: f005 f92d bl 8007c00 <HAL_GPIO_Init>
gpio_init_structure.Pin = DISCOVERY_EXT_I2Cx_SDA_PIN;
80029a6: f44f 7300 mov.w r3, #512 ; 0x200
80029aa: 61fb str r3, [r7, #28]
HAL_GPIO_Init(DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
80029ac: f107 031c add.w r3, r7, #28
80029b0: 4619 mov r1, r3
80029b2: 481a ldr r0, [pc, #104] ; (8002a1c <I2Cx_MspInit+0x15c>)
80029b4: f005 f924 bl 8007c00 <HAL_GPIO_Init>
DISCOVERY_EXT_I2Cx_CLK_ENABLE();
80029b8: 4b16 ldr r3, [pc, #88] ; (8002a14 <I2Cx_MspInit+0x154>)
80029ba: 6c1b ldr r3, [r3, #64] ; 0x40
80029bc: 4a15 ldr r2, [pc, #84] ; (8002a14 <I2Cx_MspInit+0x154>)
80029be: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
80029c2: 6413 str r3, [r2, #64] ; 0x40
80029c4: 4b13 ldr r3, [pc, #76] ; (8002a14 <I2Cx_MspInit+0x154>)
80029c6: 6c1b ldr r3, [r3, #64] ; 0x40
80029c8: f403 1300 and.w r3, r3, #2097152 ; 0x200000
80029cc: 60fb str r3, [r7, #12]
80029ce: 68fb ldr r3, [r7, #12]
DISCOVERY_EXT_I2Cx_FORCE_RESET();
80029d0: 4b10 ldr r3, [pc, #64] ; (8002a14 <I2Cx_MspInit+0x154>)
80029d2: 6a1b ldr r3, [r3, #32]
80029d4: 4a0f ldr r2, [pc, #60] ; (8002a14 <I2Cx_MspInit+0x154>)
80029d6: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
80029da: 6213 str r3, [r2, #32]
DISCOVERY_EXT_I2Cx_RELEASE_RESET();
80029dc: 4b0d ldr r3, [pc, #52] ; (8002a14 <I2Cx_MspInit+0x154>)
80029de: 6a1b ldr r3, [r3, #32]
80029e0: 4a0c ldr r2, [pc, #48] ; (8002a14 <I2Cx_MspInit+0x154>)
80029e2: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
80029e6: 6213 str r3, [r2, #32]
HAL_NVIC_SetPriority(DISCOVERY_EXT_I2Cx_EV_IRQn, 0x0F, 0);
80029e8: 2200 movs r2, #0
80029ea: 210f movs r1, #15
80029ec: 201f movs r0, #31
80029ee: f003 f957 bl 8005ca0 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DISCOVERY_EXT_I2Cx_EV_IRQn);
80029f2: 201f movs r0, #31
80029f4: f003 f970 bl 8005cd8 <HAL_NVIC_EnableIRQ>
HAL_NVIC_SetPriority(DISCOVERY_EXT_I2Cx_ER_IRQn, 0x0F, 0);
80029f8: 2200 movs r2, #0
80029fa: 210f movs r1, #15
80029fc: 2020 movs r0, #32
80029fe: f003 f94f bl 8005ca0 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DISCOVERY_EXT_I2Cx_ER_IRQn);
8002a02: 2020 movs r0, #32
8002a04: f003 f968 bl 8005cd8 <HAL_NVIC_EnableIRQ>
}
8002a08: bf00 nop
8002a0a: 3730 adds r7, #48 ; 0x30
8002a0c: 46bd mov sp, r7
8002a0e: bd80 pop {r7, pc}
8002a10: 20000390 .word 0x20000390
8002a14: 40023800 .word 0x40023800
8002a18: 40021c00 .word 0x40021c00
8002a1c: 40020400 .word 0x40020400
08002a20 <I2Cx_Init>:
* @brief Initializes I2C HAL.
* @param i2c_handler : I2C handler
* @retval None
*/
static void I2Cx_Init(I2C_HandleTypeDef *i2c_handler)
{
8002a20: b580 push {r7, lr}
8002a22: b082 sub sp, #8
8002a24: af00 add r7, sp, #0
8002a26: 6078 str r0, [r7, #4]
if(HAL_I2C_GetState(i2c_handler) == HAL_I2C_STATE_RESET)
8002a28: 6878 ldr r0, [r7, #4]
8002a2a: f005 febd bl 80087a8 <HAL_I2C_GetState>
8002a2e: 4603 mov r3, r0
8002a30: 2b00 cmp r3, #0
8002a32: d125 bne.n 8002a80 <I2Cx_Init+0x60>
{
if (i2c_handler == (I2C_HandleTypeDef*)(&hI2cAudioHandler))
8002a34: 687b ldr r3, [r7, #4]
8002a36: 4a14 ldr r2, [pc, #80] ; (8002a88 <I2Cx_Init+0x68>)
8002a38: 4293 cmp r3, r2
8002a3a: d103 bne.n 8002a44 <I2Cx_Init+0x24>
{
/* Audio and LCD I2C configuration */
i2c_handler->Instance = DISCOVERY_AUDIO_I2Cx;
8002a3c: 687b ldr r3, [r7, #4]
8002a3e: 4a13 ldr r2, [pc, #76] ; (8002a8c <I2Cx_Init+0x6c>)
8002a40: 601a str r2, [r3, #0]
8002a42: e002 b.n 8002a4a <I2Cx_Init+0x2a>
}
else
{
/* External, camera and Arduino connector I2C configuration */
i2c_handler->Instance = DISCOVERY_EXT_I2Cx;
8002a44: 687b ldr r3, [r7, #4]
8002a46: 4a12 ldr r2, [pc, #72] ; (8002a90 <I2Cx_Init+0x70>)
8002a48: 601a str r2, [r3, #0]
}
i2c_handler->Init.Timing = DISCOVERY_I2Cx_TIMING;
8002a4a: 687b ldr r3, [r7, #4]
8002a4c: 4a11 ldr r2, [pc, #68] ; (8002a94 <I2Cx_Init+0x74>)
8002a4e: 605a str r2, [r3, #4]
i2c_handler->Init.OwnAddress1 = 0;
8002a50: 687b ldr r3, [r7, #4]
8002a52: 2200 movs r2, #0
8002a54: 609a str r2, [r3, #8]
i2c_handler->Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
8002a56: 687b ldr r3, [r7, #4]
8002a58: 2201 movs r2, #1
8002a5a: 60da str r2, [r3, #12]
i2c_handler->Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
8002a5c: 687b ldr r3, [r7, #4]
8002a5e: 2200 movs r2, #0
8002a60: 611a str r2, [r3, #16]
i2c_handler->Init.OwnAddress2 = 0;
8002a62: 687b ldr r3, [r7, #4]
8002a64: 2200 movs r2, #0
8002a66: 615a str r2, [r3, #20]
i2c_handler->Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
8002a68: 687b ldr r3, [r7, #4]
8002a6a: 2200 movs r2, #0
8002a6c: 61da str r2, [r3, #28]
i2c_handler->Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
8002a6e: 687b ldr r3, [r7, #4]
8002a70: 2200 movs r2, #0
8002a72: 621a str r2, [r3, #32]
/* Init the I2C */
I2Cx_MspInit(i2c_handler);
8002a74: 6878 ldr r0, [r7, #4]
8002a76: f7ff ff23 bl 80028c0 <I2Cx_MspInit>
HAL_I2C_Init(i2c_handler);
8002a7a: 6878 ldr r0, [r7, #4]
8002a7c: f005 fba6 bl 80081cc <HAL_I2C_Init>
}
}
8002a80: bf00 nop
8002a82: 3708 adds r7, #8
8002a84: 46bd mov sp, r7
8002a86: bd80 pop {r7, pc}
8002a88: 20000390 .word 0x20000390
8002a8c: 40005c00 .word 0x40005c00
8002a90: 40005400 .word 0x40005400
8002a94: 40912732 .word 0x40912732
08002a98 <I2Cx_ReadMultiple>:
uint8_t Addr,
uint16_t Reg,
uint16_t MemAddress,
uint8_t *Buffer,
uint16_t Length)
{
8002a98: b580 push {r7, lr}
8002a9a: b08a sub sp, #40 ; 0x28
8002a9c: af04 add r7, sp, #16
8002a9e: 60f8 str r0, [r7, #12]
8002aa0: 4608 mov r0, r1
8002aa2: 4611 mov r1, r2
8002aa4: 461a mov r2, r3
8002aa6: 4603 mov r3, r0
8002aa8: 72fb strb r3, [r7, #11]
8002aaa: 460b mov r3, r1
8002aac: 813b strh r3, [r7, #8]
8002aae: 4613 mov r3, r2
8002ab0: 80fb strh r3, [r7, #6]
HAL_StatusTypeDef status = HAL_OK;
8002ab2: 2300 movs r3, #0
8002ab4: 75fb strb r3, [r7, #23]
status = HAL_I2C_Mem_Read(i2c_handler, Addr, (uint16_t)Reg, MemAddress, Buffer, Length, 1000);
8002ab6: 7afb ldrb r3, [r7, #11]
8002ab8: b299 uxth r1, r3
8002aba: 88f8 ldrh r0, [r7, #6]
8002abc: 893a ldrh r2, [r7, #8]
8002abe: f44f 737a mov.w r3, #1000 ; 0x3e8
8002ac2: 9302 str r3, [sp, #8]
8002ac4: 8cbb ldrh r3, [r7, #36] ; 0x24
8002ac6: 9301 str r3, [sp, #4]
8002ac8: 6a3b ldr r3, [r7, #32]
8002aca: 9300 str r3, [sp, #0]
8002acc: 4603 mov r3, r0
8002ace: 68f8 ldr r0, [r7, #12]
8002ad0: f005 fd50 bl 8008574 <HAL_I2C_Mem_Read>
8002ad4: 4603 mov r3, r0
8002ad6: 75fb strb r3, [r7, #23]
/* Check the communication status */
if(status != HAL_OK)
8002ad8: 7dfb ldrb r3, [r7, #23]
8002ada: 2b00 cmp r3, #0
8002adc: d004 beq.n 8002ae8 <I2Cx_ReadMultiple+0x50>
{
/* I2C error occurred */
I2Cx_Error(i2c_handler, Addr);
8002ade: 7afb ldrb r3, [r7, #11]
8002ae0: 4619 mov r1, r3
8002ae2: 68f8 ldr r0, [r7, #12]
8002ae4: f000 f832 bl 8002b4c <I2Cx_Error>
}
return status;
8002ae8: 7dfb ldrb r3, [r7, #23]
}
8002aea: 4618 mov r0, r3
8002aec: 3718 adds r7, #24
8002aee: 46bd mov sp, r7
8002af0: bd80 pop {r7, pc}
08002af2 <I2Cx_WriteMultiple>:
uint8_t Addr,
uint16_t Reg,
uint16_t MemAddress,
uint8_t *Buffer,
uint16_t Length)
{
8002af2: b580 push {r7, lr}
8002af4: b08a sub sp, #40 ; 0x28
8002af6: af04 add r7, sp, #16
8002af8: 60f8 str r0, [r7, #12]
8002afa: 4608 mov r0, r1
8002afc: 4611 mov r1, r2
8002afe: 461a mov r2, r3
8002b00: 4603 mov r3, r0
8002b02: 72fb strb r3, [r7, #11]
8002b04: 460b mov r3, r1
8002b06: 813b strh r3, [r7, #8]
8002b08: 4613 mov r3, r2
8002b0a: 80fb strh r3, [r7, #6]
HAL_StatusTypeDef status = HAL_OK;
8002b0c: 2300 movs r3, #0
8002b0e: 75fb strb r3, [r7, #23]
status = HAL_I2C_Mem_Write(i2c_handler, Addr, (uint16_t)Reg, MemAddress, Buffer, Length, 1000);
8002b10: 7afb ldrb r3, [r7, #11]
8002b12: b299 uxth r1, r3
8002b14: 88f8 ldrh r0, [r7, #6]
8002b16: 893a ldrh r2, [r7, #8]
8002b18: f44f 737a mov.w r3, #1000 ; 0x3e8
8002b1c: 9302 str r3, [sp, #8]
8002b1e: 8cbb ldrh r3, [r7, #36] ; 0x24
8002b20: 9301 str r3, [sp, #4]
8002b22: 6a3b ldr r3, [r7, #32]
8002b24: 9300 str r3, [sp, #0]
8002b26: 4603 mov r3, r0
8002b28: 68f8 ldr r0, [r7, #12]
8002b2a: f005 fc0f bl 800834c <HAL_I2C_Mem_Write>
8002b2e: 4603 mov r3, r0
8002b30: 75fb strb r3, [r7, #23]
/* Check the communication status */
if(status != HAL_OK)
8002b32: 7dfb ldrb r3, [r7, #23]
8002b34: 2b00 cmp r3, #0
8002b36: d004 beq.n 8002b42 <I2Cx_WriteMultiple+0x50>
{
/* Re-Initiaize the I2C Bus */
I2Cx_Error(i2c_handler, Addr);
8002b38: 7afb ldrb r3, [r7, #11]
8002b3a: 4619 mov r1, r3
8002b3c: 68f8 ldr r0, [r7, #12]
8002b3e: f000 f805 bl 8002b4c <I2Cx_Error>
}
return status;
8002b42: 7dfb ldrb r3, [r7, #23]
}
8002b44: 4618 mov r0, r3
8002b46: 3718 adds r7, #24
8002b48: 46bd mov sp, r7
8002b4a: bd80 pop {r7, pc}
08002b4c <I2Cx_Error>:
* @param i2c_handler : I2C handler
* @param Addr: I2C Address
* @retval None
*/
static void I2Cx_Error(I2C_HandleTypeDef *i2c_handler, uint8_t Addr)
{
8002b4c: b580 push {r7, lr}
8002b4e: b082 sub sp, #8
8002b50: af00 add r7, sp, #0
8002b52: 6078 str r0, [r7, #4]
8002b54: 460b mov r3, r1
8002b56: 70fb strb r3, [r7, #3]
/* De-initialize the I2C communication bus */
HAL_I2C_DeInit(i2c_handler);
8002b58: 6878 ldr r0, [r7, #4]
8002b5a: f005 fbc7 bl 80082ec <HAL_I2C_DeInit>
/* Re-Initialize the I2C communication bus */
I2Cx_Init(i2c_handler);
8002b5e: 6878 ldr r0, [r7, #4]
8002b60: f7ff ff5e bl 8002a20 <I2Cx_Init>
}
8002b64: bf00 nop
8002b66: 3708 adds r7, #8
8002b68: 46bd mov sp, r7
8002b6a: bd80 pop {r7, pc}
08002b6c <TS_IO_Init>:
/**
* @brief Initializes Touchscreen low level.
* @retval None
*/
void TS_IO_Init(void)
{
8002b6c: b580 push {r7, lr}
8002b6e: af00 add r7, sp, #0
I2Cx_Init(&hI2cAudioHandler);
8002b70: 4802 ldr r0, [pc, #8] ; (8002b7c <TS_IO_Init+0x10>)
8002b72: f7ff ff55 bl 8002a20 <I2Cx_Init>
}
8002b76: bf00 nop
8002b78: bd80 pop {r7, pc}
8002b7a: bf00 nop
8002b7c: 20000390 .word 0x20000390
08002b80 <TS_IO_Write>:
* @param Reg: Reg address
* @param Value: Data to be written
* @retval None
*/
void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value)
{
8002b80: b580 push {r7, lr}
8002b82: b084 sub sp, #16
8002b84: af02 add r7, sp, #8
8002b86: 4603 mov r3, r0
8002b88: 71fb strb r3, [r7, #7]
8002b8a: 460b mov r3, r1
8002b8c: 71bb strb r3, [r7, #6]
8002b8e: 4613 mov r3, r2
8002b90: 717b strb r3, [r7, #5]
I2Cx_WriteMultiple(&hI2cAudioHandler, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT,(uint8_t*)&Value, 1);
8002b92: 79bb ldrb r3, [r7, #6]
8002b94: b29a uxth r2, r3
8002b96: 79f9 ldrb r1, [r7, #7]
8002b98: 2301 movs r3, #1
8002b9a: 9301 str r3, [sp, #4]
8002b9c: 1d7b adds r3, r7, #5
8002b9e: 9300 str r3, [sp, #0]
8002ba0: 2301 movs r3, #1
8002ba2: 4803 ldr r0, [pc, #12] ; (8002bb0 <TS_IO_Write+0x30>)
8002ba4: f7ff ffa5 bl 8002af2 <I2Cx_WriteMultiple>
}
8002ba8: bf00 nop
8002baa: 3708 adds r7, #8
8002bac: 46bd mov sp, r7
8002bae: bd80 pop {r7, pc}
8002bb0: 20000390 .word 0x20000390
08002bb4 <TS_IO_Read>:
* @param Addr: I2C address
* @param Reg: Reg address
* @retval Data to be read
*/
uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg)
{
8002bb4: b580 push {r7, lr}
8002bb6: b086 sub sp, #24
8002bb8: af02 add r7, sp, #8
8002bba: 4603 mov r3, r0
8002bbc: 460a mov r2, r1
8002bbe: 71fb strb r3, [r7, #7]
8002bc0: 4613 mov r3, r2
8002bc2: 71bb strb r3, [r7, #6]
uint8_t read_value = 0;
8002bc4: 2300 movs r3, #0
8002bc6: 73fb strb r3, [r7, #15]
I2Cx_ReadMultiple(&hI2cAudioHandler, Addr, Reg, I2C_MEMADD_SIZE_8BIT, (uint8_t*)&read_value, 1);
8002bc8: 79bb ldrb r3, [r7, #6]
8002bca: b29a uxth r2, r3
8002bcc: 79f9 ldrb r1, [r7, #7]
8002bce: 2301 movs r3, #1
8002bd0: 9301 str r3, [sp, #4]
8002bd2: f107 030f add.w r3, r7, #15
8002bd6: 9300 str r3, [sp, #0]
8002bd8: 2301 movs r3, #1
8002bda: 4804 ldr r0, [pc, #16] ; (8002bec <TS_IO_Read+0x38>)
8002bdc: f7ff ff5c bl 8002a98 <I2Cx_ReadMultiple>
return read_value;
8002be0: 7bfb ldrb r3, [r7, #15]
}
8002be2: 4618 mov r0, r3
8002be4: 3710 adds r7, #16
8002be6: 46bd mov sp, r7
8002be8: bd80 pop {r7, pc}
8002bea: bf00 nop
8002bec: 20000390 .word 0x20000390
08002bf0 <TS_IO_Delay>:
* @brief TS delay
* @param Delay: Delay in ms
* @retval None
*/
void TS_IO_Delay(uint32_t Delay)
{
8002bf0: b580 push {r7, lr}
8002bf2: b082 sub sp, #8
8002bf4: af00 add r7, sp, #0
8002bf6: 6078 str r0, [r7, #4]
HAL_Delay(Delay);
8002bf8: 6878 ldr r0, [r7, #4]
8002bfa: f002 fb9d bl 8005338 <HAL_Delay>
}
8002bfe: bf00 nop
8002c00: 3708 adds r7, #8
8002c02: 46bd mov sp, r7
8002c04: bd80 pop {r7, pc}
...
08002c08 <BSP_LCD_Init>:
/**
* @brief Initializes the LCD.
* @retval LCD state
*/
uint8_t BSP_LCD_Init(void)
{
8002c08: b580 push {r7, lr}
8002c0a: af00 add r7, sp, #0
/* Select the used LCD */
/* The RK043FN48H LCD 480x272 is selected */
/* Timing Configuration */
hLtdcHandler.Init.HorizontalSync = (RK043FN48H_HSYNC - 1);
8002c0c: 4b31 ldr r3, [pc, #196] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c0e: 2228 movs r2, #40 ; 0x28
8002c10: 615a str r2, [r3, #20]
hLtdcHandler.Init.VerticalSync = (RK043FN48H_VSYNC - 1);
8002c12: 4b30 ldr r3, [pc, #192] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c14: 2209 movs r2, #9
8002c16: 619a str r2, [r3, #24]
hLtdcHandler.Init.AccumulatedHBP = (RK043FN48H_HSYNC + RK043FN48H_HBP - 1);
8002c18: 4b2e ldr r3, [pc, #184] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c1a: 2235 movs r2, #53 ; 0x35
8002c1c: 61da str r2, [r3, #28]
hLtdcHandler.Init.AccumulatedVBP = (RK043FN48H_VSYNC + RK043FN48H_VBP - 1);
8002c1e: 4b2d ldr r3, [pc, #180] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c20: 220b movs r2, #11
8002c22: 621a str r2, [r3, #32]
hLtdcHandler.Init.AccumulatedActiveH = (RK043FN48H_HEIGHT + RK043FN48H_VSYNC + RK043FN48H_VBP - 1);
8002c24: 4b2b ldr r3, [pc, #172] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c26: f240 121b movw r2, #283 ; 0x11b
8002c2a: 629a str r2, [r3, #40] ; 0x28
hLtdcHandler.Init.AccumulatedActiveW = (RK043FN48H_WIDTH + RK043FN48H_HSYNC + RK043FN48H_HBP - 1);
8002c2c: 4b29 ldr r3, [pc, #164] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c2e: f240 2215 movw r2, #533 ; 0x215
8002c32: 625a str r2, [r3, #36] ; 0x24
hLtdcHandler.Init.TotalHeigh = (RK043FN48H_HEIGHT + RK043FN48H_VSYNC + RK043FN48H_VBP + RK043FN48H_VFP - 1);
8002c34: 4b27 ldr r3, [pc, #156] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c36: f240 121d movw r2, #285 ; 0x11d
8002c3a: 631a str r2, [r3, #48] ; 0x30
hLtdcHandler.Init.TotalWidth = (RK043FN48H_WIDTH + RK043FN48H_HSYNC + RK043FN48H_HBP + RK043FN48H_HFP - 1);
8002c3c: 4b25 ldr r3, [pc, #148] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c3e: f240 2235 movw r2, #565 ; 0x235
8002c42: 62da str r2, [r3, #44] ; 0x2c
/* LCD clock configuration */
BSP_LCD_ClockConfig(&hLtdcHandler, NULL);
8002c44: 2100 movs r1, #0
8002c46: 4823 ldr r0, [pc, #140] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c48: f000 fee8 bl 8003a1c <BSP_LCD_ClockConfig>
/* Initialize the LCD pixel width and pixel height */
hLtdcHandler.LayerCfg->ImageWidth = RK043FN48H_WIDTH;
8002c4c: 4b21 ldr r3, [pc, #132] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c4e: f44f 72f0 mov.w r2, #480 ; 0x1e0
8002c52: 661a str r2, [r3, #96] ; 0x60
hLtdcHandler.LayerCfg->ImageHeight = RK043FN48H_HEIGHT;
8002c54: 4b1f ldr r3, [pc, #124] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c56: f44f 7288 mov.w r2, #272 ; 0x110
8002c5a: 665a str r2, [r3, #100] ; 0x64
/* Background value */
hLtdcHandler.Init.Backcolor.Blue = 0;
8002c5c: 4b1d ldr r3, [pc, #116] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c5e: 2200 movs r2, #0
8002c60: f883 2034 strb.w r2, [r3, #52] ; 0x34
hLtdcHandler.Init.Backcolor.Green = 0;
8002c64: 4b1b ldr r3, [pc, #108] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c66: 2200 movs r2, #0
8002c68: f883 2035 strb.w r2, [r3, #53] ; 0x35
hLtdcHandler.Init.Backcolor.Red = 0;
8002c6c: 4b19 ldr r3, [pc, #100] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c6e: 2200 movs r2, #0
8002c70: f883 2036 strb.w r2, [r3, #54] ; 0x36
/* Polarity */
hLtdcHandler.Init.HSPolarity = LTDC_HSPOLARITY_AL;
8002c74: 4b17 ldr r3, [pc, #92] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c76: 2200 movs r2, #0
8002c78: 605a str r2, [r3, #4]
hLtdcHandler.Init.VSPolarity = LTDC_VSPOLARITY_AL;
8002c7a: 4b16 ldr r3, [pc, #88] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c7c: 2200 movs r2, #0
8002c7e: 609a str r2, [r3, #8]
hLtdcHandler.Init.DEPolarity = LTDC_DEPOLARITY_AL;
8002c80: 4b14 ldr r3, [pc, #80] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c82: 2200 movs r2, #0
8002c84: 60da str r2, [r3, #12]
hLtdcHandler.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
8002c86: 4b13 ldr r3, [pc, #76] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c88: 2200 movs r2, #0
8002c8a: 611a str r2, [r3, #16]
hLtdcHandler.Instance = LTDC;
8002c8c: 4b11 ldr r3, [pc, #68] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c8e: 4a12 ldr r2, [pc, #72] ; (8002cd8 <BSP_LCD_Init+0xd0>)
8002c90: 601a str r2, [r3, #0]
if(HAL_LTDC_GetState(&hLtdcHandler) == HAL_LTDC_STATE_RESET)
8002c92: 4810 ldr r0, [pc, #64] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002c94: f006 fa1a bl 80090cc <HAL_LTDC_GetState>
8002c98: 4603 mov r3, r0
8002c9a: 2b00 cmp r3, #0
8002c9c: d103 bne.n 8002ca6 <BSP_LCD_Init+0x9e>
{
/* Initialize the LCD Msp: this __weak function can be rewritten by the application */
BSP_LCD_MspInit(&hLtdcHandler, NULL);
8002c9e: 2100 movs r1, #0
8002ca0: 480c ldr r0, [pc, #48] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002ca2: f000 fde1 bl 8003868 <BSP_LCD_MspInit>
}
HAL_LTDC_Init(&hLtdcHandler);
8002ca6: 480b ldr r0, [pc, #44] ; (8002cd4 <BSP_LCD_Init+0xcc>)
8002ca8: f006 f840 bl 8008d2c <HAL_LTDC_Init>
/* Assert display enable LCD_DISP pin */
HAL_GPIO_WritePin(LCD_DISP_GPIO_PORT, LCD_DISP_PIN, GPIO_PIN_SET);
8002cac: 2201 movs r2, #1
8002cae: f44f 5180 mov.w r1, #4096 ; 0x1000
8002cb2: 480a ldr r0, [pc, #40] ; (8002cdc <BSP_LCD_Init+0xd4>)
8002cb4: f005 fa70 bl 8008198 <HAL_GPIO_WritePin>
/* Assert backlight LCD_BL_CTRL pin */
HAL_GPIO_WritePin(LCD_BL_CTRL_GPIO_PORT, LCD_BL_CTRL_PIN, GPIO_PIN_SET);
8002cb8: 2201 movs r2, #1
8002cba: 2108 movs r1, #8
8002cbc: 4808 ldr r0, [pc, #32] ; (8002ce0 <BSP_LCD_Init+0xd8>)
8002cbe: f005 fa6b bl 8008198 <HAL_GPIO_WritePin>
#if !defined(DATA_IN_ExtSDRAM)
/* Initialize the SDRAM */
BSP_SDRAM_Init();
8002cc2: f001 f80f bl 8003ce4 <BSP_SDRAM_Init>
#endif
/* Initialize the font */
BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
8002cc6: 4807 ldr r0, [pc, #28] ; (8002ce4 <BSP_LCD_Init+0xdc>)
8002cc8: f000 f8d8 bl 8002e7c <BSP_LCD_SetFont>
return LCD_OK;
8002ccc: 2300 movs r3, #0
}
8002cce: 4618 mov r0, r3
8002cd0: bd80 pop {r7, pc}
8002cd2: bf00 nop
8002cd4: 20008e70 .word 0x20008e70
8002cd8: 40016800 .word 0x40016800
8002cdc: 40022000 .word 0x40022000
8002ce0: 40022800 .word 0x40022800
8002ce4: 20000050 .word 0x20000050
08002ce8 <BSP_LCD_GetXSize>:
/**
* @brief Gets the LCD X size.
* @retval Used LCD X size
*/
uint32_t BSP_LCD_GetXSize(void)
{
8002ce8: b480 push {r7}
8002cea: af00 add r7, sp, #0
return hLtdcHandler.LayerCfg[ActiveLayer].ImageWidth;
8002cec: 4b06 ldr r3, [pc, #24] ; (8002d08 <BSP_LCD_GetXSize+0x20>)
8002cee: 681b ldr r3, [r3, #0]
8002cf0: 4a06 ldr r2, [pc, #24] ; (8002d0c <BSP_LCD_GetXSize+0x24>)
8002cf2: 2134 movs r1, #52 ; 0x34
8002cf4: fb01 f303 mul.w r3, r1, r3
8002cf8: 4413 add r3, r2
8002cfa: 3360 adds r3, #96 ; 0x60
8002cfc: 681b ldr r3, [r3, #0]
}
8002cfe: 4618 mov r0, r3
8002d00: 46bd mov sp, r7
8002d02: f85d 7b04 ldr.w r7, [sp], #4
8002d06: 4770 bx lr
8002d08: 2000041c .word 0x2000041c
8002d0c: 20008e70 .word 0x20008e70
08002d10 <BSP_LCD_GetYSize>:
/**
* @brief Gets the LCD Y size.
* @retval Used LCD Y size
*/
uint32_t BSP_LCD_GetYSize(void)
{
8002d10: b480 push {r7}
8002d12: af00 add r7, sp, #0
return hLtdcHandler.LayerCfg[ActiveLayer].ImageHeight;
8002d14: 4b06 ldr r3, [pc, #24] ; (8002d30 <BSP_LCD_GetYSize+0x20>)
8002d16: 681b ldr r3, [r3, #0]
8002d18: 4a06 ldr r2, [pc, #24] ; (8002d34 <BSP_LCD_GetYSize+0x24>)
8002d1a: 2134 movs r1, #52 ; 0x34
8002d1c: fb01 f303 mul.w r3, r1, r3
8002d20: 4413 add r3, r2
8002d22: 3364 adds r3, #100 ; 0x64
8002d24: 681b ldr r3, [r3, #0]
}
8002d26: 4618 mov r0, r3
8002d28: 46bd mov sp, r7
8002d2a: f85d 7b04 ldr.w r7, [sp], #4
8002d2e: 4770 bx lr
8002d30: 2000041c .word 0x2000041c
8002d34: 20008e70 .word 0x20008e70
08002d38 <BSP_LCD_LayerDefaultInit>:
* @param LayerIndex: Layer foreground or background
* @param FB_Address: Layer frame buffer
* @retval None
*/
void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address)
{
8002d38: b580 push {r7, lr}
8002d3a: b090 sub sp, #64 ; 0x40
8002d3c: af00 add r7, sp, #0
8002d3e: 4603 mov r3, r0
8002d40: 6039 str r1, [r7, #0]
8002d42: 80fb strh r3, [r7, #6]
LCD_LayerCfgTypeDef layer_cfg;
/* Layer Init */
layer_cfg.WindowX0 = 0;
8002d44: 2300 movs r3, #0
8002d46: 60fb str r3, [r7, #12]
layer_cfg.WindowX1 = BSP_LCD_GetXSize();
8002d48: f7ff ffce bl 8002ce8 <BSP_LCD_GetXSize>
8002d4c: 4603 mov r3, r0
8002d4e: 613b str r3, [r7, #16]
layer_cfg.WindowY0 = 0;
8002d50: 2300 movs r3, #0
8002d52: 617b str r3, [r7, #20]
layer_cfg.WindowY1 = BSP_LCD_GetYSize();
8002d54: f7ff ffdc bl 8002d10 <BSP_LCD_GetYSize>
8002d58: 4603 mov r3, r0
8002d5a: 61bb str r3, [r7, #24]
layer_cfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
8002d5c: 2300 movs r3, #0
8002d5e: 61fb str r3, [r7, #28]
layer_cfg.FBStartAdress = FB_Address;
8002d60: 683b ldr r3, [r7, #0]
8002d62: 633b str r3, [r7, #48] ; 0x30
layer_cfg.Alpha = 255;
8002d64: 23ff movs r3, #255 ; 0xff
8002d66: 623b str r3, [r7, #32]
layer_cfg.Alpha0 = 0;
8002d68: 2300 movs r3, #0
8002d6a: 627b str r3, [r7, #36] ; 0x24
layer_cfg.Backcolor.Blue = 0;
8002d6c: 2300 movs r3, #0
8002d6e: f887 303c strb.w r3, [r7, #60] ; 0x3c
layer_cfg.Backcolor.Green = 0;
8002d72: 2300 movs r3, #0
8002d74: f887 303d strb.w r3, [r7, #61] ; 0x3d
layer_cfg.Backcolor.Red = 0;
8002d78: 2300 movs r3, #0
8002d7a: f887 303e strb.w r3, [r7, #62] ; 0x3e
layer_cfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA;
8002d7e: f44f 63c0 mov.w r3, #1536 ; 0x600
8002d82: 62bb str r3, [r7, #40] ; 0x28
layer_cfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA;
8002d84: 2307 movs r3, #7
8002d86: 62fb str r3, [r7, #44] ; 0x2c
layer_cfg.ImageWidth = BSP_LCD_GetXSize();
8002d88: f7ff ffae bl 8002ce8 <BSP_LCD_GetXSize>
8002d8c: 4603 mov r3, r0
8002d8e: 637b str r3, [r7, #52] ; 0x34
layer_cfg.ImageHeight = BSP_LCD_GetYSize();
8002d90: f7ff ffbe bl 8002d10 <BSP_LCD_GetYSize>
8002d94: 4603 mov r3, r0
8002d96: 63bb str r3, [r7, #56] ; 0x38
HAL_LTDC_ConfigLayer(&hLtdcHandler, &layer_cfg, LayerIndex);
8002d98: 88fa ldrh r2, [r7, #6]
8002d9a: f107 030c add.w r3, r7, #12
8002d9e: 4619 mov r1, r3
8002da0: 4812 ldr r0, [pc, #72] ; (8002dec <BSP_LCD_LayerDefaultInit+0xb4>)
8002da2: f006 f955 bl 8009050 <HAL_LTDC_ConfigLayer>
DrawProp[LayerIndex].BackColor = LCD_COLOR_WHITE;
8002da6: 88fa ldrh r2, [r7, #6]
8002da8: 4911 ldr r1, [pc, #68] ; (8002df0 <BSP_LCD_LayerDefaultInit+0xb8>)
8002daa: 4613 mov r3, r2
8002dac: 005b lsls r3, r3, #1
8002dae: 4413 add r3, r2
8002db0: 009b lsls r3, r3, #2
8002db2: 440b add r3, r1
8002db4: 3304 adds r3, #4
8002db6: f04f 32ff mov.w r2, #4294967295
8002dba: 601a str r2, [r3, #0]
DrawProp[LayerIndex].pFont = &Font24;
8002dbc: 88fa ldrh r2, [r7, #6]
8002dbe: 490c ldr r1, [pc, #48] ; (8002df0 <BSP_LCD_LayerDefaultInit+0xb8>)
8002dc0: 4613 mov r3, r2
8002dc2: 005b lsls r3, r3, #1
8002dc4: 4413 add r3, r2
8002dc6: 009b lsls r3, r3, #2
8002dc8: 440b add r3, r1
8002dca: 3308 adds r3, #8
8002dcc: 4a09 ldr r2, [pc, #36] ; (8002df4 <BSP_LCD_LayerDefaultInit+0xbc>)
8002dce: 601a str r2, [r3, #0]
DrawProp[LayerIndex].TextColor = LCD_COLOR_BLACK;
8002dd0: 88fa ldrh r2, [r7, #6]
8002dd2: 4907 ldr r1, [pc, #28] ; (8002df0 <BSP_LCD_LayerDefaultInit+0xb8>)
8002dd4: 4613 mov r3, r2
8002dd6: 005b lsls r3, r3, #1
8002dd8: 4413 add r3, r2
8002dda: 009b lsls r3, r3, #2
8002ddc: 440b add r3, r1
8002dde: f04f 427f mov.w r2, #4278190080 ; 0xff000000
8002de2: 601a str r2, [r3, #0]
}
8002de4: bf00 nop
8002de6: 3740 adds r7, #64 ; 0x40
8002de8: 46bd mov sp, r7
8002dea: bd80 pop {r7, pc}
8002dec: 20008e70 .word 0x20008e70
8002df0: 20000420 .word 0x20000420
8002df4: 20000050 .word 0x20000050
08002df8 <BSP_LCD_SelectLayer>:
* @brief Selects the LCD Layer.
* @param LayerIndex: Layer foreground or background
* @retval None
*/
void BSP_LCD_SelectLayer(uint32_t LayerIndex)
{
8002df8: b480 push {r7}
8002dfa: b083 sub sp, #12
8002dfc: af00 add r7, sp, #0
8002dfe: 6078 str r0, [r7, #4]
ActiveLayer = LayerIndex;
8002e00: 4a04 ldr r2, [pc, #16] ; (8002e14 <BSP_LCD_SelectLayer+0x1c>)
8002e02: 687b ldr r3, [r7, #4]
8002e04: 6013 str r3, [r2, #0]
}
8002e06: bf00 nop
8002e08: 370c adds r7, #12
8002e0a: 46bd mov sp, r7
8002e0c: f85d 7b04 ldr.w r7, [sp], #4
8002e10: 4770 bx lr
8002e12: bf00 nop
8002e14: 2000041c .word 0x2000041c
08002e18 <BSP_LCD_SetTextColor>:
* @brief Sets the LCD text color.
* @param Color: Text color code ARGB(8-8-8-8)
* @retval None
*/
void BSP_LCD_SetTextColor(uint32_t Color)
{
8002e18: b480 push {r7}
8002e1a: b083 sub sp, #12
8002e1c: af00 add r7, sp, #0
8002e1e: 6078 str r0, [r7, #4]
DrawProp[ActiveLayer].TextColor = Color;
8002e20: 4b07 ldr r3, [pc, #28] ; (8002e40 <BSP_LCD_SetTextColor+0x28>)
8002e22: 681a ldr r2, [r3, #0]
8002e24: 4907 ldr r1, [pc, #28] ; (8002e44 <BSP_LCD_SetTextColor+0x2c>)
8002e26: 4613 mov r3, r2
8002e28: 005b lsls r3, r3, #1
8002e2a: 4413 add r3, r2
8002e2c: 009b lsls r3, r3, #2
8002e2e: 440b add r3, r1
8002e30: 687a ldr r2, [r7, #4]
8002e32: 601a str r2, [r3, #0]
}
8002e34: bf00 nop
8002e36: 370c adds r7, #12
8002e38: 46bd mov sp, r7
8002e3a: f85d 7b04 ldr.w r7, [sp], #4
8002e3e: 4770 bx lr
8002e40: 2000041c .word 0x2000041c
8002e44: 20000420 .word 0x20000420
08002e48 <BSP_LCD_SetBackColor>:
* @brief Sets the LCD background color.
* @param Color: Layer background color code ARGB(8-8-8-8)
* @retval None
*/
void BSP_LCD_SetBackColor(uint32_t Color)
{
8002e48: b480 push {r7}
8002e4a: b083 sub sp, #12
8002e4c: af00 add r7, sp, #0
8002e4e: 6078 str r0, [r7, #4]
DrawProp[ActiveLayer].BackColor = Color;
8002e50: 4b08 ldr r3, [pc, #32] ; (8002e74 <BSP_LCD_SetBackColor+0x2c>)
8002e52: 681a ldr r2, [r3, #0]
8002e54: 4908 ldr r1, [pc, #32] ; (8002e78 <BSP_LCD_SetBackColor+0x30>)
8002e56: 4613 mov r3, r2
8002e58: 005b lsls r3, r3, #1
8002e5a: 4413 add r3, r2
8002e5c: 009b lsls r3, r3, #2
8002e5e: 440b add r3, r1
8002e60: 3304 adds r3, #4
8002e62: 687a ldr r2, [r7, #4]
8002e64: 601a str r2, [r3, #0]
}
8002e66: bf00 nop
8002e68: 370c adds r7, #12
8002e6a: 46bd mov sp, r7
8002e6c: f85d 7b04 ldr.w r7, [sp], #4
8002e70: 4770 bx lr
8002e72: bf00 nop
8002e74: 2000041c .word 0x2000041c
8002e78: 20000420 .word 0x20000420
08002e7c <BSP_LCD_SetFont>:
* @brief Sets the LCD text font.
* @param fonts: Layer font to be used
* @retval None
*/
void BSP_LCD_SetFont(sFONT *fonts)
{
8002e7c: b480 push {r7}
8002e7e: b083 sub sp, #12
8002e80: af00 add r7, sp, #0
8002e82: 6078 str r0, [r7, #4]
DrawProp[ActiveLayer].pFont = fonts;
8002e84: 4b08 ldr r3, [pc, #32] ; (8002ea8 <BSP_LCD_SetFont+0x2c>)
8002e86: 681a ldr r2, [r3, #0]
8002e88: 4908 ldr r1, [pc, #32] ; (8002eac <BSP_LCD_SetFont+0x30>)
8002e8a: 4613 mov r3, r2
8002e8c: 005b lsls r3, r3, #1
8002e8e: 4413 add r3, r2
8002e90: 009b lsls r3, r3, #2
8002e92: 440b add r3, r1
8002e94: 3308 adds r3, #8
8002e96: 687a ldr r2, [r7, #4]
8002e98: 601a str r2, [r3, #0]
}
8002e9a: bf00 nop
8002e9c: 370c adds r7, #12
8002e9e: 46bd mov sp, r7
8002ea0: f85d 7b04 ldr.w r7, [sp], #4
8002ea4: 4770 bx lr
8002ea6: bf00 nop
8002ea8: 2000041c .word 0x2000041c
8002eac: 20000420 .word 0x20000420
08002eb0 <BSP_LCD_GetFont>:
/**
* @brief Gets the LCD text font.
* @retval Used layer font
*/
sFONT *BSP_LCD_GetFont(void)
{
8002eb0: b480 push {r7}
8002eb2: af00 add r7, sp, #0
return DrawProp[ActiveLayer].pFont;
8002eb4: 4b07 ldr r3, [pc, #28] ; (8002ed4 <BSP_LCD_GetFont+0x24>)
8002eb6: 681a ldr r2, [r3, #0]
8002eb8: 4907 ldr r1, [pc, #28] ; (8002ed8 <BSP_LCD_GetFont+0x28>)
8002eba: 4613 mov r3, r2
8002ebc: 005b lsls r3, r3, #1
8002ebe: 4413 add r3, r2
8002ec0: 009b lsls r3, r3, #2
8002ec2: 440b add r3, r1
8002ec4: 3308 adds r3, #8
8002ec6: 681b ldr r3, [r3, #0]
}
8002ec8: 4618 mov r0, r3
8002eca: 46bd mov sp, r7
8002ecc: f85d 7b04 ldr.w r7, [sp], #4
8002ed0: 4770 bx lr
8002ed2: bf00 nop
8002ed4: 2000041c .word 0x2000041c
8002ed8: 20000420 .word 0x20000420
08002edc <BSP_LCD_Clear>:
* @brief Clears the hole LCD.
* @param Color: Color of the background
* @retval None
*/
void BSP_LCD_Clear(uint32_t Color)
{
8002edc: b5f0 push {r4, r5, r6, r7, lr}
8002ede: b085 sub sp, #20
8002ee0: af02 add r7, sp, #8
8002ee2: 6078 str r0, [r7, #4]
/* Clear the LCD */
LL_FillBuffer(ActiveLayer, (uint32_t *)(hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress), BSP_LCD_GetXSize(), BSP_LCD_GetYSize(), 0, Color);
8002ee4: 4b0f ldr r3, [pc, #60] ; (8002f24 <BSP_LCD_Clear+0x48>)
8002ee6: 681c ldr r4, [r3, #0]
8002ee8: 4b0e ldr r3, [pc, #56] ; (8002f24 <BSP_LCD_Clear+0x48>)
8002eea: 681b ldr r3, [r3, #0]
8002eec: 4a0e ldr r2, [pc, #56] ; (8002f28 <BSP_LCD_Clear+0x4c>)
8002eee: 2134 movs r1, #52 ; 0x34
8002ef0: fb01 f303 mul.w r3, r1, r3
8002ef4: 4413 add r3, r2
8002ef6: 335c adds r3, #92 ; 0x5c
8002ef8: 681b ldr r3, [r3, #0]
8002efa: 461d mov r5, r3
8002efc: f7ff fef4 bl 8002ce8 <BSP_LCD_GetXSize>
8002f00: 4606 mov r6, r0
8002f02: f7ff ff05 bl 8002d10 <BSP_LCD_GetYSize>
8002f06: 4602 mov r2, r0
8002f08: 687b ldr r3, [r7, #4]
8002f0a: 9301 str r3, [sp, #4]
8002f0c: 2300 movs r3, #0
8002f0e: 9300 str r3, [sp, #0]
8002f10: 4613 mov r3, r2
8002f12: 4632 mov r2, r6
8002f14: 4629 mov r1, r5
8002f16: 4620 mov r0, r4
8002f18: f000 fe54 bl 8003bc4 <LL_FillBuffer>
}
8002f1c: bf00 nop
8002f1e: 370c adds r7, #12
8002f20: 46bd mov sp, r7
8002f22: bdf0 pop {r4, r5, r6, r7, pc}
8002f24: 2000041c .word 0x2000041c
8002f28: 20008e70 .word 0x20008e70
08002f2c <BSP_LCD_DisplayChar>:
* @param Ascii: Character ascii code
* This parameter must be a number between Min_Data = 0x20 and Max_Data = 0x7E
* @retval None
*/
void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii)
{
8002f2c: b590 push {r4, r7, lr}
8002f2e: b083 sub sp, #12
8002f30: af00 add r7, sp, #0
8002f32: 4603 mov r3, r0
8002f34: 80fb strh r3, [r7, #6]
8002f36: 460b mov r3, r1
8002f38: 80bb strh r3, [r7, #4]
8002f3a: 4613 mov r3, r2
8002f3c: 70fb strb r3, [r7, #3]
DrawChar(Xpos, Ypos, &DrawProp[ActiveLayer].pFont->table[(Ascii-' ') *\
8002f3e: 4b1b ldr r3, [pc, #108] ; (8002fac <BSP_LCD_DisplayChar+0x80>)
8002f40: 681a ldr r2, [r3, #0]
8002f42: 491b ldr r1, [pc, #108] ; (8002fb0 <BSP_LCD_DisplayChar+0x84>)
8002f44: 4613 mov r3, r2
8002f46: 005b lsls r3, r3, #1
8002f48: 4413 add r3, r2
8002f4a: 009b lsls r3, r3, #2
8002f4c: 440b add r3, r1
8002f4e: 3308 adds r3, #8
8002f50: 681b ldr r3, [r3, #0]
8002f52: 6819 ldr r1, [r3, #0]
8002f54: 78fb ldrb r3, [r7, #3]
8002f56: f1a3 0020 sub.w r0, r3, #32
DrawProp[ActiveLayer].pFont->Height * ((DrawProp[ActiveLayer].pFont->Width + 7) / 8)]);
8002f5a: 4b14 ldr r3, [pc, #80] ; (8002fac <BSP_LCD_DisplayChar+0x80>)
8002f5c: 681a ldr r2, [r3, #0]
8002f5e: 4c14 ldr r4, [pc, #80] ; (8002fb0 <BSP_LCD_DisplayChar+0x84>)
8002f60: 4613 mov r3, r2
8002f62: 005b lsls r3, r3, #1
8002f64: 4413 add r3, r2
8002f66: 009b lsls r3, r3, #2
8002f68: 4423 add r3, r4
8002f6a: 3308 adds r3, #8
8002f6c: 681b ldr r3, [r3, #0]
8002f6e: 88db ldrh r3, [r3, #6]
DrawChar(Xpos, Ypos, &DrawProp[ActiveLayer].pFont->table[(Ascii-' ') *\
8002f70: fb03 f000 mul.w r0, r3, r0
DrawProp[ActiveLayer].pFont->Height * ((DrawProp[ActiveLayer].pFont->Width + 7) / 8)]);
8002f74: 4b0d ldr r3, [pc, #52] ; (8002fac <BSP_LCD_DisplayChar+0x80>)
8002f76: 681a ldr r2, [r3, #0]
8002f78: 4c0d ldr r4, [pc, #52] ; (8002fb0 <BSP_LCD_DisplayChar+0x84>)
8002f7a: 4613 mov r3, r2
8002f7c: 005b lsls r3, r3, #1
8002f7e: 4413 add r3, r2
8002f80: 009b lsls r3, r3, #2
8002f82: 4423 add r3, r4
8002f84: 3308 adds r3, #8
8002f86: 681b ldr r3, [r3, #0]
8002f88: 889b ldrh r3, [r3, #4]
8002f8a: 3307 adds r3, #7
8002f8c: 2b00 cmp r3, #0
8002f8e: da00 bge.n 8002f92 <BSP_LCD_DisplayChar+0x66>
8002f90: 3307 adds r3, #7
8002f92: 10db asrs r3, r3, #3
8002f94: fb03 f300 mul.w r3, r3, r0
DrawChar(Xpos, Ypos, &DrawProp[ActiveLayer].pFont->table[(Ascii-' ') *\
8002f98: 18ca adds r2, r1, r3
8002f9a: 88b9 ldrh r1, [r7, #4]
8002f9c: 88fb ldrh r3, [r7, #6]
8002f9e: 4618 mov r0, r3
8002fa0: f000 fd58 bl 8003a54 <DrawChar>
}
8002fa4: bf00 nop
8002fa6: 370c adds r7, #12
8002fa8: 46bd mov sp, r7
8002faa: bd90 pop {r4, r7, pc}
8002fac: 2000041c .word 0x2000041c
8002fb0: 20000420 .word 0x20000420
08002fb4 <BSP_LCD_DisplayStringAt>:
* @arg RIGHT_MODE
* @arg LEFT_MODE
* @retval None
*/
void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Text_AlignModeTypdef Mode)
{
8002fb4: b5b0 push {r4, r5, r7, lr}
8002fb6: b088 sub sp, #32
8002fb8: af00 add r7, sp, #0
8002fba: 60ba str r2, [r7, #8]
8002fbc: 461a mov r2, r3
8002fbe: 4603 mov r3, r0
8002fc0: 81fb strh r3, [r7, #14]
8002fc2: 460b mov r3, r1
8002fc4: 81bb strh r3, [r7, #12]
8002fc6: 4613 mov r3, r2
8002fc8: 71fb strb r3, [r7, #7]
uint16_t ref_column = 1, i = 0;
8002fca: 2301 movs r3, #1
8002fcc: 83fb strh r3, [r7, #30]
8002fce: 2300 movs r3, #0
8002fd0: 83bb strh r3, [r7, #28]
uint32_t size = 0, xsize = 0;
8002fd2: 2300 movs r3, #0
8002fd4: 61bb str r3, [r7, #24]
8002fd6: 2300 movs r3, #0
8002fd8: 613b str r3, [r7, #16]
uint8_t *ptr = Text;
8002fda: 68bb ldr r3, [r7, #8]
8002fdc: 617b str r3, [r7, #20]
/* Get the text size */
while (*ptr++) size ++ ;
8002fde: e002 b.n 8002fe6 <BSP_LCD_DisplayStringAt+0x32>
8002fe0: 69bb ldr r3, [r7, #24]
8002fe2: 3301 adds r3, #1
8002fe4: 61bb str r3, [r7, #24]
8002fe6: 697b ldr r3, [r7, #20]
8002fe8: 1c5a adds r2, r3, #1
8002fea: 617a str r2, [r7, #20]
8002fec: 781b ldrb r3, [r3, #0]
8002fee: 2b00 cmp r3, #0
8002ff0: d1f6 bne.n 8002fe0 <BSP_LCD_DisplayStringAt+0x2c>
/* Characters number per line */
xsize = (BSP_LCD_GetXSize()/DrawProp[ActiveLayer].pFont->Width);
8002ff2: f7ff fe79 bl 8002ce8 <BSP_LCD_GetXSize>
8002ff6: 4b4f ldr r3, [pc, #316] ; (8003134 <BSP_LCD_DisplayStringAt+0x180>)
8002ff8: 681a ldr r2, [r3, #0]
8002ffa: 494f ldr r1, [pc, #316] ; (8003138 <BSP_LCD_DisplayStringAt+0x184>)
8002ffc: 4613 mov r3, r2
8002ffe: 005b lsls r3, r3, #1
8003000: 4413 add r3, r2
8003002: 009b lsls r3, r3, #2
8003004: 440b add r3, r1
8003006: 3308 adds r3, #8
8003008: 681b ldr r3, [r3, #0]
800300a: 889b ldrh r3, [r3, #4]
800300c: fbb0 f3f3 udiv r3, r0, r3
8003010: 613b str r3, [r7, #16]
switch (Mode)
8003012: 79fb ldrb r3, [r7, #7]
8003014: 2b02 cmp r3, #2
8003016: d01c beq.n 8003052 <BSP_LCD_DisplayStringAt+0x9e>
8003018: 2b03 cmp r3, #3
800301a: d017 beq.n 800304c <BSP_LCD_DisplayStringAt+0x98>
800301c: 2b01 cmp r3, #1
800301e: d12e bne.n 800307e <BSP_LCD_DisplayStringAt+0xca>
{
case CENTER_MODE:
{
ref_column = Xpos + ((xsize - size)* DrawProp[ActiveLayer].pFont->Width) / 2;
8003020: 693a ldr r2, [r7, #16]
8003022: 69bb ldr r3, [r7, #24]
8003024: 1ad1 subs r1, r2, r3
8003026: 4b43 ldr r3, [pc, #268] ; (8003134 <BSP_LCD_DisplayStringAt+0x180>)
8003028: 681a ldr r2, [r3, #0]
800302a: 4843 ldr r0, [pc, #268] ; (8003138 <BSP_LCD_DisplayStringAt+0x184>)
800302c: 4613 mov r3, r2
800302e: 005b lsls r3, r3, #1
8003030: 4413 add r3, r2
8003032: 009b lsls r3, r3, #2
8003034: 4403 add r3, r0
8003036: 3308 adds r3, #8
8003038: 681b ldr r3, [r3, #0]
800303a: 889b ldrh r3, [r3, #4]
800303c: fb03 f301 mul.w r3, r3, r1
8003040: 085b lsrs r3, r3, #1
8003042: b29a uxth r2, r3
8003044: 89fb ldrh r3, [r7, #14]
8003046: 4413 add r3, r2
8003048: 83fb strh r3, [r7, #30]
break;
800304a: e01b b.n 8003084 <BSP_LCD_DisplayStringAt+0xd0>
}
case LEFT_MODE:
{
ref_column = Xpos;
800304c: 89fb ldrh r3, [r7, #14]
800304e: 83fb strh r3, [r7, #30]
break;
8003050: e018 b.n 8003084 <BSP_LCD_DisplayStringAt+0xd0>
}
case RIGHT_MODE:
{
ref_column = - Xpos + ((xsize - size)*DrawProp[ActiveLayer].pFont->Width);
8003052: 693a ldr r2, [r7, #16]
8003054: 69bb ldr r3, [r7, #24]
8003056: 1ad3 subs r3, r2, r3
8003058: b299 uxth r1, r3
800305a: 4b36 ldr r3, [pc, #216] ; (8003134 <BSP_LCD_DisplayStringAt+0x180>)
800305c: 681a ldr r2, [r3, #0]
800305e: 4836 ldr r0, [pc, #216] ; (8003138 <BSP_LCD_DisplayStringAt+0x184>)
8003060: 4613 mov r3, r2
8003062: 005b lsls r3, r3, #1
8003064: 4413 add r3, r2
8003066: 009b lsls r3, r3, #2
8003068: 4403 add r3, r0
800306a: 3308 adds r3, #8
800306c: 681b ldr r3, [r3, #0]
800306e: 889b ldrh r3, [r3, #4]
8003070: fb11 f303 smulbb r3, r1, r3
8003074: b29a uxth r2, r3
8003076: 89fb ldrh r3, [r7, #14]
8003078: 1ad3 subs r3, r2, r3
800307a: 83fb strh r3, [r7, #30]
break;
800307c: e002 b.n 8003084 <BSP_LCD_DisplayStringAt+0xd0>
}
default:
{
ref_column = Xpos;
800307e: 89fb ldrh r3, [r7, #14]
8003080: 83fb strh r3, [r7, #30]
break;
8003082: bf00 nop
}
}
/* Check that the Start column is located in the screen */
if ((ref_column < 1) || (ref_column >= 0x8000))
8003084: 8bfb ldrh r3, [r7, #30]
8003086: 2b00 cmp r3, #0
8003088: d003 beq.n 8003092 <BSP_LCD_DisplayStringAt+0xde>
800308a: f9b7 301e ldrsh.w r3, [r7, #30]
800308e: 2b00 cmp r3, #0
8003090: da1d bge.n 80030ce <BSP_LCD_DisplayStringAt+0x11a>
{
ref_column = 1;
8003092: 2301 movs r3, #1
8003094: 83fb strh r3, [r7, #30]
}
/* Send the string character by character on LCD */
while ((*Text != 0) & (((BSP_LCD_GetXSize() - (i*DrawProp[ActiveLayer].pFont->Width)) & 0xFFFF) >= DrawProp[ActiveLayer].pFont->Width))
8003096: e01a b.n 80030ce <BSP_LCD_DisplayStringAt+0x11a>
{
/* Display one character on LCD */
BSP_LCD_DisplayChar(ref_column, Ypos, *Text);
8003098: 68bb ldr r3, [r7, #8]
800309a: 781a ldrb r2, [r3, #0]
800309c: 89b9 ldrh r1, [r7, #12]
800309e: 8bfb ldrh r3, [r7, #30]
80030a0: 4618 mov r0, r3
80030a2: f7ff ff43 bl 8002f2c <BSP_LCD_DisplayChar>
/* Decrement the column position by 16 */
ref_column += DrawProp[ActiveLayer].pFont->Width;
80030a6: 4b23 ldr r3, [pc, #140] ; (8003134 <BSP_LCD_DisplayStringAt+0x180>)
80030a8: 681a ldr r2, [r3, #0]
80030aa: 4923 ldr r1, [pc, #140] ; (8003138 <BSP_LCD_DisplayStringAt+0x184>)
80030ac: 4613 mov r3, r2
80030ae: 005b lsls r3, r3, #1
80030b0: 4413 add r3, r2
80030b2: 009b lsls r3, r3, #2
80030b4: 440b add r3, r1
80030b6: 3308 adds r3, #8
80030b8: 681b ldr r3, [r3, #0]
80030ba: 889a ldrh r2, [r3, #4]
80030bc: 8bfb ldrh r3, [r7, #30]
80030be: 4413 add r3, r2
80030c0: 83fb strh r3, [r7, #30]
/* Point on the next character */
Text++;
80030c2: 68bb ldr r3, [r7, #8]
80030c4: 3301 adds r3, #1
80030c6: 60bb str r3, [r7, #8]
i++;
80030c8: 8bbb ldrh r3, [r7, #28]
80030ca: 3301 adds r3, #1
80030cc: 83bb strh r3, [r7, #28]
while ((*Text != 0) & (((BSP_LCD_GetXSize() - (i*DrawProp[ActiveLayer].pFont->Width)) & 0xFFFF) >= DrawProp[ActiveLayer].pFont->Width))
80030ce: 68bb ldr r3, [r7, #8]
80030d0: 781b ldrb r3, [r3, #0]
80030d2: 2b00 cmp r3, #0
80030d4: bf14 ite ne
80030d6: 2301 movne r3, #1
80030d8: 2300 moveq r3, #0
80030da: b2dc uxtb r4, r3
80030dc: f7ff fe04 bl 8002ce8 <BSP_LCD_GetXSize>
80030e0: 4605 mov r5, r0
80030e2: 8bb9 ldrh r1, [r7, #28]
80030e4: 4b13 ldr r3, [pc, #76] ; (8003134 <BSP_LCD_DisplayStringAt+0x180>)
80030e6: 681a ldr r2, [r3, #0]
80030e8: 4813 ldr r0, [pc, #76] ; (8003138 <BSP_LCD_DisplayStringAt+0x184>)
80030ea: 4613 mov r3, r2
80030ec: 005b lsls r3, r3, #1
80030ee: 4413 add r3, r2
80030f0: 009b lsls r3, r3, #2
80030f2: 4403 add r3, r0
80030f4: 3308 adds r3, #8
80030f6: 681b ldr r3, [r3, #0]
80030f8: 889b ldrh r3, [r3, #4]
80030fa: fb03 f301 mul.w r3, r3, r1
80030fe: 1aeb subs r3, r5, r3
8003100: b299 uxth r1, r3
8003102: 4b0c ldr r3, [pc, #48] ; (8003134 <BSP_LCD_DisplayStringAt+0x180>)
8003104: 681a ldr r2, [r3, #0]
8003106: 480c ldr r0, [pc, #48] ; (8003138 <BSP_LCD_DisplayStringAt+0x184>)
8003108: 4613 mov r3, r2
800310a: 005b lsls r3, r3, #1
800310c: 4413 add r3, r2
800310e: 009b lsls r3, r3, #2
8003110: 4403 add r3, r0
8003112: 3308 adds r3, #8
8003114: 681b ldr r3, [r3, #0]
8003116: 889b ldrh r3, [r3, #4]
8003118: 4299 cmp r1, r3
800311a: bf2c ite cs
800311c: 2301 movcs r3, #1
800311e: 2300 movcc r3, #0
8003120: b2db uxtb r3, r3
8003122: 4023 ands r3, r4
8003124: b2db uxtb r3, r3
8003126: 2b00 cmp r3, #0
8003128: d1b6 bne.n 8003098 <BSP_LCD_DisplayStringAt+0xe4>
}
}
800312a: bf00 nop
800312c: 3720 adds r7, #32
800312e: 46bd mov sp, r7
8003130: bdb0 pop {r4, r5, r7, pc}
8003132: bf00 nop
8003134: 2000041c .word 0x2000041c
8003138: 20000420 .word 0x20000420
0800313c <BSP_LCD_DisplayStringAtLine>:
* @param Line: Line where to display the character shape
* @param ptr: Pointer to string to display on LCD
* @retval None
*/
void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr)
{
800313c: b580 push {r7, lr}
800313e: b082 sub sp, #8
8003140: af00 add r7, sp, #0
8003142: 4603 mov r3, r0
8003144: 6039 str r1, [r7, #0]
8003146: 80fb strh r3, [r7, #6]
BSP_LCD_DisplayStringAt(0, LINE(Line), ptr, LEFT_MODE);
8003148: f7ff feb2 bl 8002eb0 <BSP_LCD_GetFont>
800314c: 4603 mov r3, r0
800314e: 88db ldrh r3, [r3, #6]
8003150: 88fa ldrh r2, [r7, #6]
8003152: fb12 f303 smulbb r3, r2, r3
8003156: b299 uxth r1, r3
8003158: 2303 movs r3, #3
800315a: 683a ldr r2, [r7, #0]
800315c: 2000 movs r0, #0
800315e: f7ff ff29 bl 8002fb4 <BSP_LCD_DisplayStringAt>
}
8003162: bf00 nop
8003164: 3708 adds r7, #8
8003166: 46bd mov sp, r7
8003168: bd80 pop {r7, pc}
...
0800316c <BSP_LCD_DrawHLine>:
* @param Ypos: Y position
* @param Length: Line length
* @retval None
*/
void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
{
800316c: b5b0 push {r4, r5, r7, lr}
800316e: b086 sub sp, #24
8003170: af02 add r7, sp, #8
8003172: 4603 mov r3, r0
8003174: 80fb strh r3, [r7, #6]
8003176: 460b mov r3, r1
8003178: 80bb strh r3, [r7, #4]
800317a: 4613 mov r3, r2
800317c: 807b strh r3, [r7, #2]
uint32_t Xaddress = 0;
800317e: 2300 movs r3, #0
8003180: 60fb str r3, [r7, #12]
/* Get the line address */
if(hLtdcHandler.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)
8003182: 4b26 ldr r3, [pc, #152] ; (800321c <BSP_LCD_DrawHLine+0xb0>)
8003184: 681b ldr r3, [r3, #0]
8003186: 4a26 ldr r2, [pc, #152] ; (8003220 <BSP_LCD_DrawHLine+0xb4>)
8003188: 2134 movs r1, #52 ; 0x34
800318a: fb01 f303 mul.w r3, r1, r3
800318e: 4413 add r3, r2
8003190: 3348 adds r3, #72 ; 0x48
8003192: 681b ldr r3, [r3, #0]
8003194: 2b02 cmp r3, #2
8003196: d114 bne.n 80031c2 <BSP_LCD_DrawHLine+0x56>
{ /* RGB565 format */
Xaddress = (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress) + 2*(BSP_LCD_GetXSize()*Ypos + Xpos);
8003198: 4b20 ldr r3, [pc, #128] ; (800321c <BSP_LCD_DrawHLine+0xb0>)
800319a: 681b ldr r3, [r3, #0]
800319c: 4a20 ldr r2, [pc, #128] ; (8003220 <BSP_LCD_DrawHLine+0xb4>)
800319e: 2134 movs r1, #52 ; 0x34
80031a0: fb01 f303 mul.w r3, r1, r3
80031a4: 4413 add r3, r2
80031a6: 335c adds r3, #92 ; 0x5c
80031a8: 681c ldr r4, [r3, #0]
80031aa: f7ff fd9d bl 8002ce8 <BSP_LCD_GetXSize>
80031ae: 4602 mov r2, r0
80031b0: 88bb ldrh r3, [r7, #4]
80031b2: fb03 f202 mul.w r2, r3, r2
80031b6: 88fb ldrh r3, [r7, #6]
80031b8: 4413 add r3, r2
80031ba: 005b lsls r3, r3, #1
80031bc: 4423 add r3, r4
80031be: 60fb str r3, [r7, #12]
80031c0: e013 b.n 80031ea <BSP_LCD_DrawHLine+0x7e>
}
else
{ /* ARGB8888 format */
Xaddress = (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos);
80031c2: 4b16 ldr r3, [pc, #88] ; (800321c <BSP_LCD_DrawHLine+0xb0>)
80031c4: 681b ldr r3, [r3, #0]
80031c6: 4a16 ldr r2, [pc, #88] ; (8003220 <BSP_LCD_DrawHLine+0xb4>)
80031c8: 2134 movs r1, #52 ; 0x34
80031ca: fb01 f303 mul.w r3, r1, r3
80031ce: 4413 add r3, r2
80031d0: 335c adds r3, #92 ; 0x5c
80031d2: 681c ldr r4, [r3, #0]
80031d4: f7ff fd88 bl 8002ce8 <BSP_LCD_GetXSize>
80031d8: 4602 mov r2, r0
80031da: 88bb ldrh r3, [r7, #4]
80031dc: fb03 f202 mul.w r2, r3, r2
80031e0: 88fb ldrh r3, [r7, #6]
80031e2: 4413 add r3, r2
80031e4: 009b lsls r3, r3, #2
80031e6: 4423 add r3, r4
80031e8: 60fb str r3, [r7, #12]
}
/* Write line */
LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, Length, 1, 0, DrawProp[ActiveLayer].TextColor);
80031ea: 4b0c ldr r3, [pc, #48] ; (800321c <BSP_LCD_DrawHLine+0xb0>)
80031ec: 6818 ldr r0, [r3, #0]
80031ee: 68fc ldr r4, [r7, #12]
80031f0: 887d ldrh r5, [r7, #2]
80031f2: 4b0a ldr r3, [pc, #40] ; (800321c <BSP_LCD_DrawHLine+0xb0>)
80031f4: 681a ldr r2, [r3, #0]
80031f6: 490b ldr r1, [pc, #44] ; (8003224 <BSP_LCD_DrawHLine+0xb8>)
80031f8: 4613 mov r3, r2
80031fa: 005b lsls r3, r3, #1
80031fc: 4413 add r3, r2
80031fe: 009b lsls r3, r3, #2
8003200: 440b add r3, r1
8003202: 681b ldr r3, [r3, #0]
8003204: 9301 str r3, [sp, #4]
8003206: 2300 movs r3, #0
8003208: 9300 str r3, [sp, #0]
800320a: 2301 movs r3, #1
800320c: 462a mov r2, r5
800320e: 4621 mov r1, r4
8003210: f000 fcd8 bl 8003bc4 <LL_FillBuffer>
}
8003214: bf00 nop
8003216: 3710 adds r7, #16
8003218: 46bd mov sp, r7
800321a: bdb0 pop {r4, r5, r7, pc}
800321c: 2000041c .word 0x2000041c
8003220: 20008e70 .word 0x20008e70
8003224: 20000420 .word 0x20000420
08003228 <BSP_LCD_DrawCircle>:
* @param Ypos: Y position
* @param Radius: Circle radius
* @retval None
*/
void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
{
8003228: b590 push {r4, r7, lr}
800322a: b087 sub sp, #28
800322c: af00 add r7, sp, #0
800322e: 4603 mov r3, r0
8003230: 80fb strh r3, [r7, #6]
8003232: 460b mov r3, r1
8003234: 80bb strh r3, [r7, #4]
8003236: 4613 mov r3, r2
8003238: 807b strh r3, [r7, #2]
int32_t decision; /* Decision Variable */
uint32_t current_x; /* Current X Value */
uint32_t current_y; /* Current Y Value */
decision = 3 - (Radius << 1);
800323a: 887b ldrh r3, [r7, #2]
800323c: 005b lsls r3, r3, #1
800323e: f1c3 0303 rsb r3, r3, #3
8003242: 617b str r3, [r7, #20]
current_x = 0;
8003244: 2300 movs r3, #0
8003246: 613b str r3, [r7, #16]
current_y = Radius;
8003248: 887b ldrh r3, [r7, #2]
800324a: 60fb str r3, [r7, #12]
while (current_x <= current_y)
800324c: e0cf b.n 80033ee <BSP_LCD_DrawCircle+0x1c6>
{
BSP_LCD_DrawPixel((Xpos + current_x), (Ypos - current_y), DrawProp[ActiveLayer].TextColor);
800324e: 693b ldr r3, [r7, #16]
8003250: b29a uxth r2, r3
8003252: 88fb ldrh r3, [r7, #6]
8003254: 4413 add r3, r2
8003256: b298 uxth r0, r3
8003258: 68fb ldr r3, [r7, #12]
800325a: b29b uxth r3, r3
800325c: 88ba ldrh r2, [r7, #4]
800325e: 1ad3 subs r3, r2, r3
8003260: b29c uxth r4, r3
8003262: 4b67 ldr r3, [pc, #412] ; (8003400 <BSP_LCD_DrawCircle+0x1d8>)
8003264: 681a ldr r2, [r3, #0]
8003266: 4967 ldr r1, [pc, #412] ; (8003404 <BSP_LCD_DrawCircle+0x1dc>)
8003268: 4613 mov r3, r2
800326a: 005b lsls r3, r3, #1
800326c: 4413 add r3, r2
800326e: 009b lsls r3, r3, #2
8003270: 440b add r3, r1
8003272: 681b ldr r3, [r3, #0]
8003274: 461a mov r2, r3
8003276: 4621 mov r1, r4
8003278: f000 f8c6 bl 8003408 <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos - current_x), (Ypos - current_y), DrawProp[ActiveLayer].TextColor);
800327c: 693b ldr r3, [r7, #16]
800327e: b29b uxth r3, r3
8003280: 88fa ldrh r2, [r7, #6]
8003282: 1ad3 subs r3, r2, r3
8003284: b298 uxth r0, r3
8003286: 68fb ldr r3, [r7, #12]
8003288: b29b uxth r3, r3
800328a: 88ba ldrh r2, [r7, #4]
800328c: 1ad3 subs r3, r2, r3
800328e: b29c uxth r4, r3
8003290: 4b5b ldr r3, [pc, #364] ; (8003400 <BSP_LCD_DrawCircle+0x1d8>)
8003292: 681a ldr r2, [r3, #0]
8003294: 495b ldr r1, [pc, #364] ; (8003404 <BSP_LCD_DrawCircle+0x1dc>)
8003296: 4613 mov r3, r2
8003298: 005b lsls r3, r3, #1
800329a: 4413 add r3, r2
800329c: 009b lsls r3, r3, #2
800329e: 440b add r3, r1
80032a0: 681b ldr r3, [r3, #0]
80032a2: 461a mov r2, r3
80032a4: 4621 mov r1, r4
80032a6: f000 f8af bl 8003408 <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos + current_y), (Ypos - current_x), DrawProp[ActiveLayer].TextColor);
80032aa: 68fb ldr r3, [r7, #12]
80032ac: b29a uxth r2, r3
80032ae: 88fb ldrh r3, [r7, #6]
80032b0: 4413 add r3, r2
80032b2: b298 uxth r0, r3
80032b4: 693b ldr r3, [r7, #16]
80032b6: b29b uxth r3, r3
80032b8: 88ba ldrh r2, [r7, #4]
80032ba: 1ad3 subs r3, r2, r3
80032bc: b29c uxth r4, r3
80032be: 4b50 ldr r3, [pc, #320] ; (8003400 <BSP_LCD_DrawCircle+0x1d8>)
80032c0: 681a ldr r2, [r3, #0]
80032c2: 4950 ldr r1, [pc, #320] ; (8003404 <BSP_LCD_DrawCircle+0x1dc>)
80032c4: 4613 mov r3, r2
80032c6: 005b lsls r3, r3, #1
80032c8: 4413 add r3, r2
80032ca: 009b lsls r3, r3, #2
80032cc: 440b add r3, r1
80032ce: 681b ldr r3, [r3, #0]
80032d0: 461a mov r2, r3
80032d2: 4621 mov r1, r4
80032d4: f000 f898 bl 8003408 <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos - current_y), (Ypos - current_x), DrawProp[ActiveLayer].TextColor);
80032d8: 68fb ldr r3, [r7, #12]
80032da: b29b uxth r3, r3
80032dc: 88fa ldrh r2, [r7, #6]
80032de: 1ad3 subs r3, r2, r3
80032e0: b298 uxth r0, r3
80032e2: 693b ldr r3, [r7, #16]
80032e4: b29b uxth r3, r3
80032e6: 88ba ldrh r2, [r7, #4]
80032e8: 1ad3 subs r3, r2, r3
80032ea: b29c uxth r4, r3
80032ec: 4b44 ldr r3, [pc, #272] ; (8003400 <BSP_LCD_DrawCircle+0x1d8>)
80032ee: 681a ldr r2, [r3, #0]
80032f0: 4944 ldr r1, [pc, #272] ; (8003404 <BSP_LCD_DrawCircle+0x1dc>)
80032f2: 4613 mov r3, r2
80032f4: 005b lsls r3, r3, #1
80032f6: 4413 add r3, r2
80032f8: 009b lsls r3, r3, #2
80032fa: 440b add r3, r1
80032fc: 681b ldr r3, [r3, #0]
80032fe: 461a mov r2, r3
8003300: 4621 mov r1, r4
8003302: f000 f881 bl 8003408 <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos + current_x), (Ypos + current_y), DrawProp[ActiveLayer].TextColor);
8003306: 693b ldr r3, [r7, #16]
8003308: b29a uxth r2, r3
800330a: 88fb ldrh r3, [r7, #6]
800330c: 4413 add r3, r2
800330e: b298 uxth r0, r3
8003310: 68fb ldr r3, [r7, #12]
8003312: b29a uxth r2, r3
8003314: 88bb ldrh r3, [r7, #4]
8003316: 4413 add r3, r2
8003318: b29c uxth r4, r3
800331a: 4b39 ldr r3, [pc, #228] ; (8003400 <BSP_LCD_DrawCircle+0x1d8>)
800331c: 681a ldr r2, [r3, #0]
800331e: 4939 ldr r1, [pc, #228] ; (8003404 <BSP_LCD_DrawCircle+0x1dc>)
8003320: 4613 mov r3, r2
8003322: 005b lsls r3, r3, #1
8003324: 4413 add r3, r2
8003326: 009b lsls r3, r3, #2
8003328: 440b add r3, r1
800332a: 681b ldr r3, [r3, #0]
800332c: 461a mov r2, r3
800332e: 4621 mov r1, r4
8003330: f000 f86a bl 8003408 <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos - current_x), (Ypos + current_y), DrawProp[ActiveLayer].TextColor);
8003334: 693b ldr r3, [r7, #16]
8003336: b29b uxth r3, r3
8003338: 88fa ldrh r2, [r7, #6]
800333a: 1ad3 subs r3, r2, r3
800333c: b298 uxth r0, r3
800333e: 68fb ldr r3, [r7, #12]
8003340: b29a uxth r2, r3
8003342: 88bb ldrh r3, [r7, #4]
8003344: 4413 add r3, r2
8003346: b29c uxth r4, r3
8003348: 4b2d ldr r3, [pc, #180] ; (8003400 <BSP_LCD_DrawCircle+0x1d8>)
800334a: 681a ldr r2, [r3, #0]
800334c: 492d ldr r1, [pc, #180] ; (8003404 <BSP_LCD_DrawCircle+0x1dc>)
800334e: 4613 mov r3, r2
8003350: 005b lsls r3, r3, #1
8003352: 4413 add r3, r2
8003354: 009b lsls r3, r3, #2
8003356: 440b add r3, r1
8003358: 681b ldr r3, [r3, #0]
800335a: 461a mov r2, r3
800335c: 4621 mov r1, r4
800335e: f000 f853 bl 8003408 <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos + current_y), (Ypos + current_x), DrawProp[ActiveLayer].TextColor);
8003362: 68fb ldr r3, [r7, #12]
8003364: b29a uxth r2, r3
8003366: 88fb ldrh r3, [r7, #6]
8003368: 4413 add r3, r2
800336a: b298 uxth r0, r3
800336c: 693b ldr r3, [r7, #16]
800336e: b29a uxth r2, r3
8003370: 88bb ldrh r3, [r7, #4]
8003372: 4413 add r3, r2
8003374: b29c uxth r4, r3
8003376: 4b22 ldr r3, [pc, #136] ; (8003400 <BSP_LCD_DrawCircle+0x1d8>)
8003378: 681a ldr r2, [r3, #0]
800337a: 4922 ldr r1, [pc, #136] ; (8003404 <BSP_LCD_DrawCircle+0x1dc>)
800337c: 4613 mov r3, r2
800337e: 005b lsls r3, r3, #1
8003380: 4413 add r3, r2
8003382: 009b lsls r3, r3, #2
8003384: 440b add r3, r1
8003386: 681b ldr r3, [r3, #0]
8003388: 461a mov r2, r3
800338a: 4621 mov r1, r4
800338c: f000 f83c bl 8003408 <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos - current_y), (Ypos + current_x), DrawProp[ActiveLayer].TextColor);
8003390: 68fb ldr r3, [r7, #12]
8003392: b29b uxth r3, r3
8003394: 88fa ldrh r2, [r7, #6]
8003396: 1ad3 subs r3, r2, r3
8003398: b298 uxth r0, r3
800339a: 693b ldr r3, [r7, #16]
800339c: b29a uxth r2, r3
800339e: 88bb ldrh r3, [r7, #4]
80033a0: 4413 add r3, r2
80033a2: b29c uxth r4, r3
80033a4: 4b16 ldr r3, [pc, #88] ; (8003400 <BSP_LCD_DrawCircle+0x1d8>)
80033a6: 681a ldr r2, [r3, #0]
80033a8: 4916 ldr r1, [pc, #88] ; (8003404 <BSP_LCD_DrawCircle+0x1dc>)
80033aa: 4613 mov r3, r2
80033ac: 005b lsls r3, r3, #1
80033ae: 4413 add r3, r2
80033b0: 009b lsls r3, r3, #2
80033b2: 440b add r3, r1
80033b4: 681b ldr r3, [r3, #0]
80033b6: 461a mov r2, r3
80033b8: 4621 mov r1, r4
80033ba: f000 f825 bl 8003408 <BSP_LCD_DrawPixel>
if (decision < 0)
80033be: 697b ldr r3, [r7, #20]
80033c0: 2b00 cmp r3, #0
80033c2: da06 bge.n 80033d2 <BSP_LCD_DrawCircle+0x1aa>
{
decision += (current_x << 2) + 6;
80033c4: 693b ldr r3, [r7, #16]
80033c6: 009a lsls r2, r3, #2
80033c8: 697b ldr r3, [r7, #20]
80033ca: 4413 add r3, r2
80033cc: 3306 adds r3, #6
80033ce: 617b str r3, [r7, #20]
80033d0: e00a b.n 80033e8 <BSP_LCD_DrawCircle+0x1c0>
}
else
{
decision += ((current_x - current_y) << 2) + 10;
80033d2: 693a ldr r2, [r7, #16]
80033d4: 68fb ldr r3, [r7, #12]
80033d6: 1ad3 subs r3, r2, r3
80033d8: 009a lsls r2, r3, #2
80033da: 697b ldr r3, [r7, #20]
80033dc: 4413 add r3, r2
80033de: 330a adds r3, #10
80033e0: 617b str r3, [r7, #20]
current_y--;
80033e2: 68fb ldr r3, [r7, #12]
80033e4: 3b01 subs r3, #1
80033e6: 60fb str r3, [r7, #12]
}
current_x++;
80033e8: 693b ldr r3, [r7, #16]
80033ea: 3301 adds r3, #1
80033ec: 613b str r3, [r7, #16]
while (current_x <= current_y)
80033ee: 693a ldr r2, [r7, #16]
80033f0: 68fb ldr r3, [r7, #12]
80033f2: 429a cmp r2, r3
80033f4: f67f af2b bls.w 800324e <BSP_LCD_DrawCircle+0x26>
}
}
80033f8: bf00 nop
80033fa: 371c adds r7, #28
80033fc: 46bd mov sp, r7
80033fe: bd90 pop {r4, r7, pc}
8003400: 2000041c .word 0x2000041c
8003404: 20000420 .word 0x20000420
08003408 <BSP_LCD_DrawPixel>:
* @param Ypos: Y position
* @param RGB_Code: Pixel color in ARGB mode (8-8-8-8)
* @retval None
*/
void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t RGB_Code)
{
8003408: b5b0 push {r4, r5, r7, lr}
800340a: b082 sub sp, #8
800340c: af00 add r7, sp, #0
800340e: 4603 mov r3, r0
8003410: 603a str r2, [r7, #0]
8003412: 80fb strh r3, [r7, #6]
8003414: 460b mov r3, r1
8003416: 80bb strh r3, [r7, #4]
/* Write data value to all SDRAM memory */
if(hLtdcHandler.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)
8003418: 4b1d ldr r3, [pc, #116] ; (8003490 <BSP_LCD_DrawPixel+0x88>)
800341a: 681b ldr r3, [r3, #0]
800341c: 4a1d ldr r2, [pc, #116] ; (8003494 <BSP_LCD_DrawPixel+0x8c>)
800341e: 2134 movs r1, #52 ; 0x34
8003420: fb01 f303 mul.w r3, r1, r3
8003424: 4413 add r3, r2
8003426: 3348 adds r3, #72 ; 0x48
8003428: 681b ldr r3, [r3, #0]
800342a: 2b02 cmp r3, #2
800342c: d116 bne.n 800345c <BSP_LCD_DrawPixel+0x54>
{ /* RGB565 format */
*(__IO uint16_t*) (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress + (2*(Ypos*BSP_LCD_GetXSize() + Xpos))) = (uint16_t)RGB_Code;
800342e: 4b18 ldr r3, [pc, #96] ; (8003490 <BSP_LCD_DrawPixel+0x88>)
8003430: 681b ldr r3, [r3, #0]
8003432: 4a18 ldr r2, [pc, #96] ; (8003494 <BSP_LCD_DrawPixel+0x8c>)
8003434: 2134 movs r1, #52 ; 0x34
8003436: fb01 f303 mul.w r3, r1, r3
800343a: 4413 add r3, r2
800343c: 335c adds r3, #92 ; 0x5c
800343e: 681c ldr r4, [r3, #0]
8003440: 88bd ldrh r5, [r7, #4]
8003442: f7ff fc51 bl 8002ce8 <BSP_LCD_GetXSize>
8003446: 4603 mov r3, r0
8003448: fb03 f205 mul.w r2, r3, r5
800344c: 88fb ldrh r3, [r7, #6]
800344e: 4413 add r3, r2
8003450: 005b lsls r3, r3, #1
8003452: 4423 add r3, r4
8003454: 683a ldr r2, [r7, #0]
8003456: b292 uxth r2, r2
8003458: 801a strh r2, [r3, #0]
}
else
{ /* ARGB8888 format */
*(__IO uint32_t*) (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress + (4*(Ypos*BSP_LCD_GetXSize() + Xpos))) = RGB_Code;
}
}
800345a: e015 b.n 8003488 <BSP_LCD_DrawPixel+0x80>
*(__IO uint32_t*) (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress + (4*(Ypos*BSP_LCD_GetXSize() + Xpos))) = RGB_Code;
800345c: 4b0c ldr r3, [pc, #48] ; (8003490 <BSP_LCD_DrawPixel+0x88>)
800345e: 681b ldr r3, [r3, #0]
8003460: 4a0c ldr r2, [pc, #48] ; (8003494 <BSP_LCD_DrawPixel+0x8c>)
8003462: 2134 movs r1, #52 ; 0x34
8003464: fb01 f303 mul.w r3, r1, r3
8003468: 4413 add r3, r2
800346a: 335c adds r3, #92 ; 0x5c
800346c: 681c ldr r4, [r3, #0]
800346e: 88bd ldrh r5, [r7, #4]
8003470: f7ff fc3a bl 8002ce8 <BSP_LCD_GetXSize>
8003474: 4603 mov r3, r0
8003476: fb03 f205 mul.w r2, r3, r5
800347a: 88fb ldrh r3, [r7, #6]
800347c: 4413 add r3, r2
800347e: 009b lsls r3, r3, #2
8003480: 4423 add r3, r4
8003482: 461a mov r2, r3
8003484: 683b ldr r3, [r7, #0]
8003486: 6013 str r3, [r2, #0]
}
8003488: bf00 nop
800348a: 3708 adds r7, #8
800348c: 46bd mov sp, r7
800348e: bdb0 pop {r4, r5, r7, pc}
8003490: 2000041c .word 0x2000041c
8003494: 20008e70 .word 0x20008e70
08003498 <BSP_LCD_DrawBitmap>:
* @param Ypos: Bmp Y position in the LCD
* @param pbmp: Pointer to Bmp picture address in the internal Flash
* @retval None
*/
void BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp)
{
8003498: b590 push {r4, r7, lr}
800349a: b08b sub sp, #44 ; 0x2c
800349c: af00 add r7, sp, #0
800349e: 60f8 str r0, [r7, #12]
80034a0: 60b9 str r1, [r7, #8]
80034a2: 607a str r2, [r7, #4]
uint32_t index = 0, width = 0, height = 0, bit_pixel = 0;
80034a4: 2300 movs r3, #0
80034a6: 627b str r3, [r7, #36] ; 0x24
80034a8: 2300 movs r3, #0
80034aa: 61bb str r3, [r7, #24]
80034ac: 2300 movs r3, #0
80034ae: 617b str r3, [r7, #20]
80034b0: 2300 movs r3, #0
80034b2: 613b str r3, [r7, #16]
uint32_t address;
uint32_t input_color_mode = 0;
80034b4: 2300 movs r3, #0
80034b6: 61fb str r3, [r7, #28]
/* Get bitmap data address offset */
index = pbmp[10] + (pbmp[11] << 8) + (pbmp[12] << 16) + (pbmp[13] << 24);
80034b8: 687b ldr r3, [r7, #4]
80034ba: 330a adds r3, #10
80034bc: 781b ldrb r3, [r3, #0]
80034be: 461a mov r2, r3
80034c0: 687b ldr r3, [r7, #4]
80034c2: 330b adds r3, #11
80034c4: 781b ldrb r3, [r3, #0]
80034c6: 021b lsls r3, r3, #8
80034c8: 441a add r2, r3
80034ca: 687b ldr r3, [r7, #4]
80034cc: 330c adds r3, #12
80034ce: 781b ldrb r3, [r3, #0]
80034d0: 041b lsls r3, r3, #16
80034d2: 441a add r2, r3
80034d4: 687b ldr r3, [r7, #4]
80034d6: 330d adds r3, #13
80034d8: 781b ldrb r3, [r3, #0]
80034da: 061b lsls r3, r3, #24
80034dc: 4413 add r3, r2
80034de: 627b str r3, [r7, #36] ; 0x24
/* Read bitmap width */
width = pbmp[18] + (pbmp[19] << 8) + (pbmp[20] << 16) + (pbmp[21] << 24);
80034e0: 687b ldr r3, [r7, #4]
80034e2: 3312 adds r3, #18
80034e4: 781b ldrb r3, [r3, #0]
80034e6: 461a mov r2, r3
80034e8: 687b ldr r3, [r7, #4]
80034ea: 3313 adds r3, #19
80034ec: 781b ldrb r3, [r3, #0]
80034ee: 021b lsls r3, r3, #8
80034f0: 441a add r2, r3
80034f2: 687b ldr r3, [r7, #4]
80034f4: 3314 adds r3, #20
80034f6: 781b ldrb r3, [r3, #0]
80034f8: 041b lsls r3, r3, #16
80034fa: 441a add r2, r3
80034fc: 687b ldr r3, [r7, #4]
80034fe: 3315 adds r3, #21
8003500: 781b ldrb r3, [r3, #0]
8003502: 061b lsls r3, r3, #24
8003504: 4413 add r3, r2
8003506: 61bb str r3, [r7, #24]
/* Read bitmap height */
height = pbmp[22] + (pbmp[23] << 8) + (pbmp[24] << 16) + (pbmp[25] << 24);
8003508: 687b ldr r3, [r7, #4]
800350a: 3316 adds r3, #22
800350c: 781b ldrb r3, [r3, #0]
800350e: 461a mov r2, r3
8003510: 687b ldr r3, [r7, #4]
8003512: 3317 adds r3, #23
8003514: 781b ldrb r3, [r3, #0]
8003516: 021b lsls r3, r3, #8
8003518: 441a add r2, r3
800351a: 687b ldr r3, [r7, #4]
800351c: 3318 adds r3, #24
800351e: 781b ldrb r3, [r3, #0]
8003520: 041b lsls r3, r3, #16
8003522: 441a add r2, r3
8003524: 687b ldr r3, [r7, #4]
8003526: 3319 adds r3, #25
8003528: 781b ldrb r3, [r3, #0]
800352a: 061b lsls r3, r3, #24
800352c: 4413 add r3, r2
800352e: 617b str r3, [r7, #20]
/* Read bit/pixel */
bit_pixel = pbmp[28] + (pbmp[29] << 8);
8003530: 687b ldr r3, [r7, #4]
8003532: 331c adds r3, #28
8003534: 781b ldrb r3, [r3, #0]
8003536: 461a mov r2, r3
8003538: 687b ldr r3, [r7, #4]
800353a: 331d adds r3, #29
800353c: 781b ldrb r3, [r3, #0]
800353e: 021b lsls r3, r3, #8
8003540: 4413 add r3, r2
8003542: 613b str r3, [r7, #16]
/* Set the address */
address = hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress + (((BSP_LCD_GetXSize()*Ypos) + Xpos)*(4));
8003544: 4b2a ldr r3, [pc, #168] ; (80035f0 <BSP_LCD_DrawBitmap+0x158>)
8003546: 681b ldr r3, [r3, #0]
8003548: 4a2a ldr r2, [pc, #168] ; (80035f4 <BSP_LCD_DrawBitmap+0x15c>)
800354a: 2134 movs r1, #52 ; 0x34
800354c: fb01 f303 mul.w r3, r1, r3
8003550: 4413 add r3, r2
8003552: 335c adds r3, #92 ; 0x5c
8003554: 681c ldr r4, [r3, #0]
8003556: f7ff fbc7 bl 8002ce8 <BSP_LCD_GetXSize>
800355a: 4602 mov r2, r0
800355c: 68bb ldr r3, [r7, #8]
800355e: fb03 f202 mul.w r2, r3, r2
8003562: 68fb ldr r3, [r7, #12]
8003564: 4413 add r3, r2
8003566: 009b lsls r3, r3, #2
8003568: 4423 add r3, r4
800356a: 623b str r3, [r7, #32]
/* Get the layer pixel format */
if ((bit_pixel/8) == 4)
800356c: 693b ldr r3, [r7, #16]
800356e: 3b20 subs r3, #32
8003570: 2b07 cmp r3, #7
8003572: d802 bhi.n 800357a <BSP_LCD_DrawBitmap+0xe2>
{
input_color_mode = CM_ARGB8888;
8003574: 2300 movs r3, #0
8003576: 61fb str r3, [r7, #28]
8003578: e008 b.n 800358c <BSP_LCD_DrawBitmap+0xf4>
}
else if ((bit_pixel/8) == 2)
800357a: 693b ldr r3, [r7, #16]
800357c: 3b10 subs r3, #16
800357e: 2b07 cmp r3, #7
8003580: d802 bhi.n 8003588 <BSP_LCD_DrawBitmap+0xf0>
{
input_color_mode = CM_RGB565;
8003582: 2302 movs r3, #2
8003584: 61fb str r3, [r7, #28]
8003586: e001 b.n 800358c <BSP_LCD_DrawBitmap+0xf4>
}
else
{
input_color_mode = CM_RGB888;
8003588: 2301 movs r3, #1
800358a: 61fb str r3, [r7, #28]
}
/* Bypass the bitmap header */
pbmp += (index + (width * (height - 1) * (bit_pixel/8)));
800358c: 697b ldr r3, [r7, #20]
800358e: 3b01 subs r3, #1
8003590: 69ba ldr r2, [r7, #24]
8003592: fb02 f303 mul.w r3, r2, r3
8003596: 693a ldr r2, [r7, #16]
8003598: 08d2 lsrs r2, r2, #3
800359a: fb02 f203 mul.w r2, r2, r3
800359e: 6a7b ldr r3, [r7, #36] ; 0x24
80035a0: 4413 add r3, r2
80035a2: 687a ldr r2, [r7, #4]
80035a4: 4413 add r3, r2
80035a6: 607b str r3, [r7, #4]
/* Convert picture to ARGB8888 pixel format */
for(index=0; index < height; index++)
80035a8: 2300 movs r3, #0
80035aa: 627b str r3, [r7, #36] ; 0x24
80035ac: e018 b.n 80035e0 <BSP_LCD_DrawBitmap+0x148>
{
/* Pixel format conversion */
LL_ConvertLineToARGB8888((uint32_t *)pbmp, (uint32_t *)address, width, input_color_mode);
80035ae: 6a39 ldr r1, [r7, #32]
80035b0: 69fb ldr r3, [r7, #28]
80035b2: 69ba ldr r2, [r7, #24]
80035b4: 6878 ldr r0, [r7, #4]
80035b6: f000 fb51 bl 8003c5c <LL_ConvertLineToARGB8888>
/* Increment the source and destination buffers */
address+= (BSP_LCD_GetXSize()*4);
80035ba: f7ff fb95 bl 8002ce8 <BSP_LCD_GetXSize>
80035be: 4603 mov r3, r0
80035c0: 009b lsls r3, r3, #2
80035c2: 6a3a ldr r2, [r7, #32]
80035c4: 4413 add r3, r2
80035c6: 623b str r3, [r7, #32]
pbmp -= width*(bit_pixel/8);
80035c8: 693b ldr r3, [r7, #16]
80035ca: 08db lsrs r3, r3, #3
80035cc: 69ba ldr r2, [r7, #24]
80035ce: fb02 f303 mul.w r3, r2, r3
80035d2: 425b negs r3, r3
80035d4: 687a ldr r2, [r7, #4]
80035d6: 4413 add r3, r2
80035d8: 607b str r3, [r7, #4]
for(index=0; index < height; index++)
80035da: 6a7b ldr r3, [r7, #36] ; 0x24
80035dc: 3301 adds r3, #1
80035de: 627b str r3, [r7, #36] ; 0x24
80035e0: 6a7a ldr r2, [r7, #36] ; 0x24
80035e2: 697b ldr r3, [r7, #20]
80035e4: 429a cmp r2, r3
80035e6: d3e2 bcc.n 80035ae <BSP_LCD_DrawBitmap+0x116>
}
}
80035e8: bf00 nop
80035ea: 372c adds r7, #44 ; 0x2c
80035ec: 46bd mov sp, r7
80035ee: bd90 pop {r4, r7, pc}
80035f0: 2000041c .word 0x2000041c
80035f4: 20008e70 .word 0x20008e70
080035f8 <BSP_LCD_FillRect>:
* @param Width: Rectangle width
* @param Height: Rectangle height
* @retval None
*/
void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
{
80035f8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
80035fc: b086 sub sp, #24
80035fe: af02 add r7, sp, #8
8003600: 4604 mov r4, r0
8003602: 4608 mov r0, r1
8003604: 4611 mov r1, r2
8003606: 461a mov r2, r3
8003608: 4623 mov r3, r4
800360a: 80fb strh r3, [r7, #6]
800360c: 4603 mov r3, r0
800360e: 80bb strh r3, [r7, #4]
8003610: 460b mov r3, r1
8003612: 807b strh r3, [r7, #2]
8003614: 4613 mov r3, r2
8003616: 803b strh r3, [r7, #0]
uint32_t x_address = 0;
8003618: 2300 movs r3, #0
800361a: 60fb str r3, [r7, #12]
/* Set the text color */
BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor);
800361c: 4b30 ldr r3, [pc, #192] ; (80036e0 <BSP_LCD_FillRect+0xe8>)
800361e: 681a ldr r2, [r3, #0]
8003620: 4930 ldr r1, [pc, #192] ; (80036e4 <BSP_LCD_FillRect+0xec>)
8003622: 4613 mov r3, r2
8003624: 005b lsls r3, r3, #1
8003626: 4413 add r3, r2
8003628: 009b lsls r3, r3, #2
800362a: 440b add r3, r1
800362c: 681b ldr r3, [r3, #0]
800362e: 4618 mov r0, r3
8003630: f7ff fbf2 bl 8002e18 <BSP_LCD_SetTextColor>
/* Get the rectangle start address */
if(hLtdcHandler.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)
8003634: 4b2a ldr r3, [pc, #168] ; (80036e0 <BSP_LCD_FillRect+0xe8>)
8003636: 681b ldr r3, [r3, #0]
8003638: 4a2b ldr r2, [pc, #172] ; (80036e8 <BSP_LCD_FillRect+0xf0>)
800363a: 2134 movs r1, #52 ; 0x34
800363c: fb01 f303 mul.w r3, r1, r3
8003640: 4413 add r3, r2
8003642: 3348 adds r3, #72 ; 0x48
8003644: 681b ldr r3, [r3, #0]
8003646: 2b02 cmp r3, #2
8003648: d114 bne.n 8003674 <BSP_LCD_FillRect+0x7c>
{ /* RGB565 format */
x_address = (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress) + 2*(BSP_LCD_GetXSize()*Ypos + Xpos);
800364a: 4b25 ldr r3, [pc, #148] ; (80036e0 <BSP_LCD_FillRect+0xe8>)
800364c: 681b ldr r3, [r3, #0]
800364e: 4a26 ldr r2, [pc, #152] ; (80036e8 <BSP_LCD_FillRect+0xf0>)
8003650: 2134 movs r1, #52 ; 0x34
8003652: fb01 f303 mul.w r3, r1, r3
8003656: 4413 add r3, r2
8003658: 335c adds r3, #92 ; 0x5c
800365a: 681c ldr r4, [r3, #0]
800365c: f7ff fb44 bl 8002ce8 <BSP_LCD_GetXSize>
8003660: 4602 mov r2, r0
8003662: 88bb ldrh r3, [r7, #4]
8003664: fb03 f202 mul.w r2, r3, r2
8003668: 88fb ldrh r3, [r7, #6]
800366a: 4413 add r3, r2
800366c: 005b lsls r3, r3, #1
800366e: 4423 add r3, r4
8003670: 60fb str r3, [r7, #12]
8003672: e013 b.n 800369c <BSP_LCD_FillRect+0xa4>
}
else
{ /* ARGB8888 format */
x_address = (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos);
8003674: 4b1a ldr r3, [pc, #104] ; (80036e0 <BSP_LCD_FillRect+0xe8>)
8003676: 681b ldr r3, [r3, #0]
8003678: 4a1b ldr r2, [pc, #108] ; (80036e8 <BSP_LCD_FillRect+0xf0>)
800367a: 2134 movs r1, #52 ; 0x34
800367c: fb01 f303 mul.w r3, r1, r3
8003680: 4413 add r3, r2
8003682: 335c adds r3, #92 ; 0x5c
8003684: 681c ldr r4, [r3, #0]
8003686: f7ff fb2f bl 8002ce8 <BSP_LCD_GetXSize>
800368a: 4602 mov r2, r0
800368c: 88bb ldrh r3, [r7, #4]
800368e: fb03 f202 mul.w r2, r3, r2
8003692: 88fb ldrh r3, [r7, #6]
8003694: 4413 add r3, r2
8003696: 009b lsls r3, r3, #2
8003698: 4423 add r3, r4
800369a: 60fb str r3, [r7, #12]
}
/* Fill the rectangle */
LL_FillBuffer(ActiveLayer, (uint32_t *)x_address, Width, Height, (BSP_LCD_GetXSize() - Width), DrawProp[ActiveLayer].TextColor);
800369c: 4b10 ldr r3, [pc, #64] ; (80036e0 <BSP_LCD_FillRect+0xe8>)
800369e: 681c ldr r4, [r3, #0]
80036a0: 68fd ldr r5, [r7, #12]
80036a2: 887e ldrh r6, [r7, #2]
80036a4: f8b7 8000 ldrh.w r8, [r7]
80036a8: f7ff fb1e bl 8002ce8 <BSP_LCD_GetXSize>
80036ac: 4602 mov r2, r0
80036ae: 887b ldrh r3, [r7, #2]
80036b0: 1ad1 subs r1, r2, r3
80036b2: 4b0b ldr r3, [pc, #44] ; (80036e0 <BSP_LCD_FillRect+0xe8>)
80036b4: 681a ldr r2, [r3, #0]
80036b6: 480b ldr r0, [pc, #44] ; (80036e4 <BSP_LCD_FillRect+0xec>)
80036b8: 4613 mov r3, r2
80036ba: 005b lsls r3, r3, #1
80036bc: 4413 add r3, r2
80036be: 009b lsls r3, r3, #2
80036c0: 4403 add r3, r0
80036c2: 681b ldr r3, [r3, #0]
80036c4: 9301 str r3, [sp, #4]
80036c6: 9100 str r1, [sp, #0]
80036c8: 4643 mov r3, r8
80036ca: 4632 mov r2, r6
80036cc: 4629 mov r1, r5
80036ce: 4620 mov r0, r4
80036d0: f000 fa78 bl 8003bc4 <LL_FillBuffer>
}
80036d4: bf00 nop
80036d6: 3710 adds r7, #16
80036d8: 46bd mov sp, r7
80036da: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
80036de: bf00 nop
80036e0: 2000041c .word 0x2000041c
80036e4: 20000420 .word 0x20000420
80036e8: 20008e70 .word 0x20008e70
080036ec <BSP_LCD_FillCircle>:
* @param Ypos: Y position
* @param Radius: Circle radius
* @retval None
*/
void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
{
80036ec: b580 push {r7, lr}
80036ee: b086 sub sp, #24
80036f0: af00 add r7, sp, #0
80036f2: 4603 mov r3, r0
80036f4: 80fb strh r3, [r7, #6]
80036f6: 460b mov r3, r1
80036f8: 80bb strh r3, [r7, #4]
80036fa: 4613 mov r3, r2
80036fc: 807b strh r3, [r7, #2]
int32_t decision; /* Decision Variable */
uint32_t current_x; /* Current X Value */
uint32_t current_y; /* Current Y Value */
decision = 3 - (Radius << 1);
80036fe: 887b ldrh r3, [r7, #2]
8003700: 005b lsls r3, r3, #1
8003702: f1c3 0303 rsb r3, r3, #3
8003706: 617b str r3, [r7, #20]
current_x = 0;
8003708: 2300 movs r3, #0
800370a: 613b str r3, [r7, #16]
current_y = Radius;
800370c: 887b ldrh r3, [r7, #2]
800370e: 60fb str r3, [r7, #12]
BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor);
8003710: 4b44 ldr r3, [pc, #272] ; (8003824 <BSP_LCD_FillCircle+0x138>)
8003712: 681a ldr r2, [r3, #0]
8003714: 4944 ldr r1, [pc, #272] ; (8003828 <BSP_LCD_FillCircle+0x13c>)
8003716: 4613 mov r3, r2
8003718: 005b lsls r3, r3, #1
800371a: 4413 add r3, r2
800371c: 009b lsls r3, r3, #2
800371e: 440b add r3, r1
8003720: 681b ldr r3, [r3, #0]
8003722: 4618 mov r0, r3
8003724: f7ff fb78 bl 8002e18 <BSP_LCD_SetTextColor>
while (current_x <= current_y)
8003728: e061 b.n 80037ee <BSP_LCD_FillCircle+0x102>
{
if(current_y > 0)
800372a: 68fb ldr r3, [r7, #12]
800372c: 2b00 cmp r3, #0
800372e: d021 beq.n 8003774 <BSP_LCD_FillCircle+0x88>
{
BSP_LCD_DrawHLine(Xpos - current_y, Ypos + current_x, 2*current_y);
8003730: 68fb ldr r3, [r7, #12]
8003732: b29b uxth r3, r3
8003734: 88fa ldrh r2, [r7, #6]
8003736: 1ad3 subs r3, r2, r3
8003738: b298 uxth r0, r3
800373a: 693b ldr r3, [r7, #16]
800373c: b29a uxth r2, r3
800373e: 88bb ldrh r3, [r7, #4]
8003740: 4413 add r3, r2
8003742: b299 uxth r1, r3
8003744: 68fb ldr r3, [r7, #12]
8003746: b29b uxth r3, r3
8003748: 005b lsls r3, r3, #1
800374a: b29b uxth r3, r3
800374c: 461a mov r2, r3
800374e: f7ff fd0d bl 800316c <BSP_LCD_DrawHLine>
BSP_LCD_DrawHLine(Xpos - current_y, Ypos - current_x, 2*current_y);
8003752: 68fb ldr r3, [r7, #12]
8003754: b29b uxth r3, r3
8003756: 88fa ldrh r2, [r7, #6]
8003758: 1ad3 subs r3, r2, r3
800375a: b298 uxth r0, r3
800375c: 693b ldr r3, [r7, #16]
800375e: b29b uxth r3, r3
8003760: 88ba ldrh r2, [r7, #4]
8003762: 1ad3 subs r3, r2, r3
8003764: b299 uxth r1, r3
8003766: 68fb ldr r3, [r7, #12]
8003768: b29b uxth r3, r3
800376a: 005b lsls r3, r3, #1
800376c: b29b uxth r3, r3
800376e: 461a mov r2, r3
8003770: f7ff fcfc bl 800316c <BSP_LCD_DrawHLine>
}
if(current_x > 0)
8003774: 693b ldr r3, [r7, #16]
8003776: 2b00 cmp r3, #0
8003778: d021 beq.n 80037be <BSP_LCD_FillCircle+0xd2>
{
BSP_LCD_DrawHLine(Xpos - current_x, Ypos - current_y, 2*current_x);
800377a: 693b ldr r3, [r7, #16]
800377c: b29b uxth r3, r3
800377e: 88fa ldrh r2, [r7, #6]
8003780: 1ad3 subs r3, r2, r3
8003782: b298 uxth r0, r3
8003784: 68fb ldr r3, [r7, #12]
8003786: b29b uxth r3, r3
8003788: 88ba ldrh r2, [r7, #4]
800378a: 1ad3 subs r3, r2, r3
800378c: b299 uxth r1, r3
800378e: 693b ldr r3, [r7, #16]
8003790: b29b uxth r3, r3
8003792: 005b lsls r3, r3, #1
8003794: b29b uxth r3, r3
8003796: 461a mov r2, r3
8003798: f7ff fce8 bl 800316c <BSP_LCD_DrawHLine>
BSP_LCD_DrawHLine(Xpos - current_x, Ypos + current_y, 2*current_x);
800379c: 693b ldr r3, [r7, #16]
800379e: b29b uxth r3, r3
80037a0: 88fa ldrh r2, [r7, #6]
80037a2: 1ad3 subs r3, r2, r3
80037a4: b298 uxth r0, r3
80037a6: 68fb ldr r3, [r7, #12]
80037a8: b29a uxth r2, r3
80037aa: 88bb ldrh r3, [r7, #4]
80037ac: 4413 add r3, r2
80037ae: b299 uxth r1, r3
80037b0: 693b ldr r3, [r7, #16]
80037b2: b29b uxth r3, r3
80037b4: 005b lsls r3, r3, #1
80037b6: b29b uxth r3, r3
80037b8: 461a mov r2, r3
80037ba: f7ff fcd7 bl 800316c <BSP_LCD_DrawHLine>
}
if (decision < 0)
80037be: 697b ldr r3, [r7, #20]
80037c0: 2b00 cmp r3, #0
80037c2: da06 bge.n 80037d2 <BSP_LCD_FillCircle+0xe6>
{
decision += (current_x << 2) + 6;
80037c4: 693b ldr r3, [r7, #16]
80037c6: 009a lsls r2, r3, #2
80037c8: 697b ldr r3, [r7, #20]
80037ca: 4413 add r3, r2
80037cc: 3306 adds r3, #6
80037ce: 617b str r3, [r7, #20]
80037d0: e00a b.n 80037e8 <BSP_LCD_FillCircle+0xfc>
}
else
{
decision += ((current_x - current_y) << 2) + 10;
80037d2: 693a ldr r2, [r7, #16]
80037d4: 68fb ldr r3, [r7, #12]
80037d6: 1ad3 subs r3, r2, r3
80037d8: 009a lsls r2, r3, #2
80037da: 697b ldr r3, [r7, #20]
80037dc: 4413 add r3, r2
80037de: 330a adds r3, #10
80037e0: 617b str r3, [r7, #20]
current_y--;
80037e2: 68fb ldr r3, [r7, #12]
80037e4: 3b01 subs r3, #1
80037e6: 60fb str r3, [r7, #12]
}
current_x++;
80037e8: 693b ldr r3, [r7, #16]
80037ea: 3301 adds r3, #1
80037ec: 613b str r3, [r7, #16]
while (current_x <= current_y)
80037ee: 693a ldr r2, [r7, #16]
80037f0: 68fb ldr r3, [r7, #12]
80037f2: 429a cmp r2, r3
80037f4: d999 bls.n 800372a <BSP_LCD_FillCircle+0x3e>
}
BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor);
80037f6: 4b0b ldr r3, [pc, #44] ; (8003824 <BSP_LCD_FillCircle+0x138>)
80037f8: 681a ldr r2, [r3, #0]
80037fa: 490b ldr r1, [pc, #44] ; (8003828 <BSP_LCD_FillCircle+0x13c>)
80037fc: 4613 mov r3, r2
80037fe: 005b lsls r3, r3, #1
8003800: 4413 add r3, r2
8003802: 009b lsls r3, r3, #2
8003804: 440b add r3, r1
8003806: 681b ldr r3, [r3, #0]
8003808: 4618 mov r0, r3
800380a: f7ff fb05 bl 8002e18 <BSP_LCD_SetTextColor>
BSP_LCD_DrawCircle(Xpos, Ypos, Radius);
800380e: 887a ldrh r2, [r7, #2]
8003810: 88b9 ldrh r1, [r7, #4]
8003812: 88fb ldrh r3, [r7, #6]
8003814: 4618 mov r0, r3
8003816: f7ff fd07 bl 8003228 <BSP_LCD_DrawCircle>
}
800381a: bf00 nop
800381c: 3718 adds r7, #24
800381e: 46bd mov sp, r7
8003820: bd80 pop {r7, pc}
8003822: bf00 nop
8003824: 2000041c .word 0x2000041c
8003828: 20000420 .word 0x20000420
0800382c <BSP_LCD_DisplayOn>:
/**
* @brief Enables the display.
* @retval None
*/
void BSP_LCD_DisplayOn(void)
{
800382c: b580 push {r7, lr}
800382e: af00 add r7, sp, #0
/* Display On */
__HAL_LTDC_ENABLE(&hLtdcHandler);
8003830: 4b0a ldr r3, [pc, #40] ; (800385c <BSP_LCD_DisplayOn+0x30>)
8003832: 681b ldr r3, [r3, #0]
8003834: 699a ldr r2, [r3, #24]
8003836: 4b09 ldr r3, [pc, #36] ; (800385c <BSP_LCD_DisplayOn+0x30>)
8003838: 681b ldr r3, [r3, #0]
800383a: f042 0201 orr.w r2, r2, #1
800383e: 619a str r2, [r3, #24]
HAL_GPIO_WritePin(LCD_DISP_GPIO_PORT, LCD_DISP_PIN, GPIO_PIN_SET); /* Assert LCD_DISP pin */
8003840: 2201 movs r2, #1
8003842: f44f 5180 mov.w r1, #4096 ; 0x1000
8003846: 4806 ldr r0, [pc, #24] ; (8003860 <BSP_LCD_DisplayOn+0x34>)
8003848: f004 fca6 bl 8008198 <HAL_GPIO_WritePin>
HAL_GPIO_WritePin(LCD_BL_CTRL_GPIO_PORT, LCD_BL_CTRL_PIN, GPIO_PIN_SET); /* Assert LCD_BL_CTRL pin */
800384c: 2201 movs r2, #1
800384e: 2108 movs r1, #8
8003850: 4804 ldr r0, [pc, #16] ; (8003864 <BSP_LCD_DisplayOn+0x38>)
8003852: f004 fca1 bl 8008198 <HAL_GPIO_WritePin>
}
8003856: bf00 nop
8003858: bd80 pop {r7, pc}
800385a: bf00 nop
800385c: 20008e70 .word 0x20008e70
8003860: 40022000 .word 0x40022000
8003864: 40022800 .word 0x40022800
08003868 <BSP_LCD_MspInit>:
* @param hltdc: LTDC handle
* @param Params
* @retval None
*/
__weak void BSP_LCD_MspInit(LTDC_HandleTypeDef *hltdc, void *Params)
{
8003868: b580 push {r7, lr}
800386a: b090 sub sp, #64 ; 0x40
800386c: af00 add r7, sp, #0
800386e: 6078 str r0, [r7, #4]
8003870: 6039 str r1, [r7, #0]
GPIO_InitTypeDef gpio_init_structure;
/* Enable the LTDC and DMA2D clocks */
__HAL_RCC_LTDC_CLK_ENABLE();
8003872: 4b64 ldr r3, [pc, #400] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003874: 6c5b ldr r3, [r3, #68] ; 0x44
8003876: 4a63 ldr r2, [pc, #396] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003878: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
800387c: 6453 str r3, [r2, #68] ; 0x44
800387e: 4b61 ldr r3, [pc, #388] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003880: 6c5b ldr r3, [r3, #68] ; 0x44
8003882: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
8003886: 62bb str r3, [r7, #40] ; 0x28
8003888: 6abb ldr r3, [r7, #40] ; 0x28
__HAL_RCC_DMA2D_CLK_ENABLE();
800388a: 4b5e ldr r3, [pc, #376] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
800388c: 6b1b ldr r3, [r3, #48] ; 0x30
800388e: 4a5d ldr r2, [pc, #372] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003890: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
8003894: 6313 str r3, [r2, #48] ; 0x30
8003896: 4b5b ldr r3, [pc, #364] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003898: 6b1b ldr r3, [r3, #48] ; 0x30
800389a: f403 0300 and.w r3, r3, #8388608 ; 0x800000
800389e: 627b str r3, [r7, #36] ; 0x24
80038a0: 6a7b ldr r3, [r7, #36] ; 0x24
/* Enable GPIOs clock */
__HAL_RCC_GPIOE_CLK_ENABLE();
80038a2: 4b58 ldr r3, [pc, #352] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038a4: 6b1b ldr r3, [r3, #48] ; 0x30
80038a6: 4a57 ldr r2, [pc, #348] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038a8: f043 0310 orr.w r3, r3, #16
80038ac: 6313 str r3, [r2, #48] ; 0x30
80038ae: 4b55 ldr r3, [pc, #340] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038b0: 6b1b ldr r3, [r3, #48] ; 0x30
80038b2: f003 0310 and.w r3, r3, #16
80038b6: 623b str r3, [r7, #32]
80038b8: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOG_CLK_ENABLE();
80038ba: 4b52 ldr r3, [pc, #328] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038bc: 6b1b ldr r3, [r3, #48] ; 0x30
80038be: 4a51 ldr r2, [pc, #324] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038c0: f043 0340 orr.w r3, r3, #64 ; 0x40
80038c4: 6313 str r3, [r2, #48] ; 0x30
80038c6: 4b4f ldr r3, [pc, #316] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038c8: 6b1b ldr r3, [r3, #48] ; 0x30
80038ca: f003 0340 and.w r3, r3, #64 ; 0x40
80038ce: 61fb str r3, [r7, #28]
80038d0: 69fb ldr r3, [r7, #28]
__HAL_RCC_GPIOI_CLK_ENABLE();
80038d2: 4b4c ldr r3, [pc, #304] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038d4: 6b1b ldr r3, [r3, #48] ; 0x30
80038d6: 4a4b ldr r2, [pc, #300] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038d8: f443 7380 orr.w r3, r3, #256 ; 0x100
80038dc: 6313 str r3, [r2, #48] ; 0x30
80038de: 4b49 ldr r3, [pc, #292] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038e0: 6b1b ldr r3, [r3, #48] ; 0x30
80038e2: f403 7380 and.w r3, r3, #256 ; 0x100
80038e6: 61bb str r3, [r7, #24]
80038e8: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOJ_CLK_ENABLE();
80038ea: 4b46 ldr r3, [pc, #280] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038ec: 6b1b ldr r3, [r3, #48] ; 0x30
80038ee: 4a45 ldr r2, [pc, #276] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038f0: f443 7300 orr.w r3, r3, #512 ; 0x200
80038f4: 6313 str r3, [r2, #48] ; 0x30
80038f6: 4b43 ldr r3, [pc, #268] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
80038f8: 6b1b ldr r3, [r3, #48] ; 0x30
80038fa: f403 7300 and.w r3, r3, #512 ; 0x200
80038fe: 617b str r3, [r7, #20]
8003900: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOK_CLK_ENABLE();
8003902: 4b40 ldr r3, [pc, #256] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003904: 6b1b ldr r3, [r3, #48] ; 0x30
8003906: 4a3f ldr r2, [pc, #252] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003908: f443 6380 orr.w r3, r3, #1024 ; 0x400
800390c: 6313 str r3, [r2, #48] ; 0x30
800390e: 4b3d ldr r3, [pc, #244] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003910: 6b1b ldr r3, [r3, #48] ; 0x30
8003912: f403 6380 and.w r3, r3, #1024 ; 0x400
8003916: 613b str r3, [r7, #16]
8003918: 693b ldr r3, [r7, #16]
LCD_DISP_GPIO_CLK_ENABLE();
800391a: 4b3a ldr r3, [pc, #232] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
800391c: 6b1b ldr r3, [r3, #48] ; 0x30
800391e: 4a39 ldr r2, [pc, #228] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003920: f443 7380 orr.w r3, r3, #256 ; 0x100
8003924: 6313 str r3, [r2, #48] ; 0x30
8003926: 4b37 ldr r3, [pc, #220] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003928: 6b1b ldr r3, [r3, #48] ; 0x30
800392a: f403 7380 and.w r3, r3, #256 ; 0x100
800392e: 60fb str r3, [r7, #12]
8003930: 68fb ldr r3, [r7, #12]
LCD_BL_CTRL_GPIO_CLK_ENABLE();
8003932: 4b34 ldr r3, [pc, #208] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003934: 6b1b ldr r3, [r3, #48] ; 0x30
8003936: 4a33 ldr r2, [pc, #204] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003938: f443 6380 orr.w r3, r3, #1024 ; 0x400
800393c: 6313 str r3, [r2, #48] ; 0x30
800393e: 4b31 ldr r3, [pc, #196] ; (8003a04 <BSP_LCD_MspInit+0x19c>)
8003940: 6b1b ldr r3, [r3, #48] ; 0x30
8003942: f403 6380 and.w r3, r3, #1024 ; 0x400
8003946: 60bb str r3, [r7, #8]
8003948: 68bb ldr r3, [r7, #8]
/*** LTDC Pins configuration ***/
/* GPIOE configuration */
gpio_init_structure.Pin = GPIO_PIN_4;
800394a: 2310 movs r3, #16
800394c: 62fb str r3, [r7, #44] ; 0x2c
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
800394e: 2302 movs r3, #2
8003950: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Pull = GPIO_NOPULL;
8003952: 2300 movs r3, #0
8003954: 637b str r3, [r7, #52] ; 0x34
gpio_init_structure.Speed = GPIO_SPEED_FAST;
8003956: 2302 movs r3, #2
8003958: 63bb str r3, [r7, #56] ; 0x38
gpio_init_structure.Alternate = GPIO_AF14_LTDC;
800395a: 230e movs r3, #14
800395c: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOE, &gpio_init_structure);
800395e: f107 032c add.w r3, r7, #44 ; 0x2c
8003962: 4619 mov r1, r3
8003964: 4828 ldr r0, [pc, #160] ; (8003a08 <BSP_LCD_MspInit+0x1a0>)
8003966: f004 f94b bl 8007c00 <HAL_GPIO_Init>
/* GPIOG configuration */
gpio_init_structure.Pin = GPIO_PIN_12;
800396a: f44f 5380 mov.w r3, #4096 ; 0x1000
800396e: 62fb str r3, [r7, #44] ; 0x2c
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
8003970: 2302 movs r3, #2
8003972: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Alternate = GPIO_AF9_LTDC;
8003974: 2309 movs r3, #9
8003976: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOG, &gpio_init_structure);
8003978: f107 032c add.w r3, r7, #44 ; 0x2c
800397c: 4619 mov r1, r3
800397e: 4823 ldr r0, [pc, #140] ; (8003a0c <BSP_LCD_MspInit+0x1a4>)
8003980: f004 f93e bl 8007c00 <HAL_GPIO_Init>
/* GPIOI LTDC alternate configuration */
gpio_init_structure.Pin = GPIO_PIN_9 | GPIO_PIN_10 | \
8003984: f44f 4366 mov.w r3, #58880 ; 0xe600
8003988: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
800398a: 2302 movs r3, #2
800398c: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Alternate = GPIO_AF14_LTDC;
800398e: 230e movs r3, #14
8003990: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOI, &gpio_init_structure);
8003992: f107 032c add.w r3, r7, #44 ; 0x2c
8003996: 4619 mov r1, r3
8003998: 481d ldr r0, [pc, #116] ; (8003a10 <BSP_LCD_MspInit+0x1a8>)
800399a: f004 f931 bl 8007c00 <HAL_GPIO_Init>
/* GPIOJ configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | \
800399e: f64e 73ff movw r3, #61439 ; 0xefff
80039a2: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7 | \
GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | \
GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
80039a4: 2302 movs r3, #2
80039a6: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Alternate = GPIO_AF14_LTDC;
80039a8: 230e movs r3, #14
80039aa: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOJ, &gpio_init_structure);
80039ac: f107 032c add.w r3, r7, #44 ; 0x2c
80039b0: 4619 mov r1, r3
80039b2: 4818 ldr r0, [pc, #96] ; (8003a14 <BSP_LCD_MspInit+0x1ac>)
80039b4: f004 f924 bl 8007c00 <HAL_GPIO_Init>
/* GPIOK configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_4 | \
80039b8: 23f7 movs r3, #247 ; 0xf7
80039ba: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7;
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
80039bc: 2302 movs r3, #2
80039be: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Alternate = GPIO_AF14_LTDC;
80039c0: 230e movs r3, #14
80039c2: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOK, &gpio_init_structure);
80039c4: f107 032c add.w r3, r7, #44 ; 0x2c
80039c8: 4619 mov r1, r3
80039ca: 4813 ldr r0, [pc, #76] ; (8003a18 <BSP_LCD_MspInit+0x1b0>)
80039cc: f004 f918 bl 8007c00 <HAL_GPIO_Init>
/* LCD_DISP GPIO configuration */
gpio_init_structure.Pin = LCD_DISP_PIN; /* LCD_DISP pin has to be manually controlled */
80039d0: f44f 5380 mov.w r3, #4096 ; 0x1000
80039d4: 62fb str r3, [r7, #44] ; 0x2c
gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP;
80039d6: 2301 movs r3, #1
80039d8: 633b str r3, [r7, #48] ; 0x30
HAL_GPIO_Init(LCD_DISP_GPIO_PORT, &gpio_init_structure);
80039da: f107 032c add.w r3, r7, #44 ; 0x2c
80039de: 4619 mov r1, r3
80039e0: 480b ldr r0, [pc, #44] ; (8003a10 <BSP_LCD_MspInit+0x1a8>)
80039e2: f004 f90d bl 8007c00 <HAL_GPIO_Init>
/* LCD_BL_CTRL GPIO configuration */
gpio_init_structure.Pin = LCD_BL_CTRL_PIN; /* LCD_BL_CTRL pin has to be manually controlled */
80039e6: 2308 movs r3, #8
80039e8: 62fb str r3, [r7, #44] ; 0x2c
gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP;
80039ea: 2301 movs r3, #1
80039ec: 633b str r3, [r7, #48] ; 0x30
HAL_GPIO_Init(LCD_BL_CTRL_GPIO_PORT, &gpio_init_structure);
80039ee: f107 032c add.w r3, r7, #44 ; 0x2c
80039f2: 4619 mov r1, r3
80039f4: 4808 ldr r0, [pc, #32] ; (8003a18 <BSP_LCD_MspInit+0x1b0>)
80039f6: f004 f903 bl 8007c00 <HAL_GPIO_Init>
}
80039fa: bf00 nop
80039fc: 3740 adds r7, #64 ; 0x40
80039fe: 46bd mov sp, r7
8003a00: bd80 pop {r7, pc}
8003a02: bf00 nop
8003a04: 40023800 .word 0x40023800
8003a08: 40021000 .word 0x40021000
8003a0c: 40021800 .word 0x40021800
8003a10: 40022000 .word 0x40022000
8003a14: 40022400 .word 0x40022400
8003a18: 40022800 .word 0x40022800
08003a1c <BSP_LCD_ClockConfig>:
* @note This API is called by BSP_LCD_Init()
* Being __weak it can be overwritten by the application
* @retval None
*/
__weak void BSP_LCD_ClockConfig(LTDC_HandleTypeDef *hltdc, void *Params)
{
8003a1c: b580 push {r7, lr}
8003a1e: b082 sub sp, #8
8003a20: af00 add r7, sp, #0
8003a22: 6078 str r0, [r7, #4]
8003a24: 6039 str r1, [r7, #0]
/* RK043FN48H LCD clock configuration */
/* PLLSAI_VCO Input = HSE_VALUE/PLL_M = 1 Mhz */
/* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN = 192 Mhz */
/* PLLLCDCLK = PLLSAI_VCO Output/PLLSAIR = 192/5 = 38.4 Mhz */
/* LTDC clock frequency = PLLLCDCLK / LTDC_PLLSAI_DIVR_4 = 38.4/4 = 9.6Mhz */
periph_clk_init_struct.PeriphClockSelection = RCC_PERIPHCLK_LTDC;
8003a26: 4b0a ldr r3, [pc, #40] ; (8003a50 <BSP_LCD_ClockConfig+0x34>)
8003a28: 2208 movs r2, #8
8003a2a: 601a str r2, [r3, #0]
periph_clk_init_struct.PLLSAI.PLLSAIN = 192;
8003a2c: 4b08 ldr r3, [pc, #32] ; (8003a50 <BSP_LCD_ClockConfig+0x34>)
8003a2e: 22c0 movs r2, #192 ; 0xc0
8003a30: 615a str r2, [r3, #20]
periph_clk_init_struct.PLLSAI.PLLSAIR = RK043FN48H_FREQUENCY_DIVIDER;
8003a32: 4b07 ldr r3, [pc, #28] ; (8003a50 <BSP_LCD_ClockConfig+0x34>)
8003a34: 2205 movs r2, #5
8003a36: 61da str r2, [r3, #28]
periph_clk_init_struct.PLLSAIDivR = RCC_PLLSAIDIVR_4;
8003a38: 4b05 ldr r3, [pc, #20] ; (8003a50 <BSP_LCD_ClockConfig+0x34>)
8003a3a: f44f 3280 mov.w r2, #65536 ; 0x10000
8003a3e: 62da str r2, [r3, #44] ; 0x2c
HAL_RCCEx_PeriphCLKConfig(&periph_clk_init_struct);
8003a40: 4803 ldr r0, [pc, #12] ; (8003a50 <BSP_LCD_ClockConfig+0x34>)
8003a42: f006 f9f3 bl 8009e2c <HAL_RCCEx_PeriphCLKConfig>
}
8003a46: bf00 nop
8003a48: 3708 adds r7, #8
8003a4a: 46bd mov sp, r7
8003a4c: bd80 pop {r7, pc}
8003a4e: bf00 nop
8003a50: 20000438 .word 0x20000438
08003a54 <DrawChar>:
* @param Ypos: Start column address
* @param c: Pointer to the character data
* @retval None
*/
static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *c)
{
8003a54: b580 push {r7, lr}
8003a56: b088 sub sp, #32
8003a58: af00 add r7, sp, #0
8003a5a: 4603 mov r3, r0
8003a5c: 603a str r2, [r7, #0]
8003a5e: 80fb strh r3, [r7, #6]
8003a60: 460b mov r3, r1
8003a62: 80bb strh r3, [r7, #4]
uint32_t i = 0, j = 0;
8003a64: 2300 movs r3, #0
8003a66: 61fb str r3, [r7, #28]
8003a68: 2300 movs r3, #0
8003a6a: 61bb str r3, [r7, #24]
uint16_t height, width;
uint8_t offset;
uint8_t *pchar;
uint32_t line;
height = DrawProp[ActiveLayer].pFont->Height;
8003a6c: 4b53 ldr r3, [pc, #332] ; (8003bbc <DrawChar+0x168>)
8003a6e: 681a ldr r2, [r3, #0]
8003a70: 4953 ldr r1, [pc, #332] ; (8003bc0 <DrawChar+0x16c>)
8003a72: 4613 mov r3, r2
8003a74: 005b lsls r3, r3, #1
8003a76: 4413 add r3, r2
8003a78: 009b lsls r3, r3, #2
8003a7a: 440b add r3, r1
8003a7c: 3308 adds r3, #8
8003a7e: 681b ldr r3, [r3, #0]
8003a80: 88db ldrh r3, [r3, #6]
8003a82: 827b strh r3, [r7, #18]
width = DrawProp[ActiveLayer].pFont->Width;
8003a84: 4b4d ldr r3, [pc, #308] ; (8003bbc <DrawChar+0x168>)
8003a86: 681a ldr r2, [r3, #0]
8003a88: 494d ldr r1, [pc, #308] ; (8003bc0 <DrawChar+0x16c>)
8003a8a: 4613 mov r3, r2
8003a8c: 005b lsls r3, r3, #1
8003a8e: 4413 add r3, r2
8003a90: 009b lsls r3, r3, #2
8003a92: 440b add r3, r1
8003a94: 3308 adds r3, #8
8003a96: 681b ldr r3, [r3, #0]
8003a98: 889b ldrh r3, [r3, #4]
8003a9a: 823b strh r3, [r7, #16]
offset = 8 *((width + 7)/8) - width ;
8003a9c: 8a3b ldrh r3, [r7, #16]
8003a9e: 3307 adds r3, #7
8003aa0: 2b00 cmp r3, #0
8003aa2: da00 bge.n 8003aa6 <DrawChar+0x52>
8003aa4: 3307 adds r3, #7
8003aa6: 10db asrs r3, r3, #3
8003aa8: b2db uxtb r3, r3
8003aaa: 00db lsls r3, r3, #3
8003aac: b2da uxtb r2, r3
8003aae: 8a3b ldrh r3, [r7, #16]
8003ab0: b2db uxtb r3, r3
8003ab2: 1ad3 subs r3, r2, r3
8003ab4: 73fb strb r3, [r7, #15]
for(i = 0; i < height; i++)
8003ab6: 2300 movs r3, #0
8003ab8: 61fb str r3, [r7, #28]
8003aba: e076 b.n 8003baa <DrawChar+0x156>
{
pchar = ((uint8_t *)c + (width + 7)/8 * i);
8003abc: 8a3b ldrh r3, [r7, #16]
8003abe: 3307 adds r3, #7
8003ac0: 2b00 cmp r3, #0
8003ac2: da00 bge.n 8003ac6 <DrawChar+0x72>
8003ac4: 3307 adds r3, #7
8003ac6: 10db asrs r3, r3, #3
8003ac8: 461a mov r2, r3
8003aca: 69fb ldr r3, [r7, #28]
8003acc: fb03 f302 mul.w r3, r3, r2
8003ad0: 683a ldr r2, [r7, #0]
8003ad2: 4413 add r3, r2
8003ad4: 60bb str r3, [r7, #8]
switch(((width + 7)/8))
8003ad6: 8a3b ldrh r3, [r7, #16]
8003ad8: 3307 adds r3, #7
8003ada: 2b00 cmp r3, #0
8003adc: da00 bge.n 8003ae0 <DrawChar+0x8c>
8003ade: 3307 adds r3, #7
8003ae0: 10db asrs r3, r3, #3
8003ae2: 2b01 cmp r3, #1
8003ae4: d002 beq.n 8003aec <DrawChar+0x98>
8003ae6: 2b02 cmp r3, #2
8003ae8: d004 beq.n 8003af4 <DrawChar+0xa0>
8003aea: e00c b.n 8003b06 <DrawChar+0xb2>
{
case 1:
line = pchar[0];
8003aec: 68bb ldr r3, [r7, #8]
8003aee: 781b ldrb r3, [r3, #0]
8003af0: 617b str r3, [r7, #20]
break;
8003af2: e016 b.n 8003b22 <DrawChar+0xce>
case 2:
line = (pchar[0]<< 8) | pchar[1];
8003af4: 68bb ldr r3, [r7, #8]
8003af6: 781b ldrb r3, [r3, #0]
8003af8: 021b lsls r3, r3, #8
8003afa: 68ba ldr r2, [r7, #8]
8003afc: 3201 adds r2, #1
8003afe: 7812 ldrb r2, [r2, #0]
8003b00: 4313 orrs r3, r2
8003b02: 617b str r3, [r7, #20]
break;
8003b04: e00d b.n 8003b22 <DrawChar+0xce>
case 3:
default:
line = (pchar[0]<< 16) | (pchar[1]<< 8) | pchar[2];
8003b06: 68bb ldr r3, [r7, #8]
8003b08: 781b ldrb r3, [r3, #0]
8003b0a: 041a lsls r2, r3, #16
8003b0c: 68bb ldr r3, [r7, #8]
8003b0e: 3301 adds r3, #1
8003b10: 781b ldrb r3, [r3, #0]
8003b12: 021b lsls r3, r3, #8
8003b14: 4313 orrs r3, r2
8003b16: 68ba ldr r2, [r7, #8]
8003b18: 3202 adds r2, #2
8003b1a: 7812 ldrb r2, [r2, #0]
8003b1c: 4313 orrs r3, r2
8003b1e: 617b str r3, [r7, #20]
break;
8003b20: bf00 nop
}
for (j = 0; j < width; j++)
8003b22: 2300 movs r3, #0
8003b24: 61bb str r3, [r7, #24]
8003b26: e036 b.n 8003b96 <DrawChar+0x142>
{
if(line & (1 << (width- j + offset- 1)))
8003b28: 8a3a ldrh r2, [r7, #16]
8003b2a: 69bb ldr r3, [r7, #24]
8003b2c: 1ad2 subs r2, r2, r3
8003b2e: 7bfb ldrb r3, [r7, #15]
8003b30: 4413 add r3, r2
8003b32: 3b01 subs r3, #1
8003b34: 2201 movs r2, #1
8003b36: fa02 f303 lsl.w r3, r2, r3
8003b3a: 461a mov r2, r3
8003b3c: 697b ldr r3, [r7, #20]
8003b3e: 4013 ands r3, r2
8003b40: 2b00 cmp r3, #0
8003b42: d012 beq.n 8003b6a <DrawChar+0x116>
{
BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp[ActiveLayer].TextColor);
8003b44: 69bb ldr r3, [r7, #24]
8003b46: b29a uxth r2, r3
8003b48: 88fb ldrh r3, [r7, #6]
8003b4a: 4413 add r3, r2
8003b4c: b298 uxth r0, r3
8003b4e: 4b1b ldr r3, [pc, #108] ; (8003bbc <DrawChar+0x168>)
8003b50: 681a ldr r2, [r3, #0]
8003b52: 491b ldr r1, [pc, #108] ; (8003bc0 <DrawChar+0x16c>)
8003b54: 4613 mov r3, r2
8003b56: 005b lsls r3, r3, #1
8003b58: 4413 add r3, r2
8003b5a: 009b lsls r3, r3, #2
8003b5c: 440b add r3, r1
8003b5e: 681a ldr r2, [r3, #0]
8003b60: 88bb ldrh r3, [r7, #4]
8003b62: 4619 mov r1, r3
8003b64: f7ff fc50 bl 8003408 <BSP_LCD_DrawPixel>
8003b68: e012 b.n 8003b90 <DrawChar+0x13c>
}
else
{
BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp[ActiveLayer].BackColor);
8003b6a: 69bb ldr r3, [r7, #24]
8003b6c: b29a uxth r2, r3
8003b6e: 88fb ldrh r3, [r7, #6]
8003b70: 4413 add r3, r2
8003b72: b298 uxth r0, r3
8003b74: 4b11 ldr r3, [pc, #68] ; (8003bbc <DrawChar+0x168>)
8003b76: 681a ldr r2, [r3, #0]
8003b78: 4911 ldr r1, [pc, #68] ; (8003bc0 <DrawChar+0x16c>)
8003b7a: 4613 mov r3, r2
8003b7c: 005b lsls r3, r3, #1
8003b7e: 4413 add r3, r2
8003b80: 009b lsls r3, r3, #2
8003b82: 440b add r3, r1
8003b84: 3304 adds r3, #4
8003b86: 681a ldr r2, [r3, #0]
8003b88: 88bb ldrh r3, [r7, #4]
8003b8a: 4619 mov r1, r3
8003b8c: f7ff fc3c bl 8003408 <BSP_LCD_DrawPixel>
for (j = 0; j < width; j++)
8003b90: 69bb ldr r3, [r7, #24]
8003b92: 3301 adds r3, #1
8003b94: 61bb str r3, [r7, #24]
8003b96: 8a3b ldrh r3, [r7, #16]
8003b98: 69ba ldr r2, [r7, #24]
8003b9a: 429a cmp r2, r3
8003b9c: d3c4 bcc.n 8003b28 <DrawChar+0xd4>
}
}
Ypos++;
8003b9e: 88bb ldrh r3, [r7, #4]
8003ba0: 3301 adds r3, #1
8003ba2: 80bb strh r3, [r7, #4]
for(i = 0; i < height; i++)
8003ba4: 69fb ldr r3, [r7, #28]
8003ba6: 3301 adds r3, #1
8003ba8: 61fb str r3, [r7, #28]
8003baa: 8a7b ldrh r3, [r7, #18]
8003bac: 69fa ldr r2, [r7, #28]
8003bae: 429a cmp r2, r3
8003bb0: d384 bcc.n 8003abc <DrawChar+0x68>
}
}
8003bb2: bf00 nop
8003bb4: 3720 adds r7, #32
8003bb6: 46bd mov sp, r7
8003bb8: bd80 pop {r7, pc}
8003bba: bf00 nop
8003bbc: 2000041c .word 0x2000041c
8003bc0: 20000420 .word 0x20000420
08003bc4 <LL_FillBuffer>:
* @param OffLine: Offset
* @param ColorIndex: Color index
* @retval None
*/
static void LL_FillBuffer(uint32_t LayerIndex, void *pDst, uint32_t xSize, uint32_t ySize, uint32_t OffLine, uint32_t ColorIndex)
{
8003bc4: b580 push {r7, lr}
8003bc6: b086 sub sp, #24
8003bc8: af02 add r7, sp, #8
8003bca: 60f8 str r0, [r7, #12]
8003bcc: 60b9 str r1, [r7, #8]
8003bce: 607a str r2, [r7, #4]
8003bd0: 603b str r3, [r7, #0]
/* Register to memory mode with ARGB8888 as color Mode */
hDma2dHandler.Init.Mode = DMA2D_R2M;
8003bd2: 4b1e ldr r3, [pc, #120] ; (8003c4c <LL_FillBuffer+0x88>)
8003bd4: f44f 3240 mov.w r2, #196608 ; 0x30000
8003bd8: 605a str r2, [r3, #4]
if(hLtdcHandler.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)
8003bda: 4b1d ldr r3, [pc, #116] ; (8003c50 <LL_FillBuffer+0x8c>)
8003bdc: 681b ldr r3, [r3, #0]
8003bde: 4a1d ldr r2, [pc, #116] ; (8003c54 <LL_FillBuffer+0x90>)
8003be0: 2134 movs r1, #52 ; 0x34
8003be2: fb01 f303 mul.w r3, r1, r3
8003be6: 4413 add r3, r2
8003be8: 3348 adds r3, #72 ; 0x48
8003bea: 681b ldr r3, [r3, #0]
8003bec: 2b02 cmp r3, #2
8003bee: d103 bne.n 8003bf8 <LL_FillBuffer+0x34>
{ /* RGB565 format */
hDma2dHandler.Init.ColorMode = DMA2D_RGB565;
8003bf0: 4b16 ldr r3, [pc, #88] ; (8003c4c <LL_FillBuffer+0x88>)
8003bf2: 2202 movs r2, #2
8003bf4: 609a str r2, [r3, #8]
8003bf6: e002 b.n 8003bfe <LL_FillBuffer+0x3a>
}
else
{ /* ARGB8888 format */
hDma2dHandler.Init.ColorMode = DMA2D_ARGB8888;
8003bf8: 4b14 ldr r3, [pc, #80] ; (8003c4c <LL_FillBuffer+0x88>)
8003bfa: 2200 movs r2, #0
8003bfc: 609a str r2, [r3, #8]
}
hDma2dHandler.Init.OutputOffset = OffLine;
8003bfe: 4a13 ldr r2, [pc, #76] ; (8003c4c <LL_FillBuffer+0x88>)
8003c00: 69bb ldr r3, [r7, #24]
8003c02: 60d3 str r3, [r2, #12]
hDma2dHandler.Instance = DMA2D;
8003c04: 4b11 ldr r3, [pc, #68] ; (8003c4c <LL_FillBuffer+0x88>)
8003c06: 4a14 ldr r2, [pc, #80] ; (8003c58 <LL_FillBuffer+0x94>)
8003c08: 601a str r2, [r3, #0]
/* DMA2D Initialization */
if(HAL_DMA2D_Init(&hDma2dHandler) == HAL_OK)
8003c0a: 4810 ldr r0, [pc, #64] ; (8003c4c <LL_FillBuffer+0x88>)
8003c0c: f002 fbe6 bl 80063dc <HAL_DMA2D_Init>
8003c10: 4603 mov r3, r0
8003c12: 2b00 cmp r3, #0
8003c14: d115 bne.n 8003c42 <LL_FillBuffer+0x7e>
{
if(HAL_DMA2D_ConfigLayer(&hDma2dHandler, LayerIndex) == HAL_OK)
8003c16: 68f9 ldr r1, [r7, #12]
8003c18: 480c ldr r0, [pc, #48] ; (8003c4c <LL_FillBuffer+0x88>)
8003c1a: f002 fd3d bl 8006698 <HAL_DMA2D_ConfigLayer>
8003c1e: 4603 mov r3, r0
8003c20: 2b00 cmp r3, #0
8003c22: d10e bne.n 8003c42 <LL_FillBuffer+0x7e>
{
if (HAL_DMA2D_Start(&hDma2dHandler, ColorIndex, (uint32_t)pDst, xSize, ySize) == HAL_OK)
8003c24: 68ba ldr r2, [r7, #8]
8003c26: 683b ldr r3, [r7, #0]
8003c28: 9300 str r3, [sp, #0]
8003c2a: 687b ldr r3, [r7, #4]
8003c2c: 69f9 ldr r1, [r7, #28]
8003c2e: 4807 ldr r0, [pc, #28] ; (8003c4c <LL_FillBuffer+0x88>)
8003c30: f002 fc1e bl 8006470 <HAL_DMA2D_Start>
8003c34: 4603 mov r3, r0
8003c36: 2b00 cmp r3, #0
8003c38: d103 bne.n 8003c42 <LL_FillBuffer+0x7e>
{
/* Polling For DMA transfer */
HAL_DMA2D_PollForTransfer(&hDma2dHandler, 10);
8003c3a: 210a movs r1, #10
8003c3c: 4803 ldr r0, [pc, #12] ; (8003c4c <LL_FillBuffer+0x88>)
8003c3e: f002 fc42 bl 80064c6 <HAL_DMA2D_PollForTransfer>
}
}
}
}
8003c42: bf00 nop
8003c44: 3710 adds r7, #16
8003c46: 46bd mov sp, r7
8003c48: bd80 pop {r7, pc}
8003c4a: bf00 nop
8003c4c: 200003dc .word 0x200003dc
8003c50: 2000041c .word 0x2000041c
8003c54: 20008e70 .word 0x20008e70
8003c58: 4002b000 .word 0x4002b000
08003c5c <LL_ConvertLineToARGB8888>:
* @param xSize: Buffer width
* @param ColorMode: Input color mode
* @retval None
*/
static void LL_ConvertLineToARGB8888(void *pSrc, void *pDst, uint32_t xSize, uint32_t ColorMode)
{
8003c5c: b580 push {r7, lr}
8003c5e: b086 sub sp, #24
8003c60: af02 add r7, sp, #8
8003c62: 60f8 str r0, [r7, #12]
8003c64: 60b9 str r1, [r7, #8]
8003c66: 607a str r2, [r7, #4]
8003c68: 603b str r3, [r7, #0]
/* Configure the DMA2D Mode, Color Mode and output offset */
hDma2dHandler.Init.Mode = DMA2D_M2M_PFC;
8003c6a: 4b1c ldr r3, [pc, #112] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c6c: f44f 3280 mov.w r2, #65536 ; 0x10000
8003c70: 605a str r2, [r3, #4]
hDma2dHandler.Init.ColorMode = DMA2D_ARGB8888;
8003c72: 4b1a ldr r3, [pc, #104] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c74: 2200 movs r2, #0
8003c76: 609a str r2, [r3, #8]
hDma2dHandler.Init.OutputOffset = 0;
8003c78: 4b18 ldr r3, [pc, #96] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c7a: 2200 movs r2, #0
8003c7c: 60da str r2, [r3, #12]
/* Foreground Configuration */
hDma2dHandler.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
8003c7e: 4b17 ldr r3, [pc, #92] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c80: 2200 movs r2, #0
8003c82: 631a str r2, [r3, #48] ; 0x30
hDma2dHandler.LayerCfg[1].InputAlpha = 0xFF;
8003c84: 4b15 ldr r3, [pc, #84] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c86: 22ff movs r2, #255 ; 0xff
8003c88: 635a str r2, [r3, #52] ; 0x34
hDma2dHandler.LayerCfg[1].InputColorMode = ColorMode;
8003c8a: 4a14 ldr r2, [pc, #80] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c8c: 683b ldr r3, [r7, #0]
8003c8e: 62d3 str r3, [r2, #44] ; 0x2c
hDma2dHandler.LayerCfg[1].InputOffset = 0;
8003c90: 4b12 ldr r3, [pc, #72] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c92: 2200 movs r2, #0
8003c94: 629a str r2, [r3, #40] ; 0x28
hDma2dHandler.Instance = DMA2D;
8003c96: 4b11 ldr r3, [pc, #68] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c98: 4a11 ldr r2, [pc, #68] ; (8003ce0 <LL_ConvertLineToARGB8888+0x84>)
8003c9a: 601a str r2, [r3, #0]
/* DMA2D Initialization */
if(HAL_DMA2D_Init(&hDma2dHandler) == HAL_OK)
8003c9c: 480f ldr r0, [pc, #60] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003c9e: f002 fb9d bl 80063dc <HAL_DMA2D_Init>
8003ca2: 4603 mov r3, r0
8003ca4: 2b00 cmp r3, #0
8003ca6: d115 bne.n 8003cd4 <LL_ConvertLineToARGB8888+0x78>
{
if(HAL_DMA2D_ConfigLayer(&hDma2dHandler, 1) == HAL_OK)
8003ca8: 2101 movs r1, #1
8003caa: 480c ldr r0, [pc, #48] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003cac: f002 fcf4 bl 8006698 <HAL_DMA2D_ConfigLayer>
8003cb0: 4603 mov r3, r0
8003cb2: 2b00 cmp r3, #0
8003cb4: d10e bne.n 8003cd4 <LL_ConvertLineToARGB8888+0x78>
{
if (HAL_DMA2D_Start(&hDma2dHandler, (uint32_t)pSrc, (uint32_t)pDst, xSize, 1) == HAL_OK)
8003cb6: 68f9 ldr r1, [r7, #12]
8003cb8: 68ba ldr r2, [r7, #8]
8003cba: 2301 movs r3, #1
8003cbc: 9300 str r3, [sp, #0]
8003cbe: 687b ldr r3, [r7, #4]
8003cc0: 4806 ldr r0, [pc, #24] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003cc2: f002 fbd5 bl 8006470 <HAL_DMA2D_Start>
8003cc6: 4603 mov r3, r0
8003cc8: 2b00 cmp r3, #0
8003cca: d103 bne.n 8003cd4 <LL_ConvertLineToARGB8888+0x78>
{
/* Polling For DMA transfer */
HAL_DMA2D_PollForTransfer(&hDma2dHandler, 10);
8003ccc: 210a movs r1, #10
8003cce: 4803 ldr r0, [pc, #12] ; (8003cdc <LL_ConvertLineToARGB8888+0x80>)
8003cd0: f002 fbf9 bl 80064c6 <HAL_DMA2D_PollForTransfer>
}
}
}
}
8003cd4: bf00 nop
8003cd6: 3710 adds r7, #16
8003cd8: 46bd mov sp, r7
8003cda: bd80 pop {r7, pc}
8003cdc: 200003dc .word 0x200003dc
8003ce0: 4002b000 .word 0x4002b000
08003ce4 <BSP_SDRAM_Init>:
/**
* @brief Initializes the SDRAM device.
* @retval SDRAM status
*/
uint8_t BSP_SDRAM_Init(void)
{
8003ce4: b580 push {r7, lr}
8003ce6: af00 add r7, sp, #0
static uint8_t sdramstatus = SDRAM_ERROR;
/* SDRAM device configuration */
sdramHandle.Instance = FMC_SDRAM_DEVICE;
8003ce8: 4b29 ldr r3, [pc, #164] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003cea: 4a2a ldr r2, [pc, #168] ; (8003d94 <BSP_SDRAM_Init+0xb0>)
8003cec: 601a str r2, [r3, #0]
/* Timing configuration for 100Mhz as SD clock frequency (System clock is up to 200Mhz) */
Timing.LoadToActiveDelay = 2;
8003cee: 4b2a ldr r3, [pc, #168] ; (8003d98 <BSP_SDRAM_Init+0xb4>)
8003cf0: 2202 movs r2, #2
8003cf2: 601a str r2, [r3, #0]
Timing.ExitSelfRefreshDelay = 7;
8003cf4: 4b28 ldr r3, [pc, #160] ; (8003d98 <BSP_SDRAM_Init+0xb4>)
8003cf6: 2207 movs r2, #7
8003cf8: 605a str r2, [r3, #4]
Timing.SelfRefreshTime = 4;
8003cfa: 4b27 ldr r3, [pc, #156] ; (8003d98 <BSP_SDRAM_Init+0xb4>)
8003cfc: 2204 movs r2, #4
8003cfe: 609a str r2, [r3, #8]
Timing.RowCycleDelay = 7;
8003d00: 4b25 ldr r3, [pc, #148] ; (8003d98 <BSP_SDRAM_Init+0xb4>)
8003d02: 2207 movs r2, #7
8003d04: 60da str r2, [r3, #12]
Timing.WriteRecoveryTime = 2;
8003d06: 4b24 ldr r3, [pc, #144] ; (8003d98 <BSP_SDRAM_Init+0xb4>)
8003d08: 2202 movs r2, #2
8003d0a: 611a str r2, [r3, #16]
Timing.RPDelay = 2;
8003d0c: 4b22 ldr r3, [pc, #136] ; (8003d98 <BSP_SDRAM_Init+0xb4>)
8003d0e: 2202 movs r2, #2
8003d10: 615a str r2, [r3, #20]
Timing.RCDDelay = 2;
8003d12: 4b21 ldr r3, [pc, #132] ; (8003d98 <BSP_SDRAM_Init+0xb4>)
8003d14: 2202 movs r2, #2
8003d16: 619a str r2, [r3, #24]
sdramHandle.Init.SDBank = FMC_SDRAM_BANK1;
8003d18: 4b1d ldr r3, [pc, #116] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d1a: 2200 movs r2, #0
8003d1c: 605a str r2, [r3, #4]
sdramHandle.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;
8003d1e: 4b1c ldr r3, [pc, #112] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d20: 2200 movs r2, #0
8003d22: 609a str r2, [r3, #8]
sdramHandle.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
8003d24: 4b1a ldr r3, [pc, #104] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d26: 2204 movs r2, #4
8003d28: 60da str r2, [r3, #12]
sdramHandle.Init.MemoryDataWidth = SDRAM_MEMORY_WIDTH;
8003d2a: 4b19 ldr r3, [pc, #100] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d2c: 2210 movs r2, #16
8003d2e: 611a str r2, [r3, #16]
sdramHandle.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
8003d30: 4b17 ldr r3, [pc, #92] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d32: 2240 movs r2, #64 ; 0x40
8003d34: 615a str r2, [r3, #20]
sdramHandle.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_2;
8003d36: 4b16 ldr r3, [pc, #88] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d38: f44f 7280 mov.w r2, #256 ; 0x100
8003d3c: 619a str r2, [r3, #24]
sdramHandle.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
8003d3e: 4b14 ldr r3, [pc, #80] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d40: 2200 movs r2, #0
8003d42: 61da str r2, [r3, #28]
sdramHandle.Init.SDClockPeriod = SDCLOCK_PERIOD;
8003d44: 4b12 ldr r3, [pc, #72] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d46: f44f 6200 mov.w r2, #2048 ; 0x800
8003d4a: 621a str r2, [r3, #32]
sdramHandle.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE;
8003d4c: 4b10 ldr r3, [pc, #64] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d4e: f44f 5280 mov.w r2, #4096 ; 0x1000
8003d52: 625a str r2, [r3, #36] ; 0x24
sdramHandle.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0;
8003d54: 4b0e ldr r3, [pc, #56] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d56: 2200 movs r2, #0
8003d58: 629a str r2, [r3, #40] ; 0x28
/* SDRAM controller initialization */
BSP_SDRAM_MspInit(&sdramHandle, NULL); /* __weak function can be rewritten by the application */
8003d5a: 2100 movs r1, #0
8003d5c: 480c ldr r0, [pc, #48] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d5e: f000 f87f bl 8003e60 <BSP_SDRAM_MspInit>
if(HAL_SDRAM_Init(&sdramHandle, &Timing) != HAL_OK)
8003d62: 490d ldr r1, [pc, #52] ; (8003d98 <BSP_SDRAM_Init+0xb4>)
8003d64: 480a ldr r0, [pc, #40] ; (8003d90 <BSP_SDRAM_Init+0xac>)
8003d66: f007 f83b bl 800ade0 <HAL_SDRAM_Init>
8003d6a: 4603 mov r3, r0
8003d6c: 2b00 cmp r3, #0
8003d6e: d003 beq.n 8003d78 <BSP_SDRAM_Init+0x94>
{
sdramstatus = SDRAM_ERROR;
8003d70: 4b0a ldr r3, [pc, #40] ; (8003d9c <BSP_SDRAM_Init+0xb8>)
8003d72: 2201 movs r2, #1
8003d74: 701a strb r2, [r3, #0]
8003d76: e002 b.n 8003d7e <BSP_SDRAM_Init+0x9a>
}
else
{
sdramstatus = SDRAM_OK;
8003d78: 4b08 ldr r3, [pc, #32] ; (8003d9c <BSP_SDRAM_Init+0xb8>)
8003d7a: 2200 movs r2, #0
8003d7c: 701a strb r2, [r3, #0]
}
/* SDRAM initialization sequence */
BSP_SDRAM_Initialization_sequence(REFRESH_COUNT);
8003d7e: f240 6003 movw r0, #1539 ; 0x603
8003d82: f000 f80d bl 8003da0 <BSP_SDRAM_Initialization_sequence>
return sdramstatus;
8003d86: 4b05 ldr r3, [pc, #20] ; (8003d9c <BSP_SDRAM_Init+0xb8>)
8003d88: 781b ldrb r3, [r3, #0]
}
8003d8a: 4618 mov r0, r3
8003d8c: bd80 pop {r7, pc}
8003d8e: bf00 nop
8003d90: 20008f18 .word 0x20008f18
8003d94: a0000140 .word 0xa0000140
8003d98: 200004bc .word 0x200004bc
8003d9c: 20000060 .word 0x20000060
08003da0 <BSP_SDRAM_Initialization_sequence>:
* @brief Programs the SDRAM device.
* @param RefreshCount: SDRAM refresh counter value
* @retval None
*/
void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount)
{
8003da0: b580 push {r7, lr}
8003da2: b084 sub sp, #16
8003da4: af00 add r7, sp, #0
8003da6: 6078 str r0, [r7, #4]
__IO uint32_t tmpmrd = 0;
8003da8: 2300 movs r3, #0
8003daa: 60fb str r3, [r7, #12]
/* Step 1: Configure a clock configuration enable command */
Command.CommandMode = FMC_SDRAM_CMD_CLK_ENABLE;
8003dac: 4b2a ldr r3, [pc, #168] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003dae: 2201 movs r2, #1
8003db0: 601a str r2, [r3, #0]
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
8003db2: 4b29 ldr r3, [pc, #164] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003db4: 2210 movs r2, #16
8003db6: 605a str r2, [r3, #4]
Command.AutoRefreshNumber = 1;
8003db8: 4b27 ldr r3, [pc, #156] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003dba: 2201 movs r2, #1
8003dbc: 609a str r2, [r3, #8]
Command.ModeRegisterDefinition = 0;
8003dbe: 4b26 ldr r3, [pc, #152] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003dc0: 2200 movs r2, #0
8003dc2: 60da str r2, [r3, #12]
/* Send the command */
HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT);
8003dc4: f64f 72ff movw r2, #65535 ; 0xffff
8003dc8: 4923 ldr r1, [pc, #140] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003dca: 4824 ldr r0, [pc, #144] ; (8003e5c <BSP_SDRAM_Initialization_sequence+0xbc>)
8003dcc: f007 f83c bl 800ae48 <HAL_SDRAM_SendCommand>
/* Step 2: Insert 100 us minimum delay */
/* Inserted delay is equal to 1 ms due to systick time base unit (ms) */
HAL_Delay(1);
8003dd0: 2001 movs r0, #1
8003dd2: f001 fab1 bl 8005338 <HAL_Delay>
/* Step 3: Configure a PALL (precharge all) command */
Command.CommandMode = FMC_SDRAM_CMD_PALL;
8003dd6: 4b20 ldr r3, [pc, #128] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003dd8: 2202 movs r2, #2
8003dda: 601a str r2, [r3, #0]
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
8003ddc: 4b1e ldr r3, [pc, #120] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003dde: 2210 movs r2, #16
8003de0: 605a str r2, [r3, #4]
Command.AutoRefreshNumber = 1;
8003de2: 4b1d ldr r3, [pc, #116] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003de4: 2201 movs r2, #1
8003de6: 609a str r2, [r3, #8]
Command.ModeRegisterDefinition = 0;
8003de8: 4b1b ldr r3, [pc, #108] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003dea: 2200 movs r2, #0
8003dec: 60da str r2, [r3, #12]
/* Send the command */
HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT);
8003dee: f64f 72ff movw r2, #65535 ; 0xffff
8003df2: 4919 ldr r1, [pc, #100] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003df4: 4819 ldr r0, [pc, #100] ; (8003e5c <BSP_SDRAM_Initialization_sequence+0xbc>)
8003df6: f007 f827 bl 800ae48 <HAL_SDRAM_SendCommand>
/* Step 4: Configure an Auto Refresh command */
Command.CommandMode = FMC_SDRAM_CMD_AUTOREFRESH_MODE;
8003dfa: 4b17 ldr r3, [pc, #92] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003dfc: 2203 movs r2, #3
8003dfe: 601a str r2, [r3, #0]
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
8003e00: 4b15 ldr r3, [pc, #84] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e02: 2210 movs r2, #16
8003e04: 605a str r2, [r3, #4]
Command.AutoRefreshNumber = 8;
8003e06: 4b14 ldr r3, [pc, #80] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e08: 2208 movs r2, #8
8003e0a: 609a str r2, [r3, #8]
Command.ModeRegisterDefinition = 0;
8003e0c: 4b12 ldr r3, [pc, #72] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e0e: 2200 movs r2, #0
8003e10: 60da str r2, [r3, #12]
/* Send the command */
HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT);
8003e12: f64f 72ff movw r2, #65535 ; 0xffff
8003e16: 4910 ldr r1, [pc, #64] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e18: 4810 ldr r0, [pc, #64] ; (8003e5c <BSP_SDRAM_Initialization_sequence+0xbc>)
8003e1a: f007 f815 bl 800ae48 <HAL_SDRAM_SendCommand>
/* Step 5: Program the external memory mode register */
tmpmrd = (uint32_t)SDRAM_MODEREG_BURST_LENGTH_1 |\
8003e1e: f44f 7308 mov.w r3, #544 ; 0x220
8003e22: 60fb str r3, [r7, #12]
SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL |\
SDRAM_MODEREG_CAS_LATENCY_2 |\
SDRAM_MODEREG_OPERATING_MODE_STANDARD |\
SDRAM_MODEREG_WRITEBURST_MODE_SINGLE;
Command.CommandMode = FMC_SDRAM_CMD_LOAD_MODE;
8003e24: 4b0c ldr r3, [pc, #48] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e26: 2204 movs r2, #4
8003e28: 601a str r2, [r3, #0]
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
8003e2a: 4b0b ldr r3, [pc, #44] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e2c: 2210 movs r2, #16
8003e2e: 605a str r2, [r3, #4]
Command.AutoRefreshNumber = 1;
8003e30: 4b09 ldr r3, [pc, #36] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e32: 2201 movs r2, #1
8003e34: 609a str r2, [r3, #8]
Command.ModeRegisterDefinition = tmpmrd;
8003e36: 68fb ldr r3, [r7, #12]
8003e38: 4a07 ldr r2, [pc, #28] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e3a: 60d3 str r3, [r2, #12]
/* Send the command */
HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT);
8003e3c: f64f 72ff movw r2, #65535 ; 0xffff
8003e40: 4905 ldr r1, [pc, #20] ; (8003e58 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003e42: 4806 ldr r0, [pc, #24] ; (8003e5c <BSP_SDRAM_Initialization_sequence+0xbc>)
8003e44: f007 f800 bl 800ae48 <HAL_SDRAM_SendCommand>
/* Step 6: Set the refresh rate counter */
/* Set the device refresh rate */
HAL_SDRAM_ProgramRefreshRate(&sdramHandle, RefreshCount);
8003e48: 6879 ldr r1, [r7, #4]
8003e4a: 4804 ldr r0, [pc, #16] ; (8003e5c <BSP_SDRAM_Initialization_sequence+0xbc>)
8003e4c: f007 f827 bl 800ae9e <HAL_SDRAM_ProgramRefreshRate>
}
8003e50: bf00 nop
8003e52: 3710 adds r7, #16
8003e54: 46bd mov sp, r7
8003e56: bd80 pop {r7, pc}
8003e58: 200004d8 .word 0x200004d8
8003e5c: 20008f18 .word 0x20008f18
08003e60 <BSP_SDRAM_MspInit>:
* @param hsdram: SDRAM handle
* @param Params
* @retval None
*/
__weak void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params)
{
8003e60: b580 push {r7, lr}
8003e62: b090 sub sp, #64 ; 0x40
8003e64: af00 add r7, sp, #0
8003e66: 6078 str r0, [r7, #4]
8003e68: 6039 str r1, [r7, #0]
static DMA_HandleTypeDef dma_handle;
GPIO_InitTypeDef gpio_init_structure;
/* Enable FMC clock */
__HAL_RCC_FMC_CLK_ENABLE();
8003e6a: 4b70 ldr r3, [pc, #448] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003e6c: 6b9b ldr r3, [r3, #56] ; 0x38
8003e6e: 4a6f ldr r2, [pc, #444] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003e70: f043 0301 orr.w r3, r3, #1
8003e74: 6393 str r3, [r2, #56] ; 0x38
8003e76: 4b6d ldr r3, [pc, #436] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003e78: 6b9b ldr r3, [r3, #56] ; 0x38
8003e7a: f003 0301 and.w r3, r3, #1
8003e7e: 62bb str r3, [r7, #40] ; 0x28
8003e80: 6abb ldr r3, [r7, #40] ; 0x28
/* Enable chosen DMAx clock */
__DMAx_CLK_ENABLE();
8003e82: 4b6a ldr r3, [pc, #424] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003e84: 6b1b ldr r3, [r3, #48] ; 0x30
8003e86: 4a69 ldr r2, [pc, #420] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003e88: f443 0380 orr.w r3, r3, #4194304 ; 0x400000
8003e8c: 6313 str r3, [r2, #48] ; 0x30
8003e8e: 4b67 ldr r3, [pc, #412] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003e90: 6b1b ldr r3, [r3, #48] ; 0x30
8003e92: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8003e96: 627b str r3, [r7, #36] ; 0x24
8003e98: 6a7b ldr r3, [r7, #36] ; 0x24
/* Enable GPIOs clock */
__HAL_RCC_GPIOC_CLK_ENABLE();
8003e9a: 4b64 ldr r3, [pc, #400] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003e9c: 6b1b ldr r3, [r3, #48] ; 0x30
8003e9e: 4a63 ldr r2, [pc, #396] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ea0: f043 0304 orr.w r3, r3, #4
8003ea4: 6313 str r3, [r2, #48] ; 0x30
8003ea6: 4b61 ldr r3, [pc, #388] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ea8: 6b1b ldr r3, [r3, #48] ; 0x30
8003eaa: f003 0304 and.w r3, r3, #4
8003eae: 623b str r3, [r7, #32]
8003eb0: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOD_CLK_ENABLE();
8003eb2: 4b5e ldr r3, [pc, #376] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003eb4: 6b1b ldr r3, [r3, #48] ; 0x30
8003eb6: 4a5d ldr r2, [pc, #372] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003eb8: f043 0308 orr.w r3, r3, #8
8003ebc: 6313 str r3, [r2, #48] ; 0x30
8003ebe: 4b5b ldr r3, [pc, #364] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ec0: 6b1b ldr r3, [r3, #48] ; 0x30
8003ec2: f003 0308 and.w r3, r3, #8
8003ec6: 61fb str r3, [r7, #28]
8003ec8: 69fb ldr r3, [r7, #28]
__HAL_RCC_GPIOE_CLK_ENABLE();
8003eca: 4b58 ldr r3, [pc, #352] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ecc: 6b1b ldr r3, [r3, #48] ; 0x30
8003ece: 4a57 ldr r2, [pc, #348] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ed0: f043 0310 orr.w r3, r3, #16
8003ed4: 6313 str r3, [r2, #48] ; 0x30
8003ed6: 4b55 ldr r3, [pc, #340] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ed8: 6b1b ldr r3, [r3, #48] ; 0x30
8003eda: f003 0310 and.w r3, r3, #16
8003ede: 61bb str r3, [r7, #24]
8003ee0: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOF_CLK_ENABLE();
8003ee2: 4b52 ldr r3, [pc, #328] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ee4: 6b1b ldr r3, [r3, #48] ; 0x30
8003ee6: 4a51 ldr r2, [pc, #324] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ee8: f043 0320 orr.w r3, r3, #32
8003eec: 6313 str r3, [r2, #48] ; 0x30
8003eee: 4b4f ldr r3, [pc, #316] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003ef0: 6b1b ldr r3, [r3, #48] ; 0x30
8003ef2: f003 0320 and.w r3, r3, #32
8003ef6: 617b str r3, [r7, #20]
8003ef8: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOG_CLK_ENABLE();
8003efa: 4b4c ldr r3, [pc, #304] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003efc: 6b1b ldr r3, [r3, #48] ; 0x30
8003efe: 4a4b ldr r2, [pc, #300] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003f00: f043 0340 orr.w r3, r3, #64 ; 0x40
8003f04: 6313 str r3, [r2, #48] ; 0x30
8003f06: 4b49 ldr r3, [pc, #292] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003f08: 6b1b ldr r3, [r3, #48] ; 0x30
8003f0a: f003 0340 and.w r3, r3, #64 ; 0x40
8003f0e: 613b str r3, [r7, #16]
8003f10: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOH_CLK_ENABLE();
8003f12: 4b46 ldr r3, [pc, #280] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003f14: 6b1b ldr r3, [r3, #48] ; 0x30
8003f16: 4a45 ldr r2, [pc, #276] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003f18: f043 0380 orr.w r3, r3, #128 ; 0x80
8003f1c: 6313 str r3, [r2, #48] ; 0x30
8003f1e: 4b43 ldr r3, [pc, #268] ; (800402c <BSP_SDRAM_MspInit+0x1cc>)
8003f20: 6b1b ldr r3, [r3, #48] ; 0x30
8003f22: f003 0380 and.w r3, r3, #128 ; 0x80
8003f26: 60fb str r3, [r7, #12]
8003f28: 68fb ldr r3, [r7, #12]
/* Common GPIO configuration */
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
8003f2a: 2302 movs r3, #2
8003f2c: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Pull = GPIO_PULLUP;
8003f2e: 2301 movs r3, #1
8003f30: 637b str r3, [r7, #52] ; 0x34
gpio_init_structure.Speed = GPIO_SPEED_FAST;
8003f32: 2302 movs r3, #2
8003f34: 63bb str r3, [r7, #56] ; 0x38
gpio_init_structure.Alternate = GPIO_AF12_FMC;
8003f36: 230c movs r3, #12
8003f38: 63fb str r3, [r7, #60] ; 0x3c
/* GPIOC configuration */
gpio_init_structure.Pin = GPIO_PIN_3;
8003f3a: 2308 movs r3, #8
8003f3c: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(GPIOC, &gpio_init_structure);
8003f3e: f107 032c add.w r3, r7, #44 ; 0x2c
8003f42: 4619 mov r1, r3
8003f44: 483a ldr r0, [pc, #232] ; (8004030 <BSP_SDRAM_MspInit+0x1d0>)
8003f46: f003 fe5b bl 8007c00 <HAL_GPIO_Init>
/* GPIOD configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_8 | GPIO_PIN_9 |
8003f4a: f24c 7303 movw r3, #50947 ; 0xc703
8003f4e: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_10 | GPIO_PIN_14 | GPIO_PIN_15;
HAL_GPIO_Init(GPIOD, &gpio_init_structure);
8003f50: f107 032c add.w r3, r7, #44 ; 0x2c
8003f54: 4619 mov r1, r3
8003f56: 4837 ldr r0, [pc, #220] ; (8004034 <BSP_SDRAM_MspInit+0x1d4>)
8003f58: f003 fe52 bl 8007c00 <HAL_GPIO_Init>
/* GPIOE configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_7| GPIO_PIN_8 | GPIO_PIN_9 |\
8003f5c: f64f 7383 movw r3, #65411 ; 0xff83
8003f60: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\
GPIO_PIN_15;
HAL_GPIO_Init(GPIOE, &gpio_init_structure);
8003f62: f107 032c add.w r3, r7, #44 ; 0x2c
8003f66: 4619 mov r1, r3
8003f68: 4833 ldr r0, [pc, #204] ; (8004038 <BSP_SDRAM_MspInit+0x1d8>)
8003f6a: f003 fe49 bl 8007c00 <HAL_GPIO_Init>
/* GPIOF configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\
8003f6e: f64f 033f movw r3, #63551 ; 0xf83f
8003f72: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_5 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\
GPIO_PIN_15;
HAL_GPIO_Init(GPIOF, &gpio_init_structure);
8003f74: f107 032c add.w r3, r7, #44 ; 0x2c
8003f78: 4619 mov r1, r3
8003f7a: 4830 ldr r0, [pc, #192] ; (800403c <BSP_SDRAM_MspInit+0x1dc>)
8003f7c: f003 fe40 bl 8007c00 <HAL_GPIO_Init>
/* GPIOG configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4| GPIO_PIN_5 | GPIO_PIN_8 |\
8003f80: f248 1333 movw r3, #33075 ; 0x8133
8003f84: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_15;
HAL_GPIO_Init(GPIOG, &gpio_init_structure);
8003f86: f107 032c add.w r3, r7, #44 ; 0x2c
8003f8a: 4619 mov r1, r3
8003f8c: 482c ldr r0, [pc, #176] ; (8004040 <BSP_SDRAM_MspInit+0x1e0>)
8003f8e: f003 fe37 bl 8007c00 <HAL_GPIO_Init>
/* GPIOH configuration */
gpio_init_structure.Pin = GPIO_PIN_3 | GPIO_PIN_5;
8003f92: 2328 movs r3, #40 ; 0x28
8003f94: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(GPIOH, &gpio_init_structure);
8003f96: f107 032c add.w r3, r7, #44 ; 0x2c
8003f9a: 4619 mov r1, r3
8003f9c: 4829 ldr r0, [pc, #164] ; (8004044 <BSP_SDRAM_MspInit+0x1e4>)
8003f9e: f003 fe2f bl 8007c00 <HAL_GPIO_Init>
/* Configure common DMA parameters */
dma_handle.Init.Channel = SDRAM_DMAx_CHANNEL;
8003fa2: 4b29 ldr r3, [pc, #164] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fa4: 2200 movs r2, #0
8003fa6: 605a str r2, [r3, #4]
dma_handle.Init.Direction = DMA_MEMORY_TO_MEMORY;
8003fa8: 4b27 ldr r3, [pc, #156] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003faa: 2280 movs r2, #128 ; 0x80
8003fac: 609a str r2, [r3, #8]
dma_handle.Init.PeriphInc = DMA_PINC_ENABLE;
8003fae: 4b26 ldr r3, [pc, #152] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fb0: f44f 7200 mov.w r2, #512 ; 0x200
8003fb4: 60da str r2, [r3, #12]
dma_handle.Init.MemInc = DMA_MINC_ENABLE;
8003fb6: 4b24 ldr r3, [pc, #144] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fb8: f44f 6280 mov.w r2, #1024 ; 0x400
8003fbc: 611a str r2, [r3, #16]
dma_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
8003fbe: 4b22 ldr r3, [pc, #136] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fc0: f44f 5280 mov.w r2, #4096 ; 0x1000
8003fc4: 615a str r2, [r3, #20]
dma_handle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
8003fc6: 4b20 ldr r3, [pc, #128] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fc8: f44f 4280 mov.w r2, #16384 ; 0x4000
8003fcc: 619a str r2, [r3, #24]
dma_handle.Init.Mode = DMA_NORMAL;
8003fce: 4b1e ldr r3, [pc, #120] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fd0: 2200 movs r2, #0
8003fd2: 61da str r2, [r3, #28]
dma_handle.Init.Priority = DMA_PRIORITY_HIGH;
8003fd4: 4b1c ldr r3, [pc, #112] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fd6: f44f 3200 mov.w r2, #131072 ; 0x20000
8003fda: 621a str r2, [r3, #32]
dma_handle.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
8003fdc: 4b1a ldr r3, [pc, #104] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fde: 2200 movs r2, #0
8003fe0: 625a str r2, [r3, #36] ; 0x24
dma_handle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
8003fe2: 4b19 ldr r3, [pc, #100] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fe4: 2203 movs r2, #3
8003fe6: 629a str r2, [r3, #40] ; 0x28
dma_handle.Init.MemBurst = DMA_MBURST_SINGLE;
8003fe8: 4b17 ldr r3, [pc, #92] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003fea: 2200 movs r2, #0
8003fec: 62da str r2, [r3, #44] ; 0x2c
dma_handle.Init.PeriphBurst = DMA_PBURST_SINGLE;
8003fee: 4b16 ldr r3, [pc, #88] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003ff0: 2200 movs r2, #0
8003ff2: 631a str r2, [r3, #48] ; 0x30
dma_handle.Instance = SDRAM_DMAx_STREAM;
8003ff4: 4b14 ldr r3, [pc, #80] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003ff6: 4a15 ldr r2, [pc, #84] ; (800404c <BSP_SDRAM_MspInit+0x1ec>)
8003ff8: 601a str r2, [r3, #0]
/* Associate the DMA handle */
__HAL_LINKDMA(hsdram, hdma, dma_handle);
8003ffa: 687b ldr r3, [r7, #4]
8003ffc: 4a12 ldr r2, [pc, #72] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8003ffe: 631a str r2, [r3, #48] ; 0x30
8004000: 4a11 ldr r2, [pc, #68] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8004002: 687b ldr r3, [r7, #4]
8004004: 6393 str r3, [r2, #56] ; 0x38
/* Deinitialize the stream for new transfer */
HAL_DMA_DeInit(&dma_handle);
8004006: 4810 ldr r0, [pc, #64] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
8004008: f002 f8da bl 80061c0 <HAL_DMA_DeInit>
/* Configure the DMA stream */
HAL_DMA_Init(&dma_handle);
800400c: 480e ldr r0, [pc, #56] ; (8004048 <BSP_SDRAM_MspInit+0x1e8>)
800400e: f002 f829 bl 8006064 <HAL_DMA_Init>
/* NVIC configuration for DMA transfer complete interrupt */
HAL_NVIC_SetPriority(SDRAM_DMAx_IRQn, 0x0F, 0);
8004012: 2200 movs r2, #0
8004014: 210f movs r1, #15
8004016: 2038 movs r0, #56 ; 0x38
8004018: f001 fe42 bl 8005ca0 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(SDRAM_DMAx_IRQn);
800401c: 2038 movs r0, #56 ; 0x38
800401e: f001 fe5b bl 8005cd8 <HAL_NVIC_EnableIRQ>
}
8004022: bf00 nop
8004024: 3740 adds r7, #64 ; 0x40
8004026: 46bd mov sp, r7
8004028: bd80 pop {r7, pc}
800402a: bf00 nop
800402c: 40023800 .word 0x40023800
8004030: 40020800 .word 0x40020800
8004034: 40020c00 .word 0x40020c00
8004038: 40021000 .word 0x40021000
800403c: 40021400 .word 0x40021400
8004040: 40021800 .word 0x40021800
8004044: 40021c00 .word 0x40021c00
8004048: 200004e8 .word 0x200004e8
800404c: 40026410 .word 0x40026410
08004050 <BSP_TS_Init>:
* @param ts_SizeX: Maximum X size of the TS area on LCD
* @param ts_SizeY: Maximum Y size of the TS area on LCD
* @retval TS_OK if all initializations are OK. Other value if error.
*/
uint8_t BSP_TS_Init(uint16_t ts_SizeX, uint16_t ts_SizeY)
{
8004050: b580 push {r7, lr}
8004052: b084 sub sp, #16
8004054: af00 add r7, sp, #0
8004056: 4603 mov r3, r0
8004058: 460a mov r2, r1
800405a: 80fb strh r3, [r7, #6]
800405c: 4613 mov r3, r2
800405e: 80bb strh r3, [r7, #4]
uint8_t status = TS_OK;
8004060: 2300 movs r3, #0
8004062: 73fb strb r3, [r7, #15]
tsXBoundary = ts_SizeX;
8004064: 4a14 ldr r2, [pc, #80] ; (80040b8 <BSP_TS_Init+0x68>)
8004066: 88fb ldrh r3, [r7, #6]
8004068: 8013 strh r3, [r2, #0]
tsYBoundary = ts_SizeY;
800406a: 4a14 ldr r2, [pc, #80] ; (80040bc <BSP_TS_Init+0x6c>)
800406c: 88bb ldrh r3, [r7, #4]
800406e: 8013 strh r3, [r2, #0]
/* Read ID and verify if the touch screen driver is ready */
ft5336_ts_drv.Init(TS_I2C_ADDRESS);
8004070: 4b13 ldr r3, [pc, #76] ; (80040c0 <BSP_TS_Init+0x70>)
8004072: 681b ldr r3, [r3, #0]
8004074: 2070 movs r0, #112 ; 0x70
8004076: 4798 blx r3
if(ft5336_ts_drv.ReadID(TS_I2C_ADDRESS) == FT5336_ID_VALUE)
8004078: 4b11 ldr r3, [pc, #68] ; (80040c0 <BSP_TS_Init+0x70>)
800407a: 685b ldr r3, [r3, #4]
800407c: 2070 movs r0, #112 ; 0x70
800407e: 4798 blx r3
8004080: 4603 mov r3, r0
8004082: 2b51 cmp r3, #81 ; 0x51
8004084: d111 bne.n 80040aa <BSP_TS_Init+0x5a>
{
/* Initialize the TS driver structure */
tsDriver = &ft5336_ts_drv;
8004086: 4b0f ldr r3, [pc, #60] ; (80040c4 <BSP_TS_Init+0x74>)
8004088: 4a0d ldr r2, [pc, #52] ; (80040c0 <BSP_TS_Init+0x70>)
800408a: 601a str r2, [r3, #0]
I2cAddress = TS_I2C_ADDRESS;
800408c: 4b0e ldr r3, [pc, #56] ; (80040c8 <BSP_TS_Init+0x78>)
800408e: 2270 movs r2, #112 ; 0x70
8004090: 701a strb r2, [r3, #0]
tsOrientation = TS_SWAP_XY;
8004092: 4b0e ldr r3, [pc, #56] ; (80040cc <BSP_TS_Init+0x7c>)
8004094: 2208 movs r2, #8
8004096: 701a strb r2, [r3, #0]
/* Initialize the TS driver */
tsDriver->Start(I2cAddress);
8004098: 4b0a ldr r3, [pc, #40] ; (80040c4 <BSP_TS_Init+0x74>)
800409a: 681b ldr r3, [r3, #0]
800409c: 68db ldr r3, [r3, #12]
800409e: 4a0a ldr r2, [pc, #40] ; (80040c8 <BSP_TS_Init+0x78>)
80040a0: 7812 ldrb r2, [r2, #0]
80040a2: b292 uxth r2, r2
80040a4: 4610 mov r0, r2
80040a6: 4798 blx r3
80040a8: e001 b.n 80040ae <BSP_TS_Init+0x5e>
}
else
{
status = TS_DEVICE_NOT_FOUND;
80040aa: 2303 movs r3, #3
80040ac: 73fb strb r3, [r7, #15]
}
return status;
80040ae: 7bfb ldrb r3, [r7, #15]
}
80040b0: 4618 mov r0, r3
80040b2: 3710 adds r7, #16
80040b4: 46bd mov sp, r7
80040b6: bd80 pop {r7, pc}
80040b8: 2000054c .word 0x2000054c
80040bc: 2000054e .word 0x2000054e
80040c0: 20000000 .word 0x20000000
80040c4: 20000548 .word 0x20000548
80040c8: 20000551 .word 0x20000551
80040cc: 20000550 .word 0x20000550
080040d0 <BSP_TS_GetState>:
* @brief Returns status and positions of the touch screen.
* @param TS_State: Pointer to touch screen current state structure
* @retval TS_OK if all initializations are OK. Other value if error.
*/
uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State)
{
80040d0: b590 push {r4, r7, lr}
80040d2: b097 sub sp, #92 ; 0x5c
80040d4: af02 add r7, sp, #8
80040d6: 6078 str r0, [r7, #4]
static uint32_t _x[TS_MAX_NB_TOUCH] = {0, 0};
static uint32_t _y[TS_MAX_NB_TOUCH] = {0, 0};
uint8_t ts_status = TS_OK;
80040d8: 2300 movs r3, #0
80040da: f887 304f strb.w r3, [r7, #79] ; 0x4f
uint16_t brute_y[TS_MAX_NB_TOUCH];
uint16_t x_diff;
uint16_t y_diff;
uint32_t index;
#if (TS_MULTI_TOUCH_SUPPORTED == 1)
uint32_t weight = 0;
80040de: 2300 movs r3, #0
80040e0: 613b str r3, [r7, #16]
uint32_t area = 0;
80040e2: 2300 movs r3, #0
80040e4: 60fb str r3, [r7, #12]
uint32_t event = 0;
80040e6: 2300 movs r3, #0
80040e8: 60bb str r3, [r7, #8]
#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */
/* Check and update the number of touches active detected */
TS_State->touchDetected = tsDriver->DetectTouch(I2cAddress);
80040ea: 4b97 ldr r3, [pc, #604] ; (8004348 <BSP_TS_GetState+0x278>)
80040ec: 681b ldr r3, [r3, #0]
80040ee: 691b ldr r3, [r3, #16]
80040f0: 4a96 ldr r2, [pc, #600] ; (800434c <BSP_TS_GetState+0x27c>)
80040f2: 7812 ldrb r2, [r2, #0]
80040f4: b292 uxth r2, r2
80040f6: 4610 mov r0, r2
80040f8: 4798 blx r3
80040fa: 4603 mov r3, r0
80040fc: 461a mov r2, r3
80040fe: 687b ldr r3, [r7, #4]
8004100: 701a strb r2, [r3, #0]
if(TS_State->touchDetected)
8004102: 687b ldr r3, [r7, #4]
8004104: 781b ldrb r3, [r3, #0]
8004106: 2b00 cmp r3, #0
8004108: f000 81a8 beq.w 800445c <BSP_TS_GetState+0x38c>
{
for(index=0; index < TS_State->touchDetected; index++)
800410c: 2300 movs r3, #0
800410e: 64bb str r3, [r7, #72] ; 0x48
8004110: e197 b.n 8004442 <BSP_TS_GetState+0x372>
{
/* Get each touch coordinates */
tsDriver->GetXY(I2cAddress, &(brute_x[index]), &(brute_y[index]));
8004112: 4b8d ldr r3, [pc, #564] ; (8004348 <BSP_TS_GetState+0x278>)
8004114: 681b ldr r3, [r3, #0]
8004116: 695b ldr r3, [r3, #20]
8004118: 4a8c ldr r2, [pc, #560] ; (800434c <BSP_TS_GetState+0x27c>)
800411a: 7812 ldrb r2, [r2, #0]
800411c: b290 uxth r0, r2
800411e: f107 0120 add.w r1, r7, #32
8004122: 6cba ldr r2, [r7, #72] ; 0x48
8004124: 0052 lsls r2, r2, #1
8004126: 188c adds r4, r1, r2
8004128: f107 0114 add.w r1, r7, #20
800412c: 6cba ldr r2, [r7, #72] ; 0x48
800412e: 0052 lsls r2, r2, #1
8004130: 440a add r2, r1
8004132: 4621 mov r1, r4
8004134: 4798 blx r3
if(tsOrientation == TS_SWAP_NONE)
8004136: 4b86 ldr r3, [pc, #536] ; (8004350 <BSP_TS_GetState+0x280>)
8004138: 781b ldrb r3, [r3, #0]
800413a: 2b01 cmp r3, #1
800413c: d11b bne.n 8004176 <BSP_TS_GetState+0xa6>
{
x[index] = brute_x[index];
800413e: 6cbb ldr r3, [r7, #72] ; 0x48
8004140: 005b lsls r3, r3, #1
8004142: f107 0250 add.w r2, r7, #80 ; 0x50
8004146: 4413 add r3, r2
8004148: f833 2c30 ldrh.w r2, [r3, #-48]
800414c: 6cbb ldr r3, [r7, #72] ; 0x48
800414e: 005b lsls r3, r3, #1
8004150: f107 0150 add.w r1, r7, #80 ; 0x50
8004154: 440b add r3, r1
8004156: f823 2c18 strh.w r2, [r3, #-24]
y[index] = brute_y[index];
800415a: 6cbb ldr r3, [r7, #72] ; 0x48
800415c: 005b lsls r3, r3, #1
800415e: f107 0250 add.w r2, r7, #80 ; 0x50
8004162: 4413 add r3, r2
8004164: f833 2c3c ldrh.w r2, [r3, #-60]
8004168: 6cbb ldr r3, [r7, #72] ; 0x48
800416a: 005b lsls r3, r3, #1
800416c: f107 0150 add.w r1, r7, #80 ; 0x50
8004170: 440b add r3, r1
8004172: f823 2c24 strh.w r2, [r3, #-36]
}
if(tsOrientation & TS_SWAP_X)
8004176: 4b76 ldr r3, [pc, #472] ; (8004350 <BSP_TS_GetState+0x280>)
8004178: 781b ldrb r3, [r3, #0]
800417a: f003 0302 and.w r3, r3, #2
800417e: 2b00 cmp r3, #0
8004180: d010 beq.n 80041a4 <BSP_TS_GetState+0xd4>
{
x[index] = 4096 - brute_x[index];
8004182: 6cbb ldr r3, [r7, #72] ; 0x48
8004184: 005b lsls r3, r3, #1
8004186: f107 0250 add.w r2, r7, #80 ; 0x50
800418a: 4413 add r3, r2
800418c: f833 3c30 ldrh.w r3, [r3, #-48]
8004190: f5c3 5380 rsb r3, r3, #4096 ; 0x1000
8004194: b29a uxth r2, r3
8004196: 6cbb ldr r3, [r7, #72] ; 0x48
8004198: 005b lsls r3, r3, #1
800419a: f107 0150 add.w r1, r7, #80 ; 0x50
800419e: 440b add r3, r1
80041a0: f823 2c18 strh.w r2, [r3, #-24]
}
if(tsOrientation & TS_SWAP_Y)
80041a4: 4b6a ldr r3, [pc, #424] ; (8004350 <BSP_TS_GetState+0x280>)
80041a6: 781b ldrb r3, [r3, #0]
80041a8: f003 0304 and.w r3, r3, #4
80041ac: 2b00 cmp r3, #0
80041ae: d010 beq.n 80041d2 <BSP_TS_GetState+0x102>
{
y[index] = 4096 - brute_y[index];
80041b0: 6cbb ldr r3, [r7, #72] ; 0x48
80041b2: 005b lsls r3, r3, #1
80041b4: f107 0250 add.w r2, r7, #80 ; 0x50
80041b8: 4413 add r3, r2
80041ba: f833 3c3c ldrh.w r3, [r3, #-60]
80041be: f5c3 5380 rsb r3, r3, #4096 ; 0x1000
80041c2: b29a uxth r2, r3
80041c4: 6cbb ldr r3, [r7, #72] ; 0x48
80041c6: 005b lsls r3, r3, #1
80041c8: f107 0150 add.w r1, r7, #80 ; 0x50
80041cc: 440b add r3, r1
80041ce: f823 2c24 strh.w r2, [r3, #-36]
}
if(tsOrientation & TS_SWAP_XY)
80041d2: 4b5f ldr r3, [pc, #380] ; (8004350 <BSP_TS_GetState+0x280>)
80041d4: 781b ldrb r3, [r3, #0]
80041d6: f003 0308 and.w r3, r3, #8
80041da: 2b00 cmp r3, #0
80041dc: d01b beq.n 8004216 <BSP_TS_GetState+0x146>
{
y[index] = brute_x[index];
80041de: 6cbb ldr r3, [r7, #72] ; 0x48
80041e0: 005b lsls r3, r3, #1
80041e2: f107 0250 add.w r2, r7, #80 ; 0x50
80041e6: 4413 add r3, r2
80041e8: f833 2c30 ldrh.w r2, [r3, #-48]
80041ec: 6cbb ldr r3, [r7, #72] ; 0x48
80041ee: 005b lsls r3, r3, #1
80041f0: f107 0150 add.w r1, r7, #80 ; 0x50
80041f4: 440b add r3, r1
80041f6: f823 2c24 strh.w r2, [r3, #-36]
x[index] = brute_y[index];
80041fa: 6cbb ldr r3, [r7, #72] ; 0x48
80041fc: 005b lsls r3, r3, #1
80041fe: f107 0250 add.w r2, r7, #80 ; 0x50
8004202: 4413 add r3, r2
8004204: f833 2c3c ldrh.w r2, [r3, #-60]
8004208: 6cbb ldr r3, [r7, #72] ; 0x48
800420a: 005b lsls r3, r3, #1
800420c: f107 0150 add.w r1, r7, #80 ; 0x50
8004210: 440b add r3, r1
8004212: f823 2c18 strh.w r2, [r3, #-24]
}
x_diff = x[index] > _x[index]? (x[index] - _x[index]): (_x[index] - x[index]);
8004216: 6cbb ldr r3, [r7, #72] ; 0x48
8004218: 005b lsls r3, r3, #1
800421a: f107 0250 add.w r2, r7, #80 ; 0x50
800421e: 4413 add r3, r2
8004220: f833 3c18 ldrh.w r3, [r3, #-24]
8004224: 4619 mov r1, r3
8004226: 4a4b ldr r2, [pc, #300] ; (8004354 <BSP_TS_GetState+0x284>)
8004228: 6cbb ldr r3, [r7, #72] ; 0x48
800422a: f852 3023 ldr.w r3, [r2, r3, lsl #2]
800422e: 4299 cmp r1, r3
8004230: d90e bls.n 8004250 <BSP_TS_GetState+0x180>
8004232: 6cbb ldr r3, [r7, #72] ; 0x48
8004234: 005b lsls r3, r3, #1
8004236: f107 0250 add.w r2, r7, #80 ; 0x50
800423a: 4413 add r3, r2
800423c: f833 2c18 ldrh.w r2, [r3, #-24]
8004240: 4944 ldr r1, [pc, #272] ; (8004354 <BSP_TS_GetState+0x284>)
8004242: 6cbb ldr r3, [r7, #72] ; 0x48
8004244: f851 3023 ldr.w r3, [r1, r3, lsl #2]
8004248: b29b uxth r3, r3
800424a: 1ad3 subs r3, r2, r3
800424c: b29b uxth r3, r3
800424e: e00d b.n 800426c <BSP_TS_GetState+0x19c>
8004250: 4a40 ldr r2, [pc, #256] ; (8004354 <BSP_TS_GetState+0x284>)
8004252: 6cbb ldr r3, [r7, #72] ; 0x48
8004254: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8004258: b29a uxth r2, r3
800425a: 6cbb ldr r3, [r7, #72] ; 0x48
800425c: 005b lsls r3, r3, #1
800425e: f107 0150 add.w r1, r7, #80 ; 0x50
8004262: 440b add r3, r1
8004264: f833 3c18 ldrh.w r3, [r3, #-24]
8004268: 1ad3 subs r3, r2, r3
800426a: b29b uxth r3, r3
800426c: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
y_diff = y[index] > _y[index]? (y[index] - _y[index]): (_y[index] - y[index]);
8004270: 6cbb ldr r3, [r7, #72] ; 0x48
8004272: 005b lsls r3, r3, #1
8004274: f107 0250 add.w r2, r7, #80 ; 0x50
8004278: 4413 add r3, r2
800427a: f833 3c24 ldrh.w r3, [r3, #-36]
800427e: 4619 mov r1, r3
8004280: 4a35 ldr r2, [pc, #212] ; (8004358 <BSP_TS_GetState+0x288>)
8004282: 6cbb ldr r3, [r7, #72] ; 0x48
8004284: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8004288: 4299 cmp r1, r3
800428a: d90e bls.n 80042aa <BSP_TS_GetState+0x1da>
800428c: 6cbb ldr r3, [r7, #72] ; 0x48
800428e: 005b lsls r3, r3, #1
8004290: f107 0250 add.w r2, r7, #80 ; 0x50
8004294: 4413 add r3, r2
8004296: f833 2c24 ldrh.w r2, [r3, #-36]
800429a: 492f ldr r1, [pc, #188] ; (8004358 <BSP_TS_GetState+0x288>)
800429c: 6cbb ldr r3, [r7, #72] ; 0x48
800429e: f851 3023 ldr.w r3, [r1, r3, lsl #2]
80042a2: b29b uxth r3, r3
80042a4: 1ad3 subs r3, r2, r3
80042a6: b29b uxth r3, r3
80042a8: e00d b.n 80042c6 <BSP_TS_GetState+0x1f6>
80042aa: 4a2b ldr r2, [pc, #172] ; (8004358 <BSP_TS_GetState+0x288>)
80042ac: 6cbb ldr r3, [r7, #72] ; 0x48
80042ae: f852 3023 ldr.w r3, [r2, r3, lsl #2]
80042b2: b29a uxth r2, r3
80042b4: 6cbb ldr r3, [r7, #72] ; 0x48
80042b6: 005b lsls r3, r3, #1
80042b8: f107 0150 add.w r1, r7, #80 ; 0x50
80042bc: 440b add r3, r1
80042be: f833 3c24 ldrh.w r3, [r3, #-36]
80042c2: 1ad3 subs r3, r2, r3
80042c4: b29b uxth r3, r3
80042c6: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
if ((x_diff + y_diff) > 5)
80042ca: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46
80042ce: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
80042d2: 4413 add r3, r2
80042d4: 2b05 cmp r3, #5
80042d6: dd17 ble.n 8004308 <BSP_TS_GetState+0x238>
{
_x[index] = x[index];
80042d8: 6cbb ldr r3, [r7, #72] ; 0x48
80042da: 005b lsls r3, r3, #1
80042dc: f107 0250 add.w r2, r7, #80 ; 0x50
80042e0: 4413 add r3, r2
80042e2: f833 3c18 ldrh.w r3, [r3, #-24]
80042e6: 4619 mov r1, r3
80042e8: 4a1a ldr r2, [pc, #104] ; (8004354 <BSP_TS_GetState+0x284>)
80042ea: 6cbb ldr r3, [r7, #72] ; 0x48
80042ec: f842 1023 str.w r1, [r2, r3, lsl #2]
_y[index] = y[index];
80042f0: 6cbb ldr r3, [r7, #72] ; 0x48
80042f2: 005b lsls r3, r3, #1
80042f4: f107 0250 add.w r2, r7, #80 ; 0x50
80042f8: 4413 add r3, r2
80042fa: f833 3c24 ldrh.w r3, [r3, #-36]
80042fe: 4619 mov r1, r3
8004300: 4a15 ldr r2, [pc, #84] ; (8004358 <BSP_TS_GetState+0x288>)
8004302: 6cbb ldr r3, [r7, #72] ; 0x48
8004304: f842 1023 str.w r1, [r2, r3, lsl #2]
}
if(I2cAddress == FT5336_I2C_SLAVE_ADDRESS)
8004308: 4b10 ldr r3, [pc, #64] ; (800434c <BSP_TS_GetState+0x27c>)
800430a: 781b ldrb r3, [r3, #0]
800430c: 2b70 cmp r3, #112 ; 0x70
800430e: d125 bne.n 800435c <BSP_TS_GetState+0x28c>
{
TS_State->touchX[index] = x[index];
8004310: 6cbb ldr r3, [r7, #72] ; 0x48
8004312: 005b lsls r3, r3, #1
8004314: f107 0250 add.w r2, r7, #80 ; 0x50
8004318: 4413 add r3, r2
800431a: f833 1c18 ldrh.w r1, [r3, #-24]
800431e: 687a ldr r2, [r7, #4]
8004320: 6cbb ldr r3, [r7, #72] ; 0x48
8004322: 005b lsls r3, r3, #1
8004324: 4413 add r3, r2
8004326: 460a mov r2, r1
8004328: 805a strh r2, [r3, #2]
TS_State->touchY[index] = y[index];
800432a: 6cbb ldr r3, [r7, #72] ; 0x48
800432c: 005b lsls r3, r3, #1
800432e: f107 0250 add.w r2, r7, #80 ; 0x50
8004332: 4413 add r3, r2
8004334: f833 1c24 ldrh.w r1, [r3, #-36]
8004338: 687a ldr r2, [r7, #4]
800433a: 6cbb ldr r3, [r7, #72] ; 0x48
800433c: 3304 adds r3, #4
800433e: 005b lsls r3, r3, #1
8004340: 4413 add r3, r2
8004342: 460a mov r2, r1
8004344: 809a strh r2, [r3, #4]
8004346: e02c b.n 80043a2 <BSP_TS_GetState+0x2d2>
8004348: 20000548 .word 0x20000548
800434c: 20000551 .word 0x20000551
8004350: 20000550 .word 0x20000550
8004354: 20000554 .word 0x20000554
8004358: 20000568 .word 0x20000568
}
else
{
/* 2^12 = 4096 : indexes are expressed on a dynamic of 4096 */
TS_State->touchX[index] = (tsXBoundary * _x[index]) >> 12;
800435c: 4b42 ldr r3, [pc, #264] ; (8004468 <BSP_TS_GetState+0x398>)
800435e: 881b ldrh r3, [r3, #0]
8004360: 4619 mov r1, r3
8004362: 4a42 ldr r2, [pc, #264] ; (800446c <BSP_TS_GetState+0x39c>)
8004364: 6cbb ldr r3, [r7, #72] ; 0x48
8004366: f852 3023 ldr.w r3, [r2, r3, lsl #2]
800436a: fb03 f301 mul.w r3, r3, r1
800436e: 0b1b lsrs r3, r3, #12
8004370: b299 uxth r1, r3
8004372: 687a ldr r2, [r7, #4]
8004374: 6cbb ldr r3, [r7, #72] ; 0x48
8004376: 005b lsls r3, r3, #1
8004378: 4413 add r3, r2
800437a: 460a mov r2, r1
800437c: 805a strh r2, [r3, #2]
TS_State->touchY[index] = (tsYBoundary * _y[index]) >> 12;
800437e: 4b3c ldr r3, [pc, #240] ; (8004470 <BSP_TS_GetState+0x3a0>)
8004380: 881b ldrh r3, [r3, #0]
8004382: 4619 mov r1, r3
8004384: 4a3b ldr r2, [pc, #236] ; (8004474 <BSP_TS_GetState+0x3a4>)
8004386: 6cbb ldr r3, [r7, #72] ; 0x48
8004388: f852 3023 ldr.w r3, [r2, r3, lsl #2]
800438c: fb03 f301 mul.w r3, r3, r1
8004390: 0b1b lsrs r3, r3, #12
8004392: b299 uxth r1, r3
8004394: 687a ldr r2, [r7, #4]
8004396: 6cbb ldr r3, [r7, #72] ; 0x48
8004398: 3304 adds r3, #4
800439a: 005b lsls r3, r3, #1
800439c: 4413 add r3, r2
800439e: 460a mov r2, r1
80043a0: 809a strh r2, [r3, #4]
}
#if (TS_MULTI_TOUCH_SUPPORTED == 1)
/* Get touch info related to the current touch */
ft5336_TS_GetTouchInfo(I2cAddress, index, &weight, &area, &event);
80043a2: 4b35 ldr r3, [pc, #212] ; (8004478 <BSP_TS_GetState+0x3a8>)
80043a4: 781b ldrb r3, [r3, #0]
80043a6: b298 uxth r0, r3
80043a8: f107 010c add.w r1, r7, #12
80043ac: f107 0210 add.w r2, r7, #16
80043b0: f107 0308 add.w r3, r7, #8
80043b4: 9300 str r3, [sp, #0]
80043b6: 460b mov r3, r1
80043b8: 6cb9 ldr r1, [r7, #72] ; 0x48
80043ba: f7fc faf7 bl 80009ac <ft5336_TS_GetTouchInfo>
/* Update TS_State structure */
TS_State->touchWeight[index] = weight;
80043be: 693b ldr r3, [r7, #16]
80043c0: b2d9 uxtb r1, r3
80043c2: 687a ldr r2, [r7, #4]
80043c4: 6cbb ldr r3, [r7, #72] ; 0x48
80043c6: 4413 add r3, r2
80043c8: 3316 adds r3, #22
80043ca: 460a mov r2, r1
80043cc: 701a strb r2, [r3, #0]
TS_State->touchArea[index] = area;
80043ce: 68fb ldr r3, [r7, #12]
80043d0: b2d9 uxtb r1, r3
80043d2: 687a ldr r2, [r7, #4]
80043d4: 6cbb ldr r3, [r7, #72] ; 0x48
80043d6: 4413 add r3, r2
80043d8: 3320 adds r3, #32
80043da: 460a mov r2, r1
80043dc: 701a strb r2, [r3, #0]
/* Remap touch event */
switch(event)
80043de: 68bb ldr r3, [r7, #8]
80043e0: 2b03 cmp r3, #3
80043e2: d827 bhi.n 8004434 <BSP_TS_GetState+0x364>
80043e4: a201 add r2, pc, #4 ; (adr r2, 80043ec <BSP_TS_GetState+0x31c>)
80043e6: f852 f023 ldr.w pc, [r2, r3, lsl #2]
80043ea: bf00 nop
80043ec: 080043fd .word 0x080043fd
80043f0: 0800440b .word 0x0800440b
80043f4: 08004419 .word 0x08004419
80043f8: 08004427 .word 0x08004427
{
case FT5336_TOUCH_EVT_FLAG_PRESS_DOWN :
TS_State->touchEventId[index] = TOUCH_EVENT_PRESS_DOWN;
80043fc: 687a ldr r2, [r7, #4]
80043fe: 6cbb ldr r3, [r7, #72] ; 0x48
8004400: 4413 add r3, r2
8004402: 331b adds r3, #27
8004404: 2201 movs r2, #1
8004406: 701a strb r2, [r3, #0]
break;
8004408: e018 b.n 800443c <BSP_TS_GetState+0x36c>
case FT5336_TOUCH_EVT_FLAG_LIFT_UP :
TS_State->touchEventId[index] = TOUCH_EVENT_LIFT_UP;
800440a: 687a ldr r2, [r7, #4]
800440c: 6cbb ldr r3, [r7, #72] ; 0x48
800440e: 4413 add r3, r2
8004410: 331b adds r3, #27
8004412: 2202 movs r2, #2
8004414: 701a strb r2, [r3, #0]
break;
8004416: e011 b.n 800443c <BSP_TS_GetState+0x36c>
case FT5336_TOUCH_EVT_FLAG_CONTACT :
TS_State->touchEventId[index] = TOUCH_EVENT_CONTACT;
8004418: 687a ldr r2, [r7, #4]
800441a: 6cbb ldr r3, [r7, #72] ; 0x48
800441c: 4413 add r3, r2
800441e: 331b adds r3, #27
8004420: 2203 movs r2, #3
8004422: 701a strb r2, [r3, #0]
break;
8004424: e00a b.n 800443c <BSP_TS_GetState+0x36c>
case FT5336_TOUCH_EVT_FLAG_NO_EVENT :
TS_State->touchEventId[index] = TOUCH_EVENT_NO_EVT;
8004426: 687a ldr r2, [r7, #4]
8004428: 6cbb ldr r3, [r7, #72] ; 0x48
800442a: 4413 add r3, r2
800442c: 331b adds r3, #27
800442e: 2200 movs r2, #0
8004430: 701a strb r2, [r3, #0]
break;
8004432: e003 b.n 800443c <BSP_TS_GetState+0x36c>
default :
ts_status = TS_ERROR;
8004434: 2301 movs r3, #1
8004436: f887 304f strb.w r3, [r7, #79] ; 0x4f
break;
800443a: bf00 nop
for(index=0; index < TS_State->touchDetected; index++)
800443c: 6cbb ldr r3, [r7, #72] ; 0x48
800443e: 3301 adds r3, #1
8004440: 64bb str r3, [r7, #72] ; 0x48
8004442: 687b ldr r3, [r7, #4]
8004444: 781b ldrb r3, [r3, #0]
8004446: 461a mov r2, r3
8004448: 6cbb ldr r3, [r7, #72] ; 0x48
800444a: 4293 cmp r3, r2
800444c: f4ff ae61 bcc.w 8004112 <BSP_TS_GetState+0x42>
} /* of for(index=0; index < TS_State->touchDetected; index++) */
#if (TS_MULTI_TOUCH_SUPPORTED == 1)
/* Get gesture Id */
ts_status = BSP_TS_Get_GestureId(TS_State);
8004450: 6878 ldr r0, [r7, #4]
8004452: f000 f813 bl 800447c <BSP_TS_Get_GestureId>
8004456: 4603 mov r3, r0
8004458: f887 304f strb.w r3, [r7, #79] ; 0x4f
#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */
} /* end of if(TS_State->touchDetected != 0) */
return (ts_status);
800445c: f897 304f ldrb.w r3, [r7, #79] ; 0x4f
}
8004460: 4618 mov r0, r3
8004462: 3754 adds r7, #84 ; 0x54
8004464: 46bd mov sp, r7
8004466: bd90 pop {r4, r7, pc}
8004468: 2000054c .word 0x2000054c
800446c: 20000554 .word 0x20000554
8004470: 2000054e .word 0x2000054e
8004474: 20000568 .word 0x20000568
8004478: 20000551 .word 0x20000551
0800447c <BSP_TS_Get_GestureId>:
* @brief Update gesture Id following a touch detected.
* @param TS_State: Pointer to touch screen current state structure
* @retval TS_OK if all initializations are OK. Other value if error.
*/
uint8_t BSP_TS_Get_GestureId(TS_StateTypeDef *TS_State)
{
800447c: b580 push {r7, lr}
800447e: b084 sub sp, #16
8004480: af00 add r7, sp, #0
8004482: 6078 str r0, [r7, #4]
uint32_t gestureId = 0;
8004484: 2300 movs r3, #0
8004486: 60bb str r3, [r7, #8]
uint8_t ts_status = TS_OK;
8004488: 2300 movs r3, #0
800448a: 73fb strb r3, [r7, #15]
/* Get gesture Id */
ft5336_TS_GetGestureID(I2cAddress, &gestureId);
800448c: 4b1f ldr r3, [pc, #124] ; (800450c <BSP_TS_Get_GestureId+0x90>)
800448e: 781b ldrb r3, [r3, #0]
8004490: b29b uxth r3, r3
8004492: f107 0208 add.w r2, r7, #8
8004496: 4611 mov r1, r2
8004498: 4618 mov r0, r3
800449a: f7fc fa6e bl 800097a <ft5336_TS_GetGestureID>
/* Remap gesture Id to a TS_GestureIdTypeDef value */
switch(gestureId)
800449e: 68bb ldr r3, [r7, #8]
80044a0: 2b18 cmp r3, #24
80044a2: d01b beq.n 80044dc <BSP_TS_Get_GestureId+0x60>
80044a4: 2b18 cmp r3, #24
80044a6: d806 bhi.n 80044b6 <BSP_TS_Get_GestureId+0x3a>
80044a8: 2b10 cmp r3, #16
80044aa: d00f beq.n 80044cc <BSP_TS_Get_GestureId+0x50>
80044ac: 2b14 cmp r3, #20
80044ae: d011 beq.n 80044d4 <BSP_TS_Get_GestureId+0x58>
80044b0: 2b00 cmp r3, #0
80044b2: d007 beq.n 80044c4 <BSP_TS_Get_GestureId+0x48>
80044b4: e022 b.n 80044fc <BSP_TS_Get_GestureId+0x80>
80044b6: 2b40 cmp r3, #64 ; 0x40
80044b8: d018 beq.n 80044ec <BSP_TS_Get_GestureId+0x70>
80044ba: 2b49 cmp r3, #73 ; 0x49
80044bc: d01a beq.n 80044f4 <BSP_TS_Get_GestureId+0x78>
80044be: 2b1c cmp r3, #28
80044c0: d010 beq.n 80044e4 <BSP_TS_Get_GestureId+0x68>
80044c2: e01b b.n 80044fc <BSP_TS_Get_GestureId+0x80>
{
case FT5336_GEST_ID_NO_GESTURE :
TS_State->gestureId = GEST_ID_NO_GESTURE;
80044c4: 687b ldr r3, [r7, #4]
80044c6: 2200 movs r2, #0
80044c8: 629a str r2, [r3, #40] ; 0x28
break;
80044ca: e01a b.n 8004502 <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_MOVE_UP :
TS_State->gestureId = GEST_ID_MOVE_UP;
80044cc: 687b ldr r3, [r7, #4]
80044ce: 2201 movs r2, #1
80044d0: 629a str r2, [r3, #40] ; 0x28
break;
80044d2: e016 b.n 8004502 <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_MOVE_RIGHT :
TS_State->gestureId = GEST_ID_MOVE_RIGHT;
80044d4: 687b ldr r3, [r7, #4]
80044d6: 2202 movs r2, #2
80044d8: 629a str r2, [r3, #40] ; 0x28
break;
80044da: e012 b.n 8004502 <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_MOVE_DOWN :
TS_State->gestureId = GEST_ID_MOVE_DOWN;
80044dc: 687b ldr r3, [r7, #4]
80044de: 2203 movs r2, #3
80044e0: 629a str r2, [r3, #40] ; 0x28
break;
80044e2: e00e b.n 8004502 <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_MOVE_LEFT :
TS_State->gestureId = GEST_ID_MOVE_LEFT;
80044e4: 687b ldr r3, [r7, #4]
80044e6: 2204 movs r2, #4
80044e8: 629a str r2, [r3, #40] ; 0x28
break;
80044ea: e00a b.n 8004502 <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_ZOOM_IN :
TS_State->gestureId = GEST_ID_ZOOM_IN;
80044ec: 687b ldr r3, [r7, #4]
80044ee: 2205 movs r2, #5
80044f0: 629a str r2, [r3, #40] ; 0x28
break;
80044f2: e006 b.n 8004502 <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_ZOOM_OUT :
TS_State->gestureId = GEST_ID_ZOOM_OUT;
80044f4: 687b ldr r3, [r7, #4]
80044f6: 2206 movs r2, #6
80044f8: 629a str r2, [r3, #40] ; 0x28
break;
80044fa: e002 b.n 8004502 <BSP_TS_Get_GestureId+0x86>
default :
ts_status = TS_ERROR;
80044fc: 2301 movs r3, #1
80044fe: 73fb strb r3, [r7, #15]
break;
8004500: bf00 nop
} /* of switch(gestureId) */
return(ts_status);
8004502: 7bfb ldrb r3, [r7, #15]
}
8004504: 4618 mov r0, r3
8004506: 3710 adds r7, #16
8004508: 46bd mov sp, r7
800450a: bd80 pop {r7, pc}
800450c: 20000551 .word 0x20000551
08004510 <HAL_MspInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
8004510: b580 push {r7, lr}
8004512: b082 sub sp, #8
8004514: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_PWR_CLK_ENABLE();
8004516: 4b11 ldr r3, [pc, #68] ; (800455c <HAL_MspInit+0x4c>)
8004518: 6c1b ldr r3, [r3, #64] ; 0x40
800451a: 4a10 ldr r2, [pc, #64] ; (800455c <HAL_MspInit+0x4c>)
800451c: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8004520: 6413 str r3, [r2, #64] ; 0x40
8004522: 4b0e ldr r3, [pc, #56] ; (800455c <HAL_MspInit+0x4c>)
8004524: 6c1b ldr r3, [r3, #64] ; 0x40
8004526: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
800452a: 607b str r3, [r7, #4]
800452c: 687b ldr r3, [r7, #4]
__HAL_RCC_SYSCFG_CLK_ENABLE();
800452e: 4b0b ldr r3, [pc, #44] ; (800455c <HAL_MspInit+0x4c>)
8004530: 6c5b ldr r3, [r3, #68] ; 0x44
8004532: 4a0a ldr r2, [pc, #40] ; (800455c <HAL_MspInit+0x4c>)
8004534: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8004538: 6453 str r3, [r2, #68] ; 0x44
800453a: 4b08 ldr r3, [pc, #32] ; (800455c <HAL_MspInit+0x4c>)
800453c: 6c5b ldr r3, [r3, #68] ; 0x44
800453e: f403 4380 and.w r3, r3, #16384 ; 0x4000
8004542: 603b str r3, [r7, #0]
8004544: 683b ldr r3, [r7, #0]
/* System interrupt init*/
/* PendSV_IRQn interrupt configuration */
HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
8004546: 2200 movs r2, #0
8004548: 210f movs r1, #15
800454a: f06f 0001 mvn.w r0, #1
800454e: f001 fba7 bl 8005ca0 <HAL_NVIC_SetPriority>
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
8004552: bf00 nop
8004554: 3708 adds r7, #8
8004556: 46bd mov sp, r7
8004558: bd80 pop {r7, pc}
800455a: bf00 nop
800455c: 40023800 .word 0x40023800
08004560 <HAL_ADC_MspInit>:
* This function configures the hardware resources used in this example
* @param hadc: ADC handle pointer
* @retval None
*/
void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
{
8004560: b580 push {r7, lr}
8004562: b08c sub sp, #48 ; 0x30
8004564: af00 add r7, sp, #0
8004566: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8004568: f107 031c add.w r3, r7, #28
800456c: 2200 movs r2, #0
800456e: 601a str r2, [r3, #0]
8004570: 605a str r2, [r3, #4]
8004572: 609a str r2, [r3, #8]
8004574: 60da str r2, [r3, #12]
8004576: 611a str r2, [r3, #16]
if(hadc->Instance==ADC1)
8004578: 687b ldr r3, [r7, #4]
800457a: 681b ldr r3, [r3, #0]
800457c: 4a2a ldr r2, [pc, #168] ; (8004628 <HAL_ADC_MspInit+0xc8>)
800457e: 4293 cmp r3, r2
8004580: d124 bne.n 80045cc <HAL_ADC_MspInit+0x6c>
{
/* USER CODE BEGIN ADC1_MspInit 0 */
/* USER CODE END ADC1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_ADC1_CLK_ENABLE();
8004582: 4b2a ldr r3, [pc, #168] ; (800462c <HAL_ADC_MspInit+0xcc>)
8004584: 6c5b ldr r3, [r3, #68] ; 0x44
8004586: 4a29 ldr r2, [pc, #164] ; (800462c <HAL_ADC_MspInit+0xcc>)
8004588: f443 7380 orr.w r3, r3, #256 ; 0x100
800458c: 6453 str r3, [r2, #68] ; 0x44
800458e: 4b27 ldr r3, [pc, #156] ; (800462c <HAL_ADC_MspInit+0xcc>)
8004590: 6c5b ldr r3, [r3, #68] ; 0x44
8004592: f403 7380 and.w r3, r3, #256 ; 0x100
8004596: 61bb str r3, [r7, #24]
8004598: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOA_CLK_ENABLE();
800459a: 4b24 ldr r3, [pc, #144] ; (800462c <HAL_ADC_MspInit+0xcc>)
800459c: 6b1b ldr r3, [r3, #48] ; 0x30
800459e: 4a23 ldr r2, [pc, #140] ; (800462c <HAL_ADC_MspInit+0xcc>)
80045a0: f043 0301 orr.w r3, r3, #1
80045a4: 6313 str r3, [r2, #48] ; 0x30
80045a6: 4b21 ldr r3, [pc, #132] ; (800462c <HAL_ADC_MspInit+0xcc>)
80045a8: 6b1b ldr r3, [r3, #48] ; 0x30
80045aa: f003 0301 and.w r3, r3, #1
80045ae: 617b str r3, [r7, #20]
80045b0: 697b ldr r3, [r7, #20]
/**ADC1 GPIO Configuration
PA0/WKUP ------> ADC1_IN0
*/
GPIO_InitStruct.Pin = GPIO_PIN_0;
80045b2: 2301 movs r3, #1
80045b4: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
80045b6: 2303 movs r3, #3
80045b8: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80045ba: 2300 movs r3, #0
80045bc: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
80045be: f107 031c add.w r3, r7, #28
80045c2: 4619 mov r1, r3
80045c4: 481a ldr r0, [pc, #104] ; (8004630 <HAL_ADC_MspInit+0xd0>)
80045c6: f003 fb1b bl 8007c00 <HAL_GPIO_Init>
/* USER CODE BEGIN ADC3_MspInit 1 */
/* USER CODE END ADC3_MspInit 1 */
}
}
80045ca: e029 b.n 8004620 <HAL_ADC_MspInit+0xc0>
else if(hadc->Instance==ADC3)
80045cc: 687b ldr r3, [r7, #4]
80045ce: 681b ldr r3, [r3, #0]
80045d0: 4a18 ldr r2, [pc, #96] ; (8004634 <HAL_ADC_MspInit+0xd4>)
80045d2: 4293 cmp r3, r2
80045d4: d124 bne.n 8004620 <HAL_ADC_MspInit+0xc0>
__HAL_RCC_ADC3_CLK_ENABLE();
80045d6: 4b15 ldr r3, [pc, #84] ; (800462c <HAL_ADC_MspInit+0xcc>)
80045d8: 6c5b ldr r3, [r3, #68] ; 0x44
80045da: 4a14 ldr r2, [pc, #80] ; (800462c <HAL_ADC_MspInit+0xcc>)
80045dc: f443 6380 orr.w r3, r3, #1024 ; 0x400
80045e0: 6453 str r3, [r2, #68] ; 0x44
80045e2: 4b12 ldr r3, [pc, #72] ; (800462c <HAL_ADC_MspInit+0xcc>)
80045e4: 6c5b ldr r3, [r3, #68] ; 0x44
80045e6: f403 6380 and.w r3, r3, #1024 ; 0x400
80045ea: 613b str r3, [r7, #16]
80045ec: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOF_CLK_ENABLE();
80045ee: 4b0f ldr r3, [pc, #60] ; (800462c <HAL_ADC_MspInit+0xcc>)
80045f0: 6b1b ldr r3, [r3, #48] ; 0x30
80045f2: 4a0e ldr r2, [pc, #56] ; (800462c <HAL_ADC_MspInit+0xcc>)
80045f4: f043 0320 orr.w r3, r3, #32
80045f8: 6313 str r3, [r2, #48] ; 0x30
80045fa: 4b0c ldr r3, [pc, #48] ; (800462c <HAL_ADC_MspInit+0xcc>)
80045fc: 6b1b ldr r3, [r3, #48] ; 0x30
80045fe: f003 0320 and.w r3, r3, #32
8004602: 60fb str r3, [r7, #12]
8004604: 68fb ldr r3, [r7, #12]
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_9|GPIO_PIN_8;
8004606: f44f 63e0 mov.w r3, #1792 ; 0x700
800460a: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
800460c: 2303 movs r3, #3
800460e: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004610: 2300 movs r3, #0
8004612: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
8004614: f107 031c add.w r3, r7, #28
8004618: 4619 mov r1, r3
800461a: 4807 ldr r0, [pc, #28] ; (8004638 <HAL_ADC_MspInit+0xd8>)
800461c: f003 faf0 bl 8007c00 <HAL_GPIO_Init>
}
8004620: bf00 nop
8004622: 3730 adds r7, #48 ; 0x30
8004624: 46bd mov sp, r7
8004626: bd80 pop {r7, pc}
8004628: 40012000 .word 0x40012000
800462c: 40023800 .word 0x40023800
8004630: 40020000 .word 0x40020000
8004634: 40012200 .word 0x40012200
8004638: 40021400 .word 0x40021400
0800463c <HAL_CRC_MspInit>:
* This function configures the hardware resources used in this example
* @param hcrc: CRC handle pointer
* @retval None
*/
void HAL_CRC_MspInit(CRC_HandleTypeDef* hcrc)
{
800463c: b480 push {r7}
800463e: b085 sub sp, #20
8004640: af00 add r7, sp, #0
8004642: 6078 str r0, [r7, #4]
if(hcrc->Instance==CRC)
8004644: 687b ldr r3, [r7, #4]
8004646: 681b ldr r3, [r3, #0]
8004648: 4a0a ldr r2, [pc, #40] ; (8004674 <HAL_CRC_MspInit+0x38>)
800464a: 4293 cmp r3, r2
800464c: d10b bne.n 8004666 <HAL_CRC_MspInit+0x2a>
{
/* USER CODE BEGIN CRC_MspInit 0 */
/* USER CODE END CRC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_CRC_CLK_ENABLE();
800464e: 4b0a ldr r3, [pc, #40] ; (8004678 <HAL_CRC_MspInit+0x3c>)
8004650: 6b1b ldr r3, [r3, #48] ; 0x30
8004652: 4a09 ldr r2, [pc, #36] ; (8004678 <HAL_CRC_MspInit+0x3c>)
8004654: f443 5380 orr.w r3, r3, #4096 ; 0x1000
8004658: 6313 str r3, [r2, #48] ; 0x30
800465a: 4b07 ldr r3, [pc, #28] ; (8004678 <HAL_CRC_MspInit+0x3c>)
800465c: 6b1b ldr r3, [r3, #48] ; 0x30
800465e: f403 5380 and.w r3, r3, #4096 ; 0x1000
8004662: 60fb str r3, [r7, #12]
8004664: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN CRC_MspInit 1 */
/* USER CODE END CRC_MspInit 1 */
}
}
8004666: bf00 nop
8004668: 3714 adds r7, #20
800466a: 46bd mov sp, r7
800466c: f85d 7b04 ldr.w r7, [sp], #4
8004670: 4770 bx lr
8004672: bf00 nop
8004674: 40023000 .word 0x40023000
8004678: 40023800 .word 0x40023800
0800467c <HAL_DAC_MspInit>:
* This function configures the hardware resources used in this example
* @param hdac: DAC handle pointer
* @retval None
*/
void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac)
{
800467c: b580 push {r7, lr}
800467e: b08a sub sp, #40 ; 0x28
8004680: af00 add r7, sp, #0
8004682: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8004684: f107 0314 add.w r3, r7, #20
8004688: 2200 movs r2, #0
800468a: 601a str r2, [r3, #0]
800468c: 605a str r2, [r3, #4]
800468e: 609a str r2, [r3, #8]
8004690: 60da str r2, [r3, #12]
8004692: 611a str r2, [r3, #16]
if(hdac->Instance==DAC)
8004694: 687b ldr r3, [r7, #4]
8004696: 681b ldr r3, [r3, #0]
8004698: 4a19 ldr r2, [pc, #100] ; (8004700 <HAL_DAC_MspInit+0x84>)
800469a: 4293 cmp r3, r2
800469c: d12b bne.n 80046f6 <HAL_DAC_MspInit+0x7a>
{
/* USER CODE BEGIN DAC_MspInit 0 */
/* USER CODE END DAC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_DAC_CLK_ENABLE();
800469e: 4b19 ldr r3, [pc, #100] ; (8004704 <HAL_DAC_MspInit+0x88>)
80046a0: 6c1b ldr r3, [r3, #64] ; 0x40
80046a2: 4a18 ldr r2, [pc, #96] ; (8004704 <HAL_DAC_MspInit+0x88>)
80046a4: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
80046a8: 6413 str r3, [r2, #64] ; 0x40
80046aa: 4b16 ldr r3, [pc, #88] ; (8004704 <HAL_DAC_MspInit+0x88>)
80046ac: 6c1b ldr r3, [r3, #64] ; 0x40
80046ae: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
80046b2: 613b str r3, [r7, #16]
80046b4: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
80046b6: 4b13 ldr r3, [pc, #76] ; (8004704 <HAL_DAC_MspInit+0x88>)
80046b8: 6b1b ldr r3, [r3, #48] ; 0x30
80046ba: 4a12 ldr r2, [pc, #72] ; (8004704 <HAL_DAC_MspInit+0x88>)
80046bc: f043 0301 orr.w r3, r3, #1
80046c0: 6313 str r3, [r2, #48] ; 0x30
80046c2: 4b10 ldr r3, [pc, #64] ; (8004704 <HAL_DAC_MspInit+0x88>)
80046c4: 6b1b ldr r3, [r3, #48] ; 0x30
80046c6: f003 0301 and.w r3, r3, #1
80046ca: 60fb str r3, [r7, #12]
80046cc: 68fb ldr r3, [r7, #12]
/**DAC GPIO Configuration
PA4 ------> DAC_OUT1
*/
GPIO_InitStruct.Pin = GPIO_PIN_4;
80046ce: 2310 movs r3, #16
80046d0: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
80046d2: 2303 movs r3, #3
80046d4: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80046d6: 2300 movs r3, #0
80046d8: 61fb str r3, [r7, #28]
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
80046da: f107 0314 add.w r3, r7, #20
80046de: 4619 mov r1, r3
80046e0: 4809 ldr r0, [pc, #36] ; (8004708 <HAL_DAC_MspInit+0x8c>)
80046e2: f003 fa8d bl 8007c00 <HAL_GPIO_Init>
/* DAC interrupt Init */
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, 0, 0);
80046e6: 2200 movs r2, #0
80046e8: 2100 movs r1, #0
80046ea: 2036 movs r0, #54 ; 0x36
80046ec: f001 fad8 bl 8005ca0 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
80046f0: 2036 movs r0, #54 ; 0x36
80046f2: f001 faf1 bl 8005cd8 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN DAC_MspInit 1 */
/* USER CODE END DAC_MspInit 1 */
}
}
80046f6: bf00 nop
80046f8: 3728 adds r7, #40 ; 0x28
80046fa: 46bd mov sp, r7
80046fc: bd80 pop {r7, pc}
80046fe: bf00 nop
8004700: 40007400 .word 0x40007400
8004704: 40023800 .word 0x40023800
8004708: 40020000 .word 0x40020000
0800470c <HAL_DMA2D_MspInit>:
* This function configures the hardware resources used in this example
* @param hdma2d: DMA2D handle pointer
* @retval None
*/
void HAL_DMA2D_MspInit(DMA2D_HandleTypeDef* hdma2d)
{
800470c: b480 push {r7}
800470e: b085 sub sp, #20
8004710: af00 add r7, sp, #0
8004712: 6078 str r0, [r7, #4]
if(hdma2d->Instance==DMA2D)
8004714: 687b ldr r3, [r7, #4]
8004716: 681b ldr r3, [r3, #0]
8004718: 4a0a ldr r2, [pc, #40] ; (8004744 <HAL_DMA2D_MspInit+0x38>)
800471a: 4293 cmp r3, r2
800471c: d10b bne.n 8004736 <HAL_DMA2D_MspInit+0x2a>
{
/* USER CODE BEGIN DMA2D_MspInit 0 */
/* USER CODE END DMA2D_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_DMA2D_CLK_ENABLE();
800471e: 4b0a ldr r3, [pc, #40] ; (8004748 <HAL_DMA2D_MspInit+0x3c>)
8004720: 6b1b ldr r3, [r3, #48] ; 0x30
8004722: 4a09 ldr r2, [pc, #36] ; (8004748 <HAL_DMA2D_MspInit+0x3c>)
8004724: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
8004728: 6313 str r3, [r2, #48] ; 0x30
800472a: 4b07 ldr r3, [pc, #28] ; (8004748 <HAL_DMA2D_MspInit+0x3c>)
800472c: 6b1b ldr r3, [r3, #48] ; 0x30
800472e: f403 0300 and.w r3, r3, #8388608 ; 0x800000
8004732: 60fb str r3, [r7, #12]
8004734: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN DMA2D_MspInit 1 */
/* USER CODE END DMA2D_MspInit 1 */
}
}
8004736: bf00 nop
8004738: 3714 adds r7, #20
800473a: 46bd mov sp, r7
800473c: f85d 7b04 ldr.w r7, [sp], #4
8004740: 4770 bx lr
8004742: bf00 nop
8004744: 4002b000 .word 0x4002b000
8004748: 40023800 .word 0x40023800
0800474c <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)
{
800474c: b580 push {r7, lr}
800474e: b08c sub sp, #48 ; 0x30
8004750: af00 add r7, sp, #0
8004752: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8004754: f107 031c add.w r3, r7, #28
8004758: 2200 movs r2, #0
800475a: 601a str r2, [r3, #0]
800475c: 605a str r2, [r3, #4]
800475e: 609a str r2, [r3, #8]
8004760: 60da str r2, [r3, #12]
8004762: 611a str r2, [r3, #16]
if(hi2c->Instance==I2C1)
8004764: 687b ldr r3, [r7, #4]
8004766: 681b ldr r3, [r3, #0]
8004768: 4a2f ldr r2, [pc, #188] ; (8004828 <HAL_I2C_MspInit+0xdc>)
800476a: 4293 cmp r3, r2
800476c: d129 bne.n 80047c2 <HAL_I2C_MspInit+0x76>
{
/* USER CODE BEGIN I2C1_MspInit 0 */
/* USER CODE END I2C1_MspInit 0 */
__HAL_RCC_GPIOB_CLK_ENABLE();
800476e: 4b2f ldr r3, [pc, #188] ; (800482c <HAL_I2C_MspInit+0xe0>)
8004770: 6b1b ldr r3, [r3, #48] ; 0x30
8004772: 4a2e ldr r2, [pc, #184] ; (800482c <HAL_I2C_MspInit+0xe0>)
8004774: f043 0302 orr.w r3, r3, #2
8004778: 6313 str r3, [r2, #48] ; 0x30
800477a: 4b2c ldr r3, [pc, #176] ; (800482c <HAL_I2C_MspInit+0xe0>)
800477c: 6b1b ldr r3, [r3, #48] ; 0x30
800477e: f003 0302 and.w r3, r3, #2
8004782: 61bb str r3, [r7, #24]
8004784: 69bb ldr r3, [r7, #24]
/**I2C1 GPIO Configuration
PB8 ------> I2C1_SCL
PB9 ------> I2C1_SDA
*/
GPIO_InitStruct.Pin = ARDUINO_SCL_D15_Pin|ARDUINO_SDA_D14_Pin;
8004786: f44f 7340 mov.w r3, #768 ; 0x300
800478a: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
800478c: 2312 movs r3, #18
800478e: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_PULLUP;
8004790: 2301 movs r3, #1
8004792: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004794: 2300 movs r3, #0
8004796: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
8004798: 2304 movs r3, #4
800479a: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
800479c: f107 031c add.w r3, r7, #28
80047a0: 4619 mov r1, r3
80047a2: 4823 ldr r0, [pc, #140] ; (8004830 <HAL_I2C_MspInit+0xe4>)
80047a4: f003 fa2c bl 8007c00 <HAL_GPIO_Init>
/* Peripheral clock enable */
__HAL_RCC_I2C1_CLK_ENABLE();
80047a8: 4b20 ldr r3, [pc, #128] ; (800482c <HAL_I2C_MspInit+0xe0>)
80047aa: 6c1b ldr r3, [r3, #64] ; 0x40
80047ac: 4a1f ldr r2, [pc, #124] ; (800482c <HAL_I2C_MspInit+0xe0>)
80047ae: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
80047b2: 6413 str r3, [r2, #64] ; 0x40
80047b4: 4b1d ldr r3, [pc, #116] ; (800482c <HAL_I2C_MspInit+0xe0>)
80047b6: 6c1b ldr r3, [r3, #64] ; 0x40
80047b8: f403 1300 and.w r3, r3, #2097152 ; 0x200000
80047bc: 617b str r3, [r7, #20]
80047be: 697b ldr r3, [r7, #20]
/* USER CODE BEGIN I2C3_MspInit 1 */
/* USER CODE END I2C3_MspInit 1 */
}
}
80047c0: e02d b.n 800481e <HAL_I2C_MspInit+0xd2>
else if(hi2c->Instance==I2C3)
80047c2: 687b ldr r3, [r7, #4]
80047c4: 681b ldr r3, [r3, #0]
80047c6: 4a1b ldr r2, [pc, #108] ; (8004834 <HAL_I2C_MspInit+0xe8>)
80047c8: 4293 cmp r3, r2
80047ca: d128 bne.n 800481e <HAL_I2C_MspInit+0xd2>
__HAL_RCC_GPIOH_CLK_ENABLE();
80047cc: 4b17 ldr r3, [pc, #92] ; (800482c <HAL_I2C_MspInit+0xe0>)
80047ce: 6b1b ldr r3, [r3, #48] ; 0x30
80047d0: 4a16 ldr r2, [pc, #88] ; (800482c <HAL_I2C_MspInit+0xe0>)
80047d2: f043 0380 orr.w r3, r3, #128 ; 0x80
80047d6: 6313 str r3, [r2, #48] ; 0x30
80047d8: 4b14 ldr r3, [pc, #80] ; (800482c <HAL_I2C_MspInit+0xe0>)
80047da: 6b1b ldr r3, [r3, #48] ; 0x30
80047dc: f003 0380 and.w r3, r3, #128 ; 0x80
80047e0: 613b str r3, [r7, #16]
80047e2: 693b ldr r3, [r7, #16]
GPIO_InitStruct.Pin = LCD_SCL_Pin|LCD_SDA_Pin;
80047e4: f44f 73c0 mov.w r3, #384 ; 0x180
80047e8: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
80047ea: 2312 movs r3, #18
80047ec: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_PULLUP;
80047ee: 2301 movs r3, #1
80047f0: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80047f2: 2303 movs r3, #3
80047f4: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Alternate = GPIO_AF4_I2C3;
80047f6: 2304 movs r3, #4
80047f8: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
80047fa: f107 031c add.w r3, r7, #28
80047fe: 4619 mov r1, r3
8004800: 480d ldr r0, [pc, #52] ; (8004838 <HAL_I2C_MspInit+0xec>)
8004802: f003 f9fd bl 8007c00 <HAL_GPIO_Init>
__HAL_RCC_I2C3_CLK_ENABLE();
8004806: 4b09 ldr r3, [pc, #36] ; (800482c <HAL_I2C_MspInit+0xe0>)
8004808: 6c1b ldr r3, [r3, #64] ; 0x40
800480a: 4a08 ldr r2, [pc, #32] ; (800482c <HAL_I2C_MspInit+0xe0>)
800480c: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
8004810: 6413 str r3, [r2, #64] ; 0x40
8004812: 4b06 ldr r3, [pc, #24] ; (800482c <HAL_I2C_MspInit+0xe0>)
8004814: 6c1b ldr r3, [r3, #64] ; 0x40
8004816: f403 0300 and.w r3, r3, #8388608 ; 0x800000
800481a: 60fb str r3, [r7, #12]
800481c: 68fb ldr r3, [r7, #12]
}
800481e: bf00 nop
8004820: 3730 adds r7, #48 ; 0x30
8004822: 46bd mov sp, r7
8004824: bd80 pop {r7, pc}
8004826: bf00 nop
8004828: 40005400 .word 0x40005400
800482c: 40023800 .word 0x40023800
8004830: 40020400 .word 0x40020400
8004834: 40005c00 .word 0x40005c00
8004838: 40021c00 .word 0x40021c00
0800483c <HAL_I2C_MspDeInit>:
* This function freeze the hardware resources used in this example
* @param hi2c: I2C handle pointer
* @retval None
*/
void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
{
800483c: b580 push {r7, lr}
800483e: b082 sub sp, #8
8004840: af00 add r7, sp, #0
8004842: 6078 str r0, [r7, #4]
if(hi2c->Instance==I2C1)
8004844: 687b ldr r3, [r7, #4]
8004846: 681b ldr r3, [r3, #0]
8004848: 4a15 ldr r2, [pc, #84] ; (80048a0 <HAL_I2C_MspDeInit+0x64>)
800484a: 4293 cmp r3, r2
800484c: d110 bne.n 8004870 <HAL_I2C_MspDeInit+0x34>
{
/* USER CODE BEGIN I2C1_MspDeInit 0 */
/* USER CODE END I2C1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_I2C1_CLK_DISABLE();
800484e: 4b15 ldr r3, [pc, #84] ; (80048a4 <HAL_I2C_MspDeInit+0x68>)
8004850: 6c1b ldr r3, [r3, #64] ; 0x40
8004852: 4a14 ldr r2, [pc, #80] ; (80048a4 <HAL_I2C_MspDeInit+0x68>)
8004854: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
8004858: 6413 str r3, [r2, #64] ; 0x40
/**I2C1 GPIO Configuration
PB8 ------> I2C1_SCL
PB9 ------> I2C1_SDA
*/
HAL_GPIO_DeInit(ARDUINO_SCL_D15_GPIO_Port, ARDUINO_SCL_D15_Pin);
800485a: f44f 7180 mov.w r1, #256 ; 0x100
800485e: 4812 ldr r0, [pc, #72] ; (80048a8 <HAL_I2C_MspDeInit+0x6c>)
8004860: f003 fb78 bl 8007f54 <HAL_GPIO_DeInit>
HAL_GPIO_DeInit(ARDUINO_SDA_D14_GPIO_Port, ARDUINO_SDA_D14_Pin);
8004864: f44f 7100 mov.w r1, #512 ; 0x200
8004868: 480f ldr r0, [pc, #60] ; (80048a8 <HAL_I2C_MspDeInit+0x6c>)
800486a: f003 fb73 bl 8007f54 <HAL_GPIO_DeInit>
/* USER CODE BEGIN I2C3_MspDeInit 1 */
/* USER CODE END I2C3_MspDeInit 1 */
}
}
800486e: e013 b.n 8004898 <HAL_I2C_MspDeInit+0x5c>
else if(hi2c->Instance==I2C3)
8004870: 687b ldr r3, [r7, #4]
8004872: 681b ldr r3, [r3, #0]
8004874: 4a0d ldr r2, [pc, #52] ; (80048ac <HAL_I2C_MspDeInit+0x70>)
8004876: 4293 cmp r3, r2
8004878: d10e bne.n 8004898 <HAL_I2C_MspDeInit+0x5c>
__HAL_RCC_I2C3_CLK_DISABLE();
800487a: 4b0a ldr r3, [pc, #40] ; (80048a4 <HAL_I2C_MspDeInit+0x68>)
800487c: 6c1b ldr r3, [r3, #64] ; 0x40
800487e: 4a09 ldr r2, [pc, #36] ; (80048a4 <HAL_I2C_MspDeInit+0x68>)
8004880: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
8004884: 6413 str r3, [r2, #64] ; 0x40
HAL_GPIO_DeInit(LCD_SCL_GPIO_Port, LCD_SCL_Pin);
8004886: 2180 movs r1, #128 ; 0x80
8004888: 4809 ldr r0, [pc, #36] ; (80048b0 <HAL_I2C_MspDeInit+0x74>)
800488a: f003 fb63 bl 8007f54 <HAL_GPIO_DeInit>
HAL_GPIO_DeInit(LCD_SDA_GPIO_Port, LCD_SDA_Pin);
800488e: f44f 7180 mov.w r1, #256 ; 0x100
8004892: 4807 ldr r0, [pc, #28] ; (80048b0 <HAL_I2C_MspDeInit+0x74>)
8004894: f003 fb5e bl 8007f54 <HAL_GPIO_DeInit>
}
8004898: bf00 nop
800489a: 3708 adds r7, #8
800489c: 46bd mov sp, r7
800489e: bd80 pop {r7, pc}
80048a0: 40005400 .word 0x40005400
80048a4: 40023800 .word 0x40023800
80048a8: 40020400 .word 0x40020400
80048ac: 40005c00 .word 0x40005c00
80048b0: 40021c00 .word 0x40021c00
080048b4 <HAL_LTDC_MspInit>:
* This function configures the hardware resources used in this example
* @param hltdc: LTDC handle pointer
* @retval None
*/
void HAL_LTDC_MspInit(LTDC_HandleTypeDef* hltdc)
{
80048b4: b580 push {r7, lr}
80048b6: b08e sub sp, #56 ; 0x38
80048b8: af00 add r7, sp, #0
80048ba: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
80048bc: f107 0324 add.w r3, r7, #36 ; 0x24
80048c0: 2200 movs r2, #0
80048c2: 601a str r2, [r3, #0]
80048c4: 605a str r2, [r3, #4]
80048c6: 609a str r2, [r3, #8]
80048c8: 60da str r2, [r3, #12]
80048ca: 611a str r2, [r3, #16]
if(hltdc->Instance==LTDC)
80048cc: 687b ldr r3, [r7, #4]
80048ce: 681b ldr r3, [r3, #0]
80048d0: 4a55 ldr r2, [pc, #340] ; (8004a28 <HAL_LTDC_MspInit+0x174>)
80048d2: 4293 cmp r3, r2
80048d4: f040 80a3 bne.w 8004a1e <HAL_LTDC_MspInit+0x16a>
{
/* USER CODE BEGIN LTDC_MspInit 0 */
/* USER CODE END LTDC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_LTDC_CLK_ENABLE();
80048d8: 4b54 ldr r3, [pc, #336] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
80048da: 6c5b ldr r3, [r3, #68] ; 0x44
80048dc: 4a53 ldr r2, [pc, #332] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
80048de: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
80048e2: 6453 str r3, [r2, #68] ; 0x44
80048e4: 4b51 ldr r3, [pc, #324] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
80048e6: 6c5b ldr r3, [r3, #68] ; 0x44
80048e8: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
80048ec: 623b str r3, [r7, #32]
80048ee: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOE_CLK_ENABLE();
80048f0: 4b4e ldr r3, [pc, #312] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
80048f2: 6b1b ldr r3, [r3, #48] ; 0x30
80048f4: 4a4d ldr r2, [pc, #308] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
80048f6: f043 0310 orr.w r3, r3, #16
80048fa: 6313 str r3, [r2, #48] ; 0x30
80048fc: 4b4b ldr r3, [pc, #300] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
80048fe: 6b1b ldr r3, [r3, #48] ; 0x30
8004900: f003 0310 and.w r3, r3, #16
8004904: 61fb str r3, [r7, #28]
8004906: 69fb ldr r3, [r7, #28]
__HAL_RCC_GPIOJ_CLK_ENABLE();
8004908: 4b48 ldr r3, [pc, #288] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
800490a: 6b1b ldr r3, [r3, #48] ; 0x30
800490c: 4a47 ldr r2, [pc, #284] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
800490e: f443 7300 orr.w r3, r3, #512 ; 0x200
8004912: 6313 str r3, [r2, #48] ; 0x30
8004914: 4b45 ldr r3, [pc, #276] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
8004916: 6b1b ldr r3, [r3, #48] ; 0x30
8004918: f403 7300 and.w r3, r3, #512 ; 0x200
800491c: 61bb str r3, [r7, #24]
800491e: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOK_CLK_ENABLE();
8004920: 4b42 ldr r3, [pc, #264] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
8004922: 6b1b ldr r3, [r3, #48] ; 0x30
8004924: 4a41 ldr r2, [pc, #260] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
8004926: f443 6380 orr.w r3, r3, #1024 ; 0x400
800492a: 6313 str r3, [r2, #48] ; 0x30
800492c: 4b3f ldr r3, [pc, #252] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
800492e: 6b1b ldr r3, [r3, #48] ; 0x30
8004930: f403 6380 and.w r3, r3, #1024 ; 0x400
8004934: 617b str r3, [r7, #20]
8004936: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOG_CLK_ENABLE();
8004938: 4b3c ldr r3, [pc, #240] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
800493a: 6b1b ldr r3, [r3, #48] ; 0x30
800493c: 4a3b ldr r2, [pc, #236] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
800493e: f043 0340 orr.w r3, r3, #64 ; 0x40
8004942: 6313 str r3, [r2, #48] ; 0x30
8004944: 4b39 ldr r3, [pc, #228] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
8004946: 6b1b ldr r3, [r3, #48] ; 0x30
8004948: f003 0340 and.w r3, r3, #64 ; 0x40
800494c: 613b str r3, [r7, #16]
800494e: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOI_CLK_ENABLE();
8004950: 4b36 ldr r3, [pc, #216] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
8004952: 6b1b ldr r3, [r3, #48] ; 0x30
8004954: 4a35 ldr r2, [pc, #212] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
8004956: f443 7380 orr.w r3, r3, #256 ; 0x100
800495a: 6313 str r3, [r2, #48] ; 0x30
800495c: 4b33 ldr r3, [pc, #204] ; (8004a2c <HAL_LTDC_MspInit+0x178>)
800495e: 6b1b ldr r3, [r3, #48] ; 0x30
8004960: f403 7380 and.w r3, r3, #256 ; 0x100
8004964: 60fb str r3, [r7, #12]
8004966: 68fb ldr r3, [r7, #12]
PJ3 ------> LTDC_R4
PJ2 ------> LTDC_R3
PJ0 ------> LTDC_R1
PJ1 ------> LTDC_R2
*/
GPIO_InitStruct.Pin = LCD_B0_Pin;
8004968: 2310 movs r3, #16
800496a: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800496c: 2302 movs r3, #2
800496e: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004970: 2300 movs r3, #0
8004972: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004974: 2300 movs r3, #0
8004976: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
8004978: 230e movs r3, #14
800497a: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(LCD_B0_GPIO_Port, &GPIO_InitStruct);
800497c: f107 0324 add.w r3, r7, #36 ; 0x24
8004980: 4619 mov r1, r3
8004982: 482b ldr r0, [pc, #172] ; (8004a30 <HAL_LTDC_MspInit+0x17c>)
8004984: f003 f93c bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = LCD_B1_Pin|LCD_B2_Pin|LCD_B3_Pin|LCD_G4_Pin
8004988: f64e 73ff movw r3, #61439 ; 0xefff
800498c: 627b str r3, [r7, #36] ; 0x24
|LCD_G1_Pin|LCD_G3_Pin|LCD_G0_Pin|LCD_G2_Pin
|LCD_R7_Pin|LCD_R5_Pin|LCD_R6_Pin|LCD_R4_Pin
|LCD_R3_Pin|LCD_R1_Pin|LCD_R2_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800498e: 2302 movs r3, #2
8004990: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004992: 2300 movs r3, #0
8004994: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004996: 2300 movs r3, #0
8004998: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
800499a: 230e movs r3, #14
800499c: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOJ, &GPIO_InitStruct);
800499e: f107 0324 add.w r3, r7, #36 ; 0x24
80049a2: 4619 mov r1, r3
80049a4: 4823 ldr r0, [pc, #140] ; (8004a34 <HAL_LTDC_MspInit+0x180>)
80049a6: f003 f92b bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = LCD_DE_Pin|LCD_B7_Pin|LCD_B6_Pin|LCD_B5_Pin
80049aa: 23f7 movs r3, #247 ; 0xf7
80049ac: 627b str r3, [r7, #36] ; 0x24
|LCD_G6_Pin|LCD_G7_Pin|LCD_G5_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80049ae: 2302 movs r3, #2
80049b0: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
80049b2: 2300 movs r3, #0
80049b4: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80049b6: 2300 movs r3, #0
80049b8: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
80049ba: 230e movs r3, #14
80049bc: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOK, &GPIO_InitStruct);
80049be: f107 0324 add.w r3, r7, #36 ; 0x24
80049c2: 4619 mov r1, r3
80049c4: 481c ldr r0, [pc, #112] ; (8004a38 <HAL_LTDC_MspInit+0x184>)
80049c6: f003 f91b bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = LCD_B4_Pin;
80049ca: f44f 5380 mov.w r3, #4096 ; 0x1000
80049ce: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80049d0: 2302 movs r3, #2
80049d2: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
80049d4: 2300 movs r3, #0
80049d6: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80049d8: 2300 movs r3, #0
80049da: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF9_LTDC;
80049dc: 2309 movs r3, #9
80049de: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(LCD_B4_GPIO_Port, &GPIO_InitStruct);
80049e0: f107 0324 add.w r3, r7, #36 ; 0x24
80049e4: 4619 mov r1, r3
80049e6: 4815 ldr r0, [pc, #84] ; (8004a3c <HAL_LTDC_MspInit+0x188>)
80049e8: f003 f90a bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = LCD_HSYNC_Pin|LCD_VSYNC_Pin|LCD_R0_Pin|LCD_CLK_Pin;
80049ec: f44f 4346 mov.w r3, #50688 ; 0xc600
80049f0: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80049f2: 2302 movs r3, #2
80049f4: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
80049f6: 2300 movs r3, #0
80049f8: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80049fa: 2300 movs r3, #0
80049fc: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
80049fe: 230e movs r3, #14
8004a00: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
8004a02: f107 0324 add.w r3, r7, #36 ; 0x24
8004a06: 4619 mov r1, r3
8004a08: 480d ldr r0, [pc, #52] ; (8004a40 <HAL_LTDC_MspInit+0x18c>)
8004a0a: f003 f8f9 bl 8007c00 <HAL_GPIO_Init>
/* LTDC interrupt Init */
HAL_NVIC_SetPriority(LTDC_IRQn, 5, 0);
8004a0e: 2200 movs r2, #0
8004a10: 2105 movs r1, #5
8004a12: 2058 movs r0, #88 ; 0x58
8004a14: f001 f944 bl 8005ca0 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(LTDC_IRQn);
8004a18: 2058 movs r0, #88 ; 0x58
8004a1a: f001 f95d bl 8005cd8 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN LTDC_MspInit 1 */
/* USER CODE END LTDC_MspInit 1 */
}
}
8004a1e: bf00 nop
8004a20: 3738 adds r7, #56 ; 0x38
8004a22: 46bd mov sp, r7
8004a24: bd80 pop {r7, pc}
8004a26: bf00 nop
8004a28: 40016800 .word 0x40016800
8004a2c: 40023800 .word 0x40023800
8004a30: 40021000 .word 0x40021000
8004a34: 40022400 .word 0x40022400
8004a38: 40022800 .word 0x40022800
8004a3c: 40021800 .word 0x40021800
8004a40: 40022000 .word 0x40022000
08004a44 <HAL_RNG_MspInit>:
* This function configures the hardware resources used in this example
* @param hrng: RNG handle pointer
* @retval None
*/
void HAL_RNG_MspInit(RNG_HandleTypeDef* hrng)
{
8004a44: b480 push {r7}
8004a46: b085 sub sp, #20
8004a48: af00 add r7, sp, #0
8004a4a: 6078 str r0, [r7, #4]
if(hrng->Instance==RNG)
8004a4c: 687b ldr r3, [r7, #4]
8004a4e: 681b ldr r3, [r3, #0]
8004a50: 4a0a ldr r2, [pc, #40] ; (8004a7c <HAL_RNG_MspInit+0x38>)
8004a52: 4293 cmp r3, r2
8004a54: d10b bne.n 8004a6e <HAL_RNG_MspInit+0x2a>
{
/* USER CODE BEGIN RNG_MspInit 0 */
/* USER CODE END RNG_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_RNG_CLK_ENABLE();
8004a56: 4b0a ldr r3, [pc, #40] ; (8004a80 <HAL_RNG_MspInit+0x3c>)
8004a58: 6b5b ldr r3, [r3, #52] ; 0x34
8004a5a: 4a09 ldr r2, [pc, #36] ; (8004a80 <HAL_RNG_MspInit+0x3c>)
8004a5c: f043 0340 orr.w r3, r3, #64 ; 0x40
8004a60: 6353 str r3, [r2, #52] ; 0x34
8004a62: 4b07 ldr r3, [pc, #28] ; (8004a80 <HAL_RNG_MspInit+0x3c>)
8004a64: 6b5b ldr r3, [r3, #52] ; 0x34
8004a66: f003 0340 and.w r3, r3, #64 ; 0x40
8004a6a: 60fb str r3, [r7, #12]
8004a6c: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN RNG_MspInit 1 */
/* USER CODE END RNG_MspInit 1 */
}
}
8004a6e: bf00 nop
8004a70: 3714 adds r7, #20
8004a72: 46bd mov sp, r7
8004a74: f85d 7b04 ldr.w r7, [sp], #4
8004a78: 4770 bx lr
8004a7a: bf00 nop
8004a7c: 50060800 .word 0x50060800
8004a80: 40023800 .word 0x40023800
08004a84 <HAL_RTC_MspInit>:
* This function configures the hardware resources used in this example
* @param hrtc: RTC handle pointer
* @retval None
*/
void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
{
8004a84: b480 push {r7}
8004a86: b083 sub sp, #12
8004a88: af00 add r7, sp, #0
8004a8a: 6078 str r0, [r7, #4]
if(hrtc->Instance==RTC)
8004a8c: 687b ldr r3, [r7, #4]
8004a8e: 681b ldr r3, [r3, #0]
8004a90: 4a07 ldr r2, [pc, #28] ; (8004ab0 <HAL_RTC_MspInit+0x2c>)
8004a92: 4293 cmp r3, r2
8004a94: d105 bne.n 8004aa2 <HAL_RTC_MspInit+0x1e>
{
/* USER CODE BEGIN RTC_MspInit 0 */
/* USER CODE END RTC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_RTC_ENABLE();
8004a96: 4b07 ldr r3, [pc, #28] ; (8004ab4 <HAL_RTC_MspInit+0x30>)
8004a98: 6f1b ldr r3, [r3, #112] ; 0x70
8004a9a: 4a06 ldr r2, [pc, #24] ; (8004ab4 <HAL_RTC_MspInit+0x30>)
8004a9c: f443 4300 orr.w r3, r3, #32768 ; 0x8000
8004aa0: 6713 str r3, [r2, #112] ; 0x70
/* USER CODE BEGIN RTC_MspInit 1 */
/* USER CODE END RTC_MspInit 1 */
}
}
8004aa2: bf00 nop
8004aa4: 370c adds r7, #12
8004aa6: 46bd mov sp, r7
8004aa8: f85d 7b04 ldr.w r7, [sp], #4
8004aac: 4770 bx lr
8004aae: bf00 nop
8004ab0: 40002800 .word 0x40002800
8004ab4: 40023800 .word 0x40023800
08004ab8 <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)
{
8004ab8: b580 push {r7, lr}
8004aba: b08a sub sp, #40 ; 0x28
8004abc: af00 add r7, sp, #0
8004abe: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8004ac0: f107 0314 add.w r3, r7, #20
8004ac4: 2200 movs r2, #0
8004ac6: 601a str r2, [r3, #0]
8004ac8: 605a str r2, [r3, #4]
8004aca: 609a str r2, [r3, #8]
8004acc: 60da str r2, [r3, #12]
8004ace: 611a str r2, [r3, #16]
if(hspi->Instance==SPI2)
8004ad0: 687b ldr r3, [r7, #4]
8004ad2: 681b ldr r3, [r3, #0]
8004ad4: 4a2d ldr r2, [pc, #180] ; (8004b8c <HAL_SPI_MspInit+0xd4>)
8004ad6: 4293 cmp r3, r2
8004ad8: d154 bne.n 8004b84 <HAL_SPI_MspInit+0xcc>
{
/* USER CODE BEGIN SPI2_MspInit 0 */
/* USER CODE END SPI2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_SPI2_CLK_ENABLE();
8004ada: 4b2d ldr r3, [pc, #180] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004adc: 6c1b ldr r3, [r3, #64] ; 0x40
8004ade: 4a2c ldr r2, [pc, #176] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004ae0: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8004ae4: 6413 str r3, [r2, #64] ; 0x40
8004ae6: 4b2a ldr r3, [pc, #168] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004ae8: 6c1b ldr r3, [r3, #64] ; 0x40
8004aea: f403 4380 and.w r3, r3, #16384 ; 0x4000
8004aee: 613b str r3, [r7, #16]
8004af0: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOI_CLK_ENABLE();
8004af2: 4b27 ldr r3, [pc, #156] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004af4: 6b1b ldr r3, [r3, #48] ; 0x30
8004af6: 4a26 ldr r2, [pc, #152] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004af8: f443 7380 orr.w r3, r3, #256 ; 0x100
8004afc: 6313 str r3, [r2, #48] ; 0x30
8004afe: 4b24 ldr r3, [pc, #144] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004b00: 6b1b ldr r3, [r3, #48] ; 0x30
8004b02: f403 7380 and.w r3, r3, #256 ; 0x100
8004b06: 60fb str r3, [r7, #12]
8004b08: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOB_CLK_ENABLE();
8004b0a: 4b21 ldr r3, [pc, #132] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004b0c: 6b1b ldr r3, [r3, #48] ; 0x30
8004b0e: 4a20 ldr r2, [pc, #128] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004b10: f043 0302 orr.w r3, r3, #2
8004b14: 6313 str r3, [r2, #48] ; 0x30
8004b16: 4b1e ldr r3, [pc, #120] ; (8004b90 <HAL_SPI_MspInit+0xd8>)
8004b18: 6b1b ldr r3, [r3, #48] ; 0x30
8004b1a: f003 0302 and.w r3, r3, #2
8004b1e: 60bb str r3, [r7, #8]
8004b20: 68bb ldr r3, [r7, #8]
PI1 ------> SPI2_SCK
PI0 ------> SPI2_NSS
PB14 ------> SPI2_MISO
PB15 ------> SPI2_MOSI
*/
GPIO_InitStruct.Pin = ARDUINO_SCK_D13_Pin;
8004b22: 2302 movs r3, #2
8004b24: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004b26: 2302 movs r3, #2
8004b28: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004b2a: 2300 movs r3, #0
8004b2c: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004b2e: 2300 movs r3, #0
8004b30: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
8004b32: 2305 movs r3, #5
8004b34: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(ARDUINO_SCK_D13_GPIO_Port, &GPIO_InitStruct);
8004b36: f107 0314 add.w r3, r7, #20
8004b3a: 4619 mov r1, r3
8004b3c: 4815 ldr r0, [pc, #84] ; (8004b94 <HAL_SPI_MspInit+0xdc>)
8004b3e: f003 f85f bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_0;
8004b42: 2301 movs r3, #1
8004b44: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004b46: 2302 movs r3, #2
8004b48: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004b4a: 2300 movs r3, #0
8004b4c: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004b4e: 2303 movs r3, #3
8004b50: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
8004b52: 2305 movs r3, #5
8004b54: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
8004b56: f107 0314 add.w r3, r7, #20
8004b5a: 4619 mov r1, r3
8004b5c: 480d ldr r0, [pc, #52] ; (8004b94 <HAL_SPI_MspInit+0xdc>)
8004b5e: f003 f84f bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15;
8004b62: f44f 4340 mov.w r3, #49152 ; 0xc000
8004b66: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004b68: 2302 movs r3, #2
8004b6a: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004b6c: 2300 movs r3, #0
8004b6e: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004b70: 2303 movs r3, #3
8004b72: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
8004b74: 2305 movs r3, #5
8004b76: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8004b78: f107 0314 add.w r3, r7, #20
8004b7c: 4619 mov r1, r3
8004b7e: 4806 ldr r0, [pc, #24] ; (8004b98 <HAL_SPI_MspInit+0xe0>)
8004b80: f003 f83e bl 8007c00 <HAL_GPIO_Init>
/* USER CODE BEGIN SPI2_MspInit 1 */
/* USER CODE END SPI2_MspInit 1 */
}
}
8004b84: bf00 nop
8004b86: 3728 adds r7, #40 ; 0x28
8004b88: 46bd mov sp, r7
8004b8a: bd80 pop {r7, pc}
8004b8c: 40003800 .word 0x40003800
8004b90: 40023800 .word 0x40023800
8004b94: 40022000 .word 0x40022000
8004b98: 40020400 .word 0x40020400
08004b9c <HAL_TIM_Base_MspInit>:
* This function configures the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
8004b9c: b480 push {r7}
8004b9e: b089 sub sp, #36 ; 0x24
8004ba0: af00 add r7, sp, #0
8004ba2: 6078 str r0, [r7, #4]
if(htim_base->Instance==TIM1)
8004ba4: 687b ldr r3, [r7, #4]
8004ba6: 681b ldr r3, [r3, #0]
8004ba8: 4a2e ldr r2, [pc, #184] ; (8004c64 <HAL_TIM_Base_MspInit+0xc8>)
8004baa: 4293 cmp r3, r2
8004bac: d10c bne.n 8004bc8 <HAL_TIM_Base_MspInit+0x2c>
{
/* USER CODE BEGIN TIM1_MspInit 0 */
/* USER CODE END TIM1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM1_CLK_ENABLE();
8004bae: 4b2e ldr r3, [pc, #184] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004bb0: 6c5b ldr r3, [r3, #68] ; 0x44
8004bb2: 4a2d ldr r2, [pc, #180] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004bb4: f043 0301 orr.w r3, r3, #1
8004bb8: 6453 str r3, [r2, #68] ; 0x44
8004bba: 4b2b ldr r3, [pc, #172] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004bbc: 6c5b ldr r3, [r3, #68] ; 0x44
8004bbe: f003 0301 and.w r3, r3, #1
8004bc2: 61fb str r3, [r7, #28]
8004bc4: 69fb ldr r3, [r7, #28]
/* USER CODE BEGIN TIM8_MspInit 1 */
/* USER CODE END TIM8_MspInit 1 */
}
}
8004bc6: e046 b.n 8004c56 <HAL_TIM_Base_MspInit+0xba>
else if(htim_base->Instance==TIM2)
8004bc8: 687b ldr r3, [r7, #4]
8004bca: 681b ldr r3, [r3, #0]
8004bcc: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
8004bd0: d10c bne.n 8004bec <HAL_TIM_Base_MspInit+0x50>
__HAL_RCC_TIM2_CLK_ENABLE();
8004bd2: 4b25 ldr r3, [pc, #148] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004bd4: 6c1b ldr r3, [r3, #64] ; 0x40
8004bd6: 4a24 ldr r2, [pc, #144] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004bd8: f043 0301 orr.w r3, r3, #1
8004bdc: 6413 str r3, [r2, #64] ; 0x40
8004bde: 4b22 ldr r3, [pc, #136] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004be0: 6c1b ldr r3, [r3, #64] ; 0x40
8004be2: f003 0301 and.w r3, r3, #1
8004be6: 61bb str r3, [r7, #24]
8004be8: 69bb ldr r3, [r7, #24]
}
8004bea: e034 b.n 8004c56 <HAL_TIM_Base_MspInit+0xba>
else if(htim_base->Instance==TIM3)
8004bec: 687b ldr r3, [r7, #4]
8004bee: 681b ldr r3, [r3, #0]
8004bf0: 4a1e ldr r2, [pc, #120] ; (8004c6c <HAL_TIM_Base_MspInit+0xd0>)
8004bf2: 4293 cmp r3, r2
8004bf4: d10c bne.n 8004c10 <HAL_TIM_Base_MspInit+0x74>
__HAL_RCC_TIM3_CLK_ENABLE();
8004bf6: 4b1c ldr r3, [pc, #112] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004bf8: 6c1b ldr r3, [r3, #64] ; 0x40
8004bfa: 4a1b ldr r2, [pc, #108] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004bfc: f043 0302 orr.w r3, r3, #2
8004c00: 6413 str r3, [r2, #64] ; 0x40
8004c02: 4b19 ldr r3, [pc, #100] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004c04: 6c1b ldr r3, [r3, #64] ; 0x40
8004c06: f003 0302 and.w r3, r3, #2
8004c0a: 617b str r3, [r7, #20]
8004c0c: 697b ldr r3, [r7, #20]
}
8004c0e: e022 b.n 8004c56 <HAL_TIM_Base_MspInit+0xba>
else if(htim_base->Instance==TIM5)
8004c10: 687b ldr r3, [r7, #4]
8004c12: 681b ldr r3, [r3, #0]
8004c14: 4a16 ldr r2, [pc, #88] ; (8004c70 <HAL_TIM_Base_MspInit+0xd4>)
8004c16: 4293 cmp r3, r2
8004c18: d10c bne.n 8004c34 <HAL_TIM_Base_MspInit+0x98>
__HAL_RCC_TIM5_CLK_ENABLE();
8004c1a: 4b13 ldr r3, [pc, #76] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004c1c: 6c1b ldr r3, [r3, #64] ; 0x40
8004c1e: 4a12 ldr r2, [pc, #72] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004c20: f043 0308 orr.w r3, r3, #8
8004c24: 6413 str r3, [r2, #64] ; 0x40
8004c26: 4b10 ldr r3, [pc, #64] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004c28: 6c1b ldr r3, [r3, #64] ; 0x40
8004c2a: f003 0308 and.w r3, r3, #8
8004c2e: 613b str r3, [r7, #16]
8004c30: 693b ldr r3, [r7, #16]
}
8004c32: e010 b.n 8004c56 <HAL_TIM_Base_MspInit+0xba>
else if(htim_base->Instance==TIM8)
8004c34: 687b ldr r3, [r7, #4]
8004c36: 681b ldr r3, [r3, #0]
8004c38: 4a0e ldr r2, [pc, #56] ; (8004c74 <HAL_TIM_Base_MspInit+0xd8>)
8004c3a: 4293 cmp r3, r2
8004c3c: d10b bne.n 8004c56 <HAL_TIM_Base_MspInit+0xba>
__HAL_RCC_TIM8_CLK_ENABLE();
8004c3e: 4b0a ldr r3, [pc, #40] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004c40: 6c5b ldr r3, [r3, #68] ; 0x44
8004c42: 4a09 ldr r2, [pc, #36] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004c44: f043 0302 orr.w r3, r3, #2
8004c48: 6453 str r3, [r2, #68] ; 0x44
8004c4a: 4b07 ldr r3, [pc, #28] ; (8004c68 <HAL_TIM_Base_MspInit+0xcc>)
8004c4c: 6c5b ldr r3, [r3, #68] ; 0x44
8004c4e: f003 0302 and.w r3, r3, #2
8004c52: 60fb str r3, [r7, #12]
8004c54: 68fb ldr r3, [r7, #12]
}
8004c56: bf00 nop
8004c58: 3724 adds r7, #36 ; 0x24
8004c5a: 46bd mov sp, r7
8004c5c: f85d 7b04 ldr.w r7, [sp], #4
8004c60: 4770 bx lr
8004c62: bf00 nop
8004c64: 40010000 .word 0x40010000
8004c68: 40023800 .word 0x40023800
8004c6c: 40000400 .word 0x40000400
8004c70: 40000c00 .word 0x40000c00
8004c74: 40010400 .word 0x40010400
08004c78 <HAL_TIM_MspPostInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{
8004c78: b580 push {r7, lr}
8004c7a: b08a sub sp, #40 ; 0x28
8004c7c: af00 add r7, sp, #0
8004c7e: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8004c80: f107 0314 add.w r3, r7, #20
8004c84: 2200 movs r2, #0
8004c86: 601a str r2, [r3, #0]
8004c88: 605a str r2, [r3, #4]
8004c8a: 609a str r2, [r3, #8]
8004c8c: 60da str r2, [r3, #12]
8004c8e: 611a str r2, [r3, #16]
if(htim->Instance==TIM3)
8004c90: 687b ldr r3, [r7, #4]
8004c92: 681b ldr r3, [r3, #0]
8004c94: 4a22 ldr r2, [pc, #136] ; (8004d20 <HAL_TIM_MspPostInit+0xa8>)
8004c96: 4293 cmp r3, r2
8004c98: d11c bne.n 8004cd4 <HAL_TIM_MspPostInit+0x5c>
{
/* USER CODE BEGIN TIM3_MspPostInit 0 */
/* USER CODE END TIM3_MspPostInit 0 */
__HAL_RCC_GPIOB_CLK_ENABLE();
8004c9a: 4b22 ldr r3, [pc, #136] ; (8004d24 <HAL_TIM_MspPostInit+0xac>)
8004c9c: 6b1b ldr r3, [r3, #48] ; 0x30
8004c9e: 4a21 ldr r2, [pc, #132] ; (8004d24 <HAL_TIM_MspPostInit+0xac>)
8004ca0: f043 0302 orr.w r3, r3, #2
8004ca4: 6313 str r3, [r2, #48] ; 0x30
8004ca6: 4b1f ldr r3, [pc, #124] ; (8004d24 <HAL_TIM_MspPostInit+0xac>)
8004ca8: 6b1b ldr r3, [r3, #48] ; 0x30
8004caa: f003 0302 and.w r3, r3, #2
8004cae: 613b str r3, [r7, #16]
8004cb0: 693b ldr r3, [r7, #16]
/**TIM3 GPIO Configuration
PB4 ------> TIM3_CH1
*/
GPIO_InitStruct.Pin = GPIO_PIN_4;
8004cb2: 2310 movs r3, #16
8004cb4: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004cb6: 2302 movs r3, #2
8004cb8: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004cba: 2300 movs r3, #0
8004cbc: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004cbe: 2300 movs r3, #0
8004cc0: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
8004cc2: 2302 movs r3, #2
8004cc4: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8004cc6: f107 0314 add.w r3, r7, #20
8004cca: 4619 mov r1, r3
8004ccc: 4816 ldr r0, [pc, #88] ; (8004d28 <HAL_TIM_MspPostInit+0xb0>)
8004cce: f002 ff97 bl 8007c00 <HAL_GPIO_Init>
/* USER CODE BEGIN TIM8_MspPostInit 1 */
/* USER CODE END TIM8_MspPostInit 1 */
}
}
8004cd2: e020 b.n 8004d16 <HAL_TIM_MspPostInit+0x9e>
else if(htim->Instance==TIM8)
8004cd4: 687b ldr r3, [r7, #4]
8004cd6: 681b ldr r3, [r3, #0]
8004cd8: 4a14 ldr r2, [pc, #80] ; (8004d2c <HAL_TIM_MspPostInit+0xb4>)
8004cda: 4293 cmp r3, r2
8004cdc: d11b bne.n 8004d16 <HAL_TIM_MspPostInit+0x9e>
__HAL_RCC_GPIOI_CLK_ENABLE();
8004cde: 4b11 ldr r3, [pc, #68] ; (8004d24 <HAL_TIM_MspPostInit+0xac>)
8004ce0: 6b1b ldr r3, [r3, #48] ; 0x30
8004ce2: 4a10 ldr r2, [pc, #64] ; (8004d24 <HAL_TIM_MspPostInit+0xac>)
8004ce4: f443 7380 orr.w r3, r3, #256 ; 0x100
8004ce8: 6313 str r3, [r2, #48] ; 0x30
8004cea: 4b0e ldr r3, [pc, #56] ; (8004d24 <HAL_TIM_MspPostInit+0xac>)
8004cec: 6b1b ldr r3, [r3, #48] ; 0x30
8004cee: f403 7380 and.w r3, r3, #256 ; 0x100
8004cf2: 60fb str r3, [r7, #12]
8004cf4: 68fb ldr r3, [r7, #12]
GPIO_InitStruct.Pin = GPIO_PIN_2;
8004cf6: 2304 movs r3, #4
8004cf8: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004cfa: 2302 movs r3, #2
8004cfc: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004cfe: 2300 movs r3, #0
8004d00: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004d02: 2300 movs r3, #0
8004d04: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF3_TIM8;
8004d06: 2303 movs r3, #3
8004d08: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
8004d0a: f107 0314 add.w r3, r7, #20
8004d0e: 4619 mov r1, r3
8004d10: 4807 ldr r0, [pc, #28] ; (8004d30 <HAL_TIM_MspPostInit+0xb8>)
8004d12: f002 ff75 bl 8007c00 <HAL_GPIO_Init>
}
8004d16: bf00 nop
8004d18: 3728 adds r7, #40 ; 0x28
8004d1a: 46bd mov sp, r7
8004d1c: bd80 pop {r7, pc}
8004d1e: bf00 nop
8004d20: 40000400 .word 0x40000400
8004d24: 40023800 .word 0x40023800
8004d28: 40020400 .word 0x40020400
8004d2c: 40010400 .word 0x40010400
8004d30: 40022000 .word 0x40022000
08004d34 <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)
{
8004d34: b580 push {r7, lr}
8004d36: b08e sub sp, #56 ; 0x38
8004d38: af00 add r7, sp, #0
8004d3a: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8004d3c: f107 0324 add.w r3, r7, #36 ; 0x24
8004d40: 2200 movs r2, #0
8004d42: 601a str r2, [r3, #0]
8004d44: 605a str r2, [r3, #4]
8004d46: 609a str r2, [r3, #8]
8004d48: 60da str r2, [r3, #12]
8004d4a: 611a str r2, [r3, #16]
if(huart->Instance==UART7)
8004d4c: 687b ldr r3, [r7, #4]
8004d4e: 681b ldr r3, [r3, #0]
8004d50: 4a53 ldr r2, [pc, #332] ; (8004ea0 <HAL_UART_MspInit+0x16c>)
8004d52: 4293 cmp r3, r2
8004d54: d128 bne.n 8004da8 <HAL_UART_MspInit+0x74>
{
/* USER CODE BEGIN UART7_MspInit 0 */
/* USER CODE END UART7_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_UART7_CLK_ENABLE();
8004d56: 4b53 ldr r3, [pc, #332] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004d58: 6c1b ldr r3, [r3, #64] ; 0x40
8004d5a: 4a52 ldr r2, [pc, #328] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004d5c: f043 4380 orr.w r3, r3, #1073741824 ; 0x40000000
8004d60: 6413 str r3, [r2, #64] ; 0x40
8004d62: 4b50 ldr r3, [pc, #320] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004d64: 6c1b ldr r3, [r3, #64] ; 0x40
8004d66: f003 4380 and.w r3, r3, #1073741824 ; 0x40000000
8004d6a: 623b str r3, [r7, #32]
8004d6c: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOF_CLK_ENABLE();
8004d6e: 4b4d ldr r3, [pc, #308] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004d70: 6b1b ldr r3, [r3, #48] ; 0x30
8004d72: 4a4c ldr r2, [pc, #304] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004d74: f043 0320 orr.w r3, r3, #32
8004d78: 6313 str r3, [r2, #48] ; 0x30
8004d7a: 4b4a ldr r3, [pc, #296] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004d7c: 6b1b ldr r3, [r3, #48] ; 0x30
8004d7e: f003 0320 and.w r3, r3, #32
8004d82: 61fb str r3, [r7, #28]
8004d84: 69fb ldr r3, [r7, #28]
/**UART7 GPIO Configuration
PF7 ------> UART7_TX
PF6 ------> UART7_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_6;
8004d86: 23c0 movs r3, #192 ; 0xc0
8004d88: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004d8a: 2302 movs r3, #2
8004d8c: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004d8e: 2300 movs r3, #0
8004d90: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004d92: 2303 movs r3, #3
8004d94: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF8_UART7;
8004d96: 2308 movs r3, #8
8004d98: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
8004d9a: f107 0324 add.w r3, r7, #36 ; 0x24
8004d9e: 4619 mov r1, r3
8004da0: 4841 ldr r0, [pc, #260] ; (8004ea8 <HAL_UART_MspInit+0x174>)
8004da2: f002 ff2d bl 8007c00 <HAL_GPIO_Init>
/* USER CODE BEGIN USART6_MspInit 1 */
/* USER CODE END USART6_MspInit 1 */
}
}
8004da6: e077 b.n 8004e98 <HAL_UART_MspInit+0x164>
else if(huart->Instance==USART1)
8004da8: 687b ldr r3, [r7, #4]
8004daa: 681b ldr r3, [r3, #0]
8004dac: 4a3f ldr r2, [pc, #252] ; (8004eac <HAL_UART_MspInit+0x178>)
8004dae: 4293 cmp r3, r2
8004db0: d145 bne.n 8004e3e <HAL_UART_MspInit+0x10a>
__HAL_RCC_USART1_CLK_ENABLE();
8004db2: 4b3c ldr r3, [pc, #240] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004db4: 6c5b ldr r3, [r3, #68] ; 0x44
8004db6: 4a3b ldr r2, [pc, #236] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004db8: f043 0310 orr.w r3, r3, #16
8004dbc: 6453 str r3, [r2, #68] ; 0x44
8004dbe: 4b39 ldr r3, [pc, #228] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004dc0: 6c5b ldr r3, [r3, #68] ; 0x44
8004dc2: f003 0310 and.w r3, r3, #16
8004dc6: 61bb str r3, [r7, #24]
8004dc8: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOB_CLK_ENABLE();
8004dca: 4b36 ldr r3, [pc, #216] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004dcc: 6b1b ldr r3, [r3, #48] ; 0x30
8004dce: 4a35 ldr r2, [pc, #212] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004dd0: f043 0302 orr.w r3, r3, #2
8004dd4: 6313 str r3, [r2, #48] ; 0x30
8004dd6: 4b33 ldr r3, [pc, #204] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004dd8: 6b1b ldr r3, [r3, #48] ; 0x30
8004dda: f003 0302 and.w r3, r3, #2
8004dde: 617b str r3, [r7, #20]
8004de0: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOA_CLK_ENABLE();
8004de2: 4b30 ldr r3, [pc, #192] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004de4: 6b1b ldr r3, [r3, #48] ; 0x30
8004de6: 4a2f ldr r2, [pc, #188] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004de8: f043 0301 orr.w r3, r3, #1
8004dec: 6313 str r3, [r2, #48] ; 0x30
8004dee: 4b2d ldr r3, [pc, #180] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004df0: 6b1b ldr r3, [r3, #48] ; 0x30
8004df2: f003 0301 and.w r3, r3, #1
8004df6: 613b str r3, [r7, #16]
8004df8: 693b ldr r3, [r7, #16]
GPIO_InitStruct.Pin = VCP_RX_Pin;
8004dfa: 2380 movs r3, #128 ; 0x80
8004dfc: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004dfe: 2302 movs r3, #2
8004e00: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004e02: 2300 movs r3, #0
8004e04: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004e06: 2300 movs r3, #0
8004e08: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
8004e0a: 2307 movs r3, #7
8004e0c: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(VCP_RX_GPIO_Port, &GPIO_InitStruct);
8004e0e: f107 0324 add.w r3, r7, #36 ; 0x24
8004e12: 4619 mov r1, r3
8004e14: 4826 ldr r0, [pc, #152] ; (8004eb0 <HAL_UART_MspInit+0x17c>)
8004e16: f002 fef3 bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = VCP_TX_Pin;
8004e1a: f44f 7300 mov.w r3, #512 ; 0x200
8004e1e: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004e20: 2302 movs r3, #2
8004e22: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004e24: 2300 movs r3, #0
8004e26: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004e28: 2300 movs r3, #0
8004e2a: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
8004e2c: 2307 movs r3, #7
8004e2e: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(VCP_TX_GPIO_Port, &GPIO_InitStruct);
8004e30: f107 0324 add.w r3, r7, #36 ; 0x24
8004e34: 4619 mov r1, r3
8004e36: 481f ldr r0, [pc, #124] ; (8004eb4 <HAL_UART_MspInit+0x180>)
8004e38: f002 fee2 bl 8007c00 <HAL_GPIO_Init>
}
8004e3c: e02c b.n 8004e98 <HAL_UART_MspInit+0x164>
else if(huart->Instance==USART6)
8004e3e: 687b ldr r3, [r7, #4]
8004e40: 681b ldr r3, [r3, #0]
8004e42: 4a1d ldr r2, [pc, #116] ; (8004eb8 <HAL_UART_MspInit+0x184>)
8004e44: 4293 cmp r3, r2
8004e46: d127 bne.n 8004e98 <HAL_UART_MspInit+0x164>
__HAL_RCC_USART6_CLK_ENABLE();
8004e48: 4b16 ldr r3, [pc, #88] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004e4a: 6c5b ldr r3, [r3, #68] ; 0x44
8004e4c: 4a15 ldr r2, [pc, #84] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004e4e: f043 0320 orr.w r3, r3, #32
8004e52: 6453 str r3, [r2, #68] ; 0x44
8004e54: 4b13 ldr r3, [pc, #76] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004e56: 6c5b ldr r3, [r3, #68] ; 0x44
8004e58: f003 0320 and.w r3, r3, #32
8004e5c: 60fb str r3, [r7, #12]
8004e5e: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOC_CLK_ENABLE();
8004e60: 4b10 ldr r3, [pc, #64] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004e62: 6b1b ldr r3, [r3, #48] ; 0x30
8004e64: 4a0f ldr r2, [pc, #60] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004e66: f043 0304 orr.w r3, r3, #4
8004e6a: 6313 str r3, [r2, #48] ; 0x30
8004e6c: 4b0d ldr r3, [pc, #52] ; (8004ea4 <HAL_UART_MspInit+0x170>)
8004e6e: 6b1b ldr r3, [r3, #48] ; 0x30
8004e70: f003 0304 and.w r3, r3, #4
8004e74: 60bb str r3, [r7, #8]
8004e76: 68bb ldr r3, [r7, #8]
GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_6;
8004e78: 23c0 movs r3, #192 ; 0xc0
8004e7a: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004e7c: 2302 movs r3, #2
8004e7e: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004e80: 2300 movs r3, #0
8004e82: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004e84: 2303 movs r3, #3
8004e86: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF8_USART6;
8004e88: 2308 movs r3, #8
8004e8a: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8004e8c: f107 0324 add.w r3, r7, #36 ; 0x24
8004e90: 4619 mov r1, r3
8004e92: 480a ldr r0, [pc, #40] ; (8004ebc <HAL_UART_MspInit+0x188>)
8004e94: f002 feb4 bl 8007c00 <HAL_GPIO_Init>
}
8004e98: bf00 nop
8004e9a: 3738 adds r7, #56 ; 0x38
8004e9c: 46bd mov sp, r7
8004e9e: bd80 pop {r7, pc}
8004ea0: 40007800 .word 0x40007800
8004ea4: 40023800 .word 0x40023800
8004ea8: 40021400 .word 0x40021400
8004eac: 40011000 .word 0x40011000
8004eb0: 40020400 .word 0x40020400
8004eb4: 40020000 .word 0x40020000
8004eb8: 40011400 .word 0x40011400
8004ebc: 40020800 .word 0x40020800
08004ec0 <HAL_FMC_MspInit>:
}
static uint32_t FMC_Initialized = 0;
static void HAL_FMC_MspInit(void){
8004ec0: b580 push {r7, lr}
8004ec2: b086 sub sp, #24
8004ec4: af00 add r7, sp, #0
/* USER CODE BEGIN FMC_MspInit 0 */
/* USER CODE END FMC_MspInit 0 */
GPIO_InitTypeDef GPIO_InitStruct ={0};
8004ec6: 1d3b adds r3, r7, #4
8004ec8: 2200 movs r2, #0
8004eca: 601a str r2, [r3, #0]
8004ecc: 605a str r2, [r3, #4]
8004ece: 609a str r2, [r3, #8]
8004ed0: 60da str r2, [r3, #12]
8004ed2: 611a str r2, [r3, #16]
if (FMC_Initialized) {
8004ed4: 4b3a ldr r3, [pc, #232] ; (8004fc0 <HAL_FMC_MspInit+0x100>)
8004ed6: 681b ldr r3, [r3, #0]
8004ed8: 2b00 cmp r3, #0
8004eda: d16d bne.n 8004fb8 <HAL_FMC_MspInit+0xf8>
return;
}
FMC_Initialized = 1;
8004edc: 4b38 ldr r3, [pc, #224] ; (8004fc0 <HAL_FMC_MspInit+0x100>)
8004ede: 2201 movs r2, #1
8004ee0: 601a str r2, [r3, #0]
/* Peripheral clock enable */
__HAL_RCC_FMC_CLK_ENABLE();
8004ee2: 4b38 ldr r3, [pc, #224] ; (8004fc4 <HAL_FMC_MspInit+0x104>)
8004ee4: 6b9b ldr r3, [r3, #56] ; 0x38
8004ee6: 4a37 ldr r2, [pc, #220] ; (8004fc4 <HAL_FMC_MspInit+0x104>)
8004ee8: f043 0301 orr.w r3, r3, #1
8004eec: 6393 str r3, [r2, #56] ; 0x38
8004eee: 4b35 ldr r3, [pc, #212] ; (8004fc4 <HAL_FMC_MspInit+0x104>)
8004ef0: 6b9b ldr r3, [r3, #56] ; 0x38
8004ef2: f003 0301 and.w r3, r3, #1
8004ef6: 603b str r3, [r7, #0]
8004ef8: 683b ldr r3, [r7, #0]
PE10 ------> FMC_D7
PE12 ------> FMC_D9
PE15 ------> FMC_D12
PE13 ------> FMC_D10
*/
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_0|GPIO_PIN_8|GPIO_PIN_9
8004efa: f64f 7383 movw r3, #65411 ; 0xff83
8004efe: 607b str r3, [r7, #4]
|GPIO_PIN_11|GPIO_PIN_14|GPIO_PIN_7|GPIO_PIN_10
|GPIO_PIN_12|GPIO_PIN_15|GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004f00: 2302 movs r3, #2
8004f02: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004f04: 2300 movs r3, #0
8004f06: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004f08: 2303 movs r3, #3
8004f0a: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004f0c: 230c movs r3, #12
8004f0e: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
8004f10: 1d3b adds r3, r7, #4
8004f12: 4619 mov r1, r3
8004f14: 482c ldr r0, [pc, #176] ; (8004fc8 <HAL_FMC_MspInit+0x108>)
8004f16: f002 fe73 bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_15|GPIO_PIN_8|GPIO_PIN_1|GPIO_PIN_0
8004f1a: f248 1333 movw r3, #33075 ; 0x8133
8004f1e: 607b str r3, [r7, #4]
|GPIO_PIN_5|GPIO_PIN_4;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004f20: 2302 movs r3, #2
8004f22: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004f24: 2300 movs r3, #0
8004f26: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004f28: 2303 movs r3, #3
8004f2a: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004f2c: 230c movs r3, #12
8004f2e: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
8004f30: 1d3b adds r3, r7, #4
8004f32: 4619 mov r1, r3
8004f34: 4825 ldr r0, [pc, #148] ; (8004fcc <HAL_FMC_MspInit+0x10c>)
8004f36: f002 fe63 bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_15|GPIO_PIN_10
8004f3a: f24c 7303 movw r3, #50947 ; 0xc703
8004f3e: 607b str r3, [r7, #4]
|GPIO_PIN_14|GPIO_PIN_9|GPIO_PIN_8;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004f40: 2302 movs r3, #2
8004f42: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004f44: 2300 movs r3, #0
8004f46: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004f48: 2303 movs r3, #3
8004f4a: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004f4c: 230c movs r3, #12
8004f4e: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
8004f50: 1d3b adds r3, r7, #4
8004f52: 4619 mov r1, r3
8004f54: 481e ldr r0, [pc, #120] ; (8004fd0 <HAL_FMC_MspInit+0x110>)
8004f56: f002 fe53 bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
8004f5a: f64f 033f movw r3, #63551 ; 0xf83f
8004f5e: 607b str r3, [r7, #4]
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_12|GPIO_PIN_15
|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_11;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004f60: 2302 movs r3, #2
8004f62: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004f64: 2300 movs r3, #0
8004f66: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004f68: 2303 movs r3, #3
8004f6a: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004f6c: 230c movs r3, #12
8004f6e: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
8004f70: 1d3b adds r3, r7, #4
8004f72: 4619 mov r1, r3
8004f74: 4817 ldr r0, [pc, #92] ; (8004fd4 <HAL_FMC_MspInit+0x114>)
8004f76: f002 fe43 bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_3;
8004f7a: 2328 movs r3, #40 ; 0x28
8004f7c: 607b str r3, [r7, #4]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004f7e: 2302 movs r3, #2
8004f80: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004f82: 2300 movs r3, #0
8004f84: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004f86: 2303 movs r3, #3
8004f88: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004f8a: 230c movs r3, #12
8004f8c: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
8004f8e: 1d3b adds r3, r7, #4
8004f90: 4619 mov r1, r3
8004f92: 4811 ldr r0, [pc, #68] ; (8004fd8 <HAL_FMC_MspInit+0x118>)
8004f94: f002 fe34 bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_3;
8004f98: 2308 movs r3, #8
8004f9a: 607b str r3, [r7, #4]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004f9c: 2302 movs r3, #2
8004f9e: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004fa0: 2300 movs r3, #0
8004fa2: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004fa4: 2303 movs r3, #3
8004fa6: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004fa8: 230c movs r3, #12
8004faa: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8004fac: 1d3b adds r3, r7, #4
8004fae: 4619 mov r1, r3
8004fb0: 480a ldr r0, [pc, #40] ; (8004fdc <HAL_FMC_MspInit+0x11c>)
8004fb2: f002 fe25 bl 8007c00 <HAL_GPIO_Init>
8004fb6: e000 b.n 8004fba <HAL_FMC_MspInit+0xfa>
return;
8004fb8: bf00 nop
/* USER CODE BEGIN FMC_MspInit 1 */
/* USER CODE END FMC_MspInit 1 */
}
8004fba: 3718 adds r7, #24
8004fbc: 46bd mov sp, r7
8004fbe: bd80 pop {r7, pc}
8004fc0: 2000057c .word 0x2000057c
8004fc4: 40023800 .word 0x40023800
8004fc8: 40021000 .word 0x40021000
8004fcc: 40021800 .word 0x40021800
8004fd0: 40020c00 .word 0x40020c00
8004fd4: 40021400 .word 0x40021400
8004fd8: 40021c00 .word 0x40021c00
8004fdc: 40020800 .word 0x40020800
08004fe0 <HAL_SDRAM_MspInit>:
void HAL_SDRAM_MspInit(SDRAM_HandleTypeDef* hsdram){
8004fe0: b580 push {r7, lr}
8004fe2: b082 sub sp, #8
8004fe4: af00 add r7, sp, #0
8004fe6: 6078 str r0, [r7, #4]
/* USER CODE BEGIN SDRAM_MspInit 0 */
/* USER CODE END SDRAM_MspInit 0 */
HAL_FMC_MspInit();
8004fe8: f7ff ff6a bl 8004ec0 <HAL_FMC_MspInit>
/* USER CODE BEGIN SDRAM_MspInit 1 */
/* USER CODE END SDRAM_MspInit 1 */
}
8004fec: bf00 nop
8004fee: 3708 adds r7, #8
8004ff0: 46bd mov sp, r7
8004ff2: bd80 pop {r7, pc}
08004ff4 <HAL_InitTick>:
* reset by HAL_Init() or at any time when clock is configured, by HAL_RCC_ClockConfig().
* @param TickPriority: Tick interrupt priority.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
8004ff4: b580 push {r7, lr}
8004ff6: b08c sub sp, #48 ; 0x30
8004ff8: af00 add r7, sp, #0
8004ffa: 6078 str r0, [r7, #4]
RCC_ClkInitTypeDef clkconfig;
uint32_t uwTimclock = 0;
8004ffc: 2300 movs r3, #0
8004ffe: 62fb str r3, [r7, #44] ; 0x2c
uint32_t uwPrescalerValue = 0;
8005000: 2300 movs r3, #0
8005002: 62bb str r3, [r7, #40] ; 0x28
uint32_t pFLatency;
/*Configure the TIM6 IRQ priority */
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0);
8005004: 2200 movs r2, #0
8005006: 6879 ldr r1, [r7, #4]
8005008: 2036 movs r0, #54 ; 0x36
800500a: f000 fe49 bl 8005ca0 <HAL_NVIC_SetPriority>
/* Enable the TIM6 global Interrupt */
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
800500e: 2036 movs r0, #54 ; 0x36
8005010: f000 fe62 bl 8005cd8 <HAL_NVIC_EnableIRQ>
/* Enable TIM6 clock */
__HAL_RCC_TIM6_CLK_ENABLE();
8005014: 4b1f ldr r3, [pc, #124] ; (8005094 <HAL_InitTick+0xa0>)
8005016: 6c1b ldr r3, [r3, #64] ; 0x40
8005018: 4a1e ldr r2, [pc, #120] ; (8005094 <HAL_InitTick+0xa0>)
800501a: f043 0310 orr.w r3, r3, #16
800501e: 6413 str r3, [r2, #64] ; 0x40
8005020: 4b1c ldr r3, [pc, #112] ; (8005094 <HAL_InitTick+0xa0>)
8005022: 6c1b ldr r3, [r3, #64] ; 0x40
8005024: f003 0310 and.w r3, r3, #16
8005028: 60fb str r3, [r7, #12]
800502a: 68fb ldr r3, [r7, #12]
/* Get clock configuration */
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
800502c: f107 0210 add.w r2, r7, #16
8005030: f107 0314 add.w r3, r7, #20
8005034: 4611 mov r1, r2
8005036: 4618 mov r0, r3
8005038: f004 fec6 bl 8009dc8 <HAL_RCC_GetClockConfig>
/* Compute TIM6 clock */
uwTimclock = 2*HAL_RCC_GetPCLK1Freq();
800503c: f004 fe9c bl 8009d78 <HAL_RCC_GetPCLK1Freq>
8005040: 4603 mov r3, r0
8005042: 005b lsls r3, r3, #1
8005044: 62fb str r3, [r7, #44] ; 0x2c
/* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */
uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
8005046: 6afb ldr r3, [r7, #44] ; 0x2c
8005048: 4a13 ldr r2, [pc, #76] ; (8005098 <HAL_InitTick+0xa4>)
800504a: fba2 2303 umull r2, r3, r2, r3
800504e: 0c9b lsrs r3, r3, #18
8005050: 3b01 subs r3, #1
8005052: 62bb str r3, [r7, #40] ; 0x28
/* Initialize TIM6 */
htim6.Instance = TIM6;
8005054: 4b11 ldr r3, [pc, #68] ; (800509c <HAL_InitTick+0xa8>)
8005056: 4a12 ldr r2, [pc, #72] ; (80050a0 <HAL_InitTick+0xac>)
8005058: 601a str r2, [r3, #0]
+ Period = [(TIM6CLK/1000) - 1]. to have a (1/1000) s time base.
+ Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock.
+ ClockDivision = 0
+ Counter direction = Up
*/
htim6.Init.Period = (1000000U / 1000U) - 1U;
800505a: 4b10 ldr r3, [pc, #64] ; (800509c <HAL_InitTick+0xa8>)
800505c: f240 32e7 movw r2, #999 ; 0x3e7
8005060: 60da str r2, [r3, #12]
htim6.Init.Prescaler = uwPrescalerValue;
8005062: 4a0e ldr r2, [pc, #56] ; (800509c <HAL_InitTick+0xa8>)
8005064: 6abb ldr r3, [r7, #40] ; 0x28
8005066: 6053 str r3, [r2, #4]
htim6.Init.ClockDivision = 0;
8005068: 4b0c ldr r3, [pc, #48] ; (800509c <HAL_InitTick+0xa8>)
800506a: 2200 movs r2, #0
800506c: 611a str r2, [r3, #16]
htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
800506e: 4b0b ldr r3, [pc, #44] ; (800509c <HAL_InitTick+0xa8>)
8005070: 2200 movs r2, #0
8005072: 609a str r2, [r3, #8]
if(HAL_TIM_Base_Init(&htim6) == HAL_OK)
8005074: 4809 ldr r0, [pc, #36] ; (800509c <HAL_InitTick+0xa8>)
8005076: f005 ffc4 bl 800b002 <HAL_TIM_Base_Init>
800507a: 4603 mov r3, r0
800507c: 2b00 cmp r3, #0
800507e: d104 bne.n 800508a <HAL_InitTick+0x96>
{
/* Start the TIM time Base generation in interrupt mode */
return HAL_TIM_Base_Start_IT(&htim6);
8005080: 4806 ldr r0, [pc, #24] ; (800509c <HAL_InitTick+0xa8>)
8005082: f005 ffe9 bl 800b058 <HAL_TIM_Base_Start_IT>
8005086: 4603 mov r3, r0
8005088: e000 b.n 800508c <HAL_InitTick+0x98>
}
/* Return function status */
return HAL_ERROR;
800508a: 2301 movs r3, #1
}
800508c: 4618 mov r0, r3
800508e: 3730 adds r7, #48 ; 0x30
8005090: 46bd mov sp, r7
8005092: bd80 pop {r7, pc}
8005094: 40023800 .word 0x40023800
8005098: 431bde83 .word 0x431bde83
800509c: 20008f4c .word 0x20008f4c
80050a0: 40001000 .word 0x40001000
080050a4 <NMI_Handler>:
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
80050a4: b480 push {r7}
80050a6: 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)
80050a8: e7fe b.n 80050a8 <NMI_Handler+0x4>
080050aa <HardFault_Handler>:
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
80050aa: b480 push {r7}
80050ac: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
80050ae: e7fe b.n 80050ae <HardFault_Handler+0x4>
080050b0 <MemManage_Handler>:
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
80050b0: b480 push {r7}
80050b2: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
80050b4: e7fe b.n 80050b4 <MemManage_Handler+0x4>
080050b6 <BusFault_Handler>:
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
80050b6: b480 push {r7}
80050b8: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
80050ba: e7fe b.n 80050ba <BusFault_Handler+0x4>
080050bc <UsageFault_Handler>:
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
80050bc: b480 push {r7}
80050be: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
80050c0: e7fe b.n 80050c0 <UsageFault_Handler+0x4>
080050c2 <DebugMon_Handler>:
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
80050c2: b480 push {r7}
80050c4: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
80050c6: bf00 nop
80050c8: 46bd mov sp, r7
80050ca: f85d 7b04 ldr.w r7, [sp], #4
80050ce: 4770 bx lr
080050d0 <TIM6_DAC_IRQHandler>:
/**
* @brief This function handles TIM6 global interrupt, DAC1 and DAC2 underrun error interrupts.
*/
void TIM6_DAC_IRQHandler(void)
{
80050d0: b580 push {r7, lr}
80050d2: af00 add r7, sp, #0
/* USER CODE BEGIN TIM6_DAC_IRQn 0 */
/* USER CODE END TIM6_DAC_IRQn 0 */
HAL_DAC_IRQHandler(&hdac);
80050d4: 4803 ldr r0, [pc, #12] ; (80050e4 <TIM6_DAC_IRQHandler+0x14>)
80050d6: f000 ff19 bl 8005f0c <HAL_DAC_IRQHandler>
HAL_TIM_IRQHandler(&htim6);
80050da: 4803 ldr r0, [pc, #12] ; (80050e8 <TIM6_DAC_IRQHandler+0x18>)
80050dc: f006 f81b bl 800b116 <HAL_TIM_IRQHandler>
/* USER CODE BEGIN TIM6_DAC_IRQn 1 */
/* USER CODE END TIM6_DAC_IRQn 1 */
}
80050e0: bf00 nop
80050e2: bd80 pop {r7, pc}
80050e4: 20008ca8 .word 0x20008ca8
80050e8: 20008f4c .word 0x20008f4c
080050ec <ETH_IRQHandler>:
/**
* @brief This function handles Ethernet global interrupt.
*/
void ETH_IRQHandler(void)
{
80050ec: b580 push {r7, lr}
80050ee: af00 add r7, sp, #0
/* USER CODE BEGIN ETH_IRQn 0 */
/* USER CODE END ETH_IRQn 0 */
HAL_ETH_IRQHandler(&heth);
80050f0: 4802 ldr r0, [pc, #8] ; (80050fc <ETH_IRQHandler+0x10>)
80050f2: f001 ffe3 bl 80070bc <HAL_ETH_IRQHandler>
/* USER CODE BEGIN ETH_IRQn 1 */
/* USER CODE END ETH_IRQn 1 */
}
80050f6: bf00 nop
80050f8: bd80 pop {r7, pc}
80050fa: bf00 nop
80050fc: 2000a8ac .word 0x2000a8ac
08005100 <LTDC_IRQHandler>:
/**
* @brief This function handles LTDC global interrupt.
*/
void LTDC_IRQHandler(void)
{
8005100: b580 push {r7, lr}
8005102: af00 add r7, sp, #0
/* USER CODE BEGIN LTDC_IRQn 0 */
/* USER CODE END LTDC_IRQn 0 */
HAL_LTDC_IRQHandler(&hltdc);
8005104: 4802 ldr r0, [pc, #8] ; (8005110 <LTDC_IRQHandler+0x10>)
8005106: f003 fee1 bl 8008ecc <HAL_LTDC_IRQHandler>
/* USER CODE BEGIN LTDC_IRQn 1 */
/* USER CODE END LTDC_IRQn 1 */
}
800510a: bf00 nop
800510c: bd80 pop {r7, pc}
800510e: bf00 nop
8005110: 20008ae4 .word 0x20008ae4
08005114 <_read>:
_kill(status, -1);
while (1) {} /* Make sure we hang here */
}
__attribute__((weak)) int _read(int file, char *ptr, int len)
{
8005114: b580 push {r7, lr}
8005116: b086 sub sp, #24
8005118: af00 add r7, sp, #0
800511a: 60f8 str r0, [r7, #12]
800511c: 60b9 str r1, [r7, #8]
800511e: 607a str r2, [r7, #4]
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
8005120: 2300 movs r3, #0
8005122: 617b str r3, [r7, #20]
8005124: e00a b.n 800513c <_read+0x28>
{
*ptr++ = __io_getchar();
8005126: f3af 8000 nop.w
800512a: 4601 mov r1, r0
800512c: 68bb ldr r3, [r7, #8]
800512e: 1c5a adds r2, r3, #1
8005130: 60ba str r2, [r7, #8]
8005132: b2ca uxtb r2, r1
8005134: 701a strb r2, [r3, #0]
for (DataIdx = 0; DataIdx < len; DataIdx++)
8005136: 697b ldr r3, [r7, #20]
8005138: 3301 adds r3, #1
800513a: 617b str r3, [r7, #20]
800513c: 697a ldr r2, [r7, #20]
800513e: 687b ldr r3, [r7, #4]
8005140: 429a cmp r2, r3
8005142: dbf0 blt.n 8005126 <_read+0x12>
}
return len;
8005144: 687b ldr r3, [r7, #4]
}
8005146: 4618 mov r0, r3
8005148: 3718 adds r7, #24
800514a: 46bd mov sp, r7
800514c: bd80 pop {r7, pc}
0800514e <_write>:
__attribute__((weak)) int _write(int file, char *ptr, int len)
{
800514e: b580 push {r7, lr}
8005150: b086 sub sp, #24
8005152: af00 add r7, sp, #0
8005154: 60f8 str r0, [r7, #12]
8005156: 60b9 str r1, [r7, #8]
8005158: 607a str r2, [r7, #4]
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
800515a: 2300 movs r3, #0
800515c: 617b str r3, [r7, #20]
800515e: e009 b.n 8005174 <_write+0x26>
{
__io_putchar(*ptr++);
8005160: 68bb ldr r3, [r7, #8]
8005162: 1c5a adds r2, r3, #1
8005164: 60ba str r2, [r7, #8]
8005166: 781b ldrb r3, [r3, #0]
8005168: 4618 mov r0, r3
800516a: f3af 8000 nop.w
for (DataIdx = 0; DataIdx < len; DataIdx++)
800516e: 697b ldr r3, [r7, #20]
8005170: 3301 adds r3, #1
8005172: 617b str r3, [r7, #20]
8005174: 697a ldr r2, [r7, #20]
8005176: 687b ldr r3, [r7, #4]
8005178: 429a cmp r2, r3
800517a: dbf1 blt.n 8005160 <_write+0x12>
}
return len;
800517c: 687b ldr r3, [r7, #4]
}
800517e: 4618 mov r0, r3
8005180: 3718 adds r7, #24
8005182: 46bd mov sp, r7
8005184: bd80 pop {r7, pc}
08005186 <_close>:
int _close(int file)
{
8005186: b480 push {r7}
8005188: b083 sub sp, #12
800518a: af00 add r7, sp, #0
800518c: 6078 str r0, [r7, #4]
return -1;
800518e: f04f 33ff mov.w r3, #4294967295
}
8005192: 4618 mov r0, r3
8005194: 370c adds r7, #12
8005196: 46bd mov sp, r7
8005198: f85d 7b04 ldr.w r7, [sp], #4
800519c: 4770 bx lr
0800519e <_fstat>:
int _fstat(int file, struct stat *st)
{
800519e: b480 push {r7}
80051a0: b083 sub sp, #12
80051a2: af00 add r7, sp, #0
80051a4: 6078 str r0, [r7, #4]
80051a6: 6039 str r1, [r7, #0]
st->st_mode = S_IFCHR;
80051a8: 683b ldr r3, [r7, #0]
80051aa: f44f 5200 mov.w r2, #8192 ; 0x2000
80051ae: 605a str r2, [r3, #4]
return 0;
80051b0: 2300 movs r3, #0
}
80051b2: 4618 mov r0, r3
80051b4: 370c adds r7, #12
80051b6: 46bd mov sp, r7
80051b8: f85d 7b04 ldr.w r7, [sp], #4
80051bc: 4770 bx lr
080051be <_isatty>:
int _isatty(int file)
{
80051be: b480 push {r7}
80051c0: b083 sub sp, #12
80051c2: af00 add r7, sp, #0
80051c4: 6078 str r0, [r7, #4]
return 1;
80051c6: 2301 movs r3, #1
}
80051c8: 4618 mov r0, r3
80051ca: 370c adds r7, #12
80051cc: 46bd mov sp, r7
80051ce: f85d 7b04 ldr.w r7, [sp], #4
80051d2: 4770 bx lr
080051d4 <_lseek>:
int _lseek(int file, int ptr, int dir)
{
80051d4: b480 push {r7}
80051d6: b085 sub sp, #20
80051d8: af00 add r7, sp, #0
80051da: 60f8 str r0, [r7, #12]
80051dc: 60b9 str r1, [r7, #8]
80051de: 607a str r2, [r7, #4]
return 0;
80051e0: 2300 movs r3, #0
}
80051e2: 4618 mov r0, r3
80051e4: 3714 adds r7, #20
80051e6: 46bd mov sp, r7
80051e8: f85d 7b04 ldr.w r7, [sp], #4
80051ec: 4770 bx lr
...
080051f0 <_sbrk>:
*
* @param incr Memory size
* @return Pointer to allocated memory
*/
void *_sbrk(ptrdiff_t incr)
{
80051f0: b480 push {r7}
80051f2: b087 sub sp, #28
80051f4: af00 add r7, sp, #0
80051f6: 6078 str r0, [r7, #4]
extern uint8_t _end; /* Symbol defined in the linker script */
extern uint8_t _estack; /* Symbol defined in the linker script */
extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
80051f8: 4a14 ldr r2, [pc, #80] ; (800524c <_sbrk+0x5c>)
80051fa: 4b15 ldr r3, [pc, #84] ; (8005250 <_sbrk+0x60>)
80051fc: 1ad3 subs r3, r2, r3
80051fe: 617b str r3, [r7, #20]
const uint8_t *max_heap = (uint8_t *)stack_limit;
8005200: 697b ldr r3, [r7, #20]
8005202: 613b str r3, [r7, #16]
uint8_t *prev_heap_end;
/* Initialize heap end at first call */
if (NULL == __sbrk_heap_end)
8005204: 4b13 ldr r3, [pc, #76] ; (8005254 <_sbrk+0x64>)
8005206: 681b ldr r3, [r3, #0]
8005208: 2b00 cmp r3, #0
800520a: d102 bne.n 8005212 <_sbrk+0x22>
{
__sbrk_heap_end = &_end;
800520c: 4b11 ldr r3, [pc, #68] ; (8005254 <_sbrk+0x64>)
800520e: 4a12 ldr r2, [pc, #72] ; (8005258 <_sbrk+0x68>)
8005210: 601a str r2, [r3, #0]
}
/* Protect heap from growing into the reserved MSP stack */
if (__sbrk_heap_end + incr > max_heap)
8005212: 4b10 ldr r3, [pc, #64] ; (8005254 <_sbrk+0x64>)
8005214: 681a ldr r2, [r3, #0]
8005216: 687b ldr r3, [r7, #4]
8005218: 4413 add r3, r2
800521a: 693a ldr r2, [r7, #16]
800521c: 429a cmp r2, r3
800521e: d205 bcs.n 800522c <_sbrk+0x3c>
{
errno = ENOMEM;
8005220: 4b0e ldr r3, [pc, #56] ; (800525c <_sbrk+0x6c>)
8005222: 220c movs r2, #12
8005224: 601a str r2, [r3, #0]
return (void *)-1;
8005226: f04f 33ff mov.w r3, #4294967295
800522a: e009 b.n 8005240 <_sbrk+0x50>
}
prev_heap_end = __sbrk_heap_end;
800522c: 4b09 ldr r3, [pc, #36] ; (8005254 <_sbrk+0x64>)
800522e: 681b ldr r3, [r3, #0]
8005230: 60fb str r3, [r7, #12]
__sbrk_heap_end += incr;
8005232: 4b08 ldr r3, [pc, #32] ; (8005254 <_sbrk+0x64>)
8005234: 681a ldr r2, [r3, #0]
8005236: 687b ldr r3, [r7, #4]
8005238: 4413 add r3, r2
800523a: 4a06 ldr r2, [pc, #24] ; (8005254 <_sbrk+0x64>)
800523c: 6013 str r3, [r2, #0]
return (void *)prev_heap_end;
800523e: 68fb ldr r3, [r7, #12]
}
8005240: 4618 mov r0, r3
8005242: 371c adds r7, #28
8005244: 46bd mov sp, r7
8005246: f85d 7b04 ldr.w r7, [sp], #4
800524a: 4770 bx lr
800524c: 20050000 .word 0x20050000
8005250: 00000400 .word 0x00000400
8005254: 20000580 .word 0x20000580
8005258: 2000f848 .word 0x2000f848
800525c: 2000f840 .word 0x2000f840
08005260 <SystemInit>:
* SystemFrequency variable.
* @param None
* @retval None
*/
void SystemInit(void)
{
8005260: b480 push {r7}
8005262: af00 add r7, sp, #0
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
8005264: 4b08 ldr r3, [pc, #32] ; (8005288 <SystemInit+0x28>)
8005266: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800526a: 4a07 ldr r2, [pc, #28] ; (8005288 <SystemInit+0x28>)
800526c: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
8005270: f8c2 3088 str.w r3, [r2, #136] ; 0x88
/* Configure the Vector Table location add offset address ------------------*/
#ifdef VECT_TAB_SRAM
SCB->VTOR = RAMDTCM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
8005274: 4b04 ldr r3, [pc, #16] ; (8005288 <SystemInit+0x28>)
8005276: f04f 6200 mov.w r2, #134217728 ; 0x8000000
800527a: 609a str r2, [r3, #8]
#endif
}
800527c: bf00 nop
800527e: 46bd mov sp, r7
8005280: f85d 7b04 ldr.w r7, [sp], #4
8005284: 4770 bx lr
8005286: bf00 nop
8005288: e000ed00 .word 0xe000ed00
0800528c <Reset_Handler>:
*/
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler: ldr sp, =_estack /* set stack pointer */
800528c: f8df d034 ldr.w sp, [pc, #52] ; 80052c4 <LoopFillZerobss+0x14>
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
8005290: 2100 movs r1, #0
b LoopCopyDataInit
8005292: e003 b.n 800529c <LoopCopyDataInit>
08005294 <CopyDataInit>:
CopyDataInit:
ldr r3, =_sidata
8005294: 4b0c ldr r3, [pc, #48] ; (80052c8 <LoopFillZerobss+0x18>)
ldr r3, [r3, r1]
8005296: 585b ldr r3, [r3, r1]
str r3, [r0, r1]
8005298: 5043 str r3, [r0, r1]
adds r1, r1, #4
800529a: 3104 adds r1, #4
0800529c <LoopCopyDataInit>:
LoopCopyDataInit:
ldr r0, =_sdata
800529c: 480b ldr r0, [pc, #44] ; (80052cc <LoopFillZerobss+0x1c>)
ldr r3, =_edata
800529e: 4b0c ldr r3, [pc, #48] ; (80052d0 <LoopFillZerobss+0x20>)
adds r2, r0, r1
80052a0: 1842 adds r2, r0, r1
cmp r2, r3
80052a2: 429a cmp r2, r3
bcc CopyDataInit
80052a4: d3f6 bcc.n 8005294 <CopyDataInit>
ldr r2, =_sbss
80052a6: 4a0b ldr r2, [pc, #44] ; (80052d4 <LoopFillZerobss+0x24>)
b LoopFillZerobss
80052a8: e002 b.n 80052b0 <LoopFillZerobss>
080052aa <FillZerobss>:
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
80052aa: 2300 movs r3, #0
str r3, [r2], #4
80052ac: f842 3b04 str.w r3, [r2], #4
080052b0 <LoopFillZerobss>:
LoopFillZerobss:
ldr r3, = _ebss
80052b0: 4b09 ldr r3, [pc, #36] ; (80052d8 <LoopFillZerobss+0x28>)
cmp r2, r3
80052b2: 429a cmp r2, r3
bcc FillZerobss
80052b4: d3f9 bcc.n 80052aa <FillZerobss>
/* Call the clock system initialization function.*/
bl SystemInit
80052b6: f7ff ffd3 bl 8005260 <SystemInit>
/* Call static constructors */
bl __libc_init_array
80052ba: f017 fcbd bl 801cc38 <__libc_init_array>
/* Call the application's entry point.*/
bl main
80052be: f7fb fc4d bl 8000b5c <main>
bx lr
80052c2: 4770 bx lr
Reset_Handler: ldr sp, =_estack /* set stack pointer */
80052c4: 20050000 .word 0x20050000
ldr r3, =_sidata
80052c8: 08022f70 .word 0x08022f70
ldr r0, =_sdata
80052cc: 20000000 .word 0x20000000
ldr r3, =_edata
80052d0: 200000e8 .word 0x200000e8
ldr r2, =_sbss
80052d4: 200000e8 .word 0x200000e8
ldr r3, = _ebss
80052d8: 2000f848 .word 0x2000f848
080052dc <ADC_IRQHandler>:
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
80052dc: e7fe b.n 80052dc <ADC_IRQHandler>
080052de <HAL_Init>:
* need to ensure that the SysTick time base is always set to 1 millisecond
* to have correct HAL operation.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_Init(void)
{
80052de: b580 push {r7, lr}
80052e0: af00 add r7, sp, #0
#if (PREFETCH_ENABLE != 0U)
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
#endif /* PREFETCH_ENABLE */
/* Set Interrupt Group Priority */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
80052e2: 2003 movs r0, #3
80052e4: f000 fcd1 bl 8005c8a <HAL_NVIC_SetPriorityGrouping>
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
HAL_InitTick(TICK_INT_PRIORITY);
80052e8: 2000 movs r0, #0
80052ea: f7ff fe83 bl 8004ff4 <HAL_InitTick>
/* Init the low level hardware */
HAL_MspInit();
80052ee: f7ff f90f bl 8004510 <HAL_MspInit>
/* Return function status */
return HAL_OK;
80052f2: 2300 movs r3, #0
}
80052f4: 4618 mov r0, r3
80052f6: bd80 pop {r7, pc}
080052f8 <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)
{
80052f8: b480 push {r7}
80052fa: af00 add r7, sp, #0
uwTick += uwTickFreq;
80052fc: 4b06 ldr r3, [pc, #24] ; (8005318 <HAL_IncTick+0x20>)
80052fe: 781b ldrb r3, [r3, #0]
8005300: 461a mov r2, r3
8005302: 4b06 ldr r3, [pc, #24] ; (800531c <HAL_IncTick+0x24>)
8005304: 681b ldr r3, [r3, #0]
8005306: 4413 add r3, r2
8005308: 4a04 ldr r2, [pc, #16] ; (800531c <HAL_IncTick+0x24>)
800530a: 6013 str r3, [r2, #0]
}
800530c: bf00 nop
800530e: 46bd mov sp, r7
8005310: f85d 7b04 ldr.w r7, [sp], #4
8005314: 4770 bx lr
8005316: bf00 nop
8005318: 2000006c .word 0x2000006c
800531c: 20008f8c .word 0x20008f8c
08005320 <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)
{
8005320: b480 push {r7}
8005322: af00 add r7, sp, #0
return uwTick;
8005324: 4b03 ldr r3, [pc, #12] ; (8005334 <HAL_GetTick+0x14>)
8005326: 681b ldr r3, [r3, #0]
}
8005328: 4618 mov r0, r3
800532a: 46bd mov sp, r7
800532c: f85d 7b04 ldr.w r7, [sp], #4
8005330: 4770 bx lr
8005332: bf00 nop
8005334: 20008f8c .word 0x20008f8c
08005338 <HAL_Delay>:
* implementations in user file.
* @param Delay specifies the delay time length, in milliseconds.
* @retval None
*/
__weak void HAL_Delay(uint32_t Delay)
{
8005338: b580 push {r7, lr}
800533a: b084 sub sp, #16
800533c: af00 add r7, sp, #0
800533e: 6078 str r0, [r7, #4]
uint32_t tickstart = HAL_GetTick();
8005340: f7ff ffee bl 8005320 <HAL_GetTick>
8005344: 60b8 str r0, [r7, #8]
uint32_t wait = Delay;
8005346: 687b ldr r3, [r7, #4]
8005348: 60fb str r3, [r7, #12]
/* Add a freq to guarantee minimum wait */
if (wait < HAL_MAX_DELAY)
800534a: 68fb ldr r3, [r7, #12]
800534c: f1b3 3fff cmp.w r3, #4294967295
8005350: d005 beq.n 800535e <HAL_Delay+0x26>
{
wait += (uint32_t)(uwTickFreq);
8005352: 4b09 ldr r3, [pc, #36] ; (8005378 <HAL_Delay+0x40>)
8005354: 781b ldrb r3, [r3, #0]
8005356: 461a mov r2, r3
8005358: 68fb ldr r3, [r7, #12]
800535a: 4413 add r3, r2
800535c: 60fb str r3, [r7, #12]
}
while ((HAL_GetTick() - tickstart) < wait)
800535e: bf00 nop
8005360: f7ff ffde bl 8005320 <HAL_GetTick>
8005364: 4602 mov r2, r0
8005366: 68bb ldr r3, [r7, #8]
8005368: 1ad3 subs r3, r2, r3
800536a: 68fa ldr r2, [r7, #12]
800536c: 429a cmp r2, r3
800536e: d8f7 bhi.n 8005360 <HAL_Delay+0x28>
{
}
}
8005370: bf00 nop
8005372: 3710 adds r7, #16
8005374: 46bd mov sp, r7
8005376: bd80 pop {r7, pc}
8005378: 2000006c .word 0x2000006c
0800537c <HAL_ADC_Init>:
* @param hadc pointer to a ADC_HandleTypeDef structure that contains
* the configuration information for the specified ADC.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
{
800537c: b580 push {r7, lr}
800537e: b084 sub sp, #16
8005380: af00 add r7, sp, #0
8005382: 6078 str r0, [r7, #4]
HAL_StatusTypeDef tmp_hal_status = HAL_OK;
8005384: 2300 movs r3, #0
8005386: 73fb strb r3, [r7, #15]
/* Check ADC handle */
if(hadc == NULL)
8005388: 687b ldr r3, [r7, #4]
800538a: 2b00 cmp r3, #0
800538c: d101 bne.n 8005392 <HAL_ADC_Init+0x16>
{
return HAL_ERROR;
800538e: 2301 movs r3, #1
8005390: e031 b.n 80053f6 <HAL_ADC_Init+0x7a>
if(hadc->Init.ExternalTrigConv != ADC_SOFTWARE_START)
{
assert_param(IS_ADC_EXT_TRIG_EDGE(hadc->Init.ExternalTrigConvEdge));
}
if(hadc->State == HAL_ADC_STATE_RESET)
8005392: 687b ldr r3, [r7, #4]
8005394: 6c1b ldr r3, [r3, #64] ; 0x40
8005396: 2b00 cmp r3, #0
8005398: d109 bne.n 80053ae <HAL_ADC_Init+0x32>
/* Init the low level hardware */
hadc->MspInitCallback(hadc);
#else
/* Init the low level hardware */
HAL_ADC_MspInit(hadc);
800539a: 6878 ldr r0, [r7, #4]
800539c: f7ff f8e0 bl 8004560 <HAL_ADC_MspInit>
#endif /* USE_HAL_ADC_REGISTER_CALLBACKS */
/* Initialize ADC error code */
ADC_CLEAR_ERRORCODE(hadc);
80053a0: 687b ldr r3, [r7, #4]
80053a2: 2200 movs r2, #0
80053a4: 645a str r2, [r3, #68] ; 0x44
/* Allocate lock resource and initialize it */
hadc->Lock = HAL_UNLOCKED;
80053a6: 687b ldr r3, [r7, #4]
80053a8: 2200 movs r2, #0
80053aa: f883 203c strb.w r2, [r3, #60] ; 0x3c
}
/* Configuration of ADC parameters if previous preliminary actions are */
/* correctly completed. */
if (HAL_IS_BIT_CLR(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL))
80053ae: 687b ldr r3, [r7, #4]
80053b0: 6c1b ldr r3, [r3, #64] ; 0x40
80053b2: f003 0310 and.w r3, r3, #16
80053b6: 2b00 cmp r3, #0
80053b8: d116 bne.n 80053e8 <HAL_ADC_Init+0x6c>
{
/* Set ADC state */
ADC_STATE_CLR_SET(hadc->State,
80053ba: 687b ldr r3, [r7, #4]
80053bc: 6c1a ldr r2, [r3, #64] ; 0x40
80053be: 4b10 ldr r3, [pc, #64] ; (8005400 <HAL_ADC_Init+0x84>)
80053c0: 4013 ands r3, r2
80053c2: f043 0202 orr.w r2, r3, #2
80053c6: 687b ldr r3, [r7, #4]
80053c8: 641a str r2, [r3, #64] ; 0x40
HAL_ADC_STATE_REG_BUSY | HAL_ADC_STATE_INJ_BUSY,
HAL_ADC_STATE_BUSY_INTERNAL);
/* Set ADC parameters */
ADC_Init(hadc);
80053ca: 6878 ldr r0, [r7, #4]
80053cc: f000 fab6 bl 800593c <ADC_Init>
/* Set ADC error code to none */
ADC_CLEAR_ERRORCODE(hadc);
80053d0: 687b ldr r3, [r7, #4]
80053d2: 2200 movs r2, #0
80053d4: 645a str r2, [r3, #68] ; 0x44
/* Set the ADC state */
ADC_STATE_CLR_SET(hadc->State,
80053d6: 687b ldr r3, [r7, #4]
80053d8: 6c1b ldr r3, [r3, #64] ; 0x40
80053da: f023 0303 bic.w r3, r3, #3
80053de: f043 0201 orr.w r2, r3, #1
80053e2: 687b ldr r3, [r7, #4]
80053e4: 641a str r2, [r3, #64] ; 0x40
80053e6: e001 b.n 80053ec <HAL_ADC_Init+0x70>
HAL_ADC_STATE_BUSY_INTERNAL,
HAL_ADC_STATE_READY);
}
else
{
tmp_hal_status = HAL_ERROR;
80053e8: 2301 movs r3, #1
80053ea: 73fb strb r3, [r7, #15]
}
/* Release Lock */
__HAL_UNLOCK(hadc);
80053ec: 687b ldr r3, [r7, #4]
80053ee: 2200 movs r2, #0
80053f0: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Return function status */
return tmp_hal_status;
80053f4: 7bfb ldrb r3, [r7, #15]
}
80053f6: 4618 mov r0, r3
80053f8: 3710 adds r7, #16
80053fa: 46bd mov sp, r7
80053fc: bd80 pop {r7, pc}
80053fe: bf00 nop
8005400: ffffeefd .word 0xffffeefd
08005404 <HAL_ADC_Start>:
* @param hadc pointer to a ADC_HandleTypeDef structure that contains
* the configuration information for the specified ADC.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
{
8005404: b480 push {r7}
8005406: b085 sub sp, #20
8005408: af00 add r7, sp, #0
800540a: 6078 str r0, [r7, #4]
__IO uint32_t counter = 0;
800540c: 2300 movs r3, #0
800540e: 60fb str r3, [r7, #12]
/* Check the parameters */
assert_param(IS_FUNCTIONAL_STATE(hadc->Init.ContinuousConvMode));
assert_param(IS_ADC_EXT_TRIG_EDGE(hadc->Init.ExternalTrigConvEdge));
/* Process locked */
__HAL_LOCK(hadc);
8005410: 687b ldr r3, [r7, #4]
8005412: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
8005416: 2b01 cmp r3, #1
8005418: d101 bne.n 800541e <HAL_ADC_Start+0x1a>
800541a: 2302 movs r3, #2
800541c: e0a0 b.n 8005560 <HAL_ADC_Start+0x15c>
800541e: 687b ldr r3, [r7, #4]
8005420: 2201 movs r2, #1
8005422: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Enable the ADC peripheral */
/* Check if ADC peripheral is disabled in order to enable it and wait during
Tstab time the ADC's stabilization */
if((hadc->Instance->CR2 & ADC_CR2_ADON) != ADC_CR2_ADON)
8005426: 687b ldr r3, [r7, #4]
8005428: 681b ldr r3, [r3, #0]
800542a: 689b ldr r3, [r3, #8]
800542c: f003 0301 and.w r3, r3, #1
8005430: 2b01 cmp r3, #1
8005432: d018 beq.n 8005466 <HAL_ADC_Start+0x62>
{
/* Enable the Peripheral */
__HAL_ADC_ENABLE(hadc);
8005434: 687b ldr r3, [r7, #4]
8005436: 681b ldr r3, [r3, #0]
8005438: 689a ldr r2, [r3, #8]
800543a: 687b ldr r3, [r7, #4]
800543c: 681b ldr r3, [r3, #0]
800543e: f042 0201 orr.w r2, r2, #1
8005442: 609a str r2, [r3, #8]
/* Delay for ADC stabilization time */
/* Compute number of CPU cycles to wait for */
counter = (ADC_STAB_DELAY_US * (SystemCoreClock / 1000000));
8005444: 4b49 ldr r3, [pc, #292] ; (800556c <HAL_ADC_Start+0x168>)
8005446: 681b ldr r3, [r3, #0]
8005448: 4a49 ldr r2, [pc, #292] ; (8005570 <HAL_ADC_Start+0x16c>)
800544a: fba2 2303 umull r2, r3, r2, r3
800544e: 0c9a lsrs r2, r3, #18
8005450: 4613 mov r3, r2
8005452: 005b lsls r3, r3, #1
8005454: 4413 add r3, r2
8005456: 60fb str r3, [r7, #12]
while(counter != 0)
8005458: e002 b.n 8005460 <HAL_ADC_Start+0x5c>
{
counter--;
800545a: 68fb ldr r3, [r7, #12]
800545c: 3b01 subs r3, #1
800545e: 60fb str r3, [r7, #12]
while(counter != 0)
8005460: 68fb ldr r3, [r7, #12]
8005462: 2b00 cmp r3, #0
8005464: d1f9 bne.n 800545a <HAL_ADC_Start+0x56>
}
}
/* Start conversion if ADC is effectively enabled */
if(HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_ADON))
8005466: 687b ldr r3, [r7, #4]
8005468: 681b ldr r3, [r3, #0]
800546a: 689b ldr r3, [r3, #8]
800546c: f003 0301 and.w r3, r3, #1
8005470: 2b01 cmp r3, #1
8005472: d174 bne.n 800555e <HAL_ADC_Start+0x15a>
{
/* Set ADC state */
/* - Clear state bitfield related to regular group conversion results */
/* - Set state bitfield related to regular group operation */
ADC_STATE_CLR_SET(hadc->State,
8005474: 687b ldr r3, [r7, #4]
8005476: 6c1a ldr r2, [r3, #64] ; 0x40
8005478: 4b3e ldr r3, [pc, #248] ; (8005574 <HAL_ADC_Start+0x170>)
800547a: 4013 ands r3, r2
800547c: f443 7280 orr.w r2, r3, #256 ; 0x100
8005480: 687b ldr r3, [r7, #4]
8005482: 641a str r2, [r3, #64] ; 0x40
HAL_ADC_STATE_READY | HAL_ADC_STATE_REG_EOC | HAL_ADC_STATE_REG_OVR,
HAL_ADC_STATE_REG_BUSY);
/* If conversions on group regular are also triggering group injected, */
/* update ADC state. */
if (READ_BIT(hadc->Instance->CR1, ADC_CR1_JAUTO) != RESET)
8005484: 687b ldr r3, [r7, #4]
8005486: 681b ldr r3, [r3, #0]
8005488: 685b ldr r3, [r3, #4]
800548a: f403 6380 and.w r3, r3, #1024 ; 0x400
800548e: 2b00 cmp r3, #0
8005490: d007 beq.n 80054a2 <HAL_ADC_Start+0x9e>
{
ADC_STATE_CLR_SET(hadc->State, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_INJ_BUSY);
8005492: 687b ldr r3, [r7, #4]
8005494: 6c1b ldr r3, [r3, #64] ; 0x40
8005496: f423 5340 bic.w r3, r3, #12288 ; 0x3000
800549a: f443 5280 orr.w r2, r3, #4096 ; 0x1000
800549e: 687b ldr r3, [r7, #4]
80054a0: 641a str r2, [r3, #64] ; 0x40
}
/* State machine update: Check if an injected conversion is ongoing */
if (HAL_IS_BIT_SET(hadc->State, HAL_ADC_STATE_INJ_BUSY))
80054a2: 687b ldr r3, [r7, #4]
80054a4: 6c1b ldr r3, [r3, #64] ; 0x40
80054a6: f403 5380 and.w r3, r3, #4096 ; 0x1000
80054aa: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
80054ae: d106 bne.n 80054be <HAL_ADC_Start+0xba>
{
/* Reset ADC error code fields related to conversions on group regular */
CLEAR_BIT(hadc->ErrorCode, (HAL_ADC_ERROR_OVR | HAL_ADC_ERROR_DMA));
80054b0: 687b ldr r3, [r7, #4]
80054b2: 6c5b ldr r3, [r3, #68] ; 0x44
80054b4: f023 0206 bic.w r2, r3, #6
80054b8: 687b ldr r3, [r7, #4]
80054ba: 645a str r2, [r3, #68] ; 0x44
80054bc: e002 b.n 80054c4 <HAL_ADC_Start+0xc0>
}
else
{
/* Reset ADC all error code fields */
ADC_CLEAR_ERRORCODE(hadc);
80054be: 687b ldr r3, [r7, #4]
80054c0: 2200 movs r2, #0
80054c2: 645a str r2, [r3, #68] ; 0x44
}
/* Process unlocked */
/* Unlock before starting ADC conversions: in case of potential */
/* interruption, to let the process to ADC IRQ Handler. */
__HAL_UNLOCK(hadc);
80054c4: 687b ldr r3, [r7, #4]
80054c6: 2200 movs r2, #0
80054c8: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Clear regular group conversion flag and overrun flag */
/* (To ensure of no unknown state from potential previous ADC operations) */
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_EOC | ADC_FLAG_OVR);
80054cc: 687b ldr r3, [r7, #4]
80054ce: 681b ldr r3, [r3, #0]
80054d0: f06f 0222 mvn.w r2, #34 ; 0x22
80054d4: 601a str r2, [r3, #0]
/* Check if Multimode enabled */
if(HAL_IS_BIT_CLR(ADC->CCR, ADC_CCR_MULTI))
80054d6: 4b28 ldr r3, [pc, #160] ; (8005578 <HAL_ADC_Start+0x174>)
80054d8: 685b ldr r3, [r3, #4]
80054da: f003 031f and.w r3, r3, #31
80054de: 2b00 cmp r3, #0
80054e0: d10f bne.n 8005502 <HAL_ADC_Start+0xfe>
{
/* if no external trigger present enable software conversion of regular channels */
if((hadc->Instance->CR2 & ADC_CR2_EXTEN) == RESET)
80054e2: 687b ldr r3, [r7, #4]
80054e4: 681b ldr r3, [r3, #0]
80054e6: 689b ldr r3, [r3, #8]
80054e8: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
80054ec: 2b00 cmp r3, #0
80054ee: d136 bne.n 800555e <HAL_ADC_Start+0x15a>
{
/* Enable the selected ADC software conversion for regular group */
hadc->Instance->CR2 |= (uint32_t)ADC_CR2_SWSTART;
80054f0: 687b ldr r3, [r7, #4]
80054f2: 681b ldr r3, [r3, #0]
80054f4: 689a ldr r2, [r3, #8]
80054f6: 687b ldr r3, [r7, #4]
80054f8: 681b ldr r3, [r3, #0]
80054fa: f042 4280 orr.w r2, r2, #1073741824 ; 0x40000000
80054fe: 609a str r2, [r3, #8]
8005500: e02d b.n 800555e <HAL_ADC_Start+0x15a>
}
}
else
{
/* if instance of handle correspond to ADC1 and no external trigger present enable software conversion of regular channels */
if((hadc->Instance == ADC1) && ((hadc->Instance->CR2 & ADC_CR2_EXTEN) == RESET))
8005502: 687b ldr r3, [r7, #4]
8005504: 681b ldr r3, [r3, #0]
8005506: 4a1d ldr r2, [pc, #116] ; (800557c <HAL_ADC_Start+0x178>)
8005508: 4293 cmp r3, r2
800550a: d10e bne.n 800552a <HAL_ADC_Start+0x126>
800550c: 687b ldr r3, [r7, #4]
800550e: 681b ldr r3, [r3, #0]
8005510: 689b ldr r3, [r3, #8]
8005512: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
8005516: 2b00 cmp r3, #0
8005518: d107 bne.n 800552a <HAL_ADC_Start+0x126>
{
/* Enable the selected ADC software conversion for regular group */
hadc->Instance->CR2 |= (uint32_t)ADC_CR2_SWSTART;
800551a: 687b ldr r3, [r7, #4]
800551c: 681b ldr r3, [r3, #0]
800551e: 689a ldr r2, [r3, #8]
8005520: 687b ldr r3, [r7, #4]
8005522: 681b ldr r3, [r3, #0]
8005524: f042 4280 orr.w r2, r2, #1073741824 ; 0x40000000
8005528: 609a str r2, [r3, #8]
}
/* if dual mode is selected, ADC3 works independently. */
/* check if the mode selected is not triple */
if( HAL_IS_BIT_CLR(ADC->CCR, ADC_CCR_MULTI_4) )
800552a: 4b13 ldr r3, [pc, #76] ; (8005578 <HAL_ADC_Start+0x174>)
800552c: 685b ldr r3, [r3, #4]
800552e: f003 0310 and.w r3, r3, #16
8005532: 2b00 cmp r3, #0
8005534: d113 bne.n 800555e <HAL_ADC_Start+0x15a>
{
/* if instance of handle correspond to ADC3 and no external trigger present enable software conversion of regular channels */
if((hadc->Instance == ADC3) && ((hadc->Instance->CR2 & ADC_CR2_EXTEN) == RESET))
8005536: 687b ldr r3, [r7, #4]
8005538: 681b ldr r3, [r3, #0]
800553a: 4a11 ldr r2, [pc, #68] ; (8005580 <HAL_ADC_Start+0x17c>)
800553c: 4293 cmp r3, r2
800553e: d10e bne.n 800555e <HAL_ADC_Start+0x15a>
8005540: 687b ldr r3, [r7, #4]
8005542: 681b ldr r3, [r3, #0]
8005544: 689b ldr r3, [r3, #8]
8005546: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
800554a: 2b00 cmp r3, #0
800554c: d107 bne.n 800555e <HAL_ADC_Start+0x15a>
{
/* Enable the selected ADC software conversion for regular group */
hadc->Instance->CR2 |= (uint32_t)ADC_CR2_SWSTART;
800554e: 687b ldr r3, [r7, #4]
8005550: 681b ldr r3, [r3, #0]
8005552: 689a ldr r2, [r3, #8]
8005554: 687b ldr r3, [r7, #4]
8005556: 681b ldr r3, [r3, #0]
8005558: f042 4280 orr.w r2, r2, #1073741824 ; 0x40000000
800555c: 609a str r2, [r3, #8]
}
}
}
/* Return function status */
return HAL_OK;
800555e: 2300 movs r3, #0
}
8005560: 4618 mov r0, r3
8005562: 3714 adds r7, #20
8005564: 46bd mov sp, r7
8005566: f85d 7b04 ldr.w r7, [sp], #4
800556a: 4770 bx lr
800556c: 20000064 .word 0x20000064
8005570: 431bde83 .word 0x431bde83
8005574: fffff8fe .word 0xfffff8fe
8005578: 40012300 .word 0x40012300
800557c: 40012000 .word 0x40012000
8005580: 40012200 .word 0x40012200
08005584 <HAL_ADC_PollForConversion>:
* the configuration information for the specified ADC.
* @param Timeout Timeout value in millisecond.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout)
{
8005584: b580 push {r7, lr}
8005586: b084 sub sp, #16
8005588: af00 add r7, sp, #0
800558a: 6078 str r0, [r7, #4]
800558c: 6039 str r1, [r7, #0]
uint32_t tickstart = 0;
800558e: 2300 movs r3, #0
8005590: 60fb str r3, [r7, #12]
/* each conversion: */
/* Particular case is ADC configured in DMA mode and ADC sequencer with */
/* several ranks and polling for end of each conversion. */
/* For code simplicity sake, this particular case is generalized to */
/* ADC configured in DMA mode and polling for end of each conversion. */
if (HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_EOCS) &&
8005592: 687b ldr r3, [r7, #4]
8005594: 681b ldr r3, [r3, #0]
8005596: 689b ldr r3, [r3, #8]
8005598: f403 6380 and.w r3, r3, #1024 ; 0x400
800559c: f5b3 6f80 cmp.w r3, #1024 ; 0x400
80055a0: d113 bne.n 80055ca <HAL_ADC_PollForConversion+0x46>
HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_DMA) )
80055a2: 687b ldr r3, [r7, #4]
80055a4: 681b ldr r3, [r3, #0]
80055a6: 689b ldr r3, [r3, #8]
80055a8: f403 7380 and.w r3, r3, #256 ; 0x100
if (HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_EOCS) &&
80055ac: f5b3 7f80 cmp.w r3, #256 ; 0x100
80055b0: d10b bne.n 80055ca <HAL_ADC_PollForConversion+0x46>
{
/* Update ADC state machine to error */
SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
80055b2: 687b ldr r3, [r7, #4]
80055b4: 6c1b ldr r3, [r3, #64] ; 0x40
80055b6: f043 0220 orr.w r2, r3, #32
80055ba: 687b ldr r3, [r7, #4]
80055bc: 641a str r2, [r3, #64] ; 0x40
/* Process unlocked */
__HAL_UNLOCK(hadc);
80055be: 687b ldr r3, [r7, #4]
80055c0: 2200 movs r2, #0
80055c2: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_ERROR;
80055c6: 2301 movs r3, #1
80055c8: e05c b.n 8005684 <HAL_ADC_PollForConversion+0x100>
}
/* Get tick */
tickstart = HAL_GetTick();
80055ca: f7ff fea9 bl 8005320 <HAL_GetTick>
80055ce: 60f8 str r0, [r7, #12]
/* Check End of conversion flag */
while(!(__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_EOC)))
80055d0: e01a b.n 8005608 <HAL_ADC_PollForConversion+0x84>
{
/* Check if timeout is disabled (set to infinite wait) */
if(Timeout != HAL_MAX_DELAY)
80055d2: 683b ldr r3, [r7, #0]
80055d4: f1b3 3fff cmp.w r3, #4294967295
80055d8: d016 beq.n 8005608 <HAL_ADC_PollForConversion+0x84>
{
if((Timeout == 0) || ((HAL_GetTick() - tickstart ) > Timeout))
80055da: 683b ldr r3, [r7, #0]
80055dc: 2b00 cmp r3, #0
80055de: d007 beq.n 80055f0 <HAL_ADC_PollForConversion+0x6c>
80055e0: f7ff fe9e bl 8005320 <HAL_GetTick>
80055e4: 4602 mov r2, r0
80055e6: 68fb ldr r3, [r7, #12]
80055e8: 1ad3 subs r3, r2, r3
80055ea: 683a ldr r2, [r7, #0]
80055ec: 429a cmp r2, r3
80055ee: d20b bcs.n 8005608 <HAL_ADC_PollForConversion+0x84>
{
/* Update ADC state machine to timeout */
SET_BIT(hadc->State, HAL_ADC_STATE_TIMEOUT);
80055f0: 687b ldr r3, [r7, #4]
80055f2: 6c1b ldr r3, [r3, #64] ; 0x40
80055f4: f043 0204 orr.w r2, r3, #4
80055f8: 687b ldr r3, [r7, #4]
80055fa: 641a str r2, [r3, #64] ; 0x40
/* Process unlocked */
__HAL_UNLOCK(hadc);
80055fc: 687b ldr r3, [r7, #4]
80055fe: 2200 movs r2, #0
8005600: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_TIMEOUT;
8005604: 2303 movs r3, #3
8005606: e03d b.n 8005684 <HAL_ADC_PollForConversion+0x100>
while(!(__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_EOC)))
8005608: 687b ldr r3, [r7, #4]
800560a: 681b ldr r3, [r3, #0]
800560c: 681b ldr r3, [r3, #0]
800560e: f003 0302 and.w r3, r3, #2
8005612: 2b02 cmp r3, #2
8005614: d1dd bne.n 80055d2 <HAL_ADC_PollForConversion+0x4e>
}
}
}
/* Clear regular group conversion flag */
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_STRT | ADC_FLAG_EOC);
8005616: 687b ldr r3, [r7, #4]
8005618: 681b ldr r3, [r3, #0]
800561a: f06f 0212 mvn.w r2, #18
800561e: 601a str r2, [r3, #0]
/* Update ADC state machine */
SET_BIT(hadc->State, HAL_ADC_STATE_REG_EOC);
8005620: 687b ldr r3, [r7, #4]
8005622: 6c1b ldr r3, [r3, #64] ; 0x40
8005624: f443 7200 orr.w r2, r3, #512 ; 0x200
8005628: 687b ldr r3, [r7, #4]
800562a: 641a str r2, [r3, #64] ; 0x40
/* by external trigger, continuous mode or scan sequence on going. */
/* Note: On STM32F7, there is no independent flag of end of sequence. */
/* The test of scan sequence on going is done either with scan */
/* sequence disabled or with end of conversion flag set to */
/* of end of sequence. */
if(ADC_IS_SOFTWARE_START_REGULAR(hadc) &&
800562c: 687b ldr r3, [r7, #4]
800562e: 681b ldr r3, [r3, #0]
8005630: 689b ldr r3, [r3, #8]
8005632: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
8005636: 2b00 cmp r3, #0
8005638: d123 bne.n 8005682 <HAL_ADC_PollForConversion+0xfe>
(hadc->Init.ContinuousConvMode == DISABLE) &&
800563a: 687b ldr r3, [r7, #4]
800563c: 699b ldr r3, [r3, #24]
if(ADC_IS_SOFTWARE_START_REGULAR(hadc) &&
800563e: 2b00 cmp r3, #0
8005640: d11f bne.n 8005682 <HAL_ADC_PollForConversion+0xfe>
(HAL_IS_BIT_CLR(hadc->Instance->SQR1, ADC_SQR1_L) ||
8005642: 687b ldr r3, [r7, #4]
8005644: 681b ldr r3, [r3, #0]
8005646: 6adb ldr r3, [r3, #44] ; 0x2c
8005648: f403 0370 and.w r3, r3, #15728640 ; 0xf00000
(hadc->Init.ContinuousConvMode == DISABLE) &&
800564c: 2b00 cmp r3, #0
800564e: d006 beq.n 800565e <HAL_ADC_PollForConversion+0xda>
HAL_IS_BIT_CLR(hadc->Instance->CR2, ADC_CR2_EOCS) ) )
8005650: 687b ldr r3, [r7, #4]
8005652: 681b ldr r3, [r3, #0]
8005654: 689b ldr r3, [r3, #8]
8005656: f403 6380 and.w r3, r3, #1024 ; 0x400
(HAL_IS_BIT_CLR(hadc->Instance->SQR1, ADC_SQR1_L) ||
800565a: 2b00 cmp r3, #0
800565c: d111 bne.n 8005682 <HAL_ADC_PollForConversion+0xfe>
{
/* Set ADC state */
CLEAR_BIT(hadc->State, HAL_ADC_STATE_REG_BUSY);
800565e: 687b ldr r3, [r7, #4]
8005660: 6c1b ldr r3, [r3, #64] ; 0x40
8005662: f423 7280 bic.w r2, r3, #256 ; 0x100
8005666: 687b ldr r3, [r7, #4]
8005668: 641a str r2, [r3, #64] ; 0x40
if (HAL_IS_BIT_CLR(hadc->State, HAL_ADC_STATE_INJ_BUSY))
800566a: 687b ldr r3, [r7, #4]
800566c: 6c1b ldr r3, [r3, #64] ; 0x40
800566e: f403 5380 and.w r3, r3, #4096 ; 0x1000
8005672: 2b00 cmp r3, #0
8005674: d105 bne.n 8005682 <HAL_ADC_PollForConversion+0xfe>
{
SET_BIT(hadc->State, HAL_ADC_STATE_READY);
8005676: 687b ldr r3, [r7, #4]
8005678: 6c1b ldr r3, [r3, #64] ; 0x40
800567a: f043 0201 orr.w r2, r3, #1
800567e: 687b ldr r3, [r7, #4]
8005680: 641a str r2, [r3, #64] ; 0x40
}
}
/* Return ADC state */
return HAL_OK;
8005682: 2300 movs r3, #0
}
8005684: 4618 mov r0, r3
8005686: 3710 adds r7, #16
8005688: 46bd mov sp, r7
800568a: bd80 pop {r7, pc}
0800568c <HAL_ADC_GetValue>:
* @param hadc pointer to a ADC_HandleTypeDef structure that contains
* the configuration information for the specified ADC.
* @retval Converted value
*/
uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc)
{
800568c: b480 push {r7}
800568e: b083 sub sp, #12
8005690: af00 add r7, sp, #0
8005692: 6078 str r0, [r7, #4]
/* Return the selected ADC converted value */
return hadc->Instance->DR;
8005694: 687b ldr r3, [r7, #4]
8005696: 681b ldr r3, [r3, #0]
8005698: 6cdb ldr r3, [r3, #76] ; 0x4c
}
800569a: 4618 mov r0, r3
800569c: 370c adds r7, #12
800569e: 46bd mov sp, r7
80056a0: f85d 7b04 ldr.w r7, [sp], #4
80056a4: 4770 bx lr
...
080056a8 <HAL_ADC_ConfigChannel>:
* the configuration information for the specified ADC.
* @param sConfig ADC configuration structure.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig)
{
80056a8: b480 push {r7}
80056aa: b085 sub sp, #20
80056ac: af00 add r7, sp, #0
80056ae: 6078 str r0, [r7, #4]
80056b0: 6039 str r1, [r7, #0]
__IO uint32_t counter = 0;
80056b2: 2300 movs r3, #0
80056b4: 60fb str r3, [r7, #12]
assert_param(IS_ADC_CHANNEL(sConfig->Channel));
assert_param(IS_ADC_REGULAR_RANK(sConfig->Rank));
assert_param(IS_ADC_SAMPLE_TIME(sConfig->SamplingTime));
/* Process locked */
__HAL_LOCK(hadc);
80056b6: 687b ldr r3, [r7, #4]
80056b8: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
80056bc: 2b01 cmp r3, #1
80056be: d101 bne.n 80056c4 <HAL_ADC_ConfigChannel+0x1c>
80056c0: 2302 movs r3, #2
80056c2: e12a b.n 800591a <HAL_ADC_ConfigChannel+0x272>
80056c4: 687b ldr r3, [r7, #4]
80056c6: 2201 movs r2, #1
80056c8: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* if ADC_Channel_10 ... ADC_Channel_18 is selected */
if ((sConfig->Channel > ADC_CHANNEL_9) && (sConfig->Channel != ADC_INTERNAL_NONE))
80056cc: 683b ldr r3, [r7, #0]
80056ce: 681b ldr r3, [r3, #0]
80056d0: 2b09 cmp r3, #9
80056d2: d93a bls.n 800574a <HAL_ADC_ConfigChannel+0xa2>
80056d4: 683b ldr r3, [r7, #0]
80056d6: 681b ldr r3, [r3, #0]
80056d8: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
80056dc: d035 beq.n 800574a <HAL_ADC_ConfigChannel+0xa2>
{
/* Clear the old sample time */
hadc->Instance->SMPR1 &= ~ADC_SMPR1(ADC_SMPR1_SMP10, sConfig->Channel);
80056de: 687b ldr r3, [r7, #4]
80056e0: 681b ldr r3, [r3, #0]
80056e2: 68d9 ldr r1, [r3, #12]
80056e4: 683b ldr r3, [r7, #0]
80056e6: 681b ldr r3, [r3, #0]
80056e8: b29b uxth r3, r3
80056ea: 461a mov r2, r3
80056ec: 4613 mov r3, r2
80056ee: 005b lsls r3, r3, #1
80056f0: 4413 add r3, r2
80056f2: 3b1e subs r3, #30
80056f4: 2207 movs r2, #7
80056f6: fa02 f303 lsl.w r3, r2, r3
80056fa: 43da mvns r2, r3
80056fc: 687b ldr r3, [r7, #4]
80056fe: 681b ldr r3, [r3, #0]
8005700: 400a ands r2, r1
8005702: 60da str r2, [r3, #12]
if (sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
8005704: 683b ldr r3, [r7, #0]
8005706: 681b ldr r3, [r3, #0]
8005708: 4a87 ldr r2, [pc, #540] ; (8005928 <HAL_ADC_ConfigChannel+0x280>)
800570a: 4293 cmp r3, r2
800570c: d10a bne.n 8005724 <HAL_ADC_ConfigChannel+0x7c>
{
/* Set the new sample time */
hadc->Instance->SMPR1 |= ADC_SMPR1(sConfig->SamplingTime, ADC_CHANNEL_18);
800570e: 687b ldr r3, [r7, #4]
8005710: 681b ldr r3, [r3, #0]
8005712: 68d9 ldr r1, [r3, #12]
8005714: 683b ldr r3, [r7, #0]
8005716: 689b ldr r3, [r3, #8]
8005718: 061a lsls r2, r3, #24
800571a: 687b ldr r3, [r7, #4]
800571c: 681b ldr r3, [r3, #0]
800571e: 430a orrs r2, r1
8005720: 60da str r2, [r3, #12]
if (sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
8005722: e035 b.n 8005790 <HAL_ADC_ConfigChannel+0xe8>
}
else
{
/* Set the new sample time */
hadc->Instance->SMPR1 |= ADC_SMPR1(sConfig->SamplingTime, sConfig->Channel);
8005724: 687b ldr r3, [r7, #4]
8005726: 681b ldr r3, [r3, #0]
8005728: 68d9 ldr r1, [r3, #12]
800572a: 683b ldr r3, [r7, #0]
800572c: 689a ldr r2, [r3, #8]
800572e: 683b ldr r3, [r7, #0]
8005730: 681b ldr r3, [r3, #0]
8005732: b29b uxth r3, r3
8005734: 4618 mov r0, r3
8005736: 4603 mov r3, r0
8005738: 005b lsls r3, r3, #1
800573a: 4403 add r3, r0
800573c: 3b1e subs r3, #30
800573e: 409a lsls r2, r3
8005740: 687b ldr r3, [r7, #4]
8005742: 681b ldr r3, [r3, #0]
8005744: 430a orrs r2, r1
8005746: 60da str r2, [r3, #12]
if (sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
8005748: e022 b.n 8005790 <HAL_ADC_ConfigChannel+0xe8>
}
}
else /* ADC_Channel include in ADC_Channel_[0..9] */
{
/* Clear the old sample time */
hadc->Instance->SMPR2 &= ~ADC_SMPR2(ADC_SMPR2_SMP0, sConfig->Channel);
800574a: 687b ldr r3, [r7, #4]
800574c: 681b ldr r3, [r3, #0]
800574e: 6919 ldr r1, [r3, #16]
8005750: 683b ldr r3, [r7, #0]
8005752: 681b ldr r3, [r3, #0]
8005754: b29b uxth r3, r3
8005756: 461a mov r2, r3
8005758: 4613 mov r3, r2
800575a: 005b lsls r3, r3, #1
800575c: 4413 add r3, r2
800575e: 2207 movs r2, #7
8005760: fa02 f303 lsl.w r3, r2, r3
8005764: 43da mvns r2, r3
8005766: 687b ldr r3, [r7, #4]
8005768: 681b ldr r3, [r3, #0]
800576a: 400a ands r2, r1
800576c: 611a str r2, [r3, #16]
/* Set the new sample time */
hadc->Instance->SMPR2 |= ADC_SMPR2(sConfig->SamplingTime, sConfig->Channel);
800576e: 687b ldr r3, [r7, #4]
8005770: 681b ldr r3, [r3, #0]
8005772: 6919 ldr r1, [r3, #16]
8005774: 683b ldr r3, [r7, #0]
8005776: 689a ldr r2, [r3, #8]
8005778: 683b ldr r3, [r7, #0]
800577a: 681b ldr r3, [r3, #0]
800577c: b29b uxth r3, r3
800577e: 4618 mov r0, r3
8005780: 4603 mov r3, r0
8005782: 005b lsls r3, r3, #1
8005784: 4403 add r3, r0
8005786: 409a lsls r2, r3
8005788: 687b ldr r3, [r7, #4]
800578a: 681b ldr r3, [r3, #0]
800578c: 430a orrs r2, r1
800578e: 611a str r2, [r3, #16]
}
/* For Rank 1 to 6 */
if (sConfig->Rank < 7)
8005790: 683b ldr r3, [r7, #0]
8005792: 685b ldr r3, [r3, #4]
8005794: 2b06 cmp r3, #6
8005796: d824 bhi.n 80057e2 <HAL_ADC_ConfigChannel+0x13a>
{
/* Clear the old SQx bits for the selected rank */
hadc->Instance->SQR3 &= ~ADC_SQR3_RK(ADC_SQR3_SQ1, sConfig->Rank);
8005798: 687b ldr r3, [r7, #4]
800579a: 681b ldr r3, [r3, #0]
800579c: 6b59 ldr r1, [r3, #52] ; 0x34
800579e: 683b ldr r3, [r7, #0]
80057a0: 685a ldr r2, [r3, #4]
80057a2: 4613 mov r3, r2
80057a4: 009b lsls r3, r3, #2
80057a6: 4413 add r3, r2
80057a8: 3b05 subs r3, #5
80057aa: 221f movs r2, #31
80057ac: fa02 f303 lsl.w r3, r2, r3
80057b0: 43da mvns r2, r3
80057b2: 687b ldr r3, [r7, #4]
80057b4: 681b ldr r3, [r3, #0]
80057b6: 400a ands r2, r1
80057b8: 635a str r2, [r3, #52] ; 0x34
/* Set the SQx bits for the selected rank */
hadc->Instance->SQR3 |= ADC_SQR3_RK(sConfig->Channel, sConfig->Rank);
80057ba: 687b ldr r3, [r7, #4]
80057bc: 681b ldr r3, [r3, #0]
80057be: 6b59 ldr r1, [r3, #52] ; 0x34
80057c0: 683b ldr r3, [r7, #0]
80057c2: 681b ldr r3, [r3, #0]
80057c4: b29b uxth r3, r3
80057c6: 4618 mov r0, r3
80057c8: 683b ldr r3, [r7, #0]
80057ca: 685a ldr r2, [r3, #4]
80057cc: 4613 mov r3, r2
80057ce: 009b lsls r3, r3, #2
80057d0: 4413 add r3, r2
80057d2: 3b05 subs r3, #5
80057d4: fa00 f203 lsl.w r2, r0, r3
80057d8: 687b ldr r3, [r7, #4]
80057da: 681b ldr r3, [r3, #0]
80057dc: 430a orrs r2, r1
80057de: 635a str r2, [r3, #52] ; 0x34
80057e0: e04c b.n 800587c <HAL_ADC_ConfigChannel+0x1d4>
}
/* For Rank 7 to 12 */
else if (sConfig->Rank < 13)
80057e2: 683b ldr r3, [r7, #0]
80057e4: 685b ldr r3, [r3, #4]
80057e6: 2b0c cmp r3, #12
80057e8: d824 bhi.n 8005834 <HAL_ADC_ConfigChannel+0x18c>
{
/* Clear the old SQx bits for the selected rank */
hadc->Instance->SQR2 &= ~ADC_SQR2_RK(ADC_SQR2_SQ7, sConfig->Rank);
80057ea: 687b ldr r3, [r7, #4]
80057ec: 681b ldr r3, [r3, #0]
80057ee: 6b19 ldr r1, [r3, #48] ; 0x30
80057f0: 683b ldr r3, [r7, #0]
80057f2: 685a ldr r2, [r3, #4]
80057f4: 4613 mov r3, r2
80057f6: 009b lsls r3, r3, #2
80057f8: 4413 add r3, r2
80057fa: 3b23 subs r3, #35 ; 0x23
80057fc: 221f movs r2, #31
80057fe: fa02 f303 lsl.w r3, r2, r3
8005802: 43da mvns r2, r3
8005804: 687b ldr r3, [r7, #4]
8005806: 681b ldr r3, [r3, #0]
8005808: 400a ands r2, r1
800580a: 631a str r2, [r3, #48] ; 0x30
/* Set the SQx bits for the selected rank */
hadc->Instance->SQR2 |= ADC_SQR2_RK(sConfig->Channel, sConfig->Rank);
800580c: 687b ldr r3, [r7, #4]
800580e: 681b ldr r3, [r3, #0]
8005810: 6b19 ldr r1, [r3, #48] ; 0x30
8005812: 683b ldr r3, [r7, #0]
8005814: 681b ldr r3, [r3, #0]
8005816: b29b uxth r3, r3
8005818: 4618 mov r0, r3
800581a: 683b ldr r3, [r7, #0]
800581c: 685a ldr r2, [r3, #4]
800581e: 4613 mov r3, r2
8005820: 009b lsls r3, r3, #2
8005822: 4413 add r3, r2
8005824: 3b23 subs r3, #35 ; 0x23
8005826: fa00 f203 lsl.w r2, r0, r3
800582a: 687b ldr r3, [r7, #4]
800582c: 681b ldr r3, [r3, #0]
800582e: 430a orrs r2, r1
8005830: 631a str r2, [r3, #48] ; 0x30
8005832: e023 b.n 800587c <HAL_ADC_ConfigChannel+0x1d4>
}
/* For Rank 13 to 16 */
else
{
/* Clear the old SQx bits for the selected rank */
hadc->Instance->SQR1 &= ~ADC_SQR1_RK(ADC_SQR1_SQ13, sConfig->Rank);
8005834: 687b ldr r3, [r7, #4]
8005836: 681b ldr r3, [r3, #0]
8005838: 6ad9 ldr r1, [r3, #44] ; 0x2c
800583a: 683b ldr r3, [r7, #0]
800583c: 685a ldr r2, [r3, #4]
800583e: 4613 mov r3, r2
8005840: 009b lsls r3, r3, #2
8005842: 4413 add r3, r2
8005844: 3b41 subs r3, #65 ; 0x41
8005846: 221f movs r2, #31
8005848: fa02 f303 lsl.w r3, r2, r3
800584c: 43da mvns r2, r3
800584e: 687b ldr r3, [r7, #4]
8005850: 681b ldr r3, [r3, #0]
8005852: 400a ands r2, r1
8005854: 62da str r2, [r3, #44] ; 0x2c
/* Set the SQx bits for the selected rank */
hadc->Instance->SQR1 |= ADC_SQR1_RK(sConfig->Channel, sConfig->Rank);
8005856: 687b ldr r3, [r7, #4]
8005858: 681b ldr r3, [r3, #0]
800585a: 6ad9 ldr r1, [r3, #44] ; 0x2c
800585c: 683b ldr r3, [r7, #0]
800585e: 681b ldr r3, [r3, #0]
8005860: b29b uxth r3, r3
8005862: 4618 mov r0, r3
8005864: 683b ldr r3, [r7, #0]
8005866: 685a ldr r2, [r3, #4]
8005868: 4613 mov r3, r2
800586a: 009b lsls r3, r3, #2
800586c: 4413 add r3, r2
800586e: 3b41 subs r3, #65 ; 0x41
8005870: fa00 f203 lsl.w r2, r0, r3
8005874: 687b ldr r3, [r7, #4]
8005876: 681b ldr r3, [r3, #0]
8005878: 430a orrs r2, r1
800587a: 62da str r2, [r3, #44] ; 0x2c
}
/* if no internal channel selected */
if ((hadc->Instance == ADC1) && (sConfig->Channel == ADC_INTERNAL_NONE))
800587c: 687b ldr r3, [r7, #4]
800587e: 681b ldr r3, [r3, #0]
8005880: 4a2a ldr r2, [pc, #168] ; (800592c <HAL_ADC_ConfigChannel+0x284>)
8005882: 4293 cmp r3, r2
8005884: d10a bne.n 800589c <HAL_ADC_ConfigChannel+0x1f4>
8005886: 683b ldr r3, [r7, #0]
8005888: 681b ldr r3, [r3, #0]
800588a: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
800588e: d105 bne.n 800589c <HAL_ADC_ConfigChannel+0x1f4>
{
/* Disable the VBAT & TSVREFE channel*/
ADC->CCR &= ~(ADC_CCR_VBATE | ADC_CCR_TSVREFE);
8005890: 4b27 ldr r3, [pc, #156] ; (8005930 <HAL_ADC_ConfigChannel+0x288>)
8005892: 685b ldr r3, [r3, #4]
8005894: 4a26 ldr r2, [pc, #152] ; (8005930 <HAL_ADC_ConfigChannel+0x288>)
8005896: f423 0340 bic.w r3, r3, #12582912 ; 0xc00000
800589a: 6053 str r3, [r2, #4]
}
/* if ADC1 Channel_18 is selected enable VBAT Channel */
if ((hadc->Instance == ADC1) && (sConfig->Channel == ADC_CHANNEL_VBAT))
800589c: 687b ldr r3, [r7, #4]
800589e: 681b ldr r3, [r3, #0]
80058a0: 4a22 ldr r2, [pc, #136] ; (800592c <HAL_ADC_ConfigChannel+0x284>)
80058a2: 4293 cmp r3, r2
80058a4: d109 bne.n 80058ba <HAL_ADC_ConfigChannel+0x212>
80058a6: 683b ldr r3, [r7, #0]
80058a8: 681b ldr r3, [r3, #0]
80058aa: 2b12 cmp r3, #18
80058ac: d105 bne.n 80058ba <HAL_ADC_ConfigChannel+0x212>
{
/* Enable the VBAT channel*/
ADC->CCR |= ADC_CCR_VBATE;
80058ae: 4b20 ldr r3, [pc, #128] ; (8005930 <HAL_ADC_ConfigChannel+0x288>)
80058b0: 685b ldr r3, [r3, #4]
80058b2: 4a1f ldr r2, [pc, #124] ; (8005930 <HAL_ADC_ConfigChannel+0x288>)
80058b4: f443 0380 orr.w r3, r3, #4194304 ; 0x400000
80058b8: 6053 str r3, [r2, #4]
}
/* if ADC1 Channel_18 or Channel_17 is selected enable TSVREFE Channel(Temperature sensor and VREFINT) */
if ((hadc->Instance == ADC1) && ((sConfig->Channel == ADC_CHANNEL_TEMPSENSOR) || (sConfig->Channel == ADC_CHANNEL_VREFINT)))
80058ba: 687b ldr r3, [r7, #4]
80058bc: 681b ldr r3, [r3, #0]
80058be: 4a1b ldr r2, [pc, #108] ; (800592c <HAL_ADC_ConfigChannel+0x284>)
80058c0: 4293 cmp r3, r2
80058c2: d125 bne.n 8005910 <HAL_ADC_ConfigChannel+0x268>
80058c4: 683b ldr r3, [r7, #0]
80058c6: 681b ldr r3, [r3, #0]
80058c8: 4a17 ldr r2, [pc, #92] ; (8005928 <HAL_ADC_ConfigChannel+0x280>)
80058ca: 4293 cmp r3, r2
80058cc: d003 beq.n 80058d6 <HAL_ADC_ConfigChannel+0x22e>
80058ce: 683b ldr r3, [r7, #0]
80058d0: 681b ldr r3, [r3, #0]
80058d2: 2b11 cmp r3, #17
80058d4: d11c bne.n 8005910 <HAL_ADC_ConfigChannel+0x268>
{
/* Enable the TSVREFE channel*/
ADC->CCR |= ADC_CCR_TSVREFE;
80058d6: 4b16 ldr r3, [pc, #88] ; (8005930 <HAL_ADC_ConfigChannel+0x288>)
80058d8: 685b ldr r3, [r3, #4]
80058da: 4a15 ldr r2, [pc, #84] ; (8005930 <HAL_ADC_ConfigChannel+0x288>)
80058dc: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
80058e0: 6053 str r3, [r2, #4]
if(sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
80058e2: 683b ldr r3, [r7, #0]
80058e4: 681b ldr r3, [r3, #0]
80058e6: 4a10 ldr r2, [pc, #64] ; (8005928 <HAL_ADC_ConfigChannel+0x280>)
80058e8: 4293 cmp r3, r2
80058ea: d111 bne.n 8005910 <HAL_ADC_ConfigChannel+0x268>
{
/* Delay for temperature sensor stabilization time */
/* Compute number of CPU cycles to wait for */
counter = (ADC_TEMPSENSOR_DELAY_US * (SystemCoreClock / 1000000));
80058ec: 4b11 ldr r3, [pc, #68] ; (8005934 <HAL_ADC_ConfigChannel+0x28c>)
80058ee: 681b ldr r3, [r3, #0]
80058f0: 4a11 ldr r2, [pc, #68] ; (8005938 <HAL_ADC_ConfigChannel+0x290>)
80058f2: fba2 2303 umull r2, r3, r2, r3
80058f6: 0c9a lsrs r2, r3, #18
80058f8: 4613 mov r3, r2
80058fa: 009b lsls r3, r3, #2
80058fc: 4413 add r3, r2
80058fe: 005b lsls r3, r3, #1
8005900: 60fb str r3, [r7, #12]
while(counter != 0)
8005902: e002 b.n 800590a <HAL_ADC_ConfigChannel+0x262>
{
counter--;
8005904: 68fb ldr r3, [r7, #12]
8005906: 3b01 subs r3, #1
8005908: 60fb str r3, [r7, #12]
while(counter != 0)
800590a: 68fb ldr r3, [r7, #12]
800590c: 2b00 cmp r3, #0
800590e: d1f9 bne.n 8005904 <HAL_ADC_ConfigChannel+0x25c>
}
}
}
/* Process unlocked */
__HAL_UNLOCK(hadc);
8005910: 687b ldr r3, [r7, #4]
8005912: 2200 movs r2, #0
8005914: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Return function status */
return HAL_OK;
8005918: 2300 movs r3, #0
}
800591a: 4618 mov r0, r3
800591c: 3714 adds r7, #20
800591e: 46bd mov sp, r7
8005920: f85d 7b04 ldr.w r7, [sp], #4
8005924: 4770 bx lr
8005926: bf00 nop
8005928: 10000012 .word 0x10000012
800592c: 40012000 .word 0x40012000
8005930: 40012300 .word 0x40012300
8005934: 20000064 .word 0x20000064
8005938: 431bde83 .word 0x431bde83
0800593c <ADC_Init>:
* @param hadc pointer to a ADC_HandleTypeDef structure that contains
* the configuration information for the specified ADC.
* @retval None
*/
static void ADC_Init(ADC_HandleTypeDef* hadc)
{
800593c: b480 push {r7}
800593e: b083 sub sp, #12
8005940: af00 add r7, sp, #0
8005942: 6078 str r0, [r7, #4]
/* Set ADC parameters */
/* Set the ADC clock prescaler */
ADC->CCR &= ~(ADC_CCR_ADCPRE);
8005944: 4b78 ldr r3, [pc, #480] ; (8005b28 <ADC_Init+0x1ec>)
8005946: 685b ldr r3, [r3, #4]
8005948: 4a77 ldr r2, [pc, #476] ; (8005b28 <ADC_Init+0x1ec>)
800594a: f423 3340 bic.w r3, r3, #196608 ; 0x30000
800594e: 6053 str r3, [r2, #4]
ADC->CCR |= hadc->Init.ClockPrescaler;
8005950: 4b75 ldr r3, [pc, #468] ; (8005b28 <ADC_Init+0x1ec>)
8005952: 685a ldr r2, [r3, #4]
8005954: 687b ldr r3, [r7, #4]
8005956: 685b ldr r3, [r3, #4]
8005958: 4973 ldr r1, [pc, #460] ; (8005b28 <ADC_Init+0x1ec>)
800595a: 4313 orrs r3, r2
800595c: 604b str r3, [r1, #4]
/* Set ADC scan mode */
hadc->Instance->CR1 &= ~(ADC_CR1_SCAN);
800595e: 687b ldr r3, [r7, #4]
8005960: 681b ldr r3, [r3, #0]
8005962: 685a ldr r2, [r3, #4]
8005964: 687b ldr r3, [r7, #4]
8005966: 681b ldr r3, [r3, #0]
8005968: f422 7280 bic.w r2, r2, #256 ; 0x100
800596c: 605a str r2, [r3, #4]
hadc->Instance->CR1 |= ADC_CR1_SCANCONV(hadc->Init.ScanConvMode);
800596e: 687b ldr r3, [r7, #4]
8005970: 681b ldr r3, [r3, #0]
8005972: 6859 ldr r1, [r3, #4]
8005974: 687b ldr r3, [r7, #4]
8005976: 691b ldr r3, [r3, #16]
8005978: 021a lsls r2, r3, #8
800597a: 687b ldr r3, [r7, #4]
800597c: 681b ldr r3, [r3, #0]
800597e: 430a orrs r2, r1
8005980: 605a str r2, [r3, #4]
/* Set ADC resolution */
hadc->Instance->CR1 &= ~(ADC_CR1_RES);
8005982: 687b ldr r3, [r7, #4]
8005984: 681b ldr r3, [r3, #0]
8005986: 685a ldr r2, [r3, #4]
8005988: 687b ldr r3, [r7, #4]
800598a: 681b ldr r3, [r3, #0]
800598c: f022 7240 bic.w r2, r2, #50331648 ; 0x3000000
8005990: 605a str r2, [r3, #4]
hadc->Instance->CR1 |= hadc->Init.Resolution;
8005992: 687b ldr r3, [r7, #4]
8005994: 681b ldr r3, [r3, #0]
8005996: 6859 ldr r1, [r3, #4]
8005998: 687b ldr r3, [r7, #4]
800599a: 689a ldr r2, [r3, #8]
800599c: 687b ldr r3, [r7, #4]
800599e: 681b ldr r3, [r3, #0]
80059a0: 430a orrs r2, r1
80059a2: 605a str r2, [r3, #4]
/* Set ADC data alignment */
hadc->Instance->CR2 &= ~(ADC_CR2_ALIGN);
80059a4: 687b ldr r3, [r7, #4]
80059a6: 681b ldr r3, [r3, #0]
80059a8: 689a ldr r2, [r3, #8]
80059aa: 687b ldr r3, [r7, #4]
80059ac: 681b ldr r3, [r3, #0]
80059ae: f422 6200 bic.w r2, r2, #2048 ; 0x800
80059b2: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= hadc->Init.DataAlign;
80059b4: 687b ldr r3, [r7, #4]
80059b6: 681b ldr r3, [r3, #0]
80059b8: 6899 ldr r1, [r3, #8]
80059ba: 687b ldr r3, [r7, #4]
80059bc: 68da ldr r2, [r3, #12]
80059be: 687b ldr r3, [r7, #4]
80059c0: 681b ldr r3, [r3, #0]
80059c2: 430a orrs r2, r1
80059c4: 609a str r2, [r3, #8]
/* Enable external trigger if trigger selection is different of software */
/* start. */
/* Note: This configuration keeps the hardware feature of parameter */
/* ExternalTrigConvEdge "trigger edge none" equivalent to */
/* software start. */
if(hadc->Init.ExternalTrigConv != ADC_SOFTWARE_START)
80059c6: 687b ldr r3, [r7, #4]
80059c8: 6a9b ldr r3, [r3, #40] ; 0x28
80059ca: 4a58 ldr r2, [pc, #352] ; (8005b2c <ADC_Init+0x1f0>)
80059cc: 4293 cmp r3, r2
80059ce: d022 beq.n 8005a16 <ADC_Init+0xda>
{
/* Select external trigger to start conversion */
hadc->Instance->CR2 &= ~(ADC_CR2_EXTSEL);
80059d0: 687b ldr r3, [r7, #4]
80059d2: 681b ldr r3, [r3, #0]
80059d4: 689a ldr r2, [r3, #8]
80059d6: 687b ldr r3, [r7, #4]
80059d8: 681b ldr r3, [r3, #0]
80059da: f022 6270 bic.w r2, r2, #251658240 ; 0xf000000
80059de: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= hadc->Init.ExternalTrigConv;
80059e0: 687b ldr r3, [r7, #4]
80059e2: 681b ldr r3, [r3, #0]
80059e4: 6899 ldr r1, [r3, #8]
80059e6: 687b ldr r3, [r7, #4]
80059e8: 6a9a ldr r2, [r3, #40] ; 0x28
80059ea: 687b ldr r3, [r7, #4]
80059ec: 681b ldr r3, [r3, #0]
80059ee: 430a orrs r2, r1
80059f0: 609a str r2, [r3, #8]
/* Select external trigger polarity */
hadc->Instance->CR2 &= ~(ADC_CR2_EXTEN);
80059f2: 687b ldr r3, [r7, #4]
80059f4: 681b ldr r3, [r3, #0]
80059f6: 689a ldr r2, [r3, #8]
80059f8: 687b ldr r3, [r7, #4]
80059fa: 681b ldr r3, [r3, #0]
80059fc: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000
8005a00: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= hadc->Init.ExternalTrigConvEdge;
8005a02: 687b ldr r3, [r7, #4]
8005a04: 681b ldr r3, [r3, #0]
8005a06: 6899 ldr r1, [r3, #8]
8005a08: 687b ldr r3, [r7, #4]
8005a0a: 6ada ldr r2, [r3, #44] ; 0x2c
8005a0c: 687b ldr r3, [r7, #4]
8005a0e: 681b ldr r3, [r3, #0]
8005a10: 430a orrs r2, r1
8005a12: 609a str r2, [r3, #8]
8005a14: e00f b.n 8005a36 <ADC_Init+0xfa>
}
else
{
/* Reset the external trigger */
hadc->Instance->CR2 &= ~(ADC_CR2_EXTSEL);
8005a16: 687b ldr r3, [r7, #4]
8005a18: 681b ldr r3, [r3, #0]
8005a1a: 689a ldr r2, [r3, #8]
8005a1c: 687b ldr r3, [r7, #4]
8005a1e: 681b ldr r3, [r3, #0]
8005a20: f022 6270 bic.w r2, r2, #251658240 ; 0xf000000
8005a24: 609a str r2, [r3, #8]
hadc->Instance->CR2 &= ~(ADC_CR2_EXTEN);
8005a26: 687b ldr r3, [r7, #4]
8005a28: 681b ldr r3, [r3, #0]
8005a2a: 689a ldr r2, [r3, #8]
8005a2c: 687b ldr r3, [r7, #4]
8005a2e: 681b ldr r3, [r3, #0]
8005a30: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000
8005a34: 609a str r2, [r3, #8]
}
/* Enable or disable ADC continuous conversion mode */
hadc->Instance->CR2 &= ~(ADC_CR2_CONT);
8005a36: 687b ldr r3, [r7, #4]
8005a38: 681b ldr r3, [r3, #0]
8005a3a: 689a ldr r2, [r3, #8]
8005a3c: 687b ldr r3, [r7, #4]
8005a3e: 681b ldr r3, [r3, #0]
8005a40: f022 0202 bic.w r2, r2, #2
8005a44: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= ADC_CR2_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode);
8005a46: 687b ldr r3, [r7, #4]
8005a48: 681b ldr r3, [r3, #0]
8005a4a: 6899 ldr r1, [r3, #8]
8005a4c: 687b ldr r3, [r7, #4]
8005a4e: 699b ldr r3, [r3, #24]
8005a50: 005a lsls r2, r3, #1
8005a52: 687b ldr r3, [r7, #4]
8005a54: 681b ldr r3, [r3, #0]
8005a56: 430a orrs r2, r1
8005a58: 609a str r2, [r3, #8]
if(hadc->Init.DiscontinuousConvMode != DISABLE)
8005a5a: 687b ldr r3, [r7, #4]
8005a5c: f893 3020 ldrb.w r3, [r3, #32]
8005a60: 2b00 cmp r3, #0
8005a62: d01b beq.n 8005a9c <ADC_Init+0x160>
{
assert_param(IS_ADC_REGULAR_DISC_NUMBER(hadc->Init.NbrOfDiscConversion));
/* Enable the selected ADC regular discontinuous mode */
hadc->Instance->CR1 |= (uint32_t)ADC_CR1_DISCEN;
8005a64: 687b ldr r3, [r7, #4]
8005a66: 681b ldr r3, [r3, #0]
8005a68: 685a ldr r2, [r3, #4]
8005a6a: 687b ldr r3, [r7, #4]
8005a6c: 681b ldr r3, [r3, #0]
8005a6e: f442 6200 orr.w r2, r2, #2048 ; 0x800
8005a72: 605a str r2, [r3, #4]
/* Set the number of channels to be converted in discontinuous mode */
hadc->Instance->CR1 &= ~(ADC_CR1_DISCNUM);
8005a74: 687b ldr r3, [r7, #4]
8005a76: 681b ldr r3, [r3, #0]
8005a78: 685a ldr r2, [r3, #4]
8005a7a: 687b ldr r3, [r7, #4]
8005a7c: 681b ldr r3, [r3, #0]
8005a7e: f422 4260 bic.w r2, r2, #57344 ; 0xe000
8005a82: 605a str r2, [r3, #4]
hadc->Instance->CR1 |= ADC_CR1_DISCONTINUOUS(hadc->Init.NbrOfDiscConversion);
8005a84: 687b ldr r3, [r7, #4]
8005a86: 681b ldr r3, [r3, #0]
8005a88: 6859 ldr r1, [r3, #4]
8005a8a: 687b ldr r3, [r7, #4]
8005a8c: 6a5b ldr r3, [r3, #36] ; 0x24
8005a8e: 3b01 subs r3, #1
8005a90: 035a lsls r2, r3, #13
8005a92: 687b ldr r3, [r7, #4]
8005a94: 681b ldr r3, [r3, #0]
8005a96: 430a orrs r2, r1
8005a98: 605a str r2, [r3, #4]
8005a9a: e007 b.n 8005aac <ADC_Init+0x170>
}
else
{
/* Disable the selected ADC regular discontinuous mode */
hadc->Instance->CR1 &= ~(ADC_CR1_DISCEN);
8005a9c: 687b ldr r3, [r7, #4]
8005a9e: 681b ldr r3, [r3, #0]
8005aa0: 685a ldr r2, [r3, #4]
8005aa2: 687b ldr r3, [r7, #4]
8005aa4: 681b ldr r3, [r3, #0]
8005aa6: f422 6200 bic.w r2, r2, #2048 ; 0x800
8005aaa: 605a str r2, [r3, #4]
}
/* Set ADC number of conversion */
hadc->Instance->SQR1 &= ~(ADC_SQR1_L);
8005aac: 687b ldr r3, [r7, #4]
8005aae: 681b ldr r3, [r3, #0]
8005ab0: 6ada ldr r2, [r3, #44] ; 0x2c
8005ab2: 687b ldr r3, [r7, #4]
8005ab4: 681b ldr r3, [r3, #0]
8005ab6: f422 0270 bic.w r2, r2, #15728640 ; 0xf00000
8005aba: 62da str r2, [r3, #44] ; 0x2c
hadc->Instance->SQR1 |= ADC_SQR1(hadc->Init.NbrOfConversion);
8005abc: 687b ldr r3, [r7, #4]
8005abe: 681b ldr r3, [r3, #0]
8005ac0: 6ad9 ldr r1, [r3, #44] ; 0x2c
8005ac2: 687b ldr r3, [r7, #4]
8005ac4: 69db ldr r3, [r3, #28]
8005ac6: 3b01 subs r3, #1
8005ac8: 051a lsls r2, r3, #20
8005aca: 687b ldr r3, [r7, #4]
8005acc: 681b ldr r3, [r3, #0]
8005ace: 430a orrs r2, r1
8005ad0: 62da str r2, [r3, #44] ; 0x2c
/* Enable or disable ADC DMA continuous request */
hadc->Instance->CR2 &= ~(ADC_CR2_DDS);
8005ad2: 687b ldr r3, [r7, #4]
8005ad4: 681b ldr r3, [r3, #0]
8005ad6: 689a ldr r2, [r3, #8]
8005ad8: 687b ldr r3, [r7, #4]
8005ada: 681b ldr r3, [r3, #0]
8005adc: f422 7200 bic.w r2, r2, #512 ; 0x200
8005ae0: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= ADC_CR2_DMAContReq((uint32_t)hadc->Init.DMAContinuousRequests);
8005ae2: 687b ldr r3, [r7, #4]
8005ae4: 681b ldr r3, [r3, #0]
8005ae6: 6899 ldr r1, [r3, #8]
8005ae8: 687b ldr r3, [r7, #4]
8005aea: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
8005aee: 025a lsls r2, r3, #9
8005af0: 687b ldr r3, [r7, #4]
8005af2: 681b ldr r3, [r3, #0]
8005af4: 430a orrs r2, r1
8005af6: 609a str r2, [r3, #8]
/* Enable or disable ADC end of conversion selection */
hadc->Instance->CR2 &= ~(ADC_CR2_EOCS);
8005af8: 687b ldr r3, [r7, #4]
8005afa: 681b ldr r3, [r3, #0]
8005afc: 689a ldr r2, [r3, #8]
8005afe: 687b ldr r3, [r7, #4]
8005b00: 681b ldr r3, [r3, #0]
8005b02: f422 6280 bic.w r2, r2, #1024 ; 0x400
8005b06: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= ADC_CR2_EOCSelection(hadc->Init.EOCSelection);
8005b08: 687b ldr r3, [r7, #4]
8005b0a: 681b ldr r3, [r3, #0]
8005b0c: 6899 ldr r1, [r3, #8]
8005b0e: 687b ldr r3, [r7, #4]
8005b10: 695b ldr r3, [r3, #20]
8005b12: 029a lsls r2, r3, #10
8005b14: 687b ldr r3, [r7, #4]
8005b16: 681b ldr r3, [r3, #0]
8005b18: 430a orrs r2, r1
8005b1a: 609a str r2, [r3, #8]
}
8005b1c: bf00 nop
8005b1e: 370c adds r7, #12
8005b20: 46bd mov sp, r7
8005b22: f85d 7b04 ldr.w r7, [sp], #4
8005b26: 4770 bx lr
8005b28: 40012300 .word 0x40012300
8005b2c: 0f000001 .word 0x0f000001
08005b30 <__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)
{
8005b30: b480 push {r7}
8005b32: b085 sub sp, #20
8005b34: af00 add r7, sp, #0
8005b36: 6078 str r0, [r7, #4]
uint32_t reg_value;
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8005b38: 687b ldr r3, [r7, #4]
8005b3a: f003 0307 and.w r3, r3, #7
8005b3e: 60fb str r3, [r7, #12]
reg_value = SCB->AIRCR; /* read old register configuration */
8005b40: 4b0b ldr r3, [pc, #44] ; (8005b70 <__NVIC_SetPriorityGrouping+0x40>)
8005b42: 68db ldr r3, [r3, #12]
8005b44: 60bb str r3, [r7, #8]
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
8005b46: 68ba ldr r2, [r7, #8]
8005b48: f64f 03ff movw r3, #63743 ; 0xf8ff
8005b4c: 4013 ands r3, r2
8005b4e: 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 */
8005b50: 68fb ldr r3, [r7, #12]
8005b52: 021a lsls r2, r3, #8
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
8005b54: 68bb ldr r3, [r7, #8]
8005b56: 431a orrs r2, r3
reg_value = (reg_value |
8005b58: 4b06 ldr r3, [pc, #24] ; (8005b74 <__NVIC_SetPriorityGrouping+0x44>)
8005b5a: 4313 orrs r3, r2
8005b5c: 60bb str r3, [r7, #8]
SCB->AIRCR = reg_value;
8005b5e: 4a04 ldr r2, [pc, #16] ; (8005b70 <__NVIC_SetPriorityGrouping+0x40>)
8005b60: 68bb ldr r3, [r7, #8]
8005b62: 60d3 str r3, [r2, #12]
}
8005b64: bf00 nop
8005b66: 3714 adds r7, #20
8005b68: 46bd mov sp, r7
8005b6a: f85d 7b04 ldr.w r7, [sp], #4
8005b6e: 4770 bx lr
8005b70: e000ed00 .word 0xe000ed00
8005b74: 05fa0000 .word 0x05fa0000
08005b78 <__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)
{
8005b78: b480 push {r7}
8005b7a: af00 add r7, sp, #0
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
8005b7c: 4b04 ldr r3, [pc, #16] ; (8005b90 <__NVIC_GetPriorityGrouping+0x18>)
8005b7e: 68db ldr r3, [r3, #12]
8005b80: 0a1b lsrs r3, r3, #8
8005b82: f003 0307 and.w r3, r3, #7
}
8005b86: 4618 mov r0, r3
8005b88: 46bd mov sp, r7
8005b8a: f85d 7b04 ldr.w r7, [sp], #4
8005b8e: 4770 bx lr
8005b90: e000ed00 .word 0xe000ed00
08005b94 <__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)
{
8005b94: b480 push {r7}
8005b96: b083 sub sp, #12
8005b98: af00 add r7, sp, #0
8005b9a: 4603 mov r3, r0
8005b9c: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
8005b9e: f997 3007 ldrsb.w r3, [r7, #7]
8005ba2: 2b00 cmp r3, #0
8005ba4: db0b blt.n 8005bbe <__NVIC_EnableIRQ+0x2a>
{
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
8005ba6: 79fb ldrb r3, [r7, #7]
8005ba8: f003 021f and.w r2, r3, #31
8005bac: 4907 ldr r1, [pc, #28] ; (8005bcc <__NVIC_EnableIRQ+0x38>)
8005bae: f997 3007 ldrsb.w r3, [r7, #7]
8005bb2: 095b lsrs r3, r3, #5
8005bb4: 2001 movs r0, #1
8005bb6: fa00 f202 lsl.w r2, r0, r2
8005bba: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
8005bbe: bf00 nop
8005bc0: 370c adds r7, #12
8005bc2: 46bd mov sp, r7
8005bc4: f85d 7b04 ldr.w r7, [sp], #4
8005bc8: 4770 bx lr
8005bca: bf00 nop
8005bcc: e000e100 .word 0xe000e100
08005bd0 <__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)
{
8005bd0: b480 push {r7}
8005bd2: b083 sub sp, #12
8005bd4: af00 add r7, sp, #0
8005bd6: 4603 mov r3, r0
8005bd8: 6039 str r1, [r7, #0]
8005bda: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
8005bdc: f997 3007 ldrsb.w r3, [r7, #7]
8005be0: 2b00 cmp r3, #0
8005be2: db0a blt.n 8005bfa <__NVIC_SetPriority+0x2a>
{
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8005be4: 683b ldr r3, [r7, #0]
8005be6: b2da uxtb r2, r3
8005be8: 490c ldr r1, [pc, #48] ; (8005c1c <__NVIC_SetPriority+0x4c>)
8005bea: f997 3007 ldrsb.w r3, [r7, #7]
8005bee: 0112 lsls r2, r2, #4
8005bf0: b2d2 uxtb r2, r2
8005bf2: 440b add r3, r1
8005bf4: f883 2300 strb.w r2, [r3, #768] ; 0x300
}
else
{
SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
}
}
8005bf8: e00a b.n 8005c10 <__NVIC_SetPriority+0x40>
SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8005bfa: 683b ldr r3, [r7, #0]
8005bfc: b2da uxtb r2, r3
8005bfe: 4908 ldr r1, [pc, #32] ; (8005c20 <__NVIC_SetPriority+0x50>)
8005c00: 79fb ldrb r3, [r7, #7]
8005c02: f003 030f and.w r3, r3, #15
8005c06: 3b04 subs r3, #4
8005c08: 0112 lsls r2, r2, #4
8005c0a: b2d2 uxtb r2, r2
8005c0c: 440b add r3, r1
8005c0e: 761a strb r2, [r3, #24]
}
8005c10: bf00 nop
8005c12: 370c adds r7, #12
8005c14: 46bd mov sp, r7
8005c16: f85d 7b04 ldr.w r7, [sp], #4
8005c1a: 4770 bx lr
8005c1c: e000e100 .word 0xe000e100
8005c20: e000ed00 .word 0xe000ed00
08005c24 <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)
{
8005c24: b480 push {r7}
8005c26: b089 sub sp, #36 ; 0x24
8005c28: af00 add r7, sp, #0
8005c2a: 60f8 str r0, [r7, #12]
8005c2c: 60b9 str r1, [r7, #8]
8005c2e: 607a str r2, [r7, #4]
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
8005c30: 68fb ldr r3, [r7, #12]
8005c32: f003 0307 and.w r3, r3, #7
8005c36: 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);
8005c38: 69fb ldr r3, [r7, #28]
8005c3a: f1c3 0307 rsb r3, r3, #7
8005c3e: 2b04 cmp r3, #4
8005c40: bf28 it cs
8005c42: 2304 movcs r3, #4
8005c44: 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));
8005c46: 69fb ldr r3, [r7, #28]
8005c48: 3304 adds r3, #4
8005c4a: 2b06 cmp r3, #6
8005c4c: d902 bls.n 8005c54 <NVIC_EncodePriority+0x30>
8005c4e: 69fb ldr r3, [r7, #28]
8005c50: 3b03 subs r3, #3
8005c52: e000 b.n 8005c56 <NVIC_EncodePriority+0x32>
8005c54: 2300 movs r3, #0
8005c56: 617b str r3, [r7, #20]
return (
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
8005c58: f04f 32ff mov.w r2, #4294967295
8005c5c: 69bb ldr r3, [r7, #24]
8005c5e: fa02 f303 lsl.w r3, r2, r3
8005c62: 43da mvns r2, r3
8005c64: 68bb ldr r3, [r7, #8]
8005c66: 401a ands r2, r3
8005c68: 697b ldr r3, [r7, #20]
8005c6a: 409a lsls r2, r3
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
8005c6c: f04f 31ff mov.w r1, #4294967295
8005c70: 697b ldr r3, [r7, #20]
8005c72: fa01 f303 lsl.w r3, r1, r3
8005c76: 43d9 mvns r1, r3
8005c78: 687b ldr r3, [r7, #4]
8005c7a: 400b ands r3, r1
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
8005c7c: 4313 orrs r3, r2
);
}
8005c7e: 4618 mov r0, r3
8005c80: 3724 adds r7, #36 ; 0x24
8005c82: 46bd mov sp, r7
8005c84: f85d 7b04 ldr.w r7, [sp], #4
8005c88: 4770 bx lr
08005c8a <HAL_NVIC_SetPriorityGrouping>:
* @note When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible.
* The pending IRQ priority will be managed only by the subpriority.
* @retval None
*/
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
{
8005c8a: b580 push {r7, lr}
8005c8c: b082 sub sp, #8
8005c8e: af00 add r7, sp, #0
8005c90: 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);
8005c92: 6878 ldr r0, [r7, #4]
8005c94: f7ff ff4c bl 8005b30 <__NVIC_SetPriorityGrouping>
}
8005c98: bf00 nop
8005c9a: 3708 adds r7, #8
8005c9c: 46bd mov sp, r7
8005c9e: bd80 pop {r7, pc}
08005ca0 <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)
{
8005ca0: b580 push {r7, lr}
8005ca2: b086 sub sp, #24
8005ca4: af00 add r7, sp, #0
8005ca6: 4603 mov r3, r0
8005ca8: 60b9 str r1, [r7, #8]
8005caa: 607a str r2, [r7, #4]
8005cac: 73fb strb r3, [r7, #15]
uint32_t prioritygroup = 0x00;
8005cae: 2300 movs r3, #0
8005cb0: 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();
8005cb2: f7ff ff61 bl 8005b78 <__NVIC_GetPriorityGrouping>
8005cb6: 6178 str r0, [r7, #20]
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
8005cb8: 687a ldr r2, [r7, #4]
8005cba: 68b9 ldr r1, [r7, #8]
8005cbc: 6978 ldr r0, [r7, #20]
8005cbe: f7ff ffb1 bl 8005c24 <NVIC_EncodePriority>
8005cc2: 4602 mov r2, r0
8005cc4: f997 300f ldrsb.w r3, [r7, #15]
8005cc8: 4611 mov r1, r2
8005cca: 4618 mov r0, r3
8005ccc: f7ff ff80 bl 8005bd0 <__NVIC_SetPriority>
}
8005cd0: bf00 nop
8005cd2: 3718 adds r7, #24
8005cd4: 46bd mov sp, r7
8005cd6: bd80 pop {r7, pc}
08005cd8 <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 (stm32f7xxxx.h))
* @retval None
*/
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
{
8005cd8: b580 push {r7, lr}
8005cda: b082 sub sp, #8
8005cdc: af00 add r7, sp, #0
8005cde: 4603 mov r3, r0
8005ce0: 71fb strb r3, [r7, #7]
/* Check the parameters */
assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
/* Enable interrupt */
NVIC_EnableIRQ(IRQn);
8005ce2: f997 3007 ldrsb.w r3, [r7, #7]
8005ce6: 4618 mov r0, r3
8005ce8: f7ff ff54 bl 8005b94 <__NVIC_EnableIRQ>
}
8005cec: bf00 nop
8005cee: 3708 adds r7, #8
8005cf0: 46bd mov sp, r7
8005cf2: bd80 pop {r7, pc}
08005cf4 <HAL_CRC_Init>:
* parameters in the CRC_InitTypeDef and create the associated handle.
* @param hcrc CRC handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc)
{
8005cf4: b580 push {r7, lr}
8005cf6: b082 sub sp, #8
8005cf8: af00 add r7, sp, #0
8005cfa: 6078 str r0, [r7, #4]
/* Check the CRC handle allocation */
if (hcrc == NULL)
8005cfc: 687b ldr r3, [r7, #4]
8005cfe: 2b00 cmp r3, #0
8005d00: d101 bne.n 8005d06 <HAL_CRC_Init+0x12>
{
return HAL_ERROR;
8005d02: 2301 movs r3, #1
8005d04: e054 b.n 8005db0 <HAL_CRC_Init+0xbc>
}
/* Check the parameters */
assert_param(IS_CRC_ALL_INSTANCE(hcrc->Instance));
if (hcrc->State == HAL_CRC_STATE_RESET)
8005d06: 687b ldr r3, [r7, #4]
8005d08: 7f5b ldrb r3, [r3, #29]
8005d0a: b2db uxtb r3, r3
8005d0c: 2b00 cmp r3, #0
8005d0e: d105 bne.n 8005d1c <HAL_CRC_Init+0x28>
{
/* Allocate lock resource and initialize it */
hcrc->Lock = HAL_UNLOCKED;
8005d10: 687b ldr r3, [r7, #4]
8005d12: 2200 movs r2, #0
8005d14: 771a strb r2, [r3, #28]
/* Init the low level hardware */
HAL_CRC_MspInit(hcrc);
8005d16: 6878 ldr r0, [r7, #4]
8005d18: f7fe fc90 bl 800463c <HAL_CRC_MspInit>
}
hcrc->State = HAL_CRC_STATE_BUSY;
8005d1c: 687b ldr r3, [r7, #4]
8005d1e: 2202 movs r2, #2
8005d20: 775a strb r2, [r3, #29]
/* check whether or not non-default generating polynomial has been
* picked up by user */
assert_param(IS_DEFAULT_POLYNOMIAL(hcrc->Init.DefaultPolynomialUse));
if (hcrc->Init.DefaultPolynomialUse == DEFAULT_POLYNOMIAL_ENABLE)
8005d22: 687b ldr r3, [r7, #4]
8005d24: 791b ldrb r3, [r3, #4]
8005d26: 2b00 cmp r3, #0
8005d28: d10c bne.n 8005d44 <HAL_CRC_Init+0x50>
{
/* initialize peripheral with default generating polynomial */
WRITE_REG(hcrc->Instance->POL, DEFAULT_CRC32_POLY);
8005d2a: 687b ldr r3, [r7, #4]
8005d2c: 681b ldr r3, [r3, #0]
8005d2e: 4a22 ldr r2, [pc, #136] ; (8005db8 <HAL_CRC_Init+0xc4>)
8005d30: 615a str r2, [r3, #20]
MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, CRC_POLYLENGTH_32B);
8005d32: 687b ldr r3, [r7, #4]
8005d34: 681b ldr r3, [r3, #0]
8005d36: 689a ldr r2, [r3, #8]
8005d38: 687b ldr r3, [r7, #4]
8005d3a: 681b ldr r3, [r3, #0]
8005d3c: f022 0218 bic.w r2, r2, #24
8005d40: 609a str r2, [r3, #8]
8005d42: e00c b.n 8005d5e <HAL_CRC_Init+0x6a>
}
else
{
/* initialize CRC peripheral with generating polynomial defined by user */
if (HAL_CRCEx_Polynomial_Set(hcrc, hcrc->Init.GeneratingPolynomial, hcrc->Init.CRCLength) != HAL_OK)
8005d44: 687b ldr r3, [r7, #4]
8005d46: 6899 ldr r1, [r3, #8]
8005d48: 687b ldr r3, [r7, #4]
8005d4a: 68db ldr r3, [r3, #12]
8005d4c: 461a mov r2, r3
8005d4e: 6878 ldr r0, [r7, #4]
8005d50: f000 f834 bl 8005dbc <HAL_CRCEx_Polynomial_Set>
8005d54: 4603 mov r3, r0
8005d56: 2b00 cmp r3, #0
8005d58: d001 beq.n 8005d5e <HAL_CRC_Init+0x6a>
{
return HAL_ERROR;
8005d5a: 2301 movs r3, #1
8005d5c: e028 b.n 8005db0 <HAL_CRC_Init+0xbc>
}
/* check whether or not non-default CRC initial value has been
* picked up by user */
assert_param(IS_DEFAULT_INIT_VALUE(hcrc->Init.DefaultInitValueUse));
if (hcrc->Init.DefaultInitValueUse == DEFAULT_INIT_VALUE_ENABLE)
8005d5e: 687b ldr r3, [r7, #4]
8005d60: 795b ldrb r3, [r3, #5]
8005d62: 2b00 cmp r3, #0
8005d64: d105 bne.n 8005d72 <HAL_CRC_Init+0x7e>
{
WRITE_REG(hcrc->Instance->INIT, DEFAULT_CRC_INITVALUE);
8005d66: 687b ldr r3, [r7, #4]
8005d68: 681b ldr r3, [r3, #0]
8005d6a: f04f 32ff mov.w r2, #4294967295
8005d6e: 611a str r2, [r3, #16]
8005d70: e004 b.n 8005d7c <HAL_CRC_Init+0x88>
}
else
{
WRITE_REG(hcrc->Instance->INIT, hcrc->Init.InitValue);
8005d72: 687b ldr r3, [r7, #4]
8005d74: 681b ldr r3, [r3, #0]
8005d76: 687a ldr r2, [r7, #4]
8005d78: 6912 ldr r2, [r2, #16]
8005d7a: 611a str r2, [r3, #16]
}
/* set input data inversion mode */
assert_param(IS_CRC_INPUTDATA_INVERSION_MODE(hcrc->Init.InputDataInversionMode));
MODIFY_REG(hcrc->Instance->CR, CRC_CR_REV_IN, hcrc->Init.InputDataInversionMode);
8005d7c: 687b ldr r3, [r7, #4]
8005d7e: 681b ldr r3, [r3, #0]
8005d80: 689b ldr r3, [r3, #8]
8005d82: f023 0160 bic.w r1, r3, #96 ; 0x60
8005d86: 687b ldr r3, [r7, #4]
8005d88: 695a ldr r2, [r3, #20]
8005d8a: 687b ldr r3, [r7, #4]
8005d8c: 681b ldr r3, [r3, #0]
8005d8e: 430a orrs r2, r1
8005d90: 609a str r2, [r3, #8]
/* set output data inversion mode */
assert_param(IS_CRC_OUTPUTDATA_INVERSION_MODE(hcrc->Init.OutputDataInversionMode));
MODIFY_REG(hcrc->Instance->CR, CRC_CR_REV_OUT, hcrc->Init.OutputDataInversionMode);
8005d92: 687b ldr r3, [r7, #4]
8005d94: 681b ldr r3, [r3, #0]
8005d96: 689b ldr r3, [r3, #8]
8005d98: f023 0180 bic.w r1, r3, #128 ; 0x80
8005d9c: 687b ldr r3, [r7, #4]
8005d9e: 699a ldr r2, [r3, #24]
8005da0: 687b ldr r3, [r7, #4]
8005da2: 681b ldr r3, [r3, #0]
8005da4: 430a orrs r2, r1
8005da6: 609a str r2, [r3, #8]
/* makes sure the input data format (bytes, halfwords or words stream)
* is properly specified by user */
assert_param(IS_CRC_INPUTDATA_FORMAT(hcrc->InputDataFormat));
/* Change CRC peripheral state */
hcrc->State = HAL_CRC_STATE_READY;
8005da8: 687b ldr r3, [r7, #4]
8005daa: 2201 movs r2, #1
8005dac: 775a strb r2, [r3, #29]
/* Return function status */
return HAL_OK;
8005dae: 2300 movs r3, #0
}
8005db0: 4618 mov r0, r3
8005db2: 3708 adds r7, #8
8005db4: 46bd mov sp, r7
8005db6: bd80 pop {r7, pc}
8005db8: 04c11db7 .word 0x04c11db7
08005dbc <HAL_CRCEx_Polynomial_Set>:
* @arg @ref CRC_POLYLENGTH_16B 16-bit long CRC (generating polynomial of degree 16)
* @arg @ref CRC_POLYLENGTH_32B 32-bit long CRC (generating polynomial of degree 32)
* @retval HAL status
*/
HAL_StatusTypeDef HAL_CRCEx_Polynomial_Set(CRC_HandleTypeDef *hcrc, uint32_t Pol, uint32_t PolyLength)
{
8005dbc: b480 push {r7}
8005dbe: b087 sub sp, #28
8005dc0: af00 add r7, sp, #0
8005dc2: 60f8 str r0, [r7, #12]
8005dc4: 60b9 str r1, [r7, #8]
8005dc6: 607a str r2, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8005dc8: 2300 movs r3, #0
8005dca: 75fb strb r3, [r7, #23]
uint32_t msb = 31U; /* polynomial degree is 32 at most, so msb is initialized to max value */
8005dcc: 231f movs r3, #31
8005dce: 613b str r3, [r7, #16]
* definition. HAL_ERROR is reported if Pol degree is
* larger than that indicated by PolyLength.
* Look for MSB position: msb will contain the degree of
* the second to the largest polynomial member. E.g., for
* X^7 + X^6 + X^5 + X^2 + 1, msb = 6. */
while ((msb-- > 0U) && ((Pol & ((uint32_t)(0x1U) << (msb & 0x1FU))) == 0U))
8005dd0: bf00 nop
8005dd2: 693b ldr r3, [r7, #16]
8005dd4: 1e5a subs r2, r3, #1
8005dd6: 613a str r2, [r7, #16]
8005dd8: 2b00 cmp r3, #0
8005dda: d009 beq.n 8005df0 <HAL_CRCEx_Polynomial_Set+0x34>
8005ddc: 693b ldr r3, [r7, #16]
8005dde: f003 031f and.w r3, r3, #31
8005de2: 68ba ldr r2, [r7, #8]
8005de4: fa22 f303 lsr.w r3, r2, r3
8005de8: f003 0301 and.w r3, r3, #1
8005dec: 2b00 cmp r3, #0
8005dee: d0f0 beq.n 8005dd2 <HAL_CRCEx_Polynomial_Set+0x16>
{
}
switch (PolyLength)
8005df0: 687b ldr r3, [r7, #4]
8005df2: 2b18 cmp r3, #24
8005df4: d846 bhi.n 8005e84 <HAL_CRCEx_Polynomial_Set+0xc8>
8005df6: a201 add r2, pc, #4 ; (adr r2, 8005dfc <HAL_CRCEx_Polynomial_Set+0x40>)
8005df8: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8005dfc: 08005e8b .word 0x08005e8b
8005e00: 08005e85 .word 0x08005e85
8005e04: 08005e85 .word 0x08005e85
8005e08: 08005e85 .word 0x08005e85
8005e0c: 08005e85 .word 0x08005e85
8005e10: 08005e85 .word 0x08005e85
8005e14: 08005e85 .word 0x08005e85
8005e18: 08005e85 .word 0x08005e85
8005e1c: 08005e79 .word 0x08005e79
8005e20: 08005e85 .word 0x08005e85
8005e24: 08005e85 .word 0x08005e85
8005e28: 08005e85 .word 0x08005e85
8005e2c: 08005e85 .word 0x08005e85
8005e30: 08005e85 .word 0x08005e85
8005e34: 08005e85 .word 0x08005e85
8005e38: 08005e85 .word 0x08005e85
8005e3c: 08005e6d .word 0x08005e6d
8005e40: 08005e85 .word 0x08005e85
8005e44: 08005e85 .word 0x08005e85
8005e48: 08005e85 .word 0x08005e85
8005e4c: 08005e85 .word 0x08005e85
8005e50: 08005e85 .word 0x08005e85
8005e54: 08005e85 .word 0x08005e85
8005e58: 08005e85 .word 0x08005e85
8005e5c: 08005e61 .word 0x08005e61
{
case CRC_POLYLENGTH_7B:
if (msb >= HAL_CRC_LENGTH_7B)
8005e60: 693b ldr r3, [r7, #16]
8005e62: 2b06 cmp r3, #6
8005e64: d913 bls.n 8005e8e <HAL_CRCEx_Polynomial_Set+0xd2>
{
status = HAL_ERROR;
8005e66: 2301 movs r3, #1
8005e68: 75fb strb r3, [r7, #23]
}
break;
8005e6a: e010 b.n 8005e8e <HAL_CRCEx_Polynomial_Set+0xd2>
case CRC_POLYLENGTH_8B:
if (msb >= HAL_CRC_LENGTH_8B)
8005e6c: 693b ldr r3, [r7, #16]
8005e6e: 2b07 cmp r3, #7
8005e70: d90f bls.n 8005e92 <HAL_CRCEx_Polynomial_Set+0xd6>
{
status = HAL_ERROR;
8005e72: 2301 movs r3, #1
8005e74: 75fb strb r3, [r7, #23]
}
break;
8005e76: e00c b.n 8005e92 <HAL_CRCEx_Polynomial_Set+0xd6>
case CRC_POLYLENGTH_16B:
if (msb >= HAL_CRC_LENGTH_16B)
8005e78: 693b ldr r3, [r7, #16]
8005e7a: 2b0f cmp r3, #15
8005e7c: d90b bls.n 8005e96 <HAL_CRCEx_Polynomial_Set+0xda>
{
status = HAL_ERROR;
8005e7e: 2301 movs r3, #1
8005e80: 75fb strb r3, [r7, #23]
}
break;
8005e82: e008 b.n 8005e96 <HAL_CRCEx_Polynomial_Set+0xda>
case CRC_POLYLENGTH_32B:
/* no polynomial definition vs. polynomial length issue possible */
break;
default:
status = HAL_ERROR;
8005e84: 2301 movs r3, #1
8005e86: 75fb strb r3, [r7, #23]
break;
8005e88: e006 b.n 8005e98 <HAL_CRCEx_Polynomial_Set+0xdc>
break;
8005e8a: bf00 nop
8005e8c: e004 b.n 8005e98 <HAL_CRCEx_Polynomial_Set+0xdc>
break;
8005e8e: bf00 nop
8005e90: e002 b.n 8005e98 <HAL_CRCEx_Polynomial_Set+0xdc>
break;
8005e92: bf00 nop
8005e94: e000 b.n 8005e98 <HAL_CRCEx_Polynomial_Set+0xdc>
break;
8005e96: bf00 nop
}
if (status == HAL_OK)
8005e98: 7dfb ldrb r3, [r7, #23]
8005e9a: 2b00 cmp r3, #0
8005e9c: d10d bne.n 8005eba <HAL_CRCEx_Polynomial_Set+0xfe>
{
/* set generating polynomial */
WRITE_REG(hcrc->Instance->POL, Pol);
8005e9e: 68fb ldr r3, [r7, #12]
8005ea0: 681b ldr r3, [r3, #0]
8005ea2: 68ba ldr r2, [r7, #8]
8005ea4: 615a str r2, [r3, #20]
/* set generating polynomial size */
MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, PolyLength);
8005ea6: 68fb ldr r3, [r7, #12]
8005ea8: 681b ldr r3, [r3, #0]
8005eaa: 689b ldr r3, [r3, #8]
8005eac: f023 0118 bic.w r1, r3, #24
8005eb0: 68fb ldr r3, [r7, #12]
8005eb2: 681b ldr r3, [r3, #0]
8005eb4: 687a ldr r2, [r7, #4]
8005eb6: 430a orrs r2, r1
8005eb8: 609a str r2, [r3, #8]
}
/* Return function status */
return status;
8005eba: 7dfb ldrb r3, [r7, #23]
}
8005ebc: 4618 mov r0, r3
8005ebe: 371c adds r7, #28
8005ec0: 46bd mov sp, r7
8005ec2: f85d 7b04 ldr.w r7, [sp], #4
8005ec6: 4770 bx lr
08005ec8 <HAL_DAC_Init>:
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
* the configuration information for the specified DAC.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DAC_Init(DAC_HandleTypeDef* hdac)
{
8005ec8: b580 push {r7, lr}
8005eca: b082 sub sp, #8
8005ecc: af00 add r7, sp, #0
8005ece: 6078 str r0, [r7, #4]
/* Check DAC handle */
if(hdac == NULL)
8005ed0: 687b ldr r3, [r7, #4]
8005ed2: 2b00 cmp r3, #0
8005ed4: d101 bne.n 8005eda <HAL_DAC_Init+0x12>
{
return HAL_ERROR;
8005ed6: 2301 movs r3, #1
8005ed8: e014 b.n 8005f04 <HAL_DAC_Init+0x3c>
}
/* Check the parameters */
assert_param(IS_DAC_ALL_INSTANCE(hdac->Instance));
if(hdac->State == HAL_DAC_STATE_RESET)
8005eda: 687b ldr r3, [r7, #4]
8005edc: 791b ldrb r3, [r3, #4]
8005ede: b2db uxtb r3, r3
8005ee0: 2b00 cmp r3, #0
8005ee2: d105 bne.n 8005ef0 <HAL_DAC_Init+0x28>
{
hdac->MspInitCallback = HAL_DAC_MspInit;
}
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
/* Allocate lock resource and initialize it */
hdac->Lock = HAL_UNLOCKED;
8005ee4: 687b ldr r3, [r7, #4]
8005ee6: 2200 movs r2, #0
8005ee8: 715a strb r2, [r3, #5]
#if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
/* Init the low level hardware */
hdac->MspInitCallback(hdac);
#else
/* Init the low level hardware */
HAL_DAC_MspInit(hdac);
8005eea: 6878 ldr r0, [r7, #4]
8005eec: f7fe fbc6 bl 800467c <HAL_DAC_MspInit>
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
}
/* Initialize the DAC state*/
hdac->State = HAL_DAC_STATE_BUSY;
8005ef0: 687b ldr r3, [r7, #4]
8005ef2: 2202 movs r2, #2
8005ef4: 711a strb r2, [r3, #4]
/* Set DAC error code to none */
hdac->ErrorCode = HAL_DAC_ERROR_NONE;
8005ef6: 687b ldr r3, [r7, #4]
8005ef8: 2200 movs r2, #0
8005efa: 611a str r2, [r3, #16]
/* Initialize the DAC state*/
hdac->State = HAL_DAC_STATE_READY;
8005efc: 687b ldr r3, [r7, #4]
8005efe: 2201 movs r2, #1
8005f00: 711a strb r2, [r3, #4]
/* Return function status */
return HAL_OK;
8005f02: 2300 movs r3, #0
}
8005f04: 4618 mov r0, r3
8005f06: 3708 adds r7, #8
8005f08: 46bd mov sp, r7
8005f0a: bd80 pop {r7, pc}
08005f0c <HAL_DAC_IRQHandler>:
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
* the configuration information for the specified DAC.
* @retval None
*/
void HAL_DAC_IRQHandler(DAC_HandleTypeDef* hdac)
{
8005f0c: b580 push {r7, lr}
8005f0e: b082 sub sp, #8
8005f10: af00 add r7, sp, #0
8005f12: 6078 str r0, [r7, #4]
/* Check underrun channel 1 flag */
if(__HAL_DAC_GET_FLAG(hdac, DAC_FLAG_DMAUDR1))
8005f14: 687b ldr r3, [r7, #4]
8005f16: 681b ldr r3, [r3, #0]
8005f18: 6b5b ldr r3, [r3, #52] ; 0x34
8005f1a: f403 5300 and.w r3, r3, #8192 ; 0x2000
8005f1e: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
8005f22: d118 bne.n 8005f56 <HAL_DAC_IRQHandler+0x4a>
{
/* Change DAC state to error state */
hdac->State = HAL_DAC_STATE_ERROR;
8005f24: 687b ldr r3, [r7, #4]
8005f26: 2204 movs r2, #4
8005f28: 711a strb r2, [r3, #4]
/* Set DAC error code to channel1 DMA underrun error */
hdac->ErrorCode |= HAL_DAC_ERROR_DMAUNDERRUNCH1;
8005f2a: 687b ldr r3, [r7, #4]
8005f2c: 691b ldr r3, [r3, #16]
8005f2e: f043 0201 orr.w r2, r3, #1
8005f32: 687b ldr r3, [r7, #4]
8005f34: 611a str r2, [r3, #16]
/* Clear the underrun flag */
__HAL_DAC_CLEAR_FLAG(hdac,DAC_FLAG_DMAUDR1);
8005f36: 687b ldr r3, [r7, #4]
8005f38: 681b ldr r3, [r3, #0]
8005f3a: f44f 5200 mov.w r2, #8192 ; 0x2000
8005f3e: 635a str r2, [r3, #52] ; 0x34
/* Disable the selected DAC channel1 DMA request */
hdac->Instance->CR &= ~DAC_CR_DMAEN1;
8005f40: 687b ldr r3, [r7, #4]
8005f42: 681b ldr r3, [r3, #0]
8005f44: 681a ldr r2, [r3, #0]
8005f46: 687b ldr r3, [r7, #4]
8005f48: 681b ldr r3, [r3, #0]
8005f4a: f422 5280 bic.w r2, r2, #4096 ; 0x1000
8005f4e: 601a str r2, [r3, #0]
/* Error callback */
#if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
hdac->DMAUnderrunCallbackCh1(hdac);
#else
HAL_DAC_DMAUnderrunCallbackCh1(hdac);
8005f50: 6878 ldr r0, [r7, #4]
8005f52: f000 f825 bl 8005fa0 <HAL_DAC_DMAUnderrunCallbackCh1>
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
}
/* Check underrun channel 2 flag */
if(__HAL_DAC_GET_FLAG(hdac, DAC_FLAG_DMAUDR2))
8005f56: 687b ldr r3, [r7, #4]
8005f58: 681b ldr r3, [r3, #0]
8005f5a: 6b5b ldr r3, [r3, #52] ; 0x34
8005f5c: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
8005f60: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
8005f64: d118 bne.n 8005f98 <HAL_DAC_IRQHandler+0x8c>
{
/* Change DAC state to error state */
hdac->State = HAL_DAC_STATE_ERROR;
8005f66: 687b ldr r3, [r7, #4]
8005f68: 2204 movs r2, #4
8005f6a: 711a strb r2, [r3, #4]
/* Set DAC error code to channel2 DMA underrun error */
hdac->ErrorCode |= HAL_DAC_ERROR_DMAUNDERRUNCH2;
8005f6c: 687b ldr r3, [r7, #4]
8005f6e: 691b ldr r3, [r3, #16]
8005f70: f043 0202 orr.w r2, r3, #2
8005f74: 687b ldr r3, [r7, #4]
8005f76: 611a str r2, [r3, #16]
/* Clear the underrun flag */
__HAL_DAC_CLEAR_FLAG(hdac,DAC_FLAG_DMAUDR2);
8005f78: 687b ldr r3, [r7, #4]
8005f7a: 681b ldr r3, [r3, #0]
8005f7c: f04f 5200 mov.w r2, #536870912 ; 0x20000000
8005f80: 635a str r2, [r3, #52] ; 0x34
/* Disable the selected DAC channel1 DMA request */
hdac->Instance->CR &= ~DAC_CR_DMAEN2;
8005f82: 687b ldr r3, [r7, #4]
8005f84: 681b ldr r3, [r3, #0]
8005f86: 681a ldr r2, [r3, #0]
8005f88: 687b ldr r3, [r7, #4]
8005f8a: 681b ldr r3, [r3, #0]
8005f8c: f022 5280 bic.w r2, r2, #268435456 ; 0x10000000
8005f90: 601a str r2, [r3, #0]
/* Error callback */
#if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
hdac->DMAUnderrunCallbackCh2(hdac);
#else
HAL_DACEx_DMAUnderrunCallbackCh2(hdac);
8005f92: 6878 ldr r0, [r7, #4]
8005f94: f000 f85b bl 800604e <HAL_DACEx_DMAUnderrunCallbackCh2>
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
}
}
8005f98: bf00 nop
8005f9a: 3708 adds r7, #8
8005f9c: 46bd mov sp, r7
8005f9e: bd80 pop {r7, pc}
08005fa0 <HAL_DAC_DMAUnderrunCallbackCh1>:
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
* the configuration information for the specified DAC.
* @retval None
*/
__weak void HAL_DAC_DMAUnderrunCallbackCh1(DAC_HandleTypeDef *hdac)
{
8005fa0: b480 push {r7}
8005fa2: b083 sub sp, #12
8005fa4: af00 add r7, sp, #0
8005fa6: 6078 str r0, [r7, #4]
UNUSED(hdac);
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_DAC_DMAUnderrunCallbackCh1 could be implemented in the user file
*/
}
8005fa8: bf00 nop
8005faa: 370c adds r7, #12
8005fac: 46bd mov sp, r7
8005fae: f85d 7b04 ldr.w r7, [sp], #4
8005fb2: 4770 bx lr
08005fb4 <HAL_DAC_ConfigChannel>:
* @arg DAC_CHANNEL_1: DAC Channel1 selected
* @arg DAC_CHANNEL_2: DAC Channel2 selected
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef* hdac, DAC_ChannelConfTypeDef* sConfig, uint32_t Channel)
{
8005fb4: b480 push {r7}
8005fb6: b087 sub sp, #28
8005fb8: af00 add r7, sp, #0
8005fba: 60f8 str r0, [r7, #12]
8005fbc: 60b9 str r1, [r7, #8]
8005fbe: 607a str r2, [r7, #4]
uint32_t tmpreg1 = 0, tmpreg2 = 0;
8005fc0: 2300 movs r3, #0
8005fc2: 617b str r3, [r7, #20]
8005fc4: 2300 movs r3, #0
8005fc6: 613b str r3, [r7, #16]
assert_param(IS_DAC_TRIGGER(sConfig->DAC_Trigger));
assert_param(IS_DAC_OUTPUT_BUFFER_STATE(sConfig->DAC_OutputBuffer));
assert_param(IS_DAC_CHANNEL(Channel));
/* Process locked */
__HAL_LOCK(hdac);
8005fc8: 68fb ldr r3, [r7, #12]
8005fca: 795b ldrb r3, [r3, #5]
8005fcc: 2b01 cmp r3, #1
8005fce: d101 bne.n 8005fd4 <HAL_DAC_ConfigChannel+0x20>
8005fd0: 2302 movs r3, #2
8005fd2: e036 b.n 8006042 <HAL_DAC_ConfigChannel+0x8e>
8005fd4: 68fb ldr r3, [r7, #12]
8005fd6: 2201 movs r2, #1
8005fd8: 715a strb r2, [r3, #5]
/* Change DAC state */
hdac->State = HAL_DAC_STATE_BUSY;
8005fda: 68fb ldr r3, [r7, #12]
8005fdc: 2202 movs r2, #2
8005fde: 711a strb r2, [r3, #4]
/* Get the DAC CR value */
tmpreg1 = hdac->Instance->CR;
8005fe0: 68fb ldr r3, [r7, #12]
8005fe2: 681b ldr r3, [r3, #0]
8005fe4: 681b ldr r3, [r3, #0]
8005fe6: 617b str r3, [r7, #20]
/* Clear BOFFx, TENx, TSELx, WAVEx and MAMPx bits */
tmpreg1 &= ~(((uint32_t)(DAC_CR_MAMP1 | DAC_CR_WAVE1 | DAC_CR_TSEL1 | DAC_CR_TEN1 | DAC_CR_BOFF1)) << Channel);
8005fe8: f640 72fe movw r2, #4094 ; 0xffe
8005fec: 687b ldr r3, [r7, #4]
8005fee: fa02 f303 lsl.w r3, r2, r3
8005ff2: 43db mvns r3, r3
8005ff4: 697a ldr r2, [r7, #20]
8005ff6: 4013 ands r3, r2
8005ff8: 617b str r3, [r7, #20]
/* Configure for the selected DAC channel: buffer output, trigger */
/* Set TSELx and TENx bits according to DAC_Trigger value */
/* Set BOFFx bit according to DAC_OutputBuffer value */
tmpreg2 = (sConfig->DAC_Trigger | sConfig->DAC_OutputBuffer);
8005ffa: 68bb ldr r3, [r7, #8]
8005ffc: 681a ldr r2, [r3, #0]
8005ffe: 68bb ldr r3, [r7, #8]
8006000: 685b ldr r3, [r3, #4]
8006002: 4313 orrs r3, r2
8006004: 613b str r3, [r7, #16]
/* Calculate CR register value depending on DAC_Channel */
tmpreg1 |= tmpreg2 << Channel;
8006006: 693a ldr r2, [r7, #16]
8006008: 687b ldr r3, [r7, #4]
800600a: fa02 f303 lsl.w r3, r2, r3
800600e: 697a ldr r2, [r7, #20]
8006010: 4313 orrs r3, r2
8006012: 617b str r3, [r7, #20]
/* Write to DAC CR */
hdac->Instance->CR = tmpreg1;
8006014: 68fb ldr r3, [r7, #12]
8006016: 681b ldr r3, [r3, #0]
8006018: 697a ldr r2, [r7, #20]
800601a: 601a str r2, [r3, #0]
/* Disable wave generation */
hdac->Instance->CR &= ~(DAC_CR_WAVE1 << Channel);
800601c: 68fb ldr r3, [r7, #12]
800601e: 681b ldr r3, [r3, #0]
8006020: 6819 ldr r1, [r3, #0]
8006022: 22c0 movs r2, #192 ; 0xc0
8006024: 687b ldr r3, [r7, #4]
8006026: fa02 f303 lsl.w r3, r2, r3
800602a: 43da mvns r2, r3
800602c: 68fb ldr r3, [r7, #12]
800602e: 681b ldr r3, [r3, #0]
8006030: 400a ands r2, r1
8006032: 601a str r2, [r3, #0]
/* Change DAC state */
hdac->State = HAL_DAC_STATE_READY;
8006034: 68fb ldr r3, [r7, #12]
8006036: 2201 movs r2, #1
8006038: 711a strb r2, [r3, #4]
/* Process unlocked */
__HAL_UNLOCK(hdac);
800603a: 68fb ldr r3, [r7, #12]
800603c: 2200 movs r2, #0
800603e: 715a strb r2, [r3, #5]
/* Return function status */
return HAL_OK;
8006040: 2300 movs r3, #0
}
8006042: 4618 mov r0, r3
8006044: 371c adds r7, #28
8006046: 46bd mov sp, r7
8006048: f85d 7b04 ldr.w r7, [sp], #4
800604c: 4770 bx lr
0800604e <HAL_DACEx_DMAUnderrunCallbackCh2>:
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
* the configuration information for the specified DAC.
* @retval None
*/
__weak void HAL_DACEx_DMAUnderrunCallbackCh2(DAC_HandleTypeDef *hdac)
{
800604e: b480 push {r7}
8006050: b083 sub sp, #12
8006052: af00 add r7, sp, #0
8006054: 6078 str r0, [r7, #4]
UNUSED(hdac);
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_DACEx_DMAUnderrunCallbackCh2 could be implemented in the user file
*/
}
8006056: bf00 nop
8006058: 370c adds r7, #12
800605a: 46bd mov sp, r7
800605c: f85d 7b04 ldr.w r7, [sp], #4
8006060: 4770 bx lr
...
08006064 <HAL_DMA_Init>:
* @param hdma Pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Stream.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
{
8006064: b580 push {r7, lr}
8006066: b086 sub sp, #24
8006068: af00 add r7, sp, #0
800606a: 6078 str r0, [r7, #4]
uint32_t tmp = 0U;
800606c: 2300 movs r3, #0
800606e: 617b str r3, [r7, #20]
uint32_t tickstart = HAL_GetTick();
8006070: f7ff f956 bl 8005320 <HAL_GetTick>
8006074: 6138 str r0, [r7, #16]
DMA_Base_Registers *regs;
/* Check the DMA peripheral state */
if(hdma == NULL)
8006076: 687b ldr r3, [r7, #4]
8006078: 2b00 cmp r3, #0
800607a: d101 bne.n 8006080 <HAL_DMA_Init+0x1c>
{
return HAL_ERROR;
800607c: 2301 movs r3, #1
800607e: e099 b.n 80061b4 <HAL_DMA_Init+0x150>
assert_param(IS_DMA_MEMORY_BURST(hdma->Init.MemBurst));
assert_param(IS_DMA_PERIPHERAL_BURST(hdma->Init.PeriphBurst));
}
/* Allocate lock resource */
__HAL_UNLOCK(hdma);
8006080: 687b ldr r3, [r7, #4]
8006082: 2200 movs r2, #0
8006084: f883 2034 strb.w r2, [r3, #52] ; 0x34
/* Change DMA peripheral state */
hdma->State = HAL_DMA_STATE_BUSY;
8006088: 687b ldr r3, [r7, #4]
800608a: 2202 movs r2, #2
800608c: f883 2035 strb.w r2, [r3, #53] ; 0x35
/* Disable the peripheral */
__HAL_DMA_DISABLE(hdma);
8006090: 687b ldr r3, [r7, #4]
8006092: 681b ldr r3, [r3, #0]
8006094: 681a ldr r2, [r3, #0]
8006096: 687b ldr r3, [r7, #4]
8006098: 681b ldr r3, [r3, #0]
800609a: f022 0201 bic.w r2, r2, #1
800609e: 601a str r2, [r3, #0]
/* Check if the DMA Stream is effectively disabled */
while((hdma->Instance->CR & DMA_SxCR_EN) != RESET)
80060a0: e00f b.n 80060c2 <HAL_DMA_Init+0x5e>
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DMA_ABORT)
80060a2: f7ff f93d bl 8005320 <HAL_GetTick>
80060a6: 4602 mov r2, r0
80060a8: 693b ldr r3, [r7, #16]
80060aa: 1ad3 subs r3, r2, r3
80060ac: 2b05 cmp r3, #5
80060ae: d908 bls.n 80060c2 <HAL_DMA_Init+0x5e>
{
/* Update error code */
hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT;
80060b0: 687b ldr r3, [r7, #4]
80060b2: 2220 movs r2, #32
80060b4: 655a str r2, [r3, #84] ; 0x54
/* Change the DMA state */
hdma->State = HAL_DMA_STATE_TIMEOUT;
80060b6: 687b ldr r3, [r7, #4]
80060b8: 2203 movs r2, #3
80060ba: f883 2035 strb.w r2, [r3, #53] ; 0x35
return HAL_TIMEOUT;
80060be: 2303 movs r3, #3
80060c0: e078 b.n 80061b4 <HAL_DMA_Init+0x150>
while((hdma->Instance->CR & DMA_SxCR_EN) != RESET)
80060c2: 687b ldr r3, [r7, #4]
80060c4: 681b ldr r3, [r3, #0]
80060c6: 681b ldr r3, [r3, #0]
80060c8: f003 0301 and.w r3, r3, #1
80060cc: 2b00 cmp r3, #0
80060ce: d1e8 bne.n 80060a2 <HAL_DMA_Init+0x3e>
}
}
/* Get the CR register value */
tmp = hdma->Instance->CR;
80060d0: 687b ldr r3, [r7, #4]
80060d2: 681b ldr r3, [r3, #0]
80060d4: 681b ldr r3, [r3, #0]
80060d6: 617b str r3, [r7, #20]
/* Clear CHSEL, MBURST, PBURST, PL, MSIZE, PSIZE, MINC, PINC, CIRC, DIR, CT and DBM bits */
tmp &= ((uint32_t)~(DMA_SxCR_CHSEL | DMA_SxCR_MBURST | DMA_SxCR_PBURST | \
80060d8: 697a ldr r2, [r7, #20]
80060da: 4b38 ldr r3, [pc, #224] ; (80061bc <HAL_DMA_Init+0x158>)
80060dc: 4013 ands r3, r2
80060de: 617b str r3, [r7, #20]
DMA_SxCR_PL | DMA_SxCR_MSIZE | DMA_SxCR_PSIZE | \
DMA_SxCR_MINC | DMA_SxCR_PINC | DMA_SxCR_CIRC | \
DMA_SxCR_DIR | DMA_SxCR_CT | DMA_SxCR_DBM));
/* Prepare the DMA Stream configuration */
tmp |= hdma->Init.Channel | hdma->Init.Direction |
80060e0: 687b ldr r3, [r7, #4]
80060e2: 685a ldr r2, [r3, #4]
80060e4: 687b ldr r3, [r7, #4]
80060e6: 689b ldr r3, [r3, #8]
80060e8: 431a orrs r2, r3
hdma->Init.PeriphInc | hdma->Init.MemInc |
80060ea: 687b ldr r3, [r7, #4]
80060ec: 68db ldr r3, [r3, #12]
tmp |= hdma->Init.Channel | hdma->Init.Direction |
80060ee: 431a orrs r2, r3
hdma->Init.PeriphInc | hdma->Init.MemInc |
80060f0: 687b ldr r3, [r7, #4]
80060f2: 691b ldr r3, [r3, #16]
80060f4: 431a orrs r2, r3
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
80060f6: 687b ldr r3, [r7, #4]
80060f8: 695b ldr r3, [r3, #20]
hdma->Init.PeriphInc | hdma->Init.MemInc |
80060fa: 431a orrs r2, r3
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
80060fc: 687b ldr r3, [r7, #4]
80060fe: 699b ldr r3, [r3, #24]
8006100: 431a orrs r2, r3
hdma->Init.Mode | hdma->Init.Priority;
8006102: 687b ldr r3, [r7, #4]
8006104: 69db ldr r3, [r3, #28]
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
8006106: 431a orrs r2, r3
hdma->Init.Mode | hdma->Init.Priority;
8006108: 687b ldr r3, [r7, #4]
800610a: 6a1b ldr r3, [r3, #32]
800610c: 4313 orrs r3, r2
tmp |= hdma->Init.Channel | hdma->Init.Direction |
800610e: 697a ldr r2, [r7, #20]
8006110: 4313 orrs r3, r2
8006112: 617b str r3, [r7, #20]
/* the Memory burst and peripheral burst are not used when the FIFO is disabled */
if(hdma->Init.FIFOMode == DMA_FIFOMODE_ENABLE)
8006114: 687b ldr r3, [r7, #4]
8006116: 6a5b ldr r3, [r3, #36] ; 0x24
8006118: 2b04 cmp r3, #4
800611a: d107 bne.n 800612c <HAL_DMA_Init+0xc8>
{
/* Get memory burst and peripheral burst */
tmp |= hdma->Init.MemBurst | hdma->Init.PeriphBurst;
800611c: 687b ldr r3, [r7, #4]
800611e: 6ada ldr r2, [r3, #44] ; 0x2c
8006120: 687b ldr r3, [r7, #4]
8006122: 6b1b ldr r3, [r3, #48] ; 0x30
8006124: 4313 orrs r3, r2
8006126: 697a ldr r2, [r7, #20]
8006128: 4313 orrs r3, r2
800612a: 617b str r3, [r7, #20]
}
/* Write to DMA Stream CR register */
hdma->Instance->CR = tmp;
800612c: 687b ldr r3, [r7, #4]
800612e: 681b ldr r3, [r3, #0]
8006130: 697a ldr r2, [r7, #20]
8006132: 601a str r2, [r3, #0]
/* Get the FCR register value */
tmp = hdma->Instance->FCR;
8006134: 687b ldr r3, [r7, #4]
8006136: 681b ldr r3, [r3, #0]
8006138: 695b ldr r3, [r3, #20]
800613a: 617b str r3, [r7, #20]
/* Clear Direct mode and FIFO threshold bits */
tmp &= (uint32_t)~(DMA_SxFCR_DMDIS | DMA_SxFCR_FTH);
800613c: 697b ldr r3, [r7, #20]
800613e: f023 0307 bic.w r3, r3, #7
8006142: 617b str r3, [r7, #20]
/* Prepare the DMA Stream FIFO configuration */
tmp |= hdma->Init.FIFOMode;
8006144: 687b ldr r3, [r7, #4]
8006146: 6a5b ldr r3, [r3, #36] ; 0x24
8006148: 697a ldr r2, [r7, #20]
800614a: 4313 orrs r3, r2
800614c: 617b str r3, [r7, #20]
/* The FIFO threshold is not used when the FIFO mode is disabled */
if(hdma->Init.FIFOMode == DMA_FIFOMODE_ENABLE)
800614e: 687b ldr r3, [r7, #4]
8006150: 6a5b ldr r3, [r3, #36] ; 0x24
8006152: 2b04 cmp r3, #4
8006154: d117 bne.n 8006186 <HAL_DMA_Init+0x122>
{
/* Get the FIFO threshold */
tmp |= hdma->Init.FIFOThreshold;
8006156: 687b ldr r3, [r7, #4]
8006158: 6a9b ldr r3, [r3, #40] ; 0x28
800615a: 697a ldr r2, [r7, #20]
800615c: 4313 orrs r3, r2
800615e: 617b str r3, [r7, #20]
/* Check compatibility between FIFO threshold level and size of the memory burst */
/* for INCR4, INCR8, INCR16 bursts */
if (hdma->Init.MemBurst != DMA_MBURST_SINGLE)
8006160: 687b ldr r3, [r7, #4]
8006162: 6adb ldr r3, [r3, #44] ; 0x2c
8006164: 2b00 cmp r3, #0
8006166: d00e beq.n 8006186 <HAL_DMA_Init+0x122>
{
if (DMA_CheckFifoParam(hdma) != HAL_OK)
8006168: 6878 ldr r0, [r7, #4]
800616a: f000 f8bd bl 80062e8 <DMA_CheckFifoParam>
800616e: 4603 mov r3, r0
8006170: 2b00 cmp r3, #0
8006172: d008 beq.n 8006186 <HAL_DMA_Init+0x122>
{
/* Update error code */
hdma->ErrorCode = HAL_DMA_ERROR_PARAM;
8006174: 687b ldr r3, [r7, #4]
8006176: 2240 movs r2, #64 ; 0x40
8006178: 655a str r2, [r3, #84] ; 0x54
/* Change the DMA state */
hdma->State = HAL_DMA_STATE_READY;
800617a: 687b ldr r3, [r7, #4]
800617c: 2201 movs r2, #1
800617e: f883 2035 strb.w r2, [r3, #53] ; 0x35
return HAL_ERROR;
8006182: 2301 movs r3, #1
8006184: e016 b.n 80061b4 <HAL_DMA_Init+0x150>
}
}
}
/* Write to DMA Stream FCR */
hdma->Instance->FCR = tmp;
8006186: 687b ldr r3, [r7, #4]
8006188: 681b ldr r3, [r3, #0]
800618a: 697a ldr r2, [r7, #20]
800618c: 615a str r2, [r3, #20]
/* Initialize StreamBaseAddress and StreamIndex parameters to be used to calculate
DMA steam Base Address needed by HAL_DMA_IRQHandler() and HAL_DMA_PollForTransfer() */
regs = (DMA_Base_Registers *)DMA_CalcBaseAndBitshift(hdma);
800618e: 6878 ldr r0, [r7, #4]
8006190: f000 f874 bl 800627c <DMA_CalcBaseAndBitshift>
8006194: 4603 mov r3, r0
8006196: 60fb str r3, [r7, #12]
/* Clear all interrupt flags */
regs->IFCR = 0x3FU << hdma->StreamIndex;
8006198: 687b ldr r3, [r7, #4]
800619a: 6ddb ldr r3, [r3, #92] ; 0x5c
800619c: 223f movs r2, #63 ; 0x3f
800619e: 409a lsls r2, r3
80061a0: 68fb ldr r3, [r7, #12]
80061a2: 609a str r2, [r3, #8]
/* Initialize the error code */
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
80061a4: 687b ldr r3, [r7, #4]
80061a6: 2200 movs r2, #0
80061a8: 655a str r2, [r3, #84] ; 0x54
/* Initialize the DMA state */
hdma->State = HAL_DMA_STATE_READY;
80061aa: 687b ldr r3, [r7, #4]
80061ac: 2201 movs r2, #1
80061ae: f883 2035 strb.w r2, [r3, #53] ; 0x35
return HAL_OK;
80061b2: 2300 movs r3, #0
}
80061b4: 4618 mov r0, r3
80061b6: 3718 adds r7, #24
80061b8: 46bd mov sp, r7
80061ba: bd80 pop {r7, pc}
80061bc: f010803f .word 0xf010803f
080061c0 <HAL_DMA_DeInit>:
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Stream.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
{
80061c0: b580 push {r7, lr}
80061c2: b084 sub sp, #16
80061c4: af00 add r7, sp, #0
80061c6: 6078 str r0, [r7, #4]
DMA_Base_Registers *regs;
/* Check the DMA peripheral state */
if(hdma == NULL)
80061c8: 687b ldr r3, [r7, #4]
80061ca: 2b00 cmp r3, #0
80061cc: d101 bne.n 80061d2 <HAL_DMA_DeInit+0x12>
{
return HAL_ERROR;
80061ce: 2301 movs r3, #1
80061d0: e050 b.n 8006274 <HAL_DMA_DeInit+0xb4>
}
/* Check the DMA peripheral state */
if(hdma->State == HAL_DMA_STATE_BUSY)
80061d2: 687b ldr r3, [r7, #4]
80061d4: f893 3035 ldrb.w r3, [r3, #53] ; 0x35
80061d8: b2db uxtb r3, r3
80061da: 2b02 cmp r3, #2
80061dc: d101 bne.n 80061e2 <HAL_DMA_DeInit+0x22>
{
/* Return error status */
return HAL_BUSY;
80061de: 2302 movs r3, #2
80061e0: e048 b.n 8006274 <HAL_DMA_DeInit+0xb4>
/* Check the parameters */
assert_param(IS_DMA_STREAM_ALL_INSTANCE(hdma->Instance));
/* Disable the selected DMA Streamx */
__HAL_DMA_DISABLE(hdma);
80061e2: 687b ldr r3, [r7, #4]
80061e4: 681b ldr r3, [r3, #0]
80061e6: 681a ldr r2, [r3, #0]
80061e8: 687b ldr r3, [r7, #4]
80061ea: 681b ldr r3, [r3, #0]
80061ec: f022 0201 bic.w r2, r2, #1
80061f0: 601a str r2, [r3, #0]
/* Reset DMA Streamx control register */
hdma->Instance->CR = 0U;
80061f2: 687b ldr r3, [r7, #4]
80061f4: 681b ldr r3, [r3, #0]
80061f6: 2200 movs r2, #0
80061f8: 601a str r2, [r3, #0]
/* Reset DMA Streamx number of data to transfer register */
hdma->Instance->NDTR = 0U;
80061fa: 687b ldr r3, [r7, #4]
80061fc: 681b ldr r3, [r3, #0]
80061fe: 2200 movs r2, #0
8006200: 605a str r2, [r3, #4]
/* Reset DMA Streamx peripheral address register */
hdma->Instance->PAR = 0U;
8006202: 687b ldr r3, [r7, #4]
8006204: 681b ldr r3, [r3, #0]
8006206: 2200 movs r2, #0
8006208: 609a str r2, [r3, #8]
/* Reset DMA Streamx memory 0 address register */
hdma->Instance->M0AR = 0U;
800620a: 687b ldr r3, [r7, #4]
800620c: 681b ldr r3, [r3, #0]
800620e: 2200 movs r2, #0
8006210: 60da str r2, [r3, #12]
/* Reset DMA Streamx memory 1 address register */
hdma->Instance->M1AR = 0U;
8006212: 687b ldr r3, [r7, #4]
8006214: 681b ldr r3, [r3, #0]
8006216: 2200 movs r2, #0
8006218: 611a str r2, [r3, #16]
/* Reset DMA Streamx FIFO control register */
hdma->Instance->FCR = (uint32_t)0x00000021U;
800621a: 687b ldr r3, [r7, #4]
800621c: 681b ldr r3, [r3, #0]
800621e: 2221 movs r2, #33 ; 0x21
8006220: 615a str r2, [r3, #20]
/* Get DMA steam Base Address */
regs = (DMA_Base_Registers *)DMA_CalcBaseAndBitshift(hdma);
8006222: 6878 ldr r0, [r7, #4]
8006224: f000 f82a bl 800627c <DMA_CalcBaseAndBitshift>
8006228: 4603 mov r3, r0
800622a: 60fb str r3, [r7, #12]
/* Clear all interrupt flags at correct offset within the register */
regs->IFCR = 0x3FU << hdma->StreamIndex;
800622c: 687b ldr r3, [r7, #4]
800622e: 6ddb ldr r3, [r3, #92] ; 0x5c
8006230: 223f movs r2, #63 ; 0x3f
8006232: 409a lsls r2, r3
8006234: 68fb ldr r3, [r7, #12]
8006236: 609a str r2, [r3, #8]
/* Clean all callbacks */
hdma->XferCpltCallback = NULL;
8006238: 687b ldr r3, [r7, #4]
800623a: 2200 movs r2, #0
800623c: 63da str r2, [r3, #60] ; 0x3c
hdma->XferHalfCpltCallback = NULL;
800623e: 687b ldr r3, [r7, #4]
8006240: 2200 movs r2, #0
8006242: 641a str r2, [r3, #64] ; 0x40
hdma->XferM1CpltCallback = NULL;
8006244: 687b ldr r3, [r7, #4]
8006246: 2200 movs r2, #0
8006248: 645a str r2, [r3, #68] ; 0x44
hdma->XferM1HalfCpltCallback = NULL;
800624a: 687b ldr r3, [r7, #4]
800624c: 2200 movs r2, #0
800624e: 649a str r2, [r3, #72] ; 0x48
hdma->XferErrorCallback = NULL;
8006250: 687b ldr r3, [r7, #4]
8006252: 2200 movs r2, #0
8006254: 64da str r2, [r3, #76] ; 0x4c
hdma->XferAbortCallback = NULL;
8006256: 687b ldr r3, [r7, #4]
8006258: 2200 movs r2, #0
800625a: 651a str r2, [r3, #80] ; 0x50
/* Reset the error code */
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
800625c: 687b ldr r3, [r7, #4]
800625e: 2200 movs r2, #0
8006260: 655a str r2, [r3, #84] ; 0x54
/* Reset the DMA state */
hdma->State = HAL_DMA_STATE_RESET;
8006262: 687b ldr r3, [r7, #4]
8006264: 2200 movs r2, #0
8006266: f883 2035 strb.w r2, [r3, #53] ; 0x35
/* Release Lock */
__HAL_UNLOCK(hdma);
800626a: 687b ldr r3, [r7, #4]
800626c: 2200 movs r2, #0
800626e: f883 2034 strb.w r2, [r3, #52] ; 0x34
return HAL_OK;
8006272: 2300 movs r3, #0
}
8006274: 4618 mov r0, r3
8006276: 3710 adds r7, #16
8006278: 46bd mov sp, r7
800627a: bd80 pop {r7, pc}
0800627c <DMA_CalcBaseAndBitshift>:
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Stream.
* @retval Stream base address
*/
static uint32_t DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma)
{
800627c: b480 push {r7}
800627e: b085 sub sp, #20
8006280: af00 add r7, sp, #0
8006282: 6078 str r0, [r7, #4]
uint32_t stream_number = (((uint32_t)hdma->Instance & 0xFFU) - 16U) / 24U;
8006284: 687b ldr r3, [r7, #4]
8006286: 681b ldr r3, [r3, #0]
8006288: b2db uxtb r3, r3
800628a: 3b10 subs r3, #16
800628c: 4a13 ldr r2, [pc, #76] ; (80062dc <DMA_CalcBaseAndBitshift+0x60>)
800628e: fba2 2303 umull r2, r3, r2, r3
8006292: 091b lsrs r3, r3, #4
8006294: 60fb str r3, [r7, #12]
/* lookup table for necessary bitshift of flags within status registers */
static const uint8_t flagBitshiftOffset[8U] = {0U, 6U, 16U, 22U, 0U, 6U, 16U, 22U};
hdma->StreamIndex = flagBitshiftOffset[stream_number];
8006296: 4a12 ldr r2, [pc, #72] ; (80062e0 <DMA_CalcBaseAndBitshift+0x64>)
8006298: 68fb ldr r3, [r7, #12]
800629a: 4413 add r3, r2
800629c: 781b ldrb r3, [r3, #0]
800629e: 461a mov r2, r3
80062a0: 687b ldr r3, [r7, #4]
80062a2: 65da str r2, [r3, #92] ; 0x5c
if (stream_number > 3U)
80062a4: 68fb ldr r3, [r7, #12]
80062a6: 2b03 cmp r3, #3
80062a8: d908 bls.n 80062bc <DMA_CalcBaseAndBitshift+0x40>
{
/* return pointer to HISR and HIFCR */
hdma->StreamBaseAddress = (((uint32_t)hdma->Instance & (uint32_t)(~0x3FFU)) + 4U);
80062aa: 687b ldr r3, [r7, #4]
80062ac: 681b ldr r3, [r3, #0]
80062ae: 461a mov r2, r3
80062b0: 4b0c ldr r3, [pc, #48] ; (80062e4 <DMA_CalcBaseAndBitshift+0x68>)
80062b2: 4013 ands r3, r2
80062b4: 1d1a adds r2, r3, #4
80062b6: 687b ldr r3, [r7, #4]
80062b8: 659a str r2, [r3, #88] ; 0x58
80062ba: e006 b.n 80062ca <DMA_CalcBaseAndBitshift+0x4e>
}
else
{
/* return pointer to LISR and LIFCR */
hdma->StreamBaseAddress = ((uint32_t)hdma->Instance & (uint32_t)(~0x3FFU));
80062bc: 687b ldr r3, [r7, #4]
80062be: 681b ldr r3, [r3, #0]
80062c0: 461a mov r2, r3
80062c2: 4b08 ldr r3, [pc, #32] ; (80062e4 <DMA_CalcBaseAndBitshift+0x68>)
80062c4: 4013 ands r3, r2
80062c6: 687a ldr r2, [r7, #4]
80062c8: 6593 str r3, [r2, #88] ; 0x58
}
return hdma->StreamBaseAddress;
80062ca: 687b ldr r3, [r7, #4]
80062cc: 6d9b ldr r3, [r3, #88] ; 0x58
}
80062ce: 4618 mov r0, r3
80062d0: 3714 adds r7, #20
80062d2: 46bd mov sp, r7
80062d4: f85d 7b04 ldr.w r7, [sp], #4
80062d8: 4770 bx lr
80062da: bf00 nop
80062dc: aaaaaaab .word 0xaaaaaaab
80062e0: 08022d80 .word 0x08022d80
80062e4: fffffc00 .word 0xfffffc00
080062e8 <DMA_CheckFifoParam>:
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Stream.
* @retval HAL status
*/
static HAL_StatusTypeDef DMA_CheckFifoParam(DMA_HandleTypeDef *hdma)
{
80062e8: b480 push {r7}
80062ea: b085 sub sp, #20
80062ec: af00 add r7, sp, #0
80062ee: 6078 str r0, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
80062f0: 2300 movs r3, #0
80062f2: 73fb strb r3, [r7, #15]
uint32_t tmp = hdma->Init.FIFOThreshold;
80062f4: 687b ldr r3, [r7, #4]
80062f6: 6a9b ldr r3, [r3, #40] ; 0x28
80062f8: 60bb str r3, [r7, #8]
/* Memory Data size equal to Byte */
if(hdma->Init.MemDataAlignment == DMA_MDATAALIGN_BYTE)
80062fa: 687b ldr r3, [r7, #4]
80062fc: 699b ldr r3, [r3, #24]
80062fe: 2b00 cmp r3, #0
8006300: d11f bne.n 8006342 <DMA_CheckFifoParam+0x5a>
{
switch (tmp)
8006302: 68bb ldr r3, [r7, #8]
8006304: 2b03 cmp r3, #3
8006306: d855 bhi.n 80063b4 <DMA_CheckFifoParam+0xcc>
8006308: a201 add r2, pc, #4 ; (adr r2, 8006310 <DMA_CheckFifoParam+0x28>)
800630a: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800630e: bf00 nop
8006310: 08006321 .word 0x08006321
8006314: 08006333 .word 0x08006333
8006318: 08006321 .word 0x08006321
800631c: 080063b5 .word 0x080063b5
{
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
8006320: 687b ldr r3, [r7, #4]
8006322: 6adb ldr r3, [r3, #44] ; 0x2c
8006324: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
8006328: 2b00 cmp r3, #0
800632a: d045 beq.n 80063b8 <DMA_CheckFifoParam+0xd0>
{
status = HAL_ERROR;
800632c: 2301 movs r3, #1
800632e: 73fb strb r3, [r7, #15]
}
break;
8006330: e042 b.n 80063b8 <DMA_CheckFifoParam+0xd0>
case DMA_FIFO_THRESHOLD_HALFFULL:
if (hdma->Init.MemBurst == DMA_MBURST_INC16)
8006332: 687b ldr r3, [r7, #4]
8006334: 6adb ldr r3, [r3, #44] ; 0x2c
8006336: f1b3 7fc0 cmp.w r3, #25165824 ; 0x1800000
800633a: d13f bne.n 80063bc <DMA_CheckFifoParam+0xd4>
{
status = HAL_ERROR;
800633c: 2301 movs r3, #1
800633e: 73fb strb r3, [r7, #15]
}
break;
8006340: e03c b.n 80063bc <DMA_CheckFifoParam+0xd4>
break;
}
}
/* Memory Data size equal to Half-Word */
else if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_HALFWORD)
8006342: 687b ldr r3, [r7, #4]
8006344: 699b ldr r3, [r3, #24]
8006346: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
800634a: d121 bne.n 8006390 <DMA_CheckFifoParam+0xa8>
{
switch (tmp)
800634c: 68bb ldr r3, [r7, #8]
800634e: 2b03 cmp r3, #3
8006350: d836 bhi.n 80063c0 <DMA_CheckFifoParam+0xd8>
8006352: a201 add r2, pc, #4 ; (adr r2, 8006358 <DMA_CheckFifoParam+0x70>)
8006354: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8006358: 08006369 .word 0x08006369
800635c: 0800636f .word 0x0800636f
8006360: 08006369 .word 0x08006369
8006364: 08006381 .word 0x08006381
{
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
status = HAL_ERROR;
8006368: 2301 movs r3, #1
800636a: 73fb strb r3, [r7, #15]
break;
800636c: e02f b.n 80063ce <DMA_CheckFifoParam+0xe6>
case DMA_FIFO_THRESHOLD_HALFFULL:
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
800636e: 687b ldr r3, [r7, #4]
8006370: 6adb ldr r3, [r3, #44] ; 0x2c
8006372: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
8006376: 2b00 cmp r3, #0
8006378: d024 beq.n 80063c4 <DMA_CheckFifoParam+0xdc>
{
status = HAL_ERROR;
800637a: 2301 movs r3, #1
800637c: 73fb strb r3, [r7, #15]
}
break;
800637e: e021 b.n 80063c4 <DMA_CheckFifoParam+0xdc>
case DMA_FIFO_THRESHOLD_FULL:
if (hdma->Init.MemBurst == DMA_MBURST_INC16)
8006380: 687b ldr r3, [r7, #4]
8006382: 6adb ldr r3, [r3, #44] ; 0x2c
8006384: f1b3 7fc0 cmp.w r3, #25165824 ; 0x1800000
8006388: d11e bne.n 80063c8 <DMA_CheckFifoParam+0xe0>
{
status = HAL_ERROR;
800638a: 2301 movs r3, #1
800638c: 73fb strb r3, [r7, #15]
}
break;
800638e: e01b b.n 80063c8 <DMA_CheckFifoParam+0xe0>
}
/* Memory Data size equal to Word */
else
{
switch (tmp)
8006390: 68bb ldr r3, [r7, #8]
8006392: 2b02 cmp r3, #2
8006394: d902 bls.n 800639c <DMA_CheckFifoParam+0xb4>
8006396: 2b03 cmp r3, #3
8006398: d003 beq.n 80063a2 <DMA_CheckFifoParam+0xba>
{
status = HAL_ERROR;
}
break;
default:
break;
800639a: e018 b.n 80063ce <DMA_CheckFifoParam+0xe6>
status = HAL_ERROR;
800639c: 2301 movs r3, #1
800639e: 73fb strb r3, [r7, #15]
break;
80063a0: e015 b.n 80063ce <DMA_CheckFifoParam+0xe6>
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
80063a2: 687b ldr r3, [r7, #4]
80063a4: 6adb ldr r3, [r3, #44] ; 0x2c
80063a6: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
80063aa: 2b00 cmp r3, #0
80063ac: d00e beq.n 80063cc <DMA_CheckFifoParam+0xe4>
status = HAL_ERROR;
80063ae: 2301 movs r3, #1
80063b0: 73fb strb r3, [r7, #15]
break;
80063b2: e00b b.n 80063cc <DMA_CheckFifoParam+0xe4>
break;
80063b4: bf00 nop
80063b6: e00a b.n 80063ce <DMA_CheckFifoParam+0xe6>
break;
80063b8: bf00 nop
80063ba: e008 b.n 80063ce <DMA_CheckFifoParam+0xe6>
break;
80063bc: bf00 nop
80063be: e006 b.n 80063ce <DMA_CheckFifoParam+0xe6>
break;
80063c0: bf00 nop
80063c2: e004 b.n 80063ce <DMA_CheckFifoParam+0xe6>
break;
80063c4: bf00 nop
80063c6: e002 b.n 80063ce <DMA_CheckFifoParam+0xe6>
break;
80063c8: bf00 nop
80063ca: e000 b.n 80063ce <DMA_CheckFifoParam+0xe6>
break;
80063cc: bf00 nop
}
}
return status;
80063ce: 7bfb ldrb r3, [r7, #15]
}
80063d0: 4618 mov r0, r3
80063d2: 3714 adds r7, #20
80063d4: 46bd mov sp, r7
80063d6: f85d 7b04 ldr.w r7, [sp], #4
80063da: 4770 bx lr
080063dc <HAL_DMA2D_Init>:
* @param hdma2d pointer to a DMA2D_HandleTypeDef structure that contains
* the configuration information for the DMA2D.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA2D_Init(DMA2D_HandleTypeDef *hdma2d)
{
80063dc: b580 push {r7, lr}
80063de: b082 sub sp, #8
80063e0: af00 add r7, sp, #0
80063e2: 6078 str r0, [r7, #4]
/* Check the DMA2D peripheral state */
if(hdma2d == NULL)
80063e4: 687b ldr r3, [r7, #4]
80063e6: 2b00 cmp r3, #0
80063e8: d101 bne.n 80063ee <HAL_DMA2D_Init+0x12>
{
return HAL_ERROR;
80063ea: 2301 movs r3, #1
80063ec: e039 b.n 8006462 <HAL_DMA2D_Init+0x86>
/* Init the low level hardware */
hdma2d->MspInitCallback(hdma2d);
}
#else
if(hdma2d->State == HAL_DMA2D_STATE_RESET)
80063ee: 687b ldr r3, [r7, #4]
80063f0: f893 3039 ldrb.w r3, [r3, #57] ; 0x39
80063f4: b2db uxtb r3, r3
80063f6: 2b00 cmp r3, #0
80063f8: d106 bne.n 8006408 <HAL_DMA2D_Init+0x2c>
{
/* Allocate lock resource and initialize it */
hdma2d->Lock = HAL_UNLOCKED;
80063fa: 687b ldr r3, [r7, #4]
80063fc: 2200 movs r2, #0
80063fe: f883 2038 strb.w r2, [r3, #56] ; 0x38
/* Init the low level hardware */
HAL_DMA2D_MspInit(hdma2d);
8006402: 6878 ldr r0, [r7, #4]
8006404: f7fe f982 bl 800470c <HAL_DMA2D_MspInit>
}
#endif /* (USE_HAL_DMA2D_REGISTER_CALLBACKS) */
/* Change DMA2D peripheral state */
hdma2d->State = HAL_DMA2D_STATE_BUSY;
8006408: 687b ldr r3, [r7, #4]
800640a: 2202 movs r2, #2
800640c: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* DMA2D CR register configuration -------------------------------------------*/
MODIFY_REG(hdma2d->Instance->CR, DMA2D_CR_MODE, hdma2d->Init.Mode);
8006410: 687b ldr r3, [r7, #4]
8006412: 681b ldr r3, [r3, #0]
8006414: 681b ldr r3, [r3, #0]
8006416: f423 3140 bic.w r1, r3, #196608 ; 0x30000
800641a: 687b ldr r3, [r7, #4]
800641c: 685a ldr r2, [r3, #4]
800641e: 687b ldr r3, [r7, #4]
8006420: 681b ldr r3, [r3, #0]
8006422: 430a orrs r2, r1
8006424: 601a str r2, [r3, #0]
/* DMA2D OPFCCR register configuration ---------------------------------------*/
MODIFY_REG(hdma2d->Instance->OPFCCR, DMA2D_OPFCCR_CM, hdma2d->Init.ColorMode);
8006426: 687b ldr r3, [r7, #4]
8006428: 681b ldr r3, [r3, #0]
800642a: 6b5b ldr r3, [r3, #52] ; 0x34
800642c: f023 0107 bic.w r1, r3, #7
8006430: 687b ldr r3, [r7, #4]
8006432: 689a ldr r2, [r3, #8]
8006434: 687b ldr r3, [r7, #4]
8006436: 681b ldr r3, [r3, #0]
8006438: 430a orrs r2, r1
800643a: 635a str r2, [r3, #52] ; 0x34
/* DMA2D OOR register configuration ------------------------------------------*/
MODIFY_REG(hdma2d->Instance->OOR, DMA2D_OOR_LO, hdma2d->Init.OutputOffset);
800643c: 687b ldr r3, [r7, #4]
800643e: 681b ldr r3, [r3, #0]
8006440: 6c1a ldr r2, [r3, #64] ; 0x40
8006442: 4b0a ldr r3, [pc, #40] ; (800646c <HAL_DMA2D_Init+0x90>)
8006444: 4013 ands r3, r2
8006446: 687a ldr r2, [r7, #4]
8006448: 68d1 ldr r1, [r2, #12]
800644a: 687a ldr r2, [r7, #4]
800644c: 6812 ldr r2, [r2, #0]
800644e: 430b orrs r3, r1
8006450: 6413 str r3, [r2, #64] ; 0x40
MODIFY_REG(hdma2d->Instance->OPFCCR,(DMA2D_OPFCCR_AI|DMA2D_OPFCCR_RBS), ((hdma2d->Init.AlphaInverted << DMA2D_OPFCCR_AI_Pos) | (hdma2d->Init.RedBlueSwap << DMA2D_OPFCCR_RBS_Pos)));
#endif /* DMA2D_ALPHA_INV_RB_SWAP_SUPPORT */
/* Update error code */
hdma2d->ErrorCode = HAL_DMA2D_ERROR_NONE;
8006452: 687b ldr r3, [r7, #4]
8006454: 2200 movs r2, #0
8006456: 63da str r2, [r3, #60] ; 0x3c
/* Initialize the DMA2D state*/
hdma2d->State = HAL_DMA2D_STATE_READY;
8006458: 687b ldr r3, [r7, #4]
800645a: 2201 movs r2, #1
800645c: f883 2039 strb.w r2, [r3, #57] ; 0x39
return HAL_OK;
8006460: 2300 movs r3, #0
}
8006462: 4618 mov r0, r3
8006464: 3708 adds r7, #8
8006466: 46bd mov sp, r7
8006468: bd80 pop {r7, pc}
800646a: bf00 nop
800646c: ffffc000 .word 0xffffc000
08006470 <HAL_DMA2D_Start>:
* @param Width The width of data to be transferred from source to destination (expressed in number of pixels per line).
* @param Height The height of data to be transferred from source to destination (expressed in number of lines).
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA2D_Start(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height)
{
8006470: b580 push {r7, lr}
8006472: b086 sub sp, #24
8006474: af02 add r7, sp, #8
8006476: 60f8 str r0, [r7, #12]
8006478: 60b9 str r1, [r7, #8]
800647a: 607a str r2, [r7, #4]
800647c: 603b str r3, [r7, #0]
/* Check the parameters */
assert_param(IS_DMA2D_LINE(Height));
assert_param(IS_DMA2D_PIXEL(Width));
/* Process locked */
__HAL_LOCK(hdma2d);
800647e: 68fb ldr r3, [r7, #12]
8006480: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
8006484: 2b01 cmp r3, #1
8006486: d101 bne.n 800648c <HAL_DMA2D_Start+0x1c>
8006488: 2302 movs r3, #2
800648a: e018 b.n 80064be <HAL_DMA2D_Start+0x4e>
800648c: 68fb ldr r3, [r7, #12]
800648e: 2201 movs r2, #1
8006490: f883 2038 strb.w r2, [r3, #56] ; 0x38
/* Change DMA2D peripheral state */
hdma2d->State = HAL_DMA2D_STATE_BUSY;
8006494: 68fb ldr r3, [r7, #12]
8006496: 2202 movs r2, #2
8006498: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Configure the source, destination address and the data size */
DMA2D_SetConfig(hdma2d, pdata, DstAddress, Width, Height);
800649c: 69bb ldr r3, [r7, #24]
800649e: 9300 str r3, [sp, #0]
80064a0: 683b ldr r3, [r7, #0]
80064a2: 687a ldr r2, [r7, #4]
80064a4: 68b9 ldr r1, [r7, #8]
80064a6: 68f8 ldr r0, [r7, #12]
80064a8: f000 f988 bl 80067bc <DMA2D_SetConfig>
/* Enable the Peripheral */
__HAL_DMA2D_ENABLE(hdma2d);
80064ac: 68fb ldr r3, [r7, #12]
80064ae: 681b ldr r3, [r3, #0]
80064b0: 681a ldr r2, [r3, #0]
80064b2: 68fb ldr r3, [r7, #12]
80064b4: 681b ldr r3, [r3, #0]
80064b6: f042 0201 orr.w r2, r2, #1
80064ba: 601a str r2, [r3, #0]
return HAL_OK;
80064bc: 2300 movs r3, #0
}
80064be: 4618 mov r0, r3
80064c0: 3710 adds r7, #16
80064c2: 46bd mov sp, r7
80064c4: bd80 pop {r7, pc}
080064c6 <HAL_DMA2D_PollForTransfer>:
* the configuration information for the DMA2D.
* @param Timeout Timeout duration
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA2D_PollForTransfer(DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout)
{
80064c6: b580 push {r7, lr}
80064c8: b086 sub sp, #24
80064ca: af00 add r7, sp, #0
80064cc: 6078 str r0, [r7, #4]
80064ce: 6039 str r1, [r7, #0]
uint32_t tickstart;
uint32_t layer_start;
__IO uint32_t isrflags = 0x0U;
80064d0: 2300 movs r3, #0
80064d2: 60fb str r3, [r7, #12]
/* Polling for DMA2D transfer */
if((hdma2d->Instance->CR & DMA2D_CR_START) != 0U)
80064d4: 687b ldr r3, [r7, #4]
80064d6: 681b ldr r3, [r3, #0]
80064d8: 681b ldr r3, [r3, #0]
80064da: f003 0301 and.w r3, r3, #1
80064de: 2b00 cmp r3, #0
80064e0: d056 beq.n 8006590 <HAL_DMA2D_PollForTransfer+0xca>
{
/* Get tick */
tickstart = HAL_GetTick();
80064e2: f7fe ff1d bl 8005320 <HAL_GetTick>
80064e6: 6178 str r0, [r7, #20]
while(__HAL_DMA2D_GET_FLAG(hdma2d, DMA2D_FLAG_TC) == 0U)
80064e8: e04b b.n 8006582 <HAL_DMA2D_PollForTransfer+0xbc>
{
isrflags = READ_REG(hdma2d->Instance->ISR);
80064ea: 687b ldr r3, [r7, #4]
80064ec: 681b ldr r3, [r3, #0]
80064ee: 685b ldr r3, [r3, #4]
80064f0: 60fb str r3, [r7, #12]
if ((isrflags & (DMA2D_FLAG_CE|DMA2D_FLAG_TE)) != 0U)
80064f2: 68fb ldr r3, [r7, #12]
80064f4: f003 0321 and.w r3, r3, #33 ; 0x21
80064f8: 2b00 cmp r3, #0
80064fa: d023 beq.n 8006544 <HAL_DMA2D_PollForTransfer+0x7e>
{
if ((isrflags & DMA2D_FLAG_CE) != 0U)
80064fc: 68fb ldr r3, [r7, #12]
80064fe: f003 0320 and.w r3, r3, #32
8006502: 2b00 cmp r3, #0
8006504: d005 beq.n 8006512 <HAL_DMA2D_PollForTransfer+0x4c>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_CE;
8006506: 687b ldr r3, [r7, #4]
8006508: 6bdb ldr r3, [r3, #60] ; 0x3c
800650a: f043 0202 orr.w r2, r3, #2
800650e: 687b ldr r3, [r7, #4]
8006510: 63da str r2, [r3, #60] ; 0x3c
}
if ((isrflags & DMA2D_FLAG_TE) != 0U)
8006512: 68fb ldr r3, [r7, #12]
8006514: f003 0301 and.w r3, r3, #1
8006518: 2b00 cmp r3, #0
800651a: d005 beq.n 8006528 <HAL_DMA2D_PollForTransfer+0x62>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_TE;
800651c: 687b ldr r3, [r7, #4]
800651e: 6bdb ldr r3, [r3, #60] ; 0x3c
8006520: f043 0201 orr.w r2, r3, #1
8006524: 687b ldr r3, [r7, #4]
8006526: 63da str r2, [r3, #60] ; 0x3c
}
/* Clear the transfer and configuration error flags */
__HAL_DMA2D_CLEAR_FLAG(hdma2d, DMA2D_FLAG_CE | DMA2D_FLAG_TE);
8006528: 687b ldr r3, [r7, #4]
800652a: 681b ldr r3, [r3, #0]
800652c: 2221 movs r2, #33 ; 0x21
800652e: 609a str r2, [r3, #8]
/* Change DMA2D state */
hdma2d->State = HAL_DMA2D_STATE_ERROR;
8006530: 687b ldr r3, [r7, #4]
8006532: 2204 movs r2, #4
8006534: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
8006538: 687b ldr r3, [r7, #4]
800653a: 2200 movs r2, #0
800653c: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_ERROR;
8006540: 2301 movs r3, #1
8006542: e0a5 b.n 8006690 <HAL_DMA2D_PollForTransfer+0x1ca>
}
/* Check for the Timeout */
if(Timeout != HAL_MAX_DELAY)
8006544: 683b ldr r3, [r7, #0]
8006546: f1b3 3fff cmp.w r3, #4294967295
800654a: d01a beq.n 8006582 <HAL_DMA2D_PollForTransfer+0xbc>
{
if(((HAL_GetTick() - tickstart ) > Timeout)||(Timeout == 0U))
800654c: f7fe fee8 bl 8005320 <HAL_GetTick>
8006550: 4602 mov r2, r0
8006552: 697b ldr r3, [r7, #20]
8006554: 1ad3 subs r3, r2, r3
8006556: 683a ldr r2, [r7, #0]
8006558: 429a cmp r2, r3
800655a: d302 bcc.n 8006562 <HAL_DMA2D_PollForTransfer+0x9c>
800655c: 683b ldr r3, [r7, #0]
800655e: 2b00 cmp r3, #0
8006560: d10f bne.n 8006582 <HAL_DMA2D_PollForTransfer+0xbc>
{
/* Update error code */
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_TIMEOUT;
8006562: 687b ldr r3, [r7, #4]
8006564: 6bdb ldr r3, [r3, #60] ; 0x3c
8006566: f043 0220 orr.w r2, r3, #32
800656a: 687b ldr r3, [r7, #4]
800656c: 63da str r2, [r3, #60] ; 0x3c
/* Change the DMA2D state */
hdma2d->State = HAL_DMA2D_STATE_TIMEOUT;
800656e: 687b ldr r3, [r7, #4]
8006570: 2203 movs r2, #3
8006572: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
8006576: 687b ldr r3, [r7, #4]
8006578: 2200 movs r2, #0
800657a: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_TIMEOUT;
800657e: 2303 movs r3, #3
8006580: e086 b.n 8006690 <HAL_DMA2D_PollForTransfer+0x1ca>
while(__HAL_DMA2D_GET_FLAG(hdma2d, DMA2D_FLAG_TC) == 0U)
8006582: 687b ldr r3, [r7, #4]
8006584: 681b ldr r3, [r3, #0]
8006586: 685b ldr r3, [r3, #4]
8006588: f003 0302 and.w r3, r3, #2
800658c: 2b00 cmp r3, #0
800658e: d0ac beq.n 80064ea <HAL_DMA2D_PollForTransfer+0x24>
}
}
}
}
/* Polling for CLUT loading (foreground or background) */
layer_start = hdma2d->Instance->FGPFCCR & DMA2D_FGPFCCR_START;
8006590: 687b ldr r3, [r7, #4]
8006592: 681b ldr r3, [r3, #0]
8006594: 69db ldr r3, [r3, #28]
8006596: f003 0320 and.w r3, r3, #32
800659a: 613b str r3, [r7, #16]
layer_start |= hdma2d->Instance->BGPFCCR & DMA2D_BGPFCCR_START;
800659c: 687b ldr r3, [r7, #4]
800659e: 681b ldr r3, [r3, #0]
80065a0: 6a5b ldr r3, [r3, #36] ; 0x24
80065a2: f003 0320 and.w r3, r3, #32
80065a6: 693a ldr r2, [r7, #16]
80065a8: 4313 orrs r3, r2
80065aa: 613b str r3, [r7, #16]
if (layer_start != 0U)
80065ac: 693b ldr r3, [r7, #16]
80065ae: 2b00 cmp r3, #0
80065b0: d061 beq.n 8006676 <HAL_DMA2D_PollForTransfer+0x1b0>
{
/* Get tick */
tickstart = HAL_GetTick();
80065b2: f7fe feb5 bl 8005320 <HAL_GetTick>
80065b6: 6178 str r0, [r7, #20]
while(__HAL_DMA2D_GET_FLAG(hdma2d, DMA2D_FLAG_CTC) == 0U)
80065b8: e056 b.n 8006668 <HAL_DMA2D_PollForTransfer+0x1a2>
{
isrflags = READ_REG(hdma2d->Instance->ISR);
80065ba: 687b ldr r3, [r7, #4]
80065bc: 681b ldr r3, [r3, #0]
80065be: 685b ldr r3, [r3, #4]
80065c0: 60fb str r3, [r7, #12]
if ((isrflags & (DMA2D_FLAG_CAE|DMA2D_FLAG_CE|DMA2D_FLAG_TE)) != 0U)
80065c2: 68fb ldr r3, [r7, #12]
80065c4: f003 0329 and.w r3, r3, #41 ; 0x29
80065c8: 2b00 cmp r3, #0
80065ca: d02e beq.n 800662a <HAL_DMA2D_PollForTransfer+0x164>
{
if ((isrflags & DMA2D_FLAG_CAE) != 0U)
80065cc: 68fb ldr r3, [r7, #12]
80065ce: f003 0308 and.w r3, r3, #8
80065d2: 2b00 cmp r3, #0
80065d4: d005 beq.n 80065e2 <HAL_DMA2D_PollForTransfer+0x11c>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_CAE;
80065d6: 687b ldr r3, [r7, #4]
80065d8: 6bdb ldr r3, [r3, #60] ; 0x3c
80065da: f043 0204 orr.w r2, r3, #4
80065de: 687b ldr r3, [r7, #4]
80065e0: 63da str r2, [r3, #60] ; 0x3c
}
if ((isrflags & DMA2D_FLAG_CE) != 0U)
80065e2: 68fb ldr r3, [r7, #12]
80065e4: f003 0320 and.w r3, r3, #32
80065e8: 2b00 cmp r3, #0
80065ea: d005 beq.n 80065f8 <HAL_DMA2D_PollForTransfer+0x132>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_CE;
80065ec: 687b ldr r3, [r7, #4]
80065ee: 6bdb ldr r3, [r3, #60] ; 0x3c
80065f0: f043 0202 orr.w r2, r3, #2
80065f4: 687b ldr r3, [r7, #4]
80065f6: 63da str r2, [r3, #60] ; 0x3c
}
if ((isrflags & DMA2D_FLAG_TE) != 0U)
80065f8: 68fb ldr r3, [r7, #12]
80065fa: f003 0301 and.w r3, r3, #1
80065fe: 2b00 cmp r3, #0
8006600: d005 beq.n 800660e <HAL_DMA2D_PollForTransfer+0x148>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_TE;
8006602: 687b ldr r3, [r7, #4]
8006604: 6bdb ldr r3, [r3, #60] ; 0x3c
8006606: f043 0201 orr.w r2, r3, #1
800660a: 687b ldr r3, [r7, #4]
800660c: 63da str r2, [r3, #60] ; 0x3c
}
/* Clear the CLUT Access Error, Configuration Error and Transfer Error flags */
__HAL_DMA2D_CLEAR_FLAG(hdma2d, DMA2D_FLAG_CAE | DMA2D_FLAG_CE | DMA2D_FLAG_TE);
800660e: 687b ldr r3, [r7, #4]
8006610: 681b ldr r3, [r3, #0]
8006612: 2229 movs r2, #41 ; 0x29
8006614: 609a str r2, [r3, #8]
/* Change DMA2D state */
hdma2d->State= HAL_DMA2D_STATE_ERROR;
8006616: 687b ldr r3, [r7, #4]
8006618: 2204 movs r2, #4
800661a: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
800661e: 687b ldr r3, [r7, #4]
8006620: 2200 movs r2, #0
8006622: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_ERROR;
8006626: 2301 movs r3, #1
8006628: e032 b.n 8006690 <HAL_DMA2D_PollForTransfer+0x1ca>
}
/* Check for the Timeout */
if(Timeout != HAL_MAX_DELAY)
800662a: 683b ldr r3, [r7, #0]
800662c: f1b3 3fff cmp.w r3, #4294967295
8006630: d01a beq.n 8006668 <HAL_DMA2D_PollForTransfer+0x1a2>
{
if(((HAL_GetTick() - tickstart ) > Timeout)||(Timeout == 0U))
8006632: f7fe fe75 bl 8005320 <HAL_GetTick>
8006636: 4602 mov r2, r0
8006638: 697b ldr r3, [r7, #20]
800663a: 1ad3 subs r3, r2, r3
800663c: 683a ldr r2, [r7, #0]
800663e: 429a cmp r2, r3
8006640: d302 bcc.n 8006648 <HAL_DMA2D_PollForTransfer+0x182>
8006642: 683b ldr r3, [r7, #0]
8006644: 2b00 cmp r3, #0
8006646: d10f bne.n 8006668 <HAL_DMA2D_PollForTransfer+0x1a2>
{
/* Update error code */
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_TIMEOUT;
8006648: 687b ldr r3, [r7, #4]
800664a: 6bdb ldr r3, [r3, #60] ; 0x3c
800664c: f043 0220 orr.w r2, r3, #32
8006650: 687b ldr r3, [r7, #4]
8006652: 63da str r2, [r3, #60] ; 0x3c
/* Change the DMA2D state */
hdma2d->State= HAL_DMA2D_STATE_TIMEOUT;
8006654: 687b ldr r3, [r7, #4]
8006656: 2203 movs r2, #3
8006658: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
800665c: 687b ldr r3, [r7, #4]
800665e: 2200 movs r2, #0
8006660: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_TIMEOUT;
8006664: 2303 movs r3, #3
8006666: e013 b.n 8006690 <HAL_DMA2D_PollForTransfer+0x1ca>
while(__HAL_DMA2D_GET_FLAG(hdma2d, DMA2D_FLAG_CTC) == 0U)
8006668: 687b ldr r3, [r7, #4]
800666a: 681b ldr r3, [r3, #0]
800666c: 685b ldr r3, [r3, #4]
800666e: f003 0310 and.w r3, r3, #16
8006672: 2b00 cmp r3, #0
8006674: d0a1 beq.n 80065ba <HAL_DMA2D_PollForTransfer+0xf4>
}
}
}
/* Clear the transfer complete and CLUT loading flags */
__HAL_DMA2D_CLEAR_FLAG(hdma2d, DMA2D_FLAG_TC|DMA2D_FLAG_CTC);
8006676: 687b ldr r3, [r7, #4]
8006678: 681b ldr r3, [r3, #0]
800667a: 2212 movs r2, #18
800667c: 609a str r2, [r3, #8]
/* Change DMA2D state */
hdma2d->State = HAL_DMA2D_STATE_READY;
800667e: 687b ldr r3, [r7, #4]
8006680: 2201 movs r2, #1
8006682: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
8006686: 687b ldr r3, [r7, #4]
8006688: 2200 movs r2, #0
800668a: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_OK;
800668e: 2300 movs r3, #0
}
8006690: 4618 mov r0, r3
8006692: 3718 adds r7, #24
8006694: 46bd mov sp, r7
8006696: bd80 pop {r7, pc}
08006698 <HAL_DMA2D_ConfigLayer>:
* This parameter can be one of the following values:
* DMA2D_BACKGROUND_LAYER(0) / DMA2D_FOREGROUND_LAYER(1)
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DMA2D_ConfigLayer(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
{
8006698: b480 push {r7}
800669a: b087 sub sp, #28
800669c: af00 add r7, sp, #0
800669e: 6078 str r0, [r7, #4]
80066a0: 6039 str r1, [r7, #0]
uint32_t regMask, regValue;
/* Check the parameters */
assert_param(IS_DMA2D_LAYER(LayerIdx));
assert_param(IS_DMA2D_OFFSET(hdma2d->LayerCfg[LayerIdx].InputOffset));
if(hdma2d->Init.Mode != DMA2D_R2M)
80066a2: 687b ldr r3, [r7, #4]
80066a4: 685b ldr r3, [r3, #4]
80066a6: f5b3 3f40 cmp.w r3, #196608 ; 0x30000
assert_param(IS_DMA2D_ALPHA_INVERTED(hdma2d->LayerCfg[LayerIdx].AlphaInverted));
assert_param(IS_DMA2D_RB_SWAP(hdma2d->LayerCfg[LayerIdx].RedBlueSwap));
#endif /* DMA2D_ALPHA_INV_RB_SWAP_SUPPORT */
/* Process locked */
__HAL_LOCK(hdma2d);
80066aa: 687b ldr r3, [r7, #4]
80066ac: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
80066b0: 2b01 cmp r3, #1
80066b2: d101 bne.n 80066b8 <HAL_DMA2D_ConfigLayer+0x20>
80066b4: 2302 movs r3, #2
80066b6: e079 b.n 80067ac <HAL_DMA2D_ConfigLayer+0x114>
80066b8: 687b ldr r3, [r7, #4]
80066ba: 2201 movs r2, #1
80066bc: f883 2038 strb.w r2, [r3, #56] ; 0x38
/* Change DMA2D peripheral state */
hdma2d->State = HAL_DMA2D_STATE_BUSY;
80066c0: 687b ldr r3, [r7, #4]
80066c2: 2202 movs r2, #2
80066c4: f883 2039 strb.w r2, [r3, #57] ; 0x39
pLayerCfg = &hdma2d->LayerCfg[LayerIdx];
80066c8: 683b ldr r3, [r7, #0]
80066ca: 011b lsls r3, r3, #4
80066cc: 3318 adds r3, #24
80066ce: 687a ldr r2, [r7, #4]
80066d0: 4413 add r3, r2
80066d2: 613b str r3, [r7, #16]
#if defined (DMA2D_ALPHA_INV_RB_SWAP_SUPPORT)
regValue = pLayerCfg->InputColorMode | (pLayerCfg->AlphaMode << DMA2D_BGPFCCR_AM_Pos) |\
(pLayerCfg->AlphaInverted << DMA2D_BGPFCCR_AI_Pos) | (pLayerCfg->RedBlueSwap << DMA2D_BGPFCCR_RBS_Pos);
regMask = (DMA2D_BGPFCCR_CM | DMA2D_BGPFCCR_AM | DMA2D_BGPFCCR_ALPHA | DMA2D_BGPFCCR_AI | DMA2D_BGPFCCR_RBS);
#else
regValue = pLayerCfg->InputColorMode | (pLayerCfg->AlphaMode << DMA2D_BGPFCCR_AM_Pos);
80066d4: 693b ldr r3, [r7, #16]
80066d6: 685a ldr r2, [r3, #4]
80066d8: 693b ldr r3, [r7, #16]
80066da: 689b ldr r3, [r3, #8]
80066dc: 041b lsls r3, r3, #16
80066de: 4313 orrs r3, r2
80066e0: 617b str r3, [r7, #20]
regMask = DMA2D_BGPFCCR_CM | DMA2D_BGPFCCR_AM | DMA2D_BGPFCCR_ALPHA;
80066e2: 4b35 ldr r3, [pc, #212] ; (80067b8 <HAL_DMA2D_ConfigLayer+0x120>)
80066e4: 60fb str r3, [r7, #12]
#endif /* DMA2D_ALPHA_INV_RB_SWAP_SUPPORT */
if ((pLayerCfg->InputColorMode == DMA2D_INPUT_A4) || (pLayerCfg->InputColorMode == DMA2D_INPUT_A8))
80066e6: 693b ldr r3, [r7, #16]
80066e8: 685b ldr r3, [r3, #4]
80066ea: 2b0a cmp r3, #10
80066ec: d003 beq.n 80066f6 <HAL_DMA2D_ConfigLayer+0x5e>
80066ee: 693b ldr r3, [r7, #16]
80066f0: 685b ldr r3, [r3, #4]
80066f2: 2b09 cmp r3, #9
80066f4: d107 bne.n 8006706 <HAL_DMA2D_ConfigLayer+0x6e>
{
regValue |= (pLayerCfg->InputAlpha & DMA2D_BGPFCCR_ALPHA);
80066f6: 693b ldr r3, [r7, #16]
80066f8: 68db ldr r3, [r3, #12]
80066fa: f003 437f and.w r3, r3, #4278190080 ; 0xff000000
80066fe: 697a ldr r2, [r7, #20]
8006700: 4313 orrs r3, r2
8006702: 617b str r3, [r7, #20]
8006704: e005 b.n 8006712 <HAL_DMA2D_ConfigLayer+0x7a>
}
else
{
regValue |= (pLayerCfg->InputAlpha << DMA2D_BGPFCCR_ALPHA_Pos);
8006706: 693b ldr r3, [r7, #16]
8006708: 68db ldr r3, [r3, #12]
800670a: 061b lsls r3, r3, #24
800670c: 697a ldr r2, [r7, #20]
800670e: 4313 orrs r3, r2
8006710: 617b str r3, [r7, #20]
}
/* Configure the background DMA2D layer */
if(LayerIdx == DMA2D_BACKGROUND_LAYER)
8006712: 683b ldr r3, [r7, #0]
8006714: 2b00 cmp r3, #0
8006716: d120 bne.n 800675a <HAL_DMA2D_ConfigLayer+0xc2>
{
/* Write DMA2D BGPFCCR register */
MODIFY_REG(hdma2d->Instance->BGPFCCR, regMask, regValue);
8006718: 687b ldr r3, [r7, #4]
800671a: 681b ldr r3, [r3, #0]
800671c: 6a5a ldr r2, [r3, #36] ; 0x24
800671e: 68fb ldr r3, [r7, #12]
8006720: 43db mvns r3, r3
8006722: ea02 0103 and.w r1, r2, r3
8006726: 687b ldr r3, [r7, #4]
8006728: 681b ldr r3, [r3, #0]
800672a: 697a ldr r2, [r7, #20]
800672c: 430a orrs r2, r1
800672e: 625a str r2, [r3, #36] ; 0x24
/* DMA2D BGOR register configuration -------------------------------------*/
WRITE_REG(hdma2d->Instance->BGOR, pLayerCfg->InputOffset);
8006730: 687b ldr r3, [r7, #4]
8006732: 681b ldr r3, [r3, #0]
8006734: 693a ldr r2, [r7, #16]
8006736: 6812 ldr r2, [r2, #0]
8006738: 619a str r2, [r3, #24]
/* DMA2D BGCOLR register configuration -------------------------------------*/
if ((pLayerCfg->InputColorMode == DMA2D_INPUT_A4) || (pLayerCfg->InputColorMode == DMA2D_INPUT_A8))
800673a: 693b ldr r3, [r7, #16]
800673c: 685b ldr r3, [r3, #4]
800673e: 2b0a cmp r3, #10
8006740: d003 beq.n 800674a <HAL_DMA2D_ConfigLayer+0xb2>
8006742: 693b ldr r3, [r7, #16]
8006744: 685b ldr r3, [r3, #4]
8006746: 2b09 cmp r3, #9
8006748: d127 bne.n 800679a <HAL_DMA2D_ConfigLayer+0x102>
{
WRITE_REG(hdma2d->Instance->BGCOLR, pLayerCfg->InputAlpha & (DMA2D_BGCOLR_BLUE|DMA2D_BGCOLR_GREEN|DMA2D_BGCOLR_RED));
800674a: 693b ldr r3, [r7, #16]
800674c: 68da ldr r2, [r3, #12]
800674e: 687b ldr r3, [r7, #4]
8006750: 681b ldr r3, [r3, #0]
8006752: f022 427f bic.w r2, r2, #4278190080 ; 0xff000000
8006756: 629a str r2, [r3, #40] ; 0x28
8006758: e01f b.n 800679a <HAL_DMA2D_ConfigLayer+0x102>
else
{
/* Write DMA2D FGPFCCR register */
MODIFY_REG(hdma2d->Instance->FGPFCCR, regMask, regValue);
800675a: 687b ldr r3, [r7, #4]
800675c: 681b ldr r3, [r3, #0]
800675e: 69da ldr r2, [r3, #28]
8006760: 68fb ldr r3, [r7, #12]
8006762: 43db mvns r3, r3
8006764: ea02 0103 and.w r1, r2, r3
8006768: 687b ldr r3, [r7, #4]
800676a: 681b ldr r3, [r3, #0]
800676c: 697a ldr r2, [r7, #20]
800676e: 430a orrs r2, r1
8006770: 61da str r2, [r3, #28]
/* DMA2D FGOR register configuration -------------------------------------*/
WRITE_REG(hdma2d->Instance->FGOR, pLayerCfg->InputOffset);
8006772: 687b ldr r3, [r7, #4]
8006774: 681b ldr r3, [r3, #0]
8006776: 693a ldr r2, [r7, #16]
8006778: 6812 ldr r2, [r2, #0]
800677a: 611a str r2, [r3, #16]
/* DMA2D FGCOLR register configuration -------------------------------------*/
if ((pLayerCfg->InputColorMode == DMA2D_INPUT_A4) || (pLayerCfg->InputColorMode == DMA2D_INPUT_A8))
800677c: 693b ldr r3, [r7, #16]
800677e: 685b ldr r3, [r3, #4]
8006780: 2b0a cmp r3, #10
8006782: d003 beq.n 800678c <HAL_DMA2D_ConfigLayer+0xf4>
8006784: 693b ldr r3, [r7, #16]
8006786: 685b ldr r3, [r3, #4]
8006788: 2b09 cmp r3, #9
800678a: d106 bne.n 800679a <HAL_DMA2D_ConfigLayer+0x102>
{
WRITE_REG(hdma2d->Instance->FGCOLR, pLayerCfg->InputAlpha & (DMA2D_FGCOLR_BLUE|DMA2D_FGCOLR_GREEN|DMA2D_FGCOLR_RED));
800678c: 693b ldr r3, [r7, #16]
800678e: 68da ldr r2, [r3, #12]
8006790: 687b ldr r3, [r7, #4]
8006792: 681b ldr r3, [r3, #0]
8006794: f022 427f bic.w r2, r2, #4278190080 ; 0xff000000
8006798: 621a str r2, [r3, #32]
}
}
/* Initialize the DMA2D state*/
hdma2d->State = HAL_DMA2D_STATE_READY;
800679a: 687b ldr r3, [r7, #4]
800679c: 2201 movs r2, #1
800679e: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
80067a2: 687b ldr r3, [r7, #4]
80067a4: 2200 movs r2, #0
80067a6: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_OK;
80067aa: 2300 movs r3, #0
}
80067ac: 4618 mov r0, r3
80067ae: 371c adds r7, #28
80067b0: 46bd mov sp, r7
80067b2: f85d 7b04 ldr.w r7, [sp], #4
80067b6: 4770 bx lr
80067b8: ff03000f .word 0xff03000f
080067bc <DMA2D_SetConfig>:
* @param Width The width of data to be transferred from source to destination.
* @param Height The height of data to be transferred from source to destination.
* @retval HAL status
*/
static void DMA2D_SetConfig(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height)
{
80067bc: b480 push {r7}
80067be: b08b sub sp, #44 ; 0x2c
80067c0: af00 add r7, sp, #0
80067c2: 60f8 str r0, [r7, #12]
80067c4: 60b9 str r1, [r7, #8]
80067c6: 607a str r2, [r7, #4]
80067c8: 603b str r3, [r7, #0]
uint32_t tmp2;
uint32_t tmp3;
uint32_t tmp4;
/* Configure DMA2D data size */
MODIFY_REG(hdma2d->Instance->NLR, (DMA2D_NLR_NL|DMA2D_NLR_PL), (Height| (Width << DMA2D_NLR_PL_Pos)));
80067ca: 68fb ldr r3, [r7, #12]
80067cc: 681b ldr r3, [r3, #0]
80067ce: 6c5b ldr r3, [r3, #68] ; 0x44
80067d0: f003 4140 and.w r1, r3, #3221225472 ; 0xc0000000
80067d4: 683b ldr r3, [r7, #0]
80067d6: 041a lsls r2, r3, #16
80067d8: 6b3b ldr r3, [r7, #48] ; 0x30
80067da: 431a orrs r2, r3
80067dc: 68fb ldr r3, [r7, #12]
80067de: 681b ldr r3, [r3, #0]
80067e0: 430a orrs r2, r1
80067e2: 645a str r2, [r3, #68] ; 0x44
/* Configure DMA2D destination address */
WRITE_REG(hdma2d->Instance->OMAR, DstAddress);
80067e4: 68fb ldr r3, [r7, #12]
80067e6: 681b ldr r3, [r3, #0]
80067e8: 687a ldr r2, [r7, #4]
80067ea: 63da str r2, [r3, #60] ; 0x3c
/* Register to memory DMA2D mode selected */
if (hdma2d->Init.Mode == DMA2D_R2M)
80067ec: 68fb ldr r3, [r7, #12]
80067ee: 685b ldr r3, [r3, #4]
80067f0: f5b3 3f40 cmp.w r3, #196608 ; 0x30000
80067f4: d174 bne.n 80068e0 <DMA2D_SetConfig+0x124>
{
tmp1 = pdata & DMA2D_OCOLR_ALPHA_1;
80067f6: 68bb ldr r3, [r7, #8]
80067f8: f003 437f and.w r3, r3, #4278190080 ; 0xff000000
80067fc: 623b str r3, [r7, #32]
tmp2 = pdata & DMA2D_OCOLR_RED_1;
80067fe: 68bb ldr r3, [r7, #8]
8006800: f403 037f and.w r3, r3, #16711680 ; 0xff0000
8006804: 61fb str r3, [r7, #28]
tmp3 = pdata & DMA2D_OCOLR_GREEN_1;
8006806: 68bb ldr r3, [r7, #8]
8006808: f403 437f and.w r3, r3, #65280 ; 0xff00
800680c: 61bb str r3, [r7, #24]
tmp4 = pdata & DMA2D_OCOLR_BLUE_1;
800680e: 68bb ldr r3, [r7, #8]
8006810: b2db uxtb r3, r3
8006812: 617b str r3, [r7, #20]
/* Prepare the value to be written to the OCOLR register according to the color mode */
if (hdma2d->Init.ColorMode == DMA2D_OUTPUT_ARGB8888)
8006814: 68fb ldr r3, [r7, #12]
8006816: 689b ldr r3, [r3, #8]
8006818: 2b00 cmp r3, #0
800681a: d108 bne.n 800682e <DMA2D_SetConfig+0x72>
{
tmp = (tmp3 | tmp2 | tmp1| tmp4);
800681c: 69ba ldr r2, [r7, #24]
800681e: 69fb ldr r3, [r7, #28]
8006820: 431a orrs r2, r3
8006822: 6a3b ldr r3, [r7, #32]
8006824: 4313 orrs r3, r2
8006826: 697a ldr r2, [r7, #20]
8006828: 4313 orrs r3, r2
800682a: 627b str r3, [r7, #36] ; 0x24
800682c: e053 b.n 80068d6 <DMA2D_SetConfig+0x11a>
}
else if (hdma2d->Init.ColorMode == DMA2D_OUTPUT_RGB888)
800682e: 68fb ldr r3, [r7, #12]
8006830: 689b ldr r3, [r3, #8]
8006832: 2b01 cmp r3, #1
8006834: d106 bne.n 8006844 <DMA2D_SetConfig+0x88>
{
tmp = (tmp3 | tmp2 | tmp4);
8006836: 69ba ldr r2, [r7, #24]
8006838: 69fb ldr r3, [r7, #28]
800683a: 4313 orrs r3, r2
800683c: 697a ldr r2, [r7, #20]
800683e: 4313 orrs r3, r2
8006840: 627b str r3, [r7, #36] ; 0x24
8006842: e048 b.n 80068d6 <DMA2D_SetConfig+0x11a>
}
else if (hdma2d->Init.ColorMode == DMA2D_OUTPUT_RGB565)
8006844: 68fb ldr r3, [r7, #12]
8006846: 689b ldr r3, [r3, #8]
8006848: 2b02 cmp r3, #2
800684a: d111 bne.n 8006870 <DMA2D_SetConfig+0xb4>
{
tmp2 = (tmp2 >> 19U);
800684c: 69fb ldr r3, [r7, #28]
800684e: 0cdb lsrs r3, r3, #19
8006850: 61fb str r3, [r7, #28]
tmp3 = (tmp3 >> 10U);
8006852: 69bb ldr r3, [r7, #24]
8006854: 0a9b lsrs r3, r3, #10
8006856: 61bb str r3, [r7, #24]
tmp4 = (tmp4 >> 3U );
8006858: 697b ldr r3, [r7, #20]
800685a: 08db lsrs r3, r3, #3
800685c: 617b str r3, [r7, #20]
tmp = ((tmp3 << 5U) | (tmp2 << 11U) | tmp4);
800685e: 69bb ldr r3, [r7, #24]
8006860: 015a lsls r2, r3, #5
8006862: 69fb ldr r3, [r7, #28]
8006864: 02db lsls r3, r3, #11
8006866: 4313 orrs r3, r2
8006868: 697a ldr r2, [r7, #20]
800686a: 4313 orrs r3, r2
800686c: 627b str r3, [r7, #36] ; 0x24
800686e: e032 b.n 80068d6 <DMA2D_SetConfig+0x11a>
}
else if (hdma2d->Init.ColorMode == DMA2D_OUTPUT_ARGB1555)
8006870: 68fb ldr r3, [r7, #12]
8006872: 689b ldr r3, [r3, #8]
8006874: 2b03 cmp r3, #3
8006876: d117 bne.n 80068a8 <DMA2D_SetConfig+0xec>
{
tmp1 = (tmp1 >> 31U);
8006878: 6a3b ldr r3, [r7, #32]
800687a: 0fdb lsrs r3, r3, #31
800687c: 623b str r3, [r7, #32]
tmp2 = (tmp2 >> 19U);
800687e: 69fb ldr r3, [r7, #28]
8006880: 0cdb lsrs r3, r3, #19
8006882: 61fb str r3, [r7, #28]
tmp3 = (tmp3 >> 11U);
8006884: 69bb ldr r3, [r7, #24]
8006886: 0adb lsrs r3, r3, #11
8006888: 61bb str r3, [r7, #24]
tmp4 = (tmp4 >> 3U );
800688a: 697b ldr r3, [r7, #20]
800688c: 08db lsrs r3, r3, #3
800688e: 617b str r3, [r7, #20]
tmp = ((tmp3 << 5U) | (tmp2 << 10U) | (tmp1 << 15U) | tmp4);
8006890: 69bb ldr r3, [r7, #24]
8006892: 015a lsls r2, r3, #5
8006894: 69fb ldr r3, [r7, #28]
8006896: 029b lsls r3, r3, #10
8006898: 431a orrs r2, r3
800689a: 6a3b ldr r3, [r7, #32]
800689c: 03db lsls r3, r3, #15
800689e: 4313 orrs r3, r2
80068a0: 697a ldr r2, [r7, #20]
80068a2: 4313 orrs r3, r2
80068a4: 627b str r3, [r7, #36] ; 0x24
80068a6: e016 b.n 80068d6 <DMA2D_SetConfig+0x11a>
}
else /* Dhdma2d->Init.ColorMode = DMA2D_OUTPUT_ARGB4444 */
{
tmp1 = (tmp1 >> 28U);
80068a8: 6a3b ldr r3, [r7, #32]
80068aa: 0f1b lsrs r3, r3, #28
80068ac: 623b str r3, [r7, #32]
tmp2 = (tmp2 >> 20U);
80068ae: 69fb ldr r3, [r7, #28]
80068b0: 0d1b lsrs r3, r3, #20
80068b2: 61fb str r3, [r7, #28]
tmp3 = (tmp3 >> 12U);
80068b4: 69bb ldr r3, [r7, #24]
80068b6: 0b1b lsrs r3, r3, #12
80068b8: 61bb str r3, [r7, #24]
tmp4 = (tmp4 >> 4U );
80068ba: 697b ldr r3, [r7, #20]
80068bc: 091b lsrs r3, r3, #4
80068be: 617b str r3, [r7, #20]
tmp = ((tmp3 << 4U) | (tmp2 << 8U) | (tmp1 << 12U) | tmp4);
80068c0: 69bb ldr r3, [r7, #24]
80068c2: 011a lsls r2, r3, #4
80068c4: 69fb ldr r3, [r7, #28]
80068c6: 021b lsls r3, r3, #8
80068c8: 431a orrs r2, r3
80068ca: 6a3b ldr r3, [r7, #32]
80068cc: 031b lsls r3, r3, #12
80068ce: 4313 orrs r3, r2
80068d0: 697a ldr r2, [r7, #20]
80068d2: 4313 orrs r3, r2
80068d4: 627b str r3, [r7, #36] ; 0x24
}
/* Write to DMA2D OCOLR register */
WRITE_REG(hdma2d->Instance->OCOLR, tmp);
80068d6: 68fb ldr r3, [r7, #12]
80068d8: 681b ldr r3, [r3, #0]
80068da: 6a7a ldr r2, [r7, #36] ; 0x24
80068dc: 639a str r2, [r3, #56] ; 0x38
else /* M2M, M2M_PFC or M2M_Blending DMA2D Mode */
{
/* Configure DMA2D source address */
WRITE_REG(hdma2d->Instance->FGMAR, pdata);
}
}
80068de: e003 b.n 80068e8 <DMA2D_SetConfig+0x12c>
WRITE_REG(hdma2d->Instance->FGMAR, pdata);
80068e0: 68fb ldr r3, [r7, #12]
80068e2: 681b ldr r3, [r3, #0]
80068e4: 68ba ldr r2, [r7, #8]
80068e6: 60da str r2, [r3, #12]
}
80068e8: bf00 nop
80068ea: 372c adds r7, #44 ; 0x2c
80068ec: 46bd mov sp, r7
80068ee: f85d 7b04 ldr.w r7, [sp], #4
80068f2: 4770 bx lr
080068f4 <HAL_ETH_Init>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth)
{
80068f4: b580 push {r7, lr}
80068f6: b088 sub sp, #32
80068f8: af00 add r7, sp, #0
80068fa: 6078 str r0, [r7, #4]
uint32_t tempreg = 0, phyreg = 0;
80068fc: 2300 movs r3, #0
80068fe: 61fb str r3, [r7, #28]
8006900: 2300 movs r3, #0
8006902: 60fb str r3, [r7, #12]
uint32_t hclk = 60000000;
8006904: 4ba9 ldr r3, [pc, #676] ; (8006bac <HAL_ETH_Init+0x2b8>)
8006906: 61bb str r3, [r7, #24]
uint32_t tickstart = 0;
8006908: 2300 movs r3, #0
800690a: 617b str r3, [r7, #20]
uint32_t err = ETH_SUCCESS;
800690c: 2300 movs r3, #0
800690e: 613b str r3, [r7, #16]
/* Check the ETH peripheral state */
if(heth == NULL)
8006910: 687b ldr r3, [r7, #4]
8006912: 2b00 cmp r3, #0
8006914: d101 bne.n 800691a <HAL_ETH_Init+0x26>
{
return HAL_ERROR;
8006916: 2301 movs r3, #1
8006918: e183 b.n 8006c22 <HAL_ETH_Init+0x32e>
assert_param(IS_ETH_AUTONEGOTIATION(heth->Init.AutoNegotiation));
assert_param(IS_ETH_RX_MODE(heth->Init.RxMode));
assert_param(IS_ETH_CHECKSUM_MODE(heth->Init.ChecksumMode));
assert_param(IS_ETH_MEDIA_INTERFACE(heth->Init.MediaInterface));
if(heth->State == HAL_ETH_STATE_RESET)
800691a: 687b ldr r3, [r7, #4]
800691c: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
8006920: b2db uxtb r3, r3
8006922: 2b00 cmp r3, #0
8006924: d106 bne.n 8006934 <HAL_ETH_Init+0x40>
{
/* Allocate lock resource and initialize it */
heth->Lock = HAL_UNLOCKED;
8006926: 687b ldr r3, [r7, #4]
8006928: 2200 movs r2, #0
800692a: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
heth->MspInitCallback(heth);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC. */
HAL_ETH_MspInit(heth);
800692e: 6878 ldr r0, [r7, #4]
8006930: f006 fa70 bl 800ce14 <HAL_ETH_MspInit>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
}
/* Enable SYSCFG Clock */
__HAL_RCC_SYSCFG_CLK_ENABLE();
8006934: 4b9e ldr r3, [pc, #632] ; (8006bb0 <HAL_ETH_Init+0x2bc>)
8006936: 6c5b ldr r3, [r3, #68] ; 0x44
8006938: 4a9d ldr r2, [pc, #628] ; (8006bb0 <HAL_ETH_Init+0x2bc>)
800693a: f443 4380 orr.w r3, r3, #16384 ; 0x4000
800693e: 6453 str r3, [r2, #68] ; 0x44
8006940: 4b9b ldr r3, [pc, #620] ; (8006bb0 <HAL_ETH_Init+0x2bc>)
8006942: 6c5b ldr r3, [r3, #68] ; 0x44
8006944: f403 4380 and.w r3, r3, #16384 ; 0x4000
8006948: 60bb str r3, [r7, #8]
800694a: 68bb ldr r3, [r7, #8]
/* Select MII or RMII Mode*/
SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL);
800694c: 4b99 ldr r3, [pc, #612] ; (8006bb4 <HAL_ETH_Init+0x2c0>)
800694e: 685b ldr r3, [r3, #4]
8006950: 4a98 ldr r2, [pc, #608] ; (8006bb4 <HAL_ETH_Init+0x2c0>)
8006952: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
8006956: 6053 str r3, [r2, #4]
SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface;
8006958: 4b96 ldr r3, [pc, #600] ; (8006bb4 <HAL_ETH_Init+0x2c0>)
800695a: 685a ldr r2, [r3, #4]
800695c: 687b ldr r3, [r7, #4]
800695e: 6a1b ldr r3, [r3, #32]
8006960: 4994 ldr r1, [pc, #592] ; (8006bb4 <HAL_ETH_Init+0x2c0>)
8006962: 4313 orrs r3, r2
8006964: 604b str r3, [r1, #4]
/* Ethernet Software reset */
/* Set the SWR bit: resets all MAC subsystem internal registers and logic */
/* After reset all the registers holds their respective reset values */
(heth->Instance)->DMABMR |= ETH_DMABMR_SR;
8006966: 687b ldr r3, [r7, #4]
8006968: 681b ldr r3, [r3, #0]
800696a: f503 5380 add.w r3, r3, #4096 ; 0x1000
800696e: 681a ldr r2, [r3, #0]
8006970: 687b ldr r3, [r7, #4]
8006972: 681b ldr r3, [r3, #0]
8006974: f042 0201 orr.w r2, r2, #1
8006978: f503 5380 add.w r3, r3, #4096 ; 0x1000
800697c: 601a str r2, [r3, #0]
/* Get tick */
tickstart = HAL_GetTick();
800697e: f7fe fccf bl 8005320 <HAL_GetTick>
8006982: 6178 str r0, [r7, #20]
/* Wait for software reset */
while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET)
8006984: e011 b.n 80069aa <HAL_ETH_Init+0xb6>
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_SWRESET)
8006986: f7fe fccb bl 8005320 <HAL_GetTick>
800698a: 4602 mov r2, r0
800698c: 697b ldr r3, [r7, #20]
800698e: 1ad3 subs r3, r2, r3
8006990: f5b3 7ffa cmp.w r3, #500 ; 0x1f4
8006994: d909 bls.n 80069aa <HAL_ETH_Init+0xb6>
{
heth->State= HAL_ETH_STATE_TIMEOUT;
8006996: 687b ldr r3, [r7, #4]
8006998: 2203 movs r2, #3
800699a: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
800699e: 687b ldr r3, [r7, #4]
80069a0: 2200 movs r2, #0
80069a2: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Note: The SWR is not performed if the ETH_RX_CLK or the ETH_TX_CLK are
not available, please check your external PHY or the IO configuration */
return HAL_TIMEOUT;
80069a6: 2303 movs r3, #3
80069a8: e13b b.n 8006c22 <HAL_ETH_Init+0x32e>
while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET)
80069aa: 687b ldr r3, [r7, #4]
80069ac: 681b ldr r3, [r3, #0]
80069ae: f503 5380 add.w r3, r3, #4096 ; 0x1000
80069b2: 681b ldr r3, [r3, #0]
80069b4: f003 0301 and.w r3, r3, #1
80069b8: 2b00 cmp r3, #0
80069ba: d1e4 bne.n 8006986 <HAL_ETH_Init+0x92>
}
}
/*-------------------------------- MAC Initialization ----------------------*/
/* Get the ETHERNET MACMIIAR value */
tempreg = (heth->Instance)->MACMIIAR;
80069bc: 687b ldr r3, [r7, #4]
80069be: 681b ldr r3, [r3, #0]
80069c0: 691b ldr r3, [r3, #16]
80069c2: 61fb str r3, [r7, #28]
/* Clear CSR Clock Range CR[2:0] bits */
tempreg &= ETH_MACMIIAR_CR_MASK;
80069c4: 69fb ldr r3, [r7, #28]
80069c6: f023 031c bic.w r3, r3, #28
80069ca: 61fb str r3, [r7, #28]
/* Get hclk frequency value */
hclk = HAL_RCC_GetHCLKFreq();
80069cc: f003 f9c8 bl 8009d60 <HAL_RCC_GetHCLKFreq>
80069d0: 61b8 str r0, [r7, #24]
/* Set CR bits depending on hclk value */
if((hclk >= 20000000)&&(hclk < 35000000))
80069d2: 69bb ldr r3, [r7, #24]
80069d4: 4a78 ldr r2, [pc, #480] ; (8006bb8 <HAL_ETH_Init+0x2c4>)
80069d6: 4293 cmp r3, r2
80069d8: d908 bls.n 80069ec <HAL_ETH_Init+0xf8>
80069da: 69bb ldr r3, [r7, #24]
80069dc: 4a77 ldr r2, [pc, #476] ; (8006bbc <HAL_ETH_Init+0x2c8>)
80069de: 4293 cmp r3, r2
80069e0: d804 bhi.n 80069ec <HAL_ETH_Init+0xf8>
{
/* CSR Clock Range between 20-35 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div16;
80069e2: 69fb ldr r3, [r7, #28]
80069e4: f043 0308 orr.w r3, r3, #8
80069e8: 61fb str r3, [r7, #28]
80069ea: e027 b.n 8006a3c <HAL_ETH_Init+0x148>
}
else if((hclk >= 35000000)&&(hclk < 60000000))
80069ec: 69bb ldr r3, [r7, #24]
80069ee: 4a73 ldr r2, [pc, #460] ; (8006bbc <HAL_ETH_Init+0x2c8>)
80069f0: 4293 cmp r3, r2
80069f2: d908 bls.n 8006a06 <HAL_ETH_Init+0x112>
80069f4: 69bb ldr r3, [r7, #24]
80069f6: 4a72 ldr r2, [pc, #456] ; (8006bc0 <HAL_ETH_Init+0x2cc>)
80069f8: 4293 cmp r3, r2
80069fa: d804 bhi.n 8006a06 <HAL_ETH_Init+0x112>
{
/* CSR Clock Range between 35-60 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div26;
80069fc: 69fb ldr r3, [r7, #28]
80069fe: f043 030c orr.w r3, r3, #12
8006a02: 61fb str r3, [r7, #28]
8006a04: e01a b.n 8006a3c <HAL_ETH_Init+0x148>
}
else if((hclk >= 60000000)&&(hclk < 100000000))
8006a06: 69bb ldr r3, [r7, #24]
8006a08: 4a6d ldr r2, [pc, #436] ; (8006bc0 <HAL_ETH_Init+0x2cc>)
8006a0a: 4293 cmp r3, r2
8006a0c: d903 bls.n 8006a16 <HAL_ETH_Init+0x122>
8006a0e: 69bb ldr r3, [r7, #24]
8006a10: 4a6c ldr r2, [pc, #432] ; (8006bc4 <HAL_ETH_Init+0x2d0>)
8006a12: 4293 cmp r3, r2
8006a14: d911 bls.n 8006a3a <HAL_ETH_Init+0x146>
{
/* CSR Clock Range between 60-100 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
}
else if((hclk >= 100000000)&&(hclk < 150000000))
8006a16: 69bb ldr r3, [r7, #24]
8006a18: 4a6a ldr r2, [pc, #424] ; (8006bc4 <HAL_ETH_Init+0x2d0>)
8006a1a: 4293 cmp r3, r2
8006a1c: d908 bls.n 8006a30 <HAL_ETH_Init+0x13c>
8006a1e: 69bb ldr r3, [r7, #24]
8006a20: 4a69 ldr r2, [pc, #420] ; (8006bc8 <HAL_ETH_Init+0x2d4>)
8006a22: 4293 cmp r3, r2
8006a24: d804 bhi.n 8006a30 <HAL_ETH_Init+0x13c>
{
/* CSR Clock Range between 100-150 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div62;
8006a26: 69fb ldr r3, [r7, #28]
8006a28: f043 0304 orr.w r3, r3, #4
8006a2c: 61fb str r3, [r7, #28]
8006a2e: e005 b.n 8006a3c <HAL_ETH_Init+0x148>
}
else /* ((hclk >= 150000000)&&(hclk <= 216000000)) */
{
/* CSR Clock Range between 150-216 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div102;
8006a30: 69fb ldr r3, [r7, #28]
8006a32: f043 0310 orr.w r3, r3, #16
8006a36: 61fb str r3, [r7, #28]
8006a38: e000 b.n 8006a3c <HAL_ETH_Init+0x148>
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
8006a3a: bf00 nop
}
/* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */
(heth->Instance)->MACMIIAR = (uint32_t)tempreg;
8006a3c: 687b ldr r3, [r7, #4]
8006a3e: 681b ldr r3, [r3, #0]
8006a40: 69fa ldr r2, [r7, #28]
8006a42: 611a str r2, [r3, #16]
/*-------------------- PHY initialization and configuration ----------------*/
/* Put the PHY in reset mode */
if((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_RESET)) != HAL_OK)
8006a44: f44f 4200 mov.w r2, #32768 ; 0x8000
8006a48: 2100 movs r1, #0
8006a4a: 6878 ldr r0, [r7, #4]
8006a4c: f000 fc19 bl 8007282 <HAL_ETH_WritePHYRegister>
8006a50: 4603 mov r3, r0
8006a52: 2b00 cmp r3, #0
8006a54: d00b beq.n 8006a6e <HAL_ETH_Init+0x17a>
{
/* In case of write timeout */
err = ETH_ERROR;
8006a56: 2301 movs r3, #1
8006a58: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006a5a: 6939 ldr r1, [r7, #16]
8006a5c: 6878 ldr r0, [r7, #4]
8006a5e: f000 fdcf bl 8007600 <ETH_MACDMAConfig>
/* Set the ETH peripheral state to READY */
heth->State = HAL_ETH_STATE_READY;
8006a62: 687b ldr r3, [r7, #4]
8006a64: 2201 movs r2, #1
8006a66: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return HAL_ERROR */
return HAL_ERROR;
8006a6a: 2301 movs r3, #1
8006a6c: e0d9 b.n 8006c22 <HAL_ETH_Init+0x32e>
}
/* Delay to assure PHY reset */
HAL_Delay(PHY_RESET_DELAY);
8006a6e: 20ff movs r0, #255 ; 0xff
8006a70: f7fe fc62 bl 8005338 <HAL_Delay>
if((heth->Init).AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE)
8006a74: 687b ldr r3, [r7, #4]
8006a76: 685b ldr r3, [r3, #4]
8006a78: 2b00 cmp r3, #0
8006a7a: f000 80a7 beq.w 8006bcc <HAL_ETH_Init+0x2d8>
{
/* Get tick */
tickstart = HAL_GetTick();
8006a7e: f7fe fc4f bl 8005320 <HAL_GetTick>
8006a82: 6178 str r0, [r7, #20]
/* We wait for linked status */
do
{
HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg);
8006a84: f107 030c add.w r3, r7, #12
8006a88: 461a mov r2, r3
8006a8a: 2101 movs r1, #1
8006a8c: 6878 ldr r0, [r7, #4]
8006a8e: f000 fb90 bl 80071b2 <HAL_ETH_ReadPHYRegister>
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_LINKED_STATE)
8006a92: f7fe fc45 bl 8005320 <HAL_GetTick>
8006a96: 4602 mov r2, r0
8006a98: 697b ldr r3, [r7, #20]
8006a9a: 1ad3 subs r3, r2, r3
8006a9c: f241 3288 movw r2, #5000 ; 0x1388
8006aa0: 4293 cmp r3, r2
8006aa2: d90f bls.n 8006ac4 <HAL_ETH_Init+0x1d0>
{
/* In case of write timeout */
err = ETH_ERROR;
8006aa4: 2301 movs r3, #1
8006aa6: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006aa8: 6939 ldr r1, [r7, #16]
8006aaa: 6878 ldr r0, [r7, #4]
8006aac: f000 fda8 bl 8007600 <ETH_MACDMAConfig>
heth->State= HAL_ETH_STATE_READY;
8006ab0: 687b ldr r3, [r7, #4]
8006ab2: 2201 movs r2, #1
8006ab4: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006ab8: 687b ldr r3, [r7, #4]
8006aba: 2200 movs r2, #0
8006abc: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_TIMEOUT;
8006ac0: 2303 movs r3, #3
8006ac2: e0ae b.n 8006c22 <HAL_ETH_Init+0x32e>
}
} while (((phyreg & PHY_LINKED_STATUS) != PHY_LINKED_STATUS));
8006ac4: 68fb ldr r3, [r7, #12]
8006ac6: f003 0304 and.w r3, r3, #4
8006aca: 2b00 cmp r3, #0
8006acc: d0da beq.n 8006a84 <HAL_ETH_Init+0x190>
/* Enable Auto-Negotiation */
if((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_AUTONEGOTIATION)) != HAL_OK)
8006ace: f44f 5280 mov.w r2, #4096 ; 0x1000
8006ad2: 2100 movs r1, #0
8006ad4: 6878 ldr r0, [r7, #4]
8006ad6: f000 fbd4 bl 8007282 <HAL_ETH_WritePHYRegister>
8006ada: 4603 mov r3, r0
8006adc: 2b00 cmp r3, #0
8006ade: d00b beq.n 8006af8 <HAL_ETH_Init+0x204>
{
/* In case of write timeout */
err = ETH_ERROR;
8006ae0: 2301 movs r3, #1
8006ae2: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006ae4: 6939 ldr r1, [r7, #16]
8006ae6: 6878 ldr r0, [r7, #4]
8006ae8: f000 fd8a bl 8007600 <ETH_MACDMAConfig>
/* Set the ETH peripheral state to READY */
heth->State = HAL_ETH_STATE_READY;
8006aec: 687b ldr r3, [r7, #4]
8006aee: 2201 movs r2, #1
8006af0: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return HAL_ERROR */
return HAL_ERROR;
8006af4: 2301 movs r3, #1
8006af6: e094 b.n 8006c22 <HAL_ETH_Init+0x32e>
}
/* Get tick */
tickstart = HAL_GetTick();
8006af8: f7fe fc12 bl 8005320 <HAL_GetTick>
8006afc: 6178 str r0, [r7, #20]
/* Wait until the auto-negotiation will be completed */
do
{
HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg);
8006afe: f107 030c add.w r3, r7, #12
8006b02: 461a mov r2, r3
8006b04: 2101 movs r1, #1
8006b06: 6878 ldr r0, [r7, #4]
8006b08: f000 fb53 bl 80071b2 <HAL_ETH_ReadPHYRegister>
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_AUTONEGO_COMPLETED)
8006b0c: f7fe fc08 bl 8005320 <HAL_GetTick>
8006b10: 4602 mov r2, r0
8006b12: 697b ldr r3, [r7, #20]
8006b14: 1ad3 subs r3, r2, r3
8006b16: f241 3288 movw r2, #5000 ; 0x1388
8006b1a: 4293 cmp r3, r2
8006b1c: d90f bls.n 8006b3e <HAL_ETH_Init+0x24a>
{
/* In case of write timeout */
err = ETH_ERROR;
8006b1e: 2301 movs r3, #1
8006b20: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006b22: 6939 ldr r1, [r7, #16]
8006b24: 6878 ldr r0, [r7, #4]
8006b26: f000 fd6b bl 8007600 <ETH_MACDMAConfig>
heth->State= HAL_ETH_STATE_READY;
8006b2a: 687b ldr r3, [r7, #4]
8006b2c: 2201 movs r2, #1
8006b2e: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006b32: 687b ldr r3, [r7, #4]
8006b34: 2200 movs r2, #0
8006b36: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_TIMEOUT;
8006b3a: 2303 movs r3, #3
8006b3c: e071 b.n 8006c22 <HAL_ETH_Init+0x32e>
}
} while (((phyreg & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE));
8006b3e: 68fb ldr r3, [r7, #12]
8006b40: f003 0320 and.w r3, r3, #32
8006b44: 2b00 cmp r3, #0
8006b46: d0da beq.n 8006afe <HAL_ETH_Init+0x20a>
/* Read the result of the auto-negotiation */
if((HAL_ETH_ReadPHYRegister(heth, PHY_SR, &phyreg)) != HAL_OK)
8006b48: f107 030c add.w r3, r7, #12
8006b4c: 461a mov r2, r3
8006b4e: 211f movs r1, #31
8006b50: 6878 ldr r0, [r7, #4]
8006b52: f000 fb2e bl 80071b2 <HAL_ETH_ReadPHYRegister>
8006b56: 4603 mov r3, r0
8006b58: 2b00 cmp r3, #0
8006b5a: d00b beq.n 8006b74 <HAL_ETH_Init+0x280>
{
/* In case of write timeout */
err = ETH_ERROR;
8006b5c: 2301 movs r3, #1
8006b5e: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006b60: 6939 ldr r1, [r7, #16]
8006b62: 6878 ldr r0, [r7, #4]
8006b64: f000 fd4c bl 8007600 <ETH_MACDMAConfig>
/* Set the ETH peripheral state to READY */
heth->State = HAL_ETH_STATE_READY;
8006b68: 687b ldr r3, [r7, #4]
8006b6a: 2201 movs r2, #1
8006b6c: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return HAL_ERROR */
return HAL_ERROR;
8006b70: 2301 movs r3, #1
8006b72: e056 b.n 8006c22 <HAL_ETH_Init+0x32e>
}
/* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */
if((phyreg & PHY_DUPLEX_STATUS) != (uint32_t)RESET)
8006b74: 68fb ldr r3, [r7, #12]
8006b76: f003 0310 and.w r3, r3, #16
8006b7a: 2b00 cmp r3, #0
8006b7c: d004 beq.n 8006b88 <HAL_ETH_Init+0x294>
{
/* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */
(heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX;
8006b7e: 687b ldr r3, [r7, #4]
8006b80: f44f 6200 mov.w r2, #2048 ; 0x800
8006b84: 60da str r2, [r3, #12]
8006b86: e002 b.n 8006b8e <HAL_ETH_Init+0x29a>
}
else
{
/* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */
(heth->Init).DuplexMode = ETH_MODE_HALFDUPLEX;
8006b88: 687b ldr r3, [r7, #4]
8006b8a: 2200 movs r2, #0
8006b8c: 60da str r2, [r3, #12]
}
/* Configure the MAC with the speed fixed by the auto-negotiation process */
if((phyreg & PHY_SPEED_STATUS) == PHY_SPEED_STATUS)
8006b8e: 68fb ldr r3, [r7, #12]
8006b90: f003 0304 and.w r3, r3, #4
8006b94: 2b00 cmp r3, #0
8006b96: d003 beq.n 8006ba0 <HAL_ETH_Init+0x2ac>
{
/* Set Ethernet speed to 10M following the auto-negotiation */
(heth->Init).Speed = ETH_SPEED_10M;
8006b98: 687b ldr r3, [r7, #4]
8006b9a: 2200 movs r2, #0
8006b9c: 609a str r2, [r3, #8]
8006b9e: e037 b.n 8006c10 <HAL_ETH_Init+0x31c>
}
else
{
/* Set Ethernet speed to 100M following the auto-negotiation */
(heth->Init).Speed = ETH_SPEED_100M;
8006ba0: 687b ldr r3, [r7, #4]
8006ba2: f44f 4280 mov.w r2, #16384 ; 0x4000
8006ba6: 609a str r2, [r3, #8]
8006ba8: e032 b.n 8006c10 <HAL_ETH_Init+0x31c>
8006baa: bf00 nop
8006bac: 03938700 .word 0x03938700
8006bb0: 40023800 .word 0x40023800
8006bb4: 40013800 .word 0x40013800
8006bb8: 01312cff .word 0x01312cff
8006bbc: 02160ebf .word 0x02160ebf
8006bc0: 039386ff .word 0x039386ff
8006bc4: 05f5e0ff .word 0x05f5e0ff
8006bc8: 08f0d17f .word 0x08f0d17f
/* Check parameters */
assert_param(IS_ETH_SPEED(heth->Init.Speed));
assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode));
/* Set MAC Speed and Duplex Mode */
if(HAL_ETH_WritePHYRegister(heth, PHY_BCR, ((uint16_t)((heth->Init).DuplexMode >> 3) |
8006bcc: 687b ldr r3, [r7, #4]
8006bce: 68db ldr r3, [r3, #12]
8006bd0: 08db lsrs r3, r3, #3
8006bd2: b29a uxth r2, r3
(uint16_t)((heth->Init).Speed >> 1))) != HAL_OK)
8006bd4: 687b ldr r3, [r7, #4]
8006bd6: 689b ldr r3, [r3, #8]
8006bd8: 085b lsrs r3, r3, #1
8006bda: b29b uxth r3, r3
if(HAL_ETH_WritePHYRegister(heth, PHY_BCR, ((uint16_t)((heth->Init).DuplexMode >> 3) |
8006bdc: 4313 orrs r3, r2
8006bde: b29b uxth r3, r3
8006be0: 461a mov r2, r3
8006be2: 2100 movs r1, #0
8006be4: 6878 ldr r0, [r7, #4]
8006be6: f000 fb4c bl 8007282 <HAL_ETH_WritePHYRegister>
8006bea: 4603 mov r3, r0
8006bec: 2b00 cmp r3, #0
8006bee: d00b beq.n 8006c08 <HAL_ETH_Init+0x314>
{
/* In case of write timeout */
err = ETH_ERROR;
8006bf0: 2301 movs r3, #1
8006bf2: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006bf4: 6939 ldr r1, [r7, #16]
8006bf6: 6878 ldr r0, [r7, #4]
8006bf8: f000 fd02 bl 8007600 <ETH_MACDMAConfig>
/* Set the ETH peripheral state to READY */
heth->State = HAL_ETH_STATE_READY;
8006bfc: 687b ldr r3, [r7, #4]
8006bfe: 2201 movs r2, #1
8006c00: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return HAL_ERROR */
return HAL_ERROR;
8006c04: 2301 movs r3, #1
8006c06: e00c b.n 8006c22 <HAL_ETH_Init+0x32e>
}
/* Delay to assure PHY configuration */
HAL_Delay(PHY_CONFIG_DELAY);
8006c08: f640 70ff movw r0, #4095 ; 0xfff
8006c0c: f7fe fb94 bl 8005338 <HAL_Delay>
}
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006c10: 6939 ldr r1, [r7, #16]
8006c12: 6878 ldr r0, [r7, #4]
8006c14: f000 fcf4 bl 8007600 <ETH_MACDMAConfig>
/* Set ETH HAL State to Ready */
heth->State= HAL_ETH_STATE_READY;
8006c18: 687b ldr r3, [r7, #4]
8006c1a: 2201 movs r2, #1
8006c1c: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return function status */
return HAL_OK;
8006c20: 2300 movs r3, #0
}
8006c22: 4618 mov r0, r3
8006c24: 3720 adds r7, #32
8006c26: 46bd mov sp, r7
8006c28: bd80 pop {r7, pc}
8006c2a: bf00 nop
08006c2c <HAL_ETH_DMATxDescListInit>:
* @param TxBuff Pointer to the first TxBuffer list
* @param TxBuffCount Number of the used Tx desc in the list
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t *TxBuff, uint32_t TxBuffCount)
{
8006c2c: b480 push {r7}
8006c2e: b087 sub sp, #28
8006c30: af00 add r7, sp, #0
8006c32: 60f8 str r0, [r7, #12]
8006c34: 60b9 str r1, [r7, #8]
8006c36: 607a str r2, [r7, #4]
8006c38: 603b str r3, [r7, #0]
uint32_t i = 0;
8006c3a: 2300 movs r3, #0
8006c3c: 617b str r3, [r7, #20]
ETH_DMADescTypeDef *dmatxdesc;
/* Process Locked */
__HAL_LOCK(heth);
8006c3e: 68fb ldr r3, [r7, #12]
8006c40: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006c44: 2b01 cmp r3, #1
8006c46: d101 bne.n 8006c4c <HAL_ETH_DMATxDescListInit+0x20>
8006c48: 2302 movs r3, #2
8006c4a: e052 b.n 8006cf2 <HAL_ETH_DMATxDescListInit+0xc6>
8006c4c: 68fb ldr r3, [r7, #12]
8006c4e: 2201 movs r2, #1
8006c50: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
8006c54: 68fb ldr r3, [r7, #12]
8006c56: 2202 movs r2, #2
8006c58: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */
heth->TxDesc = DMATxDescTab;
8006c5c: 68fb ldr r3, [r7, #12]
8006c5e: 68ba ldr r2, [r7, #8]
8006c60: 62da str r2, [r3, #44] ; 0x2c
/* Fill each DMATxDesc descriptor with the right values */
for(i=0; i < TxBuffCount; i++)
8006c62: 2300 movs r3, #0
8006c64: 617b str r3, [r7, #20]
8006c66: e030 b.n 8006cca <HAL_ETH_DMATxDescListInit+0x9e>
{
/* Get the pointer on the ith member of the Tx Desc list */
dmatxdesc = DMATxDescTab + i;
8006c68: 697b ldr r3, [r7, #20]
8006c6a: 015b lsls r3, r3, #5
8006c6c: 68ba ldr r2, [r7, #8]
8006c6e: 4413 add r3, r2
8006c70: 613b str r3, [r7, #16]
/* Set Second Address Chained bit */
dmatxdesc->Status = ETH_DMATXDESC_TCH;
8006c72: 693b ldr r3, [r7, #16]
8006c74: f44f 1280 mov.w r2, #1048576 ; 0x100000
8006c78: 601a str r2, [r3, #0]
/* Set Buffer1 address pointer */
dmatxdesc->Buffer1Addr = (uint32_t)(&TxBuff[i*ETH_TX_BUF_SIZE]);
8006c7a: 697b ldr r3, [r7, #20]
8006c7c: f240 52f4 movw r2, #1524 ; 0x5f4
8006c80: fb02 f303 mul.w r3, r2, r3
8006c84: 687a ldr r2, [r7, #4]
8006c86: 4413 add r3, r2
8006c88: 461a mov r2, r3
8006c8a: 693b ldr r3, [r7, #16]
8006c8c: 609a str r2, [r3, #8]
if ((heth->Init).ChecksumMode == ETH_CHECKSUM_BY_HARDWARE)
8006c8e: 68fb ldr r3, [r7, #12]
8006c90: 69db ldr r3, [r3, #28]
8006c92: 2b00 cmp r3, #0
8006c94: d105 bne.n 8006ca2 <HAL_ETH_DMATxDescListInit+0x76>
{
/* Set the DMA Tx descriptors checksum insertion */
dmatxdesc->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL;
8006c96: 693b ldr r3, [r7, #16]
8006c98: 681b ldr r3, [r3, #0]
8006c9a: f443 0240 orr.w r2, r3, #12582912 ; 0xc00000
8006c9e: 693b ldr r3, [r7, #16]
8006ca0: 601a str r2, [r3, #0]
}
/* Initialize the next descriptor with the Next Descriptor Polling Enable */
if(i < (TxBuffCount-1))
8006ca2: 683b ldr r3, [r7, #0]
8006ca4: 3b01 subs r3, #1
8006ca6: 697a ldr r2, [r7, #20]
8006ca8: 429a cmp r2, r3
8006caa: d208 bcs.n 8006cbe <HAL_ETH_DMATxDescListInit+0x92>
{
/* Set next descriptor address register with next descriptor base address */
dmatxdesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab+i+1);
8006cac: 697b ldr r3, [r7, #20]
8006cae: 3301 adds r3, #1
8006cb0: 015b lsls r3, r3, #5
8006cb2: 68ba ldr r2, [r7, #8]
8006cb4: 4413 add r3, r2
8006cb6: 461a mov r2, r3
8006cb8: 693b ldr r3, [r7, #16]
8006cba: 60da str r2, [r3, #12]
8006cbc: e002 b.n 8006cc4 <HAL_ETH_DMATxDescListInit+0x98>
}
else
{
/* For last descriptor, set next descriptor address register equal to the first descriptor base address */
dmatxdesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab;
8006cbe: 68ba ldr r2, [r7, #8]
8006cc0: 693b ldr r3, [r7, #16]
8006cc2: 60da str r2, [r3, #12]
for(i=0; i < TxBuffCount; i++)
8006cc4: 697b ldr r3, [r7, #20]
8006cc6: 3301 adds r3, #1
8006cc8: 617b str r3, [r7, #20]
8006cca: 697a ldr r2, [r7, #20]
8006ccc: 683b ldr r3, [r7, #0]
8006cce: 429a cmp r2, r3
8006cd0: d3ca bcc.n 8006c68 <HAL_ETH_DMATxDescListInit+0x3c>
}
}
/* Set Transmit Descriptor List Address Register */
(heth->Instance)->DMATDLAR = (uint32_t) DMATxDescTab;
8006cd2: 68fb ldr r3, [r7, #12]
8006cd4: 6819 ldr r1, [r3, #0]
8006cd6: 68ba ldr r2, [r7, #8]
8006cd8: f241 0310 movw r3, #4112 ; 0x1010
8006cdc: 440b add r3, r1
8006cde: 601a str r2, [r3, #0]
/* Set ETH HAL State to Ready */
heth->State= HAL_ETH_STATE_READY;
8006ce0: 68fb ldr r3, [r7, #12]
8006ce2: 2201 movs r2, #1
8006ce4: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006ce8: 68fb ldr r3, [r7, #12]
8006cea: 2200 movs r2, #0
8006cec: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006cf0: 2300 movs r3, #0
}
8006cf2: 4618 mov r0, r3
8006cf4: 371c adds r7, #28
8006cf6: 46bd mov sp, r7
8006cf8: f85d 7b04 ldr.w r7, [sp], #4
8006cfc: 4770 bx lr
08006cfe <HAL_ETH_DMARxDescListInit>:
* @param RxBuff Pointer to the first RxBuffer list
* @param RxBuffCount Number of the used Rx desc in the list
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount)
{
8006cfe: b480 push {r7}
8006d00: b087 sub sp, #28
8006d02: af00 add r7, sp, #0
8006d04: 60f8 str r0, [r7, #12]
8006d06: 60b9 str r1, [r7, #8]
8006d08: 607a str r2, [r7, #4]
8006d0a: 603b str r3, [r7, #0]
uint32_t i = 0;
8006d0c: 2300 movs r3, #0
8006d0e: 617b str r3, [r7, #20]
ETH_DMADescTypeDef *DMARxDesc;
/* Process Locked */
__HAL_LOCK(heth);
8006d10: 68fb ldr r3, [r7, #12]
8006d12: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006d16: 2b01 cmp r3, #1
8006d18: d101 bne.n 8006d1e <HAL_ETH_DMARxDescListInit+0x20>
8006d1a: 2302 movs r3, #2
8006d1c: e056 b.n 8006dcc <HAL_ETH_DMARxDescListInit+0xce>
8006d1e: 68fb ldr r3, [r7, #12]
8006d20: 2201 movs r2, #1
8006d22: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
8006d26: 68fb ldr r3, [r7, #12]
8006d28: 2202 movs r2, #2
8006d2a: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Set the Ethernet RxDesc pointer with the first one of the DMARxDescTab list */
heth->RxDesc = DMARxDescTab;
8006d2e: 68fb ldr r3, [r7, #12]
8006d30: 68ba ldr r2, [r7, #8]
8006d32: 629a str r2, [r3, #40] ; 0x28
/* Fill each DMARxDesc descriptor with the right values */
for(i=0; i < RxBuffCount; i++)
8006d34: 2300 movs r3, #0
8006d36: 617b str r3, [r7, #20]
8006d38: e034 b.n 8006da4 <HAL_ETH_DMARxDescListInit+0xa6>
{
/* Get the pointer on the ith member of the Rx Desc list */
DMARxDesc = DMARxDescTab+i;
8006d3a: 697b ldr r3, [r7, #20]
8006d3c: 015b lsls r3, r3, #5
8006d3e: 68ba ldr r2, [r7, #8]
8006d40: 4413 add r3, r2
8006d42: 613b str r3, [r7, #16]
/* Set Own bit of the Rx descriptor Status */
DMARxDesc->Status = ETH_DMARXDESC_OWN;
8006d44: 693b ldr r3, [r7, #16]
8006d46: f04f 4200 mov.w r2, #2147483648 ; 0x80000000
8006d4a: 601a str r2, [r3, #0]
/* Set Buffer1 size and Second Address Chained bit */
DMARxDesc->ControlBufferSize = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE;
8006d4c: 693b ldr r3, [r7, #16]
8006d4e: f244 52f4 movw r2, #17908 ; 0x45f4
8006d52: 605a str r2, [r3, #4]
/* Set Buffer1 address pointer */
DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i*ETH_RX_BUF_SIZE]);
8006d54: 697b ldr r3, [r7, #20]
8006d56: f240 52f4 movw r2, #1524 ; 0x5f4
8006d5a: fb02 f303 mul.w r3, r2, r3
8006d5e: 687a ldr r2, [r7, #4]
8006d60: 4413 add r3, r2
8006d62: 461a mov r2, r3
8006d64: 693b ldr r3, [r7, #16]
8006d66: 609a str r2, [r3, #8]
if((heth->Init).RxMode == ETH_RXINTERRUPT_MODE)
8006d68: 68fb ldr r3, [r7, #12]
8006d6a: 699b ldr r3, [r3, #24]
8006d6c: 2b01 cmp r3, #1
8006d6e: d105 bne.n 8006d7c <HAL_ETH_DMARxDescListInit+0x7e>
{
/* Enable Ethernet DMA Rx Descriptor interrupt */
DMARxDesc->ControlBufferSize &= ~ETH_DMARXDESC_DIC;
8006d70: 693b ldr r3, [r7, #16]
8006d72: 685b ldr r3, [r3, #4]
8006d74: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000
8006d78: 693b ldr r3, [r7, #16]
8006d7a: 605a str r2, [r3, #4]
}
/* Initialize the next descriptor with the Next Descriptor Polling Enable */
if(i < (RxBuffCount-1))
8006d7c: 683b ldr r3, [r7, #0]
8006d7e: 3b01 subs r3, #1
8006d80: 697a ldr r2, [r7, #20]
8006d82: 429a cmp r2, r3
8006d84: d208 bcs.n 8006d98 <HAL_ETH_DMARxDescListInit+0x9a>
{
/* Set next descriptor address register with next descriptor base address */
DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab+i+1);
8006d86: 697b ldr r3, [r7, #20]
8006d88: 3301 adds r3, #1
8006d8a: 015b lsls r3, r3, #5
8006d8c: 68ba ldr r2, [r7, #8]
8006d8e: 4413 add r3, r2
8006d90: 461a mov r2, r3
8006d92: 693b ldr r3, [r7, #16]
8006d94: 60da str r2, [r3, #12]
8006d96: e002 b.n 8006d9e <HAL_ETH_DMARxDescListInit+0xa0>
}
else
{
/* For last descriptor, set next descriptor address register equal to the first descriptor base address */
DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab);
8006d98: 68ba ldr r2, [r7, #8]
8006d9a: 693b ldr r3, [r7, #16]
8006d9c: 60da str r2, [r3, #12]
for(i=0; i < RxBuffCount; i++)
8006d9e: 697b ldr r3, [r7, #20]
8006da0: 3301 adds r3, #1
8006da2: 617b str r3, [r7, #20]
8006da4: 697a ldr r2, [r7, #20]
8006da6: 683b ldr r3, [r7, #0]
8006da8: 429a cmp r2, r3
8006daa: d3c6 bcc.n 8006d3a <HAL_ETH_DMARxDescListInit+0x3c>
}
}
/* Set Receive Descriptor List Address Register */
(heth->Instance)->DMARDLAR = (uint32_t) DMARxDescTab;
8006dac: 68fb ldr r3, [r7, #12]
8006dae: 6819 ldr r1, [r3, #0]
8006db0: 68ba ldr r2, [r7, #8]
8006db2: f241 030c movw r3, #4108 ; 0x100c
8006db6: 440b add r3, r1
8006db8: 601a str r2, [r3, #0]
/* Set ETH HAL State to Ready */
heth->State= HAL_ETH_STATE_READY;
8006dba: 68fb ldr r3, [r7, #12]
8006dbc: 2201 movs r2, #1
8006dbe: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006dc2: 68fb ldr r3, [r7, #12]
8006dc4: 2200 movs r2, #0
8006dc6: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006dca: 2300 movs r3, #0
}
8006dcc: 4618 mov r0, r3
8006dce: 371c adds r7, #28
8006dd0: 46bd mov sp, r7
8006dd2: f85d 7b04 ldr.w r7, [sp], #4
8006dd6: 4770 bx lr
08006dd8 <HAL_ETH_TransmitFrame>:
* the configuration information for ETHERNET module
* @param FrameLength Amount of data to be sent
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength)
{
8006dd8: b480 push {r7}
8006dda: b087 sub sp, #28
8006ddc: af00 add r7, sp, #0
8006dde: 6078 str r0, [r7, #4]
8006de0: 6039 str r1, [r7, #0]
uint32_t bufcount = 0, size = 0, i = 0;
8006de2: 2300 movs r3, #0
8006de4: 617b str r3, [r7, #20]
8006de6: 2300 movs r3, #0
8006de8: 60fb str r3, [r7, #12]
8006dea: 2300 movs r3, #0
8006dec: 613b str r3, [r7, #16]
/* Process Locked */
__HAL_LOCK(heth);
8006dee: 687b ldr r3, [r7, #4]
8006df0: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006df4: 2b01 cmp r3, #1
8006df6: d101 bne.n 8006dfc <HAL_ETH_TransmitFrame+0x24>
8006df8: 2302 movs r3, #2
8006dfa: e0cd b.n 8006f98 <HAL_ETH_TransmitFrame+0x1c0>
8006dfc: 687b ldr r3, [r7, #4]
8006dfe: 2201 movs r2, #1
8006e00: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
8006e04: 687b ldr r3, [r7, #4]
8006e06: 2202 movs r2, #2
8006e08: f883 2044 strb.w r2, [r3, #68] ; 0x44
if (FrameLength == 0)
8006e0c: 683b ldr r3, [r7, #0]
8006e0e: 2b00 cmp r3, #0
8006e10: d109 bne.n 8006e26 <HAL_ETH_TransmitFrame+0x4e>
{
/* Set ETH HAL state to READY */
heth->State = HAL_ETH_STATE_READY;
8006e12: 687b ldr r3, [r7, #4]
8006e14: 2201 movs r2, #1
8006e16: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006e1a: 687b ldr r3, [r7, #4]
8006e1c: 2200 movs r2, #0
8006e1e: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_ERROR;
8006e22: 2301 movs r3, #1
8006e24: e0b8 b.n 8006f98 <HAL_ETH_TransmitFrame+0x1c0>
}
/* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */
if(((heth->TxDesc)->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
8006e26: 687b ldr r3, [r7, #4]
8006e28: 6adb ldr r3, [r3, #44] ; 0x2c
8006e2a: 681b ldr r3, [r3, #0]
8006e2c: 2b00 cmp r3, #0
8006e2e: da09 bge.n 8006e44 <HAL_ETH_TransmitFrame+0x6c>
{
/* OWN bit set */
heth->State = HAL_ETH_STATE_BUSY_TX;
8006e30: 687b ldr r3, [r7, #4]
8006e32: 2212 movs r2, #18
8006e34: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006e38: 687b ldr r3, [r7, #4]
8006e3a: 2200 movs r2, #0
8006e3c: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_ERROR;
8006e40: 2301 movs r3, #1
8006e42: e0a9 b.n 8006f98 <HAL_ETH_TransmitFrame+0x1c0>
}
/* Get the number of needed Tx buffers for the current frame */
if (FrameLength > ETH_TX_BUF_SIZE)
8006e44: 683b ldr r3, [r7, #0]
8006e46: f240 52f4 movw r2, #1524 ; 0x5f4
8006e4a: 4293 cmp r3, r2
8006e4c: d915 bls.n 8006e7a <HAL_ETH_TransmitFrame+0xa2>
{
bufcount = FrameLength/ETH_TX_BUF_SIZE;
8006e4e: 683b ldr r3, [r7, #0]
8006e50: 4a54 ldr r2, [pc, #336] ; (8006fa4 <HAL_ETH_TransmitFrame+0x1cc>)
8006e52: fba2 2303 umull r2, r3, r2, r3
8006e56: 0a9b lsrs r3, r3, #10
8006e58: 617b str r3, [r7, #20]
if (FrameLength % ETH_TX_BUF_SIZE)
8006e5a: 683a ldr r2, [r7, #0]
8006e5c: 4b51 ldr r3, [pc, #324] ; (8006fa4 <HAL_ETH_TransmitFrame+0x1cc>)
8006e5e: fba3 1302 umull r1, r3, r3, r2
8006e62: 0a9b lsrs r3, r3, #10
8006e64: f240 51f4 movw r1, #1524 ; 0x5f4
8006e68: fb01 f303 mul.w r3, r1, r3
8006e6c: 1ad3 subs r3, r2, r3
8006e6e: 2b00 cmp r3, #0
8006e70: d005 beq.n 8006e7e <HAL_ETH_TransmitFrame+0xa6>
{
bufcount++;
8006e72: 697b ldr r3, [r7, #20]
8006e74: 3301 adds r3, #1
8006e76: 617b str r3, [r7, #20]
8006e78: e001 b.n 8006e7e <HAL_ETH_TransmitFrame+0xa6>
}
}
else
{
bufcount = 1;
8006e7a: 2301 movs r3, #1
8006e7c: 617b str r3, [r7, #20]
}
if (bufcount == 1)
8006e7e: 697b ldr r3, [r7, #20]
8006e80: 2b01 cmp r3, #1
8006e82: d11c bne.n 8006ebe <HAL_ETH_TransmitFrame+0xe6>
{
/* Set LAST and FIRST segment */
heth->TxDesc->Status |=ETH_DMATXDESC_FS|ETH_DMATXDESC_LS;
8006e84: 687b ldr r3, [r7, #4]
8006e86: 6adb ldr r3, [r3, #44] ; 0x2c
8006e88: 681a ldr r2, [r3, #0]
8006e8a: 687b ldr r3, [r7, #4]
8006e8c: 6adb ldr r3, [r3, #44] ; 0x2c
8006e8e: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000
8006e92: 601a str r2, [r3, #0]
/* Set frame size */
heth->TxDesc->ControlBufferSize = (FrameLength & ETH_DMATXDESC_TBS1);
8006e94: 687b ldr r3, [r7, #4]
8006e96: 6adb ldr r3, [r3, #44] ; 0x2c
8006e98: 683a ldr r2, [r7, #0]
8006e9a: f3c2 020c ubfx r2, r2, #0, #13
8006e9e: 605a str r2, [r3, #4]
/* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */
heth->TxDesc->Status |= ETH_DMATXDESC_OWN;
8006ea0: 687b ldr r3, [r7, #4]
8006ea2: 6adb ldr r3, [r3, #44] ; 0x2c
8006ea4: 681a ldr r2, [r3, #0]
8006ea6: 687b ldr r3, [r7, #4]
8006ea8: 6adb ldr r3, [r3, #44] ; 0x2c
8006eaa: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000
8006eae: 601a str r2, [r3, #0]
/* Point to next descriptor */
heth->TxDesc= (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr);
8006eb0: 687b ldr r3, [r7, #4]
8006eb2: 6adb ldr r3, [r3, #44] ; 0x2c
8006eb4: 68db ldr r3, [r3, #12]
8006eb6: 461a mov r2, r3
8006eb8: 687b ldr r3, [r7, #4]
8006eba: 62da str r2, [r3, #44] ; 0x2c
8006ebc: e04b b.n 8006f56 <HAL_ETH_TransmitFrame+0x17e>
}
else
{
for (i=0; i< bufcount; i++)
8006ebe: 2300 movs r3, #0
8006ec0: 613b str r3, [r7, #16]
8006ec2: e044 b.n 8006f4e <HAL_ETH_TransmitFrame+0x176>
{
/* Clear FIRST and LAST segment bits */
heth->TxDesc->Status &= ~(ETH_DMATXDESC_FS | ETH_DMATXDESC_LS);
8006ec4: 687b ldr r3, [r7, #4]
8006ec6: 6adb ldr r3, [r3, #44] ; 0x2c
8006ec8: 681a ldr r2, [r3, #0]
8006eca: 687b ldr r3, [r7, #4]
8006ecc: 6adb ldr r3, [r3, #44] ; 0x2c
8006ece: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000
8006ed2: 601a str r2, [r3, #0]
if (i == 0)
8006ed4: 693b ldr r3, [r7, #16]
8006ed6: 2b00 cmp r3, #0
8006ed8: d107 bne.n 8006eea <HAL_ETH_TransmitFrame+0x112>
{
/* Setting the first segment bit */
heth->TxDesc->Status |= ETH_DMATXDESC_FS;
8006eda: 687b ldr r3, [r7, #4]
8006edc: 6adb ldr r3, [r3, #44] ; 0x2c
8006ede: 681a ldr r2, [r3, #0]
8006ee0: 687b ldr r3, [r7, #4]
8006ee2: 6adb ldr r3, [r3, #44] ; 0x2c
8006ee4: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000
8006ee8: 601a str r2, [r3, #0]
}
/* Program size */
heth->TxDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATXDESC_TBS1);
8006eea: 687b ldr r3, [r7, #4]
8006eec: 6adb ldr r3, [r3, #44] ; 0x2c
8006eee: f240 52f4 movw r2, #1524 ; 0x5f4
8006ef2: 605a str r2, [r3, #4]
if (i == (bufcount-1))
8006ef4: 697b ldr r3, [r7, #20]
8006ef6: 3b01 subs r3, #1
8006ef8: 693a ldr r2, [r7, #16]
8006efa: 429a cmp r2, r3
8006efc: d116 bne.n 8006f2c <HAL_ETH_TransmitFrame+0x154>
{
/* Setting the last segment bit */
heth->TxDesc->Status |= ETH_DMATXDESC_LS;
8006efe: 687b ldr r3, [r7, #4]
8006f00: 6adb ldr r3, [r3, #44] ; 0x2c
8006f02: 681a ldr r2, [r3, #0]
8006f04: 687b ldr r3, [r7, #4]
8006f06: 6adb ldr r3, [r3, #44] ; 0x2c
8006f08: f042 5200 orr.w r2, r2, #536870912 ; 0x20000000
8006f0c: 601a str r2, [r3, #0]
size = FrameLength - (bufcount-1)*ETH_TX_BUF_SIZE;
8006f0e: 697b ldr r3, [r7, #20]
8006f10: 4a25 ldr r2, [pc, #148] ; (8006fa8 <HAL_ETH_TransmitFrame+0x1d0>)
8006f12: fb02 f203 mul.w r2, r2, r3
8006f16: 683b ldr r3, [r7, #0]
8006f18: 4413 add r3, r2
8006f1a: f203 53f4 addw r3, r3, #1524 ; 0x5f4
8006f1e: 60fb str r3, [r7, #12]
heth->TxDesc->ControlBufferSize = (size & ETH_DMATXDESC_TBS1);
8006f20: 687b ldr r3, [r7, #4]
8006f22: 6adb ldr r3, [r3, #44] ; 0x2c
8006f24: 68fa ldr r2, [r7, #12]
8006f26: f3c2 020c ubfx r2, r2, #0, #13
8006f2a: 605a str r2, [r3, #4]
}
/* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */
heth->TxDesc->Status |= ETH_DMATXDESC_OWN;
8006f2c: 687b ldr r3, [r7, #4]
8006f2e: 6adb ldr r3, [r3, #44] ; 0x2c
8006f30: 681a ldr r2, [r3, #0]
8006f32: 687b ldr r3, [r7, #4]
8006f34: 6adb ldr r3, [r3, #44] ; 0x2c
8006f36: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000
8006f3a: 601a str r2, [r3, #0]
/* point to next descriptor */
heth->TxDesc = (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr);
8006f3c: 687b ldr r3, [r7, #4]
8006f3e: 6adb ldr r3, [r3, #44] ; 0x2c
8006f40: 68db ldr r3, [r3, #12]
8006f42: 461a mov r2, r3
8006f44: 687b ldr r3, [r7, #4]
8006f46: 62da str r2, [r3, #44] ; 0x2c
for (i=0; i< bufcount; i++)
8006f48: 693b ldr r3, [r7, #16]
8006f4a: 3301 adds r3, #1
8006f4c: 613b str r3, [r7, #16]
8006f4e: 693a ldr r2, [r7, #16]
8006f50: 697b ldr r3, [r7, #20]
8006f52: 429a cmp r2, r3
8006f54: d3b6 bcc.n 8006ec4 <HAL_ETH_TransmitFrame+0xec>
}
}
/* When Tx Buffer unavailable flag is set: clear it and resume transmission */
if (((heth->Instance)->DMASR & ETH_DMASR_TBUS) != (uint32_t)RESET)
8006f56: 687b ldr r3, [r7, #4]
8006f58: 681a ldr r2, [r3, #0]
8006f5a: f241 0314 movw r3, #4116 ; 0x1014
8006f5e: 4413 add r3, r2
8006f60: 681b ldr r3, [r3, #0]
8006f62: f003 0304 and.w r3, r3, #4
8006f66: 2b00 cmp r3, #0
8006f68: d00d beq.n 8006f86 <HAL_ETH_TransmitFrame+0x1ae>
{
/* Clear TBUS ETHERNET DMA flag */
(heth->Instance)->DMASR = ETH_DMASR_TBUS;
8006f6a: 687b ldr r3, [r7, #4]
8006f6c: 681a ldr r2, [r3, #0]
8006f6e: f241 0314 movw r3, #4116 ; 0x1014
8006f72: 4413 add r3, r2
8006f74: 2204 movs r2, #4
8006f76: 601a str r2, [r3, #0]
/* Resume DMA transmission*/
(heth->Instance)->DMATPDR = 0;
8006f78: 687b ldr r3, [r7, #4]
8006f7a: 681a ldr r2, [r3, #0]
8006f7c: f241 0304 movw r3, #4100 ; 0x1004
8006f80: 4413 add r3, r2
8006f82: 2200 movs r2, #0
8006f84: 601a str r2, [r3, #0]
}
/* Set ETH HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
8006f86: 687b ldr r3, [r7, #4]
8006f88: 2201 movs r2, #1
8006f8a: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006f8e: 687b ldr r3, [r7, #4]
8006f90: 2200 movs r2, #0
8006f92: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006f96: 2300 movs r3, #0
}
8006f98: 4618 mov r0, r3
8006f9a: 371c adds r7, #28
8006f9c: 46bd mov sp, r7
8006f9e: f85d 7b04 ldr.w r7, [sp], #4
8006fa2: 4770 bx lr
8006fa4: ac02b00b .word 0xac02b00b
8006fa8: fffffa0c .word 0xfffffa0c
08006fac <HAL_ETH_GetReceivedFrame_IT>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
{
8006fac: b480 push {r7}
8006fae: b085 sub sp, #20
8006fb0: af00 add r7, sp, #0
8006fb2: 6078 str r0, [r7, #4]
uint32_t descriptorscancounter = 0;
8006fb4: 2300 movs r3, #0
8006fb6: 60fb str r3, [r7, #12]
/* Process Locked */
__HAL_LOCK(heth);
8006fb8: 687b ldr r3, [r7, #4]
8006fba: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006fbe: 2b01 cmp r3, #1
8006fc0: d101 bne.n 8006fc6 <HAL_ETH_GetReceivedFrame_IT+0x1a>
8006fc2: 2302 movs r3, #2
8006fc4: e074 b.n 80070b0 <HAL_ETH_GetReceivedFrame_IT+0x104>
8006fc6: 687b ldr r3, [r7, #4]
8006fc8: 2201 movs r2, #1
8006fca: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set ETH HAL State to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
8006fce: 687b ldr r3, [r7, #4]
8006fd0: 2202 movs r2, #2
8006fd2: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Scan descriptors owned by CPU */
while (((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (descriptorscancounter < ETH_RXBUFNB))
8006fd6: e05a b.n 800708e <HAL_ETH_GetReceivedFrame_IT+0xe2>
{
/* Just for security */
descriptorscancounter++;
8006fd8: 68fb ldr r3, [r7, #12]
8006fda: 3301 adds r3, #1
8006fdc: 60fb str r3, [r7, #12]
/* Check if first segment in frame */
/* ((heth->RxDesc->Status & ETH_DMARXDESC_FS) != (uint32_t)RESET) && ((heth->RxDesc->Status & ETH_DMARXDESC_LS) == (uint32_t)RESET)) */
if((heth->RxDesc->Status & (ETH_DMARXDESC_FS | ETH_DMARXDESC_LS)) == (uint32_t)ETH_DMARXDESC_FS)
8006fde: 687b ldr r3, [r7, #4]
8006fe0: 6a9b ldr r3, [r3, #40] ; 0x28
8006fe2: 681b ldr r3, [r3, #0]
8006fe4: f403 7340 and.w r3, r3, #768 ; 0x300
8006fe8: f5b3 7f00 cmp.w r3, #512 ; 0x200
8006fec: d10d bne.n 800700a <HAL_ETH_GetReceivedFrame_IT+0x5e>
{
heth->RxFrameInfos.FSRxDesc = heth->RxDesc;
8006fee: 687b ldr r3, [r7, #4]
8006ff0: 6a9a ldr r2, [r3, #40] ; 0x28
8006ff2: 687b ldr r3, [r7, #4]
8006ff4: 631a str r2, [r3, #48] ; 0x30
heth->RxFrameInfos.SegCount = 1;
8006ff6: 687b ldr r3, [r7, #4]
8006ff8: 2201 movs r2, #1
8006ffa: 639a str r2, [r3, #56] ; 0x38
/* Point to next descriptor */
heth->RxDesc = (ETH_DMADescTypeDef*) (heth->RxDesc->Buffer2NextDescAddr);
8006ffc: 687b ldr r3, [r7, #4]
8006ffe: 6a9b ldr r3, [r3, #40] ; 0x28
8007000: 68db ldr r3, [r3, #12]
8007002: 461a mov r2, r3
8007004: 687b ldr r3, [r7, #4]
8007006: 629a str r2, [r3, #40] ; 0x28
8007008: e041 b.n 800708e <HAL_ETH_GetReceivedFrame_IT+0xe2>
}
/* Check if intermediate segment */
/* ((heth->RxDesc->Status & ETH_DMARXDESC_LS) == (uint32_t)RESET)&& ((heth->RxDesc->Status & ETH_DMARXDESC_FS) == (uint32_t)RESET)) */
else if ((heth->RxDesc->Status & (ETH_DMARXDESC_LS | ETH_DMARXDESC_FS)) == (uint32_t)RESET)
800700a: 687b ldr r3, [r7, #4]
800700c: 6a9b ldr r3, [r3, #40] ; 0x28
800700e: 681b ldr r3, [r3, #0]
8007010: f403 7340 and.w r3, r3, #768 ; 0x300
8007014: 2b00 cmp r3, #0
8007016: d10b bne.n 8007030 <HAL_ETH_GetReceivedFrame_IT+0x84>
{
/* Increment segment count */
(heth->RxFrameInfos.SegCount)++;
8007018: 687b ldr r3, [r7, #4]
800701a: 6b9b ldr r3, [r3, #56] ; 0x38
800701c: 1c5a adds r2, r3, #1
800701e: 687b ldr r3, [r7, #4]
8007020: 639a str r2, [r3, #56] ; 0x38
/* Point to next descriptor */
heth->RxDesc = (ETH_DMADescTypeDef*)(heth->RxDesc->Buffer2NextDescAddr);
8007022: 687b ldr r3, [r7, #4]
8007024: 6a9b ldr r3, [r3, #40] ; 0x28
8007026: 68db ldr r3, [r3, #12]
8007028: 461a mov r2, r3
800702a: 687b ldr r3, [r7, #4]
800702c: 629a str r2, [r3, #40] ; 0x28
800702e: e02e b.n 800708e <HAL_ETH_GetReceivedFrame_IT+0xe2>
}
/* Should be last segment */
else
{
/* Last segment */
heth->RxFrameInfos.LSRxDesc = heth->RxDesc;
8007030: 687b ldr r3, [r7, #4]
8007032: 6a9a ldr r2, [r3, #40] ; 0x28
8007034: 687b ldr r3, [r7, #4]
8007036: 635a str r2, [r3, #52] ; 0x34
/* Increment segment count */
(heth->RxFrameInfos.SegCount)++;
8007038: 687b ldr r3, [r7, #4]
800703a: 6b9b ldr r3, [r3, #56] ; 0x38
800703c: 1c5a adds r2, r3, #1
800703e: 687b ldr r3, [r7, #4]
8007040: 639a str r2, [r3, #56] ; 0x38
/* Check if last segment is first segment: one segment contains the frame */
if ((heth->RxFrameInfos.SegCount) == 1)
8007042: 687b ldr r3, [r7, #4]
8007044: 6b9b ldr r3, [r3, #56] ; 0x38
8007046: 2b01 cmp r3, #1
8007048: d103 bne.n 8007052 <HAL_ETH_GetReceivedFrame_IT+0xa6>
{
heth->RxFrameInfos.FSRxDesc = heth->RxDesc;
800704a: 687b ldr r3, [r7, #4]
800704c: 6a9a ldr r2, [r3, #40] ; 0x28
800704e: 687b ldr r3, [r7, #4]
8007050: 631a str r2, [r3, #48] ; 0x30
}
/* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */
heth->RxFrameInfos.length = (((heth->RxDesc)->Status & ETH_DMARXDESC_FL) >> ETH_DMARXDESC_FRAMELENGTHSHIFT) - 4;
8007052: 687b ldr r3, [r7, #4]
8007054: 6a9b ldr r3, [r3, #40] ; 0x28
8007056: 681b ldr r3, [r3, #0]
8007058: 0c1b lsrs r3, r3, #16
800705a: f3c3 030d ubfx r3, r3, #0, #14
800705e: 1f1a subs r2, r3, #4
8007060: 687b ldr r3, [r7, #4]
8007062: 63da str r2, [r3, #60] ; 0x3c
/* Get the address of the buffer start address */
heth->RxFrameInfos.buffer =((heth->RxFrameInfos).FSRxDesc)->Buffer1Addr;
8007064: 687b ldr r3, [r7, #4]
8007066: 6b1b ldr r3, [r3, #48] ; 0x30
8007068: 689a ldr r2, [r3, #8]
800706a: 687b ldr r3, [r7, #4]
800706c: 641a str r2, [r3, #64] ; 0x40
/* Point to next descriptor */
heth->RxDesc = (ETH_DMADescTypeDef*) (heth->RxDesc->Buffer2NextDescAddr);
800706e: 687b ldr r3, [r7, #4]
8007070: 6a9b ldr r3, [r3, #40] ; 0x28
8007072: 68db ldr r3, [r3, #12]
8007074: 461a mov r2, r3
8007076: 687b ldr r3, [r7, #4]
8007078: 629a str r2, [r3, #40] ; 0x28
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
800707a: 687b ldr r3, [r7, #4]
800707c: 2201 movs r2, #1
800707e: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8007082: 687b ldr r3, [r7, #4]
8007084: 2200 movs r2, #0
8007086: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
800708a: 2300 movs r3, #0
800708c: e010 b.n 80070b0 <HAL_ETH_GetReceivedFrame_IT+0x104>
while (((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (descriptorscancounter < ETH_RXBUFNB))
800708e: 687b ldr r3, [r7, #4]
8007090: 6a9b ldr r3, [r3, #40] ; 0x28
8007092: 681b ldr r3, [r3, #0]
8007094: 2b00 cmp r3, #0
8007096: db02 blt.n 800709e <HAL_ETH_GetReceivedFrame_IT+0xf2>
8007098: 68fb ldr r3, [r7, #12]
800709a: 2b03 cmp r3, #3
800709c: d99c bls.n 8006fd8 <HAL_ETH_GetReceivedFrame_IT+0x2c>
}
}
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
800709e: 687b ldr r3, [r7, #4]
80070a0: 2201 movs r2, #1
80070a2: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
80070a6: 687b ldr r3, [r7, #4]
80070a8: 2200 movs r2, #0
80070aa: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_ERROR;
80070ae: 2301 movs r3, #1
}
80070b0: 4618 mov r0, r3
80070b2: 3714 adds r7, #20
80070b4: 46bd mov sp, r7
80070b6: f85d 7b04 ldr.w r7, [sp], #4
80070ba: 4770 bx lr
080070bc <HAL_ETH_IRQHandler>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth)
{
80070bc: b580 push {r7, lr}
80070be: b082 sub sp, #8
80070c0: af00 add r7, sp, #0
80070c2: 6078 str r0, [r7, #4]
/* Frame received */
if (__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_R))
80070c4: 687b ldr r3, [r7, #4]
80070c6: 681a ldr r2, [r3, #0]
80070c8: f241 0314 movw r3, #4116 ; 0x1014
80070cc: 4413 add r3, r2
80070ce: 681b ldr r3, [r3, #0]
80070d0: f003 0340 and.w r3, r3, #64 ; 0x40
80070d4: 2b40 cmp r3, #64 ; 0x40
80070d6: d112 bne.n 80070fe <HAL_ETH_IRQHandler+0x42>
#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
/*Call registered Receive complete callback*/
heth->RxCpltCallback(heth);
#else
/* Receive complete callback */
HAL_ETH_RxCpltCallback(heth);
80070d8: 6878 ldr r0, [r7, #4]
80070da: f005 ff3d bl 800cf58 <HAL_ETH_RxCpltCallback>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
/* Clear the Eth DMA Rx IT pending bits */
__HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_R);
80070de: 687b ldr r3, [r7, #4]
80070e0: 681a ldr r2, [r3, #0]
80070e2: f241 0314 movw r3, #4116 ; 0x1014
80070e6: 4413 add r3, r2
80070e8: 2240 movs r2, #64 ; 0x40
80070ea: 601a str r2, [r3, #0]
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
80070ec: 687b ldr r3, [r7, #4]
80070ee: 2201 movs r2, #1
80070f0: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
80070f4: 687b ldr r3, [r7, #4]
80070f6: 2200 movs r2, #0
80070f8: f883 2045 strb.w r2, [r3, #69] ; 0x45
80070fc: e01b b.n 8007136 <HAL_ETH_IRQHandler+0x7a>
}
/* Frame transmitted */
else if (__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_T))
80070fe: 687b ldr r3, [r7, #4]
8007100: 681a ldr r2, [r3, #0]
8007102: f241 0314 movw r3, #4116 ; 0x1014
8007106: 4413 add r3, r2
8007108: 681b ldr r3, [r3, #0]
800710a: f003 0301 and.w r3, r3, #1
800710e: 2b01 cmp r3, #1
8007110: d111 bne.n 8007136 <HAL_ETH_IRQHandler+0x7a>
#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
/* Call resgistered Transfer complete callback*/
heth->TxCpltCallback(heth);
#else
/* Transfer complete callback */
HAL_ETH_TxCpltCallback(heth);
8007112: 6878 ldr r0, [r7, #4]
8007114: f000 f839 bl 800718a <HAL_ETH_TxCpltCallback>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
/* Clear the Eth DMA Tx IT pending bits */
__HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_T);
8007118: 687b ldr r3, [r7, #4]
800711a: 681a ldr r2, [r3, #0]
800711c: f241 0314 movw r3, #4116 ; 0x1014
8007120: 4413 add r3, r2
8007122: 2201 movs r2, #1
8007124: 601a str r2, [r3, #0]
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
8007126: 687b ldr r3, [r7, #4]
8007128: 2201 movs r2, #1
800712a: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
800712e: 687b ldr r3, [r7, #4]
8007130: 2200 movs r2, #0
8007132: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
/* Clear the interrupt flags */
__HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_NIS);
8007136: 687b ldr r3, [r7, #4]
8007138: 681a ldr r2, [r3, #0]
800713a: f241 0314 movw r3, #4116 ; 0x1014
800713e: 4413 add r3, r2
8007140: f44f 3280 mov.w r2, #65536 ; 0x10000
8007144: 601a str r2, [r3, #0]
/* ETH DMA Error */
if(__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_AIS))
8007146: 687b ldr r3, [r7, #4]
8007148: 681a ldr r2, [r3, #0]
800714a: f241 0314 movw r3, #4116 ; 0x1014
800714e: 4413 add r3, r2
8007150: 681b ldr r3, [r3, #0]
8007152: f403 4300 and.w r3, r3, #32768 ; 0x8000
8007156: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
800715a: d112 bne.n 8007182 <HAL_ETH_IRQHandler+0xc6>
{
#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
heth->DMAErrorCallback(heth);
#else
/* Ethernet Error callback */
HAL_ETH_ErrorCallback(heth);
800715c: 6878 ldr r0, [r7, #4]
800715e: f000 f81e bl 800719e <HAL_ETH_ErrorCallback>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
/* Clear the interrupt flags */
__HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_FLAG_AIS);
8007162: 687b ldr r3, [r7, #4]
8007164: 681a ldr r2, [r3, #0]
8007166: f241 0314 movw r3, #4116 ; 0x1014
800716a: 4413 add r3, r2
800716c: f44f 4200 mov.w r2, #32768 ; 0x8000
8007170: 601a str r2, [r3, #0]
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
8007172: 687b ldr r3, [r7, #4]
8007174: 2201 movs r2, #1
8007176: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
800717a: 687b ldr r3, [r7, #4]
800717c: 2200 movs r2, #0
800717e: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
}
8007182: bf00 nop
8007184: 3708 adds r7, #8
8007186: 46bd mov sp, r7
8007188: bd80 pop {r7, pc}
0800718a <HAL_ETH_TxCpltCallback>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
__weak void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth)
{
800718a: b480 push {r7}
800718c: b083 sub sp, #12
800718e: af00 add r7, sp, #0
8007190: 6078 str r0, [r7, #4]
UNUSED(heth);
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_ETH_TxCpltCallback could be implemented in the user file
*/
}
8007192: bf00 nop
8007194: 370c adds r7, #12
8007196: 46bd mov sp, r7
8007198: f85d 7b04 ldr.w r7, [sp], #4
800719c: 4770 bx lr
0800719e <HAL_ETH_ErrorCallback>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
__weak void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth)
{
800719e: b480 push {r7}
80071a0: b083 sub sp, #12
80071a2: af00 add r7, sp, #0
80071a4: 6078 str r0, [r7, #4]
UNUSED(heth);
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_ETH_ErrorCallback could be implemented in the user file
*/
}
80071a6: bf00 nop
80071a8: 370c adds r7, #12
80071aa: 46bd mov sp, r7
80071ac: f85d 7b04 ldr.w r7, [sp], #4
80071b0: 4770 bx lr
080071b2 <HAL_ETH_ReadPHYRegister>:
* More PHY register could be read depending on the used PHY
* @param RegValue PHY register value
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue)
{
80071b2: b580 push {r7, lr}
80071b4: b086 sub sp, #24
80071b6: af00 add r7, sp, #0
80071b8: 60f8 str r0, [r7, #12]
80071ba: 460b mov r3, r1
80071bc: 607a str r2, [r7, #4]
80071be: 817b strh r3, [r7, #10]
uint32_t tmpreg = 0;
80071c0: 2300 movs r3, #0
80071c2: 617b str r3, [r7, #20]
uint32_t tickstart = 0;
80071c4: 2300 movs r3, #0
80071c6: 613b str r3, [r7, #16]
/* Check parameters */
assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress));
/* Check the ETH peripheral state */
if(heth->State == HAL_ETH_STATE_BUSY_RD)
80071c8: 68fb ldr r3, [r7, #12]
80071ca: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
80071ce: b2db uxtb r3, r3
80071d0: 2b82 cmp r3, #130 ; 0x82
80071d2: d101 bne.n 80071d8 <HAL_ETH_ReadPHYRegister+0x26>
{
return HAL_BUSY;
80071d4: 2302 movs r3, #2
80071d6: e050 b.n 800727a <HAL_ETH_ReadPHYRegister+0xc8>
}
/* Set ETH HAL State to BUSY_RD */
heth->State = HAL_ETH_STATE_BUSY_RD;
80071d8: 68fb ldr r3, [r7, #12]
80071da: 2282 movs r2, #130 ; 0x82
80071dc: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Get the ETHERNET MACMIIAR value */
tmpreg = heth->Instance->MACMIIAR;
80071e0: 68fb ldr r3, [r7, #12]
80071e2: 681b ldr r3, [r3, #0]
80071e4: 691b ldr r3, [r3, #16]
80071e6: 617b str r3, [r7, #20]
/* Keep only the CSR Clock Range CR[2:0] bits value */
tmpreg &= ~ETH_MACMIIAR_CR_MASK;
80071e8: 697b ldr r3, [r7, #20]
80071ea: f003 031c and.w r3, r3, #28
80071ee: 617b str r3, [r7, #20]
/* Prepare the MII address register value */
tmpreg |=(((uint32_t)heth->Init.PhyAddress << 11) & ETH_MACMIIAR_PA); /* Set the PHY device address */
80071f0: 68fb ldr r3, [r7, #12]
80071f2: 8a1b ldrh r3, [r3, #16]
80071f4: 02db lsls r3, r3, #11
80071f6: b29b uxth r3, r3
80071f8: 697a ldr r2, [r7, #20]
80071fa: 4313 orrs r3, r2
80071fc: 617b str r3, [r7, #20]
tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */
80071fe: 897b ldrh r3, [r7, #10]
8007200: 019b lsls r3, r3, #6
8007202: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
8007206: 697a ldr r2, [r7, #20]
8007208: 4313 orrs r3, r2
800720a: 617b str r3, [r7, #20]
tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */
800720c: 697b ldr r3, [r7, #20]
800720e: f023 0302 bic.w r3, r3, #2
8007212: 617b str r3, [r7, #20]
tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
8007214: 697b ldr r3, [r7, #20]
8007216: f043 0301 orr.w r3, r3, #1
800721a: 617b str r3, [r7, #20]
/* Write the result value into the MII Address register */
heth->Instance->MACMIIAR = tmpreg;
800721c: 68fb ldr r3, [r7, #12]
800721e: 681b ldr r3, [r3, #0]
8007220: 697a ldr r2, [r7, #20]
8007222: 611a str r2, [r3, #16]
/* Get tick */
tickstart = HAL_GetTick();
8007224: f7fe f87c bl 8005320 <HAL_GetTick>
8007228: 6138 str r0, [r7, #16]
/* Check for the Busy flag */
while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
800722a: e015 b.n 8007258 <HAL_ETH_ReadPHYRegister+0xa6>
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > PHY_READ_TO)
800722c: f7fe f878 bl 8005320 <HAL_GetTick>
8007230: 4602 mov r2, r0
8007232: 693b ldr r3, [r7, #16]
8007234: 1ad3 subs r3, r2, r3
8007236: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800723a: d309 bcc.n 8007250 <HAL_ETH_ReadPHYRegister+0x9e>
{
heth->State= HAL_ETH_STATE_READY;
800723c: 68fb ldr r3, [r7, #12]
800723e: 2201 movs r2, #1
8007240: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8007244: 68fb ldr r3, [r7, #12]
8007246: 2200 movs r2, #0
8007248: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_TIMEOUT;
800724c: 2303 movs r3, #3
800724e: e014 b.n 800727a <HAL_ETH_ReadPHYRegister+0xc8>
}
tmpreg = heth->Instance->MACMIIAR;
8007250: 68fb ldr r3, [r7, #12]
8007252: 681b ldr r3, [r3, #0]
8007254: 691b ldr r3, [r3, #16]
8007256: 617b str r3, [r7, #20]
while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8007258: 697b ldr r3, [r7, #20]
800725a: f003 0301 and.w r3, r3, #1
800725e: 2b00 cmp r3, #0
8007260: d1e4 bne.n 800722c <HAL_ETH_ReadPHYRegister+0x7a>
}
/* Get MACMIIDR value */
*RegValue = (uint16_t)(heth->Instance->MACMIIDR);
8007262: 68fb ldr r3, [r7, #12]
8007264: 681b ldr r3, [r3, #0]
8007266: 695b ldr r3, [r3, #20]
8007268: b29b uxth r3, r3
800726a: 461a mov r2, r3
800726c: 687b ldr r3, [r7, #4]
800726e: 601a str r2, [r3, #0]
/* Set ETH HAL State to READY */
heth->State = HAL_ETH_STATE_READY;
8007270: 68fb ldr r3, [r7, #12]
8007272: 2201 movs r2, #1
8007274: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return function status */
return HAL_OK;
8007278: 2300 movs r3, #0
}
800727a: 4618 mov r0, r3
800727c: 3718 adds r7, #24
800727e: 46bd mov sp, r7
8007280: bd80 pop {r7, pc}
08007282 <HAL_ETH_WritePHYRegister>:
* More PHY register could be written depending on the used PHY
* @param RegValue the value to write
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue)
{
8007282: b580 push {r7, lr}
8007284: b086 sub sp, #24
8007286: af00 add r7, sp, #0
8007288: 60f8 str r0, [r7, #12]
800728a: 460b mov r3, r1
800728c: 607a str r2, [r7, #4]
800728e: 817b strh r3, [r7, #10]
uint32_t tmpreg = 0;
8007290: 2300 movs r3, #0
8007292: 617b str r3, [r7, #20]
uint32_t tickstart = 0;
8007294: 2300 movs r3, #0
8007296: 613b str r3, [r7, #16]
/* Check parameters */
assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress));
/* Check the ETH peripheral state */
if(heth->State == HAL_ETH_STATE_BUSY_WR)
8007298: 68fb ldr r3, [r7, #12]
800729a: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800729e: b2db uxtb r3, r3
80072a0: 2b42 cmp r3, #66 ; 0x42
80072a2: d101 bne.n 80072a8 <HAL_ETH_WritePHYRegister+0x26>
{
return HAL_BUSY;
80072a4: 2302 movs r3, #2
80072a6: e04e b.n 8007346 <HAL_ETH_WritePHYRegister+0xc4>
}
/* Set ETH HAL State to BUSY_WR */
heth->State = HAL_ETH_STATE_BUSY_WR;
80072a8: 68fb ldr r3, [r7, #12]
80072aa: 2242 movs r2, #66 ; 0x42
80072ac: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Get the ETHERNET MACMIIAR value */
tmpreg = heth->Instance->MACMIIAR;
80072b0: 68fb ldr r3, [r7, #12]
80072b2: 681b ldr r3, [r3, #0]
80072b4: 691b ldr r3, [r3, #16]
80072b6: 617b str r3, [r7, #20]
/* Keep only the CSR Clock Range CR[2:0] bits value */
tmpreg &= ~ETH_MACMIIAR_CR_MASK;
80072b8: 697b ldr r3, [r7, #20]
80072ba: f003 031c and.w r3, r3, #28
80072be: 617b str r3, [r7, #20]
/* Prepare the MII register address value */
tmpreg |=(((uint32_t)heth->Init.PhyAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */
80072c0: 68fb ldr r3, [r7, #12]
80072c2: 8a1b ldrh r3, [r3, #16]
80072c4: 02db lsls r3, r3, #11
80072c6: b29b uxth r3, r3
80072c8: 697a ldr r2, [r7, #20]
80072ca: 4313 orrs r3, r2
80072cc: 617b str r3, [r7, #20]
tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */
80072ce: 897b ldrh r3, [r7, #10]
80072d0: 019b lsls r3, r3, #6
80072d2: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
80072d6: 697a ldr r2, [r7, #20]
80072d8: 4313 orrs r3, r2
80072da: 617b str r3, [r7, #20]
tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */
80072dc: 697b ldr r3, [r7, #20]
80072de: f043 0302 orr.w r3, r3, #2
80072e2: 617b str r3, [r7, #20]
tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
80072e4: 697b ldr r3, [r7, #20]
80072e6: f043 0301 orr.w r3, r3, #1
80072ea: 617b str r3, [r7, #20]
/* Give the value to the MII data register */
heth->Instance->MACMIIDR = (uint16_t)RegValue;
80072ec: 687b ldr r3, [r7, #4]
80072ee: b29a uxth r2, r3
80072f0: 68fb ldr r3, [r7, #12]
80072f2: 681b ldr r3, [r3, #0]
80072f4: 615a str r2, [r3, #20]
/* Write the result value into the MII Address register */
heth->Instance->MACMIIAR = tmpreg;
80072f6: 68fb ldr r3, [r7, #12]
80072f8: 681b ldr r3, [r3, #0]
80072fa: 697a ldr r2, [r7, #20]
80072fc: 611a str r2, [r3, #16]
/* Get tick */
tickstart = HAL_GetTick();
80072fe: f7fe f80f bl 8005320 <HAL_GetTick>
8007302: 6138 str r0, [r7, #16]
/* Check for the Busy flag */
while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8007304: e015 b.n 8007332 <HAL_ETH_WritePHYRegister+0xb0>
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > PHY_WRITE_TO)
8007306: f7fe f80b bl 8005320 <HAL_GetTick>
800730a: 4602 mov r2, r0
800730c: 693b ldr r3, [r7, #16]
800730e: 1ad3 subs r3, r2, r3
8007310: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8007314: d309 bcc.n 800732a <HAL_ETH_WritePHYRegister+0xa8>
{
heth->State= HAL_ETH_STATE_READY;
8007316: 68fb ldr r3, [r7, #12]
8007318: 2201 movs r2, #1
800731a: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
800731e: 68fb ldr r3, [r7, #12]
8007320: 2200 movs r2, #0
8007322: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_TIMEOUT;
8007326: 2303 movs r3, #3
8007328: e00d b.n 8007346 <HAL_ETH_WritePHYRegister+0xc4>
}
tmpreg = heth->Instance->MACMIIAR;
800732a: 68fb ldr r3, [r7, #12]
800732c: 681b ldr r3, [r3, #0]
800732e: 691b ldr r3, [r3, #16]
8007330: 617b str r3, [r7, #20]
while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8007332: 697b ldr r3, [r7, #20]
8007334: f003 0301 and.w r3, r3, #1
8007338: 2b00 cmp r3, #0
800733a: d1e4 bne.n 8007306 <HAL_ETH_WritePHYRegister+0x84>
}
/* Set ETH HAL State to READY */
heth->State = HAL_ETH_STATE_READY;
800733c: 68fb ldr r3, [r7, #12]
800733e: 2201 movs r2, #1
8007340: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return function status */
return HAL_OK;
8007344: 2300 movs r3, #0
}
8007346: 4618 mov r0, r3
8007348: 3718 adds r7, #24
800734a: 46bd mov sp, r7
800734c: bd80 pop {r7, pc}
0800734e <HAL_ETH_Start>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth)
{
800734e: b580 push {r7, lr}
8007350: b082 sub sp, #8
8007352: af00 add r7, sp, #0
8007354: 6078 str r0, [r7, #4]
/* Process Locked */
__HAL_LOCK(heth);
8007356: 687b ldr r3, [r7, #4]
8007358: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800735c: 2b01 cmp r3, #1
800735e: d101 bne.n 8007364 <HAL_ETH_Start+0x16>
8007360: 2302 movs r3, #2
8007362: e01f b.n 80073a4 <HAL_ETH_Start+0x56>
8007364: 687b ldr r3, [r7, #4]
8007366: 2201 movs r2, #1
8007368: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
800736c: 687b ldr r3, [r7, #4]
800736e: 2202 movs r2, #2
8007370: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Enable transmit state machine of the MAC for transmission on the MII */
ETH_MACTransmissionEnable(heth);
8007374: 6878 ldr r0, [r7, #4]
8007376: f000 fb45 bl 8007a04 <ETH_MACTransmissionEnable>
/* Enable receive state machine of the MAC for reception from the MII */
ETH_MACReceptionEnable(heth);
800737a: 6878 ldr r0, [r7, #4]
800737c: f000 fb7c bl 8007a78 <ETH_MACReceptionEnable>
/* Flush Transmit FIFO */
ETH_FlushTransmitFIFO(heth);
8007380: 6878 ldr r0, [r7, #4]
8007382: f000 fc13 bl 8007bac <ETH_FlushTransmitFIFO>
/* Start DMA transmission */
ETH_DMATransmissionEnable(heth);
8007386: 6878 ldr r0, [r7, #4]
8007388: f000 fbb0 bl 8007aec <ETH_DMATransmissionEnable>
/* Start DMA reception */
ETH_DMAReceptionEnable(heth);
800738c: 6878 ldr r0, [r7, #4]
800738e: f000 fbdd bl 8007b4c <ETH_DMAReceptionEnable>
/* Set the ETH state to READY*/
heth->State= HAL_ETH_STATE_READY;
8007392: 687b ldr r3, [r7, #4]
8007394: 2201 movs r2, #1
8007396: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
800739a: 687b ldr r3, [r7, #4]
800739c: 2200 movs r2, #0
800739e: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
80073a2: 2300 movs r3, #0
}
80073a4: 4618 mov r0, r3
80073a6: 3708 adds r7, #8
80073a8: 46bd mov sp, r7
80073aa: bd80 pop {r7, pc}
080073ac <HAL_ETH_Stop>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth)
{
80073ac: b580 push {r7, lr}
80073ae: b082 sub sp, #8
80073b0: af00 add r7, sp, #0
80073b2: 6078 str r0, [r7, #4]
/* Process Locked */
__HAL_LOCK(heth);
80073b4: 687b ldr r3, [r7, #4]
80073b6: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
80073ba: 2b01 cmp r3, #1
80073bc: d101 bne.n 80073c2 <HAL_ETH_Stop+0x16>
80073be: 2302 movs r3, #2
80073c0: e01f b.n 8007402 <HAL_ETH_Stop+0x56>
80073c2: 687b ldr r3, [r7, #4]
80073c4: 2201 movs r2, #1
80073c6: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
80073ca: 687b ldr r3, [r7, #4]
80073cc: 2202 movs r2, #2
80073ce: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Stop DMA transmission */
ETH_DMATransmissionDisable(heth);
80073d2: 6878 ldr r0, [r7, #4]
80073d4: f000 fba2 bl 8007b1c <ETH_DMATransmissionDisable>
/* Stop DMA reception */
ETH_DMAReceptionDisable(heth);
80073d8: 6878 ldr r0, [r7, #4]
80073da: f000 fbcf bl 8007b7c <ETH_DMAReceptionDisable>
/* Disable receive state machine of the MAC for reception from the MII */
ETH_MACReceptionDisable(heth);
80073de: 6878 ldr r0, [r7, #4]
80073e0: f000 fb67 bl 8007ab2 <ETH_MACReceptionDisable>
/* Flush Transmit FIFO */
ETH_FlushTransmitFIFO(heth);
80073e4: 6878 ldr r0, [r7, #4]
80073e6: f000 fbe1 bl 8007bac <ETH_FlushTransmitFIFO>
/* Disable transmit state machine of the MAC for transmission on the MII */
ETH_MACTransmissionDisable(heth);
80073ea: 6878 ldr r0, [r7, #4]
80073ec: f000 fb27 bl 8007a3e <ETH_MACTransmissionDisable>
/* Set the ETH state*/
heth->State = HAL_ETH_STATE_READY;
80073f0: 687b ldr r3, [r7, #4]
80073f2: 2201 movs r2, #1
80073f4: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
80073f8: 687b ldr r3, [r7, #4]
80073fa: 2200 movs r2, #0
80073fc: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8007400: 2300 movs r3, #0
}
8007402: 4618 mov r0, r3
8007404: 3708 adds r7, #8
8007406: 46bd mov sp, r7
8007408: bd80 pop {r7, pc}
...
0800740c <HAL_ETH_ConfigMAC>:
* the configuration information for ETHERNET module
* @param macconf MAC Configuration structure
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf)
{
800740c: b580 push {r7, lr}
800740e: b084 sub sp, #16
8007410: af00 add r7, sp, #0
8007412: 6078 str r0, [r7, #4]
8007414: 6039 str r1, [r7, #0]
uint32_t tmpreg = 0;
8007416: 2300 movs r3, #0
8007418: 60fb str r3, [r7, #12]
/* Process Locked */
__HAL_LOCK(heth);
800741a: 687b ldr r3, [r7, #4]
800741c: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8007420: 2b01 cmp r3, #1
8007422: d101 bne.n 8007428 <HAL_ETH_ConfigMAC+0x1c>
8007424: 2302 movs r3, #2
8007426: e0e4 b.n 80075f2 <HAL_ETH_ConfigMAC+0x1e6>
8007428: 687b ldr r3, [r7, #4]
800742a: 2201 movs r2, #1
800742c: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State= HAL_ETH_STATE_BUSY;
8007430: 687b ldr r3, [r7, #4]
8007432: 2202 movs r2, #2
8007434: f883 2044 strb.w r2, [r3, #68] ; 0x44
assert_param(IS_ETH_SPEED(heth->Init.Speed));
assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode));
if (macconf != NULL)
8007438: 683b ldr r3, [r7, #0]
800743a: 2b00 cmp r3, #0
800743c: f000 80b1 beq.w 80075a2 <HAL_ETH_ConfigMAC+0x196>
assert_param(IS_ETH_VLAN_TAG_COMPARISON(macconf->VLANTagComparison));
assert_param(IS_ETH_VLAN_TAG_IDENTIFIER(macconf->VLANTagIdentifier));
/*------------------------ ETHERNET MACCR Configuration --------------------*/
/* Get the ETHERNET MACCR value */
tmpreg = (heth->Instance)->MACCR;
8007440: 687b ldr r3, [r7, #4]
8007442: 681b ldr r3, [r3, #0]
8007444: 681b ldr r3, [r3, #0]
8007446: 60fb str r3, [r7, #12]
/* Clear WD, PCE, PS, TE and RE bits */
tmpreg &= ETH_MACCR_CLEAR_MASK;
8007448: 68fa ldr r2, [r7, #12]
800744a: 4b6c ldr r3, [pc, #432] ; (80075fc <HAL_ETH_ConfigMAC+0x1f0>)
800744c: 4013 ands r3, r2
800744e: 60fb str r3, [r7, #12]
tmpreg |= (uint32_t)(macconf->Watchdog |
8007450: 683b ldr r3, [r7, #0]
8007452: 681a ldr r2, [r3, #0]
macconf->Jabber |
8007454: 683b ldr r3, [r7, #0]
8007456: 685b ldr r3, [r3, #4]
tmpreg |= (uint32_t)(macconf->Watchdog |
8007458: 431a orrs r2, r3
macconf->InterFrameGap |
800745a: 683b ldr r3, [r7, #0]
800745c: 689b ldr r3, [r3, #8]
macconf->Jabber |
800745e: 431a orrs r2, r3
macconf->CarrierSense |
8007460: 683b ldr r3, [r7, #0]
8007462: 68db ldr r3, [r3, #12]
macconf->InterFrameGap |
8007464: 431a orrs r2, r3
(heth->Init).Speed |
8007466: 687b ldr r3, [r7, #4]
8007468: 689b ldr r3, [r3, #8]
macconf->CarrierSense |
800746a: 431a orrs r2, r3
macconf->ReceiveOwn |
800746c: 683b ldr r3, [r7, #0]
800746e: 691b ldr r3, [r3, #16]
(heth->Init).Speed |
8007470: 431a orrs r2, r3
macconf->LoopbackMode |
8007472: 683b ldr r3, [r7, #0]
8007474: 695b ldr r3, [r3, #20]
macconf->ReceiveOwn |
8007476: 431a orrs r2, r3
(heth->Init).DuplexMode |
8007478: 687b ldr r3, [r7, #4]
800747a: 68db ldr r3, [r3, #12]
macconf->LoopbackMode |
800747c: 431a orrs r2, r3
macconf->ChecksumOffload |
800747e: 683b ldr r3, [r7, #0]
8007480: 699b ldr r3, [r3, #24]
(heth->Init).DuplexMode |
8007482: 431a orrs r2, r3
macconf->RetryTransmission |
8007484: 683b ldr r3, [r7, #0]
8007486: 69db ldr r3, [r3, #28]
macconf->ChecksumOffload |
8007488: 431a orrs r2, r3
macconf->AutomaticPadCRCStrip |
800748a: 683b ldr r3, [r7, #0]
800748c: 6a1b ldr r3, [r3, #32]
macconf->RetryTransmission |
800748e: 431a orrs r2, r3
macconf->BackOffLimit |
8007490: 683b ldr r3, [r7, #0]
8007492: 6a5b ldr r3, [r3, #36] ; 0x24
macconf->AutomaticPadCRCStrip |
8007494: 431a orrs r2, r3
macconf->DeferralCheck);
8007496: 683b ldr r3, [r7, #0]
8007498: 6a9b ldr r3, [r3, #40] ; 0x28
macconf->BackOffLimit |
800749a: 4313 orrs r3, r2
tmpreg |= (uint32_t)(macconf->Watchdog |
800749c: 68fa ldr r2, [r7, #12]
800749e: 4313 orrs r3, r2
80074a0: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACCR */
(heth->Instance)->MACCR = (uint32_t)tmpreg;
80074a2: 687b ldr r3, [r7, #4]
80074a4: 681b ldr r3, [r3, #0]
80074a6: 68fa ldr r2, [r7, #12]
80074a8: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACCR;
80074aa: 687b ldr r3, [r7, #4]
80074ac: 681b ldr r3, [r3, #0]
80074ae: 681b ldr r3, [r3, #0]
80074b0: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80074b2: 2001 movs r0, #1
80074b4: f7fd ff40 bl 8005338 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
80074b8: 687b ldr r3, [r7, #4]
80074ba: 681b ldr r3, [r3, #0]
80074bc: 68fa ldr r2, [r7, #12]
80074be: 601a str r2, [r3, #0]
/*----------------------- ETHERNET MACFFR Configuration --------------------*/
/* Write to ETHERNET MACFFR */
(heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll |
80074c0: 683b ldr r3, [r7, #0]
80074c2: 6ada ldr r2, [r3, #44] ; 0x2c
macconf->SourceAddrFilter |
80074c4: 683b ldr r3, [r7, #0]
80074c6: 6b1b ldr r3, [r3, #48] ; 0x30
(heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll |
80074c8: 431a orrs r2, r3
macconf->PassControlFrames |
80074ca: 683b ldr r3, [r7, #0]
80074cc: 6b5b ldr r3, [r3, #52] ; 0x34
macconf->SourceAddrFilter |
80074ce: 431a orrs r2, r3
macconf->BroadcastFramesReception |
80074d0: 683b ldr r3, [r7, #0]
80074d2: 6b9b ldr r3, [r3, #56] ; 0x38
macconf->PassControlFrames |
80074d4: 431a orrs r2, r3
macconf->DestinationAddrFilter |
80074d6: 683b ldr r3, [r7, #0]
80074d8: 6bdb ldr r3, [r3, #60] ; 0x3c
macconf->BroadcastFramesReception |
80074da: 431a orrs r2, r3
macconf->PromiscuousMode |
80074dc: 683b ldr r3, [r7, #0]
80074de: 6c1b ldr r3, [r3, #64] ; 0x40
macconf->DestinationAddrFilter |
80074e0: 431a orrs r2, r3
macconf->MulticastFramesFilter |
80074e2: 683b ldr r3, [r7, #0]
80074e4: 6c5b ldr r3, [r3, #68] ; 0x44
macconf->PromiscuousMode |
80074e6: ea42 0103 orr.w r1, r2, r3
macconf->UnicastFramesFilter);
80074ea: 683b ldr r3, [r7, #0]
80074ec: 6c9a ldr r2, [r3, #72] ; 0x48
(heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll |
80074ee: 687b ldr r3, [r7, #4]
80074f0: 681b ldr r3, [r3, #0]
macconf->MulticastFramesFilter |
80074f2: 430a orrs r2, r1
(heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll |
80074f4: 605a str r2, [r3, #4]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACFFR;
80074f6: 687b ldr r3, [r7, #4]
80074f8: 681b ldr r3, [r3, #0]
80074fa: 685b ldr r3, [r3, #4]
80074fc: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80074fe: 2001 movs r0, #1
8007500: f7fd ff1a bl 8005338 <HAL_Delay>
(heth->Instance)->MACFFR = tmpreg;
8007504: 687b ldr r3, [r7, #4]
8007506: 681b ldr r3, [r3, #0]
8007508: 68fa ldr r2, [r7, #12]
800750a: 605a str r2, [r3, #4]
/*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/
/* Write to ETHERNET MACHTHR */
(heth->Instance)->MACHTHR = (uint32_t)macconf->HashTableHigh;
800750c: 687b ldr r3, [r7, #4]
800750e: 681b ldr r3, [r3, #0]
8007510: 683a ldr r2, [r7, #0]
8007512: 6cd2 ldr r2, [r2, #76] ; 0x4c
8007514: 609a str r2, [r3, #8]
/* Write to ETHERNET MACHTLR */
(heth->Instance)->MACHTLR = (uint32_t)macconf->HashTableLow;
8007516: 687b ldr r3, [r7, #4]
8007518: 681b ldr r3, [r3, #0]
800751a: 683a ldr r2, [r7, #0]
800751c: 6d12 ldr r2, [r2, #80] ; 0x50
800751e: 60da str r2, [r3, #12]
/*----------------------- ETHERNET MACFCR Configuration --------------------*/
/* Get the ETHERNET MACFCR value */
tmpreg = (heth->Instance)->MACFCR;
8007520: 687b ldr r3, [r7, #4]
8007522: 681b ldr r3, [r3, #0]
8007524: 699b ldr r3, [r3, #24]
8007526: 60fb str r3, [r7, #12]
/* Clear xx bits */
tmpreg &= ETH_MACFCR_CLEAR_MASK;
8007528: 68fa ldr r2, [r7, #12]
800752a: f64f 7341 movw r3, #65345 ; 0xff41
800752e: 4013 ands r3, r2
8007530: 60fb str r3, [r7, #12]
tmpreg |= (uint32_t)((macconf->PauseTime << 16) |
8007532: 683b ldr r3, [r7, #0]
8007534: 6d5b ldr r3, [r3, #84] ; 0x54
8007536: 041a lsls r2, r3, #16
macconf->ZeroQuantaPause |
8007538: 683b ldr r3, [r7, #0]
800753a: 6d9b ldr r3, [r3, #88] ; 0x58
tmpreg |= (uint32_t)((macconf->PauseTime << 16) |
800753c: 431a orrs r2, r3
macconf->PauseLowThreshold |
800753e: 683b ldr r3, [r7, #0]
8007540: 6ddb ldr r3, [r3, #92] ; 0x5c
macconf->ZeroQuantaPause |
8007542: 431a orrs r2, r3
macconf->UnicastPauseFrameDetect |
8007544: 683b ldr r3, [r7, #0]
8007546: 6e1b ldr r3, [r3, #96] ; 0x60
macconf->PauseLowThreshold |
8007548: 431a orrs r2, r3
macconf->ReceiveFlowControl |
800754a: 683b ldr r3, [r7, #0]
800754c: 6e5b ldr r3, [r3, #100] ; 0x64
macconf->UnicastPauseFrameDetect |
800754e: 431a orrs r2, r3
macconf->TransmitFlowControl);
8007550: 683b ldr r3, [r7, #0]
8007552: 6e9b ldr r3, [r3, #104] ; 0x68
macconf->ReceiveFlowControl |
8007554: 4313 orrs r3, r2
tmpreg |= (uint32_t)((macconf->PauseTime << 16) |
8007556: 68fa ldr r2, [r7, #12]
8007558: 4313 orrs r3, r2
800755a: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACFCR */
(heth->Instance)->MACFCR = (uint32_t)tmpreg;
800755c: 687b ldr r3, [r7, #4]
800755e: 681b ldr r3, [r3, #0]
8007560: 68fa ldr r2, [r7, #12]
8007562: 619a str r2, [r3, #24]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACFCR;
8007564: 687b ldr r3, [r7, #4]
8007566: 681b ldr r3, [r3, #0]
8007568: 699b ldr r3, [r3, #24]
800756a: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
800756c: 2001 movs r0, #1
800756e: f7fd fee3 bl 8005338 <HAL_Delay>
(heth->Instance)->MACFCR = tmpreg;
8007572: 687b ldr r3, [r7, #4]
8007574: 681b ldr r3, [r3, #0]
8007576: 68fa ldr r2, [r7, #12]
8007578: 619a str r2, [r3, #24]
/*----------------------- ETHERNET MACVLANTR Configuration -----------------*/
(heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison |
800757a: 683b ldr r3, [r7, #0]
800757c: 6ed9 ldr r1, [r3, #108] ; 0x6c
macconf->VLANTagIdentifier);
800757e: 683b ldr r3, [r7, #0]
8007580: 6f1a ldr r2, [r3, #112] ; 0x70
(heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison |
8007582: 687b ldr r3, [r7, #4]
8007584: 681b ldr r3, [r3, #0]
8007586: 430a orrs r2, r1
8007588: 61da str r2, [r3, #28]
/* Wait until the write operation will be taken into account :
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACVLANTR;
800758a: 687b ldr r3, [r7, #4]
800758c: 681b ldr r3, [r3, #0]
800758e: 69db ldr r3, [r3, #28]
8007590: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8007592: 2001 movs r0, #1
8007594: f7fd fed0 bl 8005338 <HAL_Delay>
(heth->Instance)->MACVLANTR = tmpreg;
8007598: 687b ldr r3, [r7, #4]
800759a: 681b ldr r3, [r3, #0]
800759c: 68fa ldr r2, [r7, #12]
800759e: 61da str r2, [r3, #28]
80075a0: e01e b.n 80075e0 <HAL_ETH_ConfigMAC+0x1d4>
}
else /* macconf == NULL : here we just configure Speed and Duplex mode */
{
/*------------------------ ETHERNET MACCR Configuration --------------------*/
/* Get the ETHERNET MACCR value */
tmpreg = (heth->Instance)->MACCR;
80075a2: 687b ldr r3, [r7, #4]
80075a4: 681b ldr r3, [r3, #0]
80075a6: 681b ldr r3, [r3, #0]
80075a8: 60fb str r3, [r7, #12]
/* Clear FES and DM bits */
tmpreg &= ~((uint32_t)0x00004800);
80075aa: 68fb ldr r3, [r7, #12]
80075ac: f423 4390 bic.w r3, r3, #18432 ; 0x4800
80075b0: 60fb str r3, [r7, #12]
tmpreg |= (uint32_t)(heth->Init.Speed | heth->Init.DuplexMode);
80075b2: 687b ldr r3, [r7, #4]
80075b4: 689a ldr r2, [r3, #8]
80075b6: 687b ldr r3, [r7, #4]
80075b8: 68db ldr r3, [r3, #12]
80075ba: 4313 orrs r3, r2
80075bc: 68fa ldr r2, [r7, #12]
80075be: 4313 orrs r3, r2
80075c0: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACCR */
(heth->Instance)->MACCR = (uint32_t)tmpreg;
80075c2: 687b ldr r3, [r7, #4]
80075c4: 681b ldr r3, [r3, #0]
80075c6: 68fa ldr r2, [r7, #12]
80075c8: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACCR;
80075ca: 687b ldr r3, [r7, #4]
80075cc: 681b ldr r3, [r3, #0]
80075ce: 681b ldr r3, [r3, #0]
80075d0: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80075d2: 2001 movs r0, #1
80075d4: f7fd feb0 bl 8005338 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
80075d8: 687b ldr r3, [r7, #4]
80075da: 681b ldr r3, [r3, #0]
80075dc: 68fa ldr r2, [r7, #12]
80075de: 601a str r2, [r3, #0]
}
/* Set the ETH state to Ready */
heth->State= HAL_ETH_STATE_READY;
80075e0: 687b ldr r3, [r7, #4]
80075e2: 2201 movs r2, #1
80075e4: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
80075e8: 687b ldr r3, [r7, #4]
80075ea: 2200 movs r2, #0
80075ec: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
80075f0: 2300 movs r3, #0
}
80075f2: 4618 mov r0, r3
80075f4: 3710 adds r7, #16
80075f6: 46bd mov sp, r7
80075f8: bd80 pop {r7, pc}
80075fa: bf00 nop
80075fc: ff20810f .word 0xff20810f
08007600 <ETH_MACDMAConfig>:
* the configuration information for ETHERNET module
* @param err Ethernet Init error
* @retval HAL status
*/
static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err)
{
8007600: b580 push {r7, lr}
8007602: b0b0 sub sp, #192 ; 0xc0
8007604: af00 add r7, sp, #0
8007606: 6078 str r0, [r7, #4]
8007608: 6039 str r1, [r7, #0]
ETH_MACInitTypeDef macinit;
ETH_DMAInitTypeDef dmainit;
uint32_t tmpreg = 0;
800760a: 2300 movs r3, #0
800760c: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
if (err != ETH_SUCCESS) /* Auto-negotiation failed */
8007610: 683b ldr r3, [r7, #0]
8007612: 2b00 cmp r3, #0
8007614: d007 beq.n 8007626 <ETH_MACDMAConfig+0x26>
{
/* Set Ethernet duplex mode to Full-duplex */
(heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX;
8007616: 687b ldr r3, [r7, #4]
8007618: f44f 6200 mov.w r2, #2048 ; 0x800
800761c: 60da str r2, [r3, #12]
/* Set Ethernet speed to 100M */
(heth->Init).Speed = ETH_SPEED_100M;
800761e: 687b ldr r3, [r7, #4]
8007620: f44f 4280 mov.w r2, #16384 ; 0x4000
8007624: 609a str r2, [r3, #8]
}
/* Ethernet MAC default initialization **************************************/
macinit.Watchdog = ETH_WATCHDOG_ENABLE;
8007626: 2300 movs r3, #0
8007628: 64bb str r3, [r7, #72] ; 0x48
macinit.Jabber = ETH_JABBER_ENABLE;
800762a: 2300 movs r3, #0
800762c: 64fb str r3, [r7, #76] ; 0x4c
macinit.InterFrameGap = ETH_INTERFRAMEGAP_96BIT;
800762e: 2300 movs r3, #0
8007630: 653b str r3, [r7, #80] ; 0x50
macinit.CarrierSense = ETH_CARRIERSENCE_ENABLE;
8007632: 2300 movs r3, #0
8007634: 657b str r3, [r7, #84] ; 0x54
macinit.ReceiveOwn = ETH_RECEIVEOWN_ENABLE;
8007636: 2300 movs r3, #0
8007638: 65bb str r3, [r7, #88] ; 0x58
macinit.LoopbackMode = ETH_LOOPBACKMODE_DISABLE;
800763a: 2300 movs r3, #0
800763c: 65fb str r3, [r7, #92] ; 0x5c
if(heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE)
800763e: 687b ldr r3, [r7, #4]
8007640: 69db ldr r3, [r3, #28]
8007642: 2b00 cmp r3, #0
8007644: d103 bne.n 800764e <ETH_MACDMAConfig+0x4e>
{
macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_ENABLE;
8007646: f44f 6380 mov.w r3, #1024 ; 0x400
800764a: 663b str r3, [r7, #96] ; 0x60
800764c: e001 b.n 8007652 <ETH_MACDMAConfig+0x52>
}
else
{
macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_DISABLE;
800764e: 2300 movs r3, #0
8007650: 663b str r3, [r7, #96] ; 0x60
}
macinit.RetryTransmission = ETH_RETRYTRANSMISSION_DISABLE;
8007652: f44f 7300 mov.w r3, #512 ; 0x200
8007656: 667b str r3, [r7, #100] ; 0x64
macinit.AutomaticPadCRCStrip = ETH_AUTOMATICPADCRCSTRIP_DISABLE;
8007658: 2300 movs r3, #0
800765a: 66bb str r3, [r7, #104] ; 0x68
macinit.BackOffLimit = ETH_BACKOFFLIMIT_10;
800765c: 2300 movs r3, #0
800765e: 66fb str r3, [r7, #108] ; 0x6c
macinit.DeferralCheck = ETH_DEFFERRALCHECK_DISABLE;
8007660: 2300 movs r3, #0
8007662: 673b str r3, [r7, #112] ; 0x70
macinit.ReceiveAll = ETH_RECEIVEAll_DISABLE;
8007664: 2300 movs r3, #0
8007666: 677b str r3, [r7, #116] ; 0x74
macinit.SourceAddrFilter = ETH_SOURCEADDRFILTER_DISABLE;
8007668: 2300 movs r3, #0
800766a: 67bb str r3, [r7, #120] ; 0x78
macinit.PassControlFrames = ETH_PASSCONTROLFRAMES_BLOCKALL;
800766c: 2340 movs r3, #64 ; 0x40
800766e: 67fb str r3, [r7, #124] ; 0x7c
macinit.BroadcastFramesReception = ETH_BROADCASTFRAMESRECEPTION_ENABLE;
8007670: 2300 movs r3, #0
8007672: f8c7 3080 str.w r3, [r7, #128] ; 0x80
macinit.DestinationAddrFilter = ETH_DESTINATIONADDRFILTER_NORMAL;
8007676: 2300 movs r3, #0
8007678: f8c7 3084 str.w r3, [r7, #132] ; 0x84
macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE;
800767c: 2300 movs r3, #0
800767e: f8c7 3088 str.w r3, [r7, #136] ; 0x88
macinit.MulticastFramesFilter = ETH_MULTICASTFRAMESFILTER_PERFECT;
8007682: 2300 movs r3, #0
8007684: f8c7 308c str.w r3, [r7, #140] ; 0x8c
macinit.UnicastFramesFilter = ETH_UNICASTFRAMESFILTER_PERFECT;
8007688: 2300 movs r3, #0
800768a: f8c7 3090 str.w r3, [r7, #144] ; 0x90
macinit.HashTableHigh = 0x0;
800768e: 2300 movs r3, #0
8007690: f8c7 3094 str.w r3, [r7, #148] ; 0x94
macinit.HashTableLow = 0x0;
8007694: 2300 movs r3, #0
8007696: f8c7 3098 str.w r3, [r7, #152] ; 0x98
macinit.PauseTime = 0x0;
800769a: 2300 movs r3, #0
800769c: f8c7 309c str.w r3, [r7, #156] ; 0x9c
macinit.ZeroQuantaPause = ETH_ZEROQUANTAPAUSE_DISABLE;
80076a0: 2380 movs r3, #128 ; 0x80
80076a2: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0
macinit.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4;
80076a6: 2300 movs r3, #0
80076a8: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4
macinit.UnicastPauseFrameDetect = ETH_UNICASTPAUSEFRAMEDETECT_DISABLE;
80076ac: 2300 movs r3, #0
80076ae: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8
macinit.ReceiveFlowControl = ETH_RECEIVEFLOWCONTROL_DISABLE;
80076b2: 2300 movs r3, #0
80076b4: f8c7 30ac str.w r3, [r7, #172] ; 0xac
macinit.TransmitFlowControl = ETH_TRANSMITFLOWCONTROL_DISABLE;
80076b8: 2300 movs r3, #0
80076ba: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0
macinit.VLANTagComparison = ETH_VLANTAGCOMPARISON_16BIT;
80076be: 2300 movs r3, #0
80076c0: f8c7 30b4 str.w r3, [r7, #180] ; 0xb4
macinit.VLANTagIdentifier = 0x0;
80076c4: 2300 movs r3, #0
80076c6: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8
/*------------------------ ETHERNET MACCR Configuration --------------------*/
/* Get the ETHERNET MACCR value */
tmpreg = (heth->Instance)->MACCR;
80076ca: 687b ldr r3, [r7, #4]
80076cc: 681b ldr r3, [r3, #0]
80076ce: 681b ldr r3, [r3, #0]
80076d0: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Clear WD, PCE, PS, TE and RE bits */
tmpreg &= ETH_MACCR_CLEAR_MASK;
80076d4: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80076d8: 4bab ldr r3, [pc, #684] ; (8007988 <ETH_MACDMAConfig+0x388>)
80076da: 4013 ands r3, r2
80076dc: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Set the IPCO bit according to ETH ChecksumOffload value */
/* Set the DR bit according to ETH RetryTransmission value */
/* Set the ACS bit according to ETH AutomaticPadCRCStrip value */
/* Set the BL bit according to ETH BackOffLimit value */
/* Set the DC bit according to ETH DeferralCheck value */
tmpreg |= (uint32_t)(macinit.Watchdog |
80076e0: 6cba ldr r2, [r7, #72] ; 0x48
macinit.Jabber |
80076e2: 6cfb ldr r3, [r7, #76] ; 0x4c
tmpreg |= (uint32_t)(macinit.Watchdog |
80076e4: 431a orrs r2, r3
macinit.InterFrameGap |
80076e6: 6d3b ldr r3, [r7, #80] ; 0x50
macinit.Jabber |
80076e8: 431a orrs r2, r3
macinit.CarrierSense |
80076ea: 6d7b ldr r3, [r7, #84] ; 0x54
macinit.InterFrameGap |
80076ec: 431a orrs r2, r3
(heth->Init).Speed |
80076ee: 687b ldr r3, [r7, #4]
80076f0: 689b ldr r3, [r3, #8]
macinit.CarrierSense |
80076f2: 431a orrs r2, r3
macinit.ReceiveOwn |
80076f4: 6dbb ldr r3, [r7, #88] ; 0x58
(heth->Init).Speed |
80076f6: 431a orrs r2, r3
macinit.LoopbackMode |
80076f8: 6dfb ldr r3, [r7, #92] ; 0x5c
macinit.ReceiveOwn |
80076fa: 431a orrs r2, r3
(heth->Init).DuplexMode |
80076fc: 687b ldr r3, [r7, #4]
80076fe: 68db ldr r3, [r3, #12]
macinit.LoopbackMode |
8007700: 431a orrs r2, r3
macinit.ChecksumOffload |
8007702: 6e3b ldr r3, [r7, #96] ; 0x60
(heth->Init).DuplexMode |
8007704: 431a orrs r2, r3
macinit.RetryTransmission |
8007706: 6e7b ldr r3, [r7, #100] ; 0x64
macinit.ChecksumOffload |
8007708: 431a orrs r2, r3
macinit.AutomaticPadCRCStrip |
800770a: 6ebb ldr r3, [r7, #104] ; 0x68
macinit.RetryTransmission |
800770c: 431a orrs r2, r3
macinit.BackOffLimit |
800770e: 6efb ldr r3, [r7, #108] ; 0x6c
macinit.AutomaticPadCRCStrip |
8007710: 431a orrs r2, r3
macinit.DeferralCheck);
8007712: 6f3b ldr r3, [r7, #112] ; 0x70
macinit.BackOffLimit |
8007714: 4313 orrs r3, r2
tmpreg |= (uint32_t)(macinit.Watchdog |
8007716: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
800771a: 4313 orrs r3, r2
800771c: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Write to ETHERNET MACCR */
(heth->Instance)->MACCR = (uint32_t)tmpreg;
8007720: 687b ldr r3, [r7, #4]
8007722: 681b ldr r3, [r3, #0]
8007724: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007728: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACCR;
800772a: 687b ldr r3, [r7, #4]
800772c: 681b ldr r3, [r3, #0]
800772e: 681b ldr r3, [r3, #0]
8007730: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
8007734: 2001 movs r0, #1
8007736: f7fd fdff bl 8005338 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
800773a: 687b ldr r3, [r7, #4]
800773c: 681b ldr r3, [r3, #0]
800773e: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007742: 601a str r2, [r3, #0]
/* Set the DAIF bit according to ETH DestinationAddrFilter value */
/* Set the PR bit according to ETH PromiscuousMode value */
/* Set the PM, HMC and HPF bits according to ETH MulticastFramesFilter value */
/* Set the HUC and HPF bits according to ETH UnicastFramesFilter value */
/* Write to ETHERNET MACFFR */
(heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll |
8007744: 6f7a ldr r2, [r7, #116] ; 0x74
macinit.SourceAddrFilter |
8007746: 6fbb ldr r3, [r7, #120] ; 0x78
(heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll |
8007748: 431a orrs r2, r3
macinit.PassControlFrames |
800774a: 6ffb ldr r3, [r7, #124] ; 0x7c
macinit.SourceAddrFilter |
800774c: 431a orrs r2, r3
macinit.BroadcastFramesReception |
800774e: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80
macinit.PassControlFrames |
8007752: 431a orrs r2, r3
macinit.DestinationAddrFilter |
8007754: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84
macinit.BroadcastFramesReception |
8007758: 431a orrs r2, r3
macinit.PromiscuousMode |
800775a: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88
macinit.DestinationAddrFilter |
800775e: 431a orrs r2, r3
macinit.MulticastFramesFilter |
8007760: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c
macinit.PromiscuousMode |
8007764: ea42 0103 orr.w r1, r2, r3
macinit.UnicastFramesFilter);
8007768: f8d7 2090 ldr.w r2, [r7, #144] ; 0x90
(heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll |
800776c: 687b ldr r3, [r7, #4]
800776e: 681b ldr r3, [r3, #0]
macinit.MulticastFramesFilter |
8007770: 430a orrs r2, r1
(heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll |
8007772: 605a str r2, [r3, #4]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACFFR;
8007774: 687b ldr r3, [r7, #4]
8007776: 681b ldr r3, [r3, #0]
8007778: 685b ldr r3, [r3, #4]
800777a: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
800777e: 2001 movs r0, #1
8007780: f7fd fdda bl 8005338 <HAL_Delay>
(heth->Instance)->MACFFR = tmpreg;
8007784: 687b ldr r3, [r7, #4]
8007786: 681b ldr r3, [r3, #0]
8007788: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
800778c: 605a str r2, [r3, #4]
/*--------------- ETHERNET MACHTHR and MACHTLR Configuration --------------*/
/* Write to ETHERNET MACHTHR */
(heth->Instance)->MACHTHR = (uint32_t)macinit.HashTableHigh;
800778e: 687b ldr r3, [r7, #4]
8007790: 681b ldr r3, [r3, #0]
8007792: f8d7 2094 ldr.w r2, [r7, #148] ; 0x94
8007796: 609a str r2, [r3, #8]
/* Write to ETHERNET MACHTLR */
(heth->Instance)->MACHTLR = (uint32_t)macinit.HashTableLow;
8007798: 687b ldr r3, [r7, #4]
800779a: 681b ldr r3, [r3, #0]
800779c: f8d7 2098 ldr.w r2, [r7, #152] ; 0x98
80077a0: 60da str r2, [r3, #12]
/*----------------------- ETHERNET MACFCR Configuration -------------------*/
/* Get the ETHERNET MACFCR value */
tmpreg = (heth->Instance)->MACFCR;
80077a2: 687b ldr r3, [r7, #4]
80077a4: 681b ldr r3, [r3, #0]
80077a6: 699b ldr r3, [r3, #24]
80077a8: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Clear xx bits */
tmpreg &= ETH_MACFCR_CLEAR_MASK;
80077ac: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80077b0: f64f 7341 movw r3, #65345 ; 0xff41
80077b4: 4013 ands r3, r2
80077b6: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Set the DZPQ bit according to ETH ZeroQuantaPause value */
/* Set the PLT bit according to ETH PauseLowThreshold value */
/* Set the UP bit according to ETH UnicastPauseFrameDetect value */
/* Set the RFE bit according to ETH ReceiveFlowControl value */
/* Set the TFE bit according to ETH TransmitFlowControl value */
tmpreg |= (uint32_t)((macinit.PauseTime << 16) |
80077ba: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c
80077be: 041a lsls r2, r3, #16
macinit.ZeroQuantaPause |
80077c0: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0
tmpreg |= (uint32_t)((macinit.PauseTime << 16) |
80077c4: 431a orrs r2, r3
macinit.PauseLowThreshold |
80077c6: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
macinit.ZeroQuantaPause |
80077ca: 431a orrs r2, r3
macinit.UnicastPauseFrameDetect |
80077cc: f8d7 30a8 ldr.w r3, [r7, #168] ; 0xa8
macinit.PauseLowThreshold |
80077d0: 431a orrs r2, r3
macinit.ReceiveFlowControl |
80077d2: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac
macinit.UnicastPauseFrameDetect |
80077d6: 431a orrs r2, r3
macinit.TransmitFlowControl);
80077d8: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0
macinit.ReceiveFlowControl |
80077dc: 4313 orrs r3, r2
tmpreg |= (uint32_t)((macinit.PauseTime << 16) |
80077de: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80077e2: 4313 orrs r3, r2
80077e4: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Write to ETHERNET MACFCR */
(heth->Instance)->MACFCR = (uint32_t)tmpreg;
80077e8: 687b ldr r3, [r7, #4]
80077ea: 681b ldr r3, [r3, #0]
80077ec: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80077f0: 619a str r2, [r3, #24]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACFCR;
80077f2: 687b ldr r3, [r7, #4]
80077f4: 681b ldr r3, [r3, #0]
80077f6: 699b ldr r3, [r3, #24]
80077f8: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
80077fc: 2001 movs r0, #1
80077fe: f7fd fd9b bl 8005338 <HAL_Delay>
(heth->Instance)->MACFCR = tmpreg;
8007802: 687b ldr r3, [r7, #4]
8007804: 681b ldr r3, [r3, #0]
8007806: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
800780a: 619a str r2, [r3, #24]
/*----------------------- ETHERNET MACVLANTR Configuration ----------------*/
/* Set the ETV bit according to ETH VLANTagComparison value */
/* Set the VL bit according to ETH VLANTagIdentifier value */
(heth->Instance)->MACVLANTR = (uint32_t)(macinit.VLANTagComparison |
800780c: f8d7 10b4 ldr.w r1, [r7, #180] ; 0xb4
macinit.VLANTagIdentifier);
8007810: f8d7 20b8 ldr.w r2, [r7, #184] ; 0xb8
(heth->Instance)->MACVLANTR = (uint32_t)(macinit.VLANTagComparison |
8007814: 687b ldr r3, [r7, #4]
8007816: 681b ldr r3, [r3, #0]
8007818: 430a orrs r2, r1
800781a: 61da str r2, [r3, #28]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACVLANTR;
800781c: 687b ldr r3, [r7, #4]
800781e: 681b ldr r3, [r3, #0]
8007820: 69db ldr r3, [r3, #28]
8007822: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
8007826: 2001 movs r0, #1
8007828: f7fd fd86 bl 8005338 <HAL_Delay>
(heth->Instance)->MACVLANTR = tmpreg;
800782c: 687b ldr r3, [r7, #4]
800782e: 681b ldr r3, [r3, #0]
8007830: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007834: 61da str r2, [r3, #28]
/* Ethernet DMA default initialization ************************************/
dmainit.DropTCPIPChecksumErrorFrame = ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE;
8007836: 2300 movs r3, #0
8007838: 60bb str r3, [r7, #8]
dmainit.ReceiveStoreForward = ETH_RECEIVESTOREFORWARD_ENABLE;
800783a: f04f 7300 mov.w r3, #33554432 ; 0x2000000
800783e: 60fb str r3, [r7, #12]
dmainit.FlushReceivedFrame = ETH_FLUSHRECEIVEDFRAME_ENABLE;
8007840: 2300 movs r3, #0
8007842: 613b str r3, [r7, #16]
dmainit.TransmitStoreForward = ETH_TRANSMITSTOREFORWARD_ENABLE;
8007844: f44f 1300 mov.w r3, #2097152 ; 0x200000
8007848: 617b str r3, [r7, #20]
dmainit.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES;
800784a: 2300 movs r3, #0
800784c: 61bb str r3, [r7, #24]
dmainit.ForwardErrorFrames = ETH_FORWARDERRORFRAMES_DISABLE;
800784e: 2300 movs r3, #0
8007850: 61fb str r3, [r7, #28]
dmainit.ForwardUndersizedGoodFrames = ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE;
8007852: 2300 movs r3, #0
8007854: 623b str r3, [r7, #32]
dmainit.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES;
8007856: 2300 movs r3, #0
8007858: 627b str r3, [r7, #36] ; 0x24
dmainit.SecondFrameOperate = ETH_SECONDFRAMEOPERARTE_ENABLE;
800785a: 2304 movs r3, #4
800785c: 62bb str r3, [r7, #40] ; 0x28
dmainit.AddressAlignedBeats = ETH_ADDRESSALIGNEDBEATS_ENABLE;
800785e: f04f 7300 mov.w r3, #33554432 ; 0x2000000
8007862: 62fb str r3, [r7, #44] ; 0x2c
dmainit.FixedBurst = ETH_FIXEDBURST_ENABLE;
8007864: f44f 3380 mov.w r3, #65536 ; 0x10000
8007868: 633b str r3, [r7, #48] ; 0x30
dmainit.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT;
800786a: f44f 0380 mov.w r3, #4194304 ; 0x400000
800786e: 637b str r3, [r7, #52] ; 0x34
dmainit.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT;
8007870: f44f 5300 mov.w r3, #8192 ; 0x2000
8007874: 63bb str r3, [r7, #56] ; 0x38
dmainit.EnhancedDescriptorFormat = ETH_DMAENHANCEDDESCRIPTOR_ENABLE;
8007876: 2380 movs r3, #128 ; 0x80
8007878: 63fb str r3, [r7, #60] ; 0x3c
dmainit.DescriptorSkipLength = 0x0;
800787a: 2300 movs r3, #0
800787c: 643b str r3, [r7, #64] ; 0x40
dmainit.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1;
800787e: 2300 movs r3, #0
8007880: 647b str r3, [r7, #68] ; 0x44
/* Get the ETHERNET DMAOMR value */
tmpreg = (heth->Instance)->DMAOMR;
8007882: 687b ldr r3, [r7, #4]
8007884: 681a ldr r2, [r3, #0]
8007886: f241 0318 movw r3, #4120 ; 0x1018
800788a: 4413 add r3, r2
800788c: 681b ldr r3, [r3, #0]
800788e: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Clear xx bits */
tmpreg &= ETH_DMAOMR_CLEAR_MASK;
8007892: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007896: 4b3d ldr r3, [pc, #244] ; (800798c <ETH_MACDMAConfig+0x38c>)
8007898: 4013 ands r3, r2
800789a: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Set the TTC bit according to ETH TransmitThresholdControl value */
/* Set the FEF bit according to ETH ForwardErrorFrames value */
/* Set the FUF bit according to ETH ForwardUndersizedGoodFrames value */
/* Set the RTC bit according to ETH ReceiveThresholdControl value */
/* Set the OSF bit according to ETH SecondFrameOperate value */
tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame |
800789e: 68ba ldr r2, [r7, #8]
dmainit.ReceiveStoreForward |
80078a0: 68fb ldr r3, [r7, #12]
tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame |
80078a2: 431a orrs r2, r3
dmainit.FlushReceivedFrame |
80078a4: 693b ldr r3, [r7, #16]
dmainit.ReceiveStoreForward |
80078a6: 431a orrs r2, r3
dmainit.TransmitStoreForward |
80078a8: 697b ldr r3, [r7, #20]
dmainit.FlushReceivedFrame |
80078aa: 431a orrs r2, r3
dmainit.TransmitThresholdControl |
80078ac: 69bb ldr r3, [r7, #24]
dmainit.TransmitStoreForward |
80078ae: 431a orrs r2, r3
dmainit.ForwardErrorFrames |
80078b0: 69fb ldr r3, [r7, #28]
dmainit.TransmitThresholdControl |
80078b2: 431a orrs r2, r3
dmainit.ForwardUndersizedGoodFrames |
80078b4: 6a3b ldr r3, [r7, #32]
dmainit.ForwardErrorFrames |
80078b6: 431a orrs r2, r3
dmainit.ReceiveThresholdControl |
80078b8: 6a7b ldr r3, [r7, #36] ; 0x24
dmainit.ForwardUndersizedGoodFrames |
80078ba: 431a orrs r2, r3
dmainit.SecondFrameOperate);
80078bc: 6abb ldr r3, [r7, #40] ; 0x28
dmainit.ReceiveThresholdControl |
80078be: 4313 orrs r3, r2
tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame |
80078c0: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80078c4: 4313 orrs r3, r2
80078c6: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Write to ETHERNET DMAOMR */
(heth->Instance)->DMAOMR = (uint32_t)tmpreg;
80078ca: 687b ldr r3, [r7, #4]
80078cc: 681a ldr r2, [r3, #0]
80078ce: f241 0318 movw r3, #4120 ; 0x1018
80078d2: 4413 add r3, r2
80078d4: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80078d8: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->DMAOMR;
80078da: 687b ldr r3, [r7, #4]
80078dc: 681a ldr r2, [r3, #0]
80078de: f241 0318 movw r3, #4120 ; 0x1018
80078e2: 4413 add r3, r2
80078e4: 681b ldr r3, [r3, #0]
80078e6: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
80078ea: 2001 movs r0, #1
80078ec: f7fd fd24 bl 8005338 <HAL_Delay>
(heth->Instance)->DMAOMR = tmpreg;
80078f0: 687b ldr r3, [r7, #4]
80078f2: 681a ldr r2, [r3, #0]
80078f4: f241 0318 movw r3, #4120 ; 0x1018
80078f8: 4413 add r3, r2
80078fa: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80078fe: 601a str r2, [r3, #0]
/* Set the RPBL and 4*PBL bits according to ETH RxDMABurstLength value */
/* Set the PBL and 4*PBL bits according to ETH TxDMABurstLength value */
/* Set the Enhanced DMA descriptors bit according to ETH EnhancedDescriptorFormat value*/
/* Set the DSL bit according to ETH DesciptorSkipLength value */
/* Set the PR and DA bits according to ETH DMAArbitration value */
(heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats |
8007900: 6afa ldr r2, [r7, #44] ; 0x2c
dmainit.FixedBurst |
8007902: 6b3b ldr r3, [r7, #48] ; 0x30
(heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats |
8007904: 431a orrs r2, r3
dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */
8007906: 6b7b ldr r3, [r7, #52] ; 0x34
dmainit.FixedBurst |
8007908: 431a orrs r2, r3
dmainit.TxDMABurstLength |
800790a: 6bbb ldr r3, [r7, #56] ; 0x38
dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */
800790c: 431a orrs r2, r3
dmainit.EnhancedDescriptorFormat |
800790e: 6bfb ldr r3, [r7, #60] ; 0x3c
dmainit.TxDMABurstLength |
8007910: 431a orrs r2, r3
(dmainit.DescriptorSkipLength << 2) |
8007912: 6c3b ldr r3, [r7, #64] ; 0x40
8007914: 009b lsls r3, r3, #2
dmainit.EnhancedDescriptorFormat |
8007916: 431a orrs r2, r3
dmainit.DMAArbitration |
8007918: 6c7b ldr r3, [r7, #68] ; 0x44
(dmainit.DescriptorSkipLength << 2) |
800791a: 431a orrs r2, r3
(heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats |
800791c: 687b ldr r3, [r7, #4]
800791e: 681b ldr r3, [r3, #0]
8007920: f442 0200 orr.w r2, r2, #8388608 ; 0x800000
8007924: f503 5380 add.w r3, r3, #4096 ; 0x1000
8007928: 601a str r2, [r3, #0]
ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->DMABMR;
800792a: 687b ldr r3, [r7, #4]
800792c: 681b ldr r3, [r3, #0]
800792e: f503 5380 add.w r3, r3, #4096 ; 0x1000
8007932: 681b ldr r3, [r3, #0]
8007934: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
8007938: 2001 movs r0, #1
800793a: f7fd fcfd bl 8005338 <HAL_Delay>
(heth->Instance)->DMABMR = tmpreg;
800793e: 687b ldr r3, [r7, #4]
8007940: 681b ldr r3, [r3, #0]
8007942: f503 5380 add.w r3, r3, #4096 ; 0x1000
8007946: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
800794a: 601a str r2, [r3, #0]
if((heth->Init).RxMode == ETH_RXINTERRUPT_MODE)
800794c: 687b ldr r3, [r7, #4]
800794e: 699b ldr r3, [r3, #24]
8007950: 2b01 cmp r3, #1
8007952: d10d bne.n 8007970 <ETH_MACDMAConfig+0x370>
{
/* Enable the Ethernet Rx Interrupt */
__HAL_ETH_DMA_ENABLE_IT((heth), ETH_DMA_IT_NIS | ETH_DMA_IT_R);
8007954: 687b ldr r3, [r7, #4]
8007956: 681a ldr r2, [r3, #0]
8007958: f241 031c movw r3, #4124 ; 0x101c
800795c: 4413 add r3, r2
800795e: 681b ldr r3, [r3, #0]
8007960: 687a ldr r2, [r7, #4]
8007962: 6811 ldr r1, [r2, #0]
8007964: 4a0a ldr r2, [pc, #40] ; (8007990 <ETH_MACDMAConfig+0x390>)
8007966: 431a orrs r2, r3
8007968: f241 031c movw r3, #4124 ; 0x101c
800796c: 440b add r3, r1
800796e: 601a str r2, [r3, #0]
}
/* Initialize MAC address in ethernet MAC */
ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr);
8007970: 687b ldr r3, [r7, #4]
8007972: 695b ldr r3, [r3, #20]
8007974: 461a mov r2, r3
8007976: 2100 movs r1, #0
8007978: 6878 ldr r0, [r7, #4]
800797a: f000 f80b bl 8007994 <ETH_MACAddressConfig>
}
800797e: bf00 nop
8007980: 37c0 adds r7, #192 ; 0xc0
8007982: 46bd mov sp, r7
8007984: bd80 pop {r7, pc}
8007986: bf00 nop
8007988: ff20810f .word 0xff20810f
800798c: f8de3f23 .word 0xf8de3f23
8007990: 00010040 .word 0x00010040
08007994 <ETH_MACAddressConfig>:
* @arg ETH_MAC_Address3: MAC Address3
* @param Addr Pointer to MAC address buffer data (6 bytes)
* @retval HAL status
*/
static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr)
{
8007994: b480 push {r7}
8007996: b087 sub sp, #28
8007998: af00 add r7, sp, #0
800799a: 60f8 str r0, [r7, #12]
800799c: 60b9 str r1, [r7, #8]
800799e: 607a str r2, [r7, #4]
/* Check the parameters */
assert_param(IS_ETH_MAC_ADDRESS0123(MacAddr));
/* Calculate the selected MAC address high register */
tmpreg = ((uint32_t)Addr[5] << 8) | (uint32_t)Addr[4];
80079a0: 687b ldr r3, [r7, #4]
80079a2: 3305 adds r3, #5
80079a4: 781b ldrb r3, [r3, #0]
80079a6: 021b lsls r3, r3, #8
80079a8: 687a ldr r2, [r7, #4]
80079aa: 3204 adds r2, #4
80079ac: 7812 ldrb r2, [r2, #0]
80079ae: 4313 orrs r3, r2
80079b0: 617b str r3, [r7, #20]
/* Load the selected MAC address high register */
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_HBASE + MacAddr))) = tmpreg;
80079b2: 68ba ldr r2, [r7, #8]
80079b4: 4b11 ldr r3, [pc, #68] ; (80079fc <ETH_MACAddressConfig+0x68>)
80079b6: 4413 add r3, r2
80079b8: 461a mov r2, r3
80079ba: 697b ldr r3, [r7, #20]
80079bc: 6013 str r3, [r2, #0]
/* Calculate the selected MAC address low register */
tmpreg = ((uint32_t)Addr[3] << 24) | ((uint32_t)Addr[2] << 16) | ((uint32_t)Addr[1] << 8) | Addr[0];
80079be: 687b ldr r3, [r7, #4]
80079c0: 3303 adds r3, #3
80079c2: 781b ldrb r3, [r3, #0]
80079c4: 061a lsls r2, r3, #24
80079c6: 687b ldr r3, [r7, #4]
80079c8: 3302 adds r3, #2
80079ca: 781b ldrb r3, [r3, #0]
80079cc: 041b lsls r3, r3, #16
80079ce: 431a orrs r2, r3
80079d0: 687b ldr r3, [r7, #4]
80079d2: 3301 adds r3, #1
80079d4: 781b ldrb r3, [r3, #0]
80079d6: 021b lsls r3, r3, #8
80079d8: 4313 orrs r3, r2
80079da: 687a ldr r2, [r7, #4]
80079dc: 7812 ldrb r2, [r2, #0]
80079de: 4313 orrs r3, r2
80079e0: 617b str r3, [r7, #20]
/* Load the selected MAC address low register */
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_LBASE + MacAddr))) = tmpreg;
80079e2: 68ba ldr r2, [r7, #8]
80079e4: 4b06 ldr r3, [pc, #24] ; (8007a00 <ETH_MACAddressConfig+0x6c>)
80079e6: 4413 add r3, r2
80079e8: 461a mov r2, r3
80079ea: 697b ldr r3, [r7, #20]
80079ec: 6013 str r3, [r2, #0]
}
80079ee: bf00 nop
80079f0: 371c adds r7, #28
80079f2: 46bd mov sp, r7
80079f4: f85d 7b04 ldr.w r7, [sp], #4
80079f8: 4770 bx lr
80079fa: bf00 nop
80079fc: 40028040 .word 0x40028040
8007a00: 40028044 .word 0x40028044
08007a04 <ETH_MACTransmissionEnable>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth)
{
8007a04: b580 push {r7, lr}
8007a06: b084 sub sp, #16
8007a08: af00 add r7, sp, #0
8007a0a: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8007a0c: 2300 movs r3, #0
8007a0e: 60fb str r3, [r7, #12]
/* Enable the MAC transmission */
(heth->Instance)->MACCR |= ETH_MACCR_TE;
8007a10: 687b ldr r3, [r7, #4]
8007a12: 681b ldr r3, [r3, #0]
8007a14: 681a ldr r2, [r3, #0]
8007a16: 687b ldr r3, [r7, #4]
8007a18: 681b ldr r3, [r3, #0]
8007a1a: f042 0208 orr.w r2, r2, #8
8007a1e: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACCR;
8007a20: 687b ldr r3, [r7, #4]
8007a22: 681b ldr r3, [r3, #0]
8007a24: 681b ldr r3, [r3, #0]
8007a26: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8007a28: 2001 movs r0, #1
8007a2a: f7fd fc85 bl 8005338 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
8007a2e: 687b ldr r3, [r7, #4]
8007a30: 681b ldr r3, [r3, #0]
8007a32: 68fa ldr r2, [r7, #12]
8007a34: 601a str r2, [r3, #0]
}
8007a36: bf00 nop
8007a38: 3710 adds r7, #16
8007a3a: 46bd mov sp, r7
8007a3c: bd80 pop {r7, pc}
08007a3e <ETH_MACTransmissionDisable>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth)
{
8007a3e: b580 push {r7, lr}
8007a40: b084 sub sp, #16
8007a42: af00 add r7, sp, #0
8007a44: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8007a46: 2300 movs r3, #0
8007a48: 60fb str r3, [r7, #12]
/* Disable the MAC transmission */
(heth->Instance)->MACCR &= ~ETH_MACCR_TE;
8007a4a: 687b ldr r3, [r7, #4]
8007a4c: 681b ldr r3, [r3, #0]
8007a4e: 681a ldr r2, [r3, #0]
8007a50: 687b ldr r3, [r7, #4]
8007a52: 681b ldr r3, [r3, #0]
8007a54: f022 0208 bic.w r2, r2, #8
8007a58: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACCR;
8007a5a: 687b ldr r3, [r7, #4]
8007a5c: 681b ldr r3, [r3, #0]
8007a5e: 681b ldr r3, [r3, #0]
8007a60: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8007a62: 2001 movs r0, #1
8007a64: f7fd fc68 bl 8005338 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
8007a68: 687b ldr r3, [r7, #4]
8007a6a: 681b ldr r3, [r3, #0]
8007a6c: 68fa ldr r2, [r7, #12]
8007a6e: 601a str r2, [r3, #0]
}
8007a70: bf00 nop
8007a72: 3710 adds r7, #16
8007a74: 46bd mov sp, r7
8007a76: bd80 pop {r7, pc}
08007a78 <ETH_MACReceptionEnable>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth)
{
8007a78: b580 push {r7, lr}
8007a7a: b084 sub sp, #16
8007a7c: af00 add r7, sp, #0
8007a7e: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8007a80: 2300 movs r3, #0
8007a82: 60fb str r3, [r7, #12]
/* Enable the MAC reception */
(heth->Instance)->MACCR |= ETH_MACCR_RE;
8007a84: 687b ldr r3, [r7, #4]
8007a86: 681b ldr r3, [r3, #0]
8007a88: 681a ldr r2, [r3, #0]
8007a8a: 687b ldr r3, [r7, #4]
8007a8c: 681b ldr r3, [r3, #0]
8007a8e: f042 0204 orr.w r2, r2, #4
8007a92: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACCR;
8007a94: 687b ldr r3, [r7, #4]
8007a96: 681b ldr r3, [r3, #0]
8007a98: 681b ldr r3, [r3, #0]
8007a9a: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8007a9c: 2001 movs r0, #1
8007a9e: f7fd fc4b bl 8005338 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
8007aa2: 687b ldr r3, [r7, #4]
8007aa4: 681b ldr r3, [r3, #0]
8007aa6: 68fa ldr r2, [r7, #12]
8007aa8: 601a str r2, [r3, #0]
}
8007aaa: bf00 nop
8007aac: 3710 adds r7, #16
8007aae: 46bd mov sp, r7
8007ab0: bd80 pop {r7, pc}
08007ab2 <ETH_MACReceptionDisable>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth)
{
8007ab2: b580 push {r7, lr}
8007ab4: b084 sub sp, #16
8007ab6: af00 add r7, sp, #0
8007ab8: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8007aba: 2300 movs r3, #0
8007abc: 60fb str r3, [r7, #12]
/* Disable the MAC reception */
(heth->Instance)->MACCR &= ~ETH_MACCR_RE;
8007abe: 687b ldr r3, [r7, #4]
8007ac0: 681b ldr r3, [r3, #0]
8007ac2: 681a ldr r2, [r3, #0]
8007ac4: 687b ldr r3, [r7, #4]
8007ac6: 681b ldr r3, [r3, #0]
8007ac8: f022 0204 bic.w r2, r2, #4
8007acc: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->MACCR;
8007ace: 687b ldr r3, [r7, #4]
8007ad0: 681b ldr r3, [r3, #0]
8007ad2: 681b ldr r3, [r3, #0]
8007ad4: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8007ad6: 2001 movs r0, #1
8007ad8: f7fd fc2e bl 8005338 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
8007adc: 687b ldr r3, [r7, #4]
8007ade: 681b ldr r3, [r3, #0]
8007ae0: 68fa ldr r2, [r7, #12]
8007ae2: 601a str r2, [r3, #0]
}
8007ae4: bf00 nop
8007ae6: 3710 adds r7, #16
8007ae8: 46bd mov sp, r7
8007aea: bd80 pop {r7, pc}
08007aec <ETH_DMATransmissionEnable>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth)
{
8007aec: b480 push {r7}
8007aee: b083 sub sp, #12
8007af0: af00 add r7, sp, #0
8007af2: 6078 str r0, [r7, #4]
/* Enable the DMA transmission */
(heth->Instance)->DMAOMR |= ETH_DMAOMR_ST;
8007af4: 687b ldr r3, [r7, #4]
8007af6: 681a ldr r2, [r3, #0]
8007af8: f241 0318 movw r3, #4120 ; 0x1018
8007afc: 4413 add r3, r2
8007afe: 681b ldr r3, [r3, #0]
8007b00: 687a ldr r2, [r7, #4]
8007b02: 6811 ldr r1, [r2, #0]
8007b04: f443 5200 orr.w r2, r3, #8192 ; 0x2000
8007b08: f241 0318 movw r3, #4120 ; 0x1018
8007b0c: 440b add r3, r1
8007b0e: 601a str r2, [r3, #0]
}
8007b10: bf00 nop
8007b12: 370c adds r7, #12
8007b14: 46bd mov sp, r7
8007b16: f85d 7b04 ldr.w r7, [sp], #4
8007b1a: 4770 bx lr
08007b1c <ETH_DMATransmissionDisable>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth)
{
8007b1c: b480 push {r7}
8007b1e: b083 sub sp, #12
8007b20: af00 add r7, sp, #0
8007b22: 6078 str r0, [r7, #4]
/* Disable the DMA transmission */
(heth->Instance)->DMAOMR &= ~ETH_DMAOMR_ST;
8007b24: 687b ldr r3, [r7, #4]
8007b26: 681a ldr r2, [r3, #0]
8007b28: f241 0318 movw r3, #4120 ; 0x1018
8007b2c: 4413 add r3, r2
8007b2e: 681b ldr r3, [r3, #0]
8007b30: 687a ldr r2, [r7, #4]
8007b32: 6811 ldr r1, [r2, #0]
8007b34: f423 5200 bic.w r2, r3, #8192 ; 0x2000
8007b38: f241 0318 movw r3, #4120 ; 0x1018
8007b3c: 440b add r3, r1
8007b3e: 601a str r2, [r3, #0]
}
8007b40: bf00 nop
8007b42: 370c adds r7, #12
8007b44: 46bd mov sp, r7
8007b46: f85d 7b04 ldr.w r7, [sp], #4
8007b4a: 4770 bx lr
08007b4c <ETH_DMAReceptionEnable>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth)
{
8007b4c: b480 push {r7}
8007b4e: b083 sub sp, #12
8007b50: af00 add r7, sp, #0
8007b52: 6078 str r0, [r7, #4]
/* Enable the DMA reception */
(heth->Instance)->DMAOMR |= ETH_DMAOMR_SR;
8007b54: 687b ldr r3, [r7, #4]
8007b56: 681a ldr r2, [r3, #0]
8007b58: f241 0318 movw r3, #4120 ; 0x1018
8007b5c: 4413 add r3, r2
8007b5e: 681b ldr r3, [r3, #0]
8007b60: 687a ldr r2, [r7, #4]
8007b62: 6811 ldr r1, [r2, #0]
8007b64: f043 0202 orr.w r2, r3, #2
8007b68: f241 0318 movw r3, #4120 ; 0x1018
8007b6c: 440b add r3, r1
8007b6e: 601a str r2, [r3, #0]
}
8007b70: bf00 nop
8007b72: 370c adds r7, #12
8007b74: 46bd mov sp, r7
8007b76: f85d 7b04 ldr.w r7, [sp], #4
8007b7a: 4770 bx lr
08007b7c <ETH_DMAReceptionDisable>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth)
{
8007b7c: b480 push {r7}
8007b7e: b083 sub sp, #12
8007b80: af00 add r7, sp, #0
8007b82: 6078 str r0, [r7, #4]
/* Disable the DMA reception */
(heth->Instance)->DMAOMR &= ~ETH_DMAOMR_SR;
8007b84: 687b ldr r3, [r7, #4]
8007b86: 681a ldr r2, [r3, #0]
8007b88: f241 0318 movw r3, #4120 ; 0x1018
8007b8c: 4413 add r3, r2
8007b8e: 681b ldr r3, [r3, #0]
8007b90: 687a ldr r2, [r7, #4]
8007b92: 6811 ldr r1, [r2, #0]
8007b94: f023 0202 bic.w r2, r3, #2
8007b98: f241 0318 movw r3, #4120 ; 0x1018
8007b9c: 440b add r3, r1
8007b9e: 601a str r2, [r3, #0]
}
8007ba0: bf00 nop
8007ba2: 370c adds r7, #12
8007ba4: 46bd mov sp, r7
8007ba6: f85d 7b04 ldr.w r7, [sp], #4
8007baa: 4770 bx lr
08007bac <ETH_FlushTransmitFIFO>:
* @param heth pointer to a ETH_HandleTypeDef structure that contains
* the configuration information for ETHERNET module
* @retval None
*/
static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth)
{
8007bac: b580 push {r7, lr}
8007bae: b084 sub sp, #16
8007bb0: af00 add r7, sp, #0
8007bb2: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8007bb4: 2300 movs r3, #0
8007bb6: 60fb str r3, [r7, #12]
/* Set the Flush Transmit FIFO bit */
(heth->Instance)->DMAOMR |= ETH_DMAOMR_FTF;
8007bb8: 687b ldr r3, [r7, #4]
8007bba: 681a ldr r2, [r3, #0]
8007bbc: f241 0318 movw r3, #4120 ; 0x1018
8007bc0: 4413 add r3, r2
8007bc2: 681b ldr r3, [r3, #0]
8007bc4: 687a ldr r2, [r7, #4]
8007bc6: 6811 ldr r1, [r2, #0]
8007bc8: f443 1280 orr.w r2, r3, #1048576 ; 0x100000
8007bcc: f241 0318 movw r3, #4120 ; 0x1018
8007bd0: 440b add r3, r1
8007bd2: 601a str r2, [r3, #0]
/* Wait until the write operation will be taken into account:
at least four TX_CLK/RX_CLK clock cycles */
tmpreg = (heth->Instance)->DMAOMR;
8007bd4: 687b ldr r3, [r7, #4]
8007bd6: 681a ldr r2, [r3, #0]
8007bd8: f241 0318 movw r3, #4120 ; 0x1018
8007bdc: 4413 add r3, r2
8007bde: 681b ldr r3, [r3, #0]
8007be0: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8007be2: 2001 movs r0, #1
8007be4: f7fd fba8 bl 8005338 <HAL_Delay>
(heth->Instance)->DMAOMR = tmpreg;
8007be8: 687b ldr r3, [r7, #4]
8007bea: 6819 ldr r1, [r3, #0]
8007bec: 68fa ldr r2, [r7, #12]
8007bee: f241 0318 movw r3, #4120 ; 0x1018
8007bf2: 440b add r3, r1
8007bf4: 601a str r2, [r3, #0]
}
8007bf6: bf00 nop
8007bf8: 3710 adds r7, #16
8007bfa: 46bd mov sp, r7
8007bfc: bd80 pop {r7, pc}
...
08007c00 <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)
{
8007c00: b480 push {r7}
8007c02: b089 sub sp, #36 ; 0x24
8007c04: af00 add r7, sp, #0
8007c06: 6078 str r0, [r7, #4]
8007c08: 6039 str r1, [r7, #0]
uint32_t position = 0x00;
8007c0a: 2300 movs r3, #0
8007c0c: 61fb str r3, [r7, #28]
uint32_t ioposition = 0x00;
8007c0e: 2300 movs r3, #0
8007c10: 617b str r3, [r7, #20]
uint32_t iocurrent = 0x00;
8007c12: 2300 movs r3, #0
8007c14: 613b str r3, [r7, #16]
uint32_t temp = 0x00;
8007c16: 2300 movs r3, #0
8007c18: 61bb str r3, [r7, #24]
assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
/* Configure the port pins */
for(position = 0; position < GPIO_NUMBER; position++)
8007c1a: 2300 movs r3, #0
8007c1c: 61fb str r3, [r7, #28]
8007c1e: e175 b.n 8007f0c <HAL_GPIO_Init+0x30c>
{
/* Get the IO position */
ioposition = ((uint32_t)0x01) << position;
8007c20: 2201 movs r2, #1
8007c22: 69fb ldr r3, [r7, #28]
8007c24: fa02 f303 lsl.w r3, r2, r3
8007c28: 617b str r3, [r7, #20]
/* Get the current IO position */
iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
8007c2a: 683b ldr r3, [r7, #0]
8007c2c: 681b ldr r3, [r3, #0]
8007c2e: 697a ldr r2, [r7, #20]
8007c30: 4013 ands r3, r2
8007c32: 613b str r3, [r7, #16]
if(iocurrent == ioposition)
8007c34: 693a ldr r2, [r7, #16]
8007c36: 697b ldr r3, [r7, #20]
8007c38: 429a cmp r2, r3
8007c3a: f040 8164 bne.w 8007f06 <HAL_GPIO_Init+0x306>
{
/*--------------------- GPIO Mode Configuration ------------------------*/
/* In case of Output or Alternate function mode selection */
if((GPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_PP) ||
8007c3e: 683b ldr r3, [r7, #0]
8007c40: 685b ldr r3, [r3, #4]
8007c42: 2b01 cmp r3, #1
8007c44: d00b beq.n 8007c5e <HAL_GPIO_Init+0x5e>
8007c46: 683b ldr r3, [r7, #0]
8007c48: 685b ldr r3, [r3, #4]
8007c4a: 2b02 cmp r3, #2
8007c4c: d007 beq.n 8007c5e <HAL_GPIO_Init+0x5e>
(GPIO_Init->Mode == GPIO_MODE_OUTPUT_OD) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
8007c4e: 683b ldr r3, [r7, #0]
8007c50: 685b ldr r3, [r3, #4]
if((GPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_PP) ||
8007c52: 2b11 cmp r3, #17
8007c54: d003 beq.n 8007c5e <HAL_GPIO_Init+0x5e>
(GPIO_Init->Mode == GPIO_MODE_OUTPUT_OD) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
8007c56: 683b ldr r3, [r7, #0]
8007c58: 685b ldr r3, [r3, #4]
8007c5a: 2b12 cmp r3, #18
8007c5c: d130 bne.n 8007cc0 <HAL_GPIO_Init+0xc0>
{
/* Check the Speed parameter */
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
/* Configure the IO Speed */
temp = GPIOx->OSPEEDR;
8007c5e: 687b ldr r3, [r7, #4]
8007c60: 689b ldr r3, [r3, #8]
8007c62: 61bb str r3, [r7, #24]
temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2));
8007c64: 69fb ldr r3, [r7, #28]
8007c66: 005b lsls r3, r3, #1
8007c68: 2203 movs r2, #3
8007c6a: fa02 f303 lsl.w r3, r2, r3
8007c6e: 43db mvns r3, r3
8007c70: 69ba ldr r2, [r7, #24]
8007c72: 4013 ands r3, r2
8007c74: 61bb str r3, [r7, #24]
temp |= (GPIO_Init->Speed << (position * 2));
8007c76: 683b ldr r3, [r7, #0]
8007c78: 68da ldr r2, [r3, #12]
8007c7a: 69fb ldr r3, [r7, #28]
8007c7c: 005b lsls r3, r3, #1
8007c7e: fa02 f303 lsl.w r3, r2, r3
8007c82: 69ba ldr r2, [r7, #24]
8007c84: 4313 orrs r3, r2
8007c86: 61bb str r3, [r7, #24]
GPIOx->OSPEEDR = temp;
8007c88: 687b ldr r3, [r7, #4]
8007c8a: 69ba ldr r2, [r7, #24]
8007c8c: 609a str r2, [r3, #8]
/* Configure the IO Output Type */
temp = GPIOx->OTYPER;
8007c8e: 687b ldr r3, [r7, #4]
8007c90: 685b ldr r3, [r3, #4]
8007c92: 61bb str r3, [r7, #24]
temp &= ~(GPIO_OTYPER_OT_0 << position) ;
8007c94: 2201 movs r2, #1
8007c96: 69fb ldr r3, [r7, #28]
8007c98: fa02 f303 lsl.w r3, r2, r3
8007c9c: 43db mvns r3, r3
8007c9e: 69ba ldr r2, [r7, #24]
8007ca0: 4013 ands r3, r2
8007ca2: 61bb str r3, [r7, #24]
temp |= (((GPIO_Init->Mode & GPIO_OUTPUT_TYPE) >> 4) << position);
8007ca4: 683b ldr r3, [r7, #0]
8007ca6: 685b ldr r3, [r3, #4]
8007ca8: 091b lsrs r3, r3, #4
8007caa: f003 0201 and.w r2, r3, #1
8007cae: 69fb ldr r3, [r7, #28]
8007cb0: fa02 f303 lsl.w r3, r2, r3
8007cb4: 69ba ldr r2, [r7, #24]
8007cb6: 4313 orrs r3, r2
8007cb8: 61bb str r3, [r7, #24]
GPIOx->OTYPER = temp;
8007cba: 687b ldr r3, [r7, #4]
8007cbc: 69ba ldr r2, [r7, #24]
8007cbe: 605a str r2, [r3, #4]
}
/* Activate the Pull-up or Pull down resistor for the current IO */
temp = GPIOx->PUPDR;
8007cc0: 687b ldr r3, [r7, #4]
8007cc2: 68db ldr r3, [r3, #12]
8007cc4: 61bb str r3, [r7, #24]
temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2));
8007cc6: 69fb ldr r3, [r7, #28]
8007cc8: 005b lsls r3, r3, #1
8007cca: 2203 movs r2, #3
8007ccc: fa02 f303 lsl.w r3, r2, r3
8007cd0: 43db mvns r3, r3
8007cd2: 69ba ldr r2, [r7, #24]
8007cd4: 4013 ands r3, r2
8007cd6: 61bb str r3, [r7, #24]
temp |= ((GPIO_Init->Pull) << (position * 2));
8007cd8: 683b ldr r3, [r7, #0]
8007cda: 689a ldr r2, [r3, #8]
8007cdc: 69fb ldr r3, [r7, #28]
8007cde: 005b lsls r3, r3, #1
8007ce0: fa02 f303 lsl.w r3, r2, r3
8007ce4: 69ba ldr r2, [r7, #24]
8007ce6: 4313 orrs r3, r2
8007ce8: 61bb str r3, [r7, #24]
GPIOx->PUPDR = temp;
8007cea: 687b ldr r3, [r7, #4]
8007cec: 69ba ldr r2, [r7, #24]
8007cee: 60da str r2, [r3, #12]
/* In case of Alternate function mode selection */
if((GPIO_Init->Mode == GPIO_MODE_AF_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
8007cf0: 683b ldr r3, [r7, #0]
8007cf2: 685b ldr r3, [r3, #4]
8007cf4: 2b02 cmp r3, #2
8007cf6: d003 beq.n 8007d00 <HAL_GPIO_Init+0x100>
8007cf8: 683b ldr r3, [r7, #0]
8007cfa: 685b ldr r3, [r3, #4]
8007cfc: 2b12 cmp r3, #18
8007cfe: d123 bne.n 8007d48 <HAL_GPIO_Init+0x148>
{
/* Check the Alternate function parameter */
assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
/* Configure Alternate function mapped with the current IO */
temp = GPIOx->AFR[position >> 3];
8007d00: 69fb ldr r3, [r7, #28]
8007d02: 08da lsrs r2, r3, #3
8007d04: 687b ldr r3, [r7, #4]
8007d06: 3208 adds r2, #8
8007d08: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8007d0c: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)0xF << ((uint32_t)(position & (uint32_t)0x07) * 4)) ;
8007d0e: 69fb ldr r3, [r7, #28]
8007d10: f003 0307 and.w r3, r3, #7
8007d14: 009b lsls r3, r3, #2
8007d16: 220f movs r2, #15
8007d18: fa02 f303 lsl.w r3, r2, r3
8007d1c: 43db mvns r3, r3
8007d1e: 69ba ldr r2, [r7, #24]
8007d20: 4013 ands r3, r2
8007d22: 61bb str r3, [r7, #24]
temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & (uint32_t)0x07) * 4));
8007d24: 683b ldr r3, [r7, #0]
8007d26: 691a ldr r2, [r3, #16]
8007d28: 69fb ldr r3, [r7, #28]
8007d2a: f003 0307 and.w r3, r3, #7
8007d2e: 009b lsls r3, r3, #2
8007d30: fa02 f303 lsl.w r3, r2, r3
8007d34: 69ba ldr r2, [r7, #24]
8007d36: 4313 orrs r3, r2
8007d38: 61bb str r3, [r7, #24]
GPIOx->AFR[position >> 3] = temp;
8007d3a: 69fb ldr r3, [r7, #28]
8007d3c: 08da lsrs r2, r3, #3
8007d3e: 687b ldr r3, [r7, #4]
8007d40: 3208 adds r2, #8
8007d42: 69b9 ldr r1, [r7, #24]
8007d44: f843 1022 str.w r1, [r3, r2, lsl #2]
}
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
temp = GPIOx->MODER;
8007d48: 687b ldr r3, [r7, #4]
8007d4a: 681b ldr r3, [r3, #0]
8007d4c: 61bb str r3, [r7, #24]
temp &= ~(GPIO_MODER_MODER0 << (position * 2));
8007d4e: 69fb ldr r3, [r7, #28]
8007d50: 005b lsls r3, r3, #1
8007d52: 2203 movs r2, #3
8007d54: fa02 f303 lsl.w r3, r2, r3
8007d58: 43db mvns r3, r3
8007d5a: 69ba ldr r2, [r7, #24]
8007d5c: 4013 ands r3, r2
8007d5e: 61bb str r3, [r7, #24]
temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2));
8007d60: 683b ldr r3, [r7, #0]
8007d62: 685b ldr r3, [r3, #4]
8007d64: f003 0203 and.w r2, r3, #3
8007d68: 69fb ldr r3, [r7, #28]
8007d6a: 005b lsls r3, r3, #1
8007d6c: fa02 f303 lsl.w r3, r2, r3
8007d70: 69ba ldr r2, [r7, #24]
8007d72: 4313 orrs r3, r2
8007d74: 61bb str r3, [r7, #24]
GPIOx->MODER = temp;
8007d76: 687b ldr r3, [r7, #4]
8007d78: 69ba ldr r2, [r7, #24]
8007d7a: 601a str r2, [r3, #0]
/*--------------------- EXTI Mode Configuration ------------------------*/
/* Configure the External Interrupt or event for the current IO */
if((GPIO_Init->Mode & EXTI_MODE) == EXTI_MODE)
8007d7c: 683b ldr r3, [r7, #0]
8007d7e: 685b ldr r3, [r3, #4]
8007d80: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8007d84: 2b00 cmp r3, #0
8007d86: f000 80be beq.w 8007f06 <HAL_GPIO_Init+0x306>
{
/* Enable SYSCFG Clock */
__HAL_RCC_SYSCFG_CLK_ENABLE();
8007d8a: 4b65 ldr r3, [pc, #404] ; (8007f20 <HAL_GPIO_Init+0x320>)
8007d8c: 6c5b ldr r3, [r3, #68] ; 0x44
8007d8e: 4a64 ldr r2, [pc, #400] ; (8007f20 <HAL_GPIO_Init+0x320>)
8007d90: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8007d94: 6453 str r3, [r2, #68] ; 0x44
8007d96: 4b62 ldr r3, [pc, #392] ; (8007f20 <HAL_GPIO_Init+0x320>)
8007d98: 6c5b ldr r3, [r3, #68] ; 0x44
8007d9a: f403 4380 and.w r3, r3, #16384 ; 0x4000
8007d9e: 60fb str r3, [r7, #12]
8007da0: 68fb ldr r3, [r7, #12]
temp = SYSCFG->EXTICR[position >> 2];
8007da2: 4a60 ldr r2, [pc, #384] ; (8007f24 <HAL_GPIO_Init+0x324>)
8007da4: 69fb ldr r3, [r7, #28]
8007da6: 089b lsrs r3, r3, #2
8007da8: 3302 adds r3, #2
8007daa: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8007dae: 61bb str r3, [r7, #24]
temp &= ~(((uint32_t)0x0F) << (4 * (position & 0x03)));
8007db0: 69fb ldr r3, [r7, #28]
8007db2: f003 0303 and.w r3, r3, #3
8007db6: 009b lsls r3, r3, #2
8007db8: 220f movs r2, #15
8007dba: fa02 f303 lsl.w r3, r2, r3
8007dbe: 43db mvns r3, r3
8007dc0: 69ba ldr r2, [r7, #24]
8007dc2: 4013 ands r3, r2
8007dc4: 61bb str r3, [r7, #24]
temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4 * (position & 0x03)));
8007dc6: 687b ldr r3, [r7, #4]
8007dc8: 4a57 ldr r2, [pc, #348] ; (8007f28 <HAL_GPIO_Init+0x328>)
8007dca: 4293 cmp r3, r2
8007dcc: d037 beq.n 8007e3e <HAL_GPIO_Init+0x23e>
8007dce: 687b ldr r3, [r7, #4]
8007dd0: 4a56 ldr r2, [pc, #344] ; (8007f2c <HAL_GPIO_Init+0x32c>)
8007dd2: 4293 cmp r3, r2
8007dd4: d031 beq.n 8007e3a <HAL_GPIO_Init+0x23a>
8007dd6: 687b ldr r3, [r7, #4]
8007dd8: 4a55 ldr r2, [pc, #340] ; (8007f30 <HAL_GPIO_Init+0x330>)
8007dda: 4293 cmp r3, r2
8007ddc: d02b beq.n 8007e36 <HAL_GPIO_Init+0x236>
8007dde: 687b ldr r3, [r7, #4]
8007de0: 4a54 ldr r2, [pc, #336] ; (8007f34 <HAL_GPIO_Init+0x334>)
8007de2: 4293 cmp r3, r2
8007de4: d025 beq.n 8007e32 <HAL_GPIO_Init+0x232>
8007de6: 687b ldr r3, [r7, #4]
8007de8: 4a53 ldr r2, [pc, #332] ; (8007f38 <HAL_GPIO_Init+0x338>)
8007dea: 4293 cmp r3, r2
8007dec: d01f beq.n 8007e2e <HAL_GPIO_Init+0x22e>
8007dee: 687b ldr r3, [r7, #4]
8007df0: 4a52 ldr r2, [pc, #328] ; (8007f3c <HAL_GPIO_Init+0x33c>)
8007df2: 4293 cmp r3, r2
8007df4: d019 beq.n 8007e2a <HAL_GPIO_Init+0x22a>
8007df6: 687b ldr r3, [r7, #4]
8007df8: 4a51 ldr r2, [pc, #324] ; (8007f40 <HAL_GPIO_Init+0x340>)
8007dfa: 4293 cmp r3, r2
8007dfc: d013 beq.n 8007e26 <HAL_GPIO_Init+0x226>
8007dfe: 687b ldr r3, [r7, #4]
8007e00: 4a50 ldr r2, [pc, #320] ; (8007f44 <HAL_GPIO_Init+0x344>)
8007e02: 4293 cmp r3, r2
8007e04: d00d beq.n 8007e22 <HAL_GPIO_Init+0x222>
8007e06: 687b ldr r3, [r7, #4]
8007e08: 4a4f ldr r2, [pc, #316] ; (8007f48 <HAL_GPIO_Init+0x348>)
8007e0a: 4293 cmp r3, r2
8007e0c: d007 beq.n 8007e1e <HAL_GPIO_Init+0x21e>
8007e0e: 687b ldr r3, [r7, #4]
8007e10: 4a4e ldr r2, [pc, #312] ; (8007f4c <HAL_GPIO_Init+0x34c>)
8007e12: 4293 cmp r3, r2
8007e14: d101 bne.n 8007e1a <HAL_GPIO_Init+0x21a>
8007e16: 2309 movs r3, #9
8007e18: e012 b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e1a: 230a movs r3, #10
8007e1c: e010 b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e1e: 2308 movs r3, #8
8007e20: e00e b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e22: 2307 movs r3, #7
8007e24: e00c b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e26: 2306 movs r3, #6
8007e28: e00a b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e2a: 2305 movs r3, #5
8007e2c: e008 b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e2e: 2304 movs r3, #4
8007e30: e006 b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e32: 2303 movs r3, #3
8007e34: e004 b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e36: 2302 movs r3, #2
8007e38: e002 b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e3a: 2301 movs r3, #1
8007e3c: e000 b.n 8007e40 <HAL_GPIO_Init+0x240>
8007e3e: 2300 movs r3, #0
8007e40: 69fa ldr r2, [r7, #28]
8007e42: f002 0203 and.w r2, r2, #3
8007e46: 0092 lsls r2, r2, #2
8007e48: 4093 lsls r3, r2
8007e4a: 69ba ldr r2, [r7, #24]
8007e4c: 4313 orrs r3, r2
8007e4e: 61bb str r3, [r7, #24]
SYSCFG->EXTICR[position >> 2] = temp;
8007e50: 4934 ldr r1, [pc, #208] ; (8007f24 <HAL_GPIO_Init+0x324>)
8007e52: 69fb ldr r3, [r7, #28]
8007e54: 089b lsrs r3, r3, #2
8007e56: 3302 adds r3, #2
8007e58: 69ba ldr r2, [r7, #24]
8007e5a: f841 2023 str.w r2, [r1, r3, lsl #2]
/* Clear EXTI line configuration */
temp = EXTI->IMR;
8007e5e: 4b3c ldr r3, [pc, #240] ; (8007f50 <HAL_GPIO_Init+0x350>)
8007e60: 681b ldr r3, [r3, #0]
8007e62: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8007e64: 693b ldr r3, [r7, #16]
8007e66: 43db mvns r3, r3
8007e68: 69ba ldr r2, [r7, #24]
8007e6a: 4013 ands r3, r2
8007e6c: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT)
8007e6e: 683b ldr r3, [r7, #0]
8007e70: 685b ldr r3, [r3, #4]
8007e72: f403 3380 and.w r3, r3, #65536 ; 0x10000
8007e76: 2b00 cmp r3, #0
8007e78: d003 beq.n 8007e82 <HAL_GPIO_Init+0x282>
{
temp |= iocurrent;
8007e7a: 69ba ldr r2, [r7, #24]
8007e7c: 693b ldr r3, [r7, #16]
8007e7e: 4313 orrs r3, r2
8007e80: 61bb str r3, [r7, #24]
}
EXTI->IMR = temp;
8007e82: 4a33 ldr r2, [pc, #204] ; (8007f50 <HAL_GPIO_Init+0x350>)
8007e84: 69bb ldr r3, [r7, #24]
8007e86: 6013 str r3, [r2, #0]
temp = EXTI->EMR;
8007e88: 4b31 ldr r3, [pc, #196] ; (8007f50 <HAL_GPIO_Init+0x350>)
8007e8a: 685b ldr r3, [r3, #4]
8007e8c: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8007e8e: 693b ldr r3, [r7, #16]
8007e90: 43db mvns r3, r3
8007e92: 69ba ldr r2, [r7, #24]
8007e94: 4013 ands r3, r2
8007e96: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT)
8007e98: 683b ldr r3, [r7, #0]
8007e9a: 685b ldr r3, [r3, #4]
8007e9c: f403 3300 and.w r3, r3, #131072 ; 0x20000
8007ea0: 2b00 cmp r3, #0
8007ea2: d003 beq.n 8007eac <HAL_GPIO_Init+0x2ac>
{
temp |= iocurrent;
8007ea4: 69ba ldr r2, [r7, #24]
8007ea6: 693b ldr r3, [r7, #16]
8007ea8: 4313 orrs r3, r2
8007eaa: 61bb str r3, [r7, #24]
}
EXTI->EMR = temp;
8007eac: 4a28 ldr r2, [pc, #160] ; (8007f50 <HAL_GPIO_Init+0x350>)
8007eae: 69bb ldr r3, [r7, #24]
8007eb0: 6053 str r3, [r2, #4]
/* Clear Rising Falling edge configuration */
temp = EXTI->RTSR;
8007eb2: 4b27 ldr r3, [pc, #156] ; (8007f50 <HAL_GPIO_Init+0x350>)
8007eb4: 689b ldr r3, [r3, #8]
8007eb6: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8007eb8: 693b ldr r3, [r7, #16]
8007eba: 43db mvns r3, r3
8007ebc: 69ba ldr r2, [r7, #24]
8007ebe: 4013 ands r3, r2
8007ec0: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & RISING_EDGE) == RISING_EDGE)
8007ec2: 683b ldr r3, [r7, #0]
8007ec4: 685b ldr r3, [r3, #4]
8007ec6: f403 1380 and.w r3, r3, #1048576 ; 0x100000
8007eca: 2b00 cmp r3, #0
8007ecc: d003 beq.n 8007ed6 <HAL_GPIO_Init+0x2d6>
{
temp |= iocurrent;
8007ece: 69ba ldr r2, [r7, #24]
8007ed0: 693b ldr r3, [r7, #16]
8007ed2: 4313 orrs r3, r2
8007ed4: 61bb str r3, [r7, #24]
}
EXTI->RTSR = temp;
8007ed6: 4a1e ldr r2, [pc, #120] ; (8007f50 <HAL_GPIO_Init+0x350>)
8007ed8: 69bb ldr r3, [r7, #24]
8007eda: 6093 str r3, [r2, #8]
temp = EXTI->FTSR;
8007edc: 4b1c ldr r3, [pc, #112] ; (8007f50 <HAL_GPIO_Init+0x350>)
8007ede: 68db ldr r3, [r3, #12]
8007ee0: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8007ee2: 693b ldr r3, [r7, #16]
8007ee4: 43db mvns r3, r3
8007ee6: 69ba ldr r2, [r7, #24]
8007ee8: 4013 ands r3, r2
8007eea: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE)
8007eec: 683b ldr r3, [r7, #0]
8007eee: 685b ldr r3, [r3, #4]
8007ef0: f403 1300 and.w r3, r3, #2097152 ; 0x200000
8007ef4: 2b00 cmp r3, #0
8007ef6: d003 beq.n 8007f00 <HAL_GPIO_Init+0x300>
{
temp |= iocurrent;
8007ef8: 69ba ldr r2, [r7, #24]
8007efa: 693b ldr r3, [r7, #16]
8007efc: 4313 orrs r3, r2
8007efe: 61bb str r3, [r7, #24]
}
EXTI->FTSR = temp;
8007f00: 4a13 ldr r2, [pc, #76] ; (8007f50 <HAL_GPIO_Init+0x350>)
8007f02: 69bb ldr r3, [r7, #24]
8007f04: 60d3 str r3, [r2, #12]
for(position = 0; position < GPIO_NUMBER; position++)
8007f06: 69fb ldr r3, [r7, #28]
8007f08: 3301 adds r3, #1
8007f0a: 61fb str r3, [r7, #28]
8007f0c: 69fb ldr r3, [r7, #28]
8007f0e: 2b0f cmp r3, #15
8007f10: f67f ae86 bls.w 8007c20 <HAL_GPIO_Init+0x20>
}
}
}
}
8007f14: bf00 nop
8007f16: 3724 adds r7, #36 ; 0x24
8007f18: 46bd mov sp, r7
8007f1a: f85d 7b04 ldr.w r7, [sp], #4
8007f1e: 4770 bx lr
8007f20: 40023800 .word 0x40023800
8007f24: 40013800 .word 0x40013800
8007f28: 40020000 .word 0x40020000
8007f2c: 40020400 .word 0x40020400
8007f30: 40020800 .word 0x40020800
8007f34: 40020c00 .word 0x40020c00
8007f38: 40021000 .word 0x40021000
8007f3c: 40021400 .word 0x40021400
8007f40: 40021800 .word 0x40021800
8007f44: 40021c00 .word 0x40021c00
8007f48: 40022000 .word 0x40022000
8007f4c: 40022400 .word 0x40022400
8007f50: 40013c00 .word 0x40013c00
08007f54 <HAL_GPIO_DeInit>:
* @param GPIO_Pin specifies the port bit to be written.
* This parameter can be one of GPIO_PIN_x where x can be (0..15).
* @retval None
*/
void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
{
8007f54: b480 push {r7}
8007f56: b087 sub sp, #28
8007f58: af00 add r7, sp, #0
8007f5a: 6078 str r0, [r7, #4]
8007f5c: 6039 str r1, [r7, #0]
uint32_t position;
uint32_t ioposition = 0x00;
8007f5e: 2300 movs r3, #0
8007f60: 613b str r3, [r7, #16]
uint32_t iocurrent = 0x00;
8007f62: 2300 movs r3, #0
8007f64: 60fb str r3, [r7, #12]
uint32_t tmp = 0x00;
8007f66: 2300 movs r3, #0
8007f68: 60bb str r3, [r7, #8]
/* Check the parameters */
assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
/* Configure the port pins */
for(position = 0; position < GPIO_NUMBER; position++)
8007f6a: 2300 movs r3, #0
8007f6c: 617b str r3, [r7, #20]
8007f6e: e0d9 b.n 8008124 <HAL_GPIO_DeInit+0x1d0>
{
/* Get the IO position */
ioposition = ((uint32_t)0x01) << position;
8007f70: 2201 movs r2, #1
8007f72: 697b ldr r3, [r7, #20]
8007f74: fa02 f303 lsl.w r3, r2, r3
8007f78: 613b str r3, [r7, #16]
/* Get the current IO position */
iocurrent = (GPIO_Pin) & ioposition;
8007f7a: 683a ldr r2, [r7, #0]
8007f7c: 693b ldr r3, [r7, #16]
8007f7e: 4013 ands r3, r2
8007f80: 60fb str r3, [r7, #12]
if(iocurrent == ioposition)
8007f82: 68fa ldr r2, [r7, #12]
8007f84: 693b ldr r3, [r7, #16]
8007f86: 429a cmp r2, r3
8007f88: f040 80c9 bne.w 800811e <HAL_GPIO_DeInit+0x1ca>
{
/*------------------------- EXTI Mode Configuration --------------------*/
tmp = SYSCFG->EXTICR[position >> 2];
8007f8c: 4a6a ldr r2, [pc, #424] ; (8008138 <HAL_GPIO_DeInit+0x1e4>)
8007f8e: 697b ldr r3, [r7, #20]
8007f90: 089b lsrs r3, r3, #2
8007f92: 3302 adds r3, #2
8007f94: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8007f98: 60bb str r3, [r7, #8]
tmp &= (((uint32_t)0x0F) << (4 * (position & 0x03)));
8007f9a: 697b ldr r3, [r7, #20]
8007f9c: f003 0303 and.w r3, r3, #3
8007fa0: 009b lsls r3, r3, #2
8007fa2: 220f movs r2, #15
8007fa4: fa02 f303 lsl.w r3, r2, r3
8007fa8: 68ba ldr r2, [r7, #8]
8007faa: 4013 ands r3, r2
8007fac: 60bb str r3, [r7, #8]
if(tmp == ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4 * (position & 0x03))))
8007fae: 687b ldr r3, [r7, #4]
8007fb0: 4a62 ldr r2, [pc, #392] ; (800813c <HAL_GPIO_DeInit+0x1e8>)
8007fb2: 4293 cmp r3, r2
8007fb4: d037 beq.n 8008026 <HAL_GPIO_DeInit+0xd2>
8007fb6: 687b ldr r3, [r7, #4]
8007fb8: 4a61 ldr r2, [pc, #388] ; (8008140 <HAL_GPIO_DeInit+0x1ec>)
8007fba: 4293 cmp r3, r2
8007fbc: d031 beq.n 8008022 <HAL_GPIO_DeInit+0xce>
8007fbe: 687b ldr r3, [r7, #4]
8007fc0: 4a60 ldr r2, [pc, #384] ; (8008144 <HAL_GPIO_DeInit+0x1f0>)
8007fc2: 4293 cmp r3, r2
8007fc4: d02b beq.n 800801e <HAL_GPIO_DeInit+0xca>
8007fc6: 687b ldr r3, [r7, #4]
8007fc8: 4a5f ldr r2, [pc, #380] ; (8008148 <HAL_GPIO_DeInit+0x1f4>)
8007fca: 4293 cmp r3, r2
8007fcc: d025 beq.n 800801a <HAL_GPIO_DeInit+0xc6>
8007fce: 687b ldr r3, [r7, #4]
8007fd0: 4a5e ldr r2, [pc, #376] ; (800814c <HAL_GPIO_DeInit+0x1f8>)
8007fd2: 4293 cmp r3, r2
8007fd4: d01f beq.n 8008016 <HAL_GPIO_DeInit+0xc2>
8007fd6: 687b ldr r3, [r7, #4]
8007fd8: 4a5d ldr r2, [pc, #372] ; (8008150 <HAL_GPIO_DeInit+0x1fc>)
8007fda: 4293 cmp r3, r2
8007fdc: d019 beq.n 8008012 <HAL_GPIO_DeInit+0xbe>
8007fde: 687b ldr r3, [r7, #4]
8007fe0: 4a5c ldr r2, [pc, #368] ; (8008154 <HAL_GPIO_DeInit+0x200>)
8007fe2: 4293 cmp r3, r2
8007fe4: d013 beq.n 800800e <HAL_GPIO_DeInit+0xba>
8007fe6: 687b ldr r3, [r7, #4]
8007fe8: 4a5b ldr r2, [pc, #364] ; (8008158 <HAL_GPIO_DeInit+0x204>)
8007fea: 4293 cmp r3, r2
8007fec: d00d beq.n 800800a <HAL_GPIO_DeInit+0xb6>
8007fee: 687b ldr r3, [r7, #4]
8007ff0: 4a5a ldr r2, [pc, #360] ; (800815c <HAL_GPIO_DeInit+0x208>)
8007ff2: 4293 cmp r3, r2
8007ff4: d007 beq.n 8008006 <HAL_GPIO_DeInit+0xb2>
8007ff6: 687b ldr r3, [r7, #4]
8007ff8: 4a59 ldr r2, [pc, #356] ; (8008160 <HAL_GPIO_DeInit+0x20c>)
8007ffa: 4293 cmp r3, r2
8007ffc: d101 bne.n 8008002 <HAL_GPIO_DeInit+0xae>
8007ffe: 2309 movs r3, #9
8008000: e012 b.n 8008028 <HAL_GPIO_DeInit+0xd4>
8008002: 230a movs r3, #10
8008004: e010 b.n 8008028 <HAL_GPIO_DeInit+0xd4>
8008006: 2308 movs r3, #8
8008008: e00e b.n 8008028 <HAL_GPIO_DeInit+0xd4>
800800a: 2307 movs r3, #7
800800c: e00c b.n 8008028 <HAL_GPIO_DeInit+0xd4>
800800e: 2306 movs r3, #6
8008010: e00a b.n 8008028 <HAL_GPIO_DeInit+0xd4>
8008012: 2305 movs r3, #5
8008014: e008 b.n 8008028 <HAL_GPIO_DeInit+0xd4>
8008016: 2304 movs r3, #4
8008018: e006 b.n 8008028 <HAL_GPIO_DeInit+0xd4>
800801a: 2303 movs r3, #3
800801c: e004 b.n 8008028 <HAL_GPIO_DeInit+0xd4>
800801e: 2302 movs r3, #2
8008020: e002 b.n 8008028 <HAL_GPIO_DeInit+0xd4>
8008022: 2301 movs r3, #1
8008024: e000 b.n 8008028 <HAL_GPIO_DeInit+0xd4>
8008026: 2300 movs r3, #0
8008028: 697a ldr r2, [r7, #20]
800802a: f002 0203 and.w r2, r2, #3
800802e: 0092 lsls r2, r2, #2
8008030: 4093 lsls r3, r2
8008032: 68ba ldr r2, [r7, #8]
8008034: 429a cmp r2, r3
8008036: d132 bne.n 800809e <HAL_GPIO_DeInit+0x14a>
{
/* Clear EXTI line configuration */
EXTI->IMR &= ~((uint32_t)iocurrent);
8008038: 4b4a ldr r3, [pc, #296] ; (8008164 <HAL_GPIO_DeInit+0x210>)
800803a: 681a ldr r2, [r3, #0]
800803c: 68fb ldr r3, [r7, #12]
800803e: 43db mvns r3, r3
8008040: 4948 ldr r1, [pc, #288] ; (8008164 <HAL_GPIO_DeInit+0x210>)
8008042: 4013 ands r3, r2
8008044: 600b str r3, [r1, #0]
EXTI->EMR &= ~((uint32_t)iocurrent);
8008046: 4b47 ldr r3, [pc, #284] ; (8008164 <HAL_GPIO_DeInit+0x210>)
8008048: 685a ldr r2, [r3, #4]
800804a: 68fb ldr r3, [r7, #12]
800804c: 43db mvns r3, r3
800804e: 4945 ldr r1, [pc, #276] ; (8008164 <HAL_GPIO_DeInit+0x210>)
8008050: 4013 ands r3, r2
8008052: 604b str r3, [r1, #4]
/* Clear Rising Falling edge configuration */
EXTI->RTSR &= ~((uint32_t)iocurrent);
8008054: 4b43 ldr r3, [pc, #268] ; (8008164 <HAL_GPIO_DeInit+0x210>)
8008056: 689a ldr r2, [r3, #8]
8008058: 68fb ldr r3, [r7, #12]
800805a: 43db mvns r3, r3
800805c: 4941 ldr r1, [pc, #260] ; (8008164 <HAL_GPIO_DeInit+0x210>)
800805e: 4013 ands r3, r2
8008060: 608b str r3, [r1, #8]
EXTI->FTSR &= ~((uint32_t)iocurrent);
8008062: 4b40 ldr r3, [pc, #256] ; (8008164 <HAL_GPIO_DeInit+0x210>)
8008064: 68da ldr r2, [r3, #12]
8008066: 68fb ldr r3, [r7, #12]
8008068: 43db mvns r3, r3
800806a: 493e ldr r1, [pc, #248] ; (8008164 <HAL_GPIO_DeInit+0x210>)
800806c: 4013 ands r3, r2
800806e: 60cb str r3, [r1, #12]
/* Configure the External Interrupt or event for the current IO */
tmp = ((uint32_t)0x0F) << (4 * (position & 0x03));
8008070: 697b ldr r3, [r7, #20]
8008072: f003 0303 and.w r3, r3, #3
8008076: 009b lsls r3, r3, #2
8008078: 220f movs r2, #15
800807a: fa02 f303 lsl.w r3, r2, r3
800807e: 60bb str r3, [r7, #8]
SYSCFG->EXTICR[position >> 2] &= ~tmp;
8008080: 4a2d ldr r2, [pc, #180] ; (8008138 <HAL_GPIO_DeInit+0x1e4>)
8008082: 697b ldr r3, [r7, #20]
8008084: 089b lsrs r3, r3, #2
8008086: 3302 adds r3, #2
8008088: f852 1023 ldr.w r1, [r2, r3, lsl #2]
800808c: 68bb ldr r3, [r7, #8]
800808e: 43da mvns r2, r3
8008090: 4829 ldr r0, [pc, #164] ; (8008138 <HAL_GPIO_DeInit+0x1e4>)
8008092: 697b ldr r3, [r7, #20]
8008094: 089b lsrs r3, r3, #2
8008096: 400a ands r2, r1
8008098: 3302 adds r3, #2
800809a: f840 2023 str.w r2, [r0, r3, lsl #2]
}
/*------------------------- GPIO Mode Configuration --------------------*/
/* Configure IO Direction in Input Floating Mode */
GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (position * 2));
800809e: 687b ldr r3, [r7, #4]
80080a0: 681a ldr r2, [r3, #0]
80080a2: 697b ldr r3, [r7, #20]
80080a4: 005b lsls r3, r3, #1
80080a6: 2103 movs r1, #3
80080a8: fa01 f303 lsl.w r3, r1, r3
80080ac: 43db mvns r3, r3
80080ae: 401a ands r2, r3
80080b0: 687b ldr r3, [r7, #4]
80080b2: 601a str r2, [r3, #0]
/* Configure the default Alternate Function in current IO */
GPIOx->AFR[position >> 3] &= ~((uint32_t)0xF << ((uint32_t)(position & (uint32_t)0x07) * 4)) ;
80080b4: 697b ldr r3, [r7, #20]
80080b6: 08da lsrs r2, r3, #3
80080b8: 687b ldr r3, [r7, #4]
80080ba: 3208 adds r2, #8
80080bc: f853 1022 ldr.w r1, [r3, r2, lsl #2]
80080c0: 697b ldr r3, [r7, #20]
80080c2: f003 0307 and.w r3, r3, #7
80080c6: 009b lsls r3, r3, #2
80080c8: 220f movs r2, #15
80080ca: fa02 f303 lsl.w r3, r2, r3
80080ce: 43db mvns r3, r3
80080d0: 697a ldr r2, [r7, #20]
80080d2: 08d2 lsrs r2, r2, #3
80080d4: 4019 ands r1, r3
80080d6: 687b ldr r3, [r7, #4]
80080d8: 3208 adds r2, #8
80080da: f843 1022 str.w r1, [r3, r2, lsl #2]
/* Deactivate the Pull-up and Pull-down resistor for the current IO */
GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << (position * 2));
80080de: 687b ldr r3, [r7, #4]
80080e0: 68da ldr r2, [r3, #12]
80080e2: 697b ldr r3, [r7, #20]
80080e4: 005b lsls r3, r3, #1
80080e6: 2103 movs r1, #3
80080e8: fa01 f303 lsl.w r3, r1, r3
80080ec: 43db mvns r3, r3
80080ee: 401a ands r2, r3
80080f0: 687b ldr r3, [r7, #4]
80080f2: 60da str r2, [r3, #12]
/* Configure the default value IO Output Type */
GPIOx->OTYPER &= ~(GPIO_OTYPER_OT_0 << position) ;
80080f4: 687b ldr r3, [r7, #4]
80080f6: 685a ldr r2, [r3, #4]
80080f8: 2101 movs r1, #1
80080fa: 697b ldr r3, [r7, #20]
80080fc: fa01 f303 lsl.w r3, r1, r3
8008100: 43db mvns r3, r3
8008102: 401a ands r2, r3
8008104: 687b ldr r3, [r7, #4]
8008106: 605a str r2, [r3, #4]
/* Configure the default value for IO Speed */
GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2));
8008108: 687b ldr r3, [r7, #4]
800810a: 689a ldr r2, [r3, #8]
800810c: 697b ldr r3, [r7, #20]
800810e: 005b lsls r3, r3, #1
8008110: 2103 movs r1, #3
8008112: fa01 f303 lsl.w r3, r1, r3
8008116: 43db mvns r3, r3
8008118: 401a ands r2, r3
800811a: 687b ldr r3, [r7, #4]
800811c: 609a str r2, [r3, #8]
for(position = 0; position < GPIO_NUMBER; position++)
800811e: 697b ldr r3, [r7, #20]
8008120: 3301 adds r3, #1
8008122: 617b str r3, [r7, #20]
8008124: 697b ldr r3, [r7, #20]
8008126: 2b0f cmp r3, #15
8008128: f67f af22 bls.w 8007f70 <HAL_GPIO_DeInit+0x1c>
}
}
}
800812c: bf00 nop
800812e: 371c adds r7, #28
8008130: 46bd mov sp, r7
8008132: f85d 7b04 ldr.w r7, [sp], #4
8008136: 4770 bx lr
8008138: 40013800 .word 0x40013800
800813c: 40020000 .word 0x40020000
8008140: 40020400 .word 0x40020400
8008144: 40020800 .word 0x40020800
8008148: 40020c00 .word 0x40020c00
800814c: 40021000 .word 0x40021000
8008150: 40021400 .word 0x40021400
8008154: 40021800 .word 0x40021800
8008158: 40021c00 .word 0x40021c00
800815c: 40022000 .word 0x40022000
8008160: 40022400 .word 0x40022400
8008164: 40013c00 .word 0x40013c00
08008168 <HAL_GPIO_ReadPin>:
* @param GPIO_Pin specifies the port bit to read.
* This parameter can be GPIO_PIN_x where x can be (0..15).
* @retval The input port pin value.
*/
GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
{
8008168: b480 push {r7}
800816a: b085 sub sp, #20
800816c: af00 add r7, sp, #0
800816e: 6078 str r0, [r7, #4]
8008170: 460b mov r3, r1
8008172: 807b strh r3, [r7, #2]
GPIO_PinState bitstatus;
/* Check the parameters */
assert_param(IS_GPIO_PIN(GPIO_Pin));
if((GPIOx->IDR & GPIO_Pin) != (uint32_t)GPIO_PIN_RESET)
8008174: 687b ldr r3, [r7, #4]
8008176: 691a ldr r2, [r3, #16]
8008178: 887b ldrh r3, [r7, #2]
800817a: 4013 ands r3, r2
800817c: 2b00 cmp r3, #0
800817e: d002 beq.n 8008186 <HAL_GPIO_ReadPin+0x1e>
{
bitstatus = GPIO_PIN_SET;
8008180: 2301 movs r3, #1
8008182: 73fb strb r3, [r7, #15]
8008184: e001 b.n 800818a <HAL_GPIO_ReadPin+0x22>
}
else
{
bitstatus = GPIO_PIN_RESET;
8008186: 2300 movs r3, #0
8008188: 73fb strb r3, [r7, #15]
}
return bitstatus;
800818a: 7bfb ldrb r3, [r7, #15]
}
800818c: 4618 mov r0, r3
800818e: 3714 adds r7, #20
8008190: 46bd mov sp, r7
8008192: f85d 7b04 ldr.w r7, [sp], #4
8008196: 4770 bx lr
08008198 <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)
{
8008198: b480 push {r7}
800819a: b083 sub sp, #12
800819c: af00 add r7, sp, #0
800819e: 6078 str r0, [r7, #4]
80081a0: 460b mov r3, r1
80081a2: 807b strh r3, [r7, #2]
80081a4: 4613 mov r3, r2
80081a6: 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)
80081a8: 787b ldrb r3, [r7, #1]
80081aa: 2b00 cmp r3, #0
80081ac: d003 beq.n 80081b6 <HAL_GPIO_WritePin+0x1e>
{
GPIOx->BSRR = GPIO_Pin;
80081ae: 887a ldrh r2, [r7, #2]
80081b0: 687b ldr r3, [r7, #4]
80081b2: 619a str r2, [r3, #24]
}
else
{
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16;
}
}
80081b4: e003 b.n 80081be <HAL_GPIO_WritePin+0x26>
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16;
80081b6: 887b ldrh r3, [r7, #2]
80081b8: 041a lsls r2, r3, #16
80081ba: 687b ldr r3, [r7, #4]
80081bc: 619a str r2, [r3, #24]
}
80081be: bf00 nop
80081c0: 370c adds r7, #12
80081c2: 46bd mov sp, r7
80081c4: f85d 7b04 ldr.w r7, [sp], #4
80081c8: 4770 bx lr
...
080081cc <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)
{
80081cc: b580 push {r7, lr}
80081ce: b082 sub sp, #8
80081d0: af00 add r7, sp, #0
80081d2: 6078 str r0, [r7, #4]
/* Check the I2C handle allocation */
if (hi2c == NULL)
80081d4: 687b ldr r3, [r7, #4]
80081d6: 2b00 cmp r3, #0
80081d8: d101 bne.n 80081de <HAL_I2C_Init+0x12>
{
return HAL_ERROR;
80081da: 2301 movs r3, #1
80081dc: e07f b.n 80082de <HAL_I2C_Init+0x112>
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)
80081de: 687b ldr r3, [r7, #4]
80081e0: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
80081e4: b2db uxtb r3, r3
80081e6: 2b00 cmp r3, #0
80081e8: d106 bne.n 80081f8 <HAL_I2C_Init+0x2c>
{
/* Allocate lock resource and initialize it */
hi2c->Lock = HAL_UNLOCKED;
80081ea: 687b ldr r3, [r7, #4]
80081ec: 2200 movs r2, #0
80081ee: 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);
80081f2: 6878 ldr r0, [r7, #4]
80081f4: f7fc faaa bl 800474c <HAL_I2C_MspInit>
#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */
}
hi2c->State = HAL_I2C_STATE_BUSY;
80081f8: 687b ldr r3, [r7, #4]
80081fa: 2224 movs r2, #36 ; 0x24
80081fc: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
8008200: 687b ldr r3, [r7, #4]
8008202: 681b ldr r3, [r3, #0]
8008204: 681a ldr r2, [r3, #0]
8008206: 687b ldr r3, [r7, #4]
8008208: 681b ldr r3, [r3, #0]
800820a: f022 0201 bic.w r2, r2, #1
800820e: 601a str r2, [r3, #0]
/*---------------------------- I2Cx TIMINGR Configuration ------------------*/
/* Configure I2Cx: Frequency range */
hi2c->Instance->TIMINGR = hi2c->Init.Timing & TIMING_CLEAR_MASK;
8008210: 687b ldr r3, [r7, #4]
8008212: 685a ldr r2, [r3, #4]
8008214: 687b ldr r3, [r7, #4]
8008216: 681b ldr r3, [r3, #0]
8008218: f022 6270 bic.w r2, r2, #251658240 ; 0xf000000
800821c: 611a str r2, [r3, #16]
/*---------------------------- I2Cx OAR1 Configuration ---------------------*/
/* Disable Own Address1 before set the Own Address1 configuration */
hi2c->Instance->OAR1 &= ~I2C_OAR1_OA1EN;
800821e: 687b ldr r3, [r7, #4]
8008220: 681b ldr r3, [r3, #0]
8008222: 689a ldr r2, [r3, #8]
8008224: 687b ldr r3, [r7, #4]
8008226: 681b ldr r3, [r3, #0]
8008228: f422 4200 bic.w r2, r2, #32768 ; 0x8000
800822c: 609a str r2, [r3, #8]
/* Configure I2Cx: Own Address1 and ack own address1 mode */
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_7BIT)
800822e: 687b ldr r3, [r7, #4]
8008230: 68db ldr r3, [r3, #12]
8008232: 2b01 cmp r3, #1
8008234: d107 bne.n 8008246 <HAL_I2C_Init+0x7a>
{
hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | hi2c->Init.OwnAddress1);
8008236: 687b ldr r3, [r7, #4]
8008238: 689a ldr r2, [r3, #8]
800823a: 687b ldr r3, [r7, #4]
800823c: 681b ldr r3, [r3, #0]
800823e: f442 4200 orr.w r2, r2, #32768 ; 0x8000
8008242: 609a str r2, [r3, #8]
8008244: e006 b.n 8008254 <HAL_I2C_Init+0x88>
}
else /* I2C_ADDRESSINGMODE_10BIT */
{
hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | I2C_OAR1_OA1MODE | hi2c->Init.OwnAddress1);
8008246: 687b ldr r3, [r7, #4]
8008248: 689a ldr r2, [r3, #8]
800824a: 687b ldr r3, [r7, #4]
800824c: 681b ldr r3, [r3, #0]
800824e: f442 4204 orr.w r2, r2, #33792 ; 0x8400
8008252: 609a str r2, [r3, #8]
}
/*---------------------------- I2Cx CR2 Configuration ----------------------*/
/* Configure I2Cx: Addressing Master mode */
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT)
8008254: 687b ldr r3, [r7, #4]
8008256: 68db ldr r3, [r3, #12]
8008258: 2b02 cmp r3, #2
800825a: d104 bne.n 8008266 <HAL_I2C_Init+0x9a>
{
hi2c->Instance->CR2 = (I2C_CR2_ADD10);
800825c: 687b ldr r3, [r7, #4]
800825e: 681b ldr r3, [r3, #0]
8008260: f44f 6200 mov.w r2, #2048 ; 0x800
8008264: 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);
8008266: 687b ldr r3, [r7, #4]
8008268: 681b ldr r3, [r3, #0]
800826a: 6859 ldr r1, [r3, #4]
800826c: 687b ldr r3, [r7, #4]
800826e: 681a ldr r2, [r3, #0]
8008270: 4b1d ldr r3, [pc, #116] ; (80082e8 <HAL_I2C_Init+0x11c>)
8008272: 430b orrs r3, r1
8008274: 6053 str r3, [r2, #4]
/*---------------------------- I2Cx OAR2 Configuration ---------------------*/
/* Disable Own Address2 before set the Own Address2 configuration */
hi2c->Instance->OAR2 &= ~I2C_DUALADDRESS_ENABLE;
8008276: 687b ldr r3, [r7, #4]
8008278: 681b ldr r3, [r3, #0]
800827a: 68da ldr r2, [r3, #12]
800827c: 687b ldr r3, [r7, #4]
800827e: 681b ldr r3, [r3, #0]
8008280: f422 4200 bic.w r2, r2, #32768 ; 0x8000
8008284: 60da str r2, [r3, #12]
/* Configure I2Cx: Dual mode and Own Address2 */
hi2c->Instance->OAR2 = (hi2c->Init.DualAddressMode | hi2c->Init.OwnAddress2 | (hi2c->Init.OwnAddress2Masks << 8));
8008286: 687b ldr r3, [r7, #4]
8008288: 691a ldr r2, [r3, #16]
800828a: 687b ldr r3, [r7, #4]
800828c: 695b ldr r3, [r3, #20]
800828e: ea42 0103 orr.w r1, r2, r3
8008292: 687b ldr r3, [r7, #4]
8008294: 699b ldr r3, [r3, #24]
8008296: 021a lsls r2, r3, #8
8008298: 687b ldr r3, [r7, #4]
800829a: 681b ldr r3, [r3, #0]
800829c: 430a orrs r2, r1
800829e: 60da str r2, [r3, #12]
/*---------------------------- I2Cx CR1 Configuration ----------------------*/
/* Configure I2Cx: Generalcall and NoStretch mode */
hi2c->Instance->CR1 = (hi2c->Init.GeneralCallMode | hi2c->Init.NoStretchMode);
80082a0: 687b ldr r3, [r7, #4]
80082a2: 69d9 ldr r1, [r3, #28]
80082a4: 687b ldr r3, [r7, #4]
80082a6: 6a1a ldr r2, [r3, #32]
80082a8: 687b ldr r3, [r7, #4]
80082aa: 681b ldr r3, [r3, #0]
80082ac: 430a orrs r2, r1
80082ae: 601a str r2, [r3, #0]
/* Enable the selected I2C peripheral */
__HAL_I2C_ENABLE(hi2c);
80082b0: 687b ldr r3, [r7, #4]
80082b2: 681b ldr r3, [r3, #0]
80082b4: 681a ldr r2, [r3, #0]
80082b6: 687b ldr r3, [r7, #4]
80082b8: 681b ldr r3, [r3, #0]
80082ba: f042 0201 orr.w r2, r2, #1
80082be: 601a str r2, [r3, #0]
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
80082c0: 687b ldr r3, [r7, #4]
80082c2: 2200 movs r2, #0
80082c4: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
80082c6: 687b ldr r3, [r7, #4]
80082c8: 2220 movs r2, #32
80082ca: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->PreviousState = I2C_STATE_NONE;
80082ce: 687b ldr r3, [r7, #4]
80082d0: 2200 movs r2, #0
80082d2: 631a str r2, [r3, #48] ; 0x30
hi2c->Mode = HAL_I2C_MODE_NONE;
80082d4: 687b ldr r3, [r7, #4]
80082d6: 2200 movs r2, #0
80082d8: f883 2042 strb.w r2, [r3, #66] ; 0x42
return HAL_OK;
80082dc: 2300 movs r3, #0
}
80082de: 4618 mov r0, r3
80082e0: 3708 adds r7, #8
80082e2: 46bd mov sp, r7
80082e4: bd80 pop {r7, pc}
80082e6: bf00 nop
80082e8: 02008000 .word 0x02008000
080082ec <HAL_I2C_DeInit>:
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
* the configuration information for the specified I2C.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2C_DeInit(I2C_HandleTypeDef *hi2c)
{
80082ec: b580 push {r7, lr}
80082ee: b082 sub sp, #8
80082f0: af00 add r7, sp, #0
80082f2: 6078 str r0, [r7, #4]
/* Check the I2C handle allocation */
if (hi2c == NULL)
80082f4: 687b ldr r3, [r7, #4]
80082f6: 2b00 cmp r3, #0
80082f8: d101 bne.n 80082fe <HAL_I2C_DeInit+0x12>
{
return HAL_ERROR;
80082fa: 2301 movs r3, #1
80082fc: e021 b.n 8008342 <HAL_I2C_DeInit+0x56>
}
/* Check the parameters */
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
hi2c->State = HAL_I2C_STATE_BUSY;
80082fe: 687b ldr r3, [r7, #4]
8008300: 2224 movs r2, #36 ; 0x24
8008302: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Disable the I2C Peripheral Clock */
__HAL_I2C_DISABLE(hi2c);
8008306: 687b ldr r3, [r7, #4]
8008308: 681b ldr r3, [r3, #0]
800830a: 681a ldr r2, [r3, #0]
800830c: 687b ldr r3, [r7, #4]
800830e: 681b ldr r3, [r3, #0]
8008310: f022 0201 bic.w r2, r2, #1
8008314: 601a str r2, [r3, #0]
/* DeInit the low level hardware: GPIO, CLOCK, NVIC */
hi2c->MspDeInitCallback(hi2c);
#else
/* DeInit the low level hardware: GPIO, CLOCK, NVIC */
HAL_I2C_MspDeInit(hi2c);
8008316: 6878 ldr r0, [r7, #4]
8008318: f7fc fa90 bl 800483c <HAL_I2C_MspDeInit>
#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
800831c: 687b ldr r3, [r7, #4]
800831e: 2200 movs r2, #0
8008320: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_RESET;
8008322: 687b ldr r3, [r7, #4]
8008324: 2200 movs r2, #0
8008326: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->PreviousState = I2C_STATE_NONE;
800832a: 687b ldr r3, [r7, #4]
800832c: 2200 movs r2, #0
800832e: 631a str r2, [r3, #48] ; 0x30
hi2c->Mode = HAL_I2C_MODE_NONE;
8008330: 687b ldr r3, [r7, #4]
8008332: 2200 movs r2, #0
8008334: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Release Lock */
__HAL_UNLOCK(hi2c);
8008338: 687b ldr r3, [r7, #4]
800833a: 2200 movs r2, #0
800833c: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
8008340: 2300 movs r3, #0
}
8008342: 4618 mov r0, r3
8008344: 3708 adds r7, #8
8008346: 46bd mov sp, r7
8008348: bd80 pop {r7, pc}
...
0800834c <HAL_I2C_Mem_Write>:
* @param Size Amount of data to be sent
* @param Timeout Timeout duration
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout)
{
800834c: b580 push {r7, lr}
800834e: b088 sub sp, #32
8008350: af02 add r7, sp, #8
8008352: 60f8 str r0, [r7, #12]
8008354: 4608 mov r0, r1
8008356: 4611 mov r1, r2
8008358: 461a mov r2, r3
800835a: 4603 mov r3, r0
800835c: 817b strh r3, [r7, #10]
800835e: 460b mov r3, r1
8008360: 813b strh r3, [r7, #8]
8008362: 4613 mov r3, r2
8008364: 80fb strh r3, [r7, #6]
uint32_t tickstart;
/* Check the parameters */
assert_param(IS_I2C_MEMADD_SIZE(MemAddSize));
if (hi2c->State == HAL_I2C_STATE_READY)
8008366: 68fb ldr r3, [r7, #12]
8008368: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
800836c: b2db uxtb r3, r3
800836e: 2b20 cmp r3, #32
8008370: f040 80f9 bne.w 8008566 <HAL_I2C_Mem_Write+0x21a>
{
if ((pData == NULL) || (Size == 0U))
8008374: 6a3b ldr r3, [r7, #32]
8008376: 2b00 cmp r3, #0
8008378: d002 beq.n 8008380 <HAL_I2C_Mem_Write+0x34>
800837a: 8cbb ldrh r3, [r7, #36] ; 0x24
800837c: 2b00 cmp r3, #0
800837e: d105 bne.n 800838c <HAL_I2C_Mem_Write+0x40>
{
hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM;
8008380: 68fb ldr r3, [r7, #12]
8008382: f44f 7200 mov.w r2, #512 ; 0x200
8008386: 645a str r2, [r3, #68] ; 0x44
return HAL_ERROR;
8008388: 2301 movs r3, #1
800838a: e0ed b.n 8008568 <HAL_I2C_Mem_Write+0x21c>
}
/* Process Locked */
__HAL_LOCK(hi2c);
800838c: 68fb ldr r3, [r7, #12]
800838e: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
8008392: 2b01 cmp r3, #1
8008394: d101 bne.n 800839a <HAL_I2C_Mem_Write+0x4e>
8008396: 2302 movs r3, #2
8008398: e0e6 b.n 8008568 <HAL_I2C_Mem_Write+0x21c>
800839a: 68fb ldr r3, [r7, #12]
800839c: 2201 movs r2, #1
800839e: f883 2040 strb.w r2, [r3, #64] ; 0x40
/* Init tickstart for timeout management*/
tickstart = HAL_GetTick();
80083a2: f7fc ffbd bl 8005320 <HAL_GetTick>
80083a6: 6178 str r0, [r7, #20]
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK)
80083a8: 697b ldr r3, [r7, #20]
80083aa: 9300 str r3, [sp, #0]
80083ac: 2319 movs r3, #25
80083ae: 2201 movs r2, #1
80083b0: f44f 4100 mov.w r1, #32768 ; 0x8000
80083b4: 68f8 ldr r0, [r7, #12]
80083b6: f000 fad1 bl 800895c <I2C_WaitOnFlagUntilTimeout>
80083ba: 4603 mov r3, r0
80083bc: 2b00 cmp r3, #0
80083be: d001 beq.n 80083c4 <HAL_I2C_Mem_Write+0x78>
{
return HAL_ERROR;
80083c0: 2301 movs r3, #1
80083c2: e0d1 b.n 8008568 <HAL_I2C_Mem_Write+0x21c>
}
hi2c->State = HAL_I2C_STATE_BUSY_TX;
80083c4: 68fb ldr r3, [r7, #12]
80083c6: 2221 movs r2, #33 ; 0x21
80083c8: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_MEM;
80083cc: 68fb ldr r3, [r7, #12]
80083ce: 2240 movs r2, #64 ; 0x40
80083d0: f883 2042 strb.w r2, [r3, #66] ; 0x42
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
80083d4: 68fb ldr r3, [r7, #12]
80083d6: 2200 movs r2, #0
80083d8: 645a str r2, [r3, #68] ; 0x44
/* Prepare transfer parameters */
hi2c->pBuffPtr = pData;
80083da: 68fb ldr r3, [r7, #12]
80083dc: 6a3a ldr r2, [r7, #32]
80083de: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount = Size;
80083e0: 68fb ldr r3, [r7, #12]
80083e2: 8cba ldrh r2, [r7, #36] ; 0x24
80083e4: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferISR = NULL;
80083e6: 68fb ldr r3, [r7, #12]
80083e8: 2200 movs r2, #0
80083ea: 635a str r2, [r3, #52] ; 0x34
/* Send Slave Address and Memory Address */
if (I2C_RequestMemoryWrite(hi2c, DevAddress, MemAddress, MemAddSize, Timeout, tickstart) != HAL_OK)
80083ec: 88f8 ldrh r0, [r7, #6]
80083ee: 893a ldrh r2, [r7, #8]
80083f0: 8979 ldrh r1, [r7, #10]
80083f2: 697b ldr r3, [r7, #20]
80083f4: 9301 str r3, [sp, #4]
80083f6: 6abb ldr r3, [r7, #40] ; 0x28
80083f8: 9300 str r3, [sp, #0]
80083fa: 4603 mov r3, r0
80083fc: 68f8 ldr r0, [r7, #12]
80083fe: f000 f9e1 bl 80087c4 <I2C_RequestMemoryWrite>
8008402: 4603 mov r3, r0
8008404: 2b00 cmp r3, #0
8008406: d005 beq.n 8008414 <HAL_I2C_Mem_Write+0xc8>
{
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008408: 68fb ldr r3, [r7, #12]
800840a: 2200 movs r2, #0
800840c: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8008410: 2301 movs r3, #1
8008412: e0a9 b.n 8008568 <HAL_I2C_Mem_Write+0x21c>
}
/* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE */
if (hi2c->XferCount > MAX_NBYTE_SIZE)
8008414: 68fb ldr r3, [r7, #12]
8008416: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008418: b29b uxth r3, r3
800841a: 2bff cmp r3, #255 ; 0xff
800841c: d90e bls.n 800843c <HAL_I2C_Mem_Write+0xf0>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
800841e: 68fb ldr r3, [r7, #12]
8008420: 22ff movs r2, #255 ; 0xff
8008422: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP);
8008424: 68fb ldr r3, [r7, #12]
8008426: 8d1b ldrh r3, [r3, #40] ; 0x28
8008428: b2da uxtb r2, r3
800842a: 8979 ldrh r1, [r7, #10]
800842c: 2300 movs r3, #0
800842e: 9300 str r3, [sp, #0]
8008430: f04f 7380 mov.w r3, #16777216 ; 0x1000000
8008434: 68f8 ldr r0, [r7, #12]
8008436: f000 fbb3 bl 8008ba0 <I2C_TransferConfig>
800843a: e00f b.n 800845c <HAL_I2C_Mem_Write+0x110>
}
else
{
hi2c->XferSize = hi2c->XferCount;
800843c: 68fb ldr r3, [r7, #12]
800843e: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008440: b29a uxth r2, r3
8008442: 68fb ldr r3, [r7, #12]
8008444: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_NO_STARTSTOP);
8008446: 68fb ldr r3, [r7, #12]
8008448: 8d1b ldrh r3, [r3, #40] ; 0x28
800844a: b2da uxtb r2, r3
800844c: 8979 ldrh r1, [r7, #10]
800844e: 2300 movs r3, #0
8008450: 9300 str r3, [sp, #0]
8008452: f04f 7300 mov.w r3, #33554432 ; 0x2000000
8008456: 68f8 ldr r0, [r7, #12]
8008458: f000 fba2 bl 8008ba0 <I2C_TransferConfig>
}
do
{
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)
800845c: 697a ldr r2, [r7, #20]
800845e: 6ab9 ldr r1, [r7, #40] ; 0x28
8008460: 68f8 ldr r0, [r7, #12]
8008462: f000 fabb bl 80089dc <I2C_WaitOnTXISFlagUntilTimeout>
8008466: 4603 mov r3, r0
8008468: 2b00 cmp r3, #0
800846a: d001 beq.n 8008470 <HAL_I2C_Mem_Write+0x124>
{
return HAL_ERROR;
800846c: 2301 movs r3, #1
800846e: e07b b.n 8008568 <HAL_I2C_Mem_Write+0x21c>
}
/* Write data to TXDR */
hi2c->Instance->TXDR = *hi2c->pBuffPtr;
8008470: 68fb ldr r3, [r7, #12]
8008472: 6a5b ldr r3, [r3, #36] ; 0x24
8008474: 781a ldrb r2, [r3, #0]
8008476: 68fb ldr r3, [r7, #12]
8008478: 681b ldr r3, [r3, #0]
800847a: 629a str r2, [r3, #40] ; 0x28
/* Increment Buffer pointer */
hi2c->pBuffPtr++;
800847c: 68fb ldr r3, [r7, #12]
800847e: 6a5b ldr r3, [r3, #36] ; 0x24
8008480: 1c5a adds r2, r3, #1
8008482: 68fb ldr r3, [r7, #12]
8008484: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount--;
8008486: 68fb ldr r3, [r7, #12]
8008488: 8d5b ldrh r3, [r3, #42] ; 0x2a
800848a: b29b uxth r3, r3
800848c: 3b01 subs r3, #1
800848e: b29a uxth r2, r3
8008490: 68fb ldr r3, [r7, #12]
8008492: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferSize--;
8008494: 68fb ldr r3, [r7, #12]
8008496: 8d1b ldrh r3, [r3, #40] ; 0x28
8008498: 3b01 subs r3, #1
800849a: b29a uxth r2, r3
800849c: 68fb ldr r3, [r7, #12]
800849e: 851a strh r2, [r3, #40] ; 0x28
if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U))
80084a0: 68fb ldr r3, [r7, #12]
80084a2: 8d5b ldrh r3, [r3, #42] ; 0x2a
80084a4: b29b uxth r3, r3
80084a6: 2b00 cmp r3, #0
80084a8: d034 beq.n 8008514 <HAL_I2C_Mem_Write+0x1c8>
80084aa: 68fb ldr r3, [r7, #12]
80084ac: 8d1b ldrh r3, [r3, #40] ; 0x28
80084ae: 2b00 cmp r3, #0
80084b0: d130 bne.n 8008514 <HAL_I2C_Mem_Write+0x1c8>
{
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK)
80084b2: 697b ldr r3, [r7, #20]
80084b4: 9300 str r3, [sp, #0]
80084b6: 6abb ldr r3, [r7, #40] ; 0x28
80084b8: 2200 movs r2, #0
80084ba: 2180 movs r1, #128 ; 0x80
80084bc: 68f8 ldr r0, [r7, #12]
80084be: f000 fa4d bl 800895c <I2C_WaitOnFlagUntilTimeout>
80084c2: 4603 mov r3, r0
80084c4: 2b00 cmp r3, #0
80084c6: d001 beq.n 80084cc <HAL_I2C_Mem_Write+0x180>
{
return HAL_ERROR;
80084c8: 2301 movs r3, #1
80084ca: e04d b.n 8008568 <HAL_I2C_Mem_Write+0x21c>
}
if (hi2c->XferCount > MAX_NBYTE_SIZE)
80084cc: 68fb ldr r3, [r7, #12]
80084ce: 8d5b ldrh r3, [r3, #42] ; 0x2a
80084d0: b29b uxth r3, r3
80084d2: 2bff cmp r3, #255 ; 0xff
80084d4: d90e bls.n 80084f4 <HAL_I2C_Mem_Write+0x1a8>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
80084d6: 68fb ldr r3, [r7, #12]
80084d8: 22ff movs r2, #255 ; 0xff
80084da: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP);
80084dc: 68fb ldr r3, [r7, #12]
80084de: 8d1b ldrh r3, [r3, #40] ; 0x28
80084e0: b2da uxtb r2, r3
80084e2: 8979 ldrh r1, [r7, #10]
80084e4: 2300 movs r3, #0
80084e6: 9300 str r3, [sp, #0]
80084e8: f04f 7380 mov.w r3, #16777216 ; 0x1000000
80084ec: 68f8 ldr r0, [r7, #12]
80084ee: f000 fb57 bl 8008ba0 <I2C_TransferConfig>
80084f2: e00f b.n 8008514 <HAL_I2C_Mem_Write+0x1c8>
}
else
{
hi2c->XferSize = hi2c->XferCount;
80084f4: 68fb ldr r3, [r7, #12]
80084f6: 8d5b ldrh r3, [r3, #42] ; 0x2a
80084f8: b29a uxth r2, r3
80084fa: 68fb ldr r3, [r7, #12]
80084fc: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_NO_STARTSTOP);
80084fe: 68fb ldr r3, [r7, #12]
8008500: 8d1b ldrh r3, [r3, #40] ; 0x28
8008502: b2da uxtb r2, r3
8008504: 8979 ldrh r1, [r7, #10]
8008506: 2300 movs r3, #0
8008508: 9300 str r3, [sp, #0]
800850a: f04f 7300 mov.w r3, #33554432 ; 0x2000000
800850e: 68f8 ldr r0, [r7, #12]
8008510: f000 fb46 bl 8008ba0 <I2C_TransferConfig>
}
}
}
while (hi2c->XferCount > 0U);
8008514: 68fb ldr r3, [r7, #12]
8008516: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008518: b29b uxth r3, r3
800851a: 2b00 cmp r3, #0
800851c: d19e bne.n 800845c <HAL_I2C_Mem_Write+0x110>
/* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */
/* Wait until STOPF flag is reset */
if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)
800851e: 697a ldr r2, [r7, #20]
8008520: 6ab9 ldr r1, [r7, #40] ; 0x28
8008522: 68f8 ldr r0, [r7, #12]
8008524: f000 fa9a bl 8008a5c <I2C_WaitOnSTOPFlagUntilTimeout>
8008528: 4603 mov r3, r0
800852a: 2b00 cmp r3, #0
800852c: d001 beq.n 8008532 <HAL_I2C_Mem_Write+0x1e6>
{
return HAL_ERROR;
800852e: 2301 movs r3, #1
8008530: e01a b.n 8008568 <HAL_I2C_Mem_Write+0x21c>
}
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
8008532: 68fb ldr r3, [r7, #12]
8008534: 681b ldr r3, [r3, #0]
8008536: 2220 movs r2, #32
8008538: 61da str r2, [r3, #28]
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
800853a: 68fb ldr r3, [r7, #12]
800853c: 681b ldr r3, [r3, #0]
800853e: 6859 ldr r1, [r3, #4]
8008540: 68fb ldr r3, [r7, #12]
8008542: 681a ldr r2, [r3, #0]
8008544: 4b0a ldr r3, [pc, #40] ; (8008570 <HAL_I2C_Mem_Write+0x224>)
8008546: 400b ands r3, r1
8008548: 6053 str r3, [r2, #4]
hi2c->State = HAL_I2C_STATE_READY;
800854a: 68fb ldr r3, [r7, #12]
800854c: 2220 movs r2, #32
800854e: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
8008552: 68fb ldr r3, [r7, #12]
8008554: 2200 movs r2, #0
8008556: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
800855a: 68fb ldr r3, [r7, #12]
800855c: 2200 movs r2, #0
800855e: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
8008562: 2300 movs r3, #0
8008564: e000 b.n 8008568 <HAL_I2C_Mem_Write+0x21c>
}
else
{
return HAL_BUSY;
8008566: 2302 movs r3, #2
}
}
8008568: 4618 mov r0, r3
800856a: 3718 adds r7, #24
800856c: 46bd mov sp, r7
800856e: bd80 pop {r7, pc}
8008570: fe00e800 .word 0xfe00e800
08008574 <HAL_I2C_Mem_Read>:
* @param Size Amount of data to be sent
* @param Timeout Timeout duration
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2C_Mem_Read(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout)
{
8008574: b580 push {r7, lr}
8008576: b088 sub sp, #32
8008578: af02 add r7, sp, #8
800857a: 60f8 str r0, [r7, #12]
800857c: 4608 mov r0, r1
800857e: 4611 mov r1, r2
8008580: 461a mov r2, r3
8008582: 4603 mov r3, r0
8008584: 817b strh r3, [r7, #10]
8008586: 460b mov r3, r1
8008588: 813b strh r3, [r7, #8]
800858a: 4613 mov r3, r2
800858c: 80fb strh r3, [r7, #6]
uint32_t tickstart;
/* Check the parameters */
assert_param(IS_I2C_MEMADD_SIZE(MemAddSize));
if (hi2c->State == HAL_I2C_STATE_READY)
800858e: 68fb ldr r3, [r7, #12]
8008590: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
8008594: b2db uxtb r3, r3
8008596: 2b20 cmp r3, #32
8008598: f040 80fd bne.w 8008796 <HAL_I2C_Mem_Read+0x222>
{
if ((pData == NULL) || (Size == 0U))
800859c: 6a3b ldr r3, [r7, #32]
800859e: 2b00 cmp r3, #0
80085a0: d002 beq.n 80085a8 <HAL_I2C_Mem_Read+0x34>
80085a2: 8cbb ldrh r3, [r7, #36] ; 0x24
80085a4: 2b00 cmp r3, #0
80085a6: d105 bne.n 80085b4 <HAL_I2C_Mem_Read+0x40>
{
hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM;
80085a8: 68fb ldr r3, [r7, #12]
80085aa: f44f 7200 mov.w r2, #512 ; 0x200
80085ae: 645a str r2, [r3, #68] ; 0x44
return HAL_ERROR;
80085b0: 2301 movs r3, #1
80085b2: e0f1 b.n 8008798 <HAL_I2C_Mem_Read+0x224>
}
/* Process Locked */
__HAL_LOCK(hi2c);
80085b4: 68fb ldr r3, [r7, #12]
80085b6: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
80085ba: 2b01 cmp r3, #1
80085bc: d101 bne.n 80085c2 <HAL_I2C_Mem_Read+0x4e>
80085be: 2302 movs r3, #2
80085c0: e0ea b.n 8008798 <HAL_I2C_Mem_Read+0x224>
80085c2: 68fb ldr r3, [r7, #12]
80085c4: 2201 movs r2, #1
80085c6: f883 2040 strb.w r2, [r3, #64] ; 0x40
/* Init tickstart for timeout management*/
tickstart = HAL_GetTick();
80085ca: f7fc fea9 bl 8005320 <HAL_GetTick>
80085ce: 6178 str r0, [r7, #20]
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK)
80085d0: 697b ldr r3, [r7, #20]
80085d2: 9300 str r3, [sp, #0]
80085d4: 2319 movs r3, #25
80085d6: 2201 movs r2, #1
80085d8: f44f 4100 mov.w r1, #32768 ; 0x8000
80085dc: 68f8 ldr r0, [r7, #12]
80085de: f000 f9bd bl 800895c <I2C_WaitOnFlagUntilTimeout>
80085e2: 4603 mov r3, r0
80085e4: 2b00 cmp r3, #0
80085e6: d001 beq.n 80085ec <HAL_I2C_Mem_Read+0x78>
{
return HAL_ERROR;
80085e8: 2301 movs r3, #1
80085ea: e0d5 b.n 8008798 <HAL_I2C_Mem_Read+0x224>
}
hi2c->State = HAL_I2C_STATE_BUSY_RX;
80085ec: 68fb ldr r3, [r7, #12]
80085ee: 2222 movs r2, #34 ; 0x22
80085f0: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_MEM;
80085f4: 68fb ldr r3, [r7, #12]
80085f6: 2240 movs r2, #64 ; 0x40
80085f8: f883 2042 strb.w r2, [r3, #66] ; 0x42
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
80085fc: 68fb ldr r3, [r7, #12]
80085fe: 2200 movs r2, #0
8008600: 645a str r2, [r3, #68] ; 0x44
/* Prepare transfer parameters */
hi2c->pBuffPtr = pData;
8008602: 68fb ldr r3, [r7, #12]
8008604: 6a3a ldr r2, [r7, #32]
8008606: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount = Size;
8008608: 68fb ldr r3, [r7, #12]
800860a: 8cba ldrh r2, [r7, #36] ; 0x24
800860c: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferISR = NULL;
800860e: 68fb ldr r3, [r7, #12]
8008610: 2200 movs r2, #0
8008612: 635a str r2, [r3, #52] ; 0x34
/* Send Slave Address and Memory Address */
if (I2C_RequestMemoryRead(hi2c, DevAddress, MemAddress, MemAddSize, Timeout, tickstart) != HAL_OK)
8008614: 88f8 ldrh r0, [r7, #6]
8008616: 893a ldrh r2, [r7, #8]
8008618: 8979 ldrh r1, [r7, #10]
800861a: 697b ldr r3, [r7, #20]
800861c: 9301 str r3, [sp, #4]
800861e: 6abb ldr r3, [r7, #40] ; 0x28
8008620: 9300 str r3, [sp, #0]
8008622: 4603 mov r3, r0
8008624: 68f8 ldr r0, [r7, #12]
8008626: f000 f921 bl 800886c <I2C_RequestMemoryRead>
800862a: 4603 mov r3, r0
800862c: 2b00 cmp r3, #0
800862e: d005 beq.n 800863c <HAL_I2C_Mem_Read+0xc8>
{
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008630: 68fb ldr r3, [r7, #12]
8008632: 2200 movs r2, #0
8008634: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8008638: 2301 movs r3, #1
800863a: e0ad b.n 8008798 <HAL_I2C_Mem_Read+0x224>
}
/* Send Slave Address */
/* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */
if (hi2c->XferCount > MAX_NBYTE_SIZE)
800863c: 68fb ldr r3, [r7, #12]
800863e: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008640: b29b uxth r3, r3
8008642: 2bff cmp r3, #255 ; 0xff
8008644: d90e bls.n 8008664 <HAL_I2C_Mem_Read+0xf0>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8008646: 68fb ldr r3, [r7, #12]
8008648: 22ff movs r2, #255 ; 0xff
800864a: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_GENERATE_START_READ);
800864c: 68fb ldr r3, [r7, #12]
800864e: 8d1b ldrh r3, [r3, #40] ; 0x28
8008650: b2da uxtb r2, r3
8008652: 8979 ldrh r1, [r7, #10]
8008654: 4b52 ldr r3, [pc, #328] ; (80087a0 <HAL_I2C_Mem_Read+0x22c>)
8008656: 9300 str r3, [sp, #0]
8008658: f04f 7380 mov.w r3, #16777216 ; 0x1000000
800865c: 68f8 ldr r0, [r7, #12]
800865e: f000 fa9f bl 8008ba0 <I2C_TransferConfig>
8008662: e00f b.n 8008684 <HAL_I2C_Mem_Read+0x110>
}
else
{
hi2c->XferSize = hi2c->XferCount;
8008664: 68fb ldr r3, [r7, #12]
8008666: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008668: b29a uxth r2, r3
800866a: 68fb ldr r3, [r7, #12]
800866c: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_GENERATE_START_READ);
800866e: 68fb ldr r3, [r7, #12]
8008670: 8d1b ldrh r3, [r3, #40] ; 0x28
8008672: b2da uxtb r2, r3
8008674: 8979 ldrh r1, [r7, #10]
8008676: 4b4a ldr r3, [pc, #296] ; (80087a0 <HAL_I2C_Mem_Read+0x22c>)
8008678: 9300 str r3, [sp, #0]
800867a: f04f 7300 mov.w r3, #33554432 ; 0x2000000
800867e: 68f8 ldr r0, [r7, #12]
8008680: f000 fa8e bl 8008ba0 <I2C_TransferConfig>
}
do
{
/* Wait until RXNE flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_RXNE, RESET, Timeout, tickstart) != HAL_OK)
8008684: 697b ldr r3, [r7, #20]
8008686: 9300 str r3, [sp, #0]
8008688: 6abb ldr r3, [r7, #40] ; 0x28
800868a: 2200 movs r2, #0
800868c: 2104 movs r1, #4
800868e: 68f8 ldr r0, [r7, #12]
8008690: f000 f964 bl 800895c <I2C_WaitOnFlagUntilTimeout>
8008694: 4603 mov r3, r0
8008696: 2b00 cmp r3, #0
8008698: d001 beq.n 800869e <HAL_I2C_Mem_Read+0x12a>
{
return HAL_ERROR;
800869a: 2301 movs r3, #1
800869c: e07c b.n 8008798 <HAL_I2C_Mem_Read+0x224>
}
/* Read data from RXDR */
*hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR;
800869e: 68fb ldr r3, [r7, #12]
80086a0: 681b ldr r3, [r3, #0]
80086a2: 6a5a ldr r2, [r3, #36] ; 0x24
80086a4: 68fb ldr r3, [r7, #12]
80086a6: 6a5b ldr r3, [r3, #36] ; 0x24
80086a8: b2d2 uxtb r2, r2
80086aa: 701a strb r2, [r3, #0]
/* Increment Buffer pointer */
hi2c->pBuffPtr++;
80086ac: 68fb ldr r3, [r7, #12]
80086ae: 6a5b ldr r3, [r3, #36] ; 0x24
80086b0: 1c5a adds r2, r3, #1
80086b2: 68fb ldr r3, [r7, #12]
80086b4: 625a str r2, [r3, #36] ; 0x24
hi2c->XferSize--;
80086b6: 68fb ldr r3, [r7, #12]
80086b8: 8d1b ldrh r3, [r3, #40] ; 0x28
80086ba: 3b01 subs r3, #1
80086bc: b29a uxth r2, r3
80086be: 68fb ldr r3, [r7, #12]
80086c0: 851a strh r2, [r3, #40] ; 0x28
hi2c->XferCount--;
80086c2: 68fb ldr r3, [r7, #12]
80086c4: 8d5b ldrh r3, [r3, #42] ; 0x2a
80086c6: b29b uxth r3, r3
80086c8: 3b01 subs r3, #1
80086ca: b29a uxth r2, r3
80086cc: 68fb ldr r3, [r7, #12]
80086ce: 855a strh r2, [r3, #42] ; 0x2a
if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U))
80086d0: 68fb ldr r3, [r7, #12]
80086d2: 8d5b ldrh r3, [r3, #42] ; 0x2a
80086d4: b29b uxth r3, r3
80086d6: 2b00 cmp r3, #0
80086d8: d034 beq.n 8008744 <HAL_I2C_Mem_Read+0x1d0>
80086da: 68fb ldr r3, [r7, #12]
80086dc: 8d1b ldrh r3, [r3, #40] ; 0x28
80086de: 2b00 cmp r3, #0
80086e0: d130 bne.n 8008744 <HAL_I2C_Mem_Read+0x1d0>
{
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK)
80086e2: 697b ldr r3, [r7, #20]
80086e4: 9300 str r3, [sp, #0]
80086e6: 6abb ldr r3, [r7, #40] ; 0x28
80086e8: 2200 movs r2, #0
80086ea: 2180 movs r1, #128 ; 0x80
80086ec: 68f8 ldr r0, [r7, #12]
80086ee: f000 f935 bl 800895c <I2C_WaitOnFlagUntilTimeout>
80086f2: 4603 mov r3, r0
80086f4: 2b00 cmp r3, #0
80086f6: d001 beq.n 80086fc <HAL_I2C_Mem_Read+0x188>
{
return HAL_ERROR;
80086f8: 2301 movs r3, #1
80086fa: e04d b.n 8008798 <HAL_I2C_Mem_Read+0x224>
}
if (hi2c->XferCount > MAX_NBYTE_SIZE)
80086fc: 68fb ldr r3, [r7, #12]
80086fe: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008700: b29b uxth r3, r3
8008702: 2bff cmp r3, #255 ; 0xff
8008704: d90e bls.n 8008724 <HAL_I2C_Mem_Read+0x1b0>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8008706: 68fb ldr r3, [r7, #12]
8008708: 22ff movs r2, #255 ; 0xff
800870a: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t) hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP);
800870c: 68fb ldr r3, [r7, #12]
800870e: 8d1b ldrh r3, [r3, #40] ; 0x28
8008710: b2da uxtb r2, r3
8008712: 8979 ldrh r1, [r7, #10]
8008714: 2300 movs r3, #0
8008716: 9300 str r3, [sp, #0]
8008718: f04f 7380 mov.w r3, #16777216 ; 0x1000000
800871c: 68f8 ldr r0, [r7, #12]
800871e: f000 fa3f bl 8008ba0 <I2C_TransferConfig>
8008722: e00f b.n 8008744 <HAL_I2C_Mem_Read+0x1d0>
}
else
{
hi2c->XferSize = hi2c->XferCount;
8008724: 68fb ldr r3, [r7, #12]
8008726: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008728: b29a uxth r2, r3
800872a: 68fb ldr r3, [r7, #12]
800872c: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_NO_STARTSTOP);
800872e: 68fb ldr r3, [r7, #12]
8008730: 8d1b ldrh r3, [r3, #40] ; 0x28
8008732: b2da uxtb r2, r3
8008734: 8979 ldrh r1, [r7, #10]
8008736: 2300 movs r3, #0
8008738: 9300 str r3, [sp, #0]
800873a: f04f 7300 mov.w r3, #33554432 ; 0x2000000
800873e: 68f8 ldr r0, [r7, #12]
8008740: f000 fa2e bl 8008ba0 <I2C_TransferConfig>
}
}
}
while (hi2c->XferCount > 0U);
8008744: 68fb ldr r3, [r7, #12]
8008746: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008748: b29b uxth r3, r3
800874a: 2b00 cmp r3, #0
800874c: d19a bne.n 8008684 <HAL_I2C_Mem_Read+0x110>
/* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */
/* Wait until STOPF flag is reset */
if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)
800874e: 697a ldr r2, [r7, #20]
8008750: 6ab9 ldr r1, [r7, #40] ; 0x28
8008752: 68f8 ldr r0, [r7, #12]
8008754: f000 f982 bl 8008a5c <I2C_WaitOnSTOPFlagUntilTimeout>
8008758: 4603 mov r3, r0
800875a: 2b00 cmp r3, #0
800875c: d001 beq.n 8008762 <HAL_I2C_Mem_Read+0x1ee>
{
return HAL_ERROR;
800875e: 2301 movs r3, #1
8008760: e01a b.n 8008798 <HAL_I2C_Mem_Read+0x224>
}
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
8008762: 68fb ldr r3, [r7, #12]
8008764: 681b ldr r3, [r3, #0]
8008766: 2220 movs r2, #32
8008768: 61da str r2, [r3, #28]
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
800876a: 68fb ldr r3, [r7, #12]
800876c: 681b ldr r3, [r3, #0]
800876e: 6859 ldr r1, [r3, #4]
8008770: 68fb ldr r3, [r7, #12]
8008772: 681a ldr r2, [r3, #0]
8008774: 4b0b ldr r3, [pc, #44] ; (80087a4 <HAL_I2C_Mem_Read+0x230>)
8008776: 400b ands r3, r1
8008778: 6053 str r3, [r2, #4]
hi2c->State = HAL_I2C_STATE_READY;
800877a: 68fb ldr r3, [r7, #12]
800877c: 2220 movs r2, #32
800877e: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
8008782: 68fb ldr r3, [r7, #12]
8008784: 2200 movs r2, #0
8008786: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
800878a: 68fb ldr r3, [r7, #12]
800878c: 2200 movs r2, #0
800878e: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
8008792: 2300 movs r3, #0
8008794: e000 b.n 8008798 <HAL_I2C_Mem_Read+0x224>
}
else
{
return HAL_BUSY;
8008796: 2302 movs r3, #2
}
}
8008798: 4618 mov r0, r3
800879a: 3718 adds r7, #24
800879c: 46bd mov sp, r7
800879e: bd80 pop {r7, pc}
80087a0: 80002400 .word 0x80002400
80087a4: fe00e800 .word 0xfe00e800
080087a8 <HAL_I2C_GetState>:
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
* the configuration information for the specified I2C.
* @retval HAL state
*/
HAL_I2C_StateTypeDef HAL_I2C_GetState(I2C_HandleTypeDef *hi2c)
{
80087a8: b480 push {r7}
80087aa: b083 sub sp, #12
80087ac: af00 add r7, sp, #0
80087ae: 6078 str r0, [r7, #4]
/* Return I2C handle state */
return hi2c->State;
80087b0: 687b ldr r3, [r7, #4]
80087b2: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
80087b6: b2db uxtb r3, r3
}
80087b8: 4618 mov r0, r3
80087ba: 370c adds r7, #12
80087bc: 46bd mov sp, r7
80087be: f85d 7b04 ldr.w r7, [sp], #4
80087c2: 4770 bx lr
080087c4 <I2C_RequestMemoryWrite>:
* @param Timeout Timeout duration
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_RequestMemoryWrite(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout, uint32_t Tickstart)
{
80087c4: b580 push {r7, lr}
80087c6: b086 sub sp, #24
80087c8: af02 add r7, sp, #8
80087ca: 60f8 str r0, [r7, #12]
80087cc: 4608 mov r0, r1
80087ce: 4611 mov r1, r2
80087d0: 461a mov r2, r3
80087d2: 4603 mov r3, r0
80087d4: 817b strh r3, [r7, #10]
80087d6: 460b mov r3, r1
80087d8: 813b strh r3, [r7, #8]
80087da: 4613 mov r3, r2
80087dc: 80fb strh r3, [r7, #6]
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_RELOAD_MODE, I2C_GENERATE_START_WRITE);
80087de: 88fb ldrh r3, [r7, #6]
80087e0: b2da uxtb r2, r3
80087e2: 8979 ldrh r1, [r7, #10]
80087e4: 4b20 ldr r3, [pc, #128] ; (8008868 <I2C_RequestMemoryWrite+0xa4>)
80087e6: 9300 str r3, [sp, #0]
80087e8: f04f 7380 mov.w r3, #16777216 ; 0x1000000
80087ec: 68f8 ldr r0, [r7, #12]
80087ee: f000 f9d7 bl 8008ba0 <I2C_TransferConfig>
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
80087f2: 69fa ldr r2, [r7, #28]
80087f4: 69b9 ldr r1, [r7, #24]
80087f6: 68f8 ldr r0, [r7, #12]
80087f8: f000 f8f0 bl 80089dc <I2C_WaitOnTXISFlagUntilTimeout>
80087fc: 4603 mov r3, r0
80087fe: 2b00 cmp r3, #0
8008800: d001 beq.n 8008806 <I2C_RequestMemoryWrite+0x42>
{
return HAL_ERROR;
8008802: 2301 movs r3, #1
8008804: e02c b.n 8008860 <I2C_RequestMemoryWrite+0x9c>
}
/* If Memory address size is 8Bit */
if (MemAddSize == I2C_MEMADD_SIZE_8BIT)
8008806: 88fb ldrh r3, [r7, #6]
8008808: 2b01 cmp r3, #1
800880a: d105 bne.n 8008818 <I2C_RequestMemoryWrite+0x54>
{
/* Send Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
800880c: 893b ldrh r3, [r7, #8]
800880e: b2da uxtb r2, r3
8008810: 68fb ldr r3, [r7, #12]
8008812: 681b ldr r3, [r3, #0]
8008814: 629a str r2, [r3, #40] ; 0x28
8008816: e015 b.n 8008844 <I2C_RequestMemoryWrite+0x80>
}
/* If Memory address size is 16Bit */
else
{
/* Send MSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress);
8008818: 893b ldrh r3, [r7, #8]
800881a: 0a1b lsrs r3, r3, #8
800881c: b29b uxth r3, r3
800881e: b2da uxtb r2, r3
8008820: 68fb ldr r3, [r7, #12]
8008822: 681b ldr r3, [r3, #0]
8008824: 629a str r2, [r3, #40] ; 0x28
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
8008826: 69fa ldr r2, [r7, #28]
8008828: 69b9 ldr r1, [r7, #24]
800882a: 68f8 ldr r0, [r7, #12]
800882c: f000 f8d6 bl 80089dc <I2C_WaitOnTXISFlagUntilTimeout>
8008830: 4603 mov r3, r0
8008832: 2b00 cmp r3, #0
8008834: d001 beq.n 800883a <I2C_RequestMemoryWrite+0x76>
{
return HAL_ERROR;
8008836: 2301 movs r3, #1
8008838: e012 b.n 8008860 <I2C_RequestMemoryWrite+0x9c>
}
/* Send LSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
800883a: 893b ldrh r3, [r7, #8]
800883c: b2da uxtb r2, r3
800883e: 68fb ldr r3, [r7, #12]
8008840: 681b ldr r3, [r3, #0]
8008842: 629a str r2, [r3, #40] ; 0x28
}
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, Tickstart) != HAL_OK)
8008844: 69fb ldr r3, [r7, #28]
8008846: 9300 str r3, [sp, #0]
8008848: 69bb ldr r3, [r7, #24]
800884a: 2200 movs r2, #0
800884c: 2180 movs r1, #128 ; 0x80
800884e: 68f8 ldr r0, [r7, #12]
8008850: f000 f884 bl 800895c <I2C_WaitOnFlagUntilTimeout>
8008854: 4603 mov r3, r0
8008856: 2b00 cmp r3, #0
8008858: d001 beq.n 800885e <I2C_RequestMemoryWrite+0x9a>
{
return HAL_ERROR;
800885a: 2301 movs r3, #1
800885c: e000 b.n 8008860 <I2C_RequestMemoryWrite+0x9c>
}
return HAL_OK;
800885e: 2300 movs r3, #0
}
8008860: 4618 mov r0, r3
8008862: 3710 adds r7, #16
8008864: 46bd mov sp, r7
8008866: bd80 pop {r7, pc}
8008868: 80002000 .word 0x80002000
0800886c <I2C_RequestMemoryRead>:
* @param Timeout Timeout duration
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_RequestMemoryRead(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout, uint32_t Tickstart)
{
800886c: b580 push {r7, lr}
800886e: b086 sub sp, #24
8008870: af02 add r7, sp, #8
8008872: 60f8 str r0, [r7, #12]
8008874: 4608 mov r0, r1
8008876: 4611 mov r1, r2
8008878: 461a mov r2, r3
800887a: 4603 mov r3, r0
800887c: 817b strh r3, [r7, #10]
800887e: 460b mov r3, r1
8008880: 813b strh r3, [r7, #8]
8008882: 4613 mov r3, r2
8008884: 80fb strh r3, [r7, #6]
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_SOFTEND_MODE, I2C_GENERATE_START_WRITE);
8008886: 88fb ldrh r3, [r7, #6]
8008888: b2da uxtb r2, r3
800888a: 8979 ldrh r1, [r7, #10]
800888c: 4b20 ldr r3, [pc, #128] ; (8008910 <I2C_RequestMemoryRead+0xa4>)
800888e: 9300 str r3, [sp, #0]
8008890: 2300 movs r3, #0
8008892: 68f8 ldr r0, [r7, #12]
8008894: f000 f984 bl 8008ba0 <I2C_TransferConfig>
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
8008898: 69fa ldr r2, [r7, #28]
800889a: 69b9 ldr r1, [r7, #24]
800889c: 68f8 ldr r0, [r7, #12]
800889e: f000 f89d bl 80089dc <I2C_WaitOnTXISFlagUntilTimeout>
80088a2: 4603 mov r3, r0
80088a4: 2b00 cmp r3, #0
80088a6: d001 beq.n 80088ac <I2C_RequestMemoryRead+0x40>
{
return HAL_ERROR;
80088a8: 2301 movs r3, #1
80088aa: e02c b.n 8008906 <I2C_RequestMemoryRead+0x9a>
}
/* If Memory address size is 8Bit */
if (MemAddSize == I2C_MEMADD_SIZE_8BIT)
80088ac: 88fb ldrh r3, [r7, #6]
80088ae: 2b01 cmp r3, #1
80088b0: d105 bne.n 80088be <I2C_RequestMemoryRead+0x52>
{
/* Send Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
80088b2: 893b ldrh r3, [r7, #8]
80088b4: b2da uxtb r2, r3
80088b6: 68fb ldr r3, [r7, #12]
80088b8: 681b ldr r3, [r3, #0]
80088ba: 629a str r2, [r3, #40] ; 0x28
80088bc: e015 b.n 80088ea <I2C_RequestMemoryRead+0x7e>
}
/* If Memory address size is 16Bit */
else
{
/* Send MSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress);
80088be: 893b ldrh r3, [r7, #8]
80088c0: 0a1b lsrs r3, r3, #8
80088c2: b29b uxth r3, r3
80088c4: b2da uxtb r2, r3
80088c6: 68fb ldr r3, [r7, #12]
80088c8: 681b ldr r3, [r3, #0]
80088ca: 629a str r2, [r3, #40] ; 0x28
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
80088cc: 69fa ldr r2, [r7, #28]
80088ce: 69b9 ldr r1, [r7, #24]
80088d0: 68f8 ldr r0, [r7, #12]
80088d2: f000 f883 bl 80089dc <I2C_WaitOnTXISFlagUntilTimeout>
80088d6: 4603 mov r3, r0
80088d8: 2b00 cmp r3, #0
80088da: d001 beq.n 80088e0 <I2C_RequestMemoryRead+0x74>
{
return HAL_ERROR;
80088dc: 2301 movs r3, #1
80088de: e012 b.n 8008906 <I2C_RequestMemoryRead+0x9a>
}
/* Send LSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
80088e0: 893b ldrh r3, [r7, #8]
80088e2: b2da uxtb r2, r3
80088e4: 68fb ldr r3, [r7, #12]
80088e6: 681b ldr r3, [r3, #0]
80088e8: 629a str r2, [r3, #40] ; 0x28
}
/* Wait until TC flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TC, RESET, Timeout, Tickstart) != HAL_OK)
80088ea: 69fb ldr r3, [r7, #28]
80088ec: 9300 str r3, [sp, #0]
80088ee: 69bb ldr r3, [r7, #24]
80088f0: 2200 movs r2, #0
80088f2: 2140 movs r1, #64 ; 0x40
80088f4: 68f8 ldr r0, [r7, #12]
80088f6: f000 f831 bl 800895c <I2C_WaitOnFlagUntilTimeout>
80088fa: 4603 mov r3, r0
80088fc: 2b00 cmp r3, #0
80088fe: d001 beq.n 8008904 <I2C_RequestMemoryRead+0x98>
{
return HAL_ERROR;
8008900: 2301 movs r3, #1
8008902: e000 b.n 8008906 <I2C_RequestMemoryRead+0x9a>
}
return HAL_OK;
8008904: 2300 movs r3, #0
}
8008906: 4618 mov r0, r3
8008908: 3710 adds r7, #16
800890a: 46bd mov sp, r7
800890c: bd80 pop {r7, pc}
800890e: bf00 nop
8008910: 80002000 .word 0x80002000
08008914 <I2C_Flush_TXDR>:
* @brief I2C Tx data register flush process.
* @param hi2c I2C handle.
* @retval None
*/
static void I2C_Flush_TXDR(I2C_HandleTypeDef *hi2c)
{
8008914: b480 push {r7}
8008916: b083 sub sp, #12
8008918: af00 add r7, sp, #0
800891a: 6078 str r0, [r7, #4]
/* If a pending TXIS flag is set */
/* Write a dummy data in TXDR to clear it */
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) != RESET)
800891c: 687b ldr r3, [r7, #4]
800891e: 681b ldr r3, [r3, #0]
8008920: 699b ldr r3, [r3, #24]
8008922: f003 0302 and.w r3, r3, #2
8008926: 2b02 cmp r3, #2
8008928: d103 bne.n 8008932 <I2C_Flush_TXDR+0x1e>
{
hi2c->Instance->TXDR = 0x00U;
800892a: 687b ldr r3, [r7, #4]
800892c: 681b ldr r3, [r3, #0]
800892e: 2200 movs r2, #0
8008930: 629a str r2, [r3, #40] ; 0x28
}
/* Flush TX register if not empty */
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXE) == RESET)
8008932: 687b ldr r3, [r7, #4]
8008934: 681b ldr r3, [r3, #0]
8008936: 699b ldr r3, [r3, #24]
8008938: f003 0301 and.w r3, r3, #1
800893c: 2b01 cmp r3, #1
800893e: d007 beq.n 8008950 <I2C_Flush_TXDR+0x3c>
{
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_TXE);
8008940: 687b ldr r3, [r7, #4]
8008942: 681b ldr r3, [r3, #0]
8008944: 699a ldr r2, [r3, #24]
8008946: 687b ldr r3, [r7, #4]
8008948: 681b ldr r3, [r3, #0]
800894a: f042 0201 orr.w r2, r2, #1
800894e: 619a str r2, [r3, #24]
}
}
8008950: bf00 nop
8008952: 370c adds r7, #12
8008954: 46bd mov sp, r7
8008956: f85d 7b04 ldr.w r7, [sp], #4
800895a: 4770 bx lr
0800895c <I2C_WaitOnFlagUntilTimeout>:
* @param Timeout Timeout duration
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_WaitOnFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Flag, FlagStatus Status, uint32_t Timeout, uint32_t Tickstart)
{
800895c: b580 push {r7, lr}
800895e: b084 sub sp, #16
8008960: af00 add r7, sp, #0
8008962: 60f8 str r0, [r7, #12]
8008964: 60b9 str r1, [r7, #8]
8008966: 603b str r3, [r7, #0]
8008968: 4613 mov r3, r2
800896a: 71fb strb r3, [r7, #7]
while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)
800896c: e022 b.n 80089b4 <I2C_WaitOnFlagUntilTimeout+0x58>
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
800896e: 683b ldr r3, [r7, #0]
8008970: f1b3 3fff cmp.w r3, #4294967295
8008974: d01e beq.n 80089b4 <I2C_WaitOnFlagUntilTimeout+0x58>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
8008976: f7fc fcd3 bl 8005320 <HAL_GetTick>
800897a: 4602 mov r2, r0
800897c: 69bb ldr r3, [r7, #24]
800897e: 1ad3 subs r3, r2, r3
8008980: 683a ldr r2, [r7, #0]
8008982: 429a cmp r2, r3
8008984: d302 bcc.n 800898c <I2C_WaitOnFlagUntilTimeout+0x30>
8008986: 683b ldr r3, [r7, #0]
8008988: 2b00 cmp r3, #0
800898a: d113 bne.n 80089b4 <I2C_WaitOnFlagUntilTimeout+0x58>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
800898c: 68fb ldr r3, [r7, #12]
800898e: 6c5b ldr r3, [r3, #68] ; 0x44
8008990: f043 0220 orr.w r2, r3, #32
8008994: 68fb ldr r3, [r7, #12]
8008996: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8008998: 68fb ldr r3, [r7, #12]
800899a: 2220 movs r2, #32
800899c: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
80089a0: 68fb ldr r3, [r7, #12]
80089a2: 2200 movs r2, #0
80089a4: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
80089a8: 68fb ldr r3, [r7, #12]
80089aa: 2200 movs r2, #0
80089ac: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
80089b0: 2301 movs r3, #1
80089b2: e00f b.n 80089d4 <I2C_WaitOnFlagUntilTimeout+0x78>
while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)
80089b4: 68fb ldr r3, [r7, #12]
80089b6: 681b ldr r3, [r3, #0]
80089b8: 699a ldr r2, [r3, #24]
80089ba: 68bb ldr r3, [r7, #8]
80089bc: 4013 ands r3, r2
80089be: 68ba ldr r2, [r7, #8]
80089c0: 429a cmp r2, r3
80089c2: bf0c ite eq
80089c4: 2301 moveq r3, #1
80089c6: 2300 movne r3, #0
80089c8: b2db uxtb r3, r3
80089ca: 461a mov r2, r3
80089cc: 79fb ldrb r3, [r7, #7]
80089ce: 429a cmp r2, r3
80089d0: d0cd beq.n 800896e <I2C_WaitOnFlagUntilTimeout+0x12>
}
}
}
return HAL_OK;
80089d2: 2300 movs r3, #0
}
80089d4: 4618 mov r0, r3
80089d6: 3710 adds r7, #16
80089d8: 46bd mov sp, r7
80089da: bd80 pop {r7, pc}
080089dc <I2C_WaitOnTXISFlagUntilTimeout>:
* @param Timeout Timeout duration
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_WaitOnTXISFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart)
{
80089dc: b580 push {r7, lr}
80089de: b084 sub sp, #16
80089e0: af00 add r7, sp, #0
80089e2: 60f8 str r0, [r7, #12]
80089e4: 60b9 str r1, [r7, #8]
80089e6: 607a str r2, [r7, #4]
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) == RESET)
80089e8: e02c b.n 8008a44 <I2C_WaitOnTXISFlagUntilTimeout+0x68>
{
/* Check if a NACK is detected */
if (I2C_IsAcknowledgeFailed(hi2c, Timeout, Tickstart) != HAL_OK)
80089ea: 687a ldr r2, [r7, #4]
80089ec: 68b9 ldr r1, [r7, #8]
80089ee: 68f8 ldr r0, [r7, #12]
80089f0: f000 f870 bl 8008ad4 <I2C_IsAcknowledgeFailed>
80089f4: 4603 mov r3, r0
80089f6: 2b00 cmp r3, #0
80089f8: d001 beq.n 80089fe <I2C_WaitOnTXISFlagUntilTimeout+0x22>
{
return HAL_ERROR;
80089fa: 2301 movs r3, #1
80089fc: e02a b.n 8008a54 <I2C_WaitOnTXISFlagUntilTimeout+0x78>
}
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
80089fe: 68bb ldr r3, [r7, #8]
8008a00: f1b3 3fff cmp.w r3, #4294967295
8008a04: d01e beq.n 8008a44 <I2C_WaitOnTXISFlagUntilTimeout+0x68>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
8008a06: f7fc fc8b bl 8005320 <HAL_GetTick>
8008a0a: 4602 mov r2, r0
8008a0c: 687b ldr r3, [r7, #4]
8008a0e: 1ad3 subs r3, r2, r3
8008a10: 68ba ldr r2, [r7, #8]
8008a12: 429a cmp r2, r3
8008a14: d302 bcc.n 8008a1c <I2C_WaitOnTXISFlagUntilTimeout+0x40>
8008a16: 68bb ldr r3, [r7, #8]
8008a18: 2b00 cmp r3, #0
8008a1a: d113 bne.n 8008a44 <I2C_WaitOnTXISFlagUntilTimeout+0x68>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
8008a1c: 68fb ldr r3, [r7, #12]
8008a1e: 6c5b ldr r3, [r3, #68] ; 0x44
8008a20: f043 0220 orr.w r2, r3, #32
8008a24: 68fb ldr r3, [r7, #12]
8008a26: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8008a28: 68fb ldr r3, [r7, #12]
8008a2a: 2220 movs r2, #32
8008a2c: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
8008a30: 68fb ldr r3, [r7, #12]
8008a32: 2200 movs r2, #0
8008a34: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008a38: 68fb ldr r3, [r7, #12]
8008a3a: 2200 movs r2, #0
8008a3c: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8008a40: 2301 movs r3, #1
8008a42: e007 b.n 8008a54 <I2C_WaitOnTXISFlagUntilTimeout+0x78>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) == RESET)
8008a44: 68fb ldr r3, [r7, #12]
8008a46: 681b ldr r3, [r3, #0]
8008a48: 699b ldr r3, [r3, #24]
8008a4a: f003 0302 and.w r3, r3, #2
8008a4e: 2b02 cmp r3, #2
8008a50: d1cb bne.n 80089ea <I2C_WaitOnTXISFlagUntilTimeout+0xe>
}
}
}
return HAL_OK;
8008a52: 2300 movs r3, #0
}
8008a54: 4618 mov r0, r3
8008a56: 3710 adds r7, #16
8008a58: 46bd mov sp, r7
8008a5a: bd80 pop {r7, pc}
08008a5c <I2C_WaitOnSTOPFlagUntilTimeout>:
* @param Timeout Timeout duration
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_WaitOnSTOPFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart)
{
8008a5c: b580 push {r7, lr}
8008a5e: b084 sub sp, #16
8008a60: af00 add r7, sp, #0
8008a62: 60f8 str r0, [r7, #12]
8008a64: 60b9 str r1, [r7, #8]
8008a66: 607a str r2, [r7, #4]
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
8008a68: e028 b.n 8008abc <I2C_WaitOnSTOPFlagUntilTimeout+0x60>
{
/* Check if a NACK is detected */
if (I2C_IsAcknowledgeFailed(hi2c, Timeout, Tickstart) != HAL_OK)
8008a6a: 687a ldr r2, [r7, #4]
8008a6c: 68b9 ldr r1, [r7, #8]
8008a6e: 68f8 ldr r0, [r7, #12]
8008a70: f000 f830 bl 8008ad4 <I2C_IsAcknowledgeFailed>
8008a74: 4603 mov r3, r0
8008a76: 2b00 cmp r3, #0
8008a78: d001 beq.n 8008a7e <I2C_WaitOnSTOPFlagUntilTimeout+0x22>
{
return HAL_ERROR;
8008a7a: 2301 movs r3, #1
8008a7c: e026 b.n 8008acc <I2C_WaitOnSTOPFlagUntilTimeout+0x70>
}
/* Check for the Timeout */
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
8008a7e: f7fc fc4f bl 8005320 <HAL_GetTick>
8008a82: 4602 mov r2, r0
8008a84: 687b ldr r3, [r7, #4]
8008a86: 1ad3 subs r3, r2, r3
8008a88: 68ba ldr r2, [r7, #8]
8008a8a: 429a cmp r2, r3
8008a8c: d302 bcc.n 8008a94 <I2C_WaitOnSTOPFlagUntilTimeout+0x38>
8008a8e: 68bb ldr r3, [r7, #8]
8008a90: 2b00 cmp r3, #0
8008a92: d113 bne.n 8008abc <I2C_WaitOnSTOPFlagUntilTimeout+0x60>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
8008a94: 68fb ldr r3, [r7, #12]
8008a96: 6c5b ldr r3, [r3, #68] ; 0x44
8008a98: f043 0220 orr.w r2, r3, #32
8008a9c: 68fb ldr r3, [r7, #12]
8008a9e: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8008aa0: 68fb ldr r3, [r7, #12]
8008aa2: 2220 movs r2, #32
8008aa4: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
8008aa8: 68fb ldr r3, [r7, #12]
8008aaa: 2200 movs r2, #0
8008aac: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008ab0: 68fb ldr r3, [r7, #12]
8008ab2: 2200 movs r2, #0
8008ab4: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8008ab8: 2301 movs r3, #1
8008aba: e007 b.n 8008acc <I2C_WaitOnSTOPFlagUntilTimeout+0x70>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
8008abc: 68fb ldr r3, [r7, #12]
8008abe: 681b ldr r3, [r3, #0]
8008ac0: 699b ldr r3, [r3, #24]
8008ac2: f003 0320 and.w r3, r3, #32
8008ac6: 2b20 cmp r3, #32
8008ac8: d1cf bne.n 8008a6a <I2C_WaitOnSTOPFlagUntilTimeout+0xe>
}
}
return HAL_OK;
8008aca: 2300 movs r3, #0
}
8008acc: 4618 mov r0, r3
8008ace: 3710 adds r7, #16
8008ad0: 46bd mov sp, r7
8008ad2: bd80 pop {r7, pc}
08008ad4 <I2C_IsAcknowledgeFailed>:
* @param Timeout Timeout duration
* @param Tickstart Tick start value
* @retval HAL status
*/
static HAL_StatusTypeDef I2C_IsAcknowledgeFailed(I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart)
{
8008ad4: b580 push {r7, lr}
8008ad6: b084 sub sp, #16
8008ad8: af00 add r7, sp, #0
8008ada: 60f8 str r0, [r7, #12]
8008adc: 60b9 str r1, [r7, #8]
8008ade: 607a str r2, [r7, #4]
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF) == SET)
8008ae0: 68fb ldr r3, [r7, #12]
8008ae2: 681b ldr r3, [r3, #0]
8008ae4: 699b ldr r3, [r3, #24]
8008ae6: f003 0310 and.w r3, r3, #16
8008aea: 2b10 cmp r3, #16
8008aec: d151 bne.n 8008b92 <I2C_IsAcknowledgeFailed+0xbe>
{
/* Wait until STOP Flag is reset */
/* AutoEnd should be initiate after AF */
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
8008aee: e022 b.n 8008b36 <I2C_IsAcknowledgeFailed+0x62>
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
8008af0: 68bb ldr r3, [r7, #8]
8008af2: f1b3 3fff cmp.w r3, #4294967295
8008af6: d01e beq.n 8008b36 <I2C_IsAcknowledgeFailed+0x62>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
8008af8: f7fc fc12 bl 8005320 <HAL_GetTick>
8008afc: 4602 mov r2, r0
8008afe: 687b ldr r3, [r7, #4]
8008b00: 1ad3 subs r3, r2, r3
8008b02: 68ba ldr r2, [r7, #8]
8008b04: 429a cmp r2, r3
8008b06: d302 bcc.n 8008b0e <I2C_IsAcknowledgeFailed+0x3a>
8008b08: 68bb ldr r3, [r7, #8]
8008b0a: 2b00 cmp r3, #0
8008b0c: d113 bne.n 8008b36 <I2C_IsAcknowledgeFailed+0x62>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
8008b0e: 68fb ldr r3, [r7, #12]
8008b10: 6c5b ldr r3, [r3, #68] ; 0x44
8008b12: f043 0220 orr.w r2, r3, #32
8008b16: 68fb ldr r3, [r7, #12]
8008b18: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8008b1a: 68fb ldr r3, [r7, #12]
8008b1c: 2220 movs r2, #32
8008b1e: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
8008b22: 68fb ldr r3, [r7, #12]
8008b24: 2200 movs r2, #0
8008b26: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008b2a: 68fb ldr r3, [r7, #12]
8008b2c: 2200 movs r2, #0
8008b2e: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8008b32: 2301 movs r3, #1
8008b34: e02e b.n 8008b94 <I2C_IsAcknowledgeFailed+0xc0>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
8008b36: 68fb ldr r3, [r7, #12]
8008b38: 681b ldr r3, [r3, #0]
8008b3a: 699b ldr r3, [r3, #24]
8008b3c: f003 0320 and.w r3, r3, #32
8008b40: 2b20 cmp r3, #32
8008b42: d1d5 bne.n 8008af0 <I2C_IsAcknowledgeFailed+0x1c>
}
}
}
/* Clear NACKF Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF);
8008b44: 68fb ldr r3, [r7, #12]
8008b46: 681b ldr r3, [r3, #0]
8008b48: 2210 movs r2, #16
8008b4a: 61da str r2, [r3, #28]
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
8008b4c: 68fb ldr r3, [r7, #12]
8008b4e: 681b ldr r3, [r3, #0]
8008b50: 2220 movs r2, #32
8008b52: 61da str r2, [r3, #28]
/* Flush TX register */
I2C_Flush_TXDR(hi2c);
8008b54: 68f8 ldr r0, [r7, #12]
8008b56: f7ff fedd bl 8008914 <I2C_Flush_TXDR>
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
8008b5a: 68fb ldr r3, [r7, #12]
8008b5c: 681b ldr r3, [r3, #0]
8008b5e: 6859 ldr r1, [r3, #4]
8008b60: 68fb ldr r3, [r7, #12]
8008b62: 681a ldr r2, [r3, #0]
8008b64: 4b0d ldr r3, [pc, #52] ; (8008b9c <I2C_IsAcknowledgeFailed+0xc8>)
8008b66: 400b ands r3, r1
8008b68: 6053 str r3, [r2, #4]
hi2c->ErrorCode |= HAL_I2C_ERROR_AF;
8008b6a: 68fb ldr r3, [r7, #12]
8008b6c: 6c5b ldr r3, [r3, #68] ; 0x44
8008b6e: f043 0204 orr.w r2, r3, #4
8008b72: 68fb ldr r3, [r7, #12]
8008b74: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8008b76: 68fb ldr r3, [r7, #12]
8008b78: 2220 movs r2, #32
8008b7a: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
8008b7e: 68fb ldr r3, [r7, #12]
8008b80: 2200 movs r2, #0
8008b82: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008b86: 68fb ldr r3, [r7, #12]
8008b88: 2200 movs r2, #0
8008b8a: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8008b8e: 2301 movs r3, #1
8008b90: e000 b.n 8008b94 <I2C_IsAcknowledgeFailed+0xc0>
}
return HAL_OK;
8008b92: 2300 movs r3, #0
}
8008b94: 4618 mov r0, r3
8008b96: 3710 adds r7, #16
8008b98: 46bd mov sp, r7
8008b9a: bd80 pop {r7, pc}
8008b9c: fe00e800 .word 0xfe00e800
08008ba0 <I2C_TransferConfig>:
* @arg @ref I2C_GENERATE_START_READ Generate Restart for read request.
* @arg @ref I2C_GENERATE_START_WRITE Generate Restart for write request.
* @retval None
*/
static void I2C_TransferConfig(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t Size, uint32_t Mode, uint32_t Request)
{
8008ba0: b480 push {r7}
8008ba2: b085 sub sp, #20
8008ba4: af00 add r7, sp, #0
8008ba6: 60f8 str r0, [r7, #12]
8008ba8: 607b str r3, [r7, #4]
8008baa: 460b mov r3, r1
8008bac: 817b strh r3, [r7, #10]
8008bae: 4613 mov r3, r2
8008bb0: 727b strb r3, [r7, #9]
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
assert_param(IS_TRANSFER_MODE(Mode));
assert_param(IS_TRANSFER_REQUEST(Request));
/* update CR2 register */
MODIFY_REG(hi2c->Instance->CR2, ((I2C_CR2_SADD | I2C_CR2_NBYTES | I2C_CR2_RELOAD | I2C_CR2_AUTOEND | (I2C_CR2_RD_WRN & (uint32_t)(Request >> (31U - I2C_CR2_RD_WRN_Pos))) | I2C_CR2_START | I2C_CR2_STOP)), \
8008bb2: 68fb ldr r3, [r7, #12]
8008bb4: 681b ldr r3, [r3, #0]
8008bb6: 685a ldr r2, [r3, #4]
8008bb8: 69bb ldr r3, [r7, #24]
8008bba: 0d5b lsrs r3, r3, #21
8008bbc: f403 6180 and.w r1, r3, #1024 ; 0x400
8008bc0: 4b0d ldr r3, [pc, #52] ; (8008bf8 <I2C_TransferConfig+0x58>)
8008bc2: 430b orrs r3, r1
8008bc4: 43db mvns r3, r3
8008bc6: ea02 0103 and.w r1, r2, r3
8008bca: 897b ldrh r3, [r7, #10]
8008bcc: f3c3 0209 ubfx r2, r3, #0, #10
8008bd0: 7a7b ldrb r3, [r7, #9]
8008bd2: 041b lsls r3, r3, #16
8008bd4: f403 037f and.w r3, r3, #16711680 ; 0xff0000
8008bd8: 431a orrs r2, r3
8008bda: 687b ldr r3, [r7, #4]
8008bdc: 431a orrs r2, r3
8008bde: 69bb ldr r3, [r7, #24]
8008be0: 431a orrs r2, r3
8008be2: 68fb ldr r3, [r7, #12]
8008be4: 681b ldr r3, [r3, #0]
8008be6: 430a orrs r2, r1
8008be8: 605a str r2, [r3, #4]
(uint32_t)(((uint32_t)DevAddress & I2C_CR2_SADD) | (((uint32_t)Size << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | (uint32_t)Mode | (uint32_t)Request));
}
8008bea: bf00 nop
8008bec: 3714 adds r7, #20
8008bee: 46bd mov sp, r7
8008bf0: f85d 7b04 ldr.w r7, [sp], #4
8008bf4: 4770 bx lr
8008bf6: bf00 nop
8008bf8: 03ff63ff .word 0x03ff63ff
08008bfc <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)
{
8008bfc: b480 push {r7}
8008bfe: b083 sub sp, #12
8008c00: af00 add r7, sp, #0
8008c02: 6078 str r0, [r7, #4]
8008c04: 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)
8008c06: 687b ldr r3, [r7, #4]
8008c08: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
8008c0c: b2db uxtb r3, r3
8008c0e: 2b20 cmp r3, #32
8008c10: d138 bne.n 8008c84 <HAL_I2CEx_ConfigAnalogFilter+0x88>
{
/* Process Locked */
__HAL_LOCK(hi2c);
8008c12: 687b ldr r3, [r7, #4]
8008c14: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
8008c18: 2b01 cmp r3, #1
8008c1a: d101 bne.n 8008c20 <HAL_I2CEx_ConfigAnalogFilter+0x24>
8008c1c: 2302 movs r3, #2
8008c1e: e032 b.n 8008c86 <HAL_I2CEx_ConfigAnalogFilter+0x8a>
8008c20: 687b ldr r3, [r7, #4]
8008c22: 2201 movs r2, #1
8008c24: f883 2040 strb.w r2, [r3, #64] ; 0x40
hi2c->State = HAL_I2C_STATE_BUSY;
8008c28: 687b ldr r3, [r7, #4]
8008c2a: 2224 movs r2, #36 ; 0x24
8008c2c: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
8008c30: 687b ldr r3, [r7, #4]
8008c32: 681b ldr r3, [r3, #0]
8008c34: 681a ldr r2, [r3, #0]
8008c36: 687b ldr r3, [r7, #4]
8008c38: 681b ldr r3, [r3, #0]
8008c3a: f022 0201 bic.w r2, r2, #1
8008c3e: 601a str r2, [r3, #0]
/* Reset I2Cx ANOFF bit */
hi2c->Instance->CR1 &= ~(I2C_CR1_ANFOFF);
8008c40: 687b ldr r3, [r7, #4]
8008c42: 681b ldr r3, [r3, #0]
8008c44: 681a ldr r2, [r3, #0]
8008c46: 687b ldr r3, [r7, #4]
8008c48: 681b ldr r3, [r3, #0]
8008c4a: f422 5280 bic.w r2, r2, #4096 ; 0x1000
8008c4e: 601a str r2, [r3, #0]
/* Set analog filter bit*/
hi2c->Instance->CR1 |= AnalogFilter;
8008c50: 687b ldr r3, [r7, #4]
8008c52: 681b ldr r3, [r3, #0]
8008c54: 6819 ldr r1, [r3, #0]
8008c56: 687b ldr r3, [r7, #4]
8008c58: 681b ldr r3, [r3, #0]
8008c5a: 683a ldr r2, [r7, #0]
8008c5c: 430a orrs r2, r1
8008c5e: 601a str r2, [r3, #0]
__HAL_I2C_ENABLE(hi2c);
8008c60: 687b ldr r3, [r7, #4]
8008c62: 681b ldr r3, [r3, #0]
8008c64: 681a ldr r2, [r3, #0]
8008c66: 687b ldr r3, [r7, #4]
8008c68: 681b ldr r3, [r3, #0]
8008c6a: f042 0201 orr.w r2, r2, #1
8008c6e: 601a str r2, [r3, #0]
hi2c->State = HAL_I2C_STATE_READY;
8008c70: 687b ldr r3, [r7, #4]
8008c72: 2220 movs r2, #32
8008c74: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008c78: 687b ldr r3, [r7, #4]
8008c7a: 2200 movs r2, #0
8008c7c: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
8008c80: 2300 movs r3, #0
8008c82: e000 b.n 8008c86 <HAL_I2CEx_ConfigAnalogFilter+0x8a>
}
else
{
return HAL_BUSY;
8008c84: 2302 movs r3, #2
}
}
8008c86: 4618 mov r0, r3
8008c88: 370c adds r7, #12
8008c8a: 46bd mov sp, r7
8008c8c: f85d 7b04 ldr.w r7, [sp], #4
8008c90: 4770 bx lr
08008c92 <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)
{
8008c92: b480 push {r7}
8008c94: b085 sub sp, #20
8008c96: af00 add r7, sp, #0
8008c98: 6078 str r0, [r7, #4]
8008c9a: 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)
8008c9c: 687b ldr r3, [r7, #4]
8008c9e: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
8008ca2: b2db uxtb r3, r3
8008ca4: 2b20 cmp r3, #32
8008ca6: d139 bne.n 8008d1c <HAL_I2CEx_ConfigDigitalFilter+0x8a>
{
/* Process Locked */
__HAL_LOCK(hi2c);
8008ca8: 687b ldr r3, [r7, #4]
8008caa: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
8008cae: 2b01 cmp r3, #1
8008cb0: d101 bne.n 8008cb6 <HAL_I2CEx_ConfigDigitalFilter+0x24>
8008cb2: 2302 movs r3, #2
8008cb4: e033 b.n 8008d1e <HAL_I2CEx_ConfigDigitalFilter+0x8c>
8008cb6: 687b ldr r3, [r7, #4]
8008cb8: 2201 movs r2, #1
8008cba: f883 2040 strb.w r2, [r3, #64] ; 0x40
hi2c->State = HAL_I2C_STATE_BUSY;
8008cbe: 687b ldr r3, [r7, #4]
8008cc0: 2224 movs r2, #36 ; 0x24
8008cc2: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
8008cc6: 687b ldr r3, [r7, #4]
8008cc8: 681b ldr r3, [r3, #0]
8008cca: 681a ldr r2, [r3, #0]
8008ccc: 687b ldr r3, [r7, #4]
8008cce: 681b ldr r3, [r3, #0]
8008cd0: f022 0201 bic.w r2, r2, #1
8008cd4: 601a str r2, [r3, #0]
/* Get the old register value */
tmpreg = hi2c->Instance->CR1;
8008cd6: 687b ldr r3, [r7, #4]
8008cd8: 681b ldr r3, [r3, #0]
8008cda: 681b ldr r3, [r3, #0]
8008cdc: 60fb str r3, [r7, #12]
/* Reset I2Cx DNF bits [11:8] */
tmpreg &= ~(I2C_CR1_DNF);
8008cde: 68fb ldr r3, [r7, #12]
8008ce0: f423 6370 bic.w r3, r3, #3840 ; 0xf00
8008ce4: 60fb str r3, [r7, #12]
/* Set I2Cx DNF coefficient */
tmpreg |= DigitalFilter << 8U;
8008ce6: 683b ldr r3, [r7, #0]
8008ce8: 021b lsls r3, r3, #8
8008cea: 68fa ldr r2, [r7, #12]
8008cec: 4313 orrs r3, r2
8008cee: 60fb str r3, [r7, #12]
/* Store the new register value */
hi2c->Instance->CR1 = tmpreg;
8008cf0: 687b ldr r3, [r7, #4]
8008cf2: 681b ldr r3, [r3, #0]
8008cf4: 68fa ldr r2, [r7, #12]
8008cf6: 601a str r2, [r3, #0]
__HAL_I2C_ENABLE(hi2c);
8008cf8: 687b ldr r3, [r7, #4]
8008cfa: 681b ldr r3, [r3, #0]
8008cfc: 681a ldr r2, [r3, #0]
8008cfe: 687b ldr r3, [r7, #4]
8008d00: 681b ldr r3, [r3, #0]
8008d02: f042 0201 orr.w r2, r2, #1
8008d06: 601a str r2, [r3, #0]
hi2c->State = HAL_I2C_STATE_READY;
8008d08: 687b ldr r3, [r7, #4]
8008d0a: 2220 movs r2, #32
8008d0c: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008d10: 687b ldr r3, [r7, #4]
8008d12: 2200 movs r2, #0
8008d14: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
8008d18: 2300 movs r3, #0
8008d1a: e000 b.n 8008d1e <HAL_I2CEx_ConfigDigitalFilter+0x8c>
}
else
{
return HAL_BUSY;
8008d1c: 2302 movs r3, #2
}
}
8008d1e: 4618 mov r0, r3
8008d20: 3714 adds r7, #20
8008d22: 46bd mov sp, r7
8008d24: f85d 7b04 ldr.w r7, [sp], #4
8008d28: 4770 bx lr
...
08008d2c <HAL_LTDC_Init>:
* @param hltdc pointer to a LTDC_HandleTypeDef structure that contains
* the configuration information for the LTDC.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc)
{
8008d2c: b580 push {r7, lr}
8008d2e: b084 sub sp, #16
8008d30: af00 add r7, sp, #0
8008d32: 6078 str r0, [r7, #4]
uint32_t tmp, tmp1;
/* Check the LTDC peripheral state */
if (hltdc == NULL)
8008d34: 687b ldr r3, [r7, #4]
8008d36: 2b00 cmp r3, #0
8008d38: d101 bne.n 8008d3e <HAL_LTDC_Init+0x12>
{
return HAL_ERROR;
8008d3a: 2301 movs r3, #1
8008d3c: e0bf b.n 8008ebe <HAL_LTDC_Init+0x192>
}
/* Init the low level hardware */
hltdc->MspInitCallback(hltdc);
}
#else
if (hltdc->State == HAL_LTDC_STATE_RESET)
8008d3e: 687b ldr r3, [r7, #4]
8008d40: f893 30a1 ldrb.w r3, [r3, #161] ; 0xa1
8008d44: b2db uxtb r3, r3
8008d46: 2b00 cmp r3, #0
8008d48: d106 bne.n 8008d58 <HAL_LTDC_Init+0x2c>
{
/* Allocate lock resource and initialize it */
hltdc->Lock = HAL_UNLOCKED;
8008d4a: 687b ldr r3, [r7, #4]
8008d4c: 2200 movs r2, #0
8008d4e: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
/* Init the low level hardware */
HAL_LTDC_MspInit(hltdc);
8008d52: 6878 ldr r0, [r7, #4]
8008d54: f7fb fdae bl 80048b4 <HAL_LTDC_MspInit>
}
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
/* Change LTDC peripheral state */
hltdc->State = HAL_LTDC_STATE_BUSY;
8008d58: 687b ldr r3, [r7, #4]
8008d5a: 2202 movs r2, #2
8008d5c: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Configure the HS, VS, DE and PC polarity */
hltdc->Instance->GCR &= ~(LTDC_GCR_HSPOL | LTDC_GCR_VSPOL | LTDC_GCR_DEPOL | LTDC_GCR_PCPOL);
8008d60: 687b ldr r3, [r7, #4]
8008d62: 681b ldr r3, [r3, #0]
8008d64: 699a ldr r2, [r3, #24]
8008d66: 687b ldr r3, [r7, #4]
8008d68: 681b ldr r3, [r3, #0]
8008d6a: f022 4270 bic.w r2, r2, #4026531840 ; 0xf0000000
8008d6e: 619a str r2, [r3, #24]
hltdc->Instance->GCR |= (uint32_t)(hltdc->Init.HSPolarity | hltdc->Init.VSPolarity | \
8008d70: 687b ldr r3, [r7, #4]
8008d72: 681b ldr r3, [r3, #0]
8008d74: 6999 ldr r1, [r3, #24]
8008d76: 687b ldr r3, [r7, #4]
8008d78: 685a ldr r2, [r3, #4]
8008d7a: 687b ldr r3, [r7, #4]
8008d7c: 689b ldr r3, [r3, #8]
8008d7e: 431a orrs r2, r3
hltdc->Init.DEPolarity | hltdc->Init.PCPolarity);
8008d80: 687b ldr r3, [r7, #4]
8008d82: 68db ldr r3, [r3, #12]
hltdc->Instance->GCR |= (uint32_t)(hltdc->Init.HSPolarity | hltdc->Init.VSPolarity | \
8008d84: 431a orrs r2, r3
hltdc->Init.DEPolarity | hltdc->Init.PCPolarity);
8008d86: 687b ldr r3, [r7, #4]
8008d88: 691b ldr r3, [r3, #16]
8008d8a: 431a orrs r2, r3
hltdc->Instance->GCR |= (uint32_t)(hltdc->Init.HSPolarity | hltdc->Init.VSPolarity | \
8008d8c: 687b ldr r3, [r7, #4]
8008d8e: 681b ldr r3, [r3, #0]
8008d90: 430a orrs r2, r1
8008d92: 619a str r2, [r3, #24]
/* Set Synchronization size */
hltdc->Instance->SSCR &= ~(LTDC_SSCR_VSH | LTDC_SSCR_HSW);
8008d94: 687b ldr r3, [r7, #4]
8008d96: 681b ldr r3, [r3, #0]
8008d98: 6899 ldr r1, [r3, #8]
8008d9a: 687b ldr r3, [r7, #4]
8008d9c: 681a ldr r2, [r3, #0]
8008d9e: 4b4a ldr r3, [pc, #296] ; (8008ec8 <HAL_LTDC_Init+0x19c>)
8008da0: 400b ands r3, r1
8008da2: 6093 str r3, [r2, #8]
tmp = (hltdc->Init.HorizontalSync << 16U);
8008da4: 687b ldr r3, [r7, #4]
8008da6: 695b ldr r3, [r3, #20]
8008da8: 041b lsls r3, r3, #16
8008daa: 60fb str r3, [r7, #12]
hltdc->Instance->SSCR |= (tmp | hltdc->Init.VerticalSync);
8008dac: 687b ldr r3, [r7, #4]
8008dae: 681b ldr r3, [r3, #0]
8008db0: 6899 ldr r1, [r3, #8]
8008db2: 687b ldr r3, [r7, #4]
8008db4: 699a ldr r2, [r3, #24]
8008db6: 68fb ldr r3, [r7, #12]
8008db8: 431a orrs r2, r3
8008dba: 687b ldr r3, [r7, #4]
8008dbc: 681b ldr r3, [r3, #0]
8008dbe: 430a orrs r2, r1
8008dc0: 609a str r2, [r3, #8]
/* Set Accumulated Back porch */
hltdc->Instance->BPCR &= ~(LTDC_BPCR_AVBP | LTDC_BPCR_AHBP);
8008dc2: 687b ldr r3, [r7, #4]
8008dc4: 681b ldr r3, [r3, #0]
8008dc6: 68d9 ldr r1, [r3, #12]
8008dc8: 687b ldr r3, [r7, #4]
8008dca: 681a ldr r2, [r3, #0]
8008dcc: 4b3e ldr r3, [pc, #248] ; (8008ec8 <HAL_LTDC_Init+0x19c>)
8008dce: 400b ands r3, r1
8008dd0: 60d3 str r3, [r2, #12]
tmp = (hltdc->Init.AccumulatedHBP << 16U);
8008dd2: 687b ldr r3, [r7, #4]
8008dd4: 69db ldr r3, [r3, #28]
8008dd6: 041b lsls r3, r3, #16
8008dd8: 60fb str r3, [r7, #12]
hltdc->Instance->BPCR |= (tmp | hltdc->Init.AccumulatedVBP);
8008dda: 687b ldr r3, [r7, #4]
8008ddc: 681b ldr r3, [r3, #0]
8008dde: 68d9 ldr r1, [r3, #12]
8008de0: 687b ldr r3, [r7, #4]
8008de2: 6a1a ldr r2, [r3, #32]
8008de4: 68fb ldr r3, [r7, #12]
8008de6: 431a orrs r2, r3
8008de8: 687b ldr r3, [r7, #4]
8008dea: 681b ldr r3, [r3, #0]
8008dec: 430a orrs r2, r1
8008dee: 60da str r2, [r3, #12]
/* Set Accumulated Active Width */
hltdc->Instance->AWCR &= ~(LTDC_AWCR_AAH | LTDC_AWCR_AAW);
8008df0: 687b ldr r3, [r7, #4]
8008df2: 681b ldr r3, [r3, #0]
8008df4: 6919 ldr r1, [r3, #16]
8008df6: 687b ldr r3, [r7, #4]
8008df8: 681a ldr r2, [r3, #0]
8008dfa: 4b33 ldr r3, [pc, #204] ; (8008ec8 <HAL_LTDC_Init+0x19c>)
8008dfc: 400b ands r3, r1
8008dfe: 6113 str r3, [r2, #16]
tmp = (hltdc->Init.AccumulatedActiveW << 16U);
8008e00: 687b ldr r3, [r7, #4]
8008e02: 6a5b ldr r3, [r3, #36] ; 0x24
8008e04: 041b lsls r3, r3, #16
8008e06: 60fb str r3, [r7, #12]
hltdc->Instance->AWCR |= (tmp | hltdc->Init.AccumulatedActiveH);
8008e08: 687b ldr r3, [r7, #4]
8008e0a: 681b ldr r3, [r3, #0]
8008e0c: 6919 ldr r1, [r3, #16]
8008e0e: 687b ldr r3, [r7, #4]
8008e10: 6a9a ldr r2, [r3, #40] ; 0x28
8008e12: 68fb ldr r3, [r7, #12]
8008e14: 431a orrs r2, r3
8008e16: 687b ldr r3, [r7, #4]
8008e18: 681b ldr r3, [r3, #0]
8008e1a: 430a orrs r2, r1
8008e1c: 611a str r2, [r3, #16]
/* Set Total Width */
hltdc->Instance->TWCR &= ~(LTDC_TWCR_TOTALH | LTDC_TWCR_TOTALW);
8008e1e: 687b ldr r3, [r7, #4]
8008e20: 681b ldr r3, [r3, #0]
8008e22: 6959 ldr r1, [r3, #20]
8008e24: 687b ldr r3, [r7, #4]
8008e26: 681a ldr r2, [r3, #0]
8008e28: 4b27 ldr r3, [pc, #156] ; (8008ec8 <HAL_LTDC_Init+0x19c>)
8008e2a: 400b ands r3, r1
8008e2c: 6153 str r3, [r2, #20]
tmp = (hltdc->Init.TotalWidth << 16U);
8008e2e: 687b ldr r3, [r7, #4]
8008e30: 6adb ldr r3, [r3, #44] ; 0x2c
8008e32: 041b lsls r3, r3, #16
8008e34: 60fb str r3, [r7, #12]
hltdc->Instance->TWCR |= (tmp | hltdc->Init.TotalHeigh);
8008e36: 687b ldr r3, [r7, #4]
8008e38: 681b ldr r3, [r3, #0]
8008e3a: 6959 ldr r1, [r3, #20]
8008e3c: 687b ldr r3, [r7, #4]
8008e3e: 6b1a ldr r2, [r3, #48] ; 0x30
8008e40: 68fb ldr r3, [r7, #12]
8008e42: 431a orrs r2, r3
8008e44: 687b ldr r3, [r7, #4]
8008e46: 681b ldr r3, [r3, #0]
8008e48: 430a orrs r2, r1
8008e4a: 615a str r2, [r3, #20]
/* Set the background color value */
tmp = ((uint32_t)(hltdc->Init.Backcolor.Green) << 8U);
8008e4c: 687b ldr r3, [r7, #4]
8008e4e: f893 3035 ldrb.w r3, [r3, #53] ; 0x35
8008e52: 021b lsls r3, r3, #8
8008e54: 60fb str r3, [r7, #12]
tmp1 = ((uint32_t)(hltdc->Init.Backcolor.Red) << 16U);
8008e56: 687b ldr r3, [r7, #4]
8008e58: f893 3036 ldrb.w r3, [r3, #54] ; 0x36
8008e5c: 041b lsls r3, r3, #16
8008e5e: 60bb str r3, [r7, #8]
hltdc->Instance->BCCR &= ~(LTDC_BCCR_BCBLUE | LTDC_BCCR_BCGREEN | LTDC_BCCR_BCRED);
8008e60: 687b ldr r3, [r7, #4]
8008e62: 681b ldr r3, [r3, #0]
8008e64: 6ada ldr r2, [r3, #44] ; 0x2c
8008e66: 687b ldr r3, [r7, #4]
8008e68: 681b ldr r3, [r3, #0]
8008e6a: f002 427f and.w r2, r2, #4278190080 ; 0xff000000
8008e6e: 62da str r2, [r3, #44] ; 0x2c
hltdc->Instance->BCCR |= (tmp1 | tmp | hltdc->Init.Backcolor.Blue);
8008e70: 687b ldr r3, [r7, #4]
8008e72: 681b ldr r3, [r3, #0]
8008e74: 6ad9 ldr r1, [r3, #44] ; 0x2c
8008e76: 68ba ldr r2, [r7, #8]
8008e78: 68fb ldr r3, [r7, #12]
8008e7a: 4313 orrs r3, r2
8008e7c: 687a ldr r2, [r7, #4]
8008e7e: f892 2034 ldrb.w r2, [r2, #52] ; 0x34
8008e82: 431a orrs r2, r3
8008e84: 687b ldr r3, [r7, #4]
8008e86: 681b ldr r3, [r3, #0]
8008e88: 430a orrs r2, r1
8008e8a: 62da str r2, [r3, #44] ; 0x2c
/* Enable the Transfer Error and FIFO underrun interrupts */
__HAL_LTDC_ENABLE_IT(hltdc, LTDC_IT_TE | LTDC_IT_FU);
8008e8c: 687b ldr r3, [r7, #4]
8008e8e: 681b ldr r3, [r3, #0]
8008e90: 6b5a ldr r2, [r3, #52] ; 0x34
8008e92: 687b ldr r3, [r7, #4]
8008e94: 681b ldr r3, [r3, #0]
8008e96: f042 0206 orr.w r2, r2, #6
8008e9a: 635a str r2, [r3, #52] ; 0x34
/* Enable LTDC by setting LTDCEN bit */
__HAL_LTDC_ENABLE(hltdc);
8008e9c: 687b ldr r3, [r7, #4]
8008e9e: 681b ldr r3, [r3, #0]
8008ea0: 699a ldr r2, [r3, #24]
8008ea2: 687b ldr r3, [r7, #4]
8008ea4: 681b ldr r3, [r3, #0]
8008ea6: f042 0201 orr.w r2, r2, #1
8008eaa: 619a str r2, [r3, #24]
/* Initialize the error code */
hltdc->ErrorCode = HAL_LTDC_ERROR_NONE;
8008eac: 687b ldr r3, [r7, #4]
8008eae: 2200 movs r2, #0
8008eb0: f8c3 20a4 str.w r2, [r3, #164] ; 0xa4
/* Initialize the LTDC state*/
hltdc->State = HAL_LTDC_STATE_READY;
8008eb4: 687b ldr r3, [r7, #4]
8008eb6: 2201 movs r2, #1
8008eb8: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
return HAL_OK;
8008ebc: 2300 movs r3, #0
}
8008ebe: 4618 mov r0, r3
8008ec0: 3710 adds r7, #16
8008ec2: 46bd mov sp, r7
8008ec4: bd80 pop {r7, pc}
8008ec6: bf00 nop
8008ec8: f000f800 .word 0xf000f800
08008ecc <HAL_LTDC_IRQHandler>:
* @param hltdc pointer to a LTDC_HandleTypeDef structure that contains
* the configuration information for the LTDC.
* @retval HAL status
*/
void HAL_LTDC_IRQHandler(LTDC_HandleTypeDef *hltdc)
{
8008ecc: b580 push {r7, lr}
8008ece: b084 sub sp, #16
8008ed0: af00 add r7, sp, #0
8008ed2: 6078 str r0, [r7, #4]
uint32_t isrflags = READ_REG(hltdc->Instance->ISR);
8008ed4: 687b ldr r3, [r7, #4]
8008ed6: 681b ldr r3, [r3, #0]
8008ed8: 6b9b ldr r3, [r3, #56] ; 0x38
8008eda: 60fb str r3, [r7, #12]
uint32_t itsources = READ_REG(hltdc->Instance->IER);
8008edc: 687b ldr r3, [r7, #4]
8008ede: 681b ldr r3, [r3, #0]
8008ee0: 6b5b ldr r3, [r3, #52] ; 0x34
8008ee2: 60bb str r3, [r7, #8]
/* Transfer Error Interrupt management ***************************************/
if (((isrflags & LTDC_ISR_TERRIF) != 0U) && ((itsources & LTDC_IER_TERRIE) != 0U))
8008ee4: 68fb ldr r3, [r7, #12]
8008ee6: f003 0304 and.w r3, r3, #4
8008eea: 2b00 cmp r3, #0
8008eec: d023 beq.n 8008f36 <HAL_LTDC_IRQHandler+0x6a>
8008eee: 68bb ldr r3, [r7, #8]
8008ef0: f003 0304 and.w r3, r3, #4
8008ef4: 2b00 cmp r3, #0
8008ef6: d01e beq.n 8008f36 <HAL_LTDC_IRQHandler+0x6a>
{
/* Disable the transfer Error interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_TE);
8008ef8: 687b ldr r3, [r7, #4]
8008efa: 681b ldr r3, [r3, #0]
8008efc: 6b5a ldr r2, [r3, #52] ; 0x34
8008efe: 687b ldr r3, [r7, #4]
8008f00: 681b ldr r3, [r3, #0]
8008f02: f022 0204 bic.w r2, r2, #4
8008f06: 635a str r2, [r3, #52] ; 0x34
/* Clear the transfer error flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_TE);
8008f08: 687b ldr r3, [r7, #4]
8008f0a: 681b ldr r3, [r3, #0]
8008f0c: 2204 movs r2, #4
8008f0e: 63da str r2, [r3, #60] ; 0x3c
/* Update error code */
hltdc->ErrorCode |= HAL_LTDC_ERROR_TE;
8008f10: 687b ldr r3, [r7, #4]
8008f12: f8d3 30a4 ldr.w r3, [r3, #164] ; 0xa4
8008f16: f043 0201 orr.w r2, r3, #1
8008f1a: 687b ldr r3, [r7, #4]
8008f1c: f8c3 20a4 str.w r2, [r3, #164] ; 0xa4
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_ERROR;
8008f20: 687b ldr r3, [r7, #4]
8008f22: 2204 movs r2, #4
8008f24: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
8008f28: 687b ldr r3, [r7, #4]
8008f2a: 2200 movs r2, #0
8008f2c: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
#if (USE_HAL_LTDC_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
hltdc->ErrorCallback(hltdc);
#else
/* Call legacy error callback*/
HAL_LTDC_ErrorCallback(hltdc);
8008f30: 6878 ldr r0, [r7, #4]
8008f32: f000 f86f bl 8009014 <HAL_LTDC_ErrorCallback>
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
}
/* FIFO underrun Interrupt management ***************************************/
if (((isrflags & LTDC_ISR_FUIF) != 0U) && ((itsources & LTDC_IER_FUIE) != 0U))
8008f36: 68fb ldr r3, [r7, #12]
8008f38: f003 0302 and.w r3, r3, #2
8008f3c: 2b00 cmp r3, #0
8008f3e: d023 beq.n 8008f88 <HAL_LTDC_IRQHandler+0xbc>
8008f40: 68bb ldr r3, [r7, #8]
8008f42: f003 0302 and.w r3, r3, #2
8008f46: 2b00 cmp r3, #0
8008f48: d01e beq.n 8008f88 <HAL_LTDC_IRQHandler+0xbc>
{
/* Disable the FIFO underrun interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_FU);
8008f4a: 687b ldr r3, [r7, #4]
8008f4c: 681b ldr r3, [r3, #0]
8008f4e: 6b5a ldr r2, [r3, #52] ; 0x34
8008f50: 687b ldr r3, [r7, #4]
8008f52: 681b ldr r3, [r3, #0]
8008f54: f022 0202 bic.w r2, r2, #2
8008f58: 635a str r2, [r3, #52] ; 0x34
/* Clear the FIFO underrun flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_FU);
8008f5a: 687b ldr r3, [r7, #4]
8008f5c: 681b ldr r3, [r3, #0]
8008f5e: 2202 movs r2, #2
8008f60: 63da str r2, [r3, #60] ; 0x3c
/* Update error code */
hltdc->ErrorCode |= HAL_LTDC_ERROR_FU;
8008f62: 687b ldr r3, [r7, #4]
8008f64: f8d3 30a4 ldr.w r3, [r3, #164] ; 0xa4
8008f68: f043 0202 orr.w r2, r3, #2
8008f6c: 687b ldr r3, [r7, #4]
8008f6e: f8c3 20a4 str.w r2, [r3, #164] ; 0xa4
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_ERROR;
8008f72: 687b ldr r3, [r7, #4]
8008f74: 2204 movs r2, #4
8008f76: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
8008f7a: 687b ldr r3, [r7, #4]
8008f7c: 2200 movs r2, #0
8008f7e: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
#if (USE_HAL_LTDC_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
hltdc->ErrorCallback(hltdc);
#else
/* Call legacy error callback*/
HAL_LTDC_ErrorCallback(hltdc);
8008f82: 6878 ldr r0, [r7, #4]
8008f84: f000 f846 bl 8009014 <HAL_LTDC_ErrorCallback>
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
}
/* Line Interrupt management ************************************************/
if (((isrflags & LTDC_ISR_LIF) != 0U) && ((itsources & LTDC_IER_LIE) != 0U))
8008f88: 68fb ldr r3, [r7, #12]
8008f8a: f003 0301 and.w r3, r3, #1
8008f8e: 2b00 cmp r3, #0
8008f90: d01b beq.n 8008fca <HAL_LTDC_IRQHandler+0xfe>
8008f92: 68bb ldr r3, [r7, #8]
8008f94: f003 0301 and.w r3, r3, #1
8008f98: 2b00 cmp r3, #0
8008f9a: d016 beq.n 8008fca <HAL_LTDC_IRQHandler+0xfe>
{
/* Disable the Line interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_LI);
8008f9c: 687b ldr r3, [r7, #4]
8008f9e: 681b ldr r3, [r3, #0]
8008fa0: 6b5a ldr r2, [r3, #52] ; 0x34
8008fa2: 687b ldr r3, [r7, #4]
8008fa4: 681b ldr r3, [r3, #0]
8008fa6: f022 0201 bic.w r2, r2, #1
8008faa: 635a str r2, [r3, #52] ; 0x34
/* Clear the Line interrupt flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_LI);
8008fac: 687b ldr r3, [r7, #4]
8008fae: 681b ldr r3, [r3, #0]
8008fb0: 2201 movs r2, #1
8008fb2: 63da str r2, [r3, #60] ; 0x3c
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_READY;
8008fb4: 687b ldr r3, [r7, #4]
8008fb6: 2201 movs r2, #1
8008fb8: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
8008fbc: 687b ldr r3, [r7, #4]
8008fbe: 2200 movs r2, #0
8008fc0: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
#if (USE_HAL_LTDC_REGISTER_CALLBACKS == 1)
/*Call registered Line Event callback */
hltdc->LineEventCallback(hltdc);
#else
/*Call Legacy Line Event callback */
HAL_LTDC_LineEventCallback(hltdc);
8008fc4: 6878 ldr r0, [r7, #4]
8008fc6: f000 f82f bl 8009028 <HAL_LTDC_LineEventCallback>
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
}
/* Register reload Interrupt management ***************************************/
if (((isrflags & LTDC_ISR_RRIF) != 0U) && ((itsources & LTDC_IER_RRIE) != 0U))
8008fca: 68fb ldr r3, [r7, #12]
8008fcc: f003 0308 and.w r3, r3, #8
8008fd0: 2b00 cmp r3, #0
8008fd2: d01b beq.n 800900c <HAL_LTDC_IRQHandler+0x140>
8008fd4: 68bb ldr r3, [r7, #8]
8008fd6: f003 0308 and.w r3, r3, #8
8008fda: 2b00 cmp r3, #0
8008fdc: d016 beq.n 800900c <HAL_LTDC_IRQHandler+0x140>
{
/* Disable the register reload interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_RR);
8008fde: 687b ldr r3, [r7, #4]
8008fe0: 681b ldr r3, [r3, #0]
8008fe2: 6b5a ldr r2, [r3, #52] ; 0x34
8008fe4: 687b ldr r3, [r7, #4]
8008fe6: 681b ldr r3, [r3, #0]
8008fe8: f022 0208 bic.w r2, r2, #8
8008fec: 635a str r2, [r3, #52] ; 0x34
/* Clear the register reload flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_RR);
8008fee: 687b ldr r3, [r7, #4]
8008ff0: 681b ldr r3, [r3, #0]
8008ff2: 2208 movs r2, #8
8008ff4: 63da str r2, [r3, #60] ; 0x3c
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_READY;
8008ff6: 687b ldr r3, [r7, #4]
8008ff8: 2201 movs r2, #1
8008ffa: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
8008ffe: 687b ldr r3, [r7, #4]
8009000: 2200 movs r2, #0
8009002: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
#if (USE_HAL_LTDC_REGISTER_CALLBACKS == 1)
/*Call registered reload Event callback */
hltdc->ReloadEventCallback(hltdc);
#else
/*Call Legacy Reload Event callback */
HAL_LTDC_ReloadEventCallback(hltdc);
8009006: 6878 ldr r0, [r7, #4]
8009008: f000 f818 bl 800903c <HAL_LTDC_ReloadEventCallback>
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
}
}
800900c: bf00 nop
800900e: 3710 adds r7, #16
8009010: 46bd mov sp, r7
8009012: bd80 pop {r7, pc}
08009014 <HAL_LTDC_ErrorCallback>:
* @param hltdc pointer to a LTDC_HandleTypeDef structure that contains
* the configuration information for the LTDC.
* @retval None
*/
__weak void HAL_LTDC_ErrorCallback(LTDC_HandleTypeDef *hltdc)
{
8009014: b480 push {r7}
8009016: b083 sub sp, #12
8009018: af00 add r7, sp, #0
800901a: 6078 str r0, [r7, #4]
UNUSED(hltdc);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_LTDC_ErrorCallback could be implemented in the user file
*/
}
800901c: bf00 nop
800901e: 370c adds r7, #12
8009020: 46bd mov sp, r7
8009022: f85d 7b04 ldr.w r7, [sp], #4
8009026: 4770 bx lr
08009028 <HAL_LTDC_LineEventCallback>:
* @param hltdc pointer to a LTDC_HandleTypeDef structure that contains
* the configuration information for the LTDC.
* @retval None
*/
__weak void HAL_LTDC_LineEventCallback(LTDC_HandleTypeDef *hltdc)
{
8009028: b480 push {r7}
800902a: b083 sub sp, #12
800902c: af00 add r7, sp, #0
800902e: 6078 str r0, [r7, #4]
UNUSED(hltdc);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_LTDC_LineEventCallback could be implemented in the user file
*/
}
8009030: bf00 nop
8009032: 370c adds r7, #12
8009034: 46bd mov sp, r7
8009036: f85d 7b04 ldr.w r7, [sp], #4
800903a: 4770 bx lr
0800903c <HAL_LTDC_ReloadEventCallback>:
* @param hltdc pointer to a LTDC_HandleTypeDef structure that contains
* the configuration information for the LTDC.
* @retval None
*/
__weak void HAL_LTDC_ReloadEventCallback(LTDC_HandleTypeDef *hltdc)
{
800903c: b480 push {r7}
800903e: b083 sub sp, #12
8009040: af00 add r7, sp, #0
8009042: 6078 str r0, [r7, #4]
UNUSED(hltdc);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_LTDC_ReloadEvenCallback could be implemented in the user file
*/
}
8009044: bf00 nop
8009046: 370c adds r7, #12
8009048: 46bd mov sp, r7
800904a: f85d 7b04 ldr.w r7, [sp], #4
800904e: 4770 bx lr
08009050 <HAL_LTDC_ConfigLayer>:
* This parameter can be one of the following values:
* LTDC_LAYER_1 (0) or LTDC_LAYER_2 (1)
* @retval HAL status
*/
HAL_StatusTypeDef HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx)
{
8009050: b5b0 push {r4, r5, r7, lr}
8009052: b084 sub sp, #16
8009054: af00 add r7, sp, #0
8009056: 60f8 str r0, [r7, #12]
8009058: 60b9 str r1, [r7, #8]
800905a: 607a str r2, [r7, #4]
assert_param(IS_LTDC_BLENDING_FACTOR2(pLayerCfg->BlendingFactor2));
assert_param(IS_LTDC_CFBLL(pLayerCfg->ImageWidth));
assert_param(IS_LTDC_CFBLNBR(pLayerCfg->ImageHeight));
/* Process locked */
__HAL_LOCK(hltdc);
800905c: 68fb ldr r3, [r7, #12]
800905e: f893 30a0 ldrb.w r3, [r3, #160] ; 0xa0
8009062: 2b01 cmp r3, #1
8009064: d101 bne.n 800906a <HAL_LTDC_ConfigLayer+0x1a>
8009066: 2302 movs r3, #2
8009068: e02c b.n 80090c4 <HAL_LTDC_ConfigLayer+0x74>
800906a: 68fb ldr r3, [r7, #12]
800906c: 2201 movs r2, #1
800906e: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
/* Change LTDC peripheral state */
hltdc->State = HAL_LTDC_STATE_BUSY;
8009072: 68fb ldr r3, [r7, #12]
8009074: 2202 movs r2, #2
8009076: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Copy new layer configuration into handle structure */
hltdc->LayerCfg[LayerIdx] = *pLayerCfg;
800907a: 68fa ldr r2, [r7, #12]
800907c: 687b ldr r3, [r7, #4]
800907e: 2134 movs r1, #52 ; 0x34
8009080: fb01 f303 mul.w r3, r1, r3
8009084: 4413 add r3, r2
8009086: f103 0238 add.w r2, r3, #56 ; 0x38
800908a: 68bb ldr r3, [r7, #8]
800908c: 4614 mov r4, r2
800908e: 461d mov r5, r3
8009090: cd0f ldmia r5!, {r0, r1, r2, r3}
8009092: c40f stmia r4!, {r0, r1, r2, r3}
8009094: cd0f ldmia r5!, {r0, r1, r2, r3}
8009096: c40f stmia r4!, {r0, r1, r2, r3}
8009098: cd0f ldmia r5!, {r0, r1, r2, r3}
800909a: c40f stmia r4!, {r0, r1, r2, r3}
800909c: 682b ldr r3, [r5, #0]
800909e: 6023 str r3, [r4, #0]
/* Configure the LTDC Layer */
LTDC_SetConfig(hltdc, pLayerCfg, LayerIdx);
80090a0: 687a ldr r2, [r7, #4]
80090a2: 68b9 ldr r1, [r7, #8]
80090a4: 68f8 ldr r0, [r7, #12]
80090a6: f000 f81f bl 80090e8 <LTDC_SetConfig>
/* Set the Immediate Reload type */
hltdc->Instance->SRCR = LTDC_SRCR_IMR;
80090aa: 68fb ldr r3, [r7, #12]
80090ac: 681b ldr r3, [r3, #0]
80090ae: 2201 movs r2, #1
80090b0: 625a str r2, [r3, #36] ; 0x24
/* Initialize the LTDC state*/
hltdc->State = HAL_LTDC_STATE_READY;
80090b2: 68fb ldr r3, [r7, #12]
80090b4: 2201 movs r2, #1
80090b6: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
80090ba: 68fb ldr r3, [r7, #12]
80090bc: 2200 movs r2, #0
80090be: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
return HAL_OK;
80090c2: 2300 movs r3, #0
}
80090c4: 4618 mov r0, r3
80090c6: 3710 adds r7, #16
80090c8: 46bd mov sp, r7
80090ca: bdb0 pop {r4, r5, r7, pc}
080090cc <HAL_LTDC_GetState>:
* @param hltdc pointer to a LTDC_HandleTypeDef structure that contains
* the configuration information for the LTDC.
* @retval HAL state
*/
HAL_LTDC_StateTypeDef HAL_LTDC_GetState(LTDC_HandleTypeDef *hltdc)
{
80090cc: b480 push {r7}
80090ce: b083 sub sp, #12
80090d0: af00 add r7, sp, #0
80090d2: 6078 str r0, [r7, #4]
return hltdc->State;
80090d4: 687b ldr r3, [r7, #4]
80090d6: f893 30a1 ldrb.w r3, [r3, #161] ; 0xa1
80090da: b2db uxtb r3, r3
}
80090dc: 4618 mov r0, r3
80090de: 370c adds r7, #12
80090e0: 46bd mov sp, r7
80090e2: f85d 7b04 ldr.w r7, [sp], #4
80090e6: 4770 bx lr
080090e8 <LTDC_SetConfig>:
* @param LayerIdx LTDC Layer index.
* This parameter can be one of the following values: LTDC_LAYER_1 (0) or LTDC_LAYER_2 (1)
* @retval None
*/
static void LTDC_SetConfig(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx)
{
80090e8: b480 push {r7}
80090ea: b089 sub sp, #36 ; 0x24
80090ec: af00 add r7, sp, #0
80090ee: 60f8 str r0, [r7, #12]
80090f0: 60b9 str r1, [r7, #8]
80090f2: 607a str r2, [r7, #4]
uint32_t tmp;
uint32_t tmp1;
uint32_t tmp2;
/* Configure the horizontal start and stop position */
tmp = ((pLayerCfg->WindowX1 + ((hltdc->Instance->BPCR & LTDC_BPCR_AHBP) >> 16U)) << 16U);
80090f4: 68bb ldr r3, [r7, #8]
80090f6: 685a ldr r2, [r3, #4]
80090f8: 68fb ldr r3, [r7, #12]
80090fa: 681b ldr r3, [r3, #0]
80090fc: 68db ldr r3, [r3, #12]
80090fe: 0c1b lsrs r3, r3, #16
8009100: f3c3 030b ubfx r3, r3, #0, #12
8009104: 4413 add r3, r2
8009106: 041b lsls r3, r3, #16
8009108: 61fb str r3, [r7, #28]
LTDC_LAYER(hltdc, LayerIdx)->WHPCR &= ~(LTDC_LxWHPCR_WHSTPOS | LTDC_LxWHPCR_WHSPPOS);
800910a: 68fb ldr r3, [r7, #12]
800910c: 681b ldr r3, [r3, #0]
800910e: 461a mov r2, r3
8009110: 687b ldr r3, [r7, #4]
8009112: 01db lsls r3, r3, #7
8009114: 4413 add r3, r2
8009116: 3384 adds r3, #132 ; 0x84
8009118: 685b ldr r3, [r3, #4]
800911a: 68fa ldr r2, [r7, #12]
800911c: 6812 ldr r2, [r2, #0]
800911e: 4611 mov r1, r2
8009120: 687a ldr r2, [r7, #4]
8009122: 01d2 lsls r2, r2, #7
8009124: 440a add r2, r1
8009126: 3284 adds r2, #132 ; 0x84
8009128: f403 4370 and.w r3, r3, #61440 ; 0xf000
800912c: 6053 str r3, [r2, #4]
LTDC_LAYER(hltdc, LayerIdx)->WHPCR = ((pLayerCfg->WindowX0 + ((hltdc->Instance->BPCR & LTDC_BPCR_AHBP) >> 16U) + 1U) | tmp);
800912e: 68bb ldr r3, [r7, #8]
8009130: 681a ldr r2, [r3, #0]
8009132: 68fb ldr r3, [r7, #12]
8009134: 681b ldr r3, [r3, #0]
8009136: 68db ldr r3, [r3, #12]
8009138: 0c1b lsrs r3, r3, #16
800913a: f3c3 030b ubfx r3, r3, #0, #12
800913e: 4413 add r3, r2
8009140: 1c5a adds r2, r3, #1
8009142: 68fb ldr r3, [r7, #12]
8009144: 681b ldr r3, [r3, #0]
8009146: 4619 mov r1, r3
8009148: 687b ldr r3, [r7, #4]
800914a: 01db lsls r3, r3, #7
800914c: 440b add r3, r1
800914e: 3384 adds r3, #132 ; 0x84
8009150: 4619 mov r1, r3
8009152: 69fb ldr r3, [r7, #28]
8009154: 4313 orrs r3, r2
8009156: 604b str r3, [r1, #4]
/* Configure the vertical start and stop position */
tmp = ((pLayerCfg->WindowY1 + (hltdc->Instance->BPCR & LTDC_BPCR_AVBP)) << 16U);
8009158: 68bb ldr r3, [r7, #8]
800915a: 68da ldr r2, [r3, #12]
800915c: 68fb ldr r3, [r7, #12]
800915e: 681b ldr r3, [r3, #0]
8009160: 68db ldr r3, [r3, #12]
8009162: f3c3 030a ubfx r3, r3, #0, #11
8009166: 4413 add r3, r2
8009168: 041b lsls r3, r3, #16
800916a: 61fb str r3, [r7, #28]
LTDC_LAYER(hltdc, LayerIdx)->WVPCR &= ~(LTDC_LxWVPCR_WVSTPOS | LTDC_LxWVPCR_WVSPPOS);
800916c: 68fb ldr r3, [r7, #12]
800916e: 681b ldr r3, [r3, #0]
8009170: 461a mov r2, r3
8009172: 687b ldr r3, [r7, #4]
8009174: 01db lsls r3, r3, #7
8009176: 4413 add r3, r2
8009178: 3384 adds r3, #132 ; 0x84
800917a: 689b ldr r3, [r3, #8]
800917c: 68fa ldr r2, [r7, #12]
800917e: 6812 ldr r2, [r2, #0]
8009180: 4611 mov r1, r2
8009182: 687a ldr r2, [r7, #4]
8009184: 01d2 lsls r2, r2, #7
8009186: 440a add r2, r1
8009188: 3284 adds r2, #132 ; 0x84
800918a: f403 4370 and.w r3, r3, #61440 ; 0xf000
800918e: 6093 str r3, [r2, #8]
LTDC_LAYER(hltdc, LayerIdx)->WVPCR = ((pLayerCfg->WindowY0 + (hltdc->Instance->BPCR & LTDC_BPCR_AVBP) + 1U) | tmp);
8009190: 68bb ldr r3, [r7, #8]
8009192: 689a ldr r2, [r3, #8]
8009194: 68fb ldr r3, [r7, #12]
8009196: 681b ldr r3, [r3, #0]
8009198: 68db ldr r3, [r3, #12]
800919a: f3c3 030a ubfx r3, r3, #0, #11
800919e: 4413 add r3, r2
80091a0: 1c5a adds r2, r3, #1
80091a2: 68fb ldr r3, [r7, #12]
80091a4: 681b ldr r3, [r3, #0]
80091a6: 4619 mov r1, r3
80091a8: 687b ldr r3, [r7, #4]
80091aa: 01db lsls r3, r3, #7
80091ac: 440b add r3, r1
80091ae: 3384 adds r3, #132 ; 0x84
80091b0: 4619 mov r1, r3
80091b2: 69fb ldr r3, [r7, #28]
80091b4: 4313 orrs r3, r2
80091b6: 608b str r3, [r1, #8]
/* Specifies the pixel format */
LTDC_LAYER(hltdc, LayerIdx)->PFCR &= ~(LTDC_LxPFCR_PF);
80091b8: 68fb ldr r3, [r7, #12]
80091ba: 681b ldr r3, [r3, #0]
80091bc: 461a mov r2, r3
80091be: 687b ldr r3, [r7, #4]
80091c0: 01db lsls r3, r3, #7
80091c2: 4413 add r3, r2
80091c4: 3384 adds r3, #132 ; 0x84
80091c6: 691b ldr r3, [r3, #16]
80091c8: 68fa ldr r2, [r7, #12]
80091ca: 6812 ldr r2, [r2, #0]
80091cc: 4611 mov r1, r2
80091ce: 687a ldr r2, [r7, #4]
80091d0: 01d2 lsls r2, r2, #7
80091d2: 440a add r2, r1
80091d4: 3284 adds r2, #132 ; 0x84
80091d6: f023 0307 bic.w r3, r3, #7
80091da: 6113 str r3, [r2, #16]
LTDC_LAYER(hltdc, LayerIdx)->PFCR = (pLayerCfg->PixelFormat);
80091dc: 68fb ldr r3, [r7, #12]
80091de: 681b ldr r3, [r3, #0]
80091e0: 461a mov r2, r3
80091e2: 687b ldr r3, [r7, #4]
80091e4: 01db lsls r3, r3, #7
80091e6: 4413 add r3, r2
80091e8: 3384 adds r3, #132 ; 0x84
80091ea: 461a mov r2, r3
80091ec: 68bb ldr r3, [r7, #8]
80091ee: 691b ldr r3, [r3, #16]
80091f0: 6113 str r3, [r2, #16]
/* Configure the default color values */
tmp = ((uint32_t)(pLayerCfg->Backcolor.Green) << 8U);
80091f2: 68bb ldr r3, [r7, #8]
80091f4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80091f8: 021b lsls r3, r3, #8
80091fa: 61fb str r3, [r7, #28]
tmp1 = ((uint32_t)(pLayerCfg->Backcolor.Red) << 16U);
80091fc: 68bb ldr r3, [r7, #8]
80091fe: f893 3032 ldrb.w r3, [r3, #50] ; 0x32
8009202: 041b lsls r3, r3, #16
8009204: 61bb str r3, [r7, #24]
tmp2 = (pLayerCfg->Alpha0 << 24U);
8009206: 68bb ldr r3, [r7, #8]
8009208: 699b ldr r3, [r3, #24]
800920a: 061b lsls r3, r3, #24
800920c: 617b str r3, [r7, #20]
LTDC_LAYER(hltdc, LayerIdx)->DCCR &= ~(LTDC_LxDCCR_DCBLUE | LTDC_LxDCCR_DCGREEN | LTDC_LxDCCR_DCRED | LTDC_LxDCCR_DCALPHA);
800920e: 68fb ldr r3, [r7, #12]
8009210: 681b ldr r3, [r3, #0]
8009212: 461a mov r2, r3
8009214: 687b ldr r3, [r7, #4]
8009216: 01db lsls r3, r3, #7
8009218: 4413 add r3, r2
800921a: 3384 adds r3, #132 ; 0x84
800921c: 699b ldr r3, [r3, #24]
800921e: 68fb ldr r3, [r7, #12]
8009220: 681b ldr r3, [r3, #0]
8009222: 461a mov r2, r3
8009224: 687b ldr r3, [r7, #4]
8009226: 01db lsls r3, r3, #7
8009228: 4413 add r3, r2
800922a: 3384 adds r3, #132 ; 0x84
800922c: 461a mov r2, r3
800922e: 2300 movs r3, #0
8009230: 6193 str r3, [r2, #24]
LTDC_LAYER(hltdc, LayerIdx)->DCCR = (pLayerCfg->Backcolor.Blue | tmp | tmp1 | tmp2);
8009232: 68bb ldr r3, [r7, #8]
8009234: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
8009238: 461a mov r2, r3
800923a: 69fb ldr r3, [r7, #28]
800923c: 431a orrs r2, r3
800923e: 69bb ldr r3, [r7, #24]
8009240: 431a orrs r2, r3
8009242: 68fb ldr r3, [r7, #12]
8009244: 681b ldr r3, [r3, #0]
8009246: 4619 mov r1, r3
8009248: 687b ldr r3, [r7, #4]
800924a: 01db lsls r3, r3, #7
800924c: 440b add r3, r1
800924e: 3384 adds r3, #132 ; 0x84
8009250: 4619 mov r1, r3
8009252: 697b ldr r3, [r7, #20]
8009254: 4313 orrs r3, r2
8009256: 618b str r3, [r1, #24]
/* Specifies the constant alpha value */
LTDC_LAYER(hltdc, LayerIdx)->CACR &= ~(LTDC_LxCACR_CONSTA);
8009258: 68fb ldr r3, [r7, #12]
800925a: 681b ldr r3, [r3, #0]
800925c: 461a mov r2, r3
800925e: 687b ldr r3, [r7, #4]
8009260: 01db lsls r3, r3, #7
8009262: 4413 add r3, r2
8009264: 3384 adds r3, #132 ; 0x84
8009266: 695b ldr r3, [r3, #20]
8009268: 68fa ldr r2, [r7, #12]
800926a: 6812 ldr r2, [r2, #0]
800926c: 4611 mov r1, r2
800926e: 687a ldr r2, [r7, #4]
8009270: 01d2 lsls r2, r2, #7
8009272: 440a add r2, r1
8009274: 3284 adds r2, #132 ; 0x84
8009276: f023 03ff bic.w r3, r3, #255 ; 0xff
800927a: 6153 str r3, [r2, #20]
LTDC_LAYER(hltdc, LayerIdx)->CACR = (pLayerCfg->Alpha);
800927c: 68fb ldr r3, [r7, #12]
800927e: 681b ldr r3, [r3, #0]
8009280: 461a mov r2, r3
8009282: 687b ldr r3, [r7, #4]
8009284: 01db lsls r3, r3, #7
8009286: 4413 add r3, r2
8009288: 3384 adds r3, #132 ; 0x84
800928a: 461a mov r2, r3
800928c: 68bb ldr r3, [r7, #8]
800928e: 695b ldr r3, [r3, #20]
8009290: 6153 str r3, [r2, #20]
/* Specifies the blending factors */
LTDC_LAYER(hltdc, LayerIdx)->BFCR &= ~(LTDC_LxBFCR_BF2 | LTDC_LxBFCR_BF1);
8009292: 68fb ldr r3, [r7, #12]
8009294: 681b ldr r3, [r3, #0]
8009296: 461a mov r2, r3
8009298: 687b ldr r3, [r7, #4]
800929a: 01db lsls r3, r3, #7
800929c: 4413 add r3, r2
800929e: 3384 adds r3, #132 ; 0x84
80092a0: 69da ldr r2, [r3, #28]
80092a2: 68fb ldr r3, [r7, #12]
80092a4: 681b ldr r3, [r3, #0]
80092a6: 4619 mov r1, r3
80092a8: 687b ldr r3, [r7, #4]
80092aa: 01db lsls r3, r3, #7
80092ac: 440b add r3, r1
80092ae: 3384 adds r3, #132 ; 0x84
80092b0: 4619 mov r1, r3
80092b2: 4b58 ldr r3, [pc, #352] ; (8009414 <LTDC_SetConfig+0x32c>)
80092b4: 4013 ands r3, r2
80092b6: 61cb str r3, [r1, #28]
LTDC_LAYER(hltdc, LayerIdx)->BFCR = (pLayerCfg->BlendingFactor1 | pLayerCfg->BlendingFactor2);
80092b8: 68bb ldr r3, [r7, #8]
80092ba: 69da ldr r2, [r3, #28]
80092bc: 68bb ldr r3, [r7, #8]
80092be: 6a1b ldr r3, [r3, #32]
80092c0: 68f9 ldr r1, [r7, #12]
80092c2: 6809 ldr r1, [r1, #0]
80092c4: 4608 mov r0, r1
80092c6: 6879 ldr r1, [r7, #4]
80092c8: 01c9 lsls r1, r1, #7
80092ca: 4401 add r1, r0
80092cc: 3184 adds r1, #132 ; 0x84
80092ce: 4313 orrs r3, r2
80092d0: 61cb str r3, [r1, #28]
/* Configure the color frame buffer start address */
LTDC_LAYER(hltdc, LayerIdx)->CFBAR &= ~(LTDC_LxCFBAR_CFBADD);
80092d2: 68fb ldr r3, [r7, #12]
80092d4: 681b ldr r3, [r3, #0]
80092d6: 461a mov r2, r3
80092d8: 687b ldr r3, [r7, #4]
80092da: 01db lsls r3, r3, #7
80092dc: 4413 add r3, r2
80092de: 3384 adds r3, #132 ; 0x84
80092e0: 6a9b ldr r3, [r3, #40] ; 0x28
80092e2: 68fb ldr r3, [r7, #12]
80092e4: 681b ldr r3, [r3, #0]
80092e6: 461a mov r2, r3
80092e8: 687b ldr r3, [r7, #4]
80092ea: 01db lsls r3, r3, #7
80092ec: 4413 add r3, r2
80092ee: 3384 adds r3, #132 ; 0x84
80092f0: 461a mov r2, r3
80092f2: 2300 movs r3, #0
80092f4: 6293 str r3, [r2, #40] ; 0x28
LTDC_LAYER(hltdc, LayerIdx)->CFBAR = (pLayerCfg->FBStartAdress);
80092f6: 68fb ldr r3, [r7, #12]
80092f8: 681b ldr r3, [r3, #0]
80092fa: 461a mov r2, r3
80092fc: 687b ldr r3, [r7, #4]
80092fe: 01db lsls r3, r3, #7
8009300: 4413 add r3, r2
8009302: 3384 adds r3, #132 ; 0x84
8009304: 461a mov r2, r3
8009306: 68bb ldr r3, [r7, #8]
8009308: 6a5b ldr r3, [r3, #36] ; 0x24
800930a: 6293 str r3, [r2, #40] ; 0x28
if (pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB8888)
800930c: 68bb ldr r3, [r7, #8]
800930e: 691b ldr r3, [r3, #16]
8009310: 2b00 cmp r3, #0
8009312: d102 bne.n 800931a <LTDC_SetConfig+0x232>
{
tmp = 4U;
8009314: 2304 movs r3, #4
8009316: 61fb str r3, [r7, #28]
8009318: e01b b.n 8009352 <LTDC_SetConfig+0x26a>
}
else if (pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_RGB888)
800931a: 68bb ldr r3, [r7, #8]
800931c: 691b ldr r3, [r3, #16]
800931e: 2b01 cmp r3, #1
8009320: d102 bne.n 8009328 <LTDC_SetConfig+0x240>
{
tmp = 3U;
8009322: 2303 movs r3, #3
8009324: 61fb str r3, [r7, #28]
8009326: e014 b.n 8009352 <LTDC_SetConfig+0x26a>
}
else if ((pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB4444) || \
8009328: 68bb ldr r3, [r7, #8]
800932a: 691b ldr r3, [r3, #16]
800932c: 2b04 cmp r3, #4
800932e: d00b beq.n 8009348 <LTDC_SetConfig+0x260>
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_RGB565) || \
8009330: 68bb ldr r3, [r7, #8]
8009332: 691b ldr r3, [r3, #16]
else if ((pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB4444) || \
8009334: 2b02 cmp r3, #2
8009336: d007 beq.n 8009348 <LTDC_SetConfig+0x260>
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB1555) || \
8009338: 68bb ldr r3, [r7, #8]
800933a: 691b ldr r3, [r3, #16]
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_RGB565) || \
800933c: 2b03 cmp r3, #3
800933e: d003 beq.n 8009348 <LTDC_SetConfig+0x260>
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_AL88))
8009340: 68bb ldr r3, [r7, #8]
8009342: 691b ldr r3, [r3, #16]
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB1555) || \
8009344: 2b07 cmp r3, #7
8009346: d102 bne.n 800934e <LTDC_SetConfig+0x266>
{
tmp = 2U;
8009348: 2302 movs r3, #2
800934a: 61fb str r3, [r7, #28]
800934c: e001 b.n 8009352 <LTDC_SetConfig+0x26a>
}
else
{
tmp = 1U;
800934e: 2301 movs r3, #1
8009350: 61fb str r3, [r7, #28]
}
/* Configure the color frame buffer pitch in byte */
LTDC_LAYER(hltdc, LayerIdx)->CFBLR &= ~(LTDC_LxCFBLR_CFBLL | LTDC_LxCFBLR_CFBP);
8009352: 68fb ldr r3, [r7, #12]
8009354: 681b ldr r3, [r3, #0]
8009356: 461a mov r2, r3
8009358: 687b ldr r3, [r7, #4]
800935a: 01db lsls r3, r3, #7
800935c: 4413 add r3, r2
800935e: 3384 adds r3, #132 ; 0x84
8009360: 6adb ldr r3, [r3, #44] ; 0x2c
8009362: 68fa ldr r2, [r7, #12]
8009364: 6812 ldr r2, [r2, #0]
8009366: 4611 mov r1, r2
8009368: 687a ldr r2, [r7, #4]
800936a: 01d2 lsls r2, r2, #7
800936c: 440a add r2, r1
800936e: 3284 adds r2, #132 ; 0x84
8009370: f003 23e0 and.w r3, r3, #3758153728 ; 0xe000e000
8009374: 62d3 str r3, [r2, #44] ; 0x2c
LTDC_LAYER(hltdc, LayerIdx)->CFBLR = (((pLayerCfg->ImageWidth * tmp) << 16U) | (((pLayerCfg->WindowX1 - pLayerCfg->WindowX0) * tmp) + 3U));
8009376: 68bb ldr r3, [r7, #8]
8009378: 6a9b ldr r3, [r3, #40] ; 0x28
800937a: 69fa ldr r2, [r7, #28]
800937c: fb02 f303 mul.w r3, r2, r3
8009380: 041a lsls r2, r3, #16
8009382: 68bb ldr r3, [r7, #8]
8009384: 6859 ldr r1, [r3, #4]
8009386: 68bb ldr r3, [r7, #8]
8009388: 681b ldr r3, [r3, #0]
800938a: 1acb subs r3, r1, r3
800938c: 69f9 ldr r1, [r7, #28]
800938e: fb01 f303 mul.w r3, r1, r3
8009392: 3303 adds r3, #3
8009394: 68f9 ldr r1, [r7, #12]
8009396: 6809 ldr r1, [r1, #0]
8009398: 4608 mov r0, r1
800939a: 6879 ldr r1, [r7, #4]
800939c: 01c9 lsls r1, r1, #7
800939e: 4401 add r1, r0
80093a0: 3184 adds r1, #132 ; 0x84
80093a2: 4313 orrs r3, r2
80093a4: 62cb str r3, [r1, #44] ; 0x2c
/* Configure the frame buffer line number */
LTDC_LAYER(hltdc, LayerIdx)->CFBLNR &= ~(LTDC_LxCFBLNR_CFBLNBR);
80093a6: 68fb ldr r3, [r7, #12]
80093a8: 681b ldr r3, [r3, #0]
80093aa: 461a mov r2, r3
80093ac: 687b ldr r3, [r7, #4]
80093ae: 01db lsls r3, r3, #7
80093b0: 4413 add r3, r2
80093b2: 3384 adds r3, #132 ; 0x84
80093b4: 6b1a ldr r2, [r3, #48] ; 0x30
80093b6: 68fb ldr r3, [r7, #12]
80093b8: 681b ldr r3, [r3, #0]
80093ba: 4619 mov r1, r3
80093bc: 687b ldr r3, [r7, #4]
80093be: 01db lsls r3, r3, #7
80093c0: 440b add r3, r1
80093c2: 3384 adds r3, #132 ; 0x84
80093c4: 4619 mov r1, r3
80093c6: 4b14 ldr r3, [pc, #80] ; (8009418 <LTDC_SetConfig+0x330>)
80093c8: 4013 ands r3, r2
80093ca: 630b str r3, [r1, #48] ; 0x30
LTDC_LAYER(hltdc, LayerIdx)->CFBLNR = (pLayerCfg->ImageHeight);
80093cc: 68fb ldr r3, [r7, #12]
80093ce: 681b ldr r3, [r3, #0]
80093d0: 461a mov r2, r3
80093d2: 687b ldr r3, [r7, #4]
80093d4: 01db lsls r3, r3, #7
80093d6: 4413 add r3, r2
80093d8: 3384 adds r3, #132 ; 0x84
80093da: 461a mov r2, r3
80093dc: 68bb ldr r3, [r7, #8]
80093de: 6adb ldr r3, [r3, #44] ; 0x2c
80093e0: 6313 str r3, [r2, #48] ; 0x30
/* Enable LTDC_Layer by setting LEN bit */
LTDC_LAYER(hltdc, LayerIdx)->CR |= (uint32_t)LTDC_LxCR_LEN;
80093e2: 68fb ldr r3, [r7, #12]
80093e4: 681b ldr r3, [r3, #0]
80093e6: 461a mov r2, r3
80093e8: 687b ldr r3, [r7, #4]
80093ea: 01db lsls r3, r3, #7
80093ec: 4413 add r3, r2
80093ee: 3384 adds r3, #132 ; 0x84
80093f0: 681b ldr r3, [r3, #0]
80093f2: 68fa ldr r2, [r7, #12]
80093f4: 6812 ldr r2, [r2, #0]
80093f6: 4611 mov r1, r2
80093f8: 687a ldr r2, [r7, #4]
80093fa: 01d2 lsls r2, r2, #7
80093fc: 440a add r2, r1
80093fe: 3284 adds r2, #132 ; 0x84
8009400: f043 0301 orr.w r3, r3, #1
8009404: 6013 str r3, [r2, #0]
}
8009406: bf00 nop
8009408: 3724 adds r7, #36 ; 0x24
800940a: 46bd mov sp, r7
800940c: f85d 7b04 ldr.w r7, [sp], #4
8009410: 4770 bx lr
8009412: bf00 nop
8009414: fffff8f8 .word 0xfffff8f8
8009418: fffff800 .word 0xfffff800
0800941c <HAL_PWR_EnableBkUpAccess>:
* @note If the HSE divided by 2, 3, ..31 is used as the RTC clock, the
* Backup Domain Access should be kept enabled.
* @retval None
*/
void HAL_PWR_EnableBkUpAccess(void)
{
800941c: b480 push {r7}
800941e: af00 add r7, sp, #0
/* Enable access to RTC and backup registers */
SET_BIT(PWR->CR1, PWR_CR1_DBP);
8009420: 4b05 ldr r3, [pc, #20] ; (8009438 <HAL_PWR_EnableBkUpAccess+0x1c>)
8009422: 681b ldr r3, [r3, #0]
8009424: 4a04 ldr r2, [pc, #16] ; (8009438 <HAL_PWR_EnableBkUpAccess+0x1c>)
8009426: f443 7380 orr.w r3, r3, #256 ; 0x100
800942a: 6013 str r3, [r2, #0]
}
800942c: bf00 nop
800942e: 46bd mov sp, r7
8009430: f85d 7b04 ldr.w r7, [sp], #4
8009434: 4770 bx lr
8009436: bf00 nop
8009438: 40007000 .word 0x40007000
0800943c <HAL_PWREx_EnableOverDrive>:
* During the Over-drive switch activation, no peripheral clocks should be enabled.
* The peripheral clocks must be enabled once the Over-drive mode is activated.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_PWREx_EnableOverDrive(void)
{
800943c: b580 push {r7, lr}
800943e: b082 sub sp, #8
8009440: af00 add r7, sp, #0
uint32_t tickstart = 0;
8009442: 2300 movs r3, #0
8009444: 607b str r3, [r7, #4]
__HAL_RCC_PWR_CLK_ENABLE();
8009446: 4b23 ldr r3, [pc, #140] ; (80094d4 <HAL_PWREx_EnableOverDrive+0x98>)
8009448: 6c1b ldr r3, [r3, #64] ; 0x40
800944a: 4a22 ldr r2, [pc, #136] ; (80094d4 <HAL_PWREx_EnableOverDrive+0x98>)
800944c: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8009450: 6413 str r3, [r2, #64] ; 0x40
8009452: 4b20 ldr r3, [pc, #128] ; (80094d4 <HAL_PWREx_EnableOverDrive+0x98>)
8009454: 6c1b ldr r3, [r3, #64] ; 0x40
8009456: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
800945a: 603b str r3, [r7, #0]
800945c: 683b ldr r3, [r7, #0]
/* Enable the Over-drive to extend the clock frequency to 216 MHz */
__HAL_PWR_OVERDRIVE_ENABLE();
800945e: 4b1e ldr r3, [pc, #120] ; (80094d8 <HAL_PWREx_EnableOverDrive+0x9c>)
8009460: 681b ldr r3, [r3, #0]
8009462: 4a1d ldr r2, [pc, #116] ; (80094d8 <HAL_PWREx_EnableOverDrive+0x9c>)
8009464: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8009468: 6013 str r3, [r2, #0]
/* Get tick */
tickstart = HAL_GetTick();
800946a: f7fb ff59 bl 8005320 <HAL_GetTick>
800946e: 6078 str r0, [r7, #4]
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODRDY))
8009470: e009 b.n 8009486 <HAL_PWREx_EnableOverDrive+0x4a>
{
if((HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)
8009472: f7fb ff55 bl 8005320 <HAL_GetTick>
8009476: 4602 mov r2, r0
8009478: 687b ldr r3, [r7, #4]
800947a: 1ad3 subs r3, r2, r3
800947c: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
8009480: d901 bls.n 8009486 <HAL_PWREx_EnableOverDrive+0x4a>
{
return HAL_TIMEOUT;
8009482: 2303 movs r3, #3
8009484: e022 b.n 80094cc <HAL_PWREx_EnableOverDrive+0x90>
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODRDY))
8009486: 4b14 ldr r3, [pc, #80] ; (80094d8 <HAL_PWREx_EnableOverDrive+0x9c>)
8009488: 685b ldr r3, [r3, #4]
800948a: f403 3380 and.w r3, r3, #65536 ; 0x10000
800948e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8009492: d1ee bne.n 8009472 <HAL_PWREx_EnableOverDrive+0x36>
}
}
/* Enable the Over-drive switch */
__HAL_PWR_OVERDRIVESWITCHING_ENABLE();
8009494: 4b10 ldr r3, [pc, #64] ; (80094d8 <HAL_PWREx_EnableOverDrive+0x9c>)
8009496: 681b ldr r3, [r3, #0]
8009498: 4a0f ldr r2, [pc, #60] ; (80094d8 <HAL_PWREx_EnableOverDrive+0x9c>)
800949a: f443 3300 orr.w r3, r3, #131072 ; 0x20000
800949e: 6013 str r3, [r2, #0]
/* Get tick */
tickstart = HAL_GetTick();
80094a0: f7fb ff3e bl 8005320 <HAL_GetTick>
80094a4: 6078 str r0, [r7, #4]
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODSWRDY))
80094a6: e009 b.n 80094bc <HAL_PWREx_EnableOverDrive+0x80>
{
if((HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)
80094a8: f7fb ff3a bl 8005320 <HAL_GetTick>
80094ac: 4602 mov r2, r0
80094ae: 687b ldr r3, [r7, #4]
80094b0: 1ad3 subs r3, r2, r3
80094b2: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
80094b6: d901 bls.n 80094bc <HAL_PWREx_EnableOverDrive+0x80>
{
return HAL_TIMEOUT;
80094b8: 2303 movs r3, #3
80094ba: e007 b.n 80094cc <HAL_PWREx_EnableOverDrive+0x90>
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODSWRDY))
80094bc: 4b06 ldr r3, [pc, #24] ; (80094d8 <HAL_PWREx_EnableOverDrive+0x9c>)
80094be: 685b ldr r3, [r3, #4]
80094c0: f403 3300 and.w r3, r3, #131072 ; 0x20000
80094c4: f5b3 3f00 cmp.w r3, #131072 ; 0x20000
80094c8: d1ee bne.n 80094a8 <HAL_PWREx_EnableOverDrive+0x6c>
}
}
return HAL_OK;
80094ca: 2300 movs r3, #0
}
80094cc: 4618 mov r0, r3
80094ce: 3708 adds r7, #8
80094d0: 46bd mov sp, r7
80094d2: bd80 pop {r7, pc}
80094d4: 40023800 .word 0x40023800
80094d8: 40007000 .word 0x40007000
080094dc <HAL_RCC_OscConfig>:
* supported by this function. User should request a transition to HSE Off
* first and then HSE On or HSE Bypass.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
{
80094dc: b580 push {r7, lr}
80094de: b086 sub sp, #24
80094e0: af00 add r7, sp, #0
80094e2: 6078 str r0, [r7, #4]
uint32_t tickstart;
uint32_t pll_config;
FlagStatus pwrclkchanged = RESET;
80094e4: 2300 movs r3, #0
80094e6: 75fb strb r3, [r7, #23]
/* Check Null pointer */
if (RCC_OscInitStruct == NULL)
80094e8: 687b ldr r3, [r7, #4]
80094ea: 2b00 cmp r3, #0
80094ec: d101 bne.n 80094f2 <HAL_RCC_OscConfig+0x16>
{
return HAL_ERROR;
80094ee: 2301 movs r3, #1
80094f0: e291 b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
/* Check the parameters */
assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
/*------------------------------- HSE Configuration ------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
80094f2: 687b ldr r3, [r7, #4]
80094f4: 681b ldr r3, [r3, #0]
80094f6: f003 0301 and.w r3, r3, #1
80094fa: 2b00 cmp r3, #0
80094fc: f000 8087 beq.w 800960e <HAL_RCC_OscConfig+0x132>
{
/* Check the parameters */
assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
/* When the HSE is used as system clock or clock source for PLL, It can not be disabled */
if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSE)
8009500: 4b96 ldr r3, [pc, #600] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009502: 689b ldr r3, [r3, #8]
8009504: f003 030c and.w r3, r3, #12
8009508: 2b04 cmp r3, #4
800950a: d00c beq.n 8009526 <HAL_RCC_OscConfig+0x4a>
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
800950c: 4b93 ldr r3, [pc, #588] ; (800975c <HAL_RCC_OscConfig+0x280>)
800950e: 689b ldr r3, [r3, #8]
8009510: f003 030c and.w r3, r3, #12
8009514: 2b08 cmp r3, #8
8009516: d112 bne.n 800953e <HAL_RCC_OscConfig+0x62>
8009518: 4b90 ldr r3, [pc, #576] ; (800975c <HAL_RCC_OscConfig+0x280>)
800951a: 685b ldr r3, [r3, #4]
800951c: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8009520: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
8009524: d10b bne.n 800953e <HAL_RCC_OscConfig+0x62>
{
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
8009526: 4b8d ldr r3, [pc, #564] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009528: 681b ldr r3, [r3, #0]
800952a: f403 3300 and.w r3, r3, #131072 ; 0x20000
800952e: 2b00 cmp r3, #0
8009530: d06c beq.n 800960c <HAL_RCC_OscConfig+0x130>
8009532: 687b ldr r3, [r7, #4]
8009534: 685b ldr r3, [r3, #4]
8009536: 2b00 cmp r3, #0
8009538: d168 bne.n 800960c <HAL_RCC_OscConfig+0x130>
{
return HAL_ERROR;
800953a: 2301 movs r3, #1
800953c: e26b b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
}
}
else
{
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
800953e: 687b ldr r3, [r7, #4]
8009540: 685b ldr r3, [r3, #4]
8009542: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8009546: d106 bne.n 8009556 <HAL_RCC_OscConfig+0x7a>
8009548: 4b84 ldr r3, [pc, #528] ; (800975c <HAL_RCC_OscConfig+0x280>)
800954a: 681b ldr r3, [r3, #0]
800954c: 4a83 ldr r2, [pc, #524] ; (800975c <HAL_RCC_OscConfig+0x280>)
800954e: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8009552: 6013 str r3, [r2, #0]
8009554: e02e b.n 80095b4 <HAL_RCC_OscConfig+0xd8>
8009556: 687b ldr r3, [r7, #4]
8009558: 685b ldr r3, [r3, #4]
800955a: 2b00 cmp r3, #0
800955c: d10c bne.n 8009578 <HAL_RCC_OscConfig+0x9c>
800955e: 4b7f ldr r3, [pc, #508] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009560: 681b ldr r3, [r3, #0]
8009562: 4a7e ldr r2, [pc, #504] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009564: f423 3380 bic.w r3, r3, #65536 ; 0x10000
8009568: 6013 str r3, [r2, #0]
800956a: 4b7c ldr r3, [pc, #496] ; (800975c <HAL_RCC_OscConfig+0x280>)
800956c: 681b ldr r3, [r3, #0]
800956e: 4a7b ldr r2, [pc, #492] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009570: f423 2380 bic.w r3, r3, #262144 ; 0x40000
8009574: 6013 str r3, [r2, #0]
8009576: e01d b.n 80095b4 <HAL_RCC_OscConfig+0xd8>
8009578: 687b ldr r3, [r7, #4]
800957a: 685b ldr r3, [r3, #4]
800957c: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
8009580: d10c bne.n 800959c <HAL_RCC_OscConfig+0xc0>
8009582: 4b76 ldr r3, [pc, #472] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009584: 681b ldr r3, [r3, #0]
8009586: 4a75 ldr r2, [pc, #468] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009588: f443 2380 orr.w r3, r3, #262144 ; 0x40000
800958c: 6013 str r3, [r2, #0]
800958e: 4b73 ldr r3, [pc, #460] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009590: 681b ldr r3, [r3, #0]
8009592: 4a72 ldr r2, [pc, #456] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009594: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8009598: 6013 str r3, [r2, #0]
800959a: e00b b.n 80095b4 <HAL_RCC_OscConfig+0xd8>
800959c: 4b6f ldr r3, [pc, #444] ; (800975c <HAL_RCC_OscConfig+0x280>)
800959e: 681b ldr r3, [r3, #0]
80095a0: 4a6e ldr r2, [pc, #440] ; (800975c <HAL_RCC_OscConfig+0x280>)
80095a2: f423 3380 bic.w r3, r3, #65536 ; 0x10000
80095a6: 6013 str r3, [r2, #0]
80095a8: 4b6c ldr r3, [pc, #432] ; (800975c <HAL_RCC_OscConfig+0x280>)
80095aa: 681b ldr r3, [r3, #0]
80095ac: 4a6b ldr r2, [pc, #428] ; (800975c <HAL_RCC_OscConfig+0x280>)
80095ae: f423 2380 bic.w r3, r3, #262144 ; 0x40000
80095b2: 6013 str r3, [r2, #0]
/* Check the HSE State */
if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
80095b4: 687b ldr r3, [r7, #4]
80095b6: 685b ldr r3, [r3, #4]
80095b8: 2b00 cmp r3, #0
80095ba: d013 beq.n 80095e4 <HAL_RCC_OscConfig+0x108>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
80095bc: f7fb feb0 bl 8005320 <HAL_GetTick>
80095c0: 6138 str r0, [r7, #16]
/* Wait till HSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
80095c2: e008 b.n 80095d6 <HAL_RCC_OscConfig+0xfa>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
80095c4: f7fb feac bl 8005320 <HAL_GetTick>
80095c8: 4602 mov r2, r0
80095ca: 693b ldr r3, [r7, #16]
80095cc: 1ad3 subs r3, r2, r3
80095ce: 2b64 cmp r3, #100 ; 0x64
80095d0: d901 bls.n 80095d6 <HAL_RCC_OscConfig+0xfa>
{
return HAL_TIMEOUT;
80095d2: 2303 movs r3, #3
80095d4: e21f b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
80095d6: 4b61 ldr r3, [pc, #388] ; (800975c <HAL_RCC_OscConfig+0x280>)
80095d8: 681b ldr r3, [r3, #0]
80095da: f403 3300 and.w r3, r3, #131072 ; 0x20000
80095de: 2b00 cmp r3, #0
80095e0: d0f0 beq.n 80095c4 <HAL_RCC_OscConfig+0xe8>
80095e2: e014 b.n 800960e <HAL_RCC_OscConfig+0x132>
}
}
else
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
80095e4: f7fb fe9c bl 8005320 <HAL_GetTick>
80095e8: 6138 str r0, [r7, #16]
/* Wait till HSE is bypassed or disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
80095ea: e008 b.n 80095fe <HAL_RCC_OscConfig+0x122>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
80095ec: f7fb fe98 bl 8005320 <HAL_GetTick>
80095f0: 4602 mov r2, r0
80095f2: 693b ldr r3, [r7, #16]
80095f4: 1ad3 subs r3, r2, r3
80095f6: 2b64 cmp r3, #100 ; 0x64
80095f8: d901 bls.n 80095fe <HAL_RCC_OscConfig+0x122>
{
return HAL_TIMEOUT;
80095fa: 2303 movs r3, #3
80095fc: e20b b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
80095fe: 4b57 ldr r3, [pc, #348] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009600: 681b ldr r3, [r3, #0]
8009602: f403 3300 and.w r3, r3, #131072 ; 0x20000
8009606: 2b00 cmp r3, #0
8009608: d1f0 bne.n 80095ec <HAL_RCC_OscConfig+0x110>
800960a: e000 b.n 800960e <HAL_RCC_OscConfig+0x132>
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
800960c: bf00 nop
}
}
}
}
/*----------------------------- HSI Configuration --------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
800960e: 687b ldr r3, [r7, #4]
8009610: 681b ldr r3, [r3, #0]
8009612: f003 0302 and.w r3, r3, #2
8009616: 2b00 cmp r3, #0
8009618: d069 beq.n 80096ee <HAL_RCC_OscConfig+0x212>
/* Check the parameters */
assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
/* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSI)
800961a: 4b50 ldr r3, [pc, #320] ; (800975c <HAL_RCC_OscConfig+0x280>)
800961c: 689b ldr r3, [r3, #8]
800961e: f003 030c and.w r3, r3, #12
8009622: 2b00 cmp r3, #0
8009624: d00b beq.n 800963e <HAL_RCC_OscConfig+0x162>
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
8009626: 4b4d ldr r3, [pc, #308] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009628: 689b ldr r3, [r3, #8]
800962a: f003 030c and.w r3, r3, #12
800962e: 2b08 cmp r3, #8
8009630: d11c bne.n 800966c <HAL_RCC_OscConfig+0x190>
8009632: 4b4a ldr r3, [pc, #296] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009634: 685b ldr r3, [r3, #4]
8009636: f403 0380 and.w r3, r3, #4194304 ; 0x400000
800963a: 2b00 cmp r3, #0
800963c: d116 bne.n 800966c <HAL_RCC_OscConfig+0x190>
{
/* When HSI is used as system clock it will not disabled */
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
800963e: 4b47 ldr r3, [pc, #284] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009640: 681b ldr r3, [r3, #0]
8009642: f003 0302 and.w r3, r3, #2
8009646: 2b00 cmp r3, #0
8009648: d005 beq.n 8009656 <HAL_RCC_OscConfig+0x17a>
800964a: 687b ldr r3, [r7, #4]
800964c: 68db ldr r3, [r3, #12]
800964e: 2b01 cmp r3, #1
8009650: d001 beq.n 8009656 <HAL_RCC_OscConfig+0x17a>
{
return HAL_ERROR;
8009652: 2301 movs r3, #1
8009654: e1df b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
}
/* Otherwise, just the calibration is allowed */
else
{
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
8009656: 4b41 ldr r3, [pc, #260] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009658: 681b ldr r3, [r3, #0]
800965a: f023 02f8 bic.w r2, r3, #248 ; 0xf8
800965e: 687b ldr r3, [r7, #4]
8009660: 691b ldr r3, [r3, #16]
8009662: 00db lsls r3, r3, #3
8009664: 493d ldr r1, [pc, #244] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009666: 4313 orrs r3, r2
8009668: 600b str r3, [r1, #0]
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
800966a: e040 b.n 80096ee <HAL_RCC_OscConfig+0x212>
}
}
else
{
/* Check the HSI State */
if ((RCC_OscInitStruct->HSIState) != RCC_HSI_OFF)
800966c: 687b ldr r3, [r7, #4]
800966e: 68db ldr r3, [r3, #12]
8009670: 2b00 cmp r3, #0
8009672: d023 beq.n 80096bc <HAL_RCC_OscConfig+0x1e0>
{
/* Enable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_ENABLE();
8009674: 4b39 ldr r3, [pc, #228] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009676: 681b ldr r3, [r3, #0]
8009678: 4a38 ldr r2, [pc, #224] ; (800975c <HAL_RCC_OscConfig+0x280>)
800967a: f043 0301 orr.w r3, r3, #1
800967e: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009680: f7fb fe4e bl 8005320 <HAL_GetTick>
8009684: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8009686: e008 b.n 800969a <HAL_RCC_OscConfig+0x1be>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
8009688: f7fb fe4a bl 8005320 <HAL_GetTick>
800968c: 4602 mov r2, r0
800968e: 693b ldr r3, [r7, #16]
8009690: 1ad3 subs r3, r2, r3
8009692: 2b02 cmp r3, #2
8009694: d901 bls.n 800969a <HAL_RCC_OscConfig+0x1be>
{
return HAL_TIMEOUT;
8009696: 2303 movs r3, #3
8009698: e1bd b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
800969a: 4b30 ldr r3, [pc, #192] ; (800975c <HAL_RCC_OscConfig+0x280>)
800969c: 681b ldr r3, [r3, #0]
800969e: f003 0302 and.w r3, r3, #2
80096a2: 2b00 cmp r3, #0
80096a4: d0f0 beq.n 8009688 <HAL_RCC_OscConfig+0x1ac>
}
}
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
80096a6: 4b2d ldr r3, [pc, #180] ; (800975c <HAL_RCC_OscConfig+0x280>)
80096a8: 681b ldr r3, [r3, #0]
80096aa: f023 02f8 bic.w r2, r3, #248 ; 0xf8
80096ae: 687b ldr r3, [r7, #4]
80096b0: 691b ldr r3, [r3, #16]
80096b2: 00db lsls r3, r3, #3
80096b4: 4929 ldr r1, [pc, #164] ; (800975c <HAL_RCC_OscConfig+0x280>)
80096b6: 4313 orrs r3, r2
80096b8: 600b str r3, [r1, #0]
80096ba: e018 b.n 80096ee <HAL_RCC_OscConfig+0x212>
}
else
{
/* Disable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_DISABLE();
80096bc: 4b27 ldr r3, [pc, #156] ; (800975c <HAL_RCC_OscConfig+0x280>)
80096be: 681b ldr r3, [r3, #0]
80096c0: 4a26 ldr r2, [pc, #152] ; (800975c <HAL_RCC_OscConfig+0x280>)
80096c2: f023 0301 bic.w r3, r3, #1
80096c6: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
80096c8: f7fb fe2a bl 8005320 <HAL_GetTick>
80096cc: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
80096ce: e008 b.n 80096e2 <HAL_RCC_OscConfig+0x206>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
80096d0: f7fb fe26 bl 8005320 <HAL_GetTick>
80096d4: 4602 mov r2, r0
80096d6: 693b ldr r3, [r7, #16]
80096d8: 1ad3 subs r3, r2, r3
80096da: 2b02 cmp r3, #2
80096dc: d901 bls.n 80096e2 <HAL_RCC_OscConfig+0x206>
{
return HAL_TIMEOUT;
80096de: 2303 movs r3, #3
80096e0: e199 b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
80096e2: 4b1e ldr r3, [pc, #120] ; (800975c <HAL_RCC_OscConfig+0x280>)
80096e4: 681b ldr r3, [r3, #0]
80096e6: f003 0302 and.w r3, r3, #2
80096ea: 2b00 cmp r3, #0
80096ec: d1f0 bne.n 80096d0 <HAL_RCC_OscConfig+0x1f4>
}
}
}
}
/*------------------------------ LSI Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
80096ee: 687b ldr r3, [r7, #4]
80096f0: 681b ldr r3, [r3, #0]
80096f2: f003 0308 and.w r3, r3, #8
80096f6: 2b00 cmp r3, #0
80096f8: d038 beq.n 800976c <HAL_RCC_OscConfig+0x290>
{
/* Check the parameters */
assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
/* Check the LSI State */
if ((RCC_OscInitStruct->LSIState) != RCC_LSI_OFF)
80096fa: 687b ldr r3, [r7, #4]
80096fc: 695b ldr r3, [r3, #20]
80096fe: 2b00 cmp r3, #0
8009700: d019 beq.n 8009736 <HAL_RCC_OscConfig+0x25a>
{
/* Enable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_ENABLE();
8009702: 4b16 ldr r3, [pc, #88] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009704: 6f5b ldr r3, [r3, #116] ; 0x74
8009706: 4a15 ldr r2, [pc, #84] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009708: f043 0301 orr.w r3, r3, #1
800970c: 6753 str r3, [r2, #116] ; 0x74
/* Get Start Tick*/
tickstart = HAL_GetTick();
800970e: f7fb fe07 bl 8005320 <HAL_GetTick>
8009712: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
8009714: e008 b.n 8009728 <HAL_RCC_OscConfig+0x24c>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
8009716: f7fb fe03 bl 8005320 <HAL_GetTick>
800971a: 4602 mov r2, r0
800971c: 693b ldr r3, [r7, #16]
800971e: 1ad3 subs r3, r2, r3
8009720: 2b02 cmp r3, #2
8009722: d901 bls.n 8009728 <HAL_RCC_OscConfig+0x24c>
{
return HAL_TIMEOUT;
8009724: 2303 movs r3, #3
8009726: e176 b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
8009728: 4b0c ldr r3, [pc, #48] ; (800975c <HAL_RCC_OscConfig+0x280>)
800972a: 6f5b ldr r3, [r3, #116] ; 0x74
800972c: f003 0302 and.w r3, r3, #2
8009730: 2b00 cmp r3, #0
8009732: d0f0 beq.n 8009716 <HAL_RCC_OscConfig+0x23a>
8009734: e01a b.n 800976c <HAL_RCC_OscConfig+0x290>
}
}
else
{
/* Disable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_DISABLE();
8009736: 4b09 ldr r3, [pc, #36] ; (800975c <HAL_RCC_OscConfig+0x280>)
8009738: 6f5b ldr r3, [r3, #116] ; 0x74
800973a: 4a08 ldr r2, [pc, #32] ; (800975c <HAL_RCC_OscConfig+0x280>)
800973c: f023 0301 bic.w r3, r3, #1
8009740: 6753 str r3, [r2, #116] ; 0x74
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009742: f7fb fded bl 8005320 <HAL_GetTick>
8009746: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
8009748: e00a b.n 8009760 <HAL_RCC_OscConfig+0x284>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
800974a: f7fb fde9 bl 8005320 <HAL_GetTick>
800974e: 4602 mov r2, r0
8009750: 693b ldr r3, [r7, #16]
8009752: 1ad3 subs r3, r2, r3
8009754: 2b02 cmp r3, #2
8009756: d903 bls.n 8009760 <HAL_RCC_OscConfig+0x284>
{
return HAL_TIMEOUT;
8009758: 2303 movs r3, #3
800975a: e15c b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
800975c: 40023800 .word 0x40023800
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
8009760: 4b91 ldr r3, [pc, #580] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009762: 6f5b ldr r3, [r3, #116] ; 0x74
8009764: f003 0302 and.w r3, r3, #2
8009768: 2b00 cmp r3, #0
800976a: d1ee bne.n 800974a <HAL_RCC_OscConfig+0x26e>
}
}
}
}
/*------------------------------ LSE Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
800976c: 687b ldr r3, [r7, #4]
800976e: 681b ldr r3, [r3, #0]
8009770: f003 0304 and.w r3, r3, #4
8009774: 2b00 cmp r3, #0
8009776: f000 80a4 beq.w 80098c2 <HAL_RCC_OscConfig+0x3e6>
/* Check the parameters */
assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
/* Update LSE configuration in Backup Domain control register */
/* Requires to enable write access to Backup Domain of necessary */
if (__HAL_RCC_PWR_IS_CLK_DISABLED())
800977a: 4b8b ldr r3, [pc, #556] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800977c: 6c1b ldr r3, [r3, #64] ; 0x40
800977e: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8009782: 2b00 cmp r3, #0
8009784: d10d bne.n 80097a2 <HAL_RCC_OscConfig+0x2c6>
{
/* Enable Power Clock*/
__HAL_RCC_PWR_CLK_ENABLE();
8009786: 4b88 ldr r3, [pc, #544] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009788: 6c1b ldr r3, [r3, #64] ; 0x40
800978a: 4a87 ldr r2, [pc, #540] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800978c: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8009790: 6413 str r3, [r2, #64] ; 0x40
8009792: 4b85 ldr r3, [pc, #532] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009794: 6c1b ldr r3, [r3, #64] ; 0x40
8009796: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
800979a: 60bb str r3, [r7, #8]
800979c: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
800979e: 2301 movs r3, #1
80097a0: 75fb strb r3, [r7, #23]
}
if (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
80097a2: 4b82 ldr r3, [pc, #520] ; (80099ac <HAL_RCC_OscConfig+0x4d0>)
80097a4: 681b ldr r3, [r3, #0]
80097a6: f403 7380 and.w r3, r3, #256 ; 0x100
80097aa: 2b00 cmp r3, #0
80097ac: d118 bne.n 80097e0 <HAL_RCC_OscConfig+0x304>
{
/* Enable write access to Backup domain */
PWR->CR1 |= PWR_CR1_DBP;
80097ae: 4b7f ldr r3, [pc, #508] ; (80099ac <HAL_RCC_OscConfig+0x4d0>)
80097b0: 681b ldr r3, [r3, #0]
80097b2: 4a7e ldr r2, [pc, #504] ; (80099ac <HAL_RCC_OscConfig+0x4d0>)
80097b4: f443 7380 orr.w r3, r3, #256 ; 0x100
80097b8: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
80097ba: f7fb fdb1 bl 8005320 <HAL_GetTick>
80097be: 6138 str r0, [r7, #16]
while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
80097c0: e008 b.n 80097d4 <HAL_RCC_OscConfig+0x2f8>
{
if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
80097c2: f7fb fdad bl 8005320 <HAL_GetTick>
80097c6: 4602 mov r2, r0
80097c8: 693b ldr r3, [r7, #16]
80097ca: 1ad3 subs r3, r2, r3
80097cc: 2b64 cmp r3, #100 ; 0x64
80097ce: d901 bls.n 80097d4 <HAL_RCC_OscConfig+0x2f8>
{
return HAL_TIMEOUT;
80097d0: 2303 movs r3, #3
80097d2: e120 b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
80097d4: 4b75 ldr r3, [pc, #468] ; (80099ac <HAL_RCC_OscConfig+0x4d0>)
80097d6: 681b ldr r3, [r3, #0]
80097d8: f403 7380 and.w r3, r3, #256 ; 0x100
80097dc: 2b00 cmp r3, #0
80097de: d0f0 beq.n 80097c2 <HAL_RCC_OscConfig+0x2e6>
}
}
}
/* Set the new LSE configuration -----------------------------------------*/
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
80097e0: 687b ldr r3, [r7, #4]
80097e2: 689b ldr r3, [r3, #8]
80097e4: 2b01 cmp r3, #1
80097e6: d106 bne.n 80097f6 <HAL_RCC_OscConfig+0x31a>
80097e8: 4b6f ldr r3, [pc, #444] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
80097ea: 6f1b ldr r3, [r3, #112] ; 0x70
80097ec: 4a6e ldr r2, [pc, #440] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
80097ee: f043 0301 orr.w r3, r3, #1
80097f2: 6713 str r3, [r2, #112] ; 0x70
80097f4: e02d b.n 8009852 <HAL_RCC_OscConfig+0x376>
80097f6: 687b ldr r3, [r7, #4]
80097f8: 689b ldr r3, [r3, #8]
80097fa: 2b00 cmp r3, #0
80097fc: d10c bne.n 8009818 <HAL_RCC_OscConfig+0x33c>
80097fe: 4b6a ldr r3, [pc, #424] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009800: 6f1b ldr r3, [r3, #112] ; 0x70
8009802: 4a69 ldr r2, [pc, #420] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009804: f023 0301 bic.w r3, r3, #1
8009808: 6713 str r3, [r2, #112] ; 0x70
800980a: 4b67 ldr r3, [pc, #412] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800980c: 6f1b ldr r3, [r3, #112] ; 0x70
800980e: 4a66 ldr r2, [pc, #408] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009810: f023 0304 bic.w r3, r3, #4
8009814: 6713 str r3, [r2, #112] ; 0x70
8009816: e01c b.n 8009852 <HAL_RCC_OscConfig+0x376>
8009818: 687b ldr r3, [r7, #4]
800981a: 689b ldr r3, [r3, #8]
800981c: 2b05 cmp r3, #5
800981e: d10c bne.n 800983a <HAL_RCC_OscConfig+0x35e>
8009820: 4b61 ldr r3, [pc, #388] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009822: 6f1b ldr r3, [r3, #112] ; 0x70
8009824: 4a60 ldr r2, [pc, #384] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009826: f043 0304 orr.w r3, r3, #4
800982a: 6713 str r3, [r2, #112] ; 0x70
800982c: 4b5e ldr r3, [pc, #376] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800982e: 6f1b ldr r3, [r3, #112] ; 0x70
8009830: 4a5d ldr r2, [pc, #372] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009832: f043 0301 orr.w r3, r3, #1
8009836: 6713 str r3, [r2, #112] ; 0x70
8009838: e00b b.n 8009852 <HAL_RCC_OscConfig+0x376>
800983a: 4b5b ldr r3, [pc, #364] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800983c: 6f1b ldr r3, [r3, #112] ; 0x70
800983e: 4a5a ldr r2, [pc, #360] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009840: f023 0301 bic.w r3, r3, #1
8009844: 6713 str r3, [r2, #112] ; 0x70
8009846: 4b58 ldr r3, [pc, #352] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009848: 6f1b ldr r3, [r3, #112] ; 0x70
800984a: 4a57 ldr r2, [pc, #348] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800984c: f023 0304 bic.w r3, r3, #4
8009850: 6713 str r3, [r2, #112] ; 0x70
/* Check the LSE State */
if ((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
8009852: 687b ldr r3, [r7, #4]
8009854: 689b ldr r3, [r3, #8]
8009856: 2b00 cmp r3, #0
8009858: d015 beq.n 8009886 <HAL_RCC_OscConfig+0x3aa>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
800985a: f7fb fd61 bl 8005320 <HAL_GetTick>
800985e: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8009860: e00a b.n 8009878 <HAL_RCC_OscConfig+0x39c>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
8009862: f7fb fd5d bl 8005320 <HAL_GetTick>
8009866: 4602 mov r2, r0
8009868: 693b ldr r3, [r7, #16]
800986a: 1ad3 subs r3, r2, r3
800986c: f241 3288 movw r2, #5000 ; 0x1388
8009870: 4293 cmp r3, r2
8009872: d901 bls.n 8009878 <HAL_RCC_OscConfig+0x39c>
{
return HAL_TIMEOUT;
8009874: 2303 movs r3, #3
8009876: e0ce b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8009878: 4b4b ldr r3, [pc, #300] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800987a: 6f1b ldr r3, [r3, #112] ; 0x70
800987c: f003 0302 and.w r3, r3, #2
8009880: 2b00 cmp r3, #0
8009882: d0ee beq.n 8009862 <HAL_RCC_OscConfig+0x386>
8009884: e014 b.n 80098b0 <HAL_RCC_OscConfig+0x3d4>
}
}
else
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009886: f7fb fd4b bl 8005320 <HAL_GetTick>
800988a: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
800988c: e00a b.n 80098a4 <HAL_RCC_OscConfig+0x3c8>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
800988e: f7fb fd47 bl 8005320 <HAL_GetTick>
8009892: 4602 mov r2, r0
8009894: 693b ldr r3, [r7, #16]
8009896: 1ad3 subs r3, r2, r3
8009898: f241 3288 movw r2, #5000 ; 0x1388
800989c: 4293 cmp r3, r2
800989e: d901 bls.n 80098a4 <HAL_RCC_OscConfig+0x3c8>
{
return HAL_TIMEOUT;
80098a0: 2303 movs r3, #3
80098a2: e0b8 b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
80098a4: 4b40 ldr r3, [pc, #256] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
80098a6: 6f1b ldr r3, [r3, #112] ; 0x70
80098a8: f003 0302 and.w r3, r3, #2
80098ac: 2b00 cmp r3, #0
80098ae: d1ee bne.n 800988e <HAL_RCC_OscConfig+0x3b2>
}
}
}
/* Restore clock configuration if changed */
if (pwrclkchanged == SET)
80098b0: 7dfb ldrb r3, [r7, #23]
80098b2: 2b01 cmp r3, #1
80098b4: d105 bne.n 80098c2 <HAL_RCC_OscConfig+0x3e6>
{
__HAL_RCC_PWR_CLK_DISABLE();
80098b6: 4b3c ldr r3, [pc, #240] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
80098b8: 6c1b ldr r3, [r3, #64] ; 0x40
80098ba: 4a3b ldr r2, [pc, #236] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
80098bc: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
80098c0: 6413 str r3, [r2, #64] ; 0x40
}
}
/*-------------------------------- PLL Configuration -----------------------*/
/* Check the parameters */
assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
80098c2: 687b ldr r3, [r7, #4]
80098c4: 699b ldr r3, [r3, #24]
80098c6: 2b00 cmp r3, #0
80098c8: f000 80a4 beq.w 8009a14 <HAL_RCC_OscConfig+0x538>
{
/* Check if the PLL is used as system clock or not */
if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
80098cc: 4b36 ldr r3, [pc, #216] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
80098ce: 689b ldr r3, [r3, #8]
80098d0: f003 030c and.w r3, r3, #12
80098d4: 2b08 cmp r3, #8
80098d6: d06b beq.n 80099b0 <HAL_RCC_OscConfig+0x4d4>
{
if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
80098d8: 687b ldr r3, [r7, #4]
80098da: 699b ldr r3, [r3, #24]
80098dc: 2b02 cmp r3, #2
80098de: d149 bne.n 8009974 <HAL_RCC_OscConfig+0x498>
#if defined (RCC_PLLCFGR_PLLR)
assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR));
#endif
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
80098e0: 4b31 ldr r3, [pc, #196] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
80098e2: 681b ldr r3, [r3, #0]
80098e4: 4a30 ldr r2, [pc, #192] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
80098e6: f023 7380 bic.w r3, r3, #16777216 ; 0x1000000
80098ea: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
80098ec: f7fb fd18 bl 8005320 <HAL_GetTick>
80098f0: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
80098f2: e008 b.n 8009906 <HAL_RCC_OscConfig+0x42a>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
80098f4: f7fb fd14 bl 8005320 <HAL_GetTick>
80098f8: 4602 mov r2, r0
80098fa: 693b ldr r3, [r7, #16]
80098fc: 1ad3 subs r3, r2, r3
80098fe: 2b02 cmp r3, #2
8009900: d901 bls.n 8009906 <HAL_RCC_OscConfig+0x42a>
{
return HAL_TIMEOUT;
8009902: 2303 movs r3, #3
8009904: e087 b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8009906: 4b28 ldr r3, [pc, #160] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009908: 681b ldr r3, [r3, #0]
800990a: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800990e: 2b00 cmp r3, #0
8009910: d1f0 bne.n 80098f4 <HAL_RCC_OscConfig+0x418>
RCC_OscInitStruct->PLL.PLLN,
RCC_OscInitStruct->PLL.PLLP,
RCC_OscInitStruct->PLL.PLLQ,
RCC_OscInitStruct->PLL.PLLR);
#else
__HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
8009912: 687b ldr r3, [r7, #4]
8009914: 69da ldr r2, [r3, #28]
8009916: 687b ldr r3, [r7, #4]
8009918: 6a1b ldr r3, [r3, #32]
800991a: 431a orrs r2, r3
800991c: 687b ldr r3, [r7, #4]
800991e: 6a5b ldr r3, [r3, #36] ; 0x24
8009920: 019b lsls r3, r3, #6
8009922: 431a orrs r2, r3
8009924: 687b ldr r3, [r7, #4]
8009926: 6a9b ldr r3, [r3, #40] ; 0x28
8009928: 085b lsrs r3, r3, #1
800992a: 3b01 subs r3, #1
800992c: 041b lsls r3, r3, #16
800992e: 431a orrs r2, r3
8009930: 687b ldr r3, [r7, #4]
8009932: 6adb ldr r3, [r3, #44] ; 0x2c
8009934: 061b lsls r3, r3, #24
8009936: 4313 orrs r3, r2
8009938: 4a1b ldr r2, [pc, #108] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800993a: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
800993e: 6053 str r3, [r2, #4]
RCC_OscInitStruct->PLL.PLLP,
RCC_OscInitStruct->PLL.PLLQ);
#endif
/* Enable the main PLL. */
__HAL_RCC_PLL_ENABLE();
8009940: 4b19 ldr r3, [pc, #100] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009942: 681b ldr r3, [r3, #0]
8009944: 4a18 ldr r2, [pc, #96] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009946: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
800994a: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
800994c: f7fb fce8 bl 8005320 <HAL_GetTick>
8009950: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8009952: e008 b.n 8009966 <HAL_RCC_OscConfig+0x48a>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8009954: f7fb fce4 bl 8005320 <HAL_GetTick>
8009958: 4602 mov r2, r0
800995a: 693b ldr r3, [r7, #16]
800995c: 1ad3 subs r3, r2, r3
800995e: 2b02 cmp r3, #2
8009960: d901 bls.n 8009966 <HAL_RCC_OscConfig+0x48a>
{
return HAL_TIMEOUT;
8009962: 2303 movs r3, #3
8009964: e057 b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8009966: 4b10 ldr r3, [pc, #64] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009968: 681b ldr r3, [r3, #0]
800996a: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800996e: 2b00 cmp r3, #0
8009970: d0f0 beq.n 8009954 <HAL_RCC_OscConfig+0x478>
8009972: e04f b.n 8009a14 <HAL_RCC_OscConfig+0x538>
}
}
else
{
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
8009974: 4b0c ldr r3, [pc, #48] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
8009976: 681b ldr r3, [r3, #0]
8009978: 4a0b ldr r2, [pc, #44] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800997a: f023 7380 bic.w r3, r3, #16777216 ; 0x1000000
800997e: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009980: f7fb fcce bl 8005320 <HAL_GetTick>
8009984: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8009986: e008 b.n 800999a <HAL_RCC_OscConfig+0x4be>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8009988: f7fb fcca bl 8005320 <HAL_GetTick>
800998c: 4602 mov r2, r0
800998e: 693b ldr r3, [r7, #16]
8009990: 1ad3 subs r3, r2, r3
8009992: 2b02 cmp r3, #2
8009994: d901 bls.n 800999a <HAL_RCC_OscConfig+0x4be>
{
return HAL_TIMEOUT;
8009996: 2303 movs r3, #3
8009998: e03d b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
800999a: 4b03 ldr r3, [pc, #12] ; (80099a8 <HAL_RCC_OscConfig+0x4cc>)
800999c: 681b ldr r3, [r3, #0]
800999e: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
80099a2: 2b00 cmp r3, #0
80099a4: d1f0 bne.n 8009988 <HAL_RCC_OscConfig+0x4ac>
80099a6: e035 b.n 8009a14 <HAL_RCC_OscConfig+0x538>
80099a8: 40023800 .word 0x40023800
80099ac: 40007000 .word 0x40007000
}
}
else
{
/* Do not return HAL_ERROR if request repeats the current configuration */
pll_config = RCC->PLLCFGR;
80099b0: 4b1b ldr r3, [pc, #108] ; (8009a20 <HAL_RCC_OscConfig+0x544>)
80099b2: 685b ldr r3, [r3, #4]
80099b4: 60fb str r3, [r7, #12]
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != ((((RCC_OscInitStruct->PLL.PLLP) >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos)) ||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)) ||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLR) != (RCC_OscInitStruct->PLL.PLLR << RCC_PLLCFGR_PLLR_Pos)))
#else
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
80099b6: 687b ldr r3, [r7, #4]
80099b8: 699b ldr r3, [r3, #24]
80099ba: 2b01 cmp r3, #1
80099bc: d028 beq.n 8009a10 <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
80099be: 68fb ldr r3, [r7, #12]
80099c0: f403 0280 and.w r2, r3, #4194304 ; 0x400000
80099c4: 687b ldr r3, [r7, #4]
80099c6: 69db ldr r3, [r3, #28]
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
80099c8: 429a cmp r2, r3
80099ca: d121 bne.n 8009a10 <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
80099cc: 68fb ldr r3, [r7, #12]
80099ce: f003 023f and.w r2, r3, #63 ; 0x3f
80099d2: 687b ldr r3, [r7, #4]
80099d4: 6a1b ldr r3, [r3, #32]
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
80099d6: 429a cmp r2, r3
80099d8: d11a bne.n 8009a10 <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
80099da: 68fa ldr r2, [r7, #12]
80099dc: f647 73c0 movw r3, #32704 ; 0x7fc0
80099e0: 4013 ands r3, r2
80099e2: 687a ldr r2, [r7, #4]
80099e4: 6a52 ldr r2, [r2, #36] ; 0x24
80099e6: 0192 lsls r2, r2, #6
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
80099e8: 4293 cmp r3, r2
80099ea: d111 bne.n 8009a10 <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != ((((RCC_OscInitStruct->PLL.PLLP) >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos)) ||
80099ec: 68fb ldr r3, [r7, #12]
80099ee: f403 3240 and.w r2, r3, #196608 ; 0x30000
80099f2: 687b ldr r3, [r7, #4]
80099f4: 6a9b ldr r3, [r3, #40] ; 0x28
80099f6: 085b lsrs r3, r3, #1
80099f8: 3b01 subs r3, #1
80099fa: 041b lsls r3, r3, #16
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
80099fc: 429a cmp r2, r3
80099fe: d107 bne.n 8009a10 <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
8009a00: 68fb ldr r3, [r7, #12]
8009a02: f003 6270 and.w r2, r3, #251658240 ; 0xf000000
8009a06: 687b ldr r3, [r7, #4]
8009a08: 6adb ldr r3, [r3, #44] ; 0x2c
8009a0a: 061b lsls r3, r3, #24
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != ((((RCC_OscInitStruct->PLL.PLLP) >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos)) ||
8009a0c: 429a cmp r2, r3
8009a0e: d001 beq.n 8009a14 <HAL_RCC_OscConfig+0x538>
#endif
{
return HAL_ERROR;
8009a10: 2301 movs r3, #1
8009a12: e000 b.n 8009a16 <HAL_RCC_OscConfig+0x53a>
}
}
}
return HAL_OK;
8009a14: 2300 movs r3, #0
}
8009a16: 4618 mov r0, r3
8009a18: 3718 adds r7, #24
8009a1a: 46bd mov sp, r7
8009a1c: bd80 pop {r7, pc}
8009a1e: bf00 nop
8009a20: 40023800 .word 0x40023800
08009a24 <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)
{
8009a24: b580 push {r7, lr}
8009a26: b084 sub sp, #16
8009a28: af00 add r7, sp, #0
8009a2a: 6078 str r0, [r7, #4]
8009a2c: 6039 str r1, [r7, #0]
uint32_t tickstart = 0;
8009a2e: 2300 movs r3, #0
8009a30: 60fb str r3, [r7, #12]
/* Check Null pointer */
if (RCC_ClkInitStruct == NULL)
8009a32: 687b ldr r3, [r7, #4]
8009a34: 2b00 cmp r3, #0
8009a36: d101 bne.n 8009a3c <HAL_RCC_ClockConfig+0x18>
{
return HAL_ERROR;
8009a38: 2301 movs r3, #1
8009a3a: e0d0 b.n 8009bde <HAL_RCC_ClockConfig+0x1ba>
/* 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 CPU frequency */
if (FLatency > __HAL_FLASH_GET_LATENCY())
8009a3c: 4b6a ldr r3, [pc, #424] ; (8009be8 <HAL_RCC_ClockConfig+0x1c4>)
8009a3e: 681b ldr r3, [r3, #0]
8009a40: f003 030f and.w r3, r3, #15
8009a44: 683a ldr r2, [r7, #0]
8009a46: 429a cmp r2, r3
8009a48: d910 bls.n 8009a6c <HAL_RCC_ClockConfig+0x48>
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
__HAL_FLASH_SET_LATENCY(FLatency);
8009a4a: 4b67 ldr r3, [pc, #412] ; (8009be8 <HAL_RCC_ClockConfig+0x1c4>)
8009a4c: 681b ldr r3, [r3, #0]
8009a4e: f023 020f bic.w r2, r3, #15
8009a52: 4965 ldr r1, [pc, #404] ; (8009be8 <HAL_RCC_ClockConfig+0x1c4>)
8009a54: 683b ldr r3, [r7, #0]
8009a56: 4313 orrs r3, r2
8009a58: 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)
8009a5a: 4b63 ldr r3, [pc, #396] ; (8009be8 <HAL_RCC_ClockConfig+0x1c4>)
8009a5c: 681b ldr r3, [r3, #0]
8009a5e: f003 030f and.w r3, r3, #15
8009a62: 683a ldr r2, [r7, #0]
8009a64: 429a cmp r2, r3
8009a66: d001 beq.n 8009a6c <HAL_RCC_ClockConfig+0x48>
{
return HAL_ERROR;
8009a68: 2301 movs r3, #1
8009a6a: e0b8 b.n 8009bde <HAL_RCC_ClockConfig+0x1ba>
}
}
/*-------------------------- HCLK Configuration --------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
8009a6c: 687b ldr r3, [r7, #4]
8009a6e: 681b ldr r3, [r3, #0]
8009a70: f003 0302 and.w r3, r3, #2
8009a74: 2b00 cmp r3, #0
8009a76: d020 beq.n 8009aba <HAL_RCC_ClockConfig+0x96>
{
/* Set the highest APBx dividers in order to ensure that we do not go through
a non-spec phase whatever we decrease or increase HCLK. */
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
8009a78: 687b ldr r3, [r7, #4]
8009a7a: 681b ldr r3, [r3, #0]
8009a7c: f003 0304 and.w r3, r3, #4
8009a80: 2b00 cmp r3, #0
8009a82: d005 beq.n 8009a90 <HAL_RCC_ClockConfig+0x6c>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
8009a84: 4b59 ldr r3, [pc, #356] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009a86: 689b ldr r3, [r3, #8]
8009a88: 4a58 ldr r2, [pc, #352] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009a8a: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00
8009a8e: 6093 str r3, [r2, #8]
}
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
8009a90: 687b ldr r3, [r7, #4]
8009a92: 681b ldr r3, [r3, #0]
8009a94: f003 0308 and.w r3, r3, #8
8009a98: 2b00 cmp r3, #0
8009a9a: d005 beq.n 8009aa8 <HAL_RCC_ClockConfig+0x84>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
8009a9c: 4b53 ldr r3, [pc, #332] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009a9e: 689b ldr r3, [r3, #8]
8009aa0: 4a52 ldr r2, [pc, #328] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009aa2: f443 4360 orr.w r3, r3, #57344 ; 0xe000
8009aa6: 6093 str r3, [r2, #8]
}
/* Set the new HCLK clock divider */
assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
8009aa8: 4b50 ldr r3, [pc, #320] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009aaa: 689b ldr r3, [r3, #8]
8009aac: f023 02f0 bic.w r2, r3, #240 ; 0xf0
8009ab0: 687b ldr r3, [r7, #4]
8009ab2: 689b ldr r3, [r3, #8]
8009ab4: 494d ldr r1, [pc, #308] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009ab6: 4313 orrs r3, r2
8009ab8: 608b str r3, [r1, #8]
}
/*------------------------- SYSCLK Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
8009aba: 687b ldr r3, [r7, #4]
8009abc: 681b ldr r3, [r3, #0]
8009abe: f003 0301 and.w r3, r3, #1
8009ac2: 2b00 cmp r3, #0
8009ac4: d040 beq.n 8009b48 <HAL_RCC_ClockConfig+0x124>
{
assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
/* HSE is selected as System Clock Source */
if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
8009ac6: 687b ldr r3, [r7, #4]
8009ac8: 685b ldr r3, [r3, #4]
8009aca: 2b01 cmp r3, #1
8009acc: d107 bne.n 8009ade <HAL_RCC_ClockConfig+0xba>
{
/* Check the HSE ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8009ace: 4b47 ldr r3, [pc, #284] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009ad0: 681b ldr r3, [r3, #0]
8009ad2: f403 3300 and.w r3, r3, #131072 ; 0x20000
8009ad6: 2b00 cmp r3, #0
8009ad8: d115 bne.n 8009b06 <HAL_RCC_ClockConfig+0xe2>
{
return HAL_ERROR;
8009ada: 2301 movs r3, #1
8009adc: e07f b.n 8009bde <HAL_RCC_ClockConfig+0x1ba>
}
}
/* PLL is selected as System Clock Source */
else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
8009ade: 687b ldr r3, [r7, #4]
8009ae0: 685b ldr r3, [r3, #4]
8009ae2: 2b02 cmp r3, #2
8009ae4: d107 bne.n 8009af6 <HAL_RCC_ClockConfig+0xd2>
{
/* Check the PLL ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8009ae6: 4b41 ldr r3, [pc, #260] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009ae8: 681b ldr r3, [r3, #0]
8009aea: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8009aee: 2b00 cmp r3, #0
8009af0: d109 bne.n 8009b06 <HAL_RCC_ClockConfig+0xe2>
{
return HAL_ERROR;
8009af2: 2301 movs r3, #1
8009af4: e073 b.n 8009bde <HAL_RCC_ClockConfig+0x1ba>
}
/* HSI is selected as System Clock Source */
else
{
/* Check the HSI ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8009af6: 4b3d ldr r3, [pc, #244] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009af8: 681b ldr r3, [r3, #0]
8009afa: f003 0302 and.w r3, r3, #2
8009afe: 2b00 cmp r3, #0
8009b00: d101 bne.n 8009b06 <HAL_RCC_ClockConfig+0xe2>
{
return HAL_ERROR;
8009b02: 2301 movs r3, #1
8009b04: e06b b.n 8009bde <HAL_RCC_ClockConfig+0x1ba>
}
}
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
8009b06: 4b39 ldr r3, [pc, #228] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009b08: 689b ldr r3, [r3, #8]
8009b0a: f023 0203 bic.w r2, r3, #3
8009b0e: 687b ldr r3, [r7, #4]
8009b10: 685b ldr r3, [r3, #4]
8009b12: 4936 ldr r1, [pc, #216] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009b14: 4313 orrs r3, r2
8009b16: 608b str r3, [r1, #8]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009b18: f7fb fc02 bl 8005320 <HAL_GetTick>
8009b1c: 60f8 str r0, [r7, #12]
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
8009b1e: e00a b.n 8009b36 <HAL_RCC_ClockConfig+0x112>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
8009b20: f7fb fbfe bl 8005320 <HAL_GetTick>
8009b24: 4602 mov r2, r0
8009b26: 68fb ldr r3, [r7, #12]
8009b28: 1ad3 subs r3, r2, r3
8009b2a: f241 3288 movw r2, #5000 ; 0x1388
8009b2e: 4293 cmp r3, r2
8009b30: d901 bls.n 8009b36 <HAL_RCC_ClockConfig+0x112>
{
return HAL_TIMEOUT;
8009b32: 2303 movs r3, #3
8009b34: e053 b.n 8009bde <HAL_RCC_ClockConfig+0x1ba>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
8009b36: 4b2d ldr r3, [pc, #180] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009b38: 689b ldr r3, [r3, #8]
8009b3a: f003 020c and.w r2, r3, #12
8009b3e: 687b ldr r3, [r7, #4]
8009b40: 685b ldr r3, [r3, #4]
8009b42: 009b lsls r3, r3, #2
8009b44: 429a cmp r2, r3
8009b46: d1eb bne.n 8009b20 <HAL_RCC_ClockConfig+0xfc>
}
}
}
/* Decreasing the number of wait states because of lower CPU frequency */
if (FLatency < __HAL_FLASH_GET_LATENCY())
8009b48: 4b27 ldr r3, [pc, #156] ; (8009be8 <HAL_RCC_ClockConfig+0x1c4>)
8009b4a: 681b ldr r3, [r3, #0]
8009b4c: f003 030f and.w r3, r3, #15
8009b50: 683a ldr r2, [r7, #0]
8009b52: 429a cmp r2, r3
8009b54: d210 bcs.n 8009b78 <HAL_RCC_ClockConfig+0x154>
{
/* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
__HAL_FLASH_SET_LATENCY(FLatency);
8009b56: 4b24 ldr r3, [pc, #144] ; (8009be8 <HAL_RCC_ClockConfig+0x1c4>)
8009b58: 681b ldr r3, [r3, #0]
8009b5a: f023 020f bic.w r2, r3, #15
8009b5e: 4922 ldr r1, [pc, #136] ; (8009be8 <HAL_RCC_ClockConfig+0x1c4>)
8009b60: 683b ldr r3, [r7, #0]
8009b62: 4313 orrs r3, r2
8009b64: 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)
8009b66: 4b20 ldr r3, [pc, #128] ; (8009be8 <HAL_RCC_ClockConfig+0x1c4>)
8009b68: 681b ldr r3, [r3, #0]
8009b6a: f003 030f and.w r3, r3, #15
8009b6e: 683a ldr r2, [r7, #0]
8009b70: 429a cmp r2, r3
8009b72: d001 beq.n 8009b78 <HAL_RCC_ClockConfig+0x154>
{
return HAL_ERROR;
8009b74: 2301 movs r3, #1
8009b76: e032 b.n 8009bde <HAL_RCC_ClockConfig+0x1ba>
}
}
/*-------------------------- PCLK1 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
8009b78: 687b ldr r3, [r7, #4]
8009b7a: 681b ldr r3, [r3, #0]
8009b7c: f003 0304 and.w r3, r3, #4
8009b80: 2b00 cmp r3, #0
8009b82: d008 beq.n 8009b96 <HAL_RCC_ClockConfig+0x172>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
8009b84: 4b19 ldr r3, [pc, #100] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009b86: 689b ldr r3, [r3, #8]
8009b88: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00
8009b8c: 687b ldr r3, [r7, #4]
8009b8e: 68db ldr r3, [r3, #12]
8009b90: 4916 ldr r1, [pc, #88] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009b92: 4313 orrs r3, r2
8009b94: 608b str r3, [r1, #8]
}
/*-------------------------- PCLK2 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
8009b96: 687b ldr r3, [r7, #4]
8009b98: 681b ldr r3, [r3, #0]
8009b9a: f003 0308 and.w r3, r3, #8
8009b9e: 2b00 cmp r3, #0
8009ba0: d009 beq.n 8009bb6 <HAL_RCC_ClockConfig+0x192>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3));
8009ba2: 4b12 ldr r3, [pc, #72] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009ba4: 689b ldr r3, [r3, #8]
8009ba6: f423 4260 bic.w r2, r3, #57344 ; 0xe000
8009baa: 687b ldr r3, [r7, #4]
8009bac: 691b ldr r3, [r3, #16]
8009bae: 00db lsls r3, r3, #3
8009bb0: 490e ldr r1, [pc, #56] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009bb2: 4313 orrs r3, r2
8009bb4: 608b str r3, [r1, #8]
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos];
8009bb6: f000 f821 bl 8009bfc <HAL_RCC_GetSysClockFreq>
8009bba: 4601 mov r1, r0
8009bbc: 4b0b ldr r3, [pc, #44] ; (8009bec <HAL_RCC_ClockConfig+0x1c8>)
8009bbe: 689b ldr r3, [r3, #8]
8009bc0: 091b lsrs r3, r3, #4
8009bc2: f003 030f and.w r3, r3, #15
8009bc6: 4a0a ldr r2, [pc, #40] ; (8009bf0 <HAL_RCC_ClockConfig+0x1cc>)
8009bc8: 5cd3 ldrb r3, [r2, r3]
8009bca: fa21 f303 lsr.w r3, r1, r3
8009bce: 4a09 ldr r2, [pc, #36] ; (8009bf4 <HAL_RCC_ClockConfig+0x1d0>)
8009bd0: 6013 str r3, [r2, #0]
/* Configure the source of time base considering new system clocks settings*/
HAL_InitTick(uwTickPrio);
8009bd2: 4b09 ldr r3, [pc, #36] ; (8009bf8 <HAL_RCC_ClockConfig+0x1d4>)
8009bd4: 681b ldr r3, [r3, #0]
8009bd6: 4618 mov r0, r3
8009bd8: f7fb fa0c bl 8004ff4 <HAL_InitTick>
return HAL_OK;
8009bdc: 2300 movs r3, #0
}
8009bde: 4618 mov r0, r3
8009be0: 3710 adds r7, #16
8009be2: 46bd mov sp, r7
8009be4: bd80 pop {r7, pc}
8009be6: bf00 nop
8009be8: 40023c00 .word 0x40023c00
8009bec: 40023800 .word 0x40023800
8009bf0: 08022d68 .word 0x08022d68
8009bf4: 20000064 .word 0x20000064
8009bf8: 20000068 .word 0x20000068
08009bfc <HAL_RCC_GetSysClockFreq>:
*
*
* @retval SYSCLK frequency
*/
uint32_t HAL_RCC_GetSysClockFreq(void)
{
8009bfc: b5f0 push {r4, r5, r6, r7, lr}
8009bfe: b085 sub sp, #20
8009c00: af00 add r7, sp, #0
uint32_t pllm = 0, pllvco = 0, pllp = 0;
8009c02: 2300 movs r3, #0
8009c04: 607b str r3, [r7, #4]
8009c06: 2300 movs r3, #0
8009c08: 60fb str r3, [r7, #12]
8009c0a: 2300 movs r3, #0
8009c0c: 603b str r3, [r7, #0]
uint32_t sysclockfreq = 0;
8009c0e: 2300 movs r3, #0
8009c10: 60bb str r3, [r7, #8]
/* Get SYSCLK source -------------------------------------------------------*/
switch (RCC->CFGR & RCC_CFGR_SWS)
8009c12: 4b50 ldr r3, [pc, #320] ; (8009d54 <HAL_RCC_GetSysClockFreq+0x158>)
8009c14: 689b ldr r3, [r3, #8]
8009c16: f003 030c and.w r3, r3, #12
8009c1a: 2b04 cmp r3, #4
8009c1c: d007 beq.n 8009c2e <HAL_RCC_GetSysClockFreq+0x32>
8009c1e: 2b08 cmp r3, #8
8009c20: d008 beq.n 8009c34 <HAL_RCC_GetSysClockFreq+0x38>
8009c22: 2b00 cmp r3, #0
8009c24: f040 808d bne.w 8009d42 <HAL_RCC_GetSysClockFreq+0x146>
{
case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */
{
sysclockfreq = HSI_VALUE;
8009c28: 4b4b ldr r3, [pc, #300] ; (8009d58 <HAL_RCC_GetSysClockFreq+0x15c>)
8009c2a: 60bb str r3, [r7, #8]
break;
8009c2c: e08c b.n 8009d48 <HAL_RCC_GetSysClockFreq+0x14c>
}
case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock source */
{
sysclockfreq = HSE_VALUE;
8009c2e: 4b4b ldr r3, [pc, #300] ; (8009d5c <HAL_RCC_GetSysClockFreq+0x160>)
8009c30: 60bb str r3, [r7, #8]
break;
8009c32: e089 b.n 8009d48 <HAL_RCC_GetSysClockFreq+0x14c>
}
case RCC_SYSCLKSOURCE_STATUS_PLLCLK: /* PLL used as system clock source */
{
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN
SYSCLK = PLL_VCO / PLLP */
pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
8009c34: 4b47 ldr r3, [pc, #284] ; (8009d54 <HAL_RCC_GetSysClockFreq+0x158>)
8009c36: 685b ldr r3, [r3, #4]
8009c38: f003 033f and.w r3, r3, #63 ; 0x3f
8009c3c: 607b str r3, [r7, #4]
if (__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLCFGR_PLLSRC_HSI)
8009c3e: 4b45 ldr r3, [pc, #276] ; (8009d54 <HAL_RCC_GetSysClockFreq+0x158>)
8009c40: 685b ldr r3, [r3, #4]
8009c42: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8009c46: 2b00 cmp r3, #0
8009c48: d023 beq.n 8009c92 <HAL_RCC_GetSysClockFreq+0x96>
{
/* HSE used as PLL clock source */
pllvco = (uint32_t)((((uint64_t) HSE_VALUE * ((uint64_t)((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
8009c4a: 4b42 ldr r3, [pc, #264] ; (8009d54 <HAL_RCC_GetSysClockFreq+0x158>)
8009c4c: 685b ldr r3, [r3, #4]
8009c4e: 099b lsrs r3, r3, #6
8009c50: f04f 0400 mov.w r4, #0
8009c54: f240 11ff movw r1, #511 ; 0x1ff
8009c58: f04f 0200 mov.w r2, #0
8009c5c: ea03 0501 and.w r5, r3, r1
8009c60: ea04 0602 and.w r6, r4, r2
8009c64: 4a3d ldr r2, [pc, #244] ; (8009d5c <HAL_RCC_GetSysClockFreq+0x160>)
8009c66: fb02 f106 mul.w r1, r2, r6
8009c6a: 2200 movs r2, #0
8009c6c: fb02 f205 mul.w r2, r2, r5
8009c70: 440a add r2, r1
8009c72: 493a ldr r1, [pc, #232] ; (8009d5c <HAL_RCC_GetSysClockFreq+0x160>)
8009c74: fba5 0101 umull r0, r1, r5, r1
8009c78: 1853 adds r3, r2, r1
8009c7a: 4619 mov r1, r3
8009c7c: 687b ldr r3, [r7, #4]
8009c7e: f04f 0400 mov.w r4, #0
8009c82: 461a mov r2, r3
8009c84: 4623 mov r3, r4
8009c86: f7f6 fb13 bl 80002b0 <__aeabi_uldivmod>
8009c8a: 4603 mov r3, r0
8009c8c: 460c mov r4, r1
8009c8e: 60fb str r3, [r7, #12]
8009c90: e049 b.n 8009d26 <HAL_RCC_GetSysClockFreq+0x12a>
}
else
{
/* HSI used as PLL clock source */
pllvco = (uint32_t)((((uint64_t) HSI_VALUE * ((uint64_t)((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
8009c92: 4b30 ldr r3, [pc, #192] ; (8009d54 <HAL_RCC_GetSysClockFreq+0x158>)
8009c94: 685b ldr r3, [r3, #4]
8009c96: 099b lsrs r3, r3, #6
8009c98: f04f 0400 mov.w r4, #0
8009c9c: f240 11ff movw r1, #511 ; 0x1ff
8009ca0: f04f 0200 mov.w r2, #0
8009ca4: ea03 0501 and.w r5, r3, r1
8009ca8: ea04 0602 and.w r6, r4, r2
8009cac: 4629 mov r1, r5
8009cae: 4632 mov r2, r6
8009cb0: f04f 0300 mov.w r3, #0
8009cb4: f04f 0400 mov.w r4, #0
8009cb8: 0154 lsls r4, r2, #5
8009cba: ea44 64d1 orr.w r4, r4, r1, lsr #27
8009cbe: 014b lsls r3, r1, #5
8009cc0: 4619 mov r1, r3
8009cc2: 4622 mov r2, r4
8009cc4: 1b49 subs r1, r1, r5
8009cc6: eb62 0206 sbc.w r2, r2, r6
8009cca: f04f 0300 mov.w r3, #0
8009cce: f04f 0400 mov.w r4, #0
8009cd2: 0194 lsls r4, r2, #6
8009cd4: ea44 6491 orr.w r4, r4, r1, lsr #26
8009cd8: 018b lsls r3, r1, #6
8009cda: 1a5b subs r3, r3, r1
8009cdc: eb64 0402 sbc.w r4, r4, r2
8009ce0: f04f 0100 mov.w r1, #0
8009ce4: f04f 0200 mov.w r2, #0
8009ce8: 00e2 lsls r2, r4, #3
8009cea: ea42 7253 orr.w r2, r2, r3, lsr #29
8009cee: 00d9 lsls r1, r3, #3
8009cf0: 460b mov r3, r1
8009cf2: 4614 mov r4, r2
8009cf4: 195b adds r3, r3, r5
8009cf6: eb44 0406 adc.w r4, r4, r6
8009cfa: f04f 0100 mov.w r1, #0
8009cfe: f04f 0200 mov.w r2, #0
8009d02: 02a2 lsls r2, r4, #10
8009d04: ea42 5293 orr.w r2, r2, r3, lsr #22
8009d08: 0299 lsls r1, r3, #10
8009d0a: 460b mov r3, r1
8009d0c: 4614 mov r4, r2
8009d0e: 4618 mov r0, r3
8009d10: 4621 mov r1, r4
8009d12: 687b ldr r3, [r7, #4]
8009d14: f04f 0400 mov.w r4, #0
8009d18: 461a mov r2, r3
8009d1a: 4623 mov r3, r4
8009d1c: f7f6 fac8 bl 80002b0 <__aeabi_uldivmod>
8009d20: 4603 mov r3, r0
8009d22: 460c mov r4, r1
8009d24: 60fb str r3, [r7, #12]
}
pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1) * 2);
8009d26: 4b0b ldr r3, [pc, #44] ; (8009d54 <HAL_RCC_GetSysClockFreq+0x158>)
8009d28: 685b ldr r3, [r3, #4]
8009d2a: 0c1b lsrs r3, r3, #16
8009d2c: f003 0303 and.w r3, r3, #3
8009d30: 3301 adds r3, #1
8009d32: 005b lsls r3, r3, #1
8009d34: 603b str r3, [r7, #0]
sysclockfreq = pllvco / pllp;
8009d36: 68fa ldr r2, [r7, #12]
8009d38: 683b ldr r3, [r7, #0]
8009d3a: fbb2 f3f3 udiv r3, r2, r3
8009d3e: 60bb str r3, [r7, #8]
break;
8009d40: e002 b.n 8009d48 <HAL_RCC_GetSysClockFreq+0x14c>
}
default:
{
sysclockfreq = HSI_VALUE;
8009d42: 4b05 ldr r3, [pc, #20] ; (8009d58 <HAL_RCC_GetSysClockFreq+0x15c>)
8009d44: 60bb str r3, [r7, #8]
break;
8009d46: bf00 nop
}
}
return sysclockfreq;
8009d48: 68bb ldr r3, [r7, #8]
}
8009d4a: 4618 mov r0, r3
8009d4c: 3714 adds r7, #20
8009d4e: 46bd mov sp, r7
8009d50: bdf0 pop {r4, r5, r6, r7, pc}
8009d52: bf00 nop
8009d54: 40023800 .word 0x40023800
8009d58: 00f42400 .word 0x00f42400
8009d5c: 017d7840 .word 0x017d7840
08009d60 <HAL_RCC_GetHCLKFreq>:
* right HCLK value. Otherwise, any configuration based on this function will be incorrect.
* @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency.
* @retval HCLK frequency
*/
uint32_t HAL_RCC_GetHCLKFreq(void)
{
8009d60: b480 push {r7}
8009d62: af00 add r7, sp, #0
return SystemCoreClock;
8009d64: 4b03 ldr r3, [pc, #12] ; (8009d74 <HAL_RCC_GetHCLKFreq+0x14>)
8009d66: 681b ldr r3, [r3, #0]
}
8009d68: 4618 mov r0, r3
8009d6a: 46bd mov sp, r7
8009d6c: f85d 7b04 ldr.w r7, [sp], #4
8009d70: 4770 bx lr
8009d72: bf00 nop
8009d74: 20000064 .word 0x20000064
08009d78 <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
*/
uint32_t HAL_RCC_GetPCLK1Freq(void)
{
8009d78: b580 push {r7, lr}
8009d7a: af00 add r7, sp, #0
/* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE1) >> RCC_CFGR_PPRE1_Pos]);
8009d7c: f7ff fff0 bl 8009d60 <HAL_RCC_GetHCLKFreq>
8009d80: 4601 mov r1, r0
8009d82: 4b05 ldr r3, [pc, #20] ; (8009d98 <HAL_RCC_GetPCLK1Freq+0x20>)
8009d84: 689b ldr r3, [r3, #8]
8009d86: 0a9b lsrs r3, r3, #10
8009d88: f003 0307 and.w r3, r3, #7
8009d8c: 4a03 ldr r2, [pc, #12] ; (8009d9c <HAL_RCC_GetPCLK1Freq+0x24>)
8009d8e: 5cd3 ldrb r3, [r2, r3]
8009d90: fa21 f303 lsr.w r3, r1, r3
}
8009d94: 4618 mov r0, r3
8009d96: bd80 pop {r7, pc}
8009d98: 40023800 .word 0x40023800
8009d9c: 08022d78 .word 0x08022d78
08009da0 <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
*/
uint32_t HAL_RCC_GetPCLK2Freq(void)
{
8009da0: b580 push {r7, lr}
8009da2: af00 add r7, sp, #0
/* Get HCLK source and Compute PCLK2 frequency ---------------------------*/
return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2) >> RCC_CFGR_PPRE2_Pos]);
8009da4: f7ff ffdc bl 8009d60 <HAL_RCC_GetHCLKFreq>
8009da8: 4601 mov r1, r0
8009daa: 4b05 ldr r3, [pc, #20] ; (8009dc0 <HAL_RCC_GetPCLK2Freq+0x20>)
8009dac: 689b ldr r3, [r3, #8]
8009dae: 0b5b lsrs r3, r3, #13
8009db0: f003 0307 and.w r3, r3, #7
8009db4: 4a03 ldr r2, [pc, #12] ; (8009dc4 <HAL_RCC_GetPCLK2Freq+0x24>)
8009db6: 5cd3 ldrb r3, [r2, r3]
8009db8: fa21 f303 lsr.w r3, r1, r3
}
8009dbc: 4618 mov r0, r3
8009dbe: bd80 pop {r7, pc}
8009dc0: 40023800 .word 0x40023800
8009dc4: 08022d78 .word 0x08022d78
08009dc8 <HAL_RCC_GetClockConfig>:
* will be configured.
* @param pFLatency Pointer on the Flash Latency.
* @retval None
*/
void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency)
{
8009dc8: b480 push {r7}
8009dca: b083 sub sp, #12
8009dcc: af00 add r7, sp, #0
8009dce: 6078 str r0, [r7, #4]
8009dd0: 6039 str r1, [r7, #0]
/* Set all possible values for the Clock type parameter --------------------*/
RCC_ClkInitStruct->ClockType = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
8009dd2: 687b ldr r3, [r7, #4]
8009dd4: 220f movs r2, #15
8009dd6: 601a str r2, [r3, #0]
/* Get the SYSCLK configuration --------------------------------------------*/
RCC_ClkInitStruct->SYSCLKSource = (uint32_t)(RCC->CFGR & RCC_CFGR_SW);
8009dd8: 4b12 ldr r3, [pc, #72] ; (8009e24 <HAL_RCC_GetClockConfig+0x5c>)
8009dda: 689b ldr r3, [r3, #8]
8009ddc: f003 0203 and.w r2, r3, #3
8009de0: 687b ldr r3, [r7, #4]
8009de2: 605a str r2, [r3, #4]
/* Get the HCLK configuration ----------------------------------------------*/
RCC_ClkInitStruct->AHBCLKDivider = (uint32_t)(RCC->CFGR & RCC_CFGR_HPRE);
8009de4: 4b0f ldr r3, [pc, #60] ; (8009e24 <HAL_RCC_GetClockConfig+0x5c>)
8009de6: 689b ldr r3, [r3, #8]
8009de8: f003 02f0 and.w r2, r3, #240 ; 0xf0
8009dec: 687b ldr r3, [r7, #4]
8009dee: 609a str r2, [r3, #8]
/* Get the APB1 configuration ----------------------------------------------*/
RCC_ClkInitStruct->APB1CLKDivider = (uint32_t)(RCC->CFGR & RCC_CFGR_PPRE1);
8009df0: 4b0c ldr r3, [pc, #48] ; (8009e24 <HAL_RCC_GetClockConfig+0x5c>)
8009df2: 689b ldr r3, [r3, #8]
8009df4: f403 52e0 and.w r2, r3, #7168 ; 0x1c00
8009df8: 687b ldr r3, [r7, #4]
8009dfa: 60da str r2, [r3, #12]
/* Get the APB2 configuration ----------------------------------------------*/
RCC_ClkInitStruct->APB2CLKDivider = (uint32_t)((RCC->CFGR & RCC_CFGR_PPRE2) >> 3);
8009dfc: 4b09 ldr r3, [pc, #36] ; (8009e24 <HAL_RCC_GetClockConfig+0x5c>)
8009dfe: 689b ldr r3, [r3, #8]
8009e00: 08db lsrs r3, r3, #3
8009e02: f403 52e0 and.w r2, r3, #7168 ; 0x1c00
8009e06: 687b ldr r3, [r7, #4]
8009e08: 611a str r2, [r3, #16]
/* Get the Flash Wait State (Latency) configuration ------------------------*/
*pFLatency = (uint32_t)(FLASH->ACR & FLASH_ACR_LATENCY);
8009e0a: 4b07 ldr r3, [pc, #28] ; (8009e28 <HAL_RCC_GetClockConfig+0x60>)
8009e0c: 681b ldr r3, [r3, #0]
8009e0e: f003 020f and.w r2, r3, #15
8009e12: 683b ldr r3, [r7, #0]
8009e14: 601a str r2, [r3, #0]
}
8009e16: bf00 nop
8009e18: 370c adds r7, #12
8009e1a: 46bd mov sp, r7
8009e1c: f85d 7b04 ldr.w r7, [sp], #4
8009e20: 4770 bx lr
8009e22: bf00 nop
8009e24: 40023800 .word 0x40023800
8009e28: 40023c00 .word 0x40023c00
08009e2c <HAL_RCCEx_PeriphCLKConfig>:
* the backup registers) are set to their reset values.
*
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
{
8009e2c: b580 push {r7, lr}
8009e2e: b088 sub sp, #32
8009e30: af00 add r7, sp, #0
8009e32: 6078 str r0, [r7, #4]
uint32_t tickstart = 0;
8009e34: 2300 movs r3, #0
8009e36: 617b str r3, [r7, #20]
uint32_t tmpreg0 = 0;
8009e38: 2300 movs r3, #0
8009e3a: 613b str r3, [r7, #16]
uint32_t tmpreg1 = 0;
8009e3c: 2300 movs r3, #0
8009e3e: 60fb str r3, [r7, #12]
uint32_t plli2sused = 0;
8009e40: 2300 movs r3, #0
8009e42: 61fb str r3, [r7, #28]
uint32_t pllsaiused = 0;
8009e44: 2300 movs r3, #0
8009e46: 61bb str r3, [r7, #24]
/* Check the parameters */
assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection));
/*----------------------------------- I2S configuration ----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S) == (RCC_PERIPHCLK_I2S))
8009e48: 687b ldr r3, [r7, #4]
8009e4a: 681b ldr r3, [r3, #0]
8009e4c: f003 0301 and.w r3, r3, #1
8009e50: 2b00 cmp r3, #0
8009e52: d012 beq.n 8009e7a <HAL_RCCEx_PeriphCLKConfig+0x4e>
{
/* Check the parameters */
assert_param(IS_RCC_I2SCLKSOURCE(PeriphClkInit->I2sClockSelection));
/* Configure I2S Clock source */
__HAL_RCC_I2S_CONFIG(PeriphClkInit->I2sClockSelection);
8009e54: 4b69 ldr r3, [pc, #420] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009e56: 689b ldr r3, [r3, #8]
8009e58: 4a68 ldr r2, [pc, #416] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009e5a: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
8009e5e: 6093 str r3, [r2, #8]
8009e60: 4b66 ldr r3, [pc, #408] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009e62: 689a ldr r2, [r3, #8]
8009e64: 687b ldr r3, [r7, #4]
8009e66: 6b5b ldr r3, [r3, #52] ; 0x34
8009e68: 4964 ldr r1, [pc, #400] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009e6a: 4313 orrs r3, r2
8009e6c: 608b str r3, [r1, #8]
/* Enable the PLLI2S when it's used as clock source for I2S */
if(PeriphClkInit->I2sClockSelection == RCC_I2SCLKSOURCE_PLLI2S)
8009e6e: 687b ldr r3, [r7, #4]
8009e70: 6b5b ldr r3, [r3, #52] ; 0x34
8009e72: 2b00 cmp r3, #0
8009e74: d101 bne.n 8009e7a <HAL_RCCEx_PeriphCLKConfig+0x4e>
{
plli2sused = 1;
8009e76: 2301 movs r3, #1
8009e78: 61fb str r3, [r7, #28]
}
}
/*------------------------------------ SAI1 configuration --------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == (RCC_PERIPHCLK_SAI1))
8009e7a: 687b ldr r3, [r7, #4]
8009e7c: 681b ldr r3, [r3, #0]
8009e7e: f403 2300 and.w r3, r3, #524288 ; 0x80000
8009e82: 2b00 cmp r3, #0
8009e84: d017 beq.n 8009eb6 <HAL_RCCEx_PeriphCLKConfig+0x8a>
{
/* Check the parameters */
assert_param(IS_RCC_SAI1CLKSOURCE(PeriphClkInit->Sai1ClockSelection));
/* Configure SAI1 Clock source */
__HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection);
8009e86: 4b5d ldr r3, [pc, #372] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009e88: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8009e8c: f423 1240 bic.w r2, r3, #3145728 ; 0x300000
8009e90: 687b ldr r3, [r7, #4]
8009e92: 6bdb ldr r3, [r3, #60] ; 0x3c
8009e94: 4959 ldr r1, [pc, #356] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009e96: 4313 orrs r3, r2
8009e98: f8c1 308c str.w r3, [r1, #140] ; 0x8c
/* Enable the PLLI2S when it's used as clock source for SAI */
if(PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)
8009e9c: 687b ldr r3, [r7, #4]
8009e9e: 6bdb ldr r3, [r3, #60] ; 0x3c
8009ea0: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
8009ea4: d101 bne.n 8009eaa <HAL_RCCEx_PeriphCLKConfig+0x7e>
{
plli2sused = 1;
8009ea6: 2301 movs r3, #1
8009ea8: 61fb str r3, [r7, #28]
}
/* Enable the PLLSAI when it's used as clock source for SAI */
if(PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)
8009eaa: 687b ldr r3, [r7, #4]
8009eac: 6bdb ldr r3, [r3, #60] ; 0x3c
8009eae: 2b00 cmp r3, #0
8009eb0: d101 bne.n 8009eb6 <HAL_RCCEx_PeriphCLKConfig+0x8a>
{
pllsaiused = 1;
8009eb2: 2301 movs r3, #1
8009eb4: 61bb str r3, [r7, #24]
}
}
/*------------------------------------ SAI2 configuration --------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == (RCC_PERIPHCLK_SAI2))
8009eb6: 687b ldr r3, [r7, #4]
8009eb8: 681b ldr r3, [r3, #0]
8009eba: f403 1380 and.w r3, r3, #1048576 ; 0x100000
8009ebe: 2b00 cmp r3, #0
8009ec0: d017 beq.n 8009ef2 <HAL_RCCEx_PeriphCLKConfig+0xc6>
{
/* Check the parameters */
assert_param(IS_RCC_SAI2CLKSOURCE(PeriphClkInit->Sai2ClockSelection));
/* Configure SAI2 Clock source */
__HAL_RCC_SAI2_CONFIG(PeriphClkInit->Sai2ClockSelection);
8009ec2: 4b4e ldr r3, [pc, #312] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009ec4: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8009ec8: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
8009ecc: 687b ldr r3, [r7, #4]
8009ece: 6c1b ldr r3, [r3, #64] ; 0x40
8009ed0: 494a ldr r1, [pc, #296] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009ed2: 4313 orrs r3, r2
8009ed4: f8c1 308c str.w r3, [r1, #140] ; 0x8c
/* Enable the PLLI2S when it's used as clock source for SAI */
if(PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)
8009ed8: 687b ldr r3, [r7, #4]
8009eda: 6c1b ldr r3, [r3, #64] ; 0x40
8009edc: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
8009ee0: d101 bne.n 8009ee6 <HAL_RCCEx_PeriphCLKConfig+0xba>
{
plli2sused = 1;
8009ee2: 2301 movs r3, #1
8009ee4: 61fb str r3, [r7, #28]
}
/* Enable the PLLSAI when it's used as clock source for SAI */
if(PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)
8009ee6: 687b ldr r3, [r7, #4]
8009ee8: 6c1b ldr r3, [r3, #64] ; 0x40
8009eea: 2b00 cmp r3, #0
8009eec: d101 bne.n 8009ef2 <HAL_RCCEx_PeriphCLKConfig+0xc6>
{
pllsaiused = 1;
8009eee: 2301 movs r3, #1
8009ef0: 61bb str r3, [r7, #24]
}
}
/*-------------------------------------- SPDIF-RX Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX)
8009ef2: 687b ldr r3, [r7, #4]
8009ef4: 681b ldr r3, [r3, #0]
8009ef6: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
8009efa: 2b00 cmp r3, #0
8009efc: d001 beq.n 8009f02 <HAL_RCCEx_PeriphCLKConfig+0xd6>
{
plli2sused = 1;
8009efe: 2301 movs r3, #1
8009f00: 61fb str r3, [r7, #28]
}
/*------------------------------------ RTC configuration --------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RTC) == (RCC_PERIPHCLK_RTC))
8009f02: 687b ldr r3, [r7, #4]
8009f04: 681b ldr r3, [r3, #0]
8009f06: f003 0320 and.w r3, r3, #32
8009f0a: 2b00 cmp r3, #0
8009f0c: f000 808b beq.w 800a026 <HAL_RCCEx_PeriphCLKConfig+0x1fa>
{
/* Check for RTC Parameters used to output RTCCLK */
assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection));
/* Enable Power Clock*/
__HAL_RCC_PWR_CLK_ENABLE();
8009f10: 4b3a ldr r3, [pc, #232] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f12: 6c1b ldr r3, [r3, #64] ; 0x40
8009f14: 4a39 ldr r2, [pc, #228] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f16: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8009f1a: 6413 str r3, [r2, #64] ; 0x40
8009f1c: 4b37 ldr r3, [pc, #220] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f1e: 6c1b ldr r3, [r3, #64] ; 0x40
8009f20: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8009f24: 60bb str r3, [r7, #8]
8009f26: 68bb ldr r3, [r7, #8]
/* Enable write access to Backup domain */
PWR->CR1 |= PWR_CR1_DBP;
8009f28: 4b35 ldr r3, [pc, #212] ; (800a000 <HAL_RCCEx_PeriphCLKConfig+0x1d4>)
8009f2a: 681b ldr r3, [r3, #0]
8009f2c: 4a34 ldr r2, [pc, #208] ; (800a000 <HAL_RCCEx_PeriphCLKConfig+0x1d4>)
8009f2e: f443 7380 orr.w r3, r3, #256 ; 0x100
8009f32: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009f34: f7fb f9f4 bl 8005320 <HAL_GetTick>
8009f38: 6178 str r0, [r7, #20]
/* Wait for Backup domain Write protection disable */
while((PWR->CR1 & PWR_CR1_DBP) == RESET)
8009f3a: e008 b.n 8009f4e <HAL_RCCEx_PeriphCLKConfig+0x122>
{
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
8009f3c: f7fb f9f0 bl 8005320 <HAL_GetTick>
8009f40: 4602 mov r2, r0
8009f42: 697b ldr r3, [r7, #20]
8009f44: 1ad3 subs r3, r2, r3
8009f46: 2b64 cmp r3, #100 ; 0x64
8009f48: d901 bls.n 8009f4e <HAL_RCCEx_PeriphCLKConfig+0x122>
{
return HAL_TIMEOUT;
8009f4a: 2303 movs r3, #3
8009f4c: e355 b.n 800a5fa <HAL_RCCEx_PeriphCLKConfig+0x7ce>
while((PWR->CR1 & PWR_CR1_DBP) == RESET)
8009f4e: 4b2c ldr r3, [pc, #176] ; (800a000 <HAL_RCCEx_PeriphCLKConfig+0x1d4>)
8009f50: 681b ldr r3, [r3, #0]
8009f52: f403 7380 and.w r3, r3, #256 ; 0x100
8009f56: 2b00 cmp r3, #0
8009f58: d0f0 beq.n 8009f3c <HAL_RCCEx_PeriphCLKConfig+0x110>
}
}
/* Reset the Backup domain only if the RTC Clock source selection is modified */
tmpreg0 = (RCC->BDCR & RCC_BDCR_RTCSEL);
8009f5a: 4b28 ldr r3, [pc, #160] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f5c: 6f1b ldr r3, [r3, #112] ; 0x70
8009f5e: f403 7340 and.w r3, r3, #768 ; 0x300
8009f62: 613b str r3, [r7, #16]
if((tmpreg0 != 0x00000000U) && (tmpreg0 != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL)))
8009f64: 693b ldr r3, [r7, #16]
8009f66: 2b00 cmp r3, #0
8009f68: d035 beq.n 8009fd6 <HAL_RCCEx_PeriphCLKConfig+0x1aa>
8009f6a: 687b ldr r3, [r7, #4]
8009f6c: 6b1b ldr r3, [r3, #48] ; 0x30
8009f6e: f403 7340 and.w r3, r3, #768 ; 0x300
8009f72: 693a ldr r2, [r7, #16]
8009f74: 429a cmp r2, r3
8009f76: d02e beq.n 8009fd6 <HAL_RCCEx_PeriphCLKConfig+0x1aa>
{
/* Store the content of BDCR register before the reset of Backup Domain */
tmpreg0 = (RCC->BDCR & ~(RCC_BDCR_RTCSEL));
8009f78: 4b20 ldr r3, [pc, #128] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f7a: 6f1b ldr r3, [r3, #112] ; 0x70
8009f7c: f423 7340 bic.w r3, r3, #768 ; 0x300
8009f80: 613b str r3, [r7, #16]
/* RTC Clock selection can be changed only if the Backup Domain is reset */
__HAL_RCC_BACKUPRESET_FORCE();
8009f82: 4b1e ldr r3, [pc, #120] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f84: 6f1b ldr r3, [r3, #112] ; 0x70
8009f86: 4a1d ldr r2, [pc, #116] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f88: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8009f8c: 6713 str r3, [r2, #112] ; 0x70
__HAL_RCC_BACKUPRESET_RELEASE();
8009f8e: 4b1b ldr r3, [pc, #108] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f90: 6f1b ldr r3, [r3, #112] ; 0x70
8009f92: 4a1a ldr r2, [pc, #104] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f94: f423 3380 bic.w r3, r3, #65536 ; 0x10000
8009f98: 6713 str r3, [r2, #112] ; 0x70
/* Restore the Content of BDCR register */
RCC->BDCR = tmpreg0;
8009f9a: 4a18 ldr r2, [pc, #96] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009f9c: 693b ldr r3, [r7, #16]
8009f9e: 6713 str r3, [r2, #112] ; 0x70
/* Wait for LSE reactivation if LSE was enable prior to Backup Domain reset */
if (HAL_IS_BIT_SET(RCC->BDCR, RCC_BDCR_LSEON))
8009fa0: 4b16 ldr r3, [pc, #88] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009fa2: 6f1b ldr r3, [r3, #112] ; 0x70
8009fa4: f003 0301 and.w r3, r3, #1
8009fa8: 2b01 cmp r3, #1
8009faa: d114 bne.n 8009fd6 <HAL_RCCEx_PeriphCLKConfig+0x1aa>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009fac: f7fb f9b8 bl 8005320 <HAL_GetTick>
8009fb0: 6178 str r0, [r7, #20]
/* Wait till LSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8009fb2: e00a b.n 8009fca <HAL_RCCEx_PeriphCLKConfig+0x19e>
{
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
8009fb4: f7fb f9b4 bl 8005320 <HAL_GetTick>
8009fb8: 4602 mov r2, r0
8009fba: 697b ldr r3, [r7, #20]
8009fbc: 1ad3 subs r3, r2, r3
8009fbe: f241 3288 movw r2, #5000 ; 0x1388
8009fc2: 4293 cmp r3, r2
8009fc4: d901 bls.n 8009fca <HAL_RCCEx_PeriphCLKConfig+0x19e>
{
return HAL_TIMEOUT;
8009fc6: 2303 movs r3, #3
8009fc8: e317 b.n 800a5fa <HAL_RCCEx_PeriphCLKConfig+0x7ce>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8009fca: 4b0c ldr r3, [pc, #48] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009fcc: 6f1b ldr r3, [r3, #112] ; 0x70
8009fce: f003 0302 and.w r3, r3, #2
8009fd2: 2b00 cmp r3, #0
8009fd4: d0ee beq.n 8009fb4 <HAL_RCCEx_PeriphCLKConfig+0x188>
}
}
}
}
__HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection);
8009fd6: 687b ldr r3, [r7, #4]
8009fd8: 6b1b ldr r3, [r3, #48] ; 0x30
8009fda: f403 7340 and.w r3, r3, #768 ; 0x300
8009fde: f5b3 7f40 cmp.w r3, #768 ; 0x300
8009fe2: d111 bne.n 800a008 <HAL_RCCEx_PeriphCLKConfig+0x1dc>
8009fe4: 4b05 ldr r3, [pc, #20] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009fe6: 689b ldr r3, [r3, #8]
8009fe8: f423 12f8 bic.w r2, r3, #2031616 ; 0x1f0000
8009fec: 687b ldr r3, [r7, #4]
8009fee: 6b19 ldr r1, [r3, #48] ; 0x30
8009ff0: 4b04 ldr r3, [pc, #16] ; (800a004 <HAL_RCCEx_PeriphCLKConfig+0x1d8>)
8009ff2: 400b ands r3, r1
8009ff4: 4901 ldr r1, [pc, #4] ; (8009ffc <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009ff6: 4313 orrs r3, r2
8009ff8: 608b str r3, [r1, #8]
8009ffa: e00b b.n 800a014 <HAL_RCCEx_PeriphCLKConfig+0x1e8>
8009ffc: 40023800 .word 0x40023800
800a000: 40007000 .word 0x40007000
800a004: 0ffffcff .word 0x0ffffcff
800a008: 4bb0 ldr r3, [pc, #704] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a00a: 689b ldr r3, [r3, #8]
800a00c: 4aaf ldr r2, [pc, #700] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a00e: f423 13f8 bic.w r3, r3, #2031616 ; 0x1f0000
800a012: 6093 str r3, [r2, #8]
800a014: 4bad ldr r3, [pc, #692] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a016: 6f1a ldr r2, [r3, #112] ; 0x70
800a018: 687b ldr r3, [r7, #4]
800a01a: 6b1b ldr r3, [r3, #48] ; 0x30
800a01c: f3c3 030b ubfx r3, r3, #0, #12
800a020: 49aa ldr r1, [pc, #680] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a022: 4313 orrs r3, r2
800a024: 670b str r3, [r1, #112] ; 0x70
}
/*------------------------------------ TIM configuration --------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_TIM) == (RCC_PERIPHCLK_TIM))
800a026: 687b ldr r3, [r7, #4]
800a028: 681b ldr r3, [r3, #0]
800a02a: f003 0310 and.w r3, r3, #16
800a02e: 2b00 cmp r3, #0
800a030: d010 beq.n 800a054 <HAL_RCCEx_PeriphCLKConfig+0x228>
{
/* Check the parameters */
assert_param(IS_RCC_TIMPRES(PeriphClkInit->TIMPresSelection));
/* Configure Timer Prescaler */
__HAL_RCC_TIMCLKPRESCALER(PeriphClkInit->TIMPresSelection);
800a032: 4ba6 ldr r3, [pc, #664] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a034: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
800a038: 4aa4 ldr r2, [pc, #656] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a03a: f023 7380 bic.w r3, r3, #16777216 ; 0x1000000
800a03e: f8c2 308c str.w r3, [r2, #140] ; 0x8c
800a042: 4ba2 ldr r3, [pc, #648] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a044: f8d3 208c ldr.w r2, [r3, #140] ; 0x8c
800a048: 687b ldr r3, [r7, #4]
800a04a: 6b9b ldr r3, [r3, #56] ; 0x38
800a04c: 499f ldr r1, [pc, #636] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a04e: 4313 orrs r3, r2
800a050: f8c1 308c str.w r3, [r1, #140] ; 0x8c
}
/*-------------------------------------- I2C1 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1)
800a054: 687b ldr r3, [r7, #4]
800a056: 681b ldr r3, [r3, #0]
800a058: f403 4380 and.w r3, r3, #16384 ; 0x4000
800a05c: 2b00 cmp r3, #0
800a05e: d00a beq.n 800a076 <HAL_RCCEx_PeriphCLKConfig+0x24a>
{
/* Check the parameters */
assert_param(IS_RCC_I2C1CLKSOURCE(PeriphClkInit->I2c1ClockSelection));
/* Configure the I2C1 clock source */
__HAL_RCC_I2C1_CONFIG(PeriphClkInit->I2c1ClockSelection);
800a060: 4b9a ldr r3, [pc, #616] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a062: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a066: f423 3240 bic.w r2, r3, #196608 ; 0x30000
800a06a: 687b ldr r3, [r7, #4]
800a06c: 6e5b ldr r3, [r3, #100] ; 0x64
800a06e: 4997 ldr r1, [pc, #604] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a070: 4313 orrs r3, r2
800a072: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- I2C2 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C2) == RCC_PERIPHCLK_I2C2)
800a076: 687b ldr r3, [r7, #4]
800a078: 681b ldr r3, [r3, #0]
800a07a: f403 4300 and.w r3, r3, #32768 ; 0x8000
800a07e: 2b00 cmp r3, #0
800a080: d00a beq.n 800a098 <HAL_RCCEx_PeriphCLKConfig+0x26c>
{
/* Check the parameters */
assert_param(IS_RCC_I2C2CLKSOURCE(PeriphClkInit->I2c2ClockSelection));
/* Configure the I2C2 clock source */
__HAL_RCC_I2C2_CONFIG(PeriphClkInit->I2c2ClockSelection);
800a082: 4b92 ldr r3, [pc, #584] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a084: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a088: f423 2240 bic.w r2, r3, #786432 ; 0xc0000
800a08c: 687b ldr r3, [r7, #4]
800a08e: 6e9b ldr r3, [r3, #104] ; 0x68
800a090: 498e ldr r1, [pc, #568] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a092: 4313 orrs r3, r2
800a094: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- I2C3 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C3) == RCC_PERIPHCLK_I2C3)
800a098: 687b ldr r3, [r7, #4]
800a09a: 681b ldr r3, [r3, #0]
800a09c: f403 3380 and.w r3, r3, #65536 ; 0x10000
800a0a0: 2b00 cmp r3, #0
800a0a2: d00a beq.n 800a0ba <HAL_RCCEx_PeriphCLKConfig+0x28e>
{
/* Check the parameters */
assert_param(IS_RCC_I2C3CLKSOURCE(PeriphClkInit->I2c3ClockSelection));
/* Configure the I2C3 clock source */
__HAL_RCC_I2C3_CONFIG(PeriphClkInit->I2c3ClockSelection);
800a0a4: 4b89 ldr r3, [pc, #548] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a0a6: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a0aa: f423 1240 bic.w r2, r3, #3145728 ; 0x300000
800a0ae: 687b ldr r3, [r7, #4]
800a0b0: 6edb ldr r3, [r3, #108] ; 0x6c
800a0b2: 4986 ldr r1, [pc, #536] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a0b4: 4313 orrs r3, r2
800a0b6: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- I2C4 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C4) == RCC_PERIPHCLK_I2C4)
800a0ba: 687b ldr r3, [r7, #4]
800a0bc: 681b ldr r3, [r3, #0]
800a0be: f403 3300 and.w r3, r3, #131072 ; 0x20000
800a0c2: 2b00 cmp r3, #0
800a0c4: d00a beq.n 800a0dc <HAL_RCCEx_PeriphCLKConfig+0x2b0>
{
/* Check the parameters */
assert_param(IS_RCC_I2C4CLKSOURCE(PeriphClkInit->I2c4ClockSelection));
/* Configure the I2C4 clock source */
__HAL_RCC_I2C4_CONFIG(PeriphClkInit->I2c4ClockSelection);
800a0c6: 4b81 ldr r3, [pc, #516] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a0c8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a0cc: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
800a0d0: 687b ldr r3, [r7, #4]
800a0d2: 6f1b ldr r3, [r3, #112] ; 0x70
800a0d4: 497d ldr r1, [pc, #500] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a0d6: 4313 orrs r3, r2
800a0d8: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- USART1 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1)
800a0dc: 687b ldr r3, [r7, #4]
800a0de: 681b ldr r3, [r3, #0]
800a0e0: f003 0340 and.w r3, r3, #64 ; 0x40
800a0e4: 2b00 cmp r3, #0
800a0e6: d00a beq.n 800a0fe <HAL_RCCEx_PeriphCLKConfig+0x2d2>
{
/* Check the parameters */
assert_param(IS_RCC_USART1CLKSOURCE(PeriphClkInit->Usart1ClockSelection));
/* Configure the USART1 clock source */
__HAL_RCC_USART1_CONFIG(PeriphClkInit->Usart1ClockSelection);
800a0e8: 4b78 ldr r3, [pc, #480] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a0ea: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a0ee: f023 0203 bic.w r2, r3, #3
800a0f2: 687b ldr r3, [r7, #4]
800a0f4: 6c5b ldr r3, [r3, #68] ; 0x44
800a0f6: 4975 ldr r1, [pc, #468] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a0f8: 4313 orrs r3, r2
800a0fa: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- USART2 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART2) == RCC_PERIPHCLK_USART2)
800a0fe: 687b ldr r3, [r7, #4]
800a100: 681b ldr r3, [r3, #0]
800a102: f003 0380 and.w r3, r3, #128 ; 0x80
800a106: 2b00 cmp r3, #0
800a108: d00a beq.n 800a120 <HAL_RCCEx_PeriphCLKConfig+0x2f4>
{
/* Check the parameters */
assert_param(IS_RCC_USART2CLKSOURCE(PeriphClkInit->Usart2ClockSelection));
/* Configure the USART2 clock source */
__HAL_RCC_USART2_CONFIG(PeriphClkInit->Usart2ClockSelection);
800a10a: 4b70 ldr r3, [pc, #448] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a10c: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a110: f023 020c bic.w r2, r3, #12
800a114: 687b ldr r3, [r7, #4]
800a116: 6c9b ldr r3, [r3, #72] ; 0x48
800a118: 496c ldr r1, [pc, #432] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a11a: 4313 orrs r3, r2
800a11c: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- USART3 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART3) == RCC_PERIPHCLK_USART3)
800a120: 687b ldr r3, [r7, #4]
800a122: 681b ldr r3, [r3, #0]
800a124: f403 7380 and.w r3, r3, #256 ; 0x100
800a128: 2b00 cmp r3, #0
800a12a: d00a beq.n 800a142 <HAL_RCCEx_PeriphCLKConfig+0x316>
{
/* Check the parameters */
assert_param(IS_RCC_USART3CLKSOURCE(PeriphClkInit->Usart3ClockSelection));
/* Configure the USART3 clock source */
__HAL_RCC_USART3_CONFIG(PeriphClkInit->Usart3ClockSelection);
800a12c: 4b67 ldr r3, [pc, #412] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a12e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a132: f023 0230 bic.w r2, r3, #48 ; 0x30
800a136: 687b ldr r3, [r7, #4]
800a138: 6cdb ldr r3, [r3, #76] ; 0x4c
800a13a: 4964 ldr r1, [pc, #400] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a13c: 4313 orrs r3, r2
800a13e: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- UART4 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART4) == RCC_PERIPHCLK_UART4)
800a142: 687b ldr r3, [r7, #4]
800a144: 681b ldr r3, [r3, #0]
800a146: f403 7300 and.w r3, r3, #512 ; 0x200
800a14a: 2b00 cmp r3, #0
800a14c: d00a beq.n 800a164 <HAL_RCCEx_PeriphCLKConfig+0x338>
{
/* Check the parameters */
assert_param(IS_RCC_UART4CLKSOURCE(PeriphClkInit->Uart4ClockSelection));
/* Configure the UART4 clock source */
__HAL_RCC_UART4_CONFIG(PeriphClkInit->Uart4ClockSelection);
800a14e: 4b5f ldr r3, [pc, #380] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a150: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a154: f023 02c0 bic.w r2, r3, #192 ; 0xc0
800a158: 687b ldr r3, [r7, #4]
800a15a: 6d1b ldr r3, [r3, #80] ; 0x50
800a15c: 495b ldr r1, [pc, #364] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a15e: 4313 orrs r3, r2
800a160: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- UART5 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART5) == RCC_PERIPHCLK_UART5)
800a164: 687b ldr r3, [r7, #4]
800a166: 681b ldr r3, [r3, #0]
800a168: f403 6380 and.w r3, r3, #1024 ; 0x400
800a16c: 2b00 cmp r3, #0
800a16e: d00a beq.n 800a186 <HAL_RCCEx_PeriphCLKConfig+0x35a>
{
/* Check the parameters */
assert_param(IS_RCC_UART5CLKSOURCE(PeriphClkInit->Uart5ClockSelection));
/* Configure the UART5 clock source */
__HAL_RCC_UART5_CONFIG(PeriphClkInit->Uart5ClockSelection);
800a170: 4b56 ldr r3, [pc, #344] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a172: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a176: f423 7240 bic.w r2, r3, #768 ; 0x300
800a17a: 687b ldr r3, [r7, #4]
800a17c: 6d5b ldr r3, [r3, #84] ; 0x54
800a17e: 4953 ldr r1, [pc, #332] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a180: 4313 orrs r3, r2
800a182: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- USART6 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART6) == RCC_PERIPHCLK_USART6)
800a186: 687b ldr r3, [r7, #4]
800a188: 681b ldr r3, [r3, #0]
800a18a: f403 6300 and.w r3, r3, #2048 ; 0x800
800a18e: 2b00 cmp r3, #0
800a190: d00a beq.n 800a1a8 <HAL_RCCEx_PeriphCLKConfig+0x37c>
{
/* Check the parameters */
assert_param(IS_RCC_USART6CLKSOURCE(PeriphClkInit->Usart6ClockSelection));
/* Configure the USART6 clock source */
__HAL_RCC_USART6_CONFIG(PeriphClkInit->Usart6ClockSelection);
800a192: 4b4e ldr r3, [pc, #312] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a194: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a198: f423 6240 bic.w r2, r3, #3072 ; 0xc00
800a19c: 687b ldr r3, [r7, #4]
800a19e: 6d9b ldr r3, [r3, #88] ; 0x58
800a1a0: 494a ldr r1, [pc, #296] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a1a2: 4313 orrs r3, r2
800a1a4: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- UART7 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART7) == RCC_PERIPHCLK_UART7)
800a1a8: 687b ldr r3, [r7, #4]
800a1aa: 681b ldr r3, [r3, #0]
800a1ac: f403 5380 and.w r3, r3, #4096 ; 0x1000
800a1b0: 2b00 cmp r3, #0
800a1b2: d00a beq.n 800a1ca <HAL_RCCEx_PeriphCLKConfig+0x39e>
{
/* Check the parameters */
assert_param(IS_RCC_UART7CLKSOURCE(PeriphClkInit->Uart7ClockSelection));
/* Configure the UART7 clock source */
__HAL_RCC_UART7_CONFIG(PeriphClkInit->Uart7ClockSelection);
800a1b4: 4b45 ldr r3, [pc, #276] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a1b6: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a1ba: f423 5240 bic.w r2, r3, #12288 ; 0x3000
800a1be: 687b ldr r3, [r7, #4]
800a1c0: 6ddb ldr r3, [r3, #92] ; 0x5c
800a1c2: 4942 ldr r1, [pc, #264] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a1c4: 4313 orrs r3, r2
800a1c6: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- UART8 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART8) == RCC_PERIPHCLK_UART8)
800a1ca: 687b ldr r3, [r7, #4]
800a1cc: 681b ldr r3, [r3, #0]
800a1ce: f403 5300 and.w r3, r3, #8192 ; 0x2000
800a1d2: 2b00 cmp r3, #0
800a1d4: d00a beq.n 800a1ec <HAL_RCCEx_PeriphCLKConfig+0x3c0>
{
/* Check the parameters */
assert_param(IS_RCC_UART8CLKSOURCE(PeriphClkInit->Uart8ClockSelection));
/* Configure the UART8 clock source */
__HAL_RCC_UART8_CONFIG(PeriphClkInit->Uart8ClockSelection);
800a1d6: 4b3d ldr r3, [pc, #244] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a1d8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a1dc: f423 4240 bic.w r2, r3, #49152 ; 0xc000
800a1e0: 687b ldr r3, [r7, #4]
800a1e2: 6e1b ldr r3, [r3, #96] ; 0x60
800a1e4: 4939 ldr r1, [pc, #228] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a1e6: 4313 orrs r3, r2
800a1e8: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*--------------------------------------- CEC Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC)
800a1ec: 687b ldr r3, [r7, #4]
800a1ee: 681b ldr r3, [r3, #0]
800a1f0: f403 0380 and.w r3, r3, #4194304 ; 0x400000
800a1f4: 2b00 cmp r3, #0
800a1f6: d00a beq.n 800a20e <HAL_RCCEx_PeriphCLKConfig+0x3e2>
{
/* Check the parameters */
assert_param(IS_RCC_CECCLKSOURCE(PeriphClkInit->CecClockSelection));
/* Configure the CEC clock source */
__HAL_RCC_CEC_CONFIG(PeriphClkInit->CecClockSelection);
800a1f8: 4b34 ldr r3, [pc, #208] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a1fa: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a1fe: f023 6280 bic.w r2, r3, #67108864 ; 0x4000000
800a202: 687b ldr r3, [r7, #4]
800a204: 6f9b ldr r3, [r3, #120] ; 0x78
800a206: 4931 ldr r1, [pc, #196] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a208: 4313 orrs r3, r2
800a20a: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- CK48 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48)
800a20e: 687b ldr r3, [r7, #4]
800a210: 681b ldr r3, [r3, #0]
800a212: f403 1300 and.w r3, r3, #2097152 ; 0x200000
800a216: 2b00 cmp r3, #0
800a218: d011 beq.n 800a23e <HAL_RCCEx_PeriphCLKConfig+0x412>
{
/* Check the parameters */
assert_param(IS_RCC_CLK48SOURCE(PeriphClkInit->Clk48ClockSelection));
/* Configure the CLK48 source */
__HAL_RCC_CLK48_CONFIG(PeriphClkInit->Clk48ClockSelection);
800a21a: 4b2c ldr r3, [pc, #176] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a21c: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a220: f023 6200 bic.w r2, r3, #134217728 ; 0x8000000
800a224: 687b ldr r3, [r7, #4]
800a226: 6fdb ldr r3, [r3, #124] ; 0x7c
800a228: 4928 ldr r1, [pc, #160] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a22a: 4313 orrs r3, r2
800a22c: f8c1 3090 str.w r3, [r1, #144] ; 0x90
/* Enable the PLLSAI when it's used as clock source for CK48 */
if(PeriphClkInit->Clk48ClockSelection == RCC_CLK48SOURCE_PLLSAIP)
800a230: 687b ldr r3, [r7, #4]
800a232: 6fdb ldr r3, [r3, #124] ; 0x7c
800a234: f1b3 6f00 cmp.w r3, #134217728 ; 0x8000000
800a238: d101 bne.n 800a23e <HAL_RCCEx_PeriphCLKConfig+0x412>
{
pllsaiused = 1;
800a23a: 2301 movs r3, #1
800a23c: 61bb str r3, [r7, #24]
}
}
/*-------------------------------------- LTDC Configuration -----------------------------------*/
#if defined(STM32F746xx) || defined(STM32F756xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx) || defined (STM32F750xx)
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LTDC) == RCC_PERIPHCLK_LTDC)
800a23e: 687b ldr r3, [r7, #4]
800a240: 681b ldr r3, [r3, #0]
800a242: f003 0308 and.w r3, r3, #8
800a246: 2b00 cmp r3, #0
800a248: d001 beq.n 800a24e <HAL_RCCEx_PeriphCLKConfig+0x422>
{
pllsaiused = 1;
800a24a: 2301 movs r3, #1
800a24c: 61bb str r3, [r7, #24]
}
#endif /* STM32F746xx || STM32F756xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx || STM32F750xx */
/*-------------------------------------- LPTIM1 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == RCC_PERIPHCLK_LPTIM1)
800a24e: 687b ldr r3, [r7, #4]
800a250: 681b ldr r3, [r3, #0]
800a252: f403 2380 and.w r3, r3, #262144 ; 0x40000
800a256: 2b00 cmp r3, #0
800a258: d00a beq.n 800a270 <HAL_RCCEx_PeriphCLKConfig+0x444>
{
/* Check the parameters */
assert_param(IS_RCC_LPTIM1CLK(PeriphClkInit->Lptim1ClockSelection));
/* Configure the LTPIM1 clock source */
__HAL_RCC_LPTIM1_CONFIG(PeriphClkInit->Lptim1ClockSelection);
800a25a: 4b1c ldr r3, [pc, #112] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a25c: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a260: f023 7240 bic.w r2, r3, #50331648 ; 0x3000000
800a264: 687b ldr r3, [r7, #4]
800a266: 6f5b ldr r3, [r3, #116] ; 0x74
800a268: 4918 ldr r1, [pc, #96] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a26a: 4313 orrs r3, r2
800a26c: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*------------------------------------- SDMMC1 Configuration ------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDMMC1) == RCC_PERIPHCLK_SDMMC1)
800a270: 687b ldr r3, [r7, #4]
800a272: 681b ldr r3, [r3, #0]
800a274: f403 0300 and.w r3, r3, #8388608 ; 0x800000
800a278: 2b00 cmp r3, #0
800a27a: d00b beq.n 800a294 <HAL_RCCEx_PeriphCLKConfig+0x468>
{
/* Check the parameters */
assert_param(IS_RCC_SDMMC1CLKSOURCE(PeriphClkInit->Sdmmc1ClockSelection));
/* Configure the SDMMC1 clock source */
__HAL_RCC_SDMMC1_CONFIG(PeriphClkInit->Sdmmc1ClockSelection);
800a27c: 4b13 ldr r3, [pc, #76] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a27e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800a282: f023 5280 bic.w r2, r3, #268435456 ; 0x10000000
800a286: 687b ldr r3, [r7, #4]
800a288: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
800a28c: 490f ldr r1, [pc, #60] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a28e: 4313 orrs r3, r2
800a290: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
#endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
/*-------------------------------------- PLLI2S Configuration ---------------------------------*/
/* PLLI2S is configured when a peripheral will use it as source clock : SAI1, SAI2, I2S or SPDIF-RX */
if((plli2sused == 1) || (PeriphClkInit->PeriphClockSelection == RCC_PERIPHCLK_PLLI2S))
800a294: 69fb ldr r3, [r7, #28]
800a296: 2b01 cmp r3, #1
800a298: d005 beq.n 800a2a6 <HAL_RCCEx_PeriphCLKConfig+0x47a>
800a29a: 687b ldr r3, [r7, #4]
800a29c: 681b ldr r3, [r3, #0]
800a29e: f1b3 7f00 cmp.w r3, #33554432 ; 0x2000000
800a2a2: f040 80d8 bne.w 800a456 <HAL_RCCEx_PeriphCLKConfig+0x62a>
{
/* Disable the PLLI2S */
__HAL_RCC_PLLI2S_DISABLE();
800a2a6: 4b09 ldr r3, [pc, #36] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a2a8: 681b ldr r3, [r3, #0]
800a2aa: 4a08 ldr r2, [pc, #32] ; (800a2cc <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800a2ac: f023 6380 bic.w r3, r3, #67108864 ; 0x4000000
800a2b0: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
800a2b2: f7fb f835 bl 8005320 <HAL_GetTick>
800a2b6: 6178 str r0, [r7, #20]
/* Wait till PLLI2S is disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) != RESET)
800a2b8: e00a b.n 800a2d0 <HAL_RCCEx_PeriphCLKConfig+0x4a4>
{
if((HAL_GetTick() - tickstart) > PLLI2S_TIMEOUT_VALUE)
800a2ba: f7fb f831 bl 8005320 <HAL_GetTick>
800a2be: 4602 mov r2, r0
800a2c0: 697b ldr r3, [r7, #20]
800a2c2: 1ad3 subs r3, r2, r3
800a2c4: 2b64 cmp r3, #100 ; 0x64
800a2c6: d903 bls.n 800a2d0 <HAL_RCCEx_PeriphCLKConfig+0x4a4>
{
/* return in case of Timeout detected */
return HAL_TIMEOUT;
800a2c8: 2303 movs r3, #3
800a2ca: e196 b.n 800a5fa <HAL_RCCEx_PeriphCLKConfig+0x7ce>
800a2cc: 40023800 .word 0x40023800
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) != RESET)
800a2d0: 4b6c ldr r3, [pc, #432] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a2d2: 681b ldr r3, [r3, #0]
800a2d4: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
800a2d8: 2b00 cmp r3, #0
800a2da: d1ee bne.n 800a2ba <HAL_RCCEx_PeriphCLKConfig+0x48e>
/* check for common PLLI2S Parameters */
assert_param(IS_RCC_PLLI2SN_VALUE(PeriphClkInit->PLLI2S.PLLI2SN));
/*----------------- In Case of PLLI2S is selected as source clock for I2S -------------------*/
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S) == RCC_PERIPHCLK_I2S) && (PeriphClkInit->I2sClockSelection == RCC_I2SCLKSOURCE_PLLI2S)))
800a2dc: 687b ldr r3, [r7, #4]
800a2de: 681b ldr r3, [r3, #0]
800a2e0: f003 0301 and.w r3, r3, #1
800a2e4: 2b00 cmp r3, #0
800a2e6: d021 beq.n 800a32c <HAL_RCCEx_PeriphCLKConfig+0x500>
800a2e8: 687b ldr r3, [r7, #4]
800a2ea: 6b5b ldr r3, [r3, #52] ; 0x34
800a2ec: 2b00 cmp r3, #0
800a2ee: d11d bne.n 800a32c <HAL_RCCEx_PeriphCLKConfig+0x500>
{
/* check for Parameters */
assert_param(IS_RCC_PLLI2SR_VALUE(PeriphClkInit->PLLI2S.PLLI2SR));
/* Read PLLI2SP and PLLI2SQ value from PLLI2SCFGR register (this value is not needed for I2S configuration) */
tmpreg0 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SP) >> RCC_PLLI2SCFGR_PLLI2SP_Pos);
800a2f0: 4b64 ldr r3, [pc, #400] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a2f2: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
800a2f6: 0c1b lsrs r3, r3, #16
800a2f8: f003 0303 and.w r3, r3, #3
800a2fc: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SQ) >> RCC_PLLI2SCFGR_PLLI2SQ_Pos);
800a2fe: 4b61 ldr r3, [pc, #388] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a300: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
800a304: 0e1b lsrs r3, r3, #24
800a306: f003 030f and.w r3, r3, #15
800a30a: 60fb str r3, [r7, #12]
/* Configure the PLLI2S division factors */
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) x (PLLI2SN/PLLM) */
/* I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN , tmpreg0, tmpreg1, PeriphClkInit->PLLI2S.PLLI2SR);
800a30c: 687b ldr r3, [r7, #4]
800a30e: 685b ldr r3, [r3, #4]
800a310: 019a lsls r2, r3, #6
800a312: 693b ldr r3, [r7, #16]
800a314: 041b lsls r3, r3, #16
800a316: 431a orrs r2, r3
800a318: 68fb ldr r3, [r7, #12]
800a31a: 061b lsls r3, r3, #24
800a31c: 431a orrs r2, r3
800a31e: 687b ldr r3, [r7, #4]
800a320: 689b ldr r3, [r3, #8]
800a322: 071b lsls r3, r3, #28
800a324: 4957 ldr r1, [pc, #348] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a326: 4313 orrs r3, r2
800a328: f8c1 3084 str.w r3, [r1, #132] ; 0x84
}
/*----------------- In Case of PLLI2S is selected as source clock for SAI -------------------*/
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)) ||
800a32c: 687b ldr r3, [r7, #4]
800a32e: 681b ldr r3, [r3, #0]
800a330: f403 2300 and.w r3, r3, #524288 ; 0x80000
800a334: 2b00 cmp r3, #0
800a336: d004 beq.n 800a342 <HAL_RCCEx_PeriphCLKConfig+0x516>
800a338: 687b ldr r3, [r7, #4]
800a33a: 6bdb ldr r3, [r3, #60] ; 0x3c
800a33c: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
800a340: d00a beq.n 800a358 <HAL_RCCEx_PeriphCLKConfig+0x52c>
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)))
800a342: 687b ldr r3, [r7, #4]
800a344: 681b ldr r3, [r3, #0]
800a346: f403 1380 and.w r3, r3, #1048576 ; 0x100000
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)) ||
800a34a: 2b00 cmp r3, #0
800a34c: d02e beq.n 800a3ac <HAL_RCCEx_PeriphCLKConfig+0x580>
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)))
800a34e: 687b ldr r3, [r7, #4]
800a350: 6c1b ldr r3, [r3, #64] ; 0x40
800a352: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
800a356: d129 bne.n 800a3ac <HAL_RCCEx_PeriphCLKConfig+0x580>
assert_param(IS_RCC_PLLI2SQ_VALUE(PeriphClkInit->PLLI2S.PLLI2SQ));
/* Check for PLLI2S/DIVQ parameters */
assert_param(IS_RCC_PLLI2S_DIVQ_VALUE(PeriphClkInit->PLLI2SDivQ));
/* Read PLLI2SP and PLLI2SR values from PLLI2SCFGR register (this value is not needed for SAI configuration) */
tmpreg0 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SP) >> RCC_PLLI2SCFGR_PLLI2SP_Pos);
800a358: 4b4a ldr r3, [pc, #296] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a35a: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
800a35e: 0c1b lsrs r3, r3, #16
800a360: f003 0303 and.w r3, r3, #3
800a364: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLI2SCFGR_PLLI2SR_Pos);
800a366: 4b47 ldr r3, [pc, #284] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a368: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
800a36c: 0f1b lsrs r3, r3, #28
800a36e: f003 0307 and.w r3, r3, #7
800a372: 60fb str r3, [r7, #12]
/* Configure the PLLI2S division factors */
/* PLLI2S_VCO Input = PLL_SOURCE/PLLM */
/* PLLI2S_VCO Output = PLLI2S_VCO Input * PLLI2SN */
/* SAI_CLK(first level) = PLLI2S_VCO Output/PLLI2SQ */
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN, tmpreg0, PeriphClkInit->PLLI2S.PLLI2SQ, tmpreg1);
800a374: 687b ldr r3, [r7, #4]
800a376: 685b ldr r3, [r3, #4]
800a378: 019a lsls r2, r3, #6
800a37a: 693b ldr r3, [r7, #16]
800a37c: 041b lsls r3, r3, #16
800a37e: 431a orrs r2, r3
800a380: 687b ldr r3, [r7, #4]
800a382: 68db ldr r3, [r3, #12]
800a384: 061b lsls r3, r3, #24
800a386: 431a orrs r2, r3
800a388: 68fb ldr r3, [r7, #12]
800a38a: 071b lsls r3, r3, #28
800a38c: 493d ldr r1, [pc, #244] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a38e: 4313 orrs r3, r2
800a390: f8c1 3084 str.w r3, [r1, #132] ; 0x84
/* SAI_CLK_x = SAI_CLK(first level)/PLLI2SDIVQ */
__HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLI2SDivQ);
800a394: 4b3b ldr r3, [pc, #236] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a396: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
800a39a: f023 021f bic.w r2, r3, #31
800a39e: 687b ldr r3, [r7, #4]
800a3a0: 6a5b ldr r3, [r3, #36] ; 0x24
800a3a2: 3b01 subs r3, #1
800a3a4: 4937 ldr r1, [pc, #220] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a3a6: 4313 orrs r3, r2
800a3a8: f8c1 308c str.w r3, [r1, #140] ; 0x8c
}
/*----------------- In Case of PLLI2S is selected as source clock for SPDIF-RX -------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX)
800a3ac: 687b ldr r3, [r7, #4]
800a3ae: 681b ldr r3, [r3, #0]
800a3b0: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
800a3b4: 2b00 cmp r3, #0
800a3b6: d01d beq.n 800a3f4 <HAL_RCCEx_PeriphCLKConfig+0x5c8>
{
/* check for Parameters */
assert_param(IS_RCC_PLLI2SP_VALUE(PeriphClkInit->PLLI2S.PLLI2SP));
/* Read PLLI2SR value from PLLI2SCFGR register (this value is not needed for SPDIF-RX configuration) */
tmpreg0 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SQ) >> RCC_PLLI2SCFGR_PLLI2SQ_Pos);
800a3b8: 4b32 ldr r3, [pc, #200] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a3ba: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
800a3be: 0e1b lsrs r3, r3, #24
800a3c0: f003 030f and.w r3, r3, #15
800a3c4: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLI2SCFGR_PLLI2SR_Pos);
800a3c6: 4b2f ldr r3, [pc, #188] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a3c8: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
800a3cc: 0f1b lsrs r3, r3, #28
800a3ce: f003 0307 and.w r3, r3, #7
800a3d2: 60fb str r3, [r7, #12]
/* Configure the PLLI2S division factors */
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) x (PLLI2SN/PLLM) */
/* SPDIFCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SP */
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN , PeriphClkInit->PLLI2S.PLLI2SP, tmpreg0, tmpreg1);
800a3d4: 687b ldr r3, [r7, #4]
800a3d6: 685b ldr r3, [r3, #4]
800a3d8: 019a lsls r2, r3, #6
800a3da: 687b ldr r3, [r7, #4]
800a3dc: 691b ldr r3, [r3, #16]
800a3de: 041b lsls r3, r3, #16
800a3e0: 431a orrs r2, r3
800a3e2: 693b ldr r3, [r7, #16]
800a3e4: 061b lsls r3, r3, #24
800a3e6: 431a orrs r2, r3
800a3e8: 68fb ldr r3, [r7, #12]
800a3ea: 071b lsls r3, r3, #28
800a3ec: 4925 ldr r1, [pc, #148] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a3ee: 4313 orrs r3, r2
800a3f0: f8c1 3084 str.w r3, [r1, #132] ; 0x84
}
/*----------------- In Case of PLLI2S is just selected -----------------*/
if((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_PLLI2S) == RCC_PERIPHCLK_PLLI2S)
800a3f4: 687b ldr r3, [r7, #4]
800a3f6: 681b ldr r3, [r3, #0]
800a3f8: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800a3fc: 2b00 cmp r3, #0
800a3fe: d011 beq.n 800a424 <HAL_RCCEx_PeriphCLKConfig+0x5f8>
assert_param(IS_RCC_PLLI2SQ_VALUE(PeriphClkInit->PLLI2S.PLLI2SQ));
/* Configure the PLLI2S division factors */
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) x (PLLI2SN/PLLI2SM) */
/* SPDIFRXCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SP */
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN , PeriphClkInit->PLLI2S.PLLI2SP, PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
800a400: 687b ldr r3, [r7, #4]
800a402: 685b ldr r3, [r3, #4]
800a404: 019a lsls r2, r3, #6
800a406: 687b ldr r3, [r7, #4]
800a408: 691b ldr r3, [r3, #16]
800a40a: 041b lsls r3, r3, #16
800a40c: 431a orrs r2, r3
800a40e: 687b ldr r3, [r7, #4]
800a410: 68db ldr r3, [r3, #12]
800a412: 061b lsls r3, r3, #24
800a414: 431a orrs r2, r3
800a416: 687b ldr r3, [r7, #4]
800a418: 689b ldr r3, [r3, #8]
800a41a: 071b lsls r3, r3, #28
800a41c: 4919 ldr r1, [pc, #100] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a41e: 4313 orrs r3, r2
800a420: f8c1 3084 str.w r3, [r1, #132] ; 0x84
}
/* Enable the PLLI2S */
__HAL_RCC_PLLI2S_ENABLE();
800a424: 4b17 ldr r3, [pc, #92] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a426: 681b ldr r3, [r3, #0]
800a428: 4a16 ldr r2, [pc, #88] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a42a: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
800a42e: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
800a430: f7fa ff76 bl 8005320 <HAL_GetTick>
800a434: 6178 str r0, [r7, #20]
/* Wait till PLLI2S is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) == RESET)
800a436: e008 b.n 800a44a <HAL_RCCEx_PeriphCLKConfig+0x61e>
{
if((HAL_GetTick() - tickstart) > PLLI2S_TIMEOUT_VALUE)
800a438: f7fa ff72 bl 8005320 <HAL_GetTick>
800a43c: 4602 mov r2, r0
800a43e: 697b ldr r3, [r7, #20]
800a440: 1ad3 subs r3, r2, r3
800a442: 2b64 cmp r3, #100 ; 0x64
800a444: d901 bls.n 800a44a <HAL_RCCEx_PeriphCLKConfig+0x61e>
{
/* return in case of Timeout detected */
return HAL_TIMEOUT;
800a446: 2303 movs r3, #3
800a448: e0d7 b.n 800a5fa <HAL_RCCEx_PeriphCLKConfig+0x7ce>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) == RESET)
800a44a: 4b0e ldr r3, [pc, #56] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a44c: 681b ldr r3, [r3, #0]
800a44e: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
800a452: 2b00 cmp r3, #0
800a454: d0f0 beq.n 800a438 <HAL_RCCEx_PeriphCLKConfig+0x60c>
}
}
/*-------------------------------------- PLLSAI Configuration ---------------------------------*/
/* PLLSAI is configured when a peripheral will use it as source clock : SAI1, SAI2, LTDC or CK48 */
if(pllsaiused == 1)
800a456: 69bb ldr r3, [r7, #24]
800a458: 2b01 cmp r3, #1
800a45a: f040 80cd bne.w 800a5f8 <HAL_RCCEx_PeriphCLKConfig+0x7cc>
{
/* Disable PLLSAI Clock */
__HAL_RCC_PLLSAI_DISABLE();
800a45e: 4b09 ldr r3, [pc, #36] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a460: 681b ldr r3, [r3, #0]
800a462: 4a08 ldr r2, [pc, #32] ; (800a484 <HAL_RCCEx_PeriphCLKConfig+0x658>)
800a464: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
800a468: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
800a46a: f7fa ff59 bl 8005320 <HAL_GetTick>
800a46e: 6178 str r0, [r7, #20]
/* Wait till PLLSAI is disabled */
while(__HAL_RCC_PLLSAI_GET_FLAG() != RESET)
800a470: e00a b.n 800a488 <HAL_RCCEx_PeriphCLKConfig+0x65c>
{
if((HAL_GetTick() - tickstart) > PLLSAI_TIMEOUT_VALUE)
800a472: f7fa ff55 bl 8005320 <HAL_GetTick>
800a476: 4602 mov r2, r0
800a478: 697b ldr r3, [r7, #20]
800a47a: 1ad3 subs r3, r2, r3
800a47c: 2b64 cmp r3, #100 ; 0x64
800a47e: d903 bls.n 800a488 <HAL_RCCEx_PeriphCLKConfig+0x65c>
{
/* return in case of Timeout detected */
return HAL_TIMEOUT;
800a480: 2303 movs r3, #3
800a482: e0ba b.n 800a5fa <HAL_RCCEx_PeriphCLKConfig+0x7ce>
800a484: 40023800 .word 0x40023800
while(__HAL_RCC_PLLSAI_GET_FLAG() != RESET)
800a488: 4b5e ldr r3, [pc, #376] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a48a: 681b ldr r3, [r3, #0]
800a48c: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
800a490: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
800a494: d0ed beq.n 800a472 <HAL_RCCEx_PeriphCLKConfig+0x646>
/* Check the PLLSAI division factors */
assert_param(IS_RCC_PLLSAIN_VALUE(PeriphClkInit->PLLSAI.PLLSAIN));
/*----------------- In Case of PLLSAI is selected as source clock for SAI -------------------*/
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)) ||\
800a496: 687b ldr r3, [r7, #4]
800a498: 681b ldr r3, [r3, #0]
800a49a: f403 2300 and.w r3, r3, #524288 ; 0x80000
800a49e: 2b00 cmp r3, #0
800a4a0: d003 beq.n 800a4aa <HAL_RCCEx_PeriphCLKConfig+0x67e>
800a4a2: 687b ldr r3, [r7, #4]
800a4a4: 6bdb ldr r3, [r3, #60] ; 0x3c
800a4a6: 2b00 cmp r3, #0
800a4a8: d009 beq.n 800a4be <HAL_RCCEx_PeriphCLKConfig+0x692>
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)))
800a4aa: 687b ldr r3, [r7, #4]
800a4ac: 681b ldr r3, [r3, #0]
800a4ae: f403 1380 and.w r3, r3, #1048576 ; 0x100000
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)) ||\
800a4b2: 2b00 cmp r3, #0
800a4b4: d02e beq.n 800a514 <HAL_RCCEx_PeriphCLKConfig+0x6e8>
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)))
800a4b6: 687b ldr r3, [r7, #4]
800a4b8: 6c1b ldr r3, [r3, #64] ; 0x40
800a4ba: 2b00 cmp r3, #0
800a4bc: d12a bne.n 800a514 <HAL_RCCEx_PeriphCLKConfig+0x6e8>
assert_param(IS_RCC_PLLSAIQ_VALUE(PeriphClkInit->PLLSAI.PLLSAIQ));
/* check for PLLSAI/DIVQ Parameter */
assert_param(IS_RCC_PLLSAI_DIVQ_VALUE(PeriphClkInit->PLLSAIDivQ));
/* Read PLLSAIP value from PLLSAICFGR register (this value is not needed for SAI configuration) */
tmpreg0 = ((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIP) >> RCC_PLLSAICFGR_PLLSAIP_Pos);
800a4be: 4b51 ldr r3, [pc, #324] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a4c0: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800a4c4: 0c1b lsrs r3, r3, #16
800a4c6: f003 0303 and.w r3, r3, #3
800a4ca: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLSAICFGR & RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLSAICFGR_PLLSAIR_Pos);
800a4cc: 4b4d ldr r3, [pc, #308] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a4ce: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800a4d2: 0f1b lsrs r3, r3, #28
800a4d4: f003 0307 and.w r3, r3, #7
800a4d8: 60fb str r3, [r7, #12]
/* PLLSAI_VCO Input = PLL_SOURCE/PLLM */
/* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN */
/* SAI_CLK(first level) = PLLSAI_VCO Output/PLLSAIQ */
__HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIN , tmpreg0, PeriphClkInit->PLLSAI.PLLSAIQ, tmpreg1);
800a4da: 687b ldr r3, [r7, #4]
800a4dc: 695b ldr r3, [r3, #20]
800a4de: 019a lsls r2, r3, #6
800a4e0: 693b ldr r3, [r7, #16]
800a4e2: 041b lsls r3, r3, #16
800a4e4: 431a orrs r2, r3
800a4e6: 687b ldr r3, [r7, #4]
800a4e8: 699b ldr r3, [r3, #24]
800a4ea: 061b lsls r3, r3, #24
800a4ec: 431a orrs r2, r3
800a4ee: 68fb ldr r3, [r7, #12]
800a4f0: 071b lsls r3, r3, #28
800a4f2: 4944 ldr r1, [pc, #272] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a4f4: 4313 orrs r3, r2
800a4f6: f8c1 3088 str.w r3, [r1, #136] ; 0x88
/* SAI_CLK_x = SAI_CLK(first level)/PLLSAIDIVQ */
__HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLSAIDivQ);
800a4fa: 4b42 ldr r3, [pc, #264] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a4fc: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
800a500: f423 52f8 bic.w r2, r3, #7936 ; 0x1f00
800a504: 687b ldr r3, [r7, #4]
800a506: 6a9b ldr r3, [r3, #40] ; 0x28
800a508: 3b01 subs r3, #1
800a50a: 021b lsls r3, r3, #8
800a50c: 493d ldr r1, [pc, #244] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a50e: 4313 orrs r3, r2
800a510: f8c1 308c str.w r3, [r1, #140] ; 0x8c
}
/*----------------- In Case of PLLSAI is selected as source clock for CLK48 -------------------*/
/* In Case of PLLI2S is selected as source clock for CK48 */
if((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48) && (PeriphClkInit->Clk48ClockSelection == RCC_CLK48SOURCE_PLLSAIP))
800a514: 687b ldr r3, [r7, #4]
800a516: 681b ldr r3, [r3, #0]
800a518: f403 1300 and.w r3, r3, #2097152 ; 0x200000
800a51c: 2b00 cmp r3, #0
800a51e: d022 beq.n 800a566 <HAL_RCCEx_PeriphCLKConfig+0x73a>
800a520: 687b ldr r3, [r7, #4]
800a522: 6fdb ldr r3, [r3, #124] ; 0x7c
800a524: f1b3 6f00 cmp.w r3, #134217728 ; 0x8000000
800a528: d11d bne.n 800a566 <HAL_RCCEx_PeriphCLKConfig+0x73a>
{
/* check for Parameters */
assert_param(IS_RCC_PLLSAIP_VALUE(PeriphClkInit->PLLSAI.PLLSAIP));
/* Read PLLSAIQ and PLLSAIR value from PLLSAICFGR register (this value is not needed for CK48 configuration) */
tmpreg0 = ((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIQ) >> RCC_PLLSAICFGR_PLLSAIQ_Pos);
800a52a: 4b36 ldr r3, [pc, #216] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a52c: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800a530: 0e1b lsrs r3, r3, #24
800a532: f003 030f and.w r3, r3, #15
800a536: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIR) >> RCC_PLLSAICFGR_PLLSAIR_Pos);
800a538: 4b32 ldr r3, [pc, #200] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a53a: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800a53e: 0f1b lsrs r3, r3, #28
800a540: f003 0307 and.w r3, r3, #7
800a544: 60fb str r3, [r7, #12]
/* Configure the PLLSAI division factors */
/* PLLSAI_VCO = f(VCO clock) = f(PLLSAI clock input) x (PLLI2SN/PLLM) */
/* 48CLK = f(PLLSAI clock output) = f(VCO clock) / PLLSAIP */
__HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIN , PeriphClkInit->PLLSAI.PLLSAIP, tmpreg0, tmpreg1);
800a546: 687b ldr r3, [r7, #4]
800a548: 695b ldr r3, [r3, #20]
800a54a: 019a lsls r2, r3, #6
800a54c: 687b ldr r3, [r7, #4]
800a54e: 6a1b ldr r3, [r3, #32]
800a550: 041b lsls r3, r3, #16
800a552: 431a orrs r2, r3
800a554: 693b ldr r3, [r7, #16]
800a556: 061b lsls r3, r3, #24
800a558: 431a orrs r2, r3
800a55a: 68fb ldr r3, [r7, #12]
800a55c: 071b lsls r3, r3, #28
800a55e: 4929 ldr r1, [pc, #164] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a560: 4313 orrs r3, r2
800a562: f8c1 3088 str.w r3, [r1, #136] ; 0x88
}
#if defined(STM32F746xx) || defined(STM32F756xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx) || defined (STM32F750xx)
/*---------------------------- LTDC configuration -------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LTDC) == (RCC_PERIPHCLK_LTDC))
800a566: 687b ldr r3, [r7, #4]
800a568: 681b ldr r3, [r3, #0]
800a56a: f003 0308 and.w r3, r3, #8
800a56e: 2b00 cmp r3, #0
800a570: d028 beq.n 800a5c4 <HAL_RCCEx_PeriphCLKConfig+0x798>
{
assert_param(IS_RCC_PLLSAIR_VALUE(PeriphClkInit->PLLSAI.PLLSAIR));
assert_param(IS_RCC_PLLSAI_DIVR_VALUE(PeriphClkInit->PLLSAIDivR));
/* Read PLLSAIP and PLLSAIQ value from PLLSAICFGR register (these value are not needed for LTDC configuration) */
tmpreg0 = ((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIQ) >> RCC_PLLSAICFGR_PLLSAIQ_Pos);
800a572: 4b24 ldr r3, [pc, #144] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a574: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800a578: 0e1b lsrs r3, r3, #24
800a57a: f003 030f and.w r3, r3, #15
800a57e: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIP) >> RCC_PLLSAICFGR_PLLSAIP_Pos);
800a580: 4b20 ldr r3, [pc, #128] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a582: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
800a586: 0c1b lsrs r3, r3, #16
800a588: f003 0303 and.w r3, r3, #3
800a58c: 60fb str r3, [r7, #12]
/* PLLSAI_VCO Input = PLL_SOURCE/PLLM */
/* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN */
/* LTDC_CLK(first level) = PLLSAI_VCO Output/PLLSAIR */
__HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIN , tmpreg1, tmpreg0, PeriphClkInit->PLLSAI.PLLSAIR);
800a58e: 687b ldr r3, [r7, #4]
800a590: 695b ldr r3, [r3, #20]
800a592: 019a lsls r2, r3, #6
800a594: 68fb ldr r3, [r7, #12]
800a596: 041b lsls r3, r3, #16
800a598: 431a orrs r2, r3
800a59a: 693b ldr r3, [r7, #16]
800a59c: 061b lsls r3, r3, #24
800a59e: 431a orrs r2, r3
800a5a0: 687b ldr r3, [r7, #4]
800a5a2: 69db ldr r3, [r3, #28]
800a5a4: 071b lsls r3, r3, #28
800a5a6: 4917 ldr r1, [pc, #92] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a5a8: 4313 orrs r3, r2
800a5aa: f8c1 3088 str.w r3, [r1, #136] ; 0x88
/* LTDC_CLK = LTDC_CLK(first level)/PLLSAIDIVR */
__HAL_RCC_PLLSAI_PLLSAICLKDIVR_CONFIG(PeriphClkInit->PLLSAIDivR);
800a5ae: 4b15 ldr r3, [pc, #84] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a5b0: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
800a5b4: f423 3240 bic.w r2, r3, #196608 ; 0x30000
800a5b8: 687b ldr r3, [r7, #4]
800a5ba: 6adb ldr r3, [r3, #44] ; 0x2c
800a5bc: 4911 ldr r1, [pc, #68] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a5be: 4313 orrs r3, r2
800a5c0: f8c1 308c str.w r3, [r1, #140] ; 0x8c
}
#endif /* STM32F746xx || STM32F756xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx || STM32F750xx */
/* Enable PLLSAI Clock */
__HAL_RCC_PLLSAI_ENABLE();
800a5c4: 4b0f ldr r3, [pc, #60] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a5c6: 681b ldr r3, [r3, #0]
800a5c8: 4a0e ldr r2, [pc, #56] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a5ca: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
800a5ce: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
800a5d0: f7fa fea6 bl 8005320 <HAL_GetTick>
800a5d4: 6178 str r0, [r7, #20]
/* Wait till PLLSAI is ready */
while(__HAL_RCC_PLLSAI_GET_FLAG() == RESET)
800a5d6: e008 b.n 800a5ea <HAL_RCCEx_PeriphCLKConfig+0x7be>
{
if((HAL_GetTick() - tickstart) > PLLSAI_TIMEOUT_VALUE)
800a5d8: f7fa fea2 bl 8005320 <HAL_GetTick>
800a5dc: 4602 mov r2, r0
800a5de: 697b ldr r3, [r7, #20]
800a5e0: 1ad3 subs r3, r2, r3
800a5e2: 2b64 cmp r3, #100 ; 0x64
800a5e4: d901 bls.n 800a5ea <HAL_RCCEx_PeriphCLKConfig+0x7be>
{
/* return in case of Timeout detected */
return HAL_TIMEOUT;
800a5e6: 2303 movs r3, #3
800a5e8: e007 b.n 800a5fa <HAL_RCCEx_PeriphCLKConfig+0x7ce>
while(__HAL_RCC_PLLSAI_GET_FLAG() == RESET)
800a5ea: 4b06 ldr r3, [pc, #24] ; (800a604 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
800a5ec: 681b ldr r3, [r3, #0]
800a5ee: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
800a5f2: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
800a5f6: d1ef bne.n 800a5d8 <HAL_RCCEx_PeriphCLKConfig+0x7ac>
}
}
}
return HAL_OK;
800a5f8: 2300 movs r3, #0
}
800a5fa: 4618 mov r0, r3
800a5fc: 3720 adds r7, #32
800a5fe: 46bd mov sp, r7
800a600: bd80 pop {r7, pc}
800a602: bf00 nop
800a604: 40023800 .word 0x40023800
0800a608 <HAL_RNG_Init>:
* @param hrng pointer to a RNG_HandleTypeDef structure that contains
* the configuration information for RNG.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RNG_Init(RNG_HandleTypeDef *hrng)
{
800a608: b580 push {r7, lr}
800a60a: b082 sub sp, #8
800a60c: af00 add r7, sp, #0
800a60e: 6078 str r0, [r7, #4]
/* Check the RNG handle allocation */
if (hrng == NULL)
800a610: 687b ldr r3, [r7, #4]
800a612: 2b00 cmp r3, #0
800a614: d101 bne.n 800a61a <HAL_RNG_Init+0x12>
{
return HAL_ERROR;
800a616: 2301 movs r3, #1
800a618: e01c b.n 800a654 <HAL_RNG_Init+0x4c>
/* Init the low level hardware */
hrng->MspInitCallback(hrng);
}
#else
if (hrng->State == HAL_RNG_STATE_RESET)
800a61a: 687b ldr r3, [r7, #4]
800a61c: 795b ldrb r3, [r3, #5]
800a61e: b2db uxtb r3, r3
800a620: 2b00 cmp r3, #0
800a622: d105 bne.n 800a630 <HAL_RNG_Init+0x28>
{
/* Allocate lock resource and initialize it */
hrng->Lock = HAL_UNLOCKED;
800a624: 687b ldr r3, [r7, #4]
800a626: 2200 movs r2, #0
800a628: 711a strb r2, [r3, #4]
/* Init the low level hardware */
HAL_RNG_MspInit(hrng);
800a62a: 6878 ldr r0, [r7, #4]
800a62c: f7fa fa0a bl 8004a44 <HAL_RNG_MspInit>
}
#endif /* USE_HAL_RNG_REGISTER_CALLBACKS */
/* Change RNG peripheral state */
hrng->State = HAL_RNG_STATE_BUSY;
800a630: 687b ldr r3, [r7, #4]
800a632: 2202 movs r2, #2
800a634: 715a strb r2, [r3, #5]
/* Enable the RNG Peripheral */
__HAL_RNG_ENABLE(hrng);
800a636: 687b ldr r3, [r7, #4]
800a638: 681b ldr r3, [r3, #0]
800a63a: 681a ldr r2, [r3, #0]
800a63c: 687b ldr r3, [r7, #4]
800a63e: 681b ldr r3, [r3, #0]
800a640: f042 0204 orr.w r2, r2, #4
800a644: 601a str r2, [r3, #0]
/* Initialize the RNG state */
hrng->State = HAL_RNG_STATE_READY;
800a646: 687b ldr r3, [r7, #4]
800a648: 2201 movs r2, #1
800a64a: 715a strb r2, [r3, #5]
/* Initialise the error code */
hrng->ErrorCode = HAL_RNG_ERROR_NONE;
800a64c: 687b ldr r3, [r7, #4]
800a64e: 2200 movs r2, #0
800a650: 609a str r2, [r3, #8]
/* Return function status */
return HAL_OK;
800a652: 2300 movs r3, #0
}
800a654: 4618 mov r0, r3
800a656: 3708 adds r7, #8
800a658: 46bd mov sp, r7
800a65a: bd80 pop {r7, pc}
0800a65c <HAL_RTC_Init>:
* @param hrtc pointer to a RTC_HandleTypeDef structure that contains
* the configuration information for RTC.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc)
{
800a65c: b580 push {r7, lr}
800a65e: b082 sub sp, #8
800a660: af00 add r7, sp, #0
800a662: 6078 str r0, [r7, #4]
/* Check the RTC peripheral state */
if(hrtc == NULL)
800a664: 687b ldr r3, [r7, #4]
800a666: 2b00 cmp r3, #0
800a668: d101 bne.n 800a66e <HAL_RTC_Init+0x12>
{
return HAL_ERROR;
800a66a: 2301 movs r3, #1
800a66c: e06b b.n 800a746 <HAL_RTC_Init+0xea>
{
hrtc->MspDeInitCallback = HAL_RTC_MspDeInit;
}
}
#else
if(hrtc->State == HAL_RTC_STATE_RESET)
800a66e: 687b ldr r3, [r7, #4]
800a670: 7f5b ldrb r3, [r3, #29]
800a672: b2db uxtb r3, r3
800a674: 2b00 cmp r3, #0
800a676: d105 bne.n 800a684 <HAL_RTC_Init+0x28>
{
/* Allocate lock resource and initialize it */
hrtc->Lock = HAL_UNLOCKED;
800a678: 687b ldr r3, [r7, #4]
800a67a: 2200 movs r2, #0
800a67c: 771a strb r2, [r3, #28]
/* Initialize RTC MSP */
HAL_RTC_MspInit(hrtc);
800a67e: 6878 ldr r0, [r7, #4]
800a680: f7fa fa00 bl 8004a84 <HAL_RTC_MspInit>
}
#endif /* (USE_HAL_RTC_REGISTER_CALLBACKS) */
/* Set RTC state */
hrtc->State = HAL_RTC_STATE_BUSY;
800a684: 687b ldr r3, [r7, #4]
800a686: 2202 movs r2, #2
800a688: 775a strb r2, [r3, #29]
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800a68a: 687b ldr r3, [r7, #4]
800a68c: 681b ldr r3, [r3, #0]
800a68e: 22ca movs r2, #202 ; 0xca
800a690: 625a str r2, [r3, #36] ; 0x24
800a692: 687b ldr r3, [r7, #4]
800a694: 681b ldr r3, [r3, #0]
800a696: 2253 movs r2, #83 ; 0x53
800a698: 625a str r2, [r3, #36] ; 0x24
/* Set Initialization mode */
if(RTC_EnterInitMode(hrtc) != HAL_OK)
800a69a: 6878 ldr r0, [r7, #4]
800a69c: f000 fb00 bl 800aca0 <RTC_EnterInitMode>
800a6a0: 4603 mov r3, r0
800a6a2: 2b00 cmp r3, #0
800a6a4: d008 beq.n 800a6b8 <HAL_RTC_Init+0x5c>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a6a6: 687b ldr r3, [r7, #4]
800a6a8: 681b ldr r3, [r3, #0]
800a6aa: 22ff movs r2, #255 ; 0xff
800a6ac: 625a str r2, [r3, #36] ; 0x24
/* Set RTC state */
hrtc->State = HAL_RTC_STATE_ERROR;
800a6ae: 687b ldr r3, [r7, #4]
800a6b0: 2204 movs r2, #4
800a6b2: 775a strb r2, [r3, #29]
return HAL_ERROR;
800a6b4: 2301 movs r3, #1
800a6b6: e046 b.n 800a746 <HAL_RTC_Init+0xea>
}
else
{
/* Clear RTC_CR FMT, OSEL and POL Bits */
hrtc->Instance->CR &= ((uint32_t)~(RTC_CR_FMT | RTC_CR_OSEL | RTC_CR_POL));
800a6b8: 687b ldr r3, [r7, #4]
800a6ba: 681b ldr r3, [r3, #0]
800a6bc: 6899 ldr r1, [r3, #8]
800a6be: 687b ldr r3, [r7, #4]
800a6c0: 681a ldr r2, [r3, #0]
800a6c2: 4b23 ldr r3, [pc, #140] ; (800a750 <HAL_RTC_Init+0xf4>)
800a6c4: 400b ands r3, r1
800a6c6: 6093 str r3, [r2, #8]
/* Set RTC_CR register */
hrtc->Instance->CR |= (uint32_t)(hrtc->Init.HourFormat | hrtc->Init.OutPut | hrtc->Init.OutPutPolarity);
800a6c8: 687b ldr r3, [r7, #4]
800a6ca: 681b ldr r3, [r3, #0]
800a6cc: 6899 ldr r1, [r3, #8]
800a6ce: 687b ldr r3, [r7, #4]
800a6d0: 685a ldr r2, [r3, #4]
800a6d2: 687b ldr r3, [r7, #4]
800a6d4: 691b ldr r3, [r3, #16]
800a6d6: 431a orrs r2, r3
800a6d8: 687b ldr r3, [r7, #4]
800a6da: 695b ldr r3, [r3, #20]
800a6dc: 431a orrs r2, r3
800a6de: 687b ldr r3, [r7, #4]
800a6e0: 681b ldr r3, [r3, #0]
800a6e2: 430a orrs r2, r1
800a6e4: 609a str r2, [r3, #8]
/* Configure the RTC PRER */
hrtc->Instance->PRER = (uint32_t)(hrtc->Init.SynchPrediv);
800a6e6: 687b ldr r3, [r7, #4]
800a6e8: 681b ldr r3, [r3, #0]
800a6ea: 687a ldr r2, [r7, #4]
800a6ec: 68d2 ldr r2, [r2, #12]
800a6ee: 611a str r2, [r3, #16]
hrtc->Instance->PRER |= (uint32_t)(hrtc->Init.AsynchPrediv << 16);
800a6f0: 687b ldr r3, [r7, #4]
800a6f2: 681b ldr r3, [r3, #0]
800a6f4: 6919 ldr r1, [r3, #16]
800a6f6: 687b ldr r3, [r7, #4]
800a6f8: 689b ldr r3, [r3, #8]
800a6fa: 041a lsls r2, r3, #16
800a6fc: 687b ldr r3, [r7, #4]
800a6fe: 681b ldr r3, [r3, #0]
800a700: 430a orrs r2, r1
800a702: 611a str r2, [r3, #16]
/* Exit Initialization mode */
hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
800a704: 687b ldr r3, [r7, #4]
800a706: 681b ldr r3, [r3, #0]
800a708: 68da ldr r2, [r3, #12]
800a70a: 687b ldr r3, [r7, #4]
800a70c: 681b ldr r3, [r3, #0]
800a70e: f022 0280 bic.w r2, r2, #128 ; 0x80
800a712: 60da str r2, [r3, #12]
hrtc->Instance->OR &= (uint32_t)~RTC_OR_ALARMTYPE;
800a714: 687b ldr r3, [r7, #4]
800a716: 681b ldr r3, [r3, #0]
800a718: 6cda ldr r2, [r3, #76] ; 0x4c
800a71a: 687b ldr r3, [r7, #4]
800a71c: 681b ldr r3, [r3, #0]
800a71e: f022 0208 bic.w r2, r2, #8
800a722: 64da str r2, [r3, #76] ; 0x4c
hrtc->Instance->OR |= (uint32_t)(hrtc->Init.OutPutType);
800a724: 687b ldr r3, [r7, #4]
800a726: 681b ldr r3, [r3, #0]
800a728: 6cd9 ldr r1, [r3, #76] ; 0x4c
800a72a: 687b ldr r3, [r7, #4]
800a72c: 699a ldr r2, [r3, #24]
800a72e: 687b ldr r3, [r7, #4]
800a730: 681b ldr r3, [r3, #0]
800a732: 430a orrs r2, r1
800a734: 64da str r2, [r3, #76] ; 0x4c
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a736: 687b ldr r3, [r7, #4]
800a738: 681b ldr r3, [r3, #0]
800a73a: 22ff movs r2, #255 ; 0xff
800a73c: 625a str r2, [r3, #36] ; 0x24
/* Set RTC state */
hrtc->State = HAL_RTC_STATE_READY;
800a73e: 687b ldr r3, [r7, #4]
800a740: 2201 movs r2, #1
800a742: 775a strb r2, [r3, #29]
return HAL_OK;
800a744: 2300 movs r3, #0
}
}
800a746: 4618 mov r0, r3
800a748: 3708 adds r7, #8
800a74a: 46bd mov sp, r7
800a74c: bd80 pop {r7, pc}
800a74e: bf00 nop
800a750: ff8fffbf .word 0xff8fffbf
0800a754 <HAL_RTC_SetTime>:
* @arg FORMAT_BIN: Binary data format
* @arg FORMAT_BCD: BCD data format
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format)
{
800a754: b590 push {r4, r7, lr}
800a756: b087 sub sp, #28
800a758: af00 add r7, sp, #0
800a75a: 60f8 str r0, [r7, #12]
800a75c: 60b9 str r1, [r7, #8]
800a75e: 607a str r2, [r7, #4]
uint32_t tmpreg = 0;
800a760: 2300 movs r3, #0
800a762: 617b str r3, [r7, #20]
assert_param(IS_RTC_FORMAT(Format));
assert_param(IS_RTC_DAYLIGHT_SAVING(sTime->DayLightSaving));
assert_param(IS_RTC_STORE_OPERATION(sTime->StoreOperation));
/* Process Locked */
__HAL_LOCK(hrtc);
800a764: 68fb ldr r3, [r7, #12]
800a766: 7f1b ldrb r3, [r3, #28]
800a768: 2b01 cmp r3, #1
800a76a: d101 bne.n 800a770 <HAL_RTC_SetTime+0x1c>
800a76c: 2302 movs r3, #2
800a76e: e0a8 b.n 800a8c2 <HAL_RTC_SetTime+0x16e>
800a770: 68fb ldr r3, [r7, #12]
800a772: 2201 movs r2, #1
800a774: 771a strb r2, [r3, #28]
hrtc->State = HAL_RTC_STATE_BUSY;
800a776: 68fb ldr r3, [r7, #12]
800a778: 2202 movs r2, #2
800a77a: 775a strb r2, [r3, #29]
if(Format == RTC_FORMAT_BIN)
800a77c: 687b ldr r3, [r7, #4]
800a77e: 2b00 cmp r3, #0
800a780: d126 bne.n 800a7d0 <HAL_RTC_SetTime+0x7c>
{
if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
800a782: 68fb ldr r3, [r7, #12]
800a784: 681b ldr r3, [r3, #0]
800a786: 689b ldr r3, [r3, #8]
800a788: f003 0340 and.w r3, r3, #64 ; 0x40
800a78c: 2b00 cmp r3, #0
800a78e: d102 bne.n 800a796 <HAL_RTC_SetTime+0x42>
assert_param(IS_RTC_HOUR12(sTime->Hours));
assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat));
}
else
{
sTime->TimeFormat = 0x00;
800a790: 68bb ldr r3, [r7, #8]
800a792: 2200 movs r2, #0
800a794: 731a strb r2, [r3, #12]
assert_param(IS_RTC_HOUR24(sTime->Hours));
}
assert_param(IS_RTC_MINUTES(sTime->Minutes));
assert_param(IS_RTC_SECONDS(sTime->Seconds));
tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(sTime->Hours) << 16) | \
800a796: 68bb ldr r3, [r7, #8]
800a798: 781b ldrb r3, [r3, #0]
800a79a: 4618 mov r0, r3
800a79c: f000 faac bl 800acf8 <RTC_ByteToBcd2>
800a7a0: 4603 mov r3, r0
800a7a2: 041c lsls r4, r3, #16
((uint32_t)RTC_ByteToBcd2(sTime->Minutes) << 8) | \
800a7a4: 68bb ldr r3, [r7, #8]
800a7a6: 785b ldrb r3, [r3, #1]
800a7a8: 4618 mov r0, r3
800a7aa: f000 faa5 bl 800acf8 <RTC_ByteToBcd2>
800a7ae: 4603 mov r3, r0
800a7b0: 021b lsls r3, r3, #8
tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(sTime->Hours) << 16) | \
800a7b2: 431c orrs r4, r3
((uint32_t)RTC_ByteToBcd2(sTime->Seconds)) | \
800a7b4: 68bb ldr r3, [r7, #8]
800a7b6: 789b ldrb r3, [r3, #2]
800a7b8: 4618 mov r0, r3
800a7ba: f000 fa9d bl 800acf8 <RTC_ByteToBcd2>
800a7be: 4603 mov r3, r0
((uint32_t)RTC_ByteToBcd2(sTime->Minutes) << 8) | \
800a7c0: ea44 0203 orr.w r2, r4, r3
(((uint32_t)sTime->TimeFormat) << 16));
800a7c4: 68bb ldr r3, [r7, #8]
800a7c6: 7b1b ldrb r3, [r3, #12]
800a7c8: 041b lsls r3, r3, #16
tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(sTime->Hours) << 16) | \
800a7ca: 4313 orrs r3, r2
800a7cc: 617b str r3, [r7, #20]
800a7ce: e018 b.n 800a802 <HAL_RTC_SetTime+0xae>
}
else
{
if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
800a7d0: 68fb ldr r3, [r7, #12]
800a7d2: 681b ldr r3, [r3, #0]
800a7d4: 689b ldr r3, [r3, #8]
800a7d6: f003 0340 and.w r3, r3, #64 ; 0x40
800a7da: 2b00 cmp r3, #0
800a7dc: d102 bne.n 800a7e4 <HAL_RTC_SetTime+0x90>
assert_param(IS_RTC_HOUR12(RTC_Bcd2ToByte(sTime->Hours)));
assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat));
}
else
{
sTime->TimeFormat = 0x00;
800a7de: 68bb ldr r3, [r7, #8]
800a7e0: 2200 movs r2, #0
800a7e2: 731a strb r2, [r3, #12]
assert_param(IS_RTC_HOUR24(RTC_Bcd2ToByte(sTime->Hours)));
}
assert_param(IS_RTC_MINUTES(RTC_Bcd2ToByte(sTime->Minutes)));
assert_param(IS_RTC_SECONDS(RTC_Bcd2ToByte(sTime->Seconds)));
tmpreg = (((uint32_t)(sTime->Hours) << 16) | \
800a7e4: 68bb ldr r3, [r7, #8]
800a7e6: 781b ldrb r3, [r3, #0]
800a7e8: 041a lsls r2, r3, #16
((uint32_t)(sTime->Minutes) << 8) | \
800a7ea: 68bb ldr r3, [r7, #8]
800a7ec: 785b ldrb r3, [r3, #1]
800a7ee: 021b lsls r3, r3, #8
tmpreg = (((uint32_t)(sTime->Hours) << 16) | \
800a7f0: 4313 orrs r3, r2
((uint32_t)sTime->Seconds) | \
800a7f2: 68ba ldr r2, [r7, #8]
800a7f4: 7892 ldrb r2, [r2, #2]
((uint32_t)(sTime->Minutes) << 8) | \
800a7f6: 431a orrs r2, r3
((uint32_t)(sTime->TimeFormat) << 16));
800a7f8: 68bb ldr r3, [r7, #8]
800a7fa: 7b1b ldrb r3, [r3, #12]
800a7fc: 041b lsls r3, r3, #16
tmpreg = (((uint32_t)(sTime->Hours) << 16) | \
800a7fe: 4313 orrs r3, r2
800a800: 617b str r3, [r7, #20]
}
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800a802: 68fb ldr r3, [r7, #12]
800a804: 681b ldr r3, [r3, #0]
800a806: 22ca movs r2, #202 ; 0xca
800a808: 625a str r2, [r3, #36] ; 0x24
800a80a: 68fb ldr r3, [r7, #12]
800a80c: 681b ldr r3, [r3, #0]
800a80e: 2253 movs r2, #83 ; 0x53
800a810: 625a str r2, [r3, #36] ; 0x24
/* Set Initialization mode */
if(RTC_EnterInitMode(hrtc) != HAL_OK)
800a812: 68f8 ldr r0, [r7, #12]
800a814: f000 fa44 bl 800aca0 <RTC_EnterInitMode>
800a818: 4603 mov r3, r0
800a81a: 2b00 cmp r3, #0
800a81c: d00b beq.n 800a836 <HAL_RTC_SetTime+0xe2>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a81e: 68fb ldr r3, [r7, #12]
800a820: 681b ldr r3, [r3, #0]
800a822: 22ff movs r2, #255 ; 0xff
800a824: 625a str r2, [r3, #36] ; 0x24
/* Set RTC state */
hrtc->State = HAL_RTC_STATE_ERROR;
800a826: 68fb ldr r3, [r7, #12]
800a828: 2204 movs r2, #4
800a82a: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a82c: 68fb ldr r3, [r7, #12]
800a82e: 2200 movs r2, #0
800a830: 771a strb r2, [r3, #28]
return HAL_ERROR;
800a832: 2301 movs r3, #1
800a834: e045 b.n 800a8c2 <HAL_RTC_SetTime+0x16e>
}
else
{
/* Set the RTC_TR register */
hrtc->Instance->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK);
800a836: 68fb ldr r3, [r7, #12]
800a838: 681a ldr r2, [r3, #0]
800a83a: 6979 ldr r1, [r7, #20]
800a83c: 4b23 ldr r3, [pc, #140] ; (800a8cc <HAL_RTC_SetTime+0x178>)
800a83e: 400b ands r3, r1
800a840: 6013 str r3, [r2, #0]
/* Clear the bits to be configured */
hrtc->Instance->CR &= (uint32_t)~RTC_CR_BKP;
800a842: 68fb ldr r3, [r7, #12]
800a844: 681b ldr r3, [r3, #0]
800a846: 689a ldr r2, [r3, #8]
800a848: 68fb ldr r3, [r7, #12]
800a84a: 681b ldr r3, [r3, #0]
800a84c: f422 2280 bic.w r2, r2, #262144 ; 0x40000
800a850: 609a str r2, [r3, #8]
/* Configure the RTC_CR register */
hrtc->Instance->CR |= (uint32_t)(sTime->DayLightSaving | sTime->StoreOperation);
800a852: 68fb ldr r3, [r7, #12]
800a854: 681b ldr r3, [r3, #0]
800a856: 6899 ldr r1, [r3, #8]
800a858: 68bb ldr r3, [r7, #8]
800a85a: 691a ldr r2, [r3, #16]
800a85c: 68bb ldr r3, [r7, #8]
800a85e: 695b ldr r3, [r3, #20]
800a860: 431a orrs r2, r3
800a862: 68fb ldr r3, [r7, #12]
800a864: 681b ldr r3, [r3, #0]
800a866: 430a orrs r2, r1
800a868: 609a str r2, [r3, #8]
/* Exit Initialization mode */
hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
800a86a: 68fb ldr r3, [r7, #12]
800a86c: 681b ldr r3, [r3, #0]
800a86e: 68da ldr r2, [r3, #12]
800a870: 68fb ldr r3, [r7, #12]
800a872: 681b ldr r3, [r3, #0]
800a874: f022 0280 bic.w r2, r2, #128 ; 0x80
800a878: 60da str r2, [r3, #12]
/* If CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */
if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == RESET)
800a87a: 68fb ldr r3, [r7, #12]
800a87c: 681b ldr r3, [r3, #0]
800a87e: 689b ldr r3, [r3, #8]
800a880: f003 0320 and.w r3, r3, #32
800a884: 2b00 cmp r3, #0
800a886: d111 bne.n 800a8ac <HAL_RTC_SetTime+0x158>
{
if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK)
800a888: 68f8 ldr r0, [r7, #12]
800a88a: f000 f9e1 bl 800ac50 <HAL_RTC_WaitForSynchro>
800a88e: 4603 mov r3, r0
800a890: 2b00 cmp r3, #0
800a892: d00b beq.n 800a8ac <HAL_RTC_SetTime+0x158>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a894: 68fb ldr r3, [r7, #12]
800a896: 681b ldr r3, [r3, #0]
800a898: 22ff movs r2, #255 ; 0xff
800a89a: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_ERROR;
800a89c: 68fb ldr r3, [r7, #12]
800a89e: 2204 movs r2, #4
800a8a0: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a8a2: 68fb ldr r3, [r7, #12]
800a8a4: 2200 movs r2, #0
800a8a6: 771a strb r2, [r3, #28]
return HAL_ERROR;
800a8a8: 2301 movs r3, #1
800a8aa: e00a b.n 800a8c2 <HAL_RTC_SetTime+0x16e>
}
}
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a8ac: 68fb ldr r3, [r7, #12]
800a8ae: 681b ldr r3, [r3, #0]
800a8b0: 22ff movs r2, #255 ; 0xff
800a8b2: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_READY;
800a8b4: 68fb ldr r3, [r7, #12]
800a8b6: 2201 movs r2, #1
800a8b8: 775a strb r2, [r3, #29]
__HAL_UNLOCK(hrtc);
800a8ba: 68fb ldr r3, [r7, #12]
800a8bc: 2200 movs r2, #0
800a8be: 771a strb r2, [r3, #28]
return HAL_OK;
800a8c0: 2300 movs r3, #0
}
}
800a8c2: 4618 mov r0, r3
800a8c4: 371c adds r7, #28
800a8c6: 46bd mov sp, r7
800a8c8: bd90 pop {r4, r7, pc}
800a8ca: bf00 nop
800a8cc: 007f7f7f .word 0x007f7f7f
0800a8d0 <HAL_RTC_SetDate>:
* @arg RTC_FORMAT_BIN: Binary data format
* @arg RTC_FORMAT_BCD: BCD data format
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format)
{
800a8d0: b590 push {r4, r7, lr}
800a8d2: b087 sub sp, #28
800a8d4: af00 add r7, sp, #0
800a8d6: 60f8 str r0, [r7, #12]
800a8d8: 60b9 str r1, [r7, #8]
800a8da: 607a str r2, [r7, #4]
uint32_t datetmpreg = 0;
800a8dc: 2300 movs r3, #0
800a8de: 617b str r3, [r7, #20]
/* Check the parameters */
assert_param(IS_RTC_FORMAT(Format));
/* Process Locked */
__HAL_LOCK(hrtc);
800a8e0: 68fb ldr r3, [r7, #12]
800a8e2: 7f1b ldrb r3, [r3, #28]
800a8e4: 2b01 cmp r3, #1
800a8e6: d101 bne.n 800a8ec <HAL_RTC_SetDate+0x1c>
800a8e8: 2302 movs r3, #2
800a8ea: e092 b.n 800aa12 <HAL_RTC_SetDate+0x142>
800a8ec: 68fb ldr r3, [r7, #12]
800a8ee: 2201 movs r2, #1
800a8f0: 771a strb r2, [r3, #28]
hrtc->State = HAL_RTC_STATE_BUSY;
800a8f2: 68fb ldr r3, [r7, #12]
800a8f4: 2202 movs r2, #2
800a8f6: 775a strb r2, [r3, #29]
if((Format == RTC_FORMAT_BIN) && ((sDate->Month & 0x10U) == 0x10U))
800a8f8: 687b ldr r3, [r7, #4]
800a8fa: 2b00 cmp r3, #0
800a8fc: d10e bne.n 800a91c <HAL_RTC_SetDate+0x4c>
800a8fe: 68bb ldr r3, [r7, #8]
800a900: 785b ldrb r3, [r3, #1]
800a902: f003 0310 and.w r3, r3, #16
800a906: 2b00 cmp r3, #0
800a908: d008 beq.n 800a91c <HAL_RTC_SetDate+0x4c>
{
sDate->Month = (uint8_t)((sDate->Month & (uint8_t)~(0x10U)) + (uint8_t)0x0AU);
800a90a: 68bb ldr r3, [r7, #8]
800a90c: 785b ldrb r3, [r3, #1]
800a90e: f023 0310 bic.w r3, r3, #16
800a912: b2db uxtb r3, r3
800a914: 330a adds r3, #10
800a916: b2da uxtb r2, r3
800a918: 68bb ldr r3, [r7, #8]
800a91a: 705a strb r2, [r3, #1]
}
assert_param(IS_RTC_WEEKDAY(sDate->WeekDay));
if(Format == RTC_FORMAT_BIN)
800a91c: 687b ldr r3, [r7, #4]
800a91e: 2b00 cmp r3, #0
800a920: d11c bne.n 800a95c <HAL_RTC_SetDate+0x8c>
{
assert_param(IS_RTC_YEAR(sDate->Year));
assert_param(IS_RTC_MONTH(sDate->Month));
assert_param(IS_RTC_DATE(sDate->Date));
datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << 16) | \
800a922: 68bb ldr r3, [r7, #8]
800a924: 78db ldrb r3, [r3, #3]
800a926: 4618 mov r0, r3
800a928: f000 f9e6 bl 800acf8 <RTC_ByteToBcd2>
800a92c: 4603 mov r3, r0
800a92e: 041c lsls r4, r3, #16
((uint32_t)RTC_ByteToBcd2(sDate->Month) << 8) | \
800a930: 68bb ldr r3, [r7, #8]
800a932: 785b ldrb r3, [r3, #1]
800a934: 4618 mov r0, r3
800a936: f000 f9df bl 800acf8 <RTC_ByteToBcd2>
800a93a: 4603 mov r3, r0
800a93c: 021b lsls r3, r3, #8
datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << 16) | \
800a93e: 431c orrs r4, r3
((uint32_t)RTC_ByteToBcd2(sDate->Date)) | \
800a940: 68bb ldr r3, [r7, #8]
800a942: 789b ldrb r3, [r3, #2]
800a944: 4618 mov r0, r3
800a946: f000 f9d7 bl 800acf8 <RTC_ByteToBcd2>
800a94a: 4603 mov r3, r0
((uint32_t)RTC_ByteToBcd2(sDate->Month) << 8) | \
800a94c: ea44 0203 orr.w r2, r4, r3
((uint32_t)sDate->WeekDay << 13));
800a950: 68bb ldr r3, [r7, #8]
800a952: 781b ldrb r3, [r3, #0]
800a954: 035b lsls r3, r3, #13
datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << 16) | \
800a956: 4313 orrs r3, r2
800a958: 617b str r3, [r7, #20]
800a95a: e00e b.n 800a97a <HAL_RTC_SetDate+0xaa>
{
assert_param(IS_RTC_YEAR(RTC_Bcd2ToByte(sDate->Year)));
assert_param(IS_RTC_MONTH(RTC_Bcd2ToByte(sDate->Month)));
assert_param(IS_RTC_DATE(RTC_Bcd2ToByte(sDate->Date)));
datetmpreg = ((((uint32_t)sDate->Year) << 16) | \
800a95c: 68bb ldr r3, [r7, #8]
800a95e: 78db ldrb r3, [r3, #3]
800a960: 041a lsls r2, r3, #16
(((uint32_t)sDate->Month) << 8) | \
800a962: 68bb ldr r3, [r7, #8]
800a964: 785b ldrb r3, [r3, #1]
800a966: 021b lsls r3, r3, #8
datetmpreg = ((((uint32_t)sDate->Year) << 16) | \
800a968: 4313 orrs r3, r2
((uint32_t)sDate->Date) | \
800a96a: 68ba ldr r2, [r7, #8]
800a96c: 7892 ldrb r2, [r2, #2]
(((uint32_t)sDate->Month) << 8) | \
800a96e: 431a orrs r2, r3
(((uint32_t)sDate->WeekDay) << 13));
800a970: 68bb ldr r3, [r7, #8]
800a972: 781b ldrb r3, [r3, #0]
800a974: 035b lsls r3, r3, #13
datetmpreg = ((((uint32_t)sDate->Year) << 16) | \
800a976: 4313 orrs r3, r2
800a978: 617b str r3, [r7, #20]
}
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800a97a: 68fb ldr r3, [r7, #12]
800a97c: 681b ldr r3, [r3, #0]
800a97e: 22ca movs r2, #202 ; 0xca
800a980: 625a str r2, [r3, #36] ; 0x24
800a982: 68fb ldr r3, [r7, #12]
800a984: 681b ldr r3, [r3, #0]
800a986: 2253 movs r2, #83 ; 0x53
800a988: 625a str r2, [r3, #36] ; 0x24
/* Set Initialization mode */
if(RTC_EnterInitMode(hrtc) != HAL_OK)
800a98a: 68f8 ldr r0, [r7, #12]
800a98c: f000 f988 bl 800aca0 <RTC_EnterInitMode>
800a990: 4603 mov r3, r0
800a992: 2b00 cmp r3, #0
800a994: d00b beq.n 800a9ae <HAL_RTC_SetDate+0xde>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a996: 68fb ldr r3, [r7, #12]
800a998: 681b ldr r3, [r3, #0]
800a99a: 22ff movs r2, #255 ; 0xff
800a99c: 625a str r2, [r3, #36] ; 0x24
/* Set RTC state*/
hrtc->State = HAL_RTC_STATE_ERROR;
800a99e: 68fb ldr r3, [r7, #12]
800a9a0: 2204 movs r2, #4
800a9a2: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a9a4: 68fb ldr r3, [r7, #12]
800a9a6: 2200 movs r2, #0
800a9a8: 771a strb r2, [r3, #28]
return HAL_ERROR;
800a9aa: 2301 movs r3, #1
800a9ac: e031 b.n 800aa12 <HAL_RTC_SetDate+0x142>
}
else
{
/* Set the RTC_DR register */
hrtc->Instance->DR = (uint32_t)(datetmpreg & RTC_DR_RESERVED_MASK);
800a9ae: 68fb ldr r3, [r7, #12]
800a9b0: 681a ldr r2, [r3, #0]
800a9b2: 6979 ldr r1, [r7, #20]
800a9b4: 4b19 ldr r3, [pc, #100] ; (800aa1c <HAL_RTC_SetDate+0x14c>)
800a9b6: 400b ands r3, r1
800a9b8: 6053 str r3, [r2, #4]
/* Exit Initialization mode */
hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
800a9ba: 68fb ldr r3, [r7, #12]
800a9bc: 681b ldr r3, [r3, #0]
800a9be: 68da ldr r2, [r3, #12]
800a9c0: 68fb ldr r3, [r7, #12]
800a9c2: 681b ldr r3, [r3, #0]
800a9c4: f022 0280 bic.w r2, r2, #128 ; 0x80
800a9c8: 60da str r2, [r3, #12]
/* If CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */
if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == RESET)
800a9ca: 68fb ldr r3, [r7, #12]
800a9cc: 681b ldr r3, [r3, #0]
800a9ce: 689b ldr r3, [r3, #8]
800a9d0: f003 0320 and.w r3, r3, #32
800a9d4: 2b00 cmp r3, #0
800a9d6: d111 bne.n 800a9fc <HAL_RTC_SetDate+0x12c>
{
if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK)
800a9d8: 68f8 ldr r0, [r7, #12]
800a9da: f000 f939 bl 800ac50 <HAL_RTC_WaitForSynchro>
800a9de: 4603 mov r3, r0
800a9e0: 2b00 cmp r3, #0
800a9e2: d00b beq.n 800a9fc <HAL_RTC_SetDate+0x12c>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a9e4: 68fb ldr r3, [r7, #12]
800a9e6: 681b ldr r3, [r3, #0]
800a9e8: 22ff movs r2, #255 ; 0xff
800a9ea: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_ERROR;
800a9ec: 68fb ldr r3, [r7, #12]
800a9ee: 2204 movs r2, #4
800a9f0: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a9f2: 68fb ldr r3, [r7, #12]
800a9f4: 2200 movs r2, #0
800a9f6: 771a strb r2, [r3, #28]
return HAL_ERROR;
800a9f8: 2301 movs r3, #1
800a9fa: e00a b.n 800aa12 <HAL_RTC_SetDate+0x142>
}
}
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a9fc: 68fb ldr r3, [r7, #12]
800a9fe: 681b ldr r3, [r3, #0]
800aa00: 22ff movs r2, #255 ; 0xff
800aa02: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_READY ;
800aa04: 68fb ldr r3, [r7, #12]
800aa06: 2201 movs r2, #1
800aa08: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800aa0a: 68fb ldr r3, [r7, #12]
800aa0c: 2200 movs r2, #0
800aa0e: 771a strb r2, [r3, #28]
return HAL_OK;
800aa10: 2300 movs r3, #0
}
}
800aa12: 4618 mov r0, r3
800aa14: 371c adds r7, #28
800aa16: 46bd mov sp, r7
800aa18: bd90 pop {r4, r7, pc}
800aa1a: bf00 nop
800aa1c: 00ffff3f .word 0x00ffff3f
0800aa20 <HAL_RTC_SetAlarm>:
* @arg FORMAT_BIN: Binary data format
* @arg FORMAT_BCD: BCD data format
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RTC_SetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format)
{
800aa20: b590 push {r4, r7, lr}
800aa22: b089 sub sp, #36 ; 0x24
800aa24: af00 add r7, sp, #0
800aa26: 60f8 str r0, [r7, #12]
800aa28: 60b9 str r1, [r7, #8]
800aa2a: 607a str r2, [r7, #4]
uint32_t tickstart = 0;
800aa2c: 2300 movs r3, #0
800aa2e: 61bb str r3, [r7, #24]
uint32_t tmpreg = 0, subsecondtmpreg = 0;
800aa30: 2300 movs r3, #0
800aa32: 61fb str r3, [r7, #28]
800aa34: 2300 movs r3, #0
800aa36: 617b str r3, [r7, #20]
assert_param(IS_RTC_ALARM_DATE_WEEKDAY_SEL(sAlarm->AlarmDateWeekDaySel));
assert_param(IS_RTC_ALARM_SUB_SECOND_VALUE(sAlarm->AlarmTime.SubSeconds));
assert_param(IS_RTC_ALARM_SUB_SECOND_MASK(sAlarm->AlarmSubSecondMask));
/* Process Locked */
__HAL_LOCK(hrtc);
800aa38: 68fb ldr r3, [r7, #12]
800aa3a: 7f1b ldrb r3, [r3, #28]
800aa3c: 2b01 cmp r3, #1
800aa3e: d101 bne.n 800aa44 <HAL_RTC_SetAlarm+0x24>
800aa40: 2302 movs r3, #2
800aa42: e101 b.n 800ac48 <HAL_RTC_SetAlarm+0x228>
800aa44: 68fb ldr r3, [r7, #12]
800aa46: 2201 movs r2, #1
800aa48: 771a strb r2, [r3, #28]
hrtc->State = HAL_RTC_STATE_BUSY;
800aa4a: 68fb ldr r3, [r7, #12]
800aa4c: 2202 movs r2, #2
800aa4e: 775a strb r2, [r3, #29]
if(Format == RTC_FORMAT_BIN)
800aa50: 687b ldr r3, [r7, #4]
800aa52: 2b00 cmp r3, #0
800aa54: d137 bne.n 800aac6 <HAL_RTC_SetAlarm+0xa6>
{
if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
800aa56: 68fb ldr r3, [r7, #12]
800aa58: 681b ldr r3, [r3, #0]
800aa5a: 689b ldr r3, [r3, #8]
800aa5c: f003 0340 and.w r3, r3, #64 ; 0x40
800aa60: 2b00 cmp r3, #0
800aa62: d102 bne.n 800aa6a <HAL_RTC_SetAlarm+0x4a>
assert_param(IS_RTC_HOUR12(sAlarm->AlarmTime.Hours));
assert_param(IS_RTC_HOURFORMAT12(sAlarm->AlarmTime.TimeFormat));
}
else
{
sAlarm->AlarmTime.TimeFormat = 0x00;
800aa64: 68bb ldr r3, [r7, #8]
800aa66: 2200 movs r2, #0
800aa68: 731a strb r2, [r3, #12]
else
{
assert_param(IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(sAlarm->AlarmDateWeekDay));
}
tmpreg = (((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Hours) << 16) | \
800aa6a: 68bb ldr r3, [r7, #8]
800aa6c: 781b ldrb r3, [r3, #0]
800aa6e: 4618 mov r0, r3
800aa70: f000 f942 bl 800acf8 <RTC_ByteToBcd2>
800aa74: 4603 mov r3, r0
800aa76: 041c lsls r4, r3, #16
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Minutes) << 8) | \
800aa78: 68bb ldr r3, [r7, #8]
800aa7a: 785b ldrb r3, [r3, #1]
800aa7c: 4618 mov r0, r3
800aa7e: f000 f93b bl 800acf8 <RTC_ByteToBcd2>
800aa82: 4603 mov r3, r0
800aa84: 021b lsls r3, r3, #8
tmpreg = (((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Hours) << 16) | \
800aa86: 431c orrs r4, r3
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Seconds)) | \
800aa88: 68bb ldr r3, [r7, #8]
800aa8a: 789b ldrb r3, [r3, #2]
800aa8c: 4618 mov r0, r3
800aa8e: f000 f933 bl 800acf8 <RTC_ByteToBcd2>
800aa92: 4603 mov r3, r0
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Minutes) << 8) | \
800aa94: ea44 0203 orr.w r2, r4, r3
((uint32_t)(sAlarm->AlarmTime.TimeFormat) << 16) | \
800aa98: 68bb ldr r3, [r7, #8]
800aa9a: 7b1b ldrb r3, [r3, #12]
800aa9c: 041b lsls r3, r3, #16
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Seconds)) | \
800aa9e: ea42 0403 orr.w r4, r2, r3
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmDateWeekDay) << 24) | \
800aaa2: 68bb ldr r3, [r7, #8]
800aaa4: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
800aaa8: 4618 mov r0, r3
800aaaa: f000 f925 bl 800acf8 <RTC_ByteToBcd2>
800aaae: 4603 mov r3, r0
800aab0: 061b lsls r3, r3, #24
((uint32_t)(sAlarm->AlarmTime.TimeFormat) << 16) | \
800aab2: ea44 0203 orr.w r2, r4, r3
((uint32_t)sAlarm->AlarmDateWeekDaySel) | \
800aab6: 68bb ldr r3, [r7, #8]
800aab8: 6a1b ldr r3, [r3, #32]
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmDateWeekDay) << 24) | \
800aaba: 431a orrs r2, r3
((uint32_t)sAlarm->AlarmMask));
800aabc: 68bb ldr r3, [r7, #8]
800aabe: 699b ldr r3, [r3, #24]
tmpreg = (((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Hours) << 16) | \
800aac0: 4313 orrs r3, r2
800aac2: 61fb str r3, [r7, #28]
800aac4: e023 b.n 800ab0e <HAL_RTC_SetAlarm+0xee>
}
else
{
if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
800aac6: 68fb ldr r3, [r7, #12]
800aac8: 681b ldr r3, [r3, #0]
800aaca: 689b ldr r3, [r3, #8]
800aacc: f003 0340 and.w r3, r3, #64 ; 0x40
800aad0: 2b00 cmp r3, #0
800aad2: d102 bne.n 800aada <HAL_RTC_SetAlarm+0xba>
assert_param(IS_RTC_HOUR12(RTC_Bcd2ToByte(sAlarm->AlarmTime.Hours)));
assert_param(IS_RTC_HOURFORMAT12(sAlarm->AlarmTime.TimeFormat));
}
else
{
sAlarm->AlarmTime.TimeFormat = 0x00;
800aad4: 68bb ldr r3, [r7, #8]
800aad6: 2200 movs r2, #0
800aad8: 731a strb r2, [r3, #12]
else
{
assert_param(IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(RTC_Bcd2ToByte(sAlarm->AlarmDateWeekDay)));
}
tmpreg = (((uint32_t)(sAlarm->AlarmTime.Hours) << 16) | \
800aada: 68bb ldr r3, [r7, #8]
800aadc: 781b ldrb r3, [r3, #0]
800aade: 041a lsls r2, r3, #16
((uint32_t)(sAlarm->AlarmTime.Minutes) << 8) | \
800aae0: 68bb ldr r3, [r7, #8]
800aae2: 785b ldrb r3, [r3, #1]
800aae4: 021b lsls r3, r3, #8
tmpreg = (((uint32_t)(sAlarm->AlarmTime.Hours) << 16) | \
800aae6: 4313 orrs r3, r2
((uint32_t) sAlarm->AlarmTime.Seconds) | \
800aae8: 68ba ldr r2, [r7, #8]
800aaea: 7892 ldrb r2, [r2, #2]
((uint32_t)(sAlarm->AlarmTime.Minutes) << 8) | \
800aaec: 431a orrs r2, r3
((uint32_t)(sAlarm->AlarmTime.TimeFormat) << 16) | \
800aaee: 68bb ldr r3, [r7, #8]
800aaf0: 7b1b ldrb r3, [r3, #12]
800aaf2: 041b lsls r3, r3, #16
((uint32_t) sAlarm->AlarmTime.Seconds) | \
800aaf4: 431a orrs r2, r3
((uint32_t)(sAlarm->AlarmDateWeekDay) << 24) | \
800aaf6: 68bb ldr r3, [r7, #8]
800aaf8: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
800aafc: 061b lsls r3, r3, #24
((uint32_t)(sAlarm->AlarmTime.TimeFormat) << 16) | \
800aafe: 431a orrs r2, r3
((uint32_t)sAlarm->AlarmDateWeekDaySel) | \
800ab00: 68bb ldr r3, [r7, #8]
800ab02: 6a1b ldr r3, [r3, #32]
((uint32_t)(sAlarm->AlarmDateWeekDay) << 24) | \
800ab04: 431a orrs r2, r3
((uint32_t)sAlarm->AlarmMask));
800ab06: 68bb ldr r3, [r7, #8]
800ab08: 699b ldr r3, [r3, #24]
tmpreg = (((uint32_t)(sAlarm->AlarmTime.Hours) << 16) | \
800ab0a: 4313 orrs r3, r2
800ab0c: 61fb str r3, [r7, #28]
}
/* Configure the Alarm A or Alarm B Sub Second registers */
subsecondtmpreg = (uint32_t)((uint32_t)(sAlarm->AlarmTime.SubSeconds) | (uint32_t)(sAlarm->AlarmSubSecondMask));
800ab0e: 68bb ldr r3, [r7, #8]
800ab10: 685a ldr r2, [r3, #4]
800ab12: 68bb ldr r3, [r7, #8]
800ab14: 69db ldr r3, [r3, #28]
800ab16: 4313 orrs r3, r2
800ab18: 617b str r3, [r7, #20]
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800ab1a: 68fb ldr r3, [r7, #12]
800ab1c: 681b ldr r3, [r3, #0]
800ab1e: 22ca movs r2, #202 ; 0xca
800ab20: 625a str r2, [r3, #36] ; 0x24
800ab22: 68fb ldr r3, [r7, #12]
800ab24: 681b ldr r3, [r3, #0]
800ab26: 2253 movs r2, #83 ; 0x53
800ab28: 625a str r2, [r3, #36] ; 0x24
/* Configure the Alarm register */
if(sAlarm->Alarm == RTC_ALARM_A)
800ab2a: 68bb ldr r3, [r7, #8]
800ab2c: 6a9b ldr r3, [r3, #40] ; 0x28
800ab2e: f5b3 7f80 cmp.w r3, #256 ; 0x100
800ab32: d13f bne.n 800abb4 <HAL_RTC_SetAlarm+0x194>
{
/* Disable the Alarm A interrupt */
__HAL_RTC_ALARMA_DISABLE(hrtc);
800ab34: 68fb ldr r3, [r7, #12]
800ab36: 681b ldr r3, [r3, #0]
800ab38: 689a ldr r2, [r3, #8]
800ab3a: 68fb ldr r3, [r7, #12]
800ab3c: 681b ldr r3, [r3, #0]
800ab3e: f422 7280 bic.w r2, r2, #256 ; 0x100
800ab42: 609a str r2, [r3, #8]
/* In case of interrupt mode is used, the interrupt source must disabled */
__HAL_RTC_ALARM_DISABLE_IT(hrtc, RTC_IT_ALRA);
800ab44: 68fb ldr r3, [r7, #12]
800ab46: 681b ldr r3, [r3, #0]
800ab48: 689a ldr r2, [r3, #8]
800ab4a: 68fb ldr r3, [r7, #12]
800ab4c: 681b ldr r3, [r3, #0]
800ab4e: f422 5280 bic.w r2, r2, #4096 ; 0x1000
800ab52: 609a str r2, [r3, #8]
/* Get tick */
tickstart = HAL_GetTick();
800ab54: f7fa fbe4 bl 8005320 <HAL_GetTick>
800ab58: 61b8 str r0, [r7, #24]
/* Wait till RTC ALRAWF flag is set and if Time out is reached exit */
while(__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAWF) == RESET)
800ab5a: e013 b.n 800ab84 <HAL_RTC_SetAlarm+0x164>
{
if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
800ab5c: f7fa fbe0 bl 8005320 <HAL_GetTick>
800ab60: 4602 mov r2, r0
800ab62: 69bb ldr r3, [r7, #24]
800ab64: 1ad3 subs r3, r2, r3
800ab66: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800ab6a: d90b bls.n 800ab84 <HAL_RTC_SetAlarm+0x164>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800ab6c: 68fb ldr r3, [r7, #12]
800ab6e: 681b ldr r3, [r3, #0]
800ab70: 22ff movs r2, #255 ; 0xff
800ab72: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_TIMEOUT;
800ab74: 68fb ldr r3, [r7, #12]
800ab76: 2203 movs r2, #3
800ab78: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800ab7a: 68fb ldr r3, [r7, #12]
800ab7c: 2200 movs r2, #0
800ab7e: 771a strb r2, [r3, #28]
return HAL_TIMEOUT;
800ab80: 2303 movs r3, #3
800ab82: e061 b.n 800ac48 <HAL_RTC_SetAlarm+0x228>
while(__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAWF) == RESET)
800ab84: 68fb ldr r3, [r7, #12]
800ab86: 681b ldr r3, [r3, #0]
800ab88: 68db ldr r3, [r3, #12]
800ab8a: f003 0301 and.w r3, r3, #1
800ab8e: 2b00 cmp r3, #0
800ab90: d0e4 beq.n 800ab5c <HAL_RTC_SetAlarm+0x13c>
}
}
hrtc->Instance->ALRMAR = (uint32_t)tmpreg;
800ab92: 68fb ldr r3, [r7, #12]
800ab94: 681b ldr r3, [r3, #0]
800ab96: 69fa ldr r2, [r7, #28]
800ab98: 61da str r2, [r3, #28]
/* Configure the Alarm A Sub Second register */
hrtc->Instance->ALRMASSR = subsecondtmpreg;
800ab9a: 68fb ldr r3, [r7, #12]
800ab9c: 681b ldr r3, [r3, #0]
800ab9e: 697a ldr r2, [r7, #20]
800aba0: 645a str r2, [r3, #68] ; 0x44
/* Configure the Alarm state: Enable Alarm */
__HAL_RTC_ALARMA_ENABLE(hrtc);
800aba2: 68fb ldr r3, [r7, #12]
800aba4: 681b ldr r3, [r3, #0]
800aba6: 689a ldr r2, [r3, #8]
800aba8: 68fb ldr r3, [r7, #12]
800abaa: 681b ldr r3, [r3, #0]
800abac: f442 7280 orr.w r2, r2, #256 ; 0x100
800abb0: 609a str r2, [r3, #8]
800abb2: e03e b.n 800ac32 <HAL_RTC_SetAlarm+0x212>
}
else
{
/* Disable the Alarm B interrupt */
__HAL_RTC_ALARMB_DISABLE(hrtc);
800abb4: 68fb ldr r3, [r7, #12]
800abb6: 681b ldr r3, [r3, #0]
800abb8: 689a ldr r2, [r3, #8]
800abba: 68fb ldr r3, [r7, #12]
800abbc: 681b ldr r3, [r3, #0]
800abbe: f422 7200 bic.w r2, r2, #512 ; 0x200
800abc2: 609a str r2, [r3, #8]
/* In case of interrupt mode is used, the interrupt source must disabled */
__HAL_RTC_ALARM_DISABLE_IT(hrtc, RTC_IT_ALRB);
800abc4: 68fb ldr r3, [r7, #12]
800abc6: 681b ldr r3, [r3, #0]
800abc8: 689a ldr r2, [r3, #8]
800abca: 68fb ldr r3, [r7, #12]
800abcc: 681b ldr r3, [r3, #0]
800abce: f422 5200 bic.w r2, r2, #8192 ; 0x2000
800abd2: 609a str r2, [r3, #8]
/* Get tick */
tickstart = HAL_GetTick();
800abd4: f7fa fba4 bl 8005320 <HAL_GetTick>
800abd8: 61b8 str r0, [r7, #24]
/* Wait till RTC ALRBWF flag is set and if Time out is reached exit */
while(__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBWF) == RESET)
800abda: e013 b.n 800ac04 <HAL_RTC_SetAlarm+0x1e4>
{
if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
800abdc: f7fa fba0 bl 8005320 <HAL_GetTick>
800abe0: 4602 mov r2, r0
800abe2: 69bb ldr r3, [r7, #24]
800abe4: 1ad3 subs r3, r2, r3
800abe6: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800abea: d90b bls.n 800ac04 <HAL_RTC_SetAlarm+0x1e4>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800abec: 68fb ldr r3, [r7, #12]
800abee: 681b ldr r3, [r3, #0]
800abf0: 22ff movs r2, #255 ; 0xff
800abf2: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_TIMEOUT;
800abf4: 68fb ldr r3, [r7, #12]
800abf6: 2203 movs r2, #3
800abf8: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800abfa: 68fb ldr r3, [r7, #12]
800abfc: 2200 movs r2, #0
800abfe: 771a strb r2, [r3, #28]
return HAL_TIMEOUT;
800ac00: 2303 movs r3, #3
800ac02: e021 b.n 800ac48 <HAL_RTC_SetAlarm+0x228>
while(__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBWF) == RESET)
800ac04: 68fb ldr r3, [r7, #12]
800ac06: 681b ldr r3, [r3, #0]
800ac08: 68db ldr r3, [r3, #12]
800ac0a: f003 0302 and.w r3, r3, #2
800ac0e: 2b00 cmp r3, #0
800ac10: d0e4 beq.n 800abdc <HAL_RTC_SetAlarm+0x1bc>
}
}
hrtc->Instance->ALRMBR = (uint32_t)tmpreg;
800ac12: 68fb ldr r3, [r7, #12]
800ac14: 681b ldr r3, [r3, #0]
800ac16: 69fa ldr r2, [r7, #28]
800ac18: 621a str r2, [r3, #32]
/* Configure the Alarm B Sub Second register */
hrtc->Instance->ALRMBSSR = subsecondtmpreg;
800ac1a: 68fb ldr r3, [r7, #12]
800ac1c: 681b ldr r3, [r3, #0]
800ac1e: 697a ldr r2, [r7, #20]
800ac20: 649a str r2, [r3, #72] ; 0x48
/* Configure the Alarm state: Enable Alarm */
__HAL_RTC_ALARMB_ENABLE(hrtc);
800ac22: 68fb ldr r3, [r7, #12]
800ac24: 681b ldr r3, [r3, #0]
800ac26: 689a ldr r2, [r3, #8]
800ac28: 68fb ldr r3, [r7, #12]
800ac2a: 681b ldr r3, [r3, #0]
800ac2c: f442 7200 orr.w r2, r2, #512 ; 0x200
800ac30: 609a str r2, [r3, #8]
}
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800ac32: 68fb ldr r3, [r7, #12]
800ac34: 681b ldr r3, [r3, #0]
800ac36: 22ff movs r2, #255 ; 0xff
800ac38: 625a str r2, [r3, #36] ; 0x24
/* Change RTC state */
hrtc->State = HAL_RTC_STATE_READY;
800ac3a: 68fb ldr r3, [r7, #12]
800ac3c: 2201 movs r2, #1
800ac3e: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800ac40: 68fb ldr r3, [r7, #12]
800ac42: 2200 movs r2, #0
800ac44: 771a strb r2, [r3, #28]
return HAL_OK;
800ac46: 2300 movs r3, #0
}
800ac48: 4618 mov r0, r3
800ac4a: 3724 adds r7, #36 ; 0x24
800ac4c: 46bd mov sp, r7
800ac4e: bd90 pop {r4, r7, pc}
0800ac50 <HAL_RTC_WaitForSynchro>:
* @param hrtc pointer to a RTC_HandleTypeDef structure that contains
* the configuration information for RTC.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef* hrtc)
{
800ac50: b580 push {r7, lr}
800ac52: b084 sub sp, #16
800ac54: af00 add r7, sp, #0
800ac56: 6078 str r0, [r7, #4]
uint32_t tickstart = 0;
800ac58: 2300 movs r3, #0
800ac5a: 60fb str r3, [r7, #12]
/* Clear RSF flag */
hrtc->Instance->ISR &= (uint32_t)RTC_RSF_MASK;
800ac5c: 687b ldr r3, [r7, #4]
800ac5e: 681b ldr r3, [r3, #0]
800ac60: 68da ldr r2, [r3, #12]
800ac62: 687b ldr r3, [r7, #4]
800ac64: 681b ldr r3, [r3, #0]
800ac66: f022 02a0 bic.w r2, r2, #160 ; 0xa0
800ac6a: 60da str r2, [r3, #12]
/* Get tick */
tickstart = HAL_GetTick();
800ac6c: f7fa fb58 bl 8005320 <HAL_GetTick>
800ac70: 60f8 str r0, [r7, #12]
/* Wait the registers to be synchronised */
while((hrtc->Instance->ISR & RTC_ISR_RSF) == (uint32_t)RESET)
800ac72: e009 b.n 800ac88 <HAL_RTC_WaitForSynchro+0x38>
{
if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
800ac74: f7fa fb54 bl 8005320 <HAL_GetTick>
800ac78: 4602 mov r2, r0
800ac7a: 68fb ldr r3, [r7, #12]
800ac7c: 1ad3 subs r3, r2, r3
800ac7e: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800ac82: d901 bls.n 800ac88 <HAL_RTC_WaitForSynchro+0x38>
{
return HAL_TIMEOUT;
800ac84: 2303 movs r3, #3
800ac86: e007 b.n 800ac98 <HAL_RTC_WaitForSynchro+0x48>
while((hrtc->Instance->ISR & RTC_ISR_RSF) == (uint32_t)RESET)
800ac88: 687b ldr r3, [r7, #4]
800ac8a: 681b ldr r3, [r3, #0]
800ac8c: 68db ldr r3, [r3, #12]
800ac8e: f003 0320 and.w r3, r3, #32
800ac92: 2b00 cmp r3, #0
800ac94: d0ee beq.n 800ac74 <HAL_RTC_WaitForSynchro+0x24>
}
}
return HAL_OK;
800ac96: 2300 movs r3, #0
}
800ac98: 4618 mov r0, r3
800ac9a: 3710 adds r7, #16
800ac9c: 46bd mov sp, r7
800ac9e: bd80 pop {r7, pc}
0800aca0 <RTC_EnterInitMode>:
* @param hrtc pointer to a RTC_HandleTypeDef structure that contains
* the configuration information for RTC.
* @retval HAL status
*/
HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef* hrtc)
{
800aca0: b580 push {r7, lr}
800aca2: b084 sub sp, #16
800aca4: af00 add r7, sp, #0
800aca6: 6078 str r0, [r7, #4]
uint32_t tickstart = 0;
800aca8: 2300 movs r3, #0
800acaa: 60fb str r3, [r7, #12]
/* Check if the Initialization mode is set */
if((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
800acac: 687b ldr r3, [r7, #4]
800acae: 681b ldr r3, [r3, #0]
800acb0: 68db ldr r3, [r3, #12]
800acb2: f003 0340 and.w r3, r3, #64 ; 0x40
800acb6: 2b00 cmp r3, #0
800acb8: d119 bne.n 800acee <RTC_EnterInitMode+0x4e>
{
/* Set the Initialization mode */
hrtc->Instance->ISR = (uint32_t)RTC_INIT_MASK;
800acba: 687b ldr r3, [r7, #4]
800acbc: 681b ldr r3, [r3, #0]
800acbe: f04f 32ff mov.w r2, #4294967295
800acc2: 60da str r2, [r3, #12]
/* Get tick */
tickstart = HAL_GetTick();
800acc4: f7fa fb2c bl 8005320 <HAL_GetTick>
800acc8: 60f8 str r0, [r7, #12]
/* Wait till RTC is in INIT state and if Time out is reached exit */
while((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
800acca: e009 b.n 800ace0 <RTC_EnterInitMode+0x40>
{
if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
800accc: f7fa fb28 bl 8005320 <HAL_GetTick>
800acd0: 4602 mov r2, r0
800acd2: 68fb ldr r3, [r7, #12]
800acd4: 1ad3 subs r3, r2, r3
800acd6: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800acda: d901 bls.n 800ace0 <RTC_EnterInitMode+0x40>
{
return HAL_TIMEOUT;
800acdc: 2303 movs r3, #3
800acde: e007 b.n 800acf0 <RTC_EnterInitMode+0x50>
while((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
800ace0: 687b ldr r3, [r7, #4]
800ace2: 681b ldr r3, [r3, #0]
800ace4: 68db ldr r3, [r3, #12]
800ace6: f003 0340 and.w r3, r3, #64 ; 0x40
800acea: 2b00 cmp r3, #0
800acec: d0ee beq.n 800accc <RTC_EnterInitMode+0x2c>
}
}
}
return HAL_OK;
800acee: 2300 movs r3, #0
}
800acf0: 4618 mov r0, r3
800acf2: 3710 adds r7, #16
800acf4: 46bd mov sp, r7
800acf6: bd80 pop {r7, pc}
0800acf8 <RTC_ByteToBcd2>:
* @brief Converts a 2 digit decimal to BCD format.
* @param Value Byte to be converted
* @retval Converted byte
*/
uint8_t RTC_ByteToBcd2(uint8_t Value)
{
800acf8: b480 push {r7}
800acfa: b085 sub sp, #20
800acfc: af00 add r7, sp, #0
800acfe: 4603 mov r3, r0
800ad00: 71fb strb r3, [r7, #7]
uint32_t bcdhigh = 0;
800ad02: 2300 movs r3, #0
800ad04: 60fb str r3, [r7, #12]
while(Value >= 10)
800ad06: e005 b.n 800ad14 <RTC_ByteToBcd2+0x1c>
{
bcdhigh++;
800ad08: 68fb ldr r3, [r7, #12]
800ad0a: 3301 adds r3, #1
800ad0c: 60fb str r3, [r7, #12]
Value -= 10;
800ad0e: 79fb ldrb r3, [r7, #7]
800ad10: 3b0a subs r3, #10
800ad12: 71fb strb r3, [r7, #7]
while(Value >= 10)
800ad14: 79fb ldrb r3, [r7, #7]
800ad16: 2b09 cmp r3, #9
800ad18: d8f6 bhi.n 800ad08 <RTC_ByteToBcd2+0x10>
}
return ((uint8_t)(bcdhigh << 4) | Value);
800ad1a: 68fb ldr r3, [r7, #12]
800ad1c: b2db uxtb r3, r3
800ad1e: 011b lsls r3, r3, #4
800ad20: b2da uxtb r2, r3
800ad22: 79fb ldrb r3, [r7, #7]
800ad24: 4313 orrs r3, r2
800ad26: b2db uxtb r3, r3
}
800ad28: 4618 mov r0, r3
800ad2a: 3714 adds r7, #20
800ad2c: 46bd mov sp, r7
800ad2e: f85d 7b04 ldr.w r7, [sp], #4
800ad32: 4770 bx lr
0800ad34 <HAL_RTCEx_SetTimeStamp>:
* @arg RTC_TIMESTAMPPIN_PI8: PI8 is selected as RTC TimeStamp Pin.
* @arg RTC_TIMESTAMPPIN_PC1: PC1 is selected as RTC TimeStamp Pin.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin)
{
800ad34: b480 push {r7}
800ad36: b087 sub sp, #28
800ad38: af00 add r7, sp, #0
800ad3a: 60f8 str r0, [r7, #12]
800ad3c: 60b9 str r1, [r7, #8]
800ad3e: 607a str r2, [r7, #4]
uint32_t tmpreg = 0;
800ad40: 2300 movs r3, #0
800ad42: 617b str r3, [r7, #20]
/* Check the parameters */
assert_param(IS_TIMESTAMP_EDGE(TimeStampEdge));
assert_param(IS_RTC_TIMESTAMP_PIN(RTC_TimeStampPin));
/* Process Locked */
__HAL_LOCK(hrtc);
800ad44: 68fb ldr r3, [r7, #12]
800ad46: 7f1b ldrb r3, [r3, #28]
800ad48: 2b01 cmp r3, #1
800ad4a: d101 bne.n 800ad50 <HAL_RTCEx_SetTimeStamp+0x1c>
800ad4c: 2302 movs r3, #2
800ad4e: e03e b.n 800adce <HAL_RTCEx_SetTimeStamp+0x9a>
800ad50: 68fb ldr r3, [r7, #12]
800ad52: 2201 movs r2, #1
800ad54: 771a strb r2, [r3, #28]
hrtc->State = HAL_RTC_STATE_BUSY;
800ad56: 68fb ldr r3, [r7, #12]
800ad58: 2202 movs r2, #2
800ad5a: 775a strb r2, [r3, #29]
/* Get the RTC_CR register and clear the bits to be configured */
tmpreg = (uint32_t)(hrtc->Instance->CR & (uint32_t)~(RTC_CR_TSEDGE | RTC_CR_TSE));
800ad5c: 68fb ldr r3, [r7, #12]
800ad5e: 681b ldr r3, [r3, #0]
800ad60: 689a ldr r2, [r3, #8]
800ad62: 4b1e ldr r3, [pc, #120] ; (800addc <HAL_RTCEx_SetTimeStamp+0xa8>)
800ad64: 4013 ands r3, r2
800ad66: 617b str r3, [r7, #20]
tmpreg|= TimeStampEdge;
800ad68: 697a ldr r2, [r7, #20]
800ad6a: 68bb ldr r3, [r7, #8]
800ad6c: 4313 orrs r3, r2
800ad6e: 617b str r3, [r7, #20]
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800ad70: 68fb ldr r3, [r7, #12]
800ad72: 681b ldr r3, [r3, #0]
800ad74: 22ca movs r2, #202 ; 0xca
800ad76: 625a str r2, [r3, #36] ; 0x24
800ad78: 68fb ldr r3, [r7, #12]
800ad7a: 681b ldr r3, [r3, #0]
800ad7c: 2253 movs r2, #83 ; 0x53
800ad7e: 625a str r2, [r3, #36] ; 0x24
hrtc->Instance->OR &= (uint32_t)~RTC_OR_TSINSEL;
800ad80: 68fb ldr r3, [r7, #12]
800ad82: 681b ldr r3, [r3, #0]
800ad84: 6cda ldr r2, [r3, #76] ; 0x4c
800ad86: 68fb ldr r3, [r7, #12]
800ad88: 681b ldr r3, [r3, #0]
800ad8a: f022 0206 bic.w r2, r2, #6
800ad8e: 64da str r2, [r3, #76] ; 0x4c
hrtc->Instance->OR |= (uint32_t)(RTC_TimeStampPin);
800ad90: 68fb ldr r3, [r7, #12]
800ad92: 681b ldr r3, [r3, #0]
800ad94: 6cd9 ldr r1, [r3, #76] ; 0x4c
800ad96: 68fb ldr r3, [r7, #12]
800ad98: 681b ldr r3, [r3, #0]
800ad9a: 687a ldr r2, [r7, #4]
800ad9c: 430a orrs r2, r1
800ad9e: 64da str r2, [r3, #76] ; 0x4c
/* Configure the Time Stamp TSEDGE and Enable bits */
hrtc->Instance->CR = (uint32_t)tmpreg;
800ada0: 68fb ldr r3, [r7, #12]
800ada2: 681b ldr r3, [r3, #0]
800ada4: 697a ldr r2, [r7, #20]
800ada6: 609a str r2, [r3, #8]
__HAL_RTC_TIMESTAMP_ENABLE(hrtc);
800ada8: 68fb ldr r3, [r7, #12]
800adaa: 681b ldr r3, [r3, #0]
800adac: 689a ldr r2, [r3, #8]
800adae: 68fb ldr r3, [r7, #12]
800adb0: 681b ldr r3, [r3, #0]
800adb2: f442 6200 orr.w r2, r2, #2048 ; 0x800
800adb6: 609a str r2, [r3, #8]
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800adb8: 68fb ldr r3, [r7, #12]
800adba: 681b ldr r3, [r3, #0]
800adbc: 22ff movs r2, #255 ; 0xff
800adbe: 625a str r2, [r3, #36] ; 0x24
/* Change RTC state */
hrtc->State = HAL_RTC_STATE_READY;
800adc0: 68fb ldr r3, [r7, #12]
800adc2: 2201 movs r2, #1
800adc4: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800adc6: 68fb ldr r3, [r7, #12]
800adc8: 2200 movs r2, #0
800adca: 771a strb r2, [r3, #28]
return HAL_OK;
800adcc: 2300 movs r3, #0
}
800adce: 4618 mov r0, r3
800add0: 371c adds r7, #28
800add2: 46bd mov sp, r7
800add4: f85d 7b04 ldr.w r7, [sp], #4
800add8: 4770 bx lr
800adda: bf00 nop
800addc: fffff7f7 .word 0xfffff7f7
0800ade0 <HAL_SDRAM_Init>:
* the configuration information for SDRAM module.
* @param Timing Pointer to SDRAM control timing structure
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_Init(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_TimingTypeDef *Timing)
{
800ade0: b580 push {r7, lr}
800ade2: b082 sub sp, #8
800ade4: af00 add r7, sp, #0
800ade6: 6078 str r0, [r7, #4]
800ade8: 6039 str r1, [r7, #0]
/* Check the SDRAM handle parameter */
if(hsdram == NULL)
800adea: 687b ldr r3, [r7, #4]
800adec: 2b00 cmp r3, #0
800adee: d101 bne.n 800adf4 <HAL_SDRAM_Init+0x14>
{
return HAL_ERROR;
800adf0: 2301 movs r3, #1
800adf2: e025 b.n 800ae40 <HAL_SDRAM_Init+0x60>
}
if(hsdram->State == HAL_SDRAM_STATE_RESET)
800adf4: 687b ldr r3, [r7, #4]
800adf6: f893 302c ldrb.w r3, [r3, #44] ; 0x2c
800adfa: b2db uxtb r3, r3
800adfc: 2b00 cmp r3, #0
800adfe: d106 bne.n 800ae0e <HAL_SDRAM_Init+0x2e>
{
/* Allocate lock resource and initialize it */
hsdram->Lock = HAL_UNLOCKED;
800ae00: 687b ldr r3, [r7, #4]
800ae02: 2200 movs r2, #0
800ae04: f883 202d strb.w r2, [r3, #45] ; 0x2d
/* Init the low level hardware */
hsdram->MspInitCallback(hsdram);
#else
/* Initialize the low level hardware (MSP) */
HAL_SDRAM_MspInit(hsdram);
800ae08: 6878 ldr r0, [r7, #4]
800ae0a: f7fa f8e9 bl 8004fe0 <HAL_SDRAM_MspInit>
#endif
}
/* Initialize the SDRAM controller state */
hsdram->State = HAL_SDRAM_STATE_BUSY;
800ae0e: 687b ldr r3, [r7, #4]
800ae10: 2202 movs r2, #2
800ae12: f883 202c strb.w r2, [r3, #44] ; 0x2c
/* Initialize SDRAM control Interface */
FMC_SDRAM_Init(hsdram->Instance, &(hsdram->Init));
800ae16: 687b ldr r3, [r7, #4]
800ae18: 681a ldr r2, [r3, #0]
800ae1a: 687b ldr r3, [r7, #4]
800ae1c: 3304 adds r3, #4
800ae1e: 4619 mov r1, r3
800ae20: 4610 mov r0, r2
800ae22: f001 fe61 bl 800cae8 <FMC_SDRAM_Init>
/* Initialize SDRAM timing Interface */
FMC_SDRAM_Timing_Init(hsdram->Instance, Timing, hsdram->Init.SDBank);
800ae26: 687b ldr r3, [r7, #4]
800ae28: 6818 ldr r0, [r3, #0]
800ae2a: 687b ldr r3, [r7, #4]
800ae2c: 685b ldr r3, [r3, #4]
800ae2e: 461a mov r2, r3
800ae30: 6839 ldr r1, [r7, #0]
800ae32: f001 fecb bl 800cbcc <FMC_SDRAM_Timing_Init>
/* Update the SDRAM controller state */
hsdram->State = HAL_SDRAM_STATE_READY;
800ae36: 687b ldr r3, [r7, #4]
800ae38: 2201 movs r2, #1
800ae3a: f883 202c strb.w r2, [r3, #44] ; 0x2c
return HAL_OK;
800ae3e: 2300 movs r3, #0
}
800ae40: 4618 mov r0, r3
800ae42: 3708 adds r7, #8
800ae44: 46bd mov sp, r7
800ae46: bd80 pop {r7, pc}
0800ae48 <HAL_SDRAM_SendCommand>:
* @param Command SDRAM command structure
* @param Timeout Timeout duration
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
{
800ae48: b580 push {r7, lr}
800ae4a: b084 sub sp, #16
800ae4c: af00 add r7, sp, #0
800ae4e: 60f8 str r0, [r7, #12]
800ae50: 60b9 str r1, [r7, #8]
800ae52: 607a str r2, [r7, #4]
/* Check the SDRAM controller state */
if(hsdram->State == HAL_SDRAM_STATE_BUSY)
800ae54: 68fb ldr r3, [r7, #12]
800ae56: f893 302c ldrb.w r3, [r3, #44] ; 0x2c
800ae5a: b2db uxtb r3, r3
800ae5c: 2b02 cmp r3, #2
800ae5e: d101 bne.n 800ae64 <HAL_SDRAM_SendCommand+0x1c>
{
return HAL_BUSY;
800ae60: 2302 movs r3, #2
800ae62: e018 b.n 800ae96 <HAL_SDRAM_SendCommand+0x4e>
}
/* Update the SDRAM state */
hsdram->State = HAL_SDRAM_STATE_BUSY;
800ae64: 68fb ldr r3, [r7, #12]
800ae66: 2202 movs r2, #2
800ae68: f883 202c strb.w r2, [r3, #44] ; 0x2c
/* Send SDRAM command */
FMC_SDRAM_SendCommand(hsdram->Instance, Command, Timeout);
800ae6c: 68fb ldr r3, [r7, #12]
800ae6e: 681b ldr r3, [r3, #0]
800ae70: 687a ldr r2, [r7, #4]
800ae72: 68b9 ldr r1, [r7, #8]
800ae74: 4618 mov r0, r3
800ae76: f001 ff29 bl 800cccc <FMC_SDRAM_SendCommand>
/* Update the SDRAM controller state state */
if(Command->CommandMode == FMC_SDRAM_CMD_PALL)
800ae7a: 68bb ldr r3, [r7, #8]
800ae7c: 681b ldr r3, [r3, #0]
800ae7e: 2b02 cmp r3, #2
800ae80: d104 bne.n 800ae8c <HAL_SDRAM_SendCommand+0x44>
{
hsdram->State = HAL_SDRAM_STATE_PRECHARGED;
800ae82: 68fb ldr r3, [r7, #12]
800ae84: 2205 movs r2, #5
800ae86: f883 202c strb.w r2, [r3, #44] ; 0x2c
800ae8a: e003 b.n 800ae94 <HAL_SDRAM_SendCommand+0x4c>
}
else
{
hsdram->State = HAL_SDRAM_STATE_READY;
800ae8c: 68fb ldr r3, [r7, #12]
800ae8e: 2201 movs r2, #1
800ae90: f883 202c strb.w r2, [r3, #44] ; 0x2c
}
return HAL_OK;
800ae94: 2300 movs r3, #0
}
800ae96: 4618 mov r0, r3
800ae98: 3710 adds r7, #16
800ae9a: 46bd mov sp, r7
800ae9c: bd80 pop {r7, pc}
0800ae9e <HAL_SDRAM_ProgramRefreshRate>:
* the configuration information for SDRAM module.
* @param RefreshRate The SDRAM refresh rate value
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram, uint32_t RefreshRate)
{
800ae9e: b580 push {r7, lr}
800aea0: b082 sub sp, #8
800aea2: af00 add r7, sp, #0
800aea4: 6078 str r0, [r7, #4]
800aea6: 6039 str r1, [r7, #0]
/* Check the SDRAM controller state */
if(hsdram->State == HAL_SDRAM_STATE_BUSY)
800aea8: 687b ldr r3, [r7, #4]
800aeaa: f893 302c ldrb.w r3, [r3, #44] ; 0x2c
800aeae: b2db uxtb r3, r3
800aeb0: 2b02 cmp r3, #2
800aeb2: d101 bne.n 800aeb8 <HAL_SDRAM_ProgramRefreshRate+0x1a>
{
return HAL_BUSY;
800aeb4: 2302 movs r3, #2
800aeb6: e00e b.n 800aed6 <HAL_SDRAM_ProgramRefreshRate+0x38>
}
/* Update the SDRAM state */
hsdram->State = HAL_SDRAM_STATE_BUSY;
800aeb8: 687b ldr r3, [r7, #4]
800aeba: 2202 movs r2, #2
800aebc: f883 202c strb.w r2, [r3, #44] ; 0x2c
/* Program the refresh rate */
FMC_SDRAM_ProgramRefreshRate(hsdram->Instance ,RefreshRate);
800aec0: 687b ldr r3, [r7, #4]
800aec2: 681b ldr r3, [r3, #0]
800aec4: 6839 ldr r1, [r7, #0]
800aec6: 4618 mov r0, r3
800aec8: f001 ff21 bl 800cd0e <FMC_SDRAM_ProgramRefreshRate>
/* Update the SDRAM state */
hsdram->State = HAL_SDRAM_STATE_READY;
800aecc: 687b ldr r3, [r7, #4]
800aece: 2201 movs r2, #1
800aed0: f883 202c strb.w r2, [r3, #44] ; 0x2c
return HAL_OK;
800aed4: 2300 movs r3, #0
}
800aed6: 4618 mov r0, r3
800aed8: 3708 adds r7, #8
800aeda: 46bd mov sp, r7
800aedc: bd80 pop {r7, pc}
0800aede <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)
{
800aede: b580 push {r7, lr}
800aee0: b084 sub sp, #16
800aee2: af00 add r7, sp, #0
800aee4: 6078 str r0, [r7, #4]
uint32_t frxth;
/* Check the SPI handle allocation */
if (hspi == NULL)
800aee6: 687b ldr r3, [r7, #4]
800aee8: 2b00 cmp r3, #0
800aeea: d101 bne.n 800aef0 <HAL_SPI_Init+0x12>
{
return HAL_ERROR;
800aeec: 2301 movs r3, #1
800aeee: e084 b.n 800affa <HAL_SPI_Init+0x11c>
{
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;
800aef0: 687b ldr r3, [r7, #4]
800aef2: 2200 movs r2, #0
800aef4: 629a str r2, [r3, #40] ; 0x28
#endif /* USE_SPI_CRC */
if (hspi->State == HAL_SPI_STATE_RESET)
800aef6: 687b ldr r3, [r7, #4]
800aef8: f893 305d ldrb.w r3, [r3, #93] ; 0x5d
800aefc: b2db uxtb r3, r3
800aefe: 2b00 cmp r3, #0
800af00: d106 bne.n 800af10 <HAL_SPI_Init+0x32>
{
/* Allocate lock resource and initialize it */
hspi->Lock = HAL_UNLOCKED;
800af02: 687b ldr r3, [r7, #4]
800af04: 2200 movs r2, #0
800af06: 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);
800af0a: 6878 ldr r0, [r7, #4]
800af0c: f7f9 fdd4 bl 8004ab8 <HAL_SPI_MspInit>
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
}
hspi->State = HAL_SPI_STATE_BUSY;
800af10: 687b ldr r3, [r7, #4]
800af12: 2202 movs r2, #2
800af14: f883 205d strb.w r2, [r3, #93] ; 0x5d
/* Disable the selected SPI peripheral */
__HAL_SPI_DISABLE(hspi);
800af18: 687b ldr r3, [r7, #4]
800af1a: 681b ldr r3, [r3, #0]
800af1c: 681a ldr r2, [r3, #0]
800af1e: 687b ldr r3, [r7, #4]
800af20: 681b ldr r3, [r3, #0]
800af22: f022 0240 bic.w r2, r2, #64 ; 0x40
800af26: 601a str r2, [r3, #0]
/* Align by default the rs fifo threshold on the data size */
if (hspi->Init.DataSize > SPI_DATASIZE_8BIT)
800af28: 687b ldr r3, [r7, #4]
800af2a: 68db ldr r3, [r3, #12]
800af2c: f5b3 6fe0 cmp.w r3, #1792 ; 0x700
800af30: d902 bls.n 800af38 <HAL_SPI_Init+0x5a>
{
frxth = SPI_RXFIFO_THRESHOLD_HF;
800af32: 2300 movs r3, #0
800af34: 60fb str r3, [r7, #12]
800af36: e002 b.n 800af3e <HAL_SPI_Init+0x60>
}
else
{
frxth = SPI_RXFIFO_THRESHOLD_QF;
800af38: f44f 5380 mov.w r3, #4096 ; 0x1000
800af3c: 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))
800af3e: 687b ldr r3, [r7, #4]
800af40: 68db ldr r3, [r3, #12]
800af42: f5b3 6f70 cmp.w r3, #3840 ; 0xf00
800af46: d007 beq.n 800af58 <HAL_SPI_Init+0x7a>
800af48: 687b ldr r3, [r7, #4]
800af4a: 68db ldr r3, [r3, #12]
800af4c: f5b3 6fe0 cmp.w r3, #1792 ; 0x700
800af50: d002 beq.n 800af58 <HAL_SPI_Init+0x7a>
{
/* CRC must be disabled */
hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
800af52: 687b ldr r3, [r7, #4]
800af54: 2200 movs r2, #0
800af56: 629a str r2, [r3, #40] ; 0x28
}
/* Align the CRC Length on the data size */
if (hspi->Init.CRCLength == SPI_CRC_LENGTH_DATASIZE)
800af58: 687b ldr r3, [r7, #4]
800af5a: 6b1b ldr r3, [r3, #48] ; 0x30
800af5c: 2b00 cmp r3, #0
800af5e: d10b bne.n 800af78 <HAL_SPI_Init+0x9a>
{
/* CRC Length aligned on the data size : value set by default */
if (hspi->Init.DataSize > SPI_DATASIZE_8BIT)
800af60: 687b ldr r3, [r7, #4]
800af62: 68db ldr r3, [r3, #12]
800af64: f5b3 6fe0 cmp.w r3, #1792 ; 0x700
800af68: d903 bls.n 800af72 <HAL_SPI_Init+0x94>
{
hspi->Init.CRCLength = SPI_CRC_LENGTH_16BIT;
800af6a: 687b ldr r3, [r7, #4]
800af6c: 2202 movs r2, #2
800af6e: 631a str r2, [r3, #48] ; 0x30
800af70: e002 b.n 800af78 <HAL_SPI_Init+0x9a>
}
else
{
hspi->Init.CRCLength = SPI_CRC_LENGTH_8BIT;
800af72: 687b ldr r3, [r7, #4]
800af74: 2201 movs r2, #1
800af76: 631a str r2, [r3, #48] ; 0x30
}
/*----------------------- 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 | hspi->Init.Direction |
800af78: 687b ldr r3, [r7, #4]
800af7a: 685a ldr r2, [r3, #4]
800af7c: 687b ldr r3, [r7, #4]
800af7e: 689b ldr r3, [r3, #8]
800af80: 431a orrs r2, r3
800af82: 687b ldr r3, [r7, #4]
800af84: 691b ldr r3, [r3, #16]
800af86: 431a orrs r2, r3
800af88: 687b ldr r3, [r7, #4]
800af8a: 695b ldr r3, [r3, #20]
800af8c: 431a orrs r2, r3
800af8e: 687b ldr r3, [r7, #4]
800af90: 699b ldr r3, [r3, #24]
800af92: f403 7300 and.w r3, r3, #512 ; 0x200
800af96: 431a orrs r2, r3
800af98: 687b ldr r3, [r7, #4]
800af9a: 69db ldr r3, [r3, #28]
800af9c: 431a orrs r2, r3
800af9e: 687b ldr r3, [r7, #4]
800afa0: 6a1b ldr r3, [r3, #32]
800afa2: ea42 0103 orr.w r1, r2, r3
800afa6: 687b ldr r3, [r7, #4]
800afa8: 6a9a ldr r2, [r3, #40] ; 0x28
800afaa: 687b ldr r3, [r7, #4]
800afac: 681b ldr r3, [r3, #0]
800afae: 430a orrs r2, r1
800afb0: 601a str r2, [r3, #0]
hspi->Instance->CR1 |= SPI_CR1_CRCL;
}
#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) | hspi->Init.TIMode |
800afb2: 687b ldr r3, [r7, #4]
800afb4: 699b ldr r3, [r3, #24]
800afb6: 0c1b lsrs r3, r3, #16
800afb8: f003 0204 and.w r2, r3, #4
800afbc: 687b ldr r3, [r7, #4]
800afbe: 6a5b ldr r3, [r3, #36] ; 0x24
800afc0: 431a orrs r2, r3
800afc2: 687b ldr r3, [r7, #4]
800afc4: 6b5b ldr r3, [r3, #52] ; 0x34
800afc6: 431a orrs r2, r3
800afc8: 687b ldr r3, [r7, #4]
800afca: 68db ldr r3, [r3, #12]
800afcc: ea42 0103 orr.w r1, r2, r3
800afd0: 687b ldr r3, [r7, #4]
800afd2: 681b ldr r3, [r3, #0]
800afd4: 68fa ldr r2, [r7, #12]
800afd6: 430a orrs r2, r1
800afd8: 605a str r2, [r3, #4]
}
#endif /* USE_SPI_CRC */
#if defined(SPI_I2SCFGR_I2SMOD)
/* Activate the SPI mode (Make sure that I2SMOD bit in I2SCFGR register is reset) */
CLEAR_BIT(hspi->Instance->I2SCFGR, SPI_I2SCFGR_I2SMOD);
800afda: 687b ldr r3, [r7, #4]
800afdc: 681b ldr r3, [r3, #0]
800afde: 69da ldr r2, [r3, #28]
800afe0: 687b ldr r3, [r7, #4]
800afe2: 681b ldr r3, [r3, #0]
800afe4: f422 6200 bic.w r2, r2, #2048 ; 0x800
800afe8: 61da str r2, [r3, #28]
#endif /* SPI_I2SCFGR_I2SMOD */
hspi->ErrorCode = HAL_SPI_ERROR_NONE;
800afea: 687b ldr r3, [r7, #4]
800afec: 2200 movs r2, #0
800afee: 661a str r2, [r3, #96] ; 0x60
hspi->State = HAL_SPI_STATE_READY;
800aff0: 687b ldr r3, [r7, #4]
800aff2: 2201 movs r2, #1
800aff4: f883 205d strb.w r2, [r3, #93] ; 0x5d
return HAL_OK;
800aff8: 2300 movs r3, #0
}
800affa: 4618 mov r0, r3
800affc: 3710 adds r7, #16
800affe: 46bd mov sp, r7
800b000: bd80 pop {r7, pc}
0800b002 <HAL_TIM_Base_Init>:
* Ex: call @ref HAL_TIM_Base_DeInit() before HAL_TIM_Base_Init()
* @param htim TIM Base handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim)
{
800b002: b580 push {r7, lr}
800b004: b082 sub sp, #8
800b006: af00 add r7, sp, #0
800b008: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
800b00a: 687b ldr r3, [r7, #4]
800b00c: 2b00 cmp r3, #0
800b00e: d101 bne.n 800b014 <HAL_TIM_Base_Init+0x12>
{
return HAL_ERROR;
800b010: 2301 movs r3, #1
800b012: e01d b.n 800b050 <HAL_TIM_Base_Init+0x4e>
assert_param(IS_TIM_INSTANCE(htim->Instance));
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
if (htim->State == HAL_TIM_STATE_RESET)
800b014: 687b ldr r3, [r7, #4]
800b016: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
800b01a: b2db uxtb r3, r3
800b01c: 2b00 cmp r3, #0
800b01e: d106 bne.n 800b02e <HAL_TIM_Base_Init+0x2c>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
800b020: 687b ldr r3, [r7, #4]
800b022: 2200 movs r2, #0
800b024: f883 203c strb.w r2, [r3, #60] ; 0x3c
}
/* Init the low level hardware : GPIO, CLOCK, NVIC */
htim->Base_MspInitCallback(htim);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC */
HAL_TIM_Base_MspInit(htim);
800b028: 6878 ldr r0, [r7, #4]
800b02a: f7f9 fdb7 bl 8004b9c <HAL_TIM_Base_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
800b02e: 687b ldr r3, [r7, #4]
800b030: 2202 movs r2, #2
800b032: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Set the Time Base configuration */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
800b036: 687b ldr r3, [r7, #4]
800b038: 681a ldr r2, [r3, #0]
800b03a: 687b ldr r3, [r7, #4]
800b03c: 3304 adds r3, #4
800b03e: 4619 mov r1, r3
800b040: 4610 mov r0, r2
800b042: f000 fbc3 bl 800b7cc <TIM_Base_SetConfig>
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
800b046: 687b ldr r3, [r7, #4]
800b048: 2201 movs r2, #1
800b04a: f883 203d strb.w r2, [r3, #61] ; 0x3d
return HAL_OK;
800b04e: 2300 movs r3, #0
}
800b050: 4618 mov r0, r3
800b052: 3708 adds r7, #8
800b054: 46bd mov sp, r7
800b056: bd80 pop {r7, pc}
0800b058 <HAL_TIM_Base_Start_IT>:
* @brief Starts the TIM Base generation in interrupt mode.
* @param htim TIM Base handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_Base_Start_IT(TIM_HandleTypeDef *htim)
{
800b058: b480 push {r7}
800b05a: b085 sub sp, #20
800b05c: af00 add r7, sp, #0
800b05e: 6078 str r0, [r7, #4]
/* Check the parameters */
assert_param(IS_TIM_INSTANCE(htim->Instance));
/* Enable the TIM Update interrupt */
__HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE);
800b060: 687b ldr r3, [r7, #4]
800b062: 681b ldr r3, [r3, #0]
800b064: 68da ldr r2, [r3, #12]
800b066: 687b ldr r3, [r7, #4]
800b068: 681b ldr r3, [r3, #0]
800b06a: f042 0201 orr.w r2, r2, #1
800b06e: 60da str r2, [r3, #12]
/* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
800b070: 687b ldr r3, [r7, #4]
800b072: 681b ldr r3, [r3, #0]
800b074: 689a ldr r2, [r3, #8]
800b076: 4b0c ldr r3, [pc, #48] ; (800b0a8 <HAL_TIM_Base_Start_IT+0x50>)
800b078: 4013 ands r3, r2
800b07a: 60fb str r3, [r7, #12]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
800b07c: 68fb ldr r3, [r7, #12]
800b07e: 2b06 cmp r3, #6
800b080: d00b beq.n 800b09a <HAL_TIM_Base_Start_IT+0x42>
800b082: 68fb ldr r3, [r7, #12]
800b084: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800b088: d007 beq.n 800b09a <HAL_TIM_Base_Start_IT+0x42>
{
__HAL_TIM_ENABLE(htim);
800b08a: 687b ldr r3, [r7, #4]
800b08c: 681b ldr r3, [r3, #0]
800b08e: 681a ldr r2, [r3, #0]
800b090: 687b ldr r3, [r7, #4]
800b092: 681b ldr r3, [r3, #0]
800b094: f042 0201 orr.w r2, r2, #1
800b098: 601a str r2, [r3, #0]
}
/* Return function status */
return HAL_OK;
800b09a: 2300 movs r3, #0
}
800b09c: 4618 mov r0, r3
800b09e: 3714 adds r7, #20
800b0a0: 46bd mov sp, r7
800b0a2: f85d 7b04 ldr.w r7, [sp], #4
800b0a6: 4770 bx lr
800b0a8: 00010007 .word 0x00010007
0800b0ac <HAL_TIM_PWM_Init>:
* Ex: call @ref HAL_TIM_PWM_DeInit() before HAL_TIM_PWM_Init()
* @param htim TIM PWM handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim)
{
800b0ac: b580 push {r7, lr}
800b0ae: b082 sub sp, #8
800b0b0: af00 add r7, sp, #0
800b0b2: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
800b0b4: 687b ldr r3, [r7, #4]
800b0b6: 2b00 cmp r3, #0
800b0b8: d101 bne.n 800b0be <HAL_TIM_PWM_Init+0x12>
{
return HAL_ERROR;
800b0ba: 2301 movs r3, #1
800b0bc: e01d b.n 800b0fa <HAL_TIM_PWM_Init+0x4e>
assert_param(IS_TIM_INSTANCE(htim->Instance));
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
if (htim->State == HAL_TIM_STATE_RESET)
800b0be: 687b ldr r3, [r7, #4]
800b0c0: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
800b0c4: b2db uxtb r3, r3
800b0c6: 2b00 cmp r3, #0
800b0c8: d106 bne.n 800b0d8 <HAL_TIM_PWM_Init+0x2c>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
800b0ca: 687b ldr r3, [r7, #4]
800b0cc: 2200 movs r2, #0
800b0ce: f883 203c strb.w r2, [r3, #60] ; 0x3c
}
/* Init the low level hardware : GPIO, CLOCK, NVIC */
htim->PWM_MspInitCallback(htim);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC and DMA */
HAL_TIM_PWM_MspInit(htim);
800b0d2: 6878 ldr r0, [r7, #4]
800b0d4: f000 f815 bl 800b102 <HAL_TIM_PWM_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
800b0d8: 687b ldr r3, [r7, #4]
800b0da: 2202 movs r2, #2
800b0dc: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Init the base time for the PWM */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
800b0e0: 687b ldr r3, [r7, #4]
800b0e2: 681a ldr r2, [r3, #0]
800b0e4: 687b ldr r3, [r7, #4]
800b0e6: 3304 adds r3, #4
800b0e8: 4619 mov r1, r3
800b0ea: 4610 mov r0, r2
800b0ec: f000 fb6e bl 800b7cc <TIM_Base_SetConfig>
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
800b0f0: 687b ldr r3, [r7, #4]
800b0f2: 2201 movs r2, #1
800b0f4: f883 203d strb.w r2, [r3, #61] ; 0x3d
return HAL_OK;
800b0f8: 2300 movs r3, #0
}
800b0fa: 4618 mov r0, r3
800b0fc: 3708 adds r7, #8
800b0fe: 46bd mov sp, r7
800b100: bd80 pop {r7, pc}
0800b102 <HAL_TIM_PWM_MspInit>:
* @brief Initializes the TIM PWM MSP.
* @param htim TIM PWM handle
* @retval None
*/
__weak void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef *htim)
{
800b102: b480 push {r7}
800b104: b083 sub sp, #12
800b106: af00 add r7, sp, #0
800b108: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_PWM_MspInit could be implemented in the user file
*/
}
800b10a: bf00 nop
800b10c: 370c adds r7, #12
800b10e: 46bd mov sp, r7
800b110: f85d 7b04 ldr.w r7, [sp], #4
800b114: 4770 bx lr
0800b116 <HAL_TIM_IRQHandler>:
* @brief This function handles TIM interrupts requests.
* @param htim TIM handle
* @retval None
*/
void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
{
800b116: b580 push {r7, lr}
800b118: b082 sub sp, #8
800b11a: af00 add r7, sp, #0
800b11c: 6078 str r0, [r7, #4]
/* Capture compare 1 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET)
800b11e: 687b ldr r3, [r7, #4]
800b120: 681b ldr r3, [r3, #0]
800b122: 691b ldr r3, [r3, #16]
800b124: f003 0302 and.w r3, r3, #2
800b128: 2b02 cmp r3, #2
800b12a: d122 bne.n 800b172 <HAL_TIM_IRQHandler+0x5c>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET)
800b12c: 687b ldr r3, [r7, #4]
800b12e: 681b ldr r3, [r3, #0]
800b130: 68db ldr r3, [r3, #12]
800b132: f003 0302 and.w r3, r3, #2
800b136: 2b02 cmp r3, #2
800b138: d11b bne.n 800b172 <HAL_TIM_IRQHandler+0x5c>
{
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1);
800b13a: 687b ldr r3, [r7, #4]
800b13c: 681b ldr r3, [r3, #0]
800b13e: f06f 0202 mvn.w r2, #2
800b142: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
800b144: 687b ldr r3, [r7, #4]
800b146: 2201 movs r2, #1
800b148: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U)
800b14a: 687b ldr r3, [r7, #4]
800b14c: 681b ldr r3, [r3, #0]
800b14e: 699b ldr r3, [r3, #24]
800b150: f003 0303 and.w r3, r3, #3
800b154: 2b00 cmp r3, #0
800b156: d003 beq.n 800b160 <HAL_TIM_IRQHandler+0x4a>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800b158: 6878 ldr r0, [r7, #4]
800b15a: f000 fb19 bl 800b790 <HAL_TIM_IC_CaptureCallback>
800b15e: e005 b.n 800b16c <HAL_TIM_IRQHandler+0x56>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800b160: 6878 ldr r0, [r7, #4]
800b162: f000 fb0b bl 800b77c <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800b166: 6878 ldr r0, [r7, #4]
800b168: f000 fb1c bl 800b7a4 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800b16c: 687b ldr r3, [r7, #4]
800b16e: 2200 movs r2, #0
800b170: 771a strb r2, [r3, #28]
}
}
}
/* Capture compare 2 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET)
800b172: 687b ldr r3, [r7, #4]
800b174: 681b ldr r3, [r3, #0]
800b176: 691b ldr r3, [r3, #16]
800b178: f003 0304 and.w r3, r3, #4
800b17c: 2b04 cmp r3, #4
800b17e: d122 bne.n 800b1c6 <HAL_TIM_IRQHandler+0xb0>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET)
800b180: 687b ldr r3, [r7, #4]
800b182: 681b ldr r3, [r3, #0]
800b184: 68db ldr r3, [r3, #12]
800b186: f003 0304 and.w r3, r3, #4
800b18a: 2b04 cmp r3, #4
800b18c: d11b bne.n 800b1c6 <HAL_TIM_IRQHandler+0xb0>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2);
800b18e: 687b ldr r3, [r7, #4]
800b190: 681b ldr r3, [r3, #0]
800b192: f06f 0204 mvn.w r2, #4
800b196: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
800b198: 687b ldr r3, [r7, #4]
800b19a: 2202 movs r2, #2
800b19c: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
800b19e: 687b ldr r3, [r7, #4]
800b1a0: 681b ldr r3, [r3, #0]
800b1a2: 699b ldr r3, [r3, #24]
800b1a4: f403 7340 and.w r3, r3, #768 ; 0x300
800b1a8: 2b00 cmp r3, #0
800b1aa: d003 beq.n 800b1b4 <HAL_TIM_IRQHandler+0x9e>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800b1ac: 6878 ldr r0, [r7, #4]
800b1ae: f000 faef bl 800b790 <HAL_TIM_IC_CaptureCallback>
800b1b2: e005 b.n 800b1c0 <HAL_TIM_IRQHandler+0xaa>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800b1b4: 6878 ldr r0, [r7, #4]
800b1b6: f000 fae1 bl 800b77c <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800b1ba: 6878 ldr r0, [r7, #4]
800b1bc: f000 faf2 bl 800b7a4 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800b1c0: 687b ldr r3, [r7, #4]
800b1c2: 2200 movs r2, #0
800b1c4: 771a strb r2, [r3, #28]
}
}
/* Capture compare 3 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET)
800b1c6: 687b ldr r3, [r7, #4]
800b1c8: 681b ldr r3, [r3, #0]
800b1ca: 691b ldr r3, [r3, #16]
800b1cc: f003 0308 and.w r3, r3, #8
800b1d0: 2b08 cmp r3, #8
800b1d2: d122 bne.n 800b21a <HAL_TIM_IRQHandler+0x104>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET)
800b1d4: 687b ldr r3, [r7, #4]
800b1d6: 681b ldr r3, [r3, #0]
800b1d8: 68db ldr r3, [r3, #12]
800b1da: f003 0308 and.w r3, r3, #8
800b1de: 2b08 cmp r3, #8
800b1e0: d11b bne.n 800b21a <HAL_TIM_IRQHandler+0x104>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3);
800b1e2: 687b ldr r3, [r7, #4]
800b1e4: 681b ldr r3, [r3, #0]
800b1e6: f06f 0208 mvn.w r2, #8
800b1ea: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
800b1ec: 687b ldr r3, [r7, #4]
800b1ee: 2204 movs r2, #4
800b1f0: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
800b1f2: 687b ldr r3, [r7, #4]
800b1f4: 681b ldr r3, [r3, #0]
800b1f6: 69db ldr r3, [r3, #28]
800b1f8: f003 0303 and.w r3, r3, #3
800b1fc: 2b00 cmp r3, #0
800b1fe: d003 beq.n 800b208 <HAL_TIM_IRQHandler+0xf2>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800b200: 6878 ldr r0, [r7, #4]
800b202: f000 fac5 bl 800b790 <HAL_TIM_IC_CaptureCallback>
800b206: e005 b.n 800b214 <HAL_TIM_IRQHandler+0xfe>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800b208: 6878 ldr r0, [r7, #4]
800b20a: f000 fab7 bl 800b77c <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800b20e: 6878 ldr r0, [r7, #4]
800b210: f000 fac8 bl 800b7a4 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800b214: 687b ldr r3, [r7, #4]
800b216: 2200 movs r2, #0
800b218: 771a strb r2, [r3, #28]
}
}
/* Capture compare 4 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET)
800b21a: 687b ldr r3, [r7, #4]
800b21c: 681b ldr r3, [r3, #0]
800b21e: 691b ldr r3, [r3, #16]
800b220: f003 0310 and.w r3, r3, #16
800b224: 2b10 cmp r3, #16
800b226: d122 bne.n 800b26e <HAL_TIM_IRQHandler+0x158>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET)
800b228: 687b ldr r3, [r7, #4]
800b22a: 681b ldr r3, [r3, #0]
800b22c: 68db ldr r3, [r3, #12]
800b22e: f003 0310 and.w r3, r3, #16
800b232: 2b10 cmp r3, #16
800b234: d11b bne.n 800b26e <HAL_TIM_IRQHandler+0x158>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4);
800b236: 687b ldr r3, [r7, #4]
800b238: 681b ldr r3, [r3, #0]
800b23a: f06f 0210 mvn.w r2, #16
800b23e: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
800b240: 687b ldr r3, [r7, #4]
800b242: 2208 movs r2, #8
800b244: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
800b246: 687b ldr r3, [r7, #4]
800b248: 681b ldr r3, [r3, #0]
800b24a: 69db ldr r3, [r3, #28]
800b24c: f403 7340 and.w r3, r3, #768 ; 0x300
800b250: 2b00 cmp r3, #0
800b252: d003 beq.n 800b25c <HAL_TIM_IRQHandler+0x146>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800b254: 6878 ldr r0, [r7, #4]
800b256: f000 fa9b bl 800b790 <HAL_TIM_IC_CaptureCallback>
800b25a: e005 b.n 800b268 <HAL_TIM_IRQHandler+0x152>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->OC_DelayElapsedCallback(htim);
htim->PWM_PulseFinishedCallback(htim);
#else
HAL_TIM_OC_DelayElapsedCallback(htim);
800b25c: 6878 ldr r0, [r7, #4]
800b25e: f000 fa8d bl 800b77c <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800b262: 6878 ldr r0, [r7, #4]
800b264: f000 fa9e bl 800b7a4 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800b268: 687b ldr r3, [r7, #4]
800b26a: 2200 movs r2, #0
800b26c: 771a strb r2, [r3, #28]
}
}
/* TIM Update event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET)
800b26e: 687b ldr r3, [r7, #4]
800b270: 681b ldr r3, [r3, #0]
800b272: 691b ldr r3, [r3, #16]
800b274: f003 0301 and.w r3, r3, #1
800b278: 2b01 cmp r3, #1
800b27a: d10e bne.n 800b29a <HAL_TIM_IRQHandler+0x184>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET)
800b27c: 687b ldr r3, [r7, #4]
800b27e: 681b ldr r3, [r3, #0]
800b280: 68db ldr r3, [r3, #12]
800b282: f003 0301 and.w r3, r3, #1
800b286: 2b01 cmp r3, #1
800b288: d107 bne.n 800b29a <HAL_TIM_IRQHandler+0x184>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE);
800b28a: 687b ldr r3, [r7, #4]
800b28c: 681b ldr r3, [r3, #0]
800b28e: f06f 0201 mvn.w r2, #1
800b292: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->PeriodElapsedCallback(htim);
#else
HAL_TIM_PeriodElapsedCallback(htim);
800b294: 6878 ldr r0, [r7, #4]
800b296: f7f7 fafd bl 8002894 <HAL_TIM_PeriodElapsedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Break input event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET)
800b29a: 687b ldr r3, [r7, #4]
800b29c: 681b ldr r3, [r3, #0]
800b29e: 691b ldr r3, [r3, #16]
800b2a0: f003 0380 and.w r3, r3, #128 ; 0x80
800b2a4: 2b80 cmp r3, #128 ; 0x80
800b2a6: d10e bne.n 800b2c6 <HAL_TIM_IRQHandler+0x1b0>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
800b2a8: 687b ldr r3, [r7, #4]
800b2aa: 681b ldr r3, [r3, #0]
800b2ac: 68db ldr r3, [r3, #12]
800b2ae: f003 0380 and.w r3, r3, #128 ; 0x80
800b2b2: 2b80 cmp r3, #128 ; 0x80
800b2b4: d107 bne.n 800b2c6 <HAL_TIM_IRQHandler+0x1b0>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK);
800b2b6: 687b ldr r3, [r7, #4]
800b2b8: 681b ldr r3, [r3, #0]
800b2ba: f06f 0280 mvn.w r2, #128 ; 0x80
800b2be: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->BreakCallback(htim);
#else
HAL_TIMEx_BreakCallback(htim);
800b2c0: 6878 ldr r0, [r7, #4]
800b2c2: f000 ffb9 bl 800c238 <HAL_TIMEx_BreakCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Break2 input event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK2) != RESET)
800b2c6: 687b ldr r3, [r7, #4]
800b2c8: 681b ldr r3, [r3, #0]
800b2ca: 691b ldr r3, [r3, #16]
800b2cc: f403 7380 and.w r3, r3, #256 ; 0x100
800b2d0: f5b3 7f80 cmp.w r3, #256 ; 0x100
800b2d4: d10e bne.n 800b2f4 <HAL_TIM_IRQHandler+0x1de>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
800b2d6: 687b ldr r3, [r7, #4]
800b2d8: 681b ldr r3, [r3, #0]
800b2da: 68db ldr r3, [r3, #12]
800b2dc: f003 0380 and.w r3, r3, #128 ; 0x80
800b2e0: 2b80 cmp r3, #128 ; 0x80
800b2e2: d107 bne.n 800b2f4 <HAL_TIM_IRQHandler+0x1de>
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2);
800b2e4: 687b ldr r3, [r7, #4]
800b2e6: 681b ldr r3, [r3, #0]
800b2e8: f46f 7280 mvn.w r2, #256 ; 0x100
800b2ec: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->Break2Callback(htim);
#else
HAL_TIMEx_Break2Callback(htim);
800b2ee: 6878 ldr r0, [r7, #4]
800b2f0: f000 ffac bl 800c24c <HAL_TIMEx_Break2Callback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Trigger detection event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET)
800b2f4: 687b ldr r3, [r7, #4]
800b2f6: 681b ldr r3, [r3, #0]
800b2f8: 691b ldr r3, [r3, #16]
800b2fa: f003 0340 and.w r3, r3, #64 ; 0x40
800b2fe: 2b40 cmp r3, #64 ; 0x40
800b300: d10e bne.n 800b320 <HAL_TIM_IRQHandler+0x20a>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET)
800b302: 687b ldr r3, [r7, #4]
800b304: 681b ldr r3, [r3, #0]
800b306: 68db ldr r3, [r3, #12]
800b308: f003 0340 and.w r3, r3, #64 ; 0x40
800b30c: 2b40 cmp r3, #64 ; 0x40
800b30e: d107 bne.n 800b320 <HAL_TIM_IRQHandler+0x20a>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER);
800b310: 687b ldr r3, [r7, #4]
800b312: 681b ldr r3, [r3, #0]
800b314: f06f 0240 mvn.w r2, #64 ; 0x40
800b318: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->TriggerCallback(htim);
#else
HAL_TIM_TriggerCallback(htim);
800b31a: 6878 ldr r0, [r7, #4]
800b31c: f000 fa4c bl 800b7b8 <HAL_TIM_TriggerCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM commutation event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET)
800b320: 687b ldr r3, [r7, #4]
800b322: 681b ldr r3, [r3, #0]
800b324: 691b ldr r3, [r3, #16]
800b326: f003 0320 and.w r3, r3, #32
800b32a: 2b20 cmp r3, #32
800b32c: d10e bne.n 800b34c <HAL_TIM_IRQHandler+0x236>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET)
800b32e: 687b ldr r3, [r7, #4]
800b330: 681b ldr r3, [r3, #0]
800b332: 68db ldr r3, [r3, #12]
800b334: f003 0320 and.w r3, r3, #32
800b338: 2b20 cmp r3, #32
800b33a: d107 bne.n 800b34c <HAL_TIM_IRQHandler+0x236>
{
__HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM);
800b33c: 687b ldr r3, [r7, #4]
800b33e: 681b ldr r3, [r3, #0]
800b340: f06f 0220 mvn.w r2, #32
800b344: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->CommutationCallback(htim);
#else
HAL_TIMEx_CommutCallback(htim);
800b346: 6878 ldr r0, [r7, #4]
800b348: f000 ff6c bl 800c224 <HAL_TIMEx_CommutCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
}
800b34c: bf00 nop
800b34e: 3708 adds r7, #8
800b350: 46bd mov sp, r7
800b352: bd80 pop {r7, pc}
0800b354 <HAL_TIM_PWM_ConfigChannel>:
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,
TIM_OC_InitTypeDef *sConfig,
uint32_t Channel)
{
800b354: b580 push {r7, lr}
800b356: b084 sub sp, #16
800b358: af00 add r7, sp, #0
800b35a: 60f8 str r0, [r7, #12]
800b35c: 60b9 str r1, [r7, #8]
800b35e: 607a str r2, [r7, #4]
assert_param(IS_TIM_PWM_MODE(sConfig->OCMode));
assert_param(IS_TIM_OC_POLARITY(sConfig->OCPolarity));
assert_param(IS_TIM_FAST_STATE(sConfig->OCFastMode));
/* Process Locked */
__HAL_LOCK(htim);
800b360: 68fb ldr r3, [r7, #12]
800b362: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800b366: 2b01 cmp r3, #1
800b368: d101 bne.n 800b36e <HAL_TIM_PWM_ConfigChannel+0x1a>
800b36a: 2302 movs r3, #2
800b36c: e105 b.n 800b57a <HAL_TIM_PWM_ConfigChannel+0x226>
800b36e: 68fb ldr r3, [r7, #12]
800b370: 2201 movs r2, #1
800b372: f883 203c strb.w r2, [r3, #60] ; 0x3c
htim->State = HAL_TIM_STATE_BUSY;
800b376: 68fb ldr r3, [r7, #12]
800b378: 2202 movs r2, #2
800b37a: f883 203d strb.w r2, [r3, #61] ; 0x3d
switch (Channel)
800b37e: 687b ldr r3, [r7, #4]
800b380: 2b14 cmp r3, #20
800b382: f200 80f0 bhi.w 800b566 <HAL_TIM_PWM_ConfigChannel+0x212>
800b386: a201 add r2, pc, #4 ; (adr r2, 800b38c <HAL_TIM_PWM_ConfigChannel+0x38>)
800b388: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800b38c: 0800b3e1 .word 0x0800b3e1
800b390: 0800b567 .word 0x0800b567
800b394: 0800b567 .word 0x0800b567
800b398: 0800b567 .word 0x0800b567
800b39c: 0800b421 .word 0x0800b421
800b3a0: 0800b567 .word 0x0800b567
800b3a4: 0800b567 .word 0x0800b567
800b3a8: 0800b567 .word 0x0800b567
800b3ac: 0800b463 .word 0x0800b463
800b3b0: 0800b567 .word 0x0800b567
800b3b4: 0800b567 .word 0x0800b567
800b3b8: 0800b567 .word 0x0800b567
800b3bc: 0800b4a3 .word 0x0800b4a3
800b3c0: 0800b567 .word 0x0800b567
800b3c4: 0800b567 .word 0x0800b567
800b3c8: 0800b567 .word 0x0800b567
800b3cc: 0800b4e5 .word 0x0800b4e5
800b3d0: 0800b567 .word 0x0800b567
800b3d4: 0800b567 .word 0x0800b567
800b3d8: 0800b567 .word 0x0800b567
800b3dc: 0800b525 .word 0x0800b525
{
/* Check the parameters */
assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
/* Configure the Channel 1 in PWM mode */
TIM_OC1_SetConfig(htim->Instance, sConfig);
800b3e0: 68fb ldr r3, [r7, #12]
800b3e2: 681b ldr r3, [r3, #0]
800b3e4: 68b9 ldr r1, [r7, #8]
800b3e6: 4618 mov r0, r3
800b3e8: f000 fa90 bl 800b90c <TIM_OC1_SetConfig>
/* Set the Preload enable bit for channel1 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC1PE;
800b3ec: 68fb ldr r3, [r7, #12]
800b3ee: 681b ldr r3, [r3, #0]
800b3f0: 699a ldr r2, [r3, #24]
800b3f2: 68fb ldr r3, [r7, #12]
800b3f4: 681b ldr r3, [r3, #0]
800b3f6: f042 0208 orr.w r2, r2, #8
800b3fa: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC1FE;
800b3fc: 68fb ldr r3, [r7, #12]
800b3fe: 681b ldr r3, [r3, #0]
800b400: 699a ldr r2, [r3, #24]
800b402: 68fb ldr r3, [r7, #12]
800b404: 681b ldr r3, [r3, #0]
800b406: f022 0204 bic.w r2, r2, #4
800b40a: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode;
800b40c: 68fb ldr r3, [r7, #12]
800b40e: 681b ldr r3, [r3, #0]
800b410: 6999 ldr r1, [r3, #24]
800b412: 68bb ldr r3, [r7, #8]
800b414: 691a ldr r2, [r3, #16]
800b416: 68fb ldr r3, [r7, #12]
800b418: 681b ldr r3, [r3, #0]
800b41a: 430a orrs r2, r1
800b41c: 619a str r2, [r3, #24]
break;
800b41e: e0a3 b.n 800b568 <HAL_TIM_PWM_ConfigChannel+0x214>
{
/* Check the parameters */
assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
/* Configure the Channel 2 in PWM mode */
TIM_OC2_SetConfig(htim->Instance, sConfig);
800b420: 68fb ldr r3, [r7, #12]
800b422: 681b ldr r3, [r3, #0]
800b424: 68b9 ldr r1, [r7, #8]
800b426: 4618 mov r0, r3
800b428: f000 fae2 bl 800b9f0 <TIM_OC2_SetConfig>
/* Set the Preload enable bit for channel2 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC2PE;
800b42c: 68fb ldr r3, [r7, #12]
800b42e: 681b ldr r3, [r3, #0]
800b430: 699a ldr r2, [r3, #24]
800b432: 68fb ldr r3, [r7, #12]
800b434: 681b ldr r3, [r3, #0]
800b436: f442 6200 orr.w r2, r2, #2048 ; 0x800
800b43a: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC2FE;
800b43c: 68fb ldr r3, [r7, #12]
800b43e: 681b ldr r3, [r3, #0]
800b440: 699a ldr r2, [r3, #24]
800b442: 68fb ldr r3, [r7, #12]
800b444: 681b ldr r3, [r3, #0]
800b446: f422 6280 bic.w r2, r2, #1024 ; 0x400
800b44a: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode << 8U;
800b44c: 68fb ldr r3, [r7, #12]
800b44e: 681b ldr r3, [r3, #0]
800b450: 6999 ldr r1, [r3, #24]
800b452: 68bb ldr r3, [r7, #8]
800b454: 691b ldr r3, [r3, #16]
800b456: 021a lsls r2, r3, #8
800b458: 68fb ldr r3, [r7, #12]
800b45a: 681b ldr r3, [r3, #0]
800b45c: 430a orrs r2, r1
800b45e: 619a str r2, [r3, #24]
break;
800b460: e082 b.n 800b568 <HAL_TIM_PWM_ConfigChannel+0x214>
{
/* Check the parameters */
assert_param(IS_TIM_CC3_INSTANCE(htim->Instance));
/* Configure the Channel 3 in PWM mode */
TIM_OC3_SetConfig(htim->Instance, sConfig);
800b462: 68fb ldr r3, [r7, #12]
800b464: 681b ldr r3, [r3, #0]
800b466: 68b9 ldr r1, [r7, #8]
800b468: 4618 mov r0, r3
800b46a: f000 fb39 bl 800bae0 <TIM_OC3_SetConfig>
/* Set the Preload enable bit for channel3 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC3PE;
800b46e: 68fb ldr r3, [r7, #12]
800b470: 681b ldr r3, [r3, #0]
800b472: 69da ldr r2, [r3, #28]
800b474: 68fb ldr r3, [r7, #12]
800b476: 681b ldr r3, [r3, #0]
800b478: f042 0208 orr.w r2, r2, #8
800b47c: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC3FE;
800b47e: 68fb ldr r3, [r7, #12]
800b480: 681b ldr r3, [r3, #0]
800b482: 69da ldr r2, [r3, #28]
800b484: 68fb ldr r3, [r7, #12]
800b486: 681b ldr r3, [r3, #0]
800b488: f022 0204 bic.w r2, r2, #4
800b48c: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode;
800b48e: 68fb ldr r3, [r7, #12]
800b490: 681b ldr r3, [r3, #0]
800b492: 69d9 ldr r1, [r3, #28]
800b494: 68bb ldr r3, [r7, #8]
800b496: 691a ldr r2, [r3, #16]
800b498: 68fb ldr r3, [r7, #12]
800b49a: 681b ldr r3, [r3, #0]
800b49c: 430a orrs r2, r1
800b49e: 61da str r2, [r3, #28]
break;
800b4a0: e062 b.n 800b568 <HAL_TIM_PWM_ConfigChannel+0x214>
{
/* Check the parameters */
assert_param(IS_TIM_CC4_INSTANCE(htim->Instance));
/* Configure the Channel 4 in PWM mode */
TIM_OC4_SetConfig(htim->Instance, sConfig);
800b4a2: 68fb ldr r3, [r7, #12]
800b4a4: 681b ldr r3, [r3, #0]
800b4a6: 68b9 ldr r1, [r7, #8]
800b4a8: 4618 mov r0, r3
800b4aa: f000 fb8f bl 800bbcc <TIM_OC4_SetConfig>
/* Set the Preload enable bit for channel4 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC4PE;
800b4ae: 68fb ldr r3, [r7, #12]
800b4b0: 681b ldr r3, [r3, #0]
800b4b2: 69da ldr r2, [r3, #28]
800b4b4: 68fb ldr r3, [r7, #12]
800b4b6: 681b ldr r3, [r3, #0]
800b4b8: f442 6200 orr.w r2, r2, #2048 ; 0x800
800b4bc: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC4FE;
800b4be: 68fb ldr r3, [r7, #12]
800b4c0: 681b ldr r3, [r3, #0]
800b4c2: 69da ldr r2, [r3, #28]
800b4c4: 68fb ldr r3, [r7, #12]
800b4c6: 681b ldr r3, [r3, #0]
800b4c8: f422 6280 bic.w r2, r2, #1024 ; 0x400
800b4cc: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode << 8U;
800b4ce: 68fb ldr r3, [r7, #12]
800b4d0: 681b ldr r3, [r3, #0]
800b4d2: 69d9 ldr r1, [r3, #28]
800b4d4: 68bb ldr r3, [r7, #8]
800b4d6: 691b ldr r3, [r3, #16]
800b4d8: 021a lsls r2, r3, #8
800b4da: 68fb ldr r3, [r7, #12]
800b4dc: 681b ldr r3, [r3, #0]
800b4de: 430a orrs r2, r1
800b4e0: 61da str r2, [r3, #28]
break;
800b4e2: e041 b.n 800b568 <HAL_TIM_PWM_ConfigChannel+0x214>
{
/* Check the parameters */
assert_param(IS_TIM_CC5_INSTANCE(htim->Instance));
/* Configure the Channel 5 in PWM mode */
TIM_OC5_SetConfig(htim->Instance, sConfig);
800b4e4: 68fb ldr r3, [r7, #12]
800b4e6: 681b ldr r3, [r3, #0]
800b4e8: 68b9 ldr r1, [r7, #8]
800b4ea: 4618 mov r0, r3
800b4ec: f000 fbc6 bl 800bc7c <TIM_OC5_SetConfig>
/* Set the Preload enable bit for channel5*/
htim->Instance->CCMR3 |= TIM_CCMR3_OC5PE;
800b4f0: 68fb ldr r3, [r7, #12]
800b4f2: 681b ldr r3, [r3, #0]
800b4f4: 6d5a ldr r2, [r3, #84] ; 0x54
800b4f6: 68fb ldr r3, [r7, #12]
800b4f8: 681b ldr r3, [r3, #0]
800b4fa: f042 0208 orr.w r2, r2, #8
800b4fe: 655a str r2, [r3, #84] ; 0x54
/* Configure the Output Fast mode */
htim->Instance->CCMR3 &= ~TIM_CCMR3_OC5FE;
800b500: 68fb ldr r3, [r7, #12]
800b502: 681b ldr r3, [r3, #0]
800b504: 6d5a ldr r2, [r3, #84] ; 0x54
800b506: 68fb ldr r3, [r7, #12]
800b508: 681b ldr r3, [r3, #0]
800b50a: f022 0204 bic.w r2, r2, #4
800b50e: 655a str r2, [r3, #84] ; 0x54
htim->Instance->CCMR3 |= sConfig->OCFastMode;
800b510: 68fb ldr r3, [r7, #12]
800b512: 681b ldr r3, [r3, #0]
800b514: 6d59 ldr r1, [r3, #84] ; 0x54
800b516: 68bb ldr r3, [r7, #8]
800b518: 691a ldr r2, [r3, #16]
800b51a: 68fb ldr r3, [r7, #12]
800b51c: 681b ldr r3, [r3, #0]
800b51e: 430a orrs r2, r1
800b520: 655a str r2, [r3, #84] ; 0x54
break;
800b522: e021 b.n 800b568 <HAL_TIM_PWM_ConfigChannel+0x214>
{
/* Check the parameters */
assert_param(IS_TIM_CC6_INSTANCE(htim->Instance));
/* Configure the Channel 6 in PWM mode */
TIM_OC6_SetConfig(htim->Instance, sConfig);
800b524: 68fb ldr r3, [r7, #12]
800b526: 681b ldr r3, [r3, #0]
800b528: 68b9 ldr r1, [r7, #8]
800b52a: 4618 mov r0, r3
800b52c: f000 fbf8 bl 800bd20 <TIM_OC6_SetConfig>
/* Set the Preload enable bit for channel6 */
htim->Instance->CCMR3 |= TIM_CCMR3_OC6PE;
800b530: 68fb ldr r3, [r7, #12]
800b532: 681b ldr r3, [r3, #0]
800b534: 6d5a ldr r2, [r3, #84] ; 0x54
800b536: 68fb ldr r3, [r7, #12]
800b538: 681b ldr r3, [r3, #0]
800b53a: f442 6200 orr.w r2, r2, #2048 ; 0x800
800b53e: 655a str r2, [r3, #84] ; 0x54
/* Configure the Output Fast mode */
htim->Instance->CCMR3 &= ~TIM_CCMR3_OC6FE;
800b540: 68fb ldr r3, [r7, #12]
800b542: 681b ldr r3, [r3, #0]
800b544: 6d5a ldr r2, [r3, #84] ; 0x54
800b546: 68fb ldr r3, [r7, #12]
800b548: 681b ldr r3, [r3, #0]
800b54a: f422 6280 bic.w r2, r2, #1024 ; 0x400
800b54e: 655a str r2, [r3, #84] ; 0x54
htim->Instance->CCMR3 |= sConfig->OCFastMode << 8U;
800b550: 68fb ldr r3, [r7, #12]
800b552: 681b ldr r3, [r3, #0]
800b554: 6d59 ldr r1, [r3, #84] ; 0x54
800b556: 68bb ldr r3, [r7, #8]
800b558: 691b ldr r3, [r3, #16]
800b55a: 021a lsls r2, r3, #8
800b55c: 68fb ldr r3, [r7, #12]
800b55e: 681b ldr r3, [r3, #0]
800b560: 430a orrs r2, r1
800b562: 655a str r2, [r3, #84] ; 0x54
break;
800b564: e000 b.n 800b568 <HAL_TIM_PWM_ConfigChannel+0x214>
}
default:
break;
800b566: bf00 nop
}
htim->State = HAL_TIM_STATE_READY;
800b568: 68fb ldr r3, [r7, #12]
800b56a: 2201 movs r2, #1
800b56c: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800b570: 68fb ldr r3, [r7, #12]
800b572: 2200 movs r2, #0
800b574: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800b578: 2300 movs r3, #0
}
800b57a: 4618 mov r0, r3
800b57c: 3710 adds r7, #16
800b57e: 46bd mov sp, r7
800b580: bd80 pop {r7, pc}
800b582: bf00 nop
0800b584 <HAL_TIM_ConfigClockSource>:
* @param sClockSourceConfig pointer to a TIM_ClockConfigTypeDef structure that
* contains the clock source information for the TIM peripheral.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, TIM_ClockConfigTypeDef *sClockSourceConfig)
{
800b584: b580 push {r7, lr}
800b586: b084 sub sp, #16
800b588: af00 add r7, sp, #0
800b58a: 6078 str r0, [r7, #4]
800b58c: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
/* Process Locked */
__HAL_LOCK(htim);
800b58e: 687b ldr r3, [r7, #4]
800b590: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800b594: 2b01 cmp r3, #1
800b596: d101 bne.n 800b59c <HAL_TIM_ConfigClockSource+0x18>
800b598: 2302 movs r3, #2
800b59a: e0a6 b.n 800b6ea <HAL_TIM_ConfigClockSource+0x166>
800b59c: 687b ldr r3, [r7, #4]
800b59e: 2201 movs r2, #1
800b5a0: f883 203c strb.w r2, [r3, #60] ; 0x3c
htim->State = HAL_TIM_STATE_BUSY;
800b5a4: 687b ldr r3, [r7, #4]
800b5a6: 2202 movs r2, #2
800b5a8: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Check the parameters */
assert_param(IS_TIM_CLOCKSOURCE(sClockSourceConfig->ClockSource));
/* Reset the SMS, TS, ECE, ETPS and ETRF bits */
tmpsmcr = htim->Instance->SMCR;
800b5ac: 687b ldr r3, [r7, #4]
800b5ae: 681b ldr r3, [r3, #0]
800b5b0: 689b ldr r3, [r3, #8]
800b5b2: 60fb str r3, [r7, #12]
tmpsmcr &= ~(TIM_SMCR_SMS | TIM_SMCR_TS);
800b5b4: 68fa ldr r2, [r7, #12]
800b5b6: 4b4f ldr r3, [pc, #316] ; (800b6f4 <HAL_TIM_ConfigClockSource+0x170>)
800b5b8: 4013 ands r3, r2
800b5ba: 60fb str r3, [r7, #12]
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
800b5bc: 68fb ldr r3, [r7, #12]
800b5be: f423 437f bic.w r3, r3, #65280 ; 0xff00
800b5c2: 60fb str r3, [r7, #12]
htim->Instance->SMCR = tmpsmcr;
800b5c4: 687b ldr r3, [r7, #4]
800b5c6: 681b ldr r3, [r3, #0]
800b5c8: 68fa ldr r2, [r7, #12]
800b5ca: 609a str r2, [r3, #8]
switch (sClockSourceConfig->ClockSource)
800b5cc: 683b ldr r3, [r7, #0]
800b5ce: 681b ldr r3, [r3, #0]
800b5d0: 2b40 cmp r3, #64 ; 0x40
800b5d2: d067 beq.n 800b6a4 <HAL_TIM_ConfigClockSource+0x120>
800b5d4: 2b40 cmp r3, #64 ; 0x40
800b5d6: d80b bhi.n 800b5f0 <HAL_TIM_ConfigClockSource+0x6c>
800b5d8: 2b10 cmp r3, #16
800b5da: d073 beq.n 800b6c4 <HAL_TIM_ConfigClockSource+0x140>
800b5dc: 2b10 cmp r3, #16
800b5de: d802 bhi.n 800b5e6 <HAL_TIM_ConfigClockSource+0x62>
800b5e0: 2b00 cmp r3, #0
800b5e2: d06f beq.n 800b6c4 <HAL_TIM_ConfigClockSource+0x140>
TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource);
break;
}
default:
break;
800b5e4: e078 b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
switch (sClockSourceConfig->ClockSource)
800b5e6: 2b20 cmp r3, #32
800b5e8: d06c beq.n 800b6c4 <HAL_TIM_ConfigClockSource+0x140>
800b5ea: 2b30 cmp r3, #48 ; 0x30
800b5ec: d06a beq.n 800b6c4 <HAL_TIM_ConfigClockSource+0x140>
break;
800b5ee: e073 b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
switch (sClockSourceConfig->ClockSource)
800b5f0: 2b70 cmp r3, #112 ; 0x70
800b5f2: d00d beq.n 800b610 <HAL_TIM_ConfigClockSource+0x8c>
800b5f4: 2b70 cmp r3, #112 ; 0x70
800b5f6: d804 bhi.n 800b602 <HAL_TIM_ConfigClockSource+0x7e>
800b5f8: 2b50 cmp r3, #80 ; 0x50
800b5fa: d033 beq.n 800b664 <HAL_TIM_ConfigClockSource+0xe0>
800b5fc: 2b60 cmp r3, #96 ; 0x60
800b5fe: d041 beq.n 800b684 <HAL_TIM_ConfigClockSource+0x100>
break;
800b600: e06a b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
switch (sClockSourceConfig->ClockSource)
800b602: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
800b606: d066 beq.n 800b6d6 <HAL_TIM_ConfigClockSource+0x152>
800b608: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
800b60c: d017 beq.n 800b63e <HAL_TIM_ConfigClockSource+0xba>
break;
800b60e: e063 b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
TIM_ETR_SetConfig(htim->Instance,
800b610: 687b ldr r3, [r7, #4]
800b612: 6818 ldr r0, [r3, #0]
800b614: 683b ldr r3, [r7, #0]
800b616: 6899 ldr r1, [r3, #8]
800b618: 683b ldr r3, [r7, #0]
800b61a: 685a ldr r2, [r3, #4]
800b61c: 683b ldr r3, [r7, #0]
800b61e: 68db ldr r3, [r3, #12]
800b620: f000 fcd4 bl 800bfcc <TIM_ETR_SetConfig>
tmpsmcr = htim->Instance->SMCR;
800b624: 687b ldr r3, [r7, #4]
800b626: 681b ldr r3, [r3, #0]
800b628: 689b ldr r3, [r3, #8]
800b62a: 60fb str r3, [r7, #12]
tmpsmcr |= (TIM_SLAVEMODE_EXTERNAL1 | TIM_CLOCKSOURCE_ETRMODE1);
800b62c: 68fb ldr r3, [r7, #12]
800b62e: f043 0377 orr.w r3, r3, #119 ; 0x77
800b632: 60fb str r3, [r7, #12]
htim->Instance->SMCR = tmpsmcr;
800b634: 687b ldr r3, [r7, #4]
800b636: 681b ldr r3, [r3, #0]
800b638: 68fa ldr r2, [r7, #12]
800b63a: 609a str r2, [r3, #8]
break;
800b63c: e04c b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
TIM_ETR_SetConfig(htim->Instance,
800b63e: 687b ldr r3, [r7, #4]
800b640: 6818 ldr r0, [r3, #0]
800b642: 683b ldr r3, [r7, #0]
800b644: 6899 ldr r1, [r3, #8]
800b646: 683b ldr r3, [r7, #0]
800b648: 685a ldr r2, [r3, #4]
800b64a: 683b ldr r3, [r7, #0]
800b64c: 68db ldr r3, [r3, #12]
800b64e: f000 fcbd bl 800bfcc <TIM_ETR_SetConfig>
htim->Instance->SMCR |= TIM_SMCR_ECE;
800b652: 687b ldr r3, [r7, #4]
800b654: 681b ldr r3, [r3, #0]
800b656: 689a ldr r2, [r3, #8]
800b658: 687b ldr r3, [r7, #4]
800b65a: 681b ldr r3, [r3, #0]
800b65c: f442 4280 orr.w r2, r2, #16384 ; 0x4000
800b660: 609a str r2, [r3, #8]
break;
800b662: e039 b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
TIM_TI1_ConfigInputStage(htim->Instance,
800b664: 687b ldr r3, [r7, #4]
800b666: 6818 ldr r0, [r3, #0]
800b668: 683b ldr r3, [r7, #0]
800b66a: 6859 ldr r1, [r3, #4]
800b66c: 683b ldr r3, [r7, #0]
800b66e: 68db ldr r3, [r3, #12]
800b670: 461a mov r2, r3
800b672: f000 fc31 bl 800bed8 <TIM_TI1_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1);
800b676: 687b ldr r3, [r7, #4]
800b678: 681b ldr r3, [r3, #0]
800b67a: 2150 movs r1, #80 ; 0x50
800b67c: 4618 mov r0, r3
800b67e: f000 fc8a bl 800bf96 <TIM_ITRx_SetConfig>
break;
800b682: e029 b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
TIM_TI2_ConfigInputStage(htim->Instance,
800b684: 687b ldr r3, [r7, #4]
800b686: 6818 ldr r0, [r3, #0]
800b688: 683b ldr r3, [r7, #0]
800b68a: 6859 ldr r1, [r3, #4]
800b68c: 683b ldr r3, [r7, #0]
800b68e: 68db ldr r3, [r3, #12]
800b690: 461a mov r2, r3
800b692: f000 fc50 bl 800bf36 <TIM_TI2_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI2);
800b696: 687b ldr r3, [r7, #4]
800b698: 681b ldr r3, [r3, #0]
800b69a: 2160 movs r1, #96 ; 0x60
800b69c: 4618 mov r0, r3
800b69e: f000 fc7a bl 800bf96 <TIM_ITRx_SetConfig>
break;
800b6a2: e019 b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
TIM_TI1_ConfigInputStage(htim->Instance,
800b6a4: 687b ldr r3, [r7, #4]
800b6a6: 6818 ldr r0, [r3, #0]
800b6a8: 683b ldr r3, [r7, #0]
800b6aa: 6859 ldr r1, [r3, #4]
800b6ac: 683b ldr r3, [r7, #0]
800b6ae: 68db ldr r3, [r3, #12]
800b6b0: 461a mov r2, r3
800b6b2: f000 fc11 bl 800bed8 <TIM_TI1_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1ED);
800b6b6: 687b ldr r3, [r7, #4]
800b6b8: 681b ldr r3, [r3, #0]
800b6ba: 2140 movs r1, #64 ; 0x40
800b6bc: 4618 mov r0, r3
800b6be: f000 fc6a bl 800bf96 <TIM_ITRx_SetConfig>
break;
800b6c2: e009 b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource);
800b6c4: 687b ldr r3, [r7, #4]
800b6c6: 681a ldr r2, [r3, #0]
800b6c8: 683b ldr r3, [r7, #0]
800b6ca: 681b ldr r3, [r3, #0]
800b6cc: 4619 mov r1, r3
800b6ce: 4610 mov r0, r2
800b6d0: f000 fc61 bl 800bf96 <TIM_ITRx_SetConfig>
break;
800b6d4: e000 b.n 800b6d8 <HAL_TIM_ConfigClockSource+0x154>
break;
800b6d6: bf00 nop
}
htim->State = HAL_TIM_STATE_READY;
800b6d8: 687b ldr r3, [r7, #4]
800b6da: 2201 movs r2, #1
800b6dc: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800b6e0: 687b ldr r3, [r7, #4]
800b6e2: 2200 movs r2, #0
800b6e4: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800b6e8: 2300 movs r3, #0
}
800b6ea: 4618 mov r0, r3
800b6ec: 3710 adds r7, #16
800b6ee: 46bd mov sp, r7
800b6f0: bd80 pop {r7, pc}
800b6f2: bf00 nop
800b6f4: fffeff88 .word 0xfffeff88
0800b6f8 <HAL_TIM_SlaveConfigSynchro>:
* timer input or external trigger input) and the Slave mode
* (Disable, Reset, Gated, Trigger, External clock mode 1).
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig)
{
800b6f8: b580 push {r7, lr}
800b6fa: b082 sub sp, #8
800b6fc: af00 add r7, sp, #0
800b6fe: 6078 str r0, [r7, #4]
800b700: 6039 str r1, [r7, #0]
/* Check the parameters */
assert_param(IS_TIM_SLAVE_INSTANCE(htim->Instance));
assert_param(IS_TIM_SLAVE_MODE(sSlaveConfig->SlaveMode));
assert_param(IS_TIM_TRIGGER_SELECTION(sSlaveConfig->InputTrigger));
__HAL_LOCK(htim);
800b702: 687b ldr r3, [r7, #4]
800b704: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800b708: 2b01 cmp r3, #1
800b70a: d101 bne.n 800b710 <HAL_TIM_SlaveConfigSynchro+0x18>
800b70c: 2302 movs r3, #2
800b70e: e031 b.n 800b774 <HAL_TIM_SlaveConfigSynchro+0x7c>
800b710: 687b ldr r3, [r7, #4]
800b712: 2201 movs r2, #1
800b714: f883 203c strb.w r2, [r3, #60] ; 0x3c
htim->State = HAL_TIM_STATE_BUSY;
800b718: 687b ldr r3, [r7, #4]
800b71a: 2202 movs r2, #2
800b71c: f883 203d strb.w r2, [r3, #61] ; 0x3d
if (TIM_SlaveTimer_SetConfig(htim, sSlaveConfig) != HAL_OK)
800b720: 6839 ldr r1, [r7, #0]
800b722: 6878 ldr r0, [r7, #4]
800b724: f000 fb50 bl 800bdc8 <TIM_SlaveTimer_SetConfig>
800b728: 4603 mov r3, r0
800b72a: 2b00 cmp r3, #0
800b72c: d009 beq.n 800b742 <HAL_TIM_SlaveConfigSynchro+0x4a>
{
htim->State = HAL_TIM_STATE_READY;
800b72e: 687b ldr r3, [r7, #4]
800b730: 2201 movs r2, #1
800b732: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800b736: 687b ldr r3, [r7, #4]
800b738: 2200 movs r2, #0
800b73a: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_ERROR;
800b73e: 2301 movs r3, #1
800b740: e018 b.n 800b774 <HAL_TIM_SlaveConfigSynchro+0x7c>
}
/* Disable Trigger Interrupt */
__HAL_TIM_DISABLE_IT(htim, TIM_IT_TRIGGER);
800b742: 687b ldr r3, [r7, #4]
800b744: 681b ldr r3, [r3, #0]
800b746: 68da ldr r2, [r3, #12]
800b748: 687b ldr r3, [r7, #4]
800b74a: 681b ldr r3, [r3, #0]
800b74c: f022 0240 bic.w r2, r2, #64 ; 0x40
800b750: 60da str r2, [r3, #12]
/* Disable Trigger DMA request */
__HAL_TIM_DISABLE_DMA(htim, TIM_DMA_TRIGGER);
800b752: 687b ldr r3, [r7, #4]
800b754: 681b ldr r3, [r3, #0]
800b756: 68da ldr r2, [r3, #12]
800b758: 687b ldr r3, [r7, #4]
800b75a: 681b ldr r3, [r3, #0]
800b75c: f422 4280 bic.w r2, r2, #16384 ; 0x4000
800b760: 60da str r2, [r3, #12]
htim->State = HAL_TIM_STATE_READY;
800b762: 687b ldr r3, [r7, #4]
800b764: 2201 movs r2, #1
800b766: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800b76a: 687b ldr r3, [r7, #4]
800b76c: 2200 movs r2, #0
800b76e: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800b772: 2300 movs r3, #0
}
800b774: 4618 mov r0, r3
800b776: 3708 adds r7, #8
800b778: 46bd mov sp, r7
800b77a: bd80 pop {r7, pc}
0800b77c <HAL_TIM_OC_DelayElapsedCallback>:
* @brief Output Compare callback in non-blocking mode
* @param htim TIM OC handle
* @retval None
*/
__weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim)
{
800b77c: b480 push {r7}
800b77e: b083 sub sp, #12
800b780: af00 add r7, sp, #0
800b782: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_OC_DelayElapsedCallback could be implemented in the user file
*/
}
800b784: bf00 nop
800b786: 370c adds r7, #12
800b788: 46bd mov sp, r7
800b78a: f85d 7b04 ldr.w r7, [sp], #4
800b78e: 4770 bx lr
0800b790 <HAL_TIM_IC_CaptureCallback>:
* @brief Input Capture callback in non-blocking mode
* @param htim TIM IC handle
* @retval None
*/
__weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{
800b790: b480 push {r7}
800b792: b083 sub sp, #12
800b794: af00 add r7, sp, #0
800b796: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_IC_CaptureCallback could be implemented in the user file
*/
}
800b798: bf00 nop
800b79a: 370c adds r7, #12
800b79c: 46bd mov sp, r7
800b79e: f85d 7b04 ldr.w r7, [sp], #4
800b7a2: 4770 bx lr
0800b7a4 <HAL_TIM_PWM_PulseFinishedCallback>:
* @brief PWM Pulse finished callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)
{
800b7a4: b480 push {r7}
800b7a6: b083 sub sp, #12
800b7a8: af00 add r7, sp, #0
800b7aa: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_PWM_PulseFinishedCallback could be implemented in the user file
*/
}
800b7ac: bf00 nop
800b7ae: 370c adds r7, #12
800b7b0: 46bd mov sp, r7
800b7b2: f85d 7b04 ldr.w r7, [sp], #4
800b7b6: 4770 bx lr
0800b7b8 <HAL_TIM_TriggerCallback>:
* @brief Hall Trigger detection callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim)
{
800b7b8: b480 push {r7}
800b7ba: b083 sub sp, #12
800b7bc: af00 add r7, sp, #0
800b7be: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIM_TriggerCallback could be implemented in the user file
*/
}
800b7c0: bf00 nop
800b7c2: 370c adds r7, #12
800b7c4: 46bd mov sp, r7
800b7c6: f85d 7b04 ldr.w r7, [sp], #4
800b7ca: 4770 bx lr
0800b7cc <TIM_Base_SetConfig>:
* @param TIMx TIM peripheral
* @param Structure TIM Base configuration structure
* @retval None
*/
void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)
{
800b7cc: b480 push {r7}
800b7ce: b085 sub sp, #20
800b7d0: af00 add r7, sp, #0
800b7d2: 6078 str r0, [r7, #4]
800b7d4: 6039 str r1, [r7, #0]
uint32_t tmpcr1;
tmpcr1 = TIMx->CR1;
800b7d6: 687b ldr r3, [r7, #4]
800b7d8: 681b ldr r3, [r3, #0]
800b7da: 60fb str r3, [r7, #12]
/* Set TIM Time Base Unit parameters ---------------------------------------*/
if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
800b7dc: 687b ldr r3, [r7, #4]
800b7de: 4a40 ldr r2, [pc, #256] ; (800b8e0 <TIM_Base_SetConfig+0x114>)
800b7e0: 4293 cmp r3, r2
800b7e2: d013 beq.n 800b80c <TIM_Base_SetConfig+0x40>
800b7e4: 687b ldr r3, [r7, #4]
800b7e6: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800b7ea: d00f beq.n 800b80c <TIM_Base_SetConfig+0x40>
800b7ec: 687b ldr r3, [r7, #4]
800b7ee: 4a3d ldr r2, [pc, #244] ; (800b8e4 <TIM_Base_SetConfig+0x118>)
800b7f0: 4293 cmp r3, r2
800b7f2: d00b beq.n 800b80c <TIM_Base_SetConfig+0x40>
800b7f4: 687b ldr r3, [r7, #4]
800b7f6: 4a3c ldr r2, [pc, #240] ; (800b8e8 <TIM_Base_SetConfig+0x11c>)
800b7f8: 4293 cmp r3, r2
800b7fa: d007 beq.n 800b80c <TIM_Base_SetConfig+0x40>
800b7fc: 687b ldr r3, [r7, #4]
800b7fe: 4a3b ldr r2, [pc, #236] ; (800b8ec <TIM_Base_SetConfig+0x120>)
800b800: 4293 cmp r3, r2
800b802: d003 beq.n 800b80c <TIM_Base_SetConfig+0x40>
800b804: 687b ldr r3, [r7, #4]
800b806: 4a3a ldr r2, [pc, #232] ; (800b8f0 <TIM_Base_SetConfig+0x124>)
800b808: 4293 cmp r3, r2
800b80a: d108 bne.n 800b81e <TIM_Base_SetConfig+0x52>
{
/* Select the Counter Mode */
tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
800b80c: 68fb ldr r3, [r7, #12]
800b80e: f023 0370 bic.w r3, r3, #112 ; 0x70
800b812: 60fb str r3, [r7, #12]
tmpcr1 |= Structure->CounterMode;
800b814: 683b ldr r3, [r7, #0]
800b816: 685b ldr r3, [r3, #4]
800b818: 68fa ldr r2, [r7, #12]
800b81a: 4313 orrs r3, r2
800b81c: 60fb str r3, [r7, #12]
}
if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
800b81e: 687b ldr r3, [r7, #4]
800b820: 4a2f ldr r2, [pc, #188] ; (800b8e0 <TIM_Base_SetConfig+0x114>)
800b822: 4293 cmp r3, r2
800b824: d02b beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b826: 687b ldr r3, [r7, #4]
800b828: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800b82c: d027 beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b82e: 687b ldr r3, [r7, #4]
800b830: 4a2c ldr r2, [pc, #176] ; (800b8e4 <TIM_Base_SetConfig+0x118>)
800b832: 4293 cmp r3, r2
800b834: d023 beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b836: 687b ldr r3, [r7, #4]
800b838: 4a2b ldr r2, [pc, #172] ; (800b8e8 <TIM_Base_SetConfig+0x11c>)
800b83a: 4293 cmp r3, r2
800b83c: d01f beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b83e: 687b ldr r3, [r7, #4]
800b840: 4a2a ldr r2, [pc, #168] ; (800b8ec <TIM_Base_SetConfig+0x120>)
800b842: 4293 cmp r3, r2
800b844: d01b beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b846: 687b ldr r3, [r7, #4]
800b848: 4a29 ldr r2, [pc, #164] ; (800b8f0 <TIM_Base_SetConfig+0x124>)
800b84a: 4293 cmp r3, r2
800b84c: d017 beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b84e: 687b ldr r3, [r7, #4]
800b850: 4a28 ldr r2, [pc, #160] ; (800b8f4 <TIM_Base_SetConfig+0x128>)
800b852: 4293 cmp r3, r2
800b854: d013 beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b856: 687b ldr r3, [r7, #4]
800b858: 4a27 ldr r2, [pc, #156] ; (800b8f8 <TIM_Base_SetConfig+0x12c>)
800b85a: 4293 cmp r3, r2
800b85c: d00f beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b85e: 687b ldr r3, [r7, #4]
800b860: 4a26 ldr r2, [pc, #152] ; (800b8fc <TIM_Base_SetConfig+0x130>)
800b862: 4293 cmp r3, r2
800b864: d00b beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b866: 687b ldr r3, [r7, #4]
800b868: 4a25 ldr r2, [pc, #148] ; (800b900 <TIM_Base_SetConfig+0x134>)
800b86a: 4293 cmp r3, r2
800b86c: d007 beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b86e: 687b ldr r3, [r7, #4]
800b870: 4a24 ldr r2, [pc, #144] ; (800b904 <TIM_Base_SetConfig+0x138>)
800b872: 4293 cmp r3, r2
800b874: d003 beq.n 800b87e <TIM_Base_SetConfig+0xb2>
800b876: 687b ldr r3, [r7, #4]
800b878: 4a23 ldr r2, [pc, #140] ; (800b908 <TIM_Base_SetConfig+0x13c>)
800b87a: 4293 cmp r3, r2
800b87c: d108 bne.n 800b890 <TIM_Base_SetConfig+0xc4>
{
/* Set the clock division */
tmpcr1 &= ~TIM_CR1_CKD;
800b87e: 68fb ldr r3, [r7, #12]
800b880: f423 7340 bic.w r3, r3, #768 ; 0x300
800b884: 60fb str r3, [r7, #12]
tmpcr1 |= (uint32_t)Structure->ClockDivision;
800b886: 683b ldr r3, [r7, #0]
800b888: 68db ldr r3, [r3, #12]
800b88a: 68fa ldr r2, [r7, #12]
800b88c: 4313 orrs r3, r2
800b88e: 60fb str r3, [r7, #12]
}
/* Set the auto-reload preload */
MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
800b890: 68fb ldr r3, [r7, #12]
800b892: f023 0280 bic.w r2, r3, #128 ; 0x80
800b896: 683b ldr r3, [r7, #0]
800b898: 695b ldr r3, [r3, #20]
800b89a: 4313 orrs r3, r2
800b89c: 60fb str r3, [r7, #12]
TIMx->CR1 = tmpcr1;
800b89e: 687b ldr r3, [r7, #4]
800b8a0: 68fa ldr r2, [r7, #12]
800b8a2: 601a str r2, [r3, #0]
/* Set the Autoreload value */
TIMx->ARR = (uint32_t)Structure->Period ;
800b8a4: 683b ldr r3, [r7, #0]
800b8a6: 689a ldr r2, [r3, #8]
800b8a8: 687b ldr r3, [r7, #4]
800b8aa: 62da str r2, [r3, #44] ; 0x2c
/* Set the Prescaler value */
TIMx->PSC = Structure->Prescaler;
800b8ac: 683b ldr r3, [r7, #0]
800b8ae: 681a ldr r2, [r3, #0]
800b8b0: 687b ldr r3, [r7, #4]
800b8b2: 629a str r2, [r3, #40] ; 0x28
if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
800b8b4: 687b ldr r3, [r7, #4]
800b8b6: 4a0a ldr r2, [pc, #40] ; (800b8e0 <TIM_Base_SetConfig+0x114>)
800b8b8: 4293 cmp r3, r2
800b8ba: d003 beq.n 800b8c4 <TIM_Base_SetConfig+0xf8>
800b8bc: 687b ldr r3, [r7, #4]
800b8be: 4a0c ldr r2, [pc, #48] ; (800b8f0 <TIM_Base_SetConfig+0x124>)
800b8c0: 4293 cmp r3, r2
800b8c2: d103 bne.n 800b8cc <TIM_Base_SetConfig+0x100>
{
/* Set the Repetition Counter value */
TIMx->RCR = Structure->RepetitionCounter;
800b8c4: 683b ldr r3, [r7, #0]
800b8c6: 691a ldr r2, [r3, #16]
800b8c8: 687b ldr r3, [r7, #4]
800b8ca: 631a str r2, [r3, #48] ; 0x30
}
/* Generate an update event to reload the Prescaler
and the repetition counter (only for advanced timer) value immediately */
TIMx->EGR = TIM_EGR_UG;
800b8cc: 687b ldr r3, [r7, #4]
800b8ce: 2201 movs r2, #1
800b8d0: 615a str r2, [r3, #20]
}
800b8d2: bf00 nop
800b8d4: 3714 adds r7, #20
800b8d6: 46bd mov sp, r7
800b8d8: f85d 7b04 ldr.w r7, [sp], #4
800b8dc: 4770 bx lr
800b8de: bf00 nop
800b8e0: 40010000 .word 0x40010000
800b8e4: 40000400 .word 0x40000400
800b8e8: 40000800 .word 0x40000800
800b8ec: 40000c00 .word 0x40000c00
800b8f0: 40010400 .word 0x40010400
800b8f4: 40014000 .word 0x40014000
800b8f8: 40014400 .word 0x40014400
800b8fc: 40014800 .word 0x40014800
800b900: 40001800 .word 0x40001800
800b904: 40001c00 .word 0x40001c00
800b908: 40002000 .word 0x40002000
0800b90c <TIM_OC1_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The ouput configuration structure
* @retval None
*/
static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
{
800b90c: b480 push {r7}
800b90e: b087 sub sp, #28
800b910: af00 add r7, sp, #0
800b912: 6078 str r0, [r7, #4]
800b914: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 1: Reset the CC1E Bit */
TIMx->CCER &= ~TIM_CCER_CC1E;
800b916: 687b ldr r3, [r7, #4]
800b918: 6a1b ldr r3, [r3, #32]
800b91a: f023 0201 bic.w r2, r3, #1
800b91e: 687b ldr r3, [r7, #4]
800b920: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800b922: 687b ldr r3, [r7, #4]
800b924: 6a1b ldr r3, [r3, #32]
800b926: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800b928: 687b ldr r3, [r7, #4]
800b92a: 685b ldr r3, [r3, #4]
800b92c: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
800b92e: 687b ldr r3, [r7, #4]
800b930: 699b ldr r3, [r3, #24]
800b932: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~TIM_CCMR1_OC1M;
800b934: 68fa ldr r2, [r7, #12]
800b936: 4b2b ldr r3, [pc, #172] ; (800b9e4 <TIM_OC1_SetConfig+0xd8>)
800b938: 4013 ands r3, r2
800b93a: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC1S;
800b93c: 68fb ldr r3, [r7, #12]
800b93e: f023 0303 bic.w r3, r3, #3
800b942: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
800b944: 683b ldr r3, [r7, #0]
800b946: 681b ldr r3, [r3, #0]
800b948: 68fa ldr r2, [r7, #12]
800b94a: 4313 orrs r3, r2
800b94c: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC1P;
800b94e: 697b ldr r3, [r7, #20]
800b950: f023 0302 bic.w r3, r3, #2
800b954: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= OC_Config->OCPolarity;
800b956: 683b ldr r3, [r7, #0]
800b958: 689b ldr r3, [r3, #8]
800b95a: 697a ldr r2, [r7, #20]
800b95c: 4313 orrs r3, r2
800b95e: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_1))
800b960: 687b ldr r3, [r7, #4]
800b962: 4a21 ldr r2, [pc, #132] ; (800b9e8 <TIM_OC1_SetConfig+0xdc>)
800b964: 4293 cmp r3, r2
800b966: d003 beq.n 800b970 <TIM_OC1_SetConfig+0x64>
800b968: 687b ldr r3, [r7, #4]
800b96a: 4a20 ldr r2, [pc, #128] ; (800b9ec <TIM_OC1_SetConfig+0xe0>)
800b96c: 4293 cmp r3, r2
800b96e: d10c bne.n 800b98a <TIM_OC1_SetConfig+0x7e>
{
/* Check parameters */
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC1NP;
800b970: 697b ldr r3, [r7, #20]
800b972: f023 0308 bic.w r3, r3, #8
800b976: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= OC_Config->OCNPolarity;
800b978: 683b ldr r3, [r7, #0]
800b97a: 68db ldr r3, [r3, #12]
800b97c: 697a ldr r2, [r7, #20]
800b97e: 4313 orrs r3, r2
800b980: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC1NE;
800b982: 697b ldr r3, [r7, #20]
800b984: f023 0304 bic.w r3, r3, #4
800b988: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
800b98a: 687b ldr r3, [r7, #4]
800b98c: 4a16 ldr r2, [pc, #88] ; (800b9e8 <TIM_OC1_SetConfig+0xdc>)
800b98e: 4293 cmp r3, r2
800b990: d003 beq.n 800b99a <TIM_OC1_SetConfig+0x8e>
800b992: 687b ldr r3, [r7, #4]
800b994: 4a15 ldr r2, [pc, #84] ; (800b9ec <TIM_OC1_SetConfig+0xe0>)
800b996: 4293 cmp r3, r2
800b998: d111 bne.n 800b9be <TIM_OC1_SetConfig+0xb2>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS1;
800b99a: 693b ldr r3, [r7, #16]
800b99c: f423 7380 bic.w r3, r3, #256 ; 0x100
800b9a0: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS1N;
800b9a2: 693b ldr r3, [r7, #16]
800b9a4: f423 7300 bic.w r3, r3, #512 ; 0x200
800b9a8: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= OC_Config->OCIdleState;
800b9aa: 683b ldr r3, [r7, #0]
800b9ac: 695b ldr r3, [r3, #20]
800b9ae: 693a ldr r2, [r7, #16]
800b9b0: 4313 orrs r3, r2
800b9b2: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= OC_Config->OCNIdleState;
800b9b4: 683b ldr r3, [r7, #0]
800b9b6: 699b ldr r3, [r3, #24]
800b9b8: 693a ldr r2, [r7, #16]
800b9ba: 4313 orrs r3, r2
800b9bc: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800b9be: 687b ldr r3, [r7, #4]
800b9c0: 693a ldr r2, [r7, #16]
800b9c2: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
800b9c4: 687b ldr r3, [r7, #4]
800b9c6: 68fa ldr r2, [r7, #12]
800b9c8: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR1 = OC_Config->Pulse;
800b9ca: 683b ldr r3, [r7, #0]
800b9cc: 685a ldr r2, [r3, #4]
800b9ce: 687b ldr r3, [r7, #4]
800b9d0: 635a str r2, [r3, #52] ; 0x34
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800b9d2: 687b ldr r3, [r7, #4]
800b9d4: 697a ldr r2, [r7, #20]
800b9d6: 621a str r2, [r3, #32]
}
800b9d8: bf00 nop
800b9da: 371c adds r7, #28
800b9dc: 46bd mov sp, r7
800b9de: f85d 7b04 ldr.w r7, [sp], #4
800b9e2: 4770 bx lr
800b9e4: fffeff8f .word 0xfffeff8f
800b9e8: 40010000 .word 0x40010000
800b9ec: 40010400 .word 0x40010400
0800b9f0 <TIM_OC2_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The ouput configuration structure
* @retval None
*/
void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
{
800b9f0: b480 push {r7}
800b9f2: b087 sub sp, #28
800b9f4: af00 add r7, sp, #0
800b9f6: 6078 str r0, [r7, #4]
800b9f8: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 2: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC2E;
800b9fa: 687b ldr r3, [r7, #4]
800b9fc: 6a1b ldr r3, [r3, #32]
800b9fe: f023 0210 bic.w r2, r3, #16
800ba02: 687b ldr r3, [r7, #4]
800ba04: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800ba06: 687b ldr r3, [r7, #4]
800ba08: 6a1b ldr r3, [r3, #32]
800ba0a: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800ba0c: 687b ldr r3, [r7, #4]
800ba0e: 685b ldr r3, [r3, #4]
800ba10: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
800ba12: 687b ldr r3, [r7, #4]
800ba14: 699b ldr r3, [r3, #24]
800ba16: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR1_OC2M;
800ba18: 68fa ldr r2, [r7, #12]
800ba1a: 4b2e ldr r3, [pc, #184] ; (800bad4 <TIM_OC2_SetConfig+0xe4>)
800ba1c: 4013 ands r3, r2
800ba1e: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC2S;
800ba20: 68fb ldr r3, [r7, #12]
800ba22: f423 7340 bic.w r3, r3, #768 ; 0x300
800ba26: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
800ba28: 683b ldr r3, [r7, #0]
800ba2a: 681b ldr r3, [r3, #0]
800ba2c: 021b lsls r3, r3, #8
800ba2e: 68fa ldr r2, [r7, #12]
800ba30: 4313 orrs r3, r2
800ba32: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC2P;
800ba34: 697b ldr r3, [r7, #20]
800ba36: f023 0320 bic.w r3, r3, #32
800ba3a: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 4U);
800ba3c: 683b ldr r3, [r7, #0]
800ba3e: 689b ldr r3, [r3, #8]
800ba40: 011b lsls r3, r3, #4
800ba42: 697a ldr r2, [r7, #20]
800ba44: 4313 orrs r3, r2
800ba46: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_2))
800ba48: 687b ldr r3, [r7, #4]
800ba4a: 4a23 ldr r2, [pc, #140] ; (800bad8 <TIM_OC2_SetConfig+0xe8>)
800ba4c: 4293 cmp r3, r2
800ba4e: d003 beq.n 800ba58 <TIM_OC2_SetConfig+0x68>
800ba50: 687b ldr r3, [r7, #4]
800ba52: 4a22 ldr r2, [pc, #136] ; (800badc <TIM_OC2_SetConfig+0xec>)
800ba54: 4293 cmp r3, r2
800ba56: d10d bne.n 800ba74 <TIM_OC2_SetConfig+0x84>
{
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC2NP;
800ba58: 697b ldr r3, [r7, #20]
800ba5a: f023 0380 bic.w r3, r3, #128 ; 0x80
800ba5e: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= (OC_Config->OCNPolarity << 4U);
800ba60: 683b ldr r3, [r7, #0]
800ba62: 68db ldr r3, [r3, #12]
800ba64: 011b lsls r3, r3, #4
800ba66: 697a ldr r2, [r7, #20]
800ba68: 4313 orrs r3, r2
800ba6a: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC2NE;
800ba6c: 697b ldr r3, [r7, #20]
800ba6e: f023 0340 bic.w r3, r3, #64 ; 0x40
800ba72: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
800ba74: 687b ldr r3, [r7, #4]
800ba76: 4a18 ldr r2, [pc, #96] ; (800bad8 <TIM_OC2_SetConfig+0xe8>)
800ba78: 4293 cmp r3, r2
800ba7a: d003 beq.n 800ba84 <TIM_OC2_SetConfig+0x94>
800ba7c: 687b ldr r3, [r7, #4]
800ba7e: 4a17 ldr r2, [pc, #92] ; (800badc <TIM_OC2_SetConfig+0xec>)
800ba80: 4293 cmp r3, r2
800ba82: d113 bne.n 800baac <TIM_OC2_SetConfig+0xbc>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS2;
800ba84: 693b ldr r3, [r7, #16]
800ba86: f423 6380 bic.w r3, r3, #1024 ; 0x400
800ba8a: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS2N;
800ba8c: 693b ldr r3, [r7, #16]
800ba8e: f423 6300 bic.w r3, r3, #2048 ; 0x800
800ba92: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 2U);
800ba94: 683b ldr r3, [r7, #0]
800ba96: 695b ldr r3, [r3, #20]
800ba98: 009b lsls r3, r3, #2
800ba9a: 693a ldr r2, [r7, #16]
800ba9c: 4313 orrs r3, r2
800ba9e: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= (OC_Config->OCNIdleState << 2U);
800baa0: 683b ldr r3, [r7, #0]
800baa2: 699b ldr r3, [r3, #24]
800baa4: 009b lsls r3, r3, #2
800baa6: 693a ldr r2, [r7, #16]
800baa8: 4313 orrs r3, r2
800baaa: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800baac: 687b ldr r3, [r7, #4]
800baae: 693a ldr r2, [r7, #16]
800bab0: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
800bab2: 687b ldr r3, [r7, #4]
800bab4: 68fa ldr r2, [r7, #12]
800bab6: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR2 = OC_Config->Pulse;
800bab8: 683b ldr r3, [r7, #0]
800baba: 685a ldr r2, [r3, #4]
800babc: 687b ldr r3, [r7, #4]
800babe: 639a str r2, [r3, #56] ; 0x38
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800bac0: 687b ldr r3, [r7, #4]
800bac2: 697a ldr r2, [r7, #20]
800bac4: 621a str r2, [r3, #32]
}
800bac6: bf00 nop
800bac8: 371c adds r7, #28
800baca: 46bd mov sp, r7
800bacc: f85d 7b04 ldr.w r7, [sp], #4
800bad0: 4770 bx lr
800bad2: bf00 nop
800bad4: feff8fff .word 0xfeff8fff
800bad8: 40010000 .word 0x40010000
800badc: 40010400 .word 0x40010400
0800bae0 <TIM_OC3_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The ouput configuration structure
* @retval None
*/
static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
{
800bae0: b480 push {r7}
800bae2: b087 sub sp, #28
800bae4: af00 add r7, sp, #0
800bae6: 6078 str r0, [r7, #4]
800bae8: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 3: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC3E;
800baea: 687b ldr r3, [r7, #4]
800baec: 6a1b ldr r3, [r3, #32]
800baee: f423 7280 bic.w r2, r3, #256 ; 0x100
800baf2: 687b ldr r3, [r7, #4]
800baf4: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800baf6: 687b ldr r3, [r7, #4]
800baf8: 6a1b ldr r3, [r3, #32]
800bafa: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800bafc: 687b ldr r3, [r7, #4]
800bafe: 685b ldr r3, [r3, #4]
800bb00: 613b str r3, [r7, #16]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
800bb02: 687b ldr r3, [r7, #4]
800bb04: 69db ldr r3, [r3, #28]
800bb06: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC3M;
800bb08: 68fa ldr r2, [r7, #12]
800bb0a: 4b2d ldr r3, [pc, #180] ; (800bbc0 <TIM_OC3_SetConfig+0xe0>)
800bb0c: 4013 ands r3, r2
800bb0e: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC3S;
800bb10: 68fb ldr r3, [r7, #12]
800bb12: f023 0303 bic.w r3, r3, #3
800bb16: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
800bb18: 683b ldr r3, [r7, #0]
800bb1a: 681b ldr r3, [r3, #0]
800bb1c: 68fa ldr r2, [r7, #12]
800bb1e: 4313 orrs r3, r2
800bb20: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC3P;
800bb22: 697b ldr r3, [r7, #20]
800bb24: f423 7300 bic.w r3, r3, #512 ; 0x200
800bb28: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 8U);
800bb2a: 683b ldr r3, [r7, #0]
800bb2c: 689b ldr r3, [r3, #8]
800bb2e: 021b lsls r3, r3, #8
800bb30: 697a ldr r2, [r7, #20]
800bb32: 4313 orrs r3, r2
800bb34: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_3))
800bb36: 687b ldr r3, [r7, #4]
800bb38: 4a22 ldr r2, [pc, #136] ; (800bbc4 <TIM_OC3_SetConfig+0xe4>)
800bb3a: 4293 cmp r3, r2
800bb3c: d003 beq.n 800bb46 <TIM_OC3_SetConfig+0x66>
800bb3e: 687b ldr r3, [r7, #4]
800bb40: 4a21 ldr r2, [pc, #132] ; (800bbc8 <TIM_OC3_SetConfig+0xe8>)
800bb42: 4293 cmp r3, r2
800bb44: d10d bne.n 800bb62 <TIM_OC3_SetConfig+0x82>
{
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC3NP;
800bb46: 697b ldr r3, [r7, #20]
800bb48: f423 6300 bic.w r3, r3, #2048 ; 0x800
800bb4c: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= (OC_Config->OCNPolarity << 8U);
800bb4e: 683b ldr r3, [r7, #0]
800bb50: 68db ldr r3, [r3, #12]
800bb52: 021b lsls r3, r3, #8
800bb54: 697a ldr r2, [r7, #20]
800bb56: 4313 orrs r3, r2
800bb58: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC3NE;
800bb5a: 697b ldr r3, [r7, #20]
800bb5c: f423 6380 bic.w r3, r3, #1024 ; 0x400
800bb60: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
800bb62: 687b ldr r3, [r7, #4]
800bb64: 4a17 ldr r2, [pc, #92] ; (800bbc4 <TIM_OC3_SetConfig+0xe4>)
800bb66: 4293 cmp r3, r2
800bb68: d003 beq.n 800bb72 <TIM_OC3_SetConfig+0x92>
800bb6a: 687b ldr r3, [r7, #4]
800bb6c: 4a16 ldr r2, [pc, #88] ; (800bbc8 <TIM_OC3_SetConfig+0xe8>)
800bb6e: 4293 cmp r3, r2
800bb70: d113 bne.n 800bb9a <TIM_OC3_SetConfig+0xba>
/* Check parameters */
assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare and Output Compare N IDLE State */
tmpcr2 &= ~TIM_CR2_OIS3;
800bb72: 693b ldr r3, [r7, #16]
800bb74: f423 5380 bic.w r3, r3, #4096 ; 0x1000
800bb78: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS3N;
800bb7a: 693b ldr r3, [r7, #16]
800bb7c: f423 5300 bic.w r3, r3, #8192 ; 0x2000
800bb80: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 4U);
800bb82: 683b ldr r3, [r7, #0]
800bb84: 695b ldr r3, [r3, #20]
800bb86: 011b lsls r3, r3, #4
800bb88: 693a ldr r2, [r7, #16]
800bb8a: 4313 orrs r3, r2
800bb8c: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= (OC_Config->OCNIdleState << 4U);
800bb8e: 683b ldr r3, [r7, #0]
800bb90: 699b ldr r3, [r3, #24]
800bb92: 011b lsls r3, r3, #4
800bb94: 693a ldr r2, [r7, #16]
800bb96: 4313 orrs r3, r2
800bb98: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800bb9a: 687b ldr r3, [r7, #4]
800bb9c: 693a ldr r2, [r7, #16]
800bb9e: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
800bba0: 687b ldr r3, [r7, #4]
800bba2: 68fa ldr r2, [r7, #12]
800bba4: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR3 = OC_Config->Pulse;
800bba6: 683b ldr r3, [r7, #0]
800bba8: 685a ldr r2, [r3, #4]
800bbaa: 687b ldr r3, [r7, #4]
800bbac: 63da str r2, [r3, #60] ; 0x3c
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800bbae: 687b ldr r3, [r7, #4]
800bbb0: 697a ldr r2, [r7, #20]
800bbb2: 621a str r2, [r3, #32]
}
800bbb4: bf00 nop
800bbb6: 371c adds r7, #28
800bbb8: 46bd mov sp, r7
800bbba: f85d 7b04 ldr.w r7, [sp], #4
800bbbe: 4770 bx lr
800bbc0: fffeff8f .word 0xfffeff8f
800bbc4: 40010000 .word 0x40010000
800bbc8: 40010400 .word 0x40010400
0800bbcc <TIM_OC4_SetConfig>:
* @param TIMx to select the TIM peripheral
* @param OC_Config The ouput configuration structure
* @retval None
*/
static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
{
800bbcc: b480 push {r7}
800bbce: b087 sub sp, #28
800bbd0: af00 add r7, sp, #0
800bbd2: 6078 str r0, [r7, #4]
800bbd4: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the Channel 4: Reset the CC4E Bit */
TIMx->CCER &= ~TIM_CCER_CC4E;
800bbd6: 687b ldr r3, [r7, #4]
800bbd8: 6a1b ldr r3, [r3, #32]
800bbda: f423 5280 bic.w r2, r3, #4096 ; 0x1000
800bbde: 687b ldr r3, [r7, #4]
800bbe0: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800bbe2: 687b ldr r3, [r7, #4]
800bbe4: 6a1b ldr r3, [r3, #32]
800bbe6: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800bbe8: 687b ldr r3, [r7, #4]
800bbea: 685b ldr r3, [r3, #4]
800bbec: 617b str r3, [r7, #20]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
800bbee: 687b ldr r3, [r7, #4]
800bbf0: 69db ldr r3, [r3, #28]
800bbf2: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC4M;
800bbf4: 68fa ldr r2, [r7, #12]
800bbf6: 4b1e ldr r3, [pc, #120] ; (800bc70 <TIM_OC4_SetConfig+0xa4>)
800bbf8: 4013 ands r3, r2
800bbfa: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC4S;
800bbfc: 68fb ldr r3, [r7, #12]
800bbfe: f423 7340 bic.w r3, r3, #768 ; 0x300
800bc02: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
800bc04: 683b ldr r3, [r7, #0]
800bc06: 681b ldr r3, [r3, #0]
800bc08: 021b lsls r3, r3, #8
800bc0a: 68fa ldr r2, [r7, #12]
800bc0c: 4313 orrs r3, r2
800bc0e: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC4P;
800bc10: 693b ldr r3, [r7, #16]
800bc12: f423 5300 bic.w r3, r3, #8192 ; 0x2000
800bc16: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 12U);
800bc18: 683b ldr r3, [r7, #0]
800bc1a: 689b ldr r3, [r3, #8]
800bc1c: 031b lsls r3, r3, #12
800bc1e: 693a ldr r2, [r7, #16]
800bc20: 4313 orrs r3, r2
800bc22: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
800bc24: 687b ldr r3, [r7, #4]
800bc26: 4a13 ldr r2, [pc, #76] ; (800bc74 <TIM_OC4_SetConfig+0xa8>)
800bc28: 4293 cmp r3, r2
800bc2a: d003 beq.n 800bc34 <TIM_OC4_SetConfig+0x68>
800bc2c: 687b ldr r3, [r7, #4]
800bc2e: 4a12 ldr r2, [pc, #72] ; (800bc78 <TIM_OC4_SetConfig+0xac>)
800bc30: 4293 cmp r3, r2
800bc32: d109 bne.n 800bc48 <TIM_OC4_SetConfig+0x7c>
{
/* Check parameters */
assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS4;
800bc34: 697b ldr r3, [r7, #20]
800bc36: f423 4380 bic.w r3, r3, #16384 ; 0x4000
800bc3a: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 6U);
800bc3c: 683b ldr r3, [r7, #0]
800bc3e: 695b ldr r3, [r3, #20]
800bc40: 019b lsls r3, r3, #6
800bc42: 697a ldr r2, [r7, #20]
800bc44: 4313 orrs r3, r2
800bc46: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800bc48: 687b ldr r3, [r7, #4]
800bc4a: 697a ldr r2, [r7, #20]
800bc4c: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
800bc4e: 687b ldr r3, [r7, #4]
800bc50: 68fa ldr r2, [r7, #12]
800bc52: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR4 = OC_Config->Pulse;
800bc54: 683b ldr r3, [r7, #0]
800bc56: 685a ldr r2, [r3, #4]
800bc58: 687b ldr r3, [r7, #4]
800bc5a: 641a str r2, [r3, #64] ; 0x40
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800bc5c: 687b ldr r3, [r7, #4]
800bc5e: 693a ldr r2, [r7, #16]
800bc60: 621a str r2, [r3, #32]
}
800bc62: bf00 nop
800bc64: 371c adds r7, #28
800bc66: 46bd mov sp, r7
800bc68: f85d 7b04 ldr.w r7, [sp], #4
800bc6c: 4770 bx lr
800bc6e: bf00 nop
800bc70: feff8fff .word 0xfeff8fff
800bc74: 40010000 .word 0x40010000
800bc78: 40010400 .word 0x40010400
0800bc7c <TIM_OC5_SetConfig>:
* @param OC_Config The ouput configuration structure
* @retval None
*/
static void TIM_OC5_SetConfig(TIM_TypeDef *TIMx,
TIM_OC_InitTypeDef *OC_Config)
{
800bc7c: b480 push {r7}
800bc7e: b087 sub sp, #28
800bc80: af00 add r7, sp, #0
800bc82: 6078 str r0, [r7, #4]
800bc84: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the output: Reset the CCxE Bit */
TIMx->CCER &= ~TIM_CCER_CC5E;
800bc86: 687b ldr r3, [r7, #4]
800bc88: 6a1b ldr r3, [r3, #32]
800bc8a: f423 3280 bic.w r2, r3, #65536 ; 0x10000
800bc8e: 687b ldr r3, [r7, #4]
800bc90: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800bc92: 687b ldr r3, [r7, #4]
800bc94: 6a1b ldr r3, [r3, #32]
800bc96: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800bc98: 687b ldr r3, [r7, #4]
800bc9a: 685b ldr r3, [r3, #4]
800bc9c: 617b str r3, [r7, #20]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR3;
800bc9e: 687b ldr r3, [r7, #4]
800bca0: 6d5b ldr r3, [r3, #84] ; 0x54
800bca2: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~(TIM_CCMR3_OC5M);
800bca4: 68fa ldr r2, [r7, #12]
800bca6: 4b1b ldr r3, [pc, #108] ; (800bd14 <TIM_OC5_SetConfig+0x98>)
800bca8: 4013 ands r3, r2
800bcaa: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
800bcac: 683b ldr r3, [r7, #0]
800bcae: 681b ldr r3, [r3, #0]
800bcb0: 68fa ldr r2, [r7, #12]
800bcb2: 4313 orrs r3, r2
800bcb4: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC5P;
800bcb6: 693b ldr r3, [r7, #16]
800bcb8: f423 3300 bic.w r3, r3, #131072 ; 0x20000
800bcbc: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 16U);
800bcbe: 683b ldr r3, [r7, #0]
800bcc0: 689b ldr r3, [r3, #8]
800bcc2: 041b lsls r3, r3, #16
800bcc4: 693a ldr r2, [r7, #16]
800bcc6: 4313 orrs r3, r2
800bcc8: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
800bcca: 687b ldr r3, [r7, #4]
800bccc: 4a12 ldr r2, [pc, #72] ; (800bd18 <TIM_OC5_SetConfig+0x9c>)
800bcce: 4293 cmp r3, r2
800bcd0: d003 beq.n 800bcda <TIM_OC5_SetConfig+0x5e>
800bcd2: 687b ldr r3, [r7, #4]
800bcd4: 4a11 ldr r2, [pc, #68] ; (800bd1c <TIM_OC5_SetConfig+0xa0>)
800bcd6: 4293 cmp r3, r2
800bcd8: d109 bne.n 800bcee <TIM_OC5_SetConfig+0x72>
{
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS5;
800bcda: 697b ldr r3, [r7, #20]
800bcdc: f423 3380 bic.w r3, r3, #65536 ; 0x10000
800bce0: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 8U);
800bce2: 683b ldr r3, [r7, #0]
800bce4: 695b ldr r3, [r3, #20]
800bce6: 021b lsls r3, r3, #8
800bce8: 697a ldr r2, [r7, #20]
800bcea: 4313 orrs r3, r2
800bcec: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800bcee: 687b ldr r3, [r7, #4]
800bcf0: 697a ldr r2, [r7, #20]
800bcf2: 605a str r2, [r3, #4]
/* Write to TIMx CCMR3 */
TIMx->CCMR3 = tmpccmrx;
800bcf4: 687b ldr r3, [r7, #4]
800bcf6: 68fa ldr r2, [r7, #12]
800bcf8: 655a str r2, [r3, #84] ; 0x54
/* Set the Capture Compare Register value */
TIMx->CCR5 = OC_Config->Pulse;
800bcfa: 683b ldr r3, [r7, #0]
800bcfc: 685a ldr r2, [r3, #4]
800bcfe: 687b ldr r3, [r7, #4]
800bd00: 659a str r2, [r3, #88] ; 0x58
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800bd02: 687b ldr r3, [r7, #4]
800bd04: 693a ldr r2, [r7, #16]
800bd06: 621a str r2, [r3, #32]
}
800bd08: bf00 nop
800bd0a: 371c adds r7, #28
800bd0c: 46bd mov sp, r7
800bd0e: f85d 7b04 ldr.w r7, [sp], #4
800bd12: 4770 bx lr
800bd14: fffeff8f .word 0xfffeff8f
800bd18: 40010000 .word 0x40010000
800bd1c: 40010400 .word 0x40010400
0800bd20 <TIM_OC6_SetConfig>:
* @param OC_Config The ouput configuration structure
* @retval None
*/
static void TIM_OC6_SetConfig(TIM_TypeDef *TIMx,
TIM_OC_InitTypeDef *OC_Config)
{
800bd20: b480 push {r7}
800bd22: b087 sub sp, #28
800bd24: af00 add r7, sp, #0
800bd26: 6078 str r0, [r7, #4]
800bd28: 6039 str r1, [r7, #0]
uint32_t tmpccmrx;
uint32_t tmpccer;
uint32_t tmpcr2;
/* Disable the output: Reset the CCxE Bit */
TIMx->CCER &= ~TIM_CCER_CC6E;
800bd2a: 687b ldr r3, [r7, #4]
800bd2c: 6a1b ldr r3, [r3, #32]
800bd2e: f423 1280 bic.w r2, r3, #1048576 ; 0x100000
800bd32: 687b ldr r3, [r7, #4]
800bd34: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800bd36: 687b ldr r3, [r7, #4]
800bd38: 6a1b ldr r3, [r3, #32]
800bd3a: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800bd3c: 687b ldr r3, [r7, #4]
800bd3e: 685b ldr r3, [r3, #4]
800bd40: 617b str r3, [r7, #20]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR3;
800bd42: 687b ldr r3, [r7, #4]
800bd44: 6d5b ldr r3, [r3, #84] ; 0x54
800bd46: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~(TIM_CCMR3_OC6M);
800bd48: 68fa ldr r2, [r7, #12]
800bd4a: 4b1c ldr r3, [pc, #112] ; (800bdbc <TIM_OC6_SetConfig+0x9c>)
800bd4c: 4013 ands r3, r2
800bd4e: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
800bd50: 683b ldr r3, [r7, #0]
800bd52: 681b ldr r3, [r3, #0]
800bd54: 021b lsls r3, r3, #8
800bd56: 68fa ldr r2, [r7, #12]
800bd58: 4313 orrs r3, r2
800bd5a: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= (uint32_t)~TIM_CCER_CC6P;
800bd5c: 693b ldr r3, [r7, #16]
800bd5e: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
800bd62: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 20U);
800bd64: 683b ldr r3, [r7, #0]
800bd66: 689b ldr r3, [r3, #8]
800bd68: 051b lsls r3, r3, #20
800bd6a: 693a ldr r2, [r7, #16]
800bd6c: 4313 orrs r3, r2
800bd6e: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
800bd70: 687b ldr r3, [r7, #4]
800bd72: 4a13 ldr r2, [pc, #76] ; (800bdc0 <TIM_OC6_SetConfig+0xa0>)
800bd74: 4293 cmp r3, r2
800bd76: d003 beq.n 800bd80 <TIM_OC6_SetConfig+0x60>
800bd78: 687b ldr r3, [r7, #4]
800bd7a: 4a12 ldr r2, [pc, #72] ; (800bdc4 <TIM_OC6_SetConfig+0xa4>)
800bd7c: 4293 cmp r3, r2
800bd7e: d109 bne.n 800bd94 <TIM_OC6_SetConfig+0x74>
{
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS6;
800bd80: 697b ldr r3, [r7, #20]
800bd82: f423 2380 bic.w r3, r3, #262144 ; 0x40000
800bd86: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 10U);
800bd88: 683b ldr r3, [r7, #0]
800bd8a: 695b ldr r3, [r3, #20]
800bd8c: 029b lsls r3, r3, #10
800bd8e: 697a ldr r2, [r7, #20]
800bd90: 4313 orrs r3, r2
800bd92: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800bd94: 687b ldr r3, [r7, #4]
800bd96: 697a ldr r2, [r7, #20]
800bd98: 605a str r2, [r3, #4]
/* Write to TIMx CCMR3 */
TIMx->CCMR3 = tmpccmrx;
800bd9a: 687b ldr r3, [r7, #4]
800bd9c: 68fa ldr r2, [r7, #12]
800bd9e: 655a str r2, [r3, #84] ; 0x54
/* Set the Capture Compare Register value */
TIMx->CCR6 = OC_Config->Pulse;
800bda0: 683b ldr r3, [r7, #0]
800bda2: 685a ldr r2, [r3, #4]
800bda4: 687b ldr r3, [r7, #4]
800bda6: 65da str r2, [r3, #92] ; 0x5c
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800bda8: 687b ldr r3, [r7, #4]
800bdaa: 693a ldr r2, [r7, #16]
800bdac: 621a str r2, [r3, #32]
}
800bdae: bf00 nop
800bdb0: 371c adds r7, #28
800bdb2: 46bd mov sp, r7
800bdb4: f85d 7b04 ldr.w r7, [sp], #4
800bdb8: 4770 bx lr
800bdba: bf00 nop
800bdbc: feff8fff .word 0xfeff8fff
800bdc0: 40010000 .word 0x40010000
800bdc4: 40010400 .word 0x40010400
0800bdc8 <TIM_SlaveTimer_SetConfig>:
* @param sSlaveConfig Slave timer configuration
* @retval None
*/
static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig(TIM_HandleTypeDef *htim,
TIM_SlaveConfigTypeDef *sSlaveConfig)
{
800bdc8: b580 push {r7, lr}
800bdca: b086 sub sp, #24
800bdcc: af00 add r7, sp, #0
800bdce: 6078 str r0, [r7, #4]
800bdd0: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Get the TIMx SMCR register value */
tmpsmcr = htim->Instance->SMCR;
800bdd2: 687b ldr r3, [r7, #4]
800bdd4: 681b ldr r3, [r3, #0]
800bdd6: 689b ldr r3, [r3, #8]
800bdd8: 617b str r3, [r7, #20]
/* Reset the Trigger Selection Bits */
tmpsmcr &= ~TIM_SMCR_TS;
800bdda: 697b ldr r3, [r7, #20]
800bddc: f023 0370 bic.w r3, r3, #112 ; 0x70
800bde0: 617b str r3, [r7, #20]
/* Set the Input Trigger source */
tmpsmcr |= sSlaveConfig->InputTrigger;
800bde2: 683b ldr r3, [r7, #0]
800bde4: 685b ldr r3, [r3, #4]
800bde6: 697a ldr r2, [r7, #20]
800bde8: 4313 orrs r3, r2
800bdea: 617b str r3, [r7, #20]
/* Reset the slave mode Bits */
tmpsmcr &= ~TIM_SMCR_SMS;
800bdec: 697a ldr r2, [r7, #20]
800bdee: 4b39 ldr r3, [pc, #228] ; (800bed4 <TIM_SlaveTimer_SetConfig+0x10c>)
800bdf0: 4013 ands r3, r2
800bdf2: 617b str r3, [r7, #20]
/* Set the slave mode */
tmpsmcr |= sSlaveConfig->SlaveMode;
800bdf4: 683b ldr r3, [r7, #0]
800bdf6: 681b ldr r3, [r3, #0]
800bdf8: 697a ldr r2, [r7, #20]
800bdfa: 4313 orrs r3, r2
800bdfc: 617b str r3, [r7, #20]
/* Write to TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
800bdfe: 687b ldr r3, [r7, #4]
800be00: 681b ldr r3, [r3, #0]
800be02: 697a ldr r2, [r7, #20]
800be04: 609a str r2, [r3, #8]
/* Configure the trigger prescaler, filter, and polarity */
switch (sSlaveConfig->InputTrigger)
800be06: 683b ldr r3, [r7, #0]
800be08: 685b ldr r3, [r3, #4]
800be0a: 2b30 cmp r3, #48 ; 0x30
800be0c: d05c beq.n 800bec8 <TIM_SlaveTimer_SetConfig+0x100>
800be0e: 2b30 cmp r3, #48 ; 0x30
800be10: d806 bhi.n 800be20 <TIM_SlaveTimer_SetConfig+0x58>
800be12: 2b10 cmp r3, #16
800be14: d058 beq.n 800bec8 <TIM_SlaveTimer_SetConfig+0x100>
800be16: 2b20 cmp r3, #32
800be18: d056 beq.n 800bec8 <TIM_SlaveTimer_SetConfig+0x100>
800be1a: 2b00 cmp r3, #0
800be1c: d054 beq.n 800bec8 <TIM_SlaveTimer_SetConfig+0x100>
assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
break;
}
default:
break;
800be1e: e054 b.n 800beca <TIM_SlaveTimer_SetConfig+0x102>
switch (sSlaveConfig->InputTrigger)
800be20: 2b50 cmp r3, #80 ; 0x50
800be22: d03d beq.n 800bea0 <TIM_SlaveTimer_SetConfig+0xd8>
800be24: 2b50 cmp r3, #80 ; 0x50
800be26: d802 bhi.n 800be2e <TIM_SlaveTimer_SetConfig+0x66>
800be28: 2b40 cmp r3, #64 ; 0x40
800be2a: d010 beq.n 800be4e <TIM_SlaveTimer_SetConfig+0x86>
break;
800be2c: e04d b.n 800beca <TIM_SlaveTimer_SetConfig+0x102>
switch (sSlaveConfig->InputTrigger)
800be2e: 2b60 cmp r3, #96 ; 0x60
800be30: d040 beq.n 800beb4 <TIM_SlaveTimer_SetConfig+0xec>
800be32: 2b70 cmp r3, #112 ; 0x70
800be34: d000 beq.n 800be38 <TIM_SlaveTimer_SetConfig+0x70>
break;
800be36: e048 b.n 800beca <TIM_SlaveTimer_SetConfig+0x102>
TIM_ETR_SetConfig(htim->Instance,
800be38: 687b ldr r3, [r7, #4]
800be3a: 6818 ldr r0, [r3, #0]
800be3c: 683b ldr r3, [r7, #0]
800be3e: 68d9 ldr r1, [r3, #12]
800be40: 683b ldr r3, [r7, #0]
800be42: 689a ldr r2, [r3, #8]
800be44: 683b ldr r3, [r7, #0]
800be46: 691b ldr r3, [r3, #16]
800be48: f000 f8c0 bl 800bfcc <TIM_ETR_SetConfig>
break;
800be4c: e03d b.n 800beca <TIM_SlaveTimer_SetConfig+0x102>
if(sSlaveConfig->SlaveMode == TIM_SLAVEMODE_GATED)
800be4e: 683b ldr r3, [r7, #0]
800be50: 681b ldr r3, [r3, #0]
800be52: 2b05 cmp r3, #5
800be54: d101 bne.n 800be5a <TIM_SlaveTimer_SetConfig+0x92>
return HAL_ERROR;
800be56: 2301 movs r3, #1
800be58: e038 b.n 800becc <TIM_SlaveTimer_SetConfig+0x104>
tmpccer = htim->Instance->CCER;
800be5a: 687b ldr r3, [r7, #4]
800be5c: 681b ldr r3, [r3, #0]
800be5e: 6a1b ldr r3, [r3, #32]
800be60: 613b str r3, [r7, #16]
htim->Instance->CCER &= ~TIM_CCER_CC1E;
800be62: 687b ldr r3, [r7, #4]
800be64: 681b ldr r3, [r3, #0]
800be66: 6a1a ldr r2, [r3, #32]
800be68: 687b ldr r3, [r7, #4]
800be6a: 681b ldr r3, [r3, #0]
800be6c: f022 0201 bic.w r2, r2, #1
800be70: 621a str r2, [r3, #32]
tmpccmr1 = htim->Instance->CCMR1;
800be72: 687b ldr r3, [r7, #4]
800be74: 681b ldr r3, [r3, #0]
800be76: 699b ldr r3, [r3, #24]
800be78: 60fb str r3, [r7, #12]
tmpccmr1 &= ~TIM_CCMR1_IC1F;
800be7a: 68fb ldr r3, [r7, #12]
800be7c: f023 03f0 bic.w r3, r3, #240 ; 0xf0
800be80: 60fb str r3, [r7, #12]
tmpccmr1 |= ((sSlaveConfig->TriggerFilter) << 4U);
800be82: 683b ldr r3, [r7, #0]
800be84: 691b ldr r3, [r3, #16]
800be86: 011b lsls r3, r3, #4
800be88: 68fa ldr r2, [r7, #12]
800be8a: 4313 orrs r3, r2
800be8c: 60fb str r3, [r7, #12]
htim->Instance->CCMR1 = tmpccmr1;
800be8e: 687b ldr r3, [r7, #4]
800be90: 681b ldr r3, [r3, #0]
800be92: 68fa ldr r2, [r7, #12]
800be94: 619a str r2, [r3, #24]
htim->Instance->CCER = tmpccer;
800be96: 687b ldr r3, [r7, #4]
800be98: 681b ldr r3, [r3, #0]
800be9a: 693a ldr r2, [r7, #16]
800be9c: 621a str r2, [r3, #32]
break;
800be9e: e014 b.n 800beca <TIM_SlaveTimer_SetConfig+0x102>
TIM_TI1_ConfigInputStage(htim->Instance,
800bea0: 687b ldr r3, [r7, #4]
800bea2: 6818 ldr r0, [r3, #0]
800bea4: 683b ldr r3, [r7, #0]
800bea6: 6899 ldr r1, [r3, #8]
800bea8: 683b ldr r3, [r7, #0]
800beaa: 691b ldr r3, [r3, #16]
800beac: 461a mov r2, r3
800beae: f000 f813 bl 800bed8 <TIM_TI1_ConfigInputStage>
break;
800beb2: e00a b.n 800beca <TIM_SlaveTimer_SetConfig+0x102>
TIM_TI2_ConfigInputStage(htim->Instance,
800beb4: 687b ldr r3, [r7, #4]
800beb6: 6818 ldr r0, [r3, #0]
800beb8: 683b ldr r3, [r7, #0]
800beba: 6899 ldr r1, [r3, #8]
800bebc: 683b ldr r3, [r7, #0]
800bebe: 691b ldr r3, [r3, #16]
800bec0: 461a mov r2, r3
800bec2: f000 f838 bl 800bf36 <TIM_TI2_ConfigInputStage>
break;
800bec6: e000 b.n 800beca <TIM_SlaveTimer_SetConfig+0x102>
break;
800bec8: bf00 nop
}
return HAL_OK;
800beca: 2300 movs r3, #0
}
800becc: 4618 mov r0, r3
800bece: 3718 adds r7, #24
800bed0: 46bd mov sp, r7
800bed2: bd80 pop {r7, pc}
800bed4: fffefff8 .word 0xfffefff8
0800bed8 <TIM_TI1_ConfigInputStage>:
* @param TIM_ICFilter Specifies the Input Capture Filter.
* This parameter must be a value between 0x00 and 0x0F.
* @retval None
*/
static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
{
800bed8: b480 push {r7}
800beda: b087 sub sp, #28
800bedc: af00 add r7, sp, #0
800bede: 60f8 str r0, [r7, #12]
800bee0: 60b9 str r1, [r7, #8]
800bee2: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 1: Reset the CC1E Bit */
tmpccer = TIMx->CCER;
800bee4: 68fb ldr r3, [r7, #12]
800bee6: 6a1b ldr r3, [r3, #32]
800bee8: 617b str r3, [r7, #20]
TIMx->CCER &= ~TIM_CCER_CC1E;
800beea: 68fb ldr r3, [r7, #12]
800beec: 6a1b ldr r3, [r3, #32]
800beee: f023 0201 bic.w r2, r3, #1
800bef2: 68fb ldr r3, [r7, #12]
800bef4: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
800bef6: 68fb ldr r3, [r7, #12]
800bef8: 699b ldr r3, [r3, #24]
800befa: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC1F;
800befc: 693b ldr r3, [r7, #16]
800befe: f023 03f0 bic.w r3, r3, #240 ; 0xf0
800bf02: 613b str r3, [r7, #16]
tmpccmr1 |= (TIM_ICFilter << 4U);
800bf04: 687b ldr r3, [r7, #4]
800bf06: 011b lsls r3, r3, #4
800bf08: 693a ldr r2, [r7, #16]
800bf0a: 4313 orrs r3, r2
800bf0c: 613b str r3, [r7, #16]
/* Select the Polarity and set the CC1E Bit */
tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP);
800bf0e: 697b ldr r3, [r7, #20]
800bf10: f023 030a bic.w r3, r3, #10
800bf14: 617b str r3, [r7, #20]
tmpccer |= TIM_ICPolarity;
800bf16: 697a ldr r2, [r7, #20]
800bf18: 68bb ldr r3, [r7, #8]
800bf1a: 4313 orrs r3, r2
800bf1c: 617b str r3, [r7, #20]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1;
800bf1e: 68fb ldr r3, [r7, #12]
800bf20: 693a ldr r2, [r7, #16]
800bf22: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
800bf24: 68fb ldr r3, [r7, #12]
800bf26: 697a ldr r2, [r7, #20]
800bf28: 621a str r2, [r3, #32]
}
800bf2a: bf00 nop
800bf2c: 371c adds r7, #28
800bf2e: 46bd mov sp, r7
800bf30: f85d 7b04 ldr.w r7, [sp], #4
800bf34: 4770 bx lr
0800bf36 <TIM_TI2_ConfigInputStage>:
* @param TIM_ICFilter Specifies the Input Capture Filter.
* This parameter must be a value between 0x00 and 0x0F.
* @retval None
*/
static void TIM_TI2_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
{
800bf36: b480 push {r7}
800bf38: b087 sub sp, #28
800bf3a: af00 add r7, sp, #0
800bf3c: 60f8 str r0, [r7, #12]
800bf3e: 60b9 str r1, [r7, #8]
800bf40: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 2: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC2E;
800bf42: 68fb ldr r3, [r7, #12]
800bf44: 6a1b ldr r3, [r3, #32]
800bf46: f023 0210 bic.w r2, r3, #16
800bf4a: 68fb ldr r3, [r7, #12]
800bf4c: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
800bf4e: 68fb ldr r3, [r7, #12]
800bf50: 699b ldr r3, [r3, #24]
800bf52: 617b str r3, [r7, #20]
tmpccer = TIMx->CCER;
800bf54: 68fb ldr r3, [r7, #12]
800bf56: 6a1b ldr r3, [r3, #32]
800bf58: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC2F;
800bf5a: 697b ldr r3, [r7, #20]
800bf5c: f423 4370 bic.w r3, r3, #61440 ; 0xf000
800bf60: 617b str r3, [r7, #20]
tmpccmr1 |= (TIM_ICFilter << 12U);
800bf62: 687b ldr r3, [r7, #4]
800bf64: 031b lsls r3, r3, #12
800bf66: 697a ldr r2, [r7, #20]
800bf68: 4313 orrs r3, r2
800bf6a: 617b str r3, [r7, #20]
/* Select the Polarity and set the CC2E Bit */
tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP);
800bf6c: 693b ldr r3, [r7, #16]
800bf6e: f023 03a0 bic.w r3, r3, #160 ; 0xa0
800bf72: 613b str r3, [r7, #16]
tmpccer |= (TIM_ICPolarity << 4U);
800bf74: 68bb ldr r3, [r7, #8]
800bf76: 011b lsls r3, r3, #4
800bf78: 693a ldr r2, [r7, #16]
800bf7a: 4313 orrs r3, r2
800bf7c: 613b str r3, [r7, #16]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1 ;
800bf7e: 68fb ldr r3, [r7, #12]
800bf80: 697a ldr r2, [r7, #20]
800bf82: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
800bf84: 68fb ldr r3, [r7, #12]
800bf86: 693a ldr r2, [r7, #16]
800bf88: 621a str r2, [r3, #32]
}
800bf8a: bf00 nop
800bf8c: 371c adds r7, #28
800bf8e: 46bd mov sp, r7
800bf90: f85d 7b04 ldr.w r7, [sp], #4
800bf94: 4770 bx lr
0800bf96 <TIM_ITRx_SetConfig>:
* @arg TIM_TS_TI2FP2: Filtered Timer Input 2
* @arg TIM_TS_ETRF: External Trigger input
* @retval None
*/
static void TIM_ITRx_SetConfig(TIM_TypeDef *TIMx, uint32_t InputTriggerSource)
{
800bf96: b480 push {r7}
800bf98: b085 sub sp, #20
800bf9a: af00 add r7, sp, #0
800bf9c: 6078 str r0, [r7, #4]
800bf9e: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
/* Get the TIMx SMCR register value */
tmpsmcr = TIMx->SMCR;
800bfa0: 687b ldr r3, [r7, #4]
800bfa2: 689b ldr r3, [r3, #8]
800bfa4: 60fb str r3, [r7, #12]
/* Reset the TS Bits */
tmpsmcr &= ~TIM_SMCR_TS;
800bfa6: 68fb ldr r3, [r7, #12]
800bfa8: f023 0370 bic.w r3, r3, #112 ; 0x70
800bfac: 60fb str r3, [r7, #12]
/* Set the Input Trigger source and the slave mode*/
tmpsmcr |= (InputTriggerSource | TIM_SLAVEMODE_EXTERNAL1);
800bfae: 683a ldr r2, [r7, #0]
800bfb0: 68fb ldr r3, [r7, #12]
800bfb2: 4313 orrs r3, r2
800bfb4: f043 0307 orr.w r3, r3, #7
800bfb8: 60fb str r3, [r7, #12]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
800bfba: 687b ldr r3, [r7, #4]
800bfbc: 68fa ldr r2, [r7, #12]
800bfbe: 609a str r2, [r3, #8]
}
800bfc0: bf00 nop
800bfc2: 3714 adds r7, #20
800bfc4: 46bd mov sp, r7
800bfc6: f85d 7b04 ldr.w r7, [sp], #4
800bfca: 4770 bx lr
0800bfcc <TIM_ETR_SetConfig>:
* This parameter must be a value between 0x00 and 0x0F
* @retval None
*/
void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter)
{
800bfcc: b480 push {r7}
800bfce: b087 sub sp, #28
800bfd0: af00 add r7, sp, #0
800bfd2: 60f8 str r0, [r7, #12]
800bfd4: 60b9 str r1, [r7, #8]
800bfd6: 607a str r2, [r7, #4]
800bfd8: 603b str r3, [r7, #0]
uint32_t tmpsmcr;
tmpsmcr = TIMx->SMCR;
800bfda: 68fb ldr r3, [r7, #12]
800bfdc: 689b ldr r3, [r3, #8]
800bfde: 617b str r3, [r7, #20]
/* Reset the ETR Bits */
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
800bfe0: 697b ldr r3, [r7, #20]
800bfe2: f423 437f bic.w r3, r3, #65280 ; 0xff00
800bfe6: 617b str r3, [r7, #20]
/* Set the Prescaler, the Filter value and the Polarity */
tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U)));
800bfe8: 683b ldr r3, [r7, #0]
800bfea: 021a lsls r2, r3, #8
800bfec: 687b ldr r3, [r7, #4]
800bfee: 431a orrs r2, r3
800bff0: 68bb ldr r3, [r7, #8]
800bff2: 4313 orrs r3, r2
800bff4: 697a ldr r2, [r7, #20]
800bff6: 4313 orrs r3, r2
800bff8: 617b str r3, [r7, #20]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
800bffa: 68fb ldr r3, [r7, #12]
800bffc: 697a ldr r2, [r7, #20]
800bffe: 609a str r2, [r3, #8]
}
800c000: bf00 nop
800c002: 371c adds r7, #28
800c004: 46bd mov sp, r7
800c006: f85d 7b04 ldr.w r7, [sp], #4
800c00a: 4770 bx lr
0800c00c <HAL_TIMEx_MasterConfigSynchronization>:
* mode.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
TIM_MasterConfigTypeDef *sMasterConfig)
{
800c00c: b480 push {r7}
800c00e: b085 sub sp, #20
800c010: af00 add r7, sp, #0
800c012: 6078 str r0, [r7, #4]
800c014: 6039 str r1, [r7, #0]
assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance));
assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger));
assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode));
/* Check input state */
__HAL_LOCK(htim);
800c016: 687b ldr r3, [r7, #4]
800c018: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800c01c: 2b01 cmp r3, #1
800c01e: d101 bne.n 800c024 <HAL_TIMEx_MasterConfigSynchronization+0x18>
800c020: 2302 movs r3, #2
800c022: e06d b.n 800c100 <HAL_TIMEx_MasterConfigSynchronization+0xf4>
800c024: 687b ldr r3, [r7, #4]
800c026: 2201 movs r2, #1
800c028: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Change the handler state */
htim->State = HAL_TIM_STATE_BUSY;
800c02c: 687b ldr r3, [r7, #4]
800c02e: 2202 movs r2, #2
800c030: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Get the TIMx CR2 register value */
tmpcr2 = htim->Instance->CR2;
800c034: 687b ldr r3, [r7, #4]
800c036: 681b ldr r3, [r3, #0]
800c038: 685b ldr r3, [r3, #4]
800c03a: 60fb str r3, [r7, #12]
/* Get the TIMx SMCR register value */
tmpsmcr = htim->Instance->SMCR;
800c03c: 687b ldr r3, [r7, #4]
800c03e: 681b ldr r3, [r3, #0]
800c040: 689b ldr r3, [r3, #8]
800c042: 60bb str r3, [r7, #8]
/* If the timer supports ADC synchronization through TRGO2, set the master mode selection 2 */
if (IS_TIM_TRGO2_INSTANCE(htim->Instance))
800c044: 687b ldr r3, [r7, #4]
800c046: 681b ldr r3, [r3, #0]
800c048: 4a30 ldr r2, [pc, #192] ; (800c10c <HAL_TIMEx_MasterConfigSynchronization+0x100>)
800c04a: 4293 cmp r3, r2
800c04c: d004 beq.n 800c058 <HAL_TIMEx_MasterConfigSynchronization+0x4c>
800c04e: 687b ldr r3, [r7, #4]
800c050: 681b ldr r3, [r3, #0]
800c052: 4a2f ldr r2, [pc, #188] ; (800c110 <HAL_TIMEx_MasterConfigSynchronization+0x104>)
800c054: 4293 cmp r3, r2
800c056: d108 bne.n 800c06a <HAL_TIMEx_MasterConfigSynchronization+0x5e>
{
/* Check the parameters */
assert_param(IS_TIM_TRGO2_SOURCE(sMasterConfig->MasterOutputTrigger2));
/* Clear the MMS2 bits */
tmpcr2 &= ~TIM_CR2_MMS2;
800c058: 68fb ldr r3, [r7, #12]
800c05a: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000
800c05e: 60fb str r3, [r7, #12]
/* Select the TRGO2 source*/
tmpcr2 |= sMasterConfig->MasterOutputTrigger2;
800c060: 683b ldr r3, [r7, #0]
800c062: 685b ldr r3, [r3, #4]
800c064: 68fa ldr r2, [r7, #12]
800c066: 4313 orrs r3, r2
800c068: 60fb str r3, [r7, #12]
}
/* Reset the MMS Bits */
tmpcr2 &= ~TIM_CR2_MMS;
800c06a: 68fb ldr r3, [r7, #12]
800c06c: f023 0370 bic.w r3, r3, #112 ; 0x70
800c070: 60fb str r3, [r7, #12]
/* Select the TRGO source */
tmpcr2 |= sMasterConfig->MasterOutputTrigger;
800c072: 683b ldr r3, [r7, #0]
800c074: 681b ldr r3, [r3, #0]
800c076: 68fa ldr r2, [r7, #12]
800c078: 4313 orrs r3, r2
800c07a: 60fb str r3, [r7, #12]
/* Update TIMx CR2 */
htim->Instance->CR2 = tmpcr2;
800c07c: 687b ldr r3, [r7, #4]
800c07e: 681b ldr r3, [r3, #0]
800c080: 68fa ldr r2, [r7, #12]
800c082: 605a str r2, [r3, #4]
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
800c084: 687b ldr r3, [r7, #4]
800c086: 681b ldr r3, [r3, #0]
800c088: 4a20 ldr r2, [pc, #128] ; (800c10c <HAL_TIMEx_MasterConfigSynchronization+0x100>)
800c08a: 4293 cmp r3, r2
800c08c: d022 beq.n 800c0d4 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800c08e: 687b ldr r3, [r7, #4]
800c090: 681b ldr r3, [r3, #0]
800c092: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800c096: d01d beq.n 800c0d4 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800c098: 687b ldr r3, [r7, #4]
800c09a: 681b ldr r3, [r3, #0]
800c09c: 4a1d ldr r2, [pc, #116] ; (800c114 <HAL_TIMEx_MasterConfigSynchronization+0x108>)
800c09e: 4293 cmp r3, r2
800c0a0: d018 beq.n 800c0d4 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800c0a2: 687b ldr r3, [r7, #4]
800c0a4: 681b ldr r3, [r3, #0]
800c0a6: 4a1c ldr r2, [pc, #112] ; (800c118 <HAL_TIMEx_MasterConfigSynchronization+0x10c>)
800c0a8: 4293 cmp r3, r2
800c0aa: d013 beq.n 800c0d4 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800c0ac: 687b ldr r3, [r7, #4]
800c0ae: 681b ldr r3, [r3, #0]
800c0b0: 4a1a ldr r2, [pc, #104] ; (800c11c <HAL_TIMEx_MasterConfigSynchronization+0x110>)
800c0b2: 4293 cmp r3, r2
800c0b4: d00e beq.n 800c0d4 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800c0b6: 687b ldr r3, [r7, #4]
800c0b8: 681b ldr r3, [r3, #0]
800c0ba: 4a15 ldr r2, [pc, #84] ; (800c110 <HAL_TIMEx_MasterConfigSynchronization+0x104>)
800c0bc: 4293 cmp r3, r2
800c0be: d009 beq.n 800c0d4 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800c0c0: 687b ldr r3, [r7, #4]
800c0c2: 681b ldr r3, [r3, #0]
800c0c4: 4a16 ldr r2, [pc, #88] ; (800c120 <HAL_TIMEx_MasterConfigSynchronization+0x114>)
800c0c6: 4293 cmp r3, r2
800c0c8: d004 beq.n 800c0d4 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800c0ca: 687b ldr r3, [r7, #4]
800c0cc: 681b ldr r3, [r3, #0]
800c0ce: 4a15 ldr r2, [pc, #84] ; (800c124 <HAL_TIMEx_MasterConfigSynchronization+0x118>)
800c0d0: 4293 cmp r3, r2
800c0d2: d10c bne.n 800c0ee <HAL_TIMEx_MasterConfigSynchronization+0xe2>
{
/* Reset the MSM Bit */
tmpsmcr &= ~TIM_SMCR_MSM;
800c0d4: 68bb ldr r3, [r7, #8]
800c0d6: f023 0380 bic.w r3, r3, #128 ; 0x80
800c0da: 60bb str r3, [r7, #8]
/* Set master mode */
tmpsmcr |= sMasterConfig->MasterSlaveMode;
800c0dc: 683b ldr r3, [r7, #0]
800c0de: 689b ldr r3, [r3, #8]
800c0e0: 68ba ldr r2, [r7, #8]
800c0e2: 4313 orrs r3, r2
800c0e4: 60bb str r3, [r7, #8]
/* Update TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
800c0e6: 687b ldr r3, [r7, #4]
800c0e8: 681b ldr r3, [r3, #0]
800c0ea: 68ba ldr r2, [r7, #8]
800c0ec: 609a str r2, [r3, #8]
}
/* Change the htim state */
htim->State = HAL_TIM_STATE_READY;
800c0ee: 687b ldr r3, [r7, #4]
800c0f0: 2201 movs r2, #1
800c0f2: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800c0f6: 687b ldr r3, [r7, #4]
800c0f8: 2200 movs r2, #0
800c0fa: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800c0fe: 2300 movs r3, #0
}
800c100: 4618 mov r0, r3
800c102: 3714 adds r7, #20
800c104: 46bd mov sp, r7
800c106: f85d 7b04 ldr.w r7, [sp], #4
800c10a: 4770 bx lr
800c10c: 40010000 .word 0x40010000
800c110: 40010400 .word 0x40010400
800c114: 40000400 .word 0x40000400
800c118: 40000800 .word 0x40000800
800c11c: 40000c00 .word 0x40000c00
800c120: 40014000 .word 0x40014000
800c124: 40001800 .word 0x40001800
0800c128 <HAL_TIMEx_ConfigBreakDeadTime>:
* interrupt can be enabled by calling the @ref __HAL_TIM_ENABLE_IT macro.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig)
{
800c128: b480 push {r7}
800c12a: b085 sub sp, #20
800c12c: af00 add r7, sp, #0
800c12e: 6078 str r0, [r7, #4]
800c130: 6039 str r1, [r7, #0]
/* Keep this variable initialized to 0 as it is used to configure BDTR register */
uint32_t tmpbdtr = 0U;
800c132: 2300 movs r3, #0
800c134: 60fb str r3, [r7, #12]
assert_param(IS_TIM_BREAK_POLARITY(sBreakDeadTimeConfig->BreakPolarity));
assert_param(IS_TIM_BREAK_FILTER(sBreakDeadTimeConfig->BreakFilter));
assert_param(IS_TIM_AUTOMATIC_OUTPUT_STATE(sBreakDeadTimeConfig->AutomaticOutput));
/* Check input state */
__HAL_LOCK(htim);
800c136: 687b ldr r3, [r7, #4]
800c138: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800c13c: 2b01 cmp r3, #1
800c13e: d101 bne.n 800c144 <HAL_TIMEx_ConfigBreakDeadTime+0x1c>
800c140: 2302 movs r3, #2
800c142: e065 b.n 800c210 <HAL_TIMEx_ConfigBreakDeadTime+0xe8>
800c144: 687b ldr r3, [r7, #4]
800c146: 2201 movs r2, #1
800c148: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Set the Lock level, the Break enable Bit and the Polarity, the OSSR State,
the OSSI State, the dead time value and the Automatic Output Enable Bit */
/* Set the BDTR bits */
MODIFY_REG(tmpbdtr, TIM_BDTR_DTG, sBreakDeadTimeConfig->DeadTime);
800c14c: 68fb ldr r3, [r7, #12]
800c14e: f023 02ff bic.w r2, r3, #255 ; 0xff
800c152: 683b ldr r3, [r7, #0]
800c154: 68db ldr r3, [r3, #12]
800c156: 4313 orrs r3, r2
800c158: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_LOCK, sBreakDeadTimeConfig->LockLevel);
800c15a: 68fb ldr r3, [r7, #12]
800c15c: f423 7240 bic.w r2, r3, #768 ; 0x300
800c160: 683b ldr r3, [r7, #0]
800c162: 689b ldr r3, [r3, #8]
800c164: 4313 orrs r3, r2
800c166: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_OSSI, sBreakDeadTimeConfig->OffStateIDLEMode);
800c168: 68fb ldr r3, [r7, #12]
800c16a: f423 6280 bic.w r2, r3, #1024 ; 0x400
800c16e: 683b ldr r3, [r7, #0]
800c170: 685b ldr r3, [r3, #4]
800c172: 4313 orrs r3, r2
800c174: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_OSSR, sBreakDeadTimeConfig->OffStateRunMode);
800c176: 68fb ldr r3, [r7, #12]
800c178: f423 6200 bic.w r2, r3, #2048 ; 0x800
800c17c: 683b ldr r3, [r7, #0]
800c17e: 681b ldr r3, [r3, #0]
800c180: 4313 orrs r3, r2
800c182: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BKE, sBreakDeadTimeConfig->BreakState);
800c184: 68fb ldr r3, [r7, #12]
800c186: f423 5280 bic.w r2, r3, #4096 ; 0x1000
800c18a: 683b ldr r3, [r7, #0]
800c18c: 691b ldr r3, [r3, #16]
800c18e: 4313 orrs r3, r2
800c190: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BKP, sBreakDeadTimeConfig->BreakPolarity);
800c192: 68fb ldr r3, [r7, #12]
800c194: f423 5200 bic.w r2, r3, #8192 ; 0x2000
800c198: 683b ldr r3, [r7, #0]
800c19a: 695b ldr r3, [r3, #20]
800c19c: 4313 orrs r3, r2
800c19e: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_AOE, sBreakDeadTimeConfig->AutomaticOutput);
800c1a0: 68fb ldr r3, [r7, #12]
800c1a2: f423 4280 bic.w r2, r3, #16384 ; 0x4000
800c1a6: 683b ldr r3, [r7, #0]
800c1a8: 6a9b ldr r3, [r3, #40] ; 0x28
800c1aa: 4313 orrs r3, r2
800c1ac: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BKF, (sBreakDeadTimeConfig->BreakFilter << TIM_BDTR_BKF_Pos));
800c1ae: 68fb ldr r3, [r7, #12]
800c1b0: f423 2270 bic.w r2, r3, #983040 ; 0xf0000
800c1b4: 683b ldr r3, [r7, #0]
800c1b6: 699b ldr r3, [r3, #24]
800c1b8: 041b lsls r3, r3, #16
800c1ba: 4313 orrs r3, r2
800c1bc: 60fb str r3, [r7, #12]
if (IS_TIM_BKIN2_INSTANCE(htim->Instance))
800c1be: 687b ldr r3, [r7, #4]
800c1c0: 681b ldr r3, [r3, #0]
800c1c2: 4a16 ldr r2, [pc, #88] ; (800c21c <HAL_TIMEx_ConfigBreakDeadTime+0xf4>)
800c1c4: 4293 cmp r3, r2
800c1c6: d004 beq.n 800c1d2 <HAL_TIMEx_ConfigBreakDeadTime+0xaa>
800c1c8: 687b ldr r3, [r7, #4]
800c1ca: 681b ldr r3, [r3, #0]
800c1cc: 4a14 ldr r2, [pc, #80] ; (800c220 <HAL_TIMEx_ConfigBreakDeadTime+0xf8>)
800c1ce: 4293 cmp r3, r2
800c1d0: d115 bne.n 800c1fe <HAL_TIMEx_ConfigBreakDeadTime+0xd6>
assert_param(IS_TIM_BREAK2_STATE(sBreakDeadTimeConfig->Break2State));
assert_param(IS_TIM_BREAK2_POLARITY(sBreakDeadTimeConfig->Break2Polarity));
assert_param(IS_TIM_BREAK_FILTER(sBreakDeadTimeConfig->Break2Filter));
/* Set the BREAK2 input related BDTR bits */
MODIFY_REG(tmpbdtr, TIM_BDTR_BK2F, (sBreakDeadTimeConfig->Break2Filter << TIM_BDTR_BK2F_Pos));
800c1d2: 68fb ldr r3, [r7, #12]
800c1d4: f423 0270 bic.w r2, r3, #15728640 ; 0xf00000
800c1d8: 683b ldr r3, [r7, #0]
800c1da: 6a5b ldr r3, [r3, #36] ; 0x24
800c1dc: 051b lsls r3, r3, #20
800c1de: 4313 orrs r3, r2
800c1e0: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BK2E, sBreakDeadTimeConfig->Break2State);
800c1e2: 68fb ldr r3, [r7, #12]
800c1e4: f023 7280 bic.w r2, r3, #16777216 ; 0x1000000
800c1e8: 683b ldr r3, [r7, #0]
800c1ea: 69db ldr r3, [r3, #28]
800c1ec: 4313 orrs r3, r2
800c1ee: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BK2P, sBreakDeadTimeConfig->Break2Polarity);
800c1f0: 68fb ldr r3, [r7, #12]
800c1f2: f023 7200 bic.w r2, r3, #33554432 ; 0x2000000
800c1f6: 683b ldr r3, [r7, #0]
800c1f8: 6a1b ldr r3, [r3, #32]
800c1fa: 4313 orrs r3, r2
800c1fc: 60fb str r3, [r7, #12]
}
/* Set TIMx_BDTR */
htim->Instance->BDTR = tmpbdtr;
800c1fe: 687b ldr r3, [r7, #4]
800c200: 681b ldr r3, [r3, #0]
800c202: 68fa ldr r2, [r7, #12]
800c204: 645a str r2, [r3, #68] ; 0x44
__HAL_UNLOCK(htim);
800c206: 687b ldr r3, [r7, #4]
800c208: 2200 movs r2, #0
800c20a: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800c20e: 2300 movs r3, #0
}
800c210: 4618 mov r0, r3
800c212: 3714 adds r7, #20
800c214: 46bd mov sp, r7
800c216: f85d 7b04 ldr.w r7, [sp], #4
800c21a: 4770 bx lr
800c21c: 40010000 .word 0x40010000
800c220: 40010400 .word 0x40010400
0800c224 <HAL_TIMEx_CommutCallback>:
* @brief Hall commutation changed callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim)
{
800c224: b480 push {r7}
800c226: b083 sub sp, #12
800c228: af00 add r7, sp, #0
800c22a: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIMEx_CommutCallback could be implemented in the user file
*/
}
800c22c: bf00 nop
800c22e: 370c adds r7, #12
800c230: 46bd mov sp, r7
800c232: f85d 7b04 ldr.w r7, [sp], #4
800c236: 4770 bx lr
0800c238 <HAL_TIMEx_BreakCallback>:
* @brief Hall Break detection callback in non-blocking mode
* @param htim TIM handle
* @retval None
*/
__weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim)
{
800c238: b480 push {r7}
800c23a: b083 sub sp, #12
800c23c: af00 add r7, sp, #0
800c23e: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_TIMEx_BreakCallback could be implemented in the user file
*/
}
800c240: bf00 nop
800c242: 370c adds r7, #12
800c244: 46bd mov sp, r7
800c246: f85d 7b04 ldr.w r7, [sp], #4
800c24a: 4770 bx lr
0800c24c <HAL_TIMEx_Break2Callback>:
* @brief Hall Break2 detection callback in non blocking mode
* @param htim: TIM handle
* @retval None
*/
__weak void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim)
{
800c24c: b480 push {r7}
800c24e: b083 sub sp, #12
800c250: af00 add r7, sp, #0
800c252: 6078 str r0, [r7, #4]
UNUSED(htim);
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_TIMEx_Break2Callback could be implemented in the user file
*/
}
800c254: bf00 nop
800c256: 370c adds r7, #12
800c258: 46bd mov sp, r7
800c25a: f85d 7b04 ldr.w r7, [sp], #4
800c25e: 4770 bx lr
0800c260 <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)
{
800c260: b580 push {r7, lr}
800c262: b082 sub sp, #8
800c264: af00 add r7, sp, #0
800c266: 6078 str r0, [r7, #4]
/* Check the UART handle allocation */
if (huart == NULL)
800c268: 687b ldr r3, [r7, #4]
800c26a: 2b00 cmp r3, #0
800c26c: d101 bne.n 800c272 <HAL_UART_Init+0x12>
{
return HAL_ERROR;
800c26e: 2301 movs r3, #1
800c270: e040 b.n 800c2f4 <HAL_UART_Init+0x94>
{
/* Check the parameters */
assert_param(IS_UART_INSTANCE(huart->Instance));
}
if (huart->gState == HAL_UART_STATE_RESET)
800c272: 687b ldr r3, [r7, #4]
800c274: 6f5b ldr r3, [r3, #116] ; 0x74
800c276: 2b00 cmp r3, #0
800c278: d106 bne.n 800c288 <HAL_UART_Init+0x28>
{
/* Allocate lock resource and initialize it */
huart->Lock = HAL_UNLOCKED;
800c27a: 687b ldr r3, [r7, #4]
800c27c: 2200 movs r2, #0
800c27e: f883 2070 strb.w r2, [r3, #112] ; 0x70
/* Init the low level hardware */
huart->MspInitCallback(huart);
#else
/* Init the low level hardware : GPIO, CLOCK */
HAL_UART_MspInit(huart);
800c282: 6878 ldr r0, [r7, #4]
800c284: f7f8 fd56 bl 8004d34 <HAL_UART_MspInit>
#endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
}
huart->gState = HAL_UART_STATE_BUSY;
800c288: 687b ldr r3, [r7, #4]
800c28a: 2224 movs r2, #36 ; 0x24
800c28c: 675a str r2, [r3, #116] ; 0x74
__HAL_UART_DISABLE(huart);
800c28e: 687b ldr r3, [r7, #4]
800c290: 681b ldr r3, [r3, #0]
800c292: 681a ldr r2, [r3, #0]
800c294: 687b ldr r3, [r7, #4]
800c296: 681b ldr r3, [r3, #0]
800c298: f022 0201 bic.w r2, r2, #1
800c29c: 601a str r2, [r3, #0]
/* Set the UART Communication parameters */
if (UART_SetConfig(huart) == HAL_ERROR)
800c29e: 6878 ldr r0, [r7, #4]
800c2a0: f000 f82c bl 800c2fc <UART_SetConfig>
800c2a4: 4603 mov r3, r0
800c2a6: 2b01 cmp r3, #1
800c2a8: d101 bne.n 800c2ae <HAL_UART_Init+0x4e>
{
return HAL_ERROR;
800c2aa: 2301 movs r3, #1
800c2ac: e022 b.n 800c2f4 <HAL_UART_Init+0x94>
}
if (huart->AdvancedInit.AdvFeatureInit != UART_ADVFEATURE_NO_INIT)
800c2ae: 687b ldr r3, [r7, #4]
800c2b0: 6a5b ldr r3, [r3, #36] ; 0x24
800c2b2: 2b00 cmp r3, #0
800c2b4: d002 beq.n 800c2bc <HAL_UART_Init+0x5c>
{
UART_AdvFeatureConfig(huart);
800c2b6: 6878 ldr r0, [r7, #4]
800c2b8: f000 faca bl 800c850 <UART_AdvFeatureConfig>
}
/* 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));
800c2bc: 687b ldr r3, [r7, #4]
800c2be: 681b ldr r3, [r3, #0]
800c2c0: 685a ldr r2, [r3, #4]
800c2c2: 687b ldr r3, [r7, #4]
800c2c4: 681b ldr r3, [r3, #0]
800c2c6: f422 4290 bic.w r2, r2, #18432 ; 0x4800
800c2ca: 605a str r2, [r3, #4]
CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN));
800c2cc: 687b ldr r3, [r7, #4]
800c2ce: 681b ldr r3, [r3, #0]
800c2d0: 689a ldr r2, [r3, #8]
800c2d2: 687b ldr r3, [r7, #4]
800c2d4: 681b ldr r3, [r3, #0]
800c2d6: f022 022a bic.w r2, r2, #42 ; 0x2a
800c2da: 609a str r2, [r3, #8]
__HAL_UART_ENABLE(huart);
800c2dc: 687b ldr r3, [r7, #4]
800c2de: 681b ldr r3, [r3, #0]
800c2e0: 681a ldr r2, [r3, #0]
800c2e2: 687b ldr r3, [r7, #4]
800c2e4: 681b ldr r3, [r3, #0]
800c2e6: f042 0201 orr.w r2, r2, #1
800c2ea: 601a str r2, [r3, #0]
/* TEACK and/or REACK to check before moving huart->gState and huart->RxState to Ready */
return (UART_CheckIdleState(huart));
800c2ec: 6878 ldr r0, [r7, #4]
800c2ee: f000 fb51 bl 800c994 <UART_CheckIdleState>
800c2f2: 4603 mov r3, r0
}
800c2f4: 4618 mov r0, r3
800c2f6: 3708 adds r7, #8
800c2f8: 46bd mov sp, r7
800c2fa: bd80 pop {r7, pc}
0800c2fc <UART_SetConfig>:
* @brief Configure the UART peripheral.
* @param huart UART handle.
* @retval HAL status
*/
HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart)
{
800c2fc: b580 push {r7, lr}
800c2fe: b088 sub sp, #32
800c300: af00 add r7, sp, #0
800c302: 6078 str r0, [r7, #4]
uint32_t tmpreg;
uint16_t brrtemp;
UART_ClockSourceTypeDef clocksource;
uint32_t usartdiv = 0x00000000U;
800c304: 2300 movs r3, #0
800c306: 61bb str r3, [r7, #24]
HAL_StatusTypeDef ret = HAL_OK;
800c308: 2300 movs r3, #0
800c30a: 75fb strb r3, [r7, #23]
* 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 ;
800c30c: 687b ldr r3, [r7, #4]
800c30e: 689a ldr r2, [r3, #8]
800c310: 687b ldr r3, [r7, #4]
800c312: 691b ldr r3, [r3, #16]
800c314: 431a orrs r2, r3
800c316: 687b ldr r3, [r7, #4]
800c318: 695b ldr r3, [r3, #20]
800c31a: 431a orrs r2, r3
800c31c: 687b ldr r3, [r7, #4]
800c31e: 69db ldr r3, [r3, #28]
800c320: 4313 orrs r3, r2
800c322: 613b str r3, [r7, #16]
MODIFY_REG(huart->Instance->CR1, USART_CR1_FIELDS, tmpreg);
800c324: 687b ldr r3, [r7, #4]
800c326: 681b ldr r3, [r3, #0]
800c328: 681a ldr r2, [r3, #0]
800c32a: 4bb1 ldr r3, [pc, #708] ; (800c5f0 <UART_SetConfig+0x2f4>)
800c32c: 4013 ands r3, r2
800c32e: 687a ldr r2, [r7, #4]
800c330: 6812 ldr r2, [r2, #0]
800c332: 6939 ldr r1, [r7, #16]
800c334: 430b orrs r3, r1
800c336: 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);
800c338: 687b ldr r3, [r7, #4]
800c33a: 681b ldr r3, [r3, #0]
800c33c: 685b ldr r3, [r3, #4]
800c33e: f423 5140 bic.w r1, r3, #12288 ; 0x3000
800c342: 687b ldr r3, [r7, #4]
800c344: 68da ldr r2, [r3, #12]
800c346: 687b ldr r3, [r7, #4]
800c348: 681b ldr r3, [r3, #0]
800c34a: 430a orrs r2, r1
800c34c: 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;
800c34e: 687b ldr r3, [r7, #4]
800c350: 699b ldr r3, [r3, #24]
800c352: 613b str r3, [r7, #16]
tmpreg |= huart->Init.OneBitSampling;
800c354: 687b ldr r3, [r7, #4]
800c356: 6a1b ldr r3, [r3, #32]
800c358: 693a ldr r2, [r7, #16]
800c35a: 4313 orrs r3, r2
800c35c: 613b str r3, [r7, #16]
MODIFY_REG(huart->Instance->CR3, USART_CR3_FIELDS, tmpreg);
800c35e: 687b ldr r3, [r7, #4]
800c360: 681b ldr r3, [r3, #0]
800c362: 689b ldr r3, [r3, #8]
800c364: f423 6130 bic.w r1, r3, #2816 ; 0xb00
800c368: 687b ldr r3, [r7, #4]
800c36a: 681b ldr r3, [r3, #0]
800c36c: 693a ldr r2, [r7, #16]
800c36e: 430a orrs r2, r1
800c370: 609a str r2, [r3, #8]
/*-------------------------- USART BRR Configuration -----------------------*/
UART_GETCLOCKSOURCE(huart, clocksource);
800c372: 687b ldr r3, [r7, #4]
800c374: 681b ldr r3, [r3, #0]
800c376: 4a9f ldr r2, [pc, #636] ; (800c5f4 <UART_SetConfig+0x2f8>)
800c378: 4293 cmp r3, r2
800c37a: d121 bne.n 800c3c0 <UART_SetConfig+0xc4>
800c37c: 4b9e ldr r3, [pc, #632] ; (800c5f8 <UART_SetConfig+0x2fc>)
800c37e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800c382: f003 0303 and.w r3, r3, #3
800c386: 2b03 cmp r3, #3
800c388: d816 bhi.n 800c3b8 <UART_SetConfig+0xbc>
800c38a: a201 add r2, pc, #4 ; (adr r2, 800c390 <UART_SetConfig+0x94>)
800c38c: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800c390: 0800c3a1 .word 0x0800c3a1
800c394: 0800c3ad .word 0x0800c3ad
800c398: 0800c3a7 .word 0x0800c3a7
800c39c: 0800c3b3 .word 0x0800c3b3
800c3a0: 2301 movs r3, #1
800c3a2: 77fb strb r3, [r7, #31]
800c3a4: e151 b.n 800c64a <UART_SetConfig+0x34e>
800c3a6: 2302 movs r3, #2
800c3a8: 77fb strb r3, [r7, #31]
800c3aa: e14e b.n 800c64a <UART_SetConfig+0x34e>
800c3ac: 2304 movs r3, #4
800c3ae: 77fb strb r3, [r7, #31]
800c3b0: e14b b.n 800c64a <UART_SetConfig+0x34e>
800c3b2: 2308 movs r3, #8
800c3b4: 77fb strb r3, [r7, #31]
800c3b6: e148 b.n 800c64a <UART_SetConfig+0x34e>
800c3b8: 2310 movs r3, #16
800c3ba: 77fb strb r3, [r7, #31]
800c3bc: bf00 nop
800c3be: e144 b.n 800c64a <UART_SetConfig+0x34e>
800c3c0: 687b ldr r3, [r7, #4]
800c3c2: 681b ldr r3, [r3, #0]
800c3c4: 4a8d ldr r2, [pc, #564] ; (800c5fc <UART_SetConfig+0x300>)
800c3c6: 4293 cmp r3, r2
800c3c8: d134 bne.n 800c434 <UART_SetConfig+0x138>
800c3ca: 4b8b ldr r3, [pc, #556] ; (800c5f8 <UART_SetConfig+0x2fc>)
800c3cc: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800c3d0: f003 030c and.w r3, r3, #12
800c3d4: 2b0c cmp r3, #12
800c3d6: d829 bhi.n 800c42c <UART_SetConfig+0x130>
800c3d8: a201 add r2, pc, #4 ; (adr r2, 800c3e0 <UART_SetConfig+0xe4>)
800c3da: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800c3de: bf00 nop
800c3e0: 0800c415 .word 0x0800c415
800c3e4: 0800c42d .word 0x0800c42d
800c3e8: 0800c42d .word 0x0800c42d
800c3ec: 0800c42d .word 0x0800c42d
800c3f0: 0800c421 .word 0x0800c421
800c3f4: 0800c42d .word 0x0800c42d
800c3f8: 0800c42d .word 0x0800c42d
800c3fc: 0800c42d .word 0x0800c42d
800c400: 0800c41b .word 0x0800c41b
800c404: 0800c42d .word 0x0800c42d
800c408: 0800c42d .word 0x0800c42d
800c40c: 0800c42d .word 0x0800c42d
800c410: 0800c427 .word 0x0800c427
800c414: 2300 movs r3, #0
800c416: 77fb strb r3, [r7, #31]
800c418: e117 b.n 800c64a <UART_SetConfig+0x34e>
800c41a: 2302 movs r3, #2
800c41c: 77fb strb r3, [r7, #31]
800c41e: e114 b.n 800c64a <UART_SetConfig+0x34e>
800c420: 2304 movs r3, #4
800c422: 77fb strb r3, [r7, #31]
800c424: e111 b.n 800c64a <UART_SetConfig+0x34e>
800c426: 2308 movs r3, #8
800c428: 77fb strb r3, [r7, #31]
800c42a: e10e b.n 800c64a <UART_SetConfig+0x34e>
800c42c: 2310 movs r3, #16
800c42e: 77fb strb r3, [r7, #31]
800c430: bf00 nop
800c432: e10a b.n 800c64a <UART_SetConfig+0x34e>
800c434: 687b ldr r3, [r7, #4]
800c436: 681b ldr r3, [r3, #0]
800c438: 4a71 ldr r2, [pc, #452] ; (800c600 <UART_SetConfig+0x304>)
800c43a: 4293 cmp r3, r2
800c43c: d120 bne.n 800c480 <UART_SetConfig+0x184>
800c43e: 4b6e ldr r3, [pc, #440] ; (800c5f8 <UART_SetConfig+0x2fc>)
800c440: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800c444: f003 0330 and.w r3, r3, #48 ; 0x30
800c448: 2b10 cmp r3, #16
800c44a: d00f beq.n 800c46c <UART_SetConfig+0x170>
800c44c: 2b10 cmp r3, #16
800c44e: d802 bhi.n 800c456 <UART_SetConfig+0x15a>
800c450: 2b00 cmp r3, #0
800c452: d005 beq.n 800c460 <UART_SetConfig+0x164>
800c454: e010 b.n 800c478 <UART_SetConfig+0x17c>
800c456: 2b20 cmp r3, #32
800c458: d005 beq.n 800c466 <UART_SetConfig+0x16a>
800c45a: 2b30 cmp r3, #48 ; 0x30
800c45c: d009 beq.n 800c472 <UART_SetConfig+0x176>
800c45e: e00b b.n 800c478 <UART_SetConfig+0x17c>
800c460: 2300 movs r3, #0
800c462: 77fb strb r3, [r7, #31]
800c464: e0f1 b.n 800c64a <UART_SetConfig+0x34e>
800c466: 2302 movs r3, #2
800c468: 77fb strb r3, [r7, #31]
800c46a: e0ee b.n 800c64a <UART_SetConfig+0x34e>
800c46c: 2304 movs r3, #4
800c46e: 77fb strb r3, [r7, #31]
800c470: e0eb b.n 800c64a <UART_SetConfig+0x34e>
800c472: 2308 movs r3, #8
800c474: 77fb strb r3, [r7, #31]
800c476: e0e8 b.n 800c64a <UART_SetConfig+0x34e>
800c478: 2310 movs r3, #16
800c47a: 77fb strb r3, [r7, #31]
800c47c: bf00 nop
800c47e: e0e4 b.n 800c64a <UART_SetConfig+0x34e>
800c480: 687b ldr r3, [r7, #4]
800c482: 681b ldr r3, [r3, #0]
800c484: 4a5f ldr r2, [pc, #380] ; (800c604 <UART_SetConfig+0x308>)
800c486: 4293 cmp r3, r2
800c488: d120 bne.n 800c4cc <UART_SetConfig+0x1d0>
800c48a: 4b5b ldr r3, [pc, #364] ; (800c5f8 <UART_SetConfig+0x2fc>)
800c48c: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800c490: f003 03c0 and.w r3, r3, #192 ; 0xc0
800c494: 2b40 cmp r3, #64 ; 0x40
800c496: d00f beq.n 800c4b8 <UART_SetConfig+0x1bc>
800c498: 2b40 cmp r3, #64 ; 0x40
800c49a: d802 bhi.n 800c4a2 <UART_SetConfig+0x1a6>
800c49c: 2b00 cmp r3, #0
800c49e: d005 beq.n 800c4ac <UART_SetConfig+0x1b0>
800c4a0: e010 b.n 800c4c4 <UART_SetConfig+0x1c8>
800c4a2: 2b80 cmp r3, #128 ; 0x80
800c4a4: d005 beq.n 800c4b2 <UART_SetConfig+0x1b6>
800c4a6: 2bc0 cmp r3, #192 ; 0xc0
800c4a8: d009 beq.n 800c4be <UART_SetConfig+0x1c2>
800c4aa: e00b b.n 800c4c4 <UART_SetConfig+0x1c8>
800c4ac: 2300 movs r3, #0
800c4ae: 77fb strb r3, [r7, #31]
800c4b0: e0cb b.n 800c64a <UART_SetConfig+0x34e>
800c4b2: 2302 movs r3, #2
800c4b4: 77fb strb r3, [r7, #31]
800c4b6: e0c8 b.n 800c64a <UART_SetConfig+0x34e>
800c4b8: 2304 movs r3, #4
800c4ba: 77fb strb r3, [r7, #31]
800c4bc: e0c5 b.n 800c64a <UART_SetConfig+0x34e>
800c4be: 2308 movs r3, #8
800c4c0: 77fb strb r3, [r7, #31]
800c4c2: e0c2 b.n 800c64a <UART_SetConfig+0x34e>
800c4c4: 2310 movs r3, #16
800c4c6: 77fb strb r3, [r7, #31]
800c4c8: bf00 nop
800c4ca: e0be b.n 800c64a <UART_SetConfig+0x34e>
800c4cc: 687b ldr r3, [r7, #4]
800c4ce: 681b ldr r3, [r3, #0]
800c4d0: 4a4d ldr r2, [pc, #308] ; (800c608 <UART_SetConfig+0x30c>)
800c4d2: 4293 cmp r3, r2
800c4d4: d124 bne.n 800c520 <UART_SetConfig+0x224>
800c4d6: 4b48 ldr r3, [pc, #288] ; (800c5f8 <UART_SetConfig+0x2fc>)
800c4d8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800c4dc: f403 7340 and.w r3, r3, #768 ; 0x300
800c4e0: f5b3 7f80 cmp.w r3, #256 ; 0x100
800c4e4: d012 beq.n 800c50c <UART_SetConfig+0x210>
800c4e6: f5b3 7f80 cmp.w r3, #256 ; 0x100
800c4ea: d802 bhi.n 800c4f2 <UART_SetConfig+0x1f6>
800c4ec: 2b00 cmp r3, #0
800c4ee: d007 beq.n 800c500 <UART_SetConfig+0x204>
800c4f0: e012 b.n 800c518 <UART_SetConfig+0x21c>
800c4f2: f5b3 7f00 cmp.w r3, #512 ; 0x200
800c4f6: d006 beq.n 800c506 <UART_SetConfig+0x20a>
800c4f8: f5b3 7f40 cmp.w r3, #768 ; 0x300
800c4fc: d009 beq.n 800c512 <UART_SetConfig+0x216>
800c4fe: e00b b.n 800c518 <UART_SetConfig+0x21c>
800c500: 2300 movs r3, #0
800c502: 77fb strb r3, [r7, #31]
800c504: e0a1 b.n 800c64a <UART_SetConfig+0x34e>
800c506: 2302 movs r3, #2
800c508: 77fb strb r3, [r7, #31]
800c50a: e09e b.n 800c64a <UART_SetConfig+0x34e>
800c50c: 2304 movs r3, #4
800c50e: 77fb strb r3, [r7, #31]
800c510: e09b b.n 800c64a <UART_SetConfig+0x34e>
800c512: 2308 movs r3, #8
800c514: 77fb strb r3, [r7, #31]
800c516: e098 b.n 800c64a <UART_SetConfig+0x34e>
800c518: 2310 movs r3, #16
800c51a: 77fb strb r3, [r7, #31]
800c51c: bf00 nop
800c51e: e094 b.n 800c64a <UART_SetConfig+0x34e>
800c520: 687b ldr r3, [r7, #4]
800c522: 681b ldr r3, [r3, #0]
800c524: 4a39 ldr r2, [pc, #228] ; (800c60c <UART_SetConfig+0x310>)
800c526: 4293 cmp r3, r2
800c528: d124 bne.n 800c574 <UART_SetConfig+0x278>
800c52a: 4b33 ldr r3, [pc, #204] ; (800c5f8 <UART_SetConfig+0x2fc>)
800c52c: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800c530: f403 6340 and.w r3, r3, #3072 ; 0xc00
800c534: f5b3 6f80 cmp.w r3, #1024 ; 0x400
800c538: d012 beq.n 800c560 <UART_SetConfig+0x264>
800c53a: f5b3 6f80 cmp.w r3, #1024 ; 0x400
800c53e: d802 bhi.n 800c546 <UART_SetConfig+0x24a>
800c540: 2b00 cmp r3, #0
800c542: d007 beq.n 800c554 <UART_SetConfig+0x258>
800c544: e012 b.n 800c56c <UART_SetConfig+0x270>
800c546: f5b3 6f00 cmp.w r3, #2048 ; 0x800
800c54a: d006 beq.n 800c55a <UART_SetConfig+0x25e>
800c54c: f5b3 6f40 cmp.w r3, #3072 ; 0xc00
800c550: d009 beq.n 800c566 <UART_SetConfig+0x26a>
800c552: e00b b.n 800c56c <UART_SetConfig+0x270>
800c554: 2301 movs r3, #1
800c556: 77fb strb r3, [r7, #31]
800c558: e077 b.n 800c64a <UART_SetConfig+0x34e>
800c55a: 2302 movs r3, #2
800c55c: 77fb strb r3, [r7, #31]
800c55e: e074 b.n 800c64a <UART_SetConfig+0x34e>
800c560: 2304 movs r3, #4
800c562: 77fb strb r3, [r7, #31]
800c564: e071 b.n 800c64a <UART_SetConfig+0x34e>
800c566: 2308 movs r3, #8
800c568: 77fb strb r3, [r7, #31]
800c56a: e06e b.n 800c64a <UART_SetConfig+0x34e>
800c56c: 2310 movs r3, #16
800c56e: 77fb strb r3, [r7, #31]
800c570: bf00 nop
800c572: e06a b.n 800c64a <UART_SetConfig+0x34e>
800c574: 687b ldr r3, [r7, #4]
800c576: 681b ldr r3, [r3, #0]
800c578: 4a25 ldr r2, [pc, #148] ; (800c610 <UART_SetConfig+0x314>)
800c57a: 4293 cmp r3, r2
800c57c: d124 bne.n 800c5c8 <UART_SetConfig+0x2cc>
800c57e: 4b1e ldr r3, [pc, #120] ; (800c5f8 <UART_SetConfig+0x2fc>)
800c580: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800c584: f403 5340 and.w r3, r3, #12288 ; 0x3000
800c588: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
800c58c: d012 beq.n 800c5b4 <UART_SetConfig+0x2b8>
800c58e: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
800c592: d802 bhi.n 800c59a <UART_SetConfig+0x29e>
800c594: 2b00 cmp r3, #0
800c596: d007 beq.n 800c5a8 <UART_SetConfig+0x2ac>
800c598: e012 b.n 800c5c0 <UART_SetConfig+0x2c4>
800c59a: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
800c59e: d006 beq.n 800c5ae <UART_SetConfig+0x2b2>
800c5a0: f5b3 5f40 cmp.w r3, #12288 ; 0x3000
800c5a4: d009 beq.n 800c5ba <UART_SetConfig+0x2be>
800c5a6: e00b b.n 800c5c0 <UART_SetConfig+0x2c4>
800c5a8: 2300 movs r3, #0
800c5aa: 77fb strb r3, [r7, #31]
800c5ac: e04d b.n 800c64a <UART_SetConfig+0x34e>
800c5ae: 2302 movs r3, #2
800c5b0: 77fb strb r3, [r7, #31]
800c5b2: e04a b.n 800c64a <UART_SetConfig+0x34e>
800c5b4: 2304 movs r3, #4
800c5b6: 77fb strb r3, [r7, #31]
800c5b8: e047 b.n 800c64a <UART_SetConfig+0x34e>
800c5ba: 2308 movs r3, #8
800c5bc: 77fb strb r3, [r7, #31]
800c5be: e044 b.n 800c64a <UART_SetConfig+0x34e>
800c5c0: 2310 movs r3, #16
800c5c2: 77fb strb r3, [r7, #31]
800c5c4: bf00 nop
800c5c6: e040 b.n 800c64a <UART_SetConfig+0x34e>
800c5c8: 687b ldr r3, [r7, #4]
800c5ca: 681b ldr r3, [r3, #0]
800c5cc: 4a11 ldr r2, [pc, #68] ; (800c614 <UART_SetConfig+0x318>)
800c5ce: 4293 cmp r3, r2
800c5d0: d139 bne.n 800c646 <UART_SetConfig+0x34a>
800c5d2: 4b09 ldr r3, [pc, #36] ; (800c5f8 <UART_SetConfig+0x2fc>)
800c5d4: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800c5d8: f403 4340 and.w r3, r3, #49152 ; 0xc000
800c5dc: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
800c5e0: d027 beq.n 800c632 <UART_SetConfig+0x336>
800c5e2: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
800c5e6: d817 bhi.n 800c618 <UART_SetConfig+0x31c>
800c5e8: 2b00 cmp r3, #0
800c5ea: d01c beq.n 800c626 <UART_SetConfig+0x32a>
800c5ec: e027 b.n 800c63e <UART_SetConfig+0x342>
800c5ee: bf00 nop
800c5f0: efff69f3 .word 0xefff69f3
800c5f4: 40011000 .word 0x40011000
800c5f8: 40023800 .word 0x40023800
800c5fc: 40004400 .word 0x40004400
800c600: 40004800 .word 0x40004800
800c604: 40004c00 .word 0x40004c00
800c608: 40005000 .word 0x40005000
800c60c: 40011400 .word 0x40011400
800c610: 40007800 .word 0x40007800
800c614: 40007c00 .word 0x40007c00
800c618: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
800c61c: d006 beq.n 800c62c <UART_SetConfig+0x330>
800c61e: f5b3 4f40 cmp.w r3, #49152 ; 0xc000
800c622: d009 beq.n 800c638 <UART_SetConfig+0x33c>
800c624: e00b b.n 800c63e <UART_SetConfig+0x342>
800c626: 2300 movs r3, #0
800c628: 77fb strb r3, [r7, #31]
800c62a: e00e b.n 800c64a <UART_SetConfig+0x34e>
800c62c: 2302 movs r3, #2
800c62e: 77fb strb r3, [r7, #31]
800c630: e00b b.n 800c64a <UART_SetConfig+0x34e>
800c632: 2304 movs r3, #4
800c634: 77fb strb r3, [r7, #31]
800c636: e008 b.n 800c64a <UART_SetConfig+0x34e>
800c638: 2308 movs r3, #8
800c63a: 77fb strb r3, [r7, #31]
800c63c: e005 b.n 800c64a <UART_SetConfig+0x34e>
800c63e: 2310 movs r3, #16
800c640: 77fb strb r3, [r7, #31]
800c642: bf00 nop
800c644: e001 b.n 800c64a <UART_SetConfig+0x34e>
800c646: 2310 movs r3, #16
800c648: 77fb strb r3, [r7, #31]
if (huart->Init.OverSampling == UART_OVERSAMPLING_8)
800c64a: 687b ldr r3, [r7, #4]
800c64c: 69db ldr r3, [r3, #28]
800c64e: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
800c652: d17f bne.n 800c754 <UART_SetConfig+0x458>
{
switch (clocksource)
800c654: 7ffb ldrb r3, [r7, #31]
800c656: 2b08 cmp r3, #8
800c658: d85c bhi.n 800c714 <UART_SetConfig+0x418>
800c65a: a201 add r2, pc, #4 ; (adr r2, 800c660 <UART_SetConfig+0x364>)
800c65c: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800c660: 0800c685 .word 0x0800c685
800c664: 0800c6a5 .word 0x0800c6a5
800c668: 0800c6c5 .word 0x0800c6c5
800c66c: 0800c715 .word 0x0800c715
800c670: 0800c6dd .word 0x0800c6dd
800c674: 0800c715 .word 0x0800c715
800c678: 0800c715 .word 0x0800c715
800c67c: 0800c715 .word 0x0800c715
800c680: 0800c6fd .word 0x0800c6fd
{
case UART_CLOCKSOURCE_PCLK1:
pclk = HAL_RCC_GetPCLK1Freq();
800c684: f7fd fb78 bl 8009d78 <HAL_RCC_GetPCLK1Freq>
800c688: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate));
800c68a: 68fb ldr r3, [r7, #12]
800c68c: 005a lsls r2, r3, #1
800c68e: 687b ldr r3, [r7, #4]
800c690: 685b ldr r3, [r3, #4]
800c692: 085b lsrs r3, r3, #1
800c694: 441a add r2, r3
800c696: 687b ldr r3, [r7, #4]
800c698: 685b ldr r3, [r3, #4]
800c69a: fbb2 f3f3 udiv r3, r2, r3
800c69e: b29b uxth r3, r3
800c6a0: 61bb str r3, [r7, #24]
break;
800c6a2: e03a b.n 800c71a <UART_SetConfig+0x41e>
case UART_CLOCKSOURCE_PCLK2:
pclk = HAL_RCC_GetPCLK2Freq();
800c6a4: f7fd fb7c bl 8009da0 <HAL_RCC_GetPCLK2Freq>
800c6a8: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate));
800c6aa: 68fb ldr r3, [r7, #12]
800c6ac: 005a lsls r2, r3, #1
800c6ae: 687b ldr r3, [r7, #4]
800c6b0: 685b ldr r3, [r3, #4]
800c6b2: 085b lsrs r3, r3, #1
800c6b4: 441a add r2, r3
800c6b6: 687b ldr r3, [r7, #4]
800c6b8: 685b ldr r3, [r3, #4]
800c6ba: fbb2 f3f3 udiv r3, r2, r3
800c6be: b29b uxth r3, r3
800c6c0: 61bb str r3, [r7, #24]
break;
800c6c2: e02a b.n 800c71a <UART_SetConfig+0x41e>
case UART_CLOCKSOURCE_HSI:
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(HSI_VALUE, huart->Init.BaudRate));
800c6c4: 687b ldr r3, [r7, #4]
800c6c6: 685b ldr r3, [r3, #4]
800c6c8: 085a lsrs r2, r3, #1
800c6ca: 4b5f ldr r3, [pc, #380] ; (800c848 <UART_SetConfig+0x54c>)
800c6cc: 4413 add r3, r2
800c6ce: 687a ldr r2, [r7, #4]
800c6d0: 6852 ldr r2, [r2, #4]
800c6d2: fbb3 f3f2 udiv r3, r3, r2
800c6d6: b29b uxth r3, r3
800c6d8: 61bb str r3, [r7, #24]
break;
800c6da: e01e b.n 800c71a <UART_SetConfig+0x41e>
case UART_CLOCKSOURCE_SYSCLK:
pclk = HAL_RCC_GetSysClockFreq();
800c6dc: f7fd fa8e bl 8009bfc <HAL_RCC_GetSysClockFreq>
800c6e0: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate));
800c6e2: 68fb ldr r3, [r7, #12]
800c6e4: 005a lsls r2, r3, #1
800c6e6: 687b ldr r3, [r7, #4]
800c6e8: 685b ldr r3, [r3, #4]
800c6ea: 085b lsrs r3, r3, #1
800c6ec: 441a add r2, r3
800c6ee: 687b ldr r3, [r7, #4]
800c6f0: 685b ldr r3, [r3, #4]
800c6f2: fbb2 f3f3 udiv r3, r2, r3
800c6f6: b29b uxth r3, r3
800c6f8: 61bb str r3, [r7, #24]
break;
800c6fa: e00e b.n 800c71a <UART_SetConfig+0x41e>
case UART_CLOCKSOURCE_LSE:
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(LSE_VALUE, huart->Init.BaudRate));
800c6fc: 687b ldr r3, [r7, #4]
800c6fe: 685b ldr r3, [r3, #4]
800c700: 085b lsrs r3, r3, #1
800c702: f503 3280 add.w r2, r3, #65536 ; 0x10000
800c706: 687b ldr r3, [r7, #4]
800c708: 685b ldr r3, [r3, #4]
800c70a: fbb2 f3f3 udiv r3, r2, r3
800c70e: b29b uxth r3, r3
800c710: 61bb str r3, [r7, #24]
break;
800c712: e002 b.n 800c71a <UART_SetConfig+0x41e>
default:
ret = HAL_ERROR;
800c714: 2301 movs r3, #1
800c716: 75fb strb r3, [r7, #23]
break;
800c718: bf00 nop
}
/* USARTDIV must be greater than or equal to 0d16 */
if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX))
800c71a: 69bb ldr r3, [r7, #24]
800c71c: 2b0f cmp r3, #15
800c71e: d916 bls.n 800c74e <UART_SetConfig+0x452>
800c720: 69bb ldr r3, [r7, #24]
800c722: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c726: d212 bcs.n 800c74e <UART_SetConfig+0x452>
{
brrtemp = (uint16_t)(usartdiv & 0xFFF0U);
800c728: 69bb ldr r3, [r7, #24]
800c72a: b29b uxth r3, r3
800c72c: f023 030f bic.w r3, r3, #15
800c730: 817b strh r3, [r7, #10]
brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U);
800c732: 69bb ldr r3, [r7, #24]
800c734: 085b lsrs r3, r3, #1
800c736: b29b uxth r3, r3
800c738: f003 0307 and.w r3, r3, #7
800c73c: b29a uxth r2, r3
800c73e: 897b ldrh r3, [r7, #10]
800c740: 4313 orrs r3, r2
800c742: 817b strh r3, [r7, #10]
huart->Instance->BRR = brrtemp;
800c744: 687b ldr r3, [r7, #4]
800c746: 681b ldr r3, [r3, #0]
800c748: 897a ldrh r2, [r7, #10]
800c74a: 60da str r2, [r3, #12]
800c74c: e070 b.n 800c830 <UART_SetConfig+0x534>
}
else
{
ret = HAL_ERROR;
800c74e: 2301 movs r3, #1
800c750: 75fb strb r3, [r7, #23]
800c752: e06d b.n 800c830 <UART_SetConfig+0x534>
}
}
else
{
switch (clocksource)
800c754: 7ffb ldrb r3, [r7, #31]
800c756: 2b08 cmp r3, #8
800c758: d859 bhi.n 800c80e <UART_SetConfig+0x512>
800c75a: a201 add r2, pc, #4 ; (adr r2, 800c760 <UART_SetConfig+0x464>)
800c75c: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800c760: 0800c785 .word 0x0800c785
800c764: 0800c7a3 .word 0x0800c7a3
800c768: 0800c7c1 .word 0x0800c7c1
800c76c: 0800c80f .word 0x0800c80f
800c770: 0800c7d9 .word 0x0800c7d9
800c774: 0800c80f .word 0x0800c80f
800c778: 0800c80f .word 0x0800c80f
800c77c: 0800c80f .word 0x0800c80f
800c780: 0800c7f7 .word 0x0800c7f7
{
case UART_CLOCKSOURCE_PCLK1:
pclk = HAL_RCC_GetPCLK1Freq();
800c784: f7fd faf8 bl 8009d78 <HAL_RCC_GetPCLK1Freq>
800c788: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate));
800c78a: 687b ldr r3, [r7, #4]
800c78c: 685b ldr r3, [r3, #4]
800c78e: 085a lsrs r2, r3, #1
800c790: 68fb ldr r3, [r7, #12]
800c792: 441a add r2, r3
800c794: 687b ldr r3, [r7, #4]
800c796: 685b ldr r3, [r3, #4]
800c798: fbb2 f3f3 udiv r3, r2, r3
800c79c: b29b uxth r3, r3
800c79e: 61bb str r3, [r7, #24]
break;
800c7a0: e038 b.n 800c814 <UART_SetConfig+0x518>
case UART_CLOCKSOURCE_PCLK2:
pclk = HAL_RCC_GetPCLK2Freq();
800c7a2: f7fd fafd bl 8009da0 <HAL_RCC_GetPCLK2Freq>
800c7a6: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate));
800c7a8: 687b ldr r3, [r7, #4]
800c7aa: 685b ldr r3, [r3, #4]
800c7ac: 085a lsrs r2, r3, #1
800c7ae: 68fb ldr r3, [r7, #12]
800c7b0: 441a add r2, r3
800c7b2: 687b ldr r3, [r7, #4]
800c7b4: 685b ldr r3, [r3, #4]
800c7b6: fbb2 f3f3 udiv r3, r2, r3
800c7ba: b29b uxth r3, r3
800c7bc: 61bb str r3, [r7, #24]
break;
800c7be: e029 b.n 800c814 <UART_SetConfig+0x518>
case UART_CLOCKSOURCE_HSI:
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(HSI_VALUE, huart->Init.BaudRate));
800c7c0: 687b ldr r3, [r7, #4]
800c7c2: 685b ldr r3, [r3, #4]
800c7c4: 085a lsrs r2, r3, #1
800c7c6: 4b21 ldr r3, [pc, #132] ; (800c84c <UART_SetConfig+0x550>)
800c7c8: 4413 add r3, r2
800c7ca: 687a ldr r2, [r7, #4]
800c7cc: 6852 ldr r2, [r2, #4]
800c7ce: fbb3 f3f2 udiv r3, r3, r2
800c7d2: b29b uxth r3, r3
800c7d4: 61bb str r3, [r7, #24]
break;
800c7d6: e01d b.n 800c814 <UART_SetConfig+0x518>
case UART_CLOCKSOURCE_SYSCLK:
pclk = HAL_RCC_GetSysClockFreq();
800c7d8: f7fd fa10 bl 8009bfc <HAL_RCC_GetSysClockFreq>
800c7dc: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate));
800c7de: 687b ldr r3, [r7, #4]
800c7e0: 685b ldr r3, [r3, #4]
800c7e2: 085a lsrs r2, r3, #1
800c7e4: 68fb ldr r3, [r7, #12]
800c7e6: 441a add r2, r3
800c7e8: 687b ldr r3, [r7, #4]
800c7ea: 685b ldr r3, [r3, #4]
800c7ec: fbb2 f3f3 udiv r3, r2, r3
800c7f0: b29b uxth r3, r3
800c7f2: 61bb str r3, [r7, #24]
break;
800c7f4: e00e b.n 800c814 <UART_SetConfig+0x518>
case UART_CLOCKSOURCE_LSE:
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(LSE_VALUE, huart->Init.BaudRate));
800c7f6: 687b ldr r3, [r7, #4]
800c7f8: 685b ldr r3, [r3, #4]
800c7fa: 085b lsrs r3, r3, #1
800c7fc: f503 4200 add.w r2, r3, #32768 ; 0x8000
800c800: 687b ldr r3, [r7, #4]
800c802: 685b ldr r3, [r3, #4]
800c804: fbb2 f3f3 udiv r3, r2, r3
800c808: b29b uxth r3, r3
800c80a: 61bb str r3, [r7, #24]
break;
800c80c: e002 b.n 800c814 <UART_SetConfig+0x518>
default:
ret = HAL_ERROR;
800c80e: 2301 movs r3, #1
800c810: 75fb strb r3, [r7, #23]
break;
800c812: bf00 nop
}
/* USARTDIV must be greater than or equal to 0d16 */
if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX))
800c814: 69bb ldr r3, [r7, #24]
800c816: 2b0f cmp r3, #15
800c818: d908 bls.n 800c82c <UART_SetConfig+0x530>
800c81a: 69bb ldr r3, [r7, #24]
800c81c: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c820: d204 bcs.n 800c82c <UART_SetConfig+0x530>
{
huart->Instance->BRR = usartdiv;
800c822: 687b ldr r3, [r7, #4]
800c824: 681b ldr r3, [r3, #0]
800c826: 69ba ldr r2, [r7, #24]
800c828: 60da str r2, [r3, #12]
800c82a: e001 b.n 800c830 <UART_SetConfig+0x534>
}
else
{
ret = HAL_ERROR;
800c82c: 2301 movs r3, #1
800c82e: 75fb strb r3, [r7, #23]
}
}
/* Clear ISR function pointers */
huart->RxISR = NULL;
800c830: 687b ldr r3, [r7, #4]
800c832: 2200 movs r2, #0
800c834: 661a str r2, [r3, #96] ; 0x60
huart->TxISR = NULL;
800c836: 687b ldr r3, [r7, #4]
800c838: 2200 movs r2, #0
800c83a: 665a str r2, [r3, #100] ; 0x64
return ret;
800c83c: 7dfb ldrb r3, [r7, #23]
}
800c83e: 4618 mov r0, r3
800c840: 3720 adds r7, #32
800c842: 46bd mov sp, r7
800c844: bd80 pop {r7, pc}
800c846: bf00 nop
800c848: 01e84800 .word 0x01e84800
800c84c: 00f42400 .word 0x00f42400
0800c850 <UART_AdvFeatureConfig>:
* @brief Configure the UART peripheral advanced features.
* @param huart UART handle.
* @retval None
*/
void UART_AdvFeatureConfig(UART_HandleTypeDef *huart)
{
800c850: b480 push {r7}
800c852: b083 sub sp, #12
800c854: af00 add r7, sp, #0
800c856: 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 TX pin active level inversion */
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_TXINVERT_INIT))
800c858: 687b ldr r3, [r7, #4]
800c85a: 6a5b ldr r3, [r3, #36] ; 0x24
800c85c: f003 0301 and.w r3, r3, #1
800c860: 2b00 cmp r3, #0
800c862: d00a beq.n 800c87a <UART_AdvFeatureConfig+0x2a>
{
assert_param(IS_UART_ADVFEATURE_TXINV(huart->AdvancedInit.TxPinLevelInvert));
MODIFY_REG(huart->Instance->CR2, USART_CR2_TXINV, huart->AdvancedInit.TxPinLevelInvert);
800c864: 687b ldr r3, [r7, #4]
800c866: 681b ldr r3, [r3, #0]
800c868: 685b ldr r3, [r3, #4]
800c86a: f423 3100 bic.w r1, r3, #131072 ; 0x20000
800c86e: 687b ldr r3, [r7, #4]
800c870: 6a9a ldr r2, [r3, #40] ; 0x28
800c872: 687b ldr r3, [r7, #4]
800c874: 681b ldr r3, [r3, #0]
800c876: 430a orrs r2, r1
800c878: 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))
800c87a: 687b ldr r3, [r7, #4]
800c87c: 6a5b ldr r3, [r3, #36] ; 0x24
800c87e: f003 0302 and.w r3, r3, #2
800c882: 2b00 cmp r3, #0
800c884: d00a beq.n 800c89c <UART_AdvFeatureConfig+0x4c>
{
assert_param(IS_UART_ADVFEATURE_RXINV(huart->AdvancedInit.RxPinLevelInvert));
MODIFY_REG(huart->Instance->CR2, USART_CR2_RXINV, huart->AdvancedInit.RxPinLevelInvert);
800c886: 687b ldr r3, [r7, #4]
800c888: 681b ldr r3, [r3, #0]
800c88a: 685b ldr r3, [r3, #4]
800c88c: f423 3180 bic.w r1, r3, #65536 ; 0x10000
800c890: 687b ldr r3, [r7, #4]
800c892: 6ada ldr r2, [r3, #44] ; 0x2c
800c894: 687b ldr r3, [r7, #4]
800c896: 681b ldr r3, [r3, #0]
800c898: 430a orrs r2, r1
800c89a: 605a str r2, [r3, #4]
}
/* if required, configure data inversion */
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DATAINVERT_INIT))
800c89c: 687b ldr r3, [r7, #4]
800c89e: 6a5b ldr r3, [r3, #36] ; 0x24
800c8a0: f003 0304 and.w r3, r3, #4
800c8a4: 2b00 cmp r3, #0
800c8a6: d00a beq.n 800c8be <UART_AdvFeatureConfig+0x6e>
{
assert_param(IS_UART_ADVFEATURE_DATAINV(huart->AdvancedInit.DataInvert));
MODIFY_REG(huart->Instance->CR2, USART_CR2_DATAINV, huart->AdvancedInit.DataInvert);
800c8a8: 687b ldr r3, [r7, #4]
800c8aa: 681b ldr r3, [r3, #0]
800c8ac: 685b ldr r3, [r3, #4]
800c8ae: f423 2180 bic.w r1, r3, #262144 ; 0x40000
800c8b2: 687b ldr r3, [r7, #4]
800c8b4: 6b1a ldr r2, [r3, #48] ; 0x30
800c8b6: 687b ldr r3, [r7, #4]
800c8b8: 681b ldr r3, [r3, #0]
800c8ba: 430a orrs r2, r1
800c8bc: 605a str r2, [r3, #4]
}
/* if required, configure RX/TX pins swap */
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_SWAP_INIT))
800c8be: 687b ldr r3, [r7, #4]
800c8c0: 6a5b ldr r3, [r3, #36] ; 0x24
800c8c2: f003 0308 and.w r3, r3, #8
800c8c6: 2b00 cmp r3, #0
800c8c8: d00a beq.n 800c8e0 <UART_AdvFeatureConfig+0x90>
{
assert_param(IS_UART_ADVFEATURE_SWAP(huart->AdvancedInit.Swap));
MODIFY_REG(huart->Instance->CR2, USART_CR2_SWAP, huart->AdvancedInit.Swap);
800c8ca: 687b ldr r3, [r7, #4]
800c8cc: 681b ldr r3, [r3, #0]
800c8ce: 685b ldr r3, [r3, #4]
800c8d0: f423 4100 bic.w r1, r3, #32768 ; 0x8000
800c8d4: 687b ldr r3, [r7, #4]
800c8d6: 6b5a ldr r2, [r3, #52] ; 0x34
800c8d8: 687b ldr r3, [r7, #4]
800c8da: 681b ldr r3, [r3, #0]
800c8dc: 430a orrs r2, r1
800c8de: 605a str r2, [r3, #4]
}
/* if required, configure RX overrun detection disabling */
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXOVERRUNDISABLE_INIT))
800c8e0: 687b ldr r3, [r7, #4]
800c8e2: 6a5b ldr r3, [r3, #36] ; 0x24
800c8e4: f003 0310 and.w r3, r3, #16
800c8e8: 2b00 cmp r3, #0
800c8ea: d00a beq.n 800c902 <UART_AdvFeatureConfig+0xb2>
{
assert_param(IS_UART_OVERRUN(huart->AdvancedInit.OverrunDisable));
MODIFY_REG(huart->Instance->CR3, USART_CR3_OVRDIS, huart->AdvancedInit.OverrunDisable);
800c8ec: 687b ldr r3, [r7, #4]
800c8ee: 681b ldr r3, [r3, #0]
800c8f0: 689b ldr r3, [r3, #8]
800c8f2: f423 5180 bic.w r1, r3, #4096 ; 0x1000
800c8f6: 687b ldr r3, [r7, #4]
800c8f8: 6b9a ldr r2, [r3, #56] ; 0x38
800c8fa: 687b ldr r3, [r7, #4]
800c8fc: 681b ldr r3, [r3, #0]
800c8fe: 430a orrs r2, r1
800c900: 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))
800c902: 687b ldr r3, [r7, #4]
800c904: 6a5b ldr r3, [r3, #36] ; 0x24
800c906: f003 0320 and.w r3, r3, #32
800c90a: 2b00 cmp r3, #0
800c90c: d00a beq.n 800c924 <UART_AdvFeatureConfig+0xd4>
{
assert_param(IS_UART_ADVFEATURE_DMAONRXERROR(huart->AdvancedInit.DMADisableonRxError));
MODIFY_REG(huart->Instance->CR3, USART_CR3_DDRE, huart->AdvancedInit.DMADisableonRxError);
800c90e: 687b ldr r3, [r7, #4]
800c910: 681b ldr r3, [r3, #0]
800c912: 689b ldr r3, [r3, #8]
800c914: f423 5100 bic.w r1, r3, #8192 ; 0x2000
800c918: 687b ldr r3, [r7, #4]
800c91a: 6bda ldr r2, [r3, #60] ; 0x3c
800c91c: 687b ldr r3, [r7, #4]
800c91e: 681b ldr r3, [r3, #0]
800c920: 430a orrs r2, r1
800c922: 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))
800c924: 687b ldr r3, [r7, #4]
800c926: 6a5b ldr r3, [r3, #36] ; 0x24
800c928: f003 0340 and.w r3, r3, #64 ; 0x40
800c92c: 2b00 cmp r3, #0
800c92e: d01a beq.n 800c966 <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);
800c930: 687b ldr r3, [r7, #4]
800c932: 681b ldr r3, [r3, #0]
800c934: 685b ldr r3, [r3, #4]
800c936: f423 1180 bic.w r1, r3, #1048576 ; 0x100000
800c93a: 687b ldr r3, [r7, #4]
800c93c: 6c1a ldr r2, [r3, #64] ; 0x40
800c93e: 687b ldr r3, [r7, #4]
800c940: 681b ldr r3, [r3, #0]
800c942: 430a orrs r2, r1
800c944: 605a str r2, [r3, #4]
/* set auto Baudrate detection parameters if detection is enabled */
if (huart->AdvancedInit.AutoBaudRateEnable == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE)
800c946: 687b ldr r3, [r7, #4]
800c948: 6c1b ldr r3, [r3, #64] ; 0x40
800c94a: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
800c94e: d10a bne.n 800c966 <UART_AdvFeatureConfig+0x116>
{
assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(huart->AdvancedInit.AutoBaudRateMode));
MODIFY_REG(huart->Instance->CR2, USART_CR2_ABRMODE, huart->AdvancedInit.AutoBaudRateMode);
800c950: 687b ldr r3, [r7, #4]
800c952: 681b ldr r3, [r3, #0]
800c954: 685b ldr r3, [r3, #4]
800c956: f423 01c0 bic.w r1, r3, #6291456 ; 0x600000
800c95a: 687b ldr r3, [r7, #4]
800c95c: 6c5a ldr r2, [r3, #68] ; 0x44
800c95e: 687b ldr r3, [r7, #4]
800c960: 681b ldr r3, [r3, #0]
800c962: 430a orrs r2, r1
800c964: 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))
800c966: 687b ldr r3, [r7, #4]
800c968: 6a5b ldr r3, [r3, #36] ; 0x24
800c96a: f003 0380 and.w r3, r3, #128 ; 0x80
800c96e: 2b00 cmp r3, #0
800c970: d00a beq.n 800c988 <UART_AdvFeatureConfig+0x138>
{
assert_param(IS_UART_ADVFEATURE_MSBFIRST(huart->AdvancedInit.MSBFirst));
MODIFY_REG(huart->Instance->CR2, USART_CR2_MSBFIRST, huart->AdvancedInit.MSBFirst);
800c972: 687b ldr r3, [r7, #4]
800c974: 681b ldr r3, [r3, #0]
800c976: 685b ldr r3, [r3, #4]
800c978: f423 2100 bic.w r1, r3, #524288 ; 0x80000
800c97c: 687b ldr r3, [r7, #4]
800c97e: 6c9a ldr r2, [r3, #72] ; 0x48
800c980: 687b ldr r3, [r7, #4]
800c982: 681b ldr r3, [r3, #0]
800c984: 430a orrs r2, r1
800c986: 605a str r2, [r3, #4]
}
}
800c988: bf00 nop
800c98a: 370c adds r7, #12
800c98c: 46bd mov sp, r7
800c98e: f85d 7b04 ldr.w r7, [sp], #4
800c992: 4770 bx lr
0800c994 <UART_CheckIdleState>:
* @brief Check the UART Idle State.
* @param huart UART handle.
* @retval HAL status
*/
HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart)
{
800c994: b580 push {r7, lr}
800c996: b086 sub sp, #24
800c998: af02 add r7, sp, #8
800c99a: 6078 str r0, [r7, #4]
uint32_t tickstart;
/* Initialize the UART ErrorCode */
huart->ErrorCode = HAL_UART_ERROR_NONE;
800c99c: 687b ldr r3, [r7, #4]
800c99e: 2200 movs r2, #0
800c9a0: 67da str r2, [r3, #124] ; 0x7c
/* Init tickstart for timeout managment*/
tickstart = HAL_GetTick();
800c9a2: f7f8 fcbd bl 8005320 <HAL_GetTick>
800c9a6: 60f8 str r0, [r7, #12]
/* Check if the Transmitter is enabled */
if ((huart->Instance->CR1 & USART_CR1_TE) == USART_CR1_TE)
800c9a8: 687b ldr r3, [r7, #4]
800c9aa: 681b ldr r3, [r3, #0]
800c9ac: 681b ldr r3, [r3, #0]
800c9ae: f003 0308 and.w r3, r3, #8
800c9b2: 2b08 cmp r3, #8
800c9b4: d10e bne.n 800c9d4 <UART_CheckIdleState+0x40>
{
/* Wait until TEACK flag is set */
if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_TEACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK)
800c9b6: f06f 437e mvn.w r3, #4261412864 ; 0xfe000000
800c9ba: 9300 str r3, [sp, #0]
800c9bc: 68fb ldr r3, [r7, #12]
800c9be: 2200 movs r2, #0
800c9c0: f44f 1100 mov.w r1, #2097152 ; 0x200000
800c9c4: 6878 ldr r0, [r7, #4]
800c9c6: f000 f814 bl 800c9f2 <UART_WaitOnFlagUntilTimeout>
800c9ca: 4603 mov r3, r0
800c9cc: 2b00 cmp r3, #0
800c9ce: d001 beq.n 800c9d4 <UART_CheckIdleState+0x40>
{
/* Timeout occurred */
return HAL_TIMEOUT;
800c9d0: 2303 movs r3, #3
800c9d2: e00a b.n 800c9ea <UART_CheckIdleState+0x56>
}
}
#endif
/* Initialize the UART State */
huart->gState = HAL_UART_STATE_READY;
800c9d4: 687b ldr r3, [r7, #4]
800c9d6: 2220 movs r2, #32
800c9d8: 675a str r2, [r3, #116] ; 0x74
huart->RxState = HAL_UART_STATE_READY;
800c9da: 687b ldr r3, [r7, #4]
800c9dc: 2220 movs r2, #32
800c9de: 679a str r2, [r3, #120] ; 0x78
__HAL_UNLOCK(huart);
800c9e0: 687b ldr r3, [r7, #4]
800c9e2: 2200 movs r2, #0
800c9e4: f883 2070 strb.w r2, [r3, #112] ; 0x70
return HAL_OK;
800c9e8: 2300 movs r3, #0
}
800c9ea: 4618 mov r0, r3
800c9ec: 3710 adds r7, #16
800c9ee: 46bd mov sp, r7
800c9f0: bd80 pop {r7, pc}
0800c9f2 <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)
{
800c9f2: b580 push {r7, lr}
800c9f4: b084 sub sp, #16
800c9f6: af00 add r7, sp, #0
800c9f8: 60f8 str r0, [r7, #12]
800c9fa: 60b9 str r1, [r7, #8]
800c9fc: 603b str r3, [r7, #0]
800c9fe: 4613 mov r3, r2
800ca00: 71fb strb r3, [r7, #7]
/* Wait until flag is set */
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
800ca02: e05d b.n 800cac0 <UART_WaitOnFlagUntilTimeout+0xce>
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
800ca04: 69bb ldr r3, [r7, #24]
800ca06: f1b3 3fff cmp.w r3, #4294967295
800ca0a: d059 beq.n 800cac0 <UART_WaitOnFlagUntilTimeout+0xce>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
800ca0c: f7f8 fc88 bl 8005320 <HAL_GetTick>
800ca10: 4602 mov r2, r0
800ca12: 683b ldr r3, [r7, #0]
800ca14: 1ad3 subs r3, r2, r3
800ca16: 69ba ldr r2, [r7, #24]
800ca18: 429a cmp r2, r3
800ca1a: d302 bcc.n 800ca22 <UART_WaitOnFlagUntilTimeout+0x30>
800ca1c: 69bb ldr r3, [r7, #24]
800ca1e: 2b00 cmp r3, #0
800ca20: d11b bne.n 800ca5a <UART_WaitOnFlagUntilTimeout+0x68>
{
/* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts for the interrupt process */
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE));
800ca22: 68fb ldr r3, [r7, #12]
800ca24: 681b ldr r3, [r3, #0]
800ca26: 681a ldr r2, [r3, #0]
800ca28: 68fb ldr r3, [r7, #12]
800ca2a: 681b ldr r3, [r3, #0]
800ca2c: f422 72d0 bic.w r2, r2, #416 ; 0x1a0
800ca30: 601a str r2, [r3, #0]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
800ca32: 68fb ldr r3, [r7, #12]
800ca34: 681b ldr r3, [r3, #0]
800ca36: 689a ldr r2, [r3, #8]
800ca38: 68fb ldr r3, [r7, #12]
800ca3a: 681b ldr r3, [r3, #0]
800ca3c: f022 0201 bic.w r2, r2, #1
800ca40: 609a str r2, [r3, #8]
huart->gState = HAL_UART_STATE_READY;
800ca42: 68fb ldr r3, [r7, #12]
800ca44: 2220 movs r2, #32
800ca46: 675a str r2, [r3, #116] ; 0x74
huart->RxState = HAL_UART_STATE_READY;
800ca48: 68fb ldr r3, [r7, #12]
800ca4a: 2220 movs r2, #32
800ca4c: 679a str r2, [r3, #120] ; 0x78
__HAL_UNLOCK(huart);
800ca4e: 68fb ldr r3, [r7, #12]
800ca50: 2200 movs r2, #0
800ca52: f883 2070 strb.w r2, [r3, #112] ; 0x70
return HAL_TIMEOUT;
800ca56: 2303 movs r3, #3
800ca58: e042 b.n 800cae0 <UART_WaitOnFlagUntilTimeout+0xee>
}
if (READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U)
800ca5a: 68fb ldr r3, [r7, #12]
800ca5c: 681b ldr r3, [r3, #0]
800ca5e: 681b ldr r3, [r3, #0]
800ca60: f003 0304 and.w r3, r3, #4
800ca64: 2b00 cmp r3, #0
800ca66: d02b beq.n 800cac0 <UART_WaitOnFlagUntilTimeout+0xce>
{
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET)
800ca68: 68fb ldr r3, [r7, #12]
800ca6a: 681b ldr r3, [r3, #0]
800ca6c: 69db ldr r3, [r3, #28]
800ca6e: f403 6300 and.w r3, r3, #2048 ; 0x800
800ca72: f5b3 6f00 cmp.w r3, #2048 ; 0x800
800ca76: d123 bne.n 800cac0 <UART_WaitOnFlagUntilTimeout+0xce>
{
/* Clear Receiver Timeout flag*/
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF);
800ca78: 68fb ldr r3, [r7, #12]
800ca7a: 681b ldr r3, [r3, #0]
800ca7c: f44f 6200 mov.w r2, #2048 ; 0x800
800ca80: 621a str r2, [r3, #32]
/* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts for the interrupt process */
CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE));
800ca82: 68fb ldr r3, [r7, #12]
800ca84: 681b ldr r3, [r3, #0]
800ca86: 681a ldr r2, [r3, #0]
800ca88: 68fb ldr r3, [r7, #12]
800ca8a: 681b ldr r3, [r3, #0]
800ca8c: f422 72d0 bic.w r2, r2, #416 ; 0x1a0
800ca90: 601a str r2, [r3, #0]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
800ca92: 68fb ldr r3, [r7, #12]
800ca94: 681b ldr r3, [r3, #0]
800ca96: 689a ldr r2, [r3, #8]
800ca98: 68fb ldr r3, [r7, #12]
800ca9a: 681b ldr r3, [r3, #0]
800ca9c: f022 0201 bic.w r2, r2, #1
800caa0: 609a str r2, [r3, #8]
huart->gState = HAL_UART_STATE_READY;
800caa2: 68fb ldr r3, [r7, #12]
800caa4: 2220 movs r2, #32
800caa6: 675a str r2, [r3, #116] ; 0x74
huart->RxState = HAL_UART_STATE_READY;
800caa8: 68fb ldr r3, [r7, #12]
800caaa: 2220 movs r2, #32
800caac: 679a str r2, [r3, #120] ; 0x78
huart->ErrorCode = HAL_UART_ERROR_RTO;
800caae: 68fb ldr r3, [r7, #12]
800cab0: 2220 movs r2, #32
800cab2: 67da str r2, [r3, #124] ; 0x7c
/* Process Unlocked */
__HAL_UNLOCK(huart);
800cab4: 68fb ldr r3, [r7, #12]
800cab6: 2200 movs r2, #0
800cab8: f883 2070 strb.w r2, [r3, #112] ; 0x70
return HAL_TIMEOUT;
800cabc: 2303 movs r3, #3
800cabe: e00f b.n 800cae0 <UART_WaitOnFlagUntilTimeout+0xee>
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
800cac0: 68fb ldr r3, [r7, #12]
800cac2: 681b ldr r3, [r3, #0]
800cac4: 69da ldr r2, [r3, #28]
800cac6: 68bb ldr r3, [r7, #8]
800cac8: 4013 ands r3, r2
800caca: 68ba ldr r2, [r7, #8]
800cacc: 429a cmp r2, r3
800cace: bf0c ite eq
800cad0: 2301 moveq r3, #1
800cad2: 2300 movne r3, #0
800cad4: b2db uxtb r3, r3
800cad6: 461a mov r2, r3
800cad8: 79fb ldrb r3, [r7, #7]
800cada: 429a cmp r2, r3
800cadc: d092 beq.n 800ca04 <UART_WaitOnFlagUntilTimeout+0x12>
}
}
}
}
return HAL_OK;
800cade: 2300 movs r3, #0
}
800cae0: 4618 mov r0, r3
800cae2: 3710 adds r7, #16
800cae4: 46bd mov sp, r7
800cae6: bd80 pop {r7, pc}
0800cae8 <FMC_SDRAM_Init>:
* @param Device Pointer to SDRAM device instance
* @param Init Pointer to SDRAM Initialization structure
* @retval HAL status
*/
HAL_StatusTypeDef FMC_SDRAM_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_InitTypeDef *Init)
{
800cae8: b480 push {r7}
800caea: b085 sub sp, #20
800caec: af00 add r7, sp, #0
800caee: 6078 str r0, [r7, #4]
800caf0: 6039 str r1, [r7, #0]
uint32_t tmpr1 = 0;
800caf2: 2300 movs r3, #0
800caf4: 60fb str r3, [r7, #12]
uint32_t tmpr2 = 0;
800caf6: 2300 movs r3, #0
800caf8: 60bb str r3, [r7, #8]
assert_param(IS_FMC_SDCLOCK_PERIOD(Init->SDClockPeriod));
assert_param(IS_FMC_READ_BURST(Init->ReadBurst));
assert_param(IS_FMC_READPIPE_DELAY(Init->ReadPipeDelay));
/* Set SDRAM bank configuration parameters */
if (Init->SDBank != FMC_SDRAM_BANK2)
800cafa: 683b ldr r3, [r7, #0]
800cafc: 681b ldr r3, [r3, #0]
800cafe: 2b01 cmp r3, #1
800cb00: d027 beq.n 800cb52 <FMC_SDRAM_Init+0x6a>
{
tmpr1 = Device->SDCR[FMC_SDRAM_BANK1];
800cb02: 687b ldr r3, [r7, #4]
800cb04: 681b ldr r3, [r3, #0]
800cb06: 60fb str r3, [r7, #12]
/* Clear NC, NR, MWID, NB, CAS, WP, SDCLK, RBURST, and RPIPE bits */
tmpr1 &= ((uint32_t)~(FMC_SDCR1_NC | FMC_SDCR1_NR | FMC_SDCR1_MWID | \
800cb08: 68fa ldr r2, [r7, #12]
800cb0a: 4b2f ldr r3, [pc, #188] ; (800cbc8 <FMC_SDRAM_Init+0xe0>)
800cb0c: 4013 ands r3, r2
800cb0e: 60fb str r3, [r7, #12]
FMC_SDCR1_NB | FMC_SDCR1_CAS | FMC_SDCR1_WP | \
FMC_SDCR1_SDCLK | FMC_SDCR1_RBURST | FMC_SDCR1_RPIPE));
tmpr1 |= (uint32_t)(Init->ColumnBitsNumber |\
800cb10: 683b ldr r3, [r7, #0]
800cb12: 685a ldr r2, [r3, #4]
Init->RowBitsNumber |\
800cb14: 683b ldr r3, [r7, #0]
800cb16: 689b ldr r3, [r3, #8]
tmpr1 |= (uint32_t)(Init->ColumnBitsNumber |\
800cb18: 431a orrs r2, r3
Init->MemoryDataWidth |\
800cb1a: 683b ldr r3, [r7, #0]
800cb1c: 68db ldr r3, [r3, #12]
Init->RowBitsNumber |\
800cb1e: 431a orrs r2, r3
Init->InternalBankNumber |\
800cb20: 683b ldr r3, [r7, #0]
800cb22: 691b ldr r3, [r3, #16]
Init->MemoryDataWidth |\
800cb24: 431a orrs r2, r3
Init->CASLatency |\
800cb26: 683b ldr r3, [r7, #0]
800cb28: 695b ldr r3, [r3, #20]
Init->InternalBankNumber |\
800cb2a: 431a orrs r2, r3
Init->WriteProtection |\
800cb2c: 683b ldr r3, [r7, #0]
800cb2e: 699b ldr r3, [r3, #24]
Init->CASLatency |\
800cb30: 431a orrs r2, r3
Init->SDClockPeriod |\
800cb32: 683b ldr r3, [r7, #0]
800cb34: 69db ldr r3, [r3, #28]
Init->WriteProtection |\
800cb36: 431a orrs r2, r3
Init->ReadBurst |\
800cb38: 683b ldr r3, [r7, #0]
800cb3a: 6a1b ldr r3, [r3, #32]
Init->SDClockPeriod |\
800cb3c: 431a orrs r2, r3
Init->ReadPipeDelay
800cb3e: 683b ldr r3, [r7, #0]
800cb40: 6a5b ldr r3, [r3, #36] ; 0x24
Init->ReadBurst |\
800cb42: 4313 orrs r3, r2
tmpr1 |= (uint32_t)(Init->ColumnBitsNumber |\
800cb44: 68fa ldr r2, [r7, #12]
800cb46: 4313 orrs r3, r2
800cb48: 60fb str r3, [r7, #12]
);
Device->SDCR[FMC_SDRAM_BANK1] = tmpr1;
800cb4a: 687b ldr r3, [r7, #4]
800cb4c: 68fa ldr r2, [r7, #12]
800cb4e: 601a str r2, [r3, #0]
800cb50: e032 b.n 800cbb8 <FMC_SDRAM_Init+0xd0>
}
else /* FMC_Bank2_SDRAM */
{
tmpr1 = Device->SDCR[FMC_SDRAM_BANK1];
800cb52: 687b ldr r3, [r7, #4]
800cb54: 681b ldr r3, [r3, #0]
800cb56: 60fb str r3, [r7, #12]
/* Clear SDCLK, RBURST, and RPIPE bits */
tmpr1 &= ((uint32_t)~(FMC_SDCR1_SDCLK | FMC_SDCR1_RBURST | FMC_SDCR1_RPIPE));
800cb58: 68fb ldr r3, [r7, #12]
800cb5a: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
800cb5e: 60fb str r3, [r7, #12]
tmpr1 |= (uint32_t)(Init->SDClockPeriod |\
800cb60: 683b ldr r3, [r7, #0]
800cb62: 69da ldr r2, [r3, #28]
Init->ReadBurst |\
800cb64: 683b ldr r3, [r7, #0]
800cb66: 6a1b ldr r3, [r3, #32]
tmpr1 |= (uint32_t)(Init->SDClockPeriod |\
800cb68: 431a orrs r2, r3
Init->ReadPipeDelay);
800cb6a: 683b ldr r3, [r7, #0]
800cb6c: 6a5b ldr r3, [r3, #36] ; 0x24
Init->ReadBurst |\
800cb6e: 4313 orrs r3, r2
tmpr1 |= (uint32_t)(Init->SDClockPeriod |\
800cb70: 68fa ldr r2, [r7, #12]
800cb72: 4313 orrs r3, r2
800cb74: 60fb str r3, [r7, #12]
tmpr2 = Device->SDCR[FMC_SDRAM_BANK2];
800cb76: 687b ldr r3, [r7, #4]
800cb78: 685b ldr r3, [r3, #4]
800cb7a: 60bb str r3, [r7, #8]
/* Clear NC, NR, MWID, NB, CAS, WP, SDCLK, RBURST, and RPIPE bits */
tmpr2 &= ((uint32_t)~(FMC_SDCR1_NC | FMC_SDCR1_NR | FMC_SDCR1_MWID | \
800cb7c: 68ba ldr r2, [r7, #8]
800cb7e: 4b12 ldr r3, [pc, #72] ; (800cbc8 <FMC_SDRAM_Init+0xe0>)
800cb80: 4013 ands r3, r2
800cb82: 60bb str r3, [r7, #8]
FMC_SDCR1_NB | FMC_SDCR1_CAS | FMC_SDCR1_WP | \
FMC_SDCR1_SDCLK | FMC_SDCR1_RBURST | FMC_SDCR1_RPIPE));
tmpr2 |= (uint32_t)(Init->ColumnBitsNumber |\
800cb84: 683b ldr r3, [r7, #0]
800cb86: 685a ldr r2, [r3, #4]
Init->RowBitsNumber |\
800cb88: 683b ldr r3, [r7, #0]
800cb8a: 689b ldr r3, [r3, #8]
tmpr2 |= (uint32_t)(Init->ColumnBitsNumber |\
800cb8c: 431a orrs r2, r3
Init->MemoryDataWidth |\
800cb8e: 683b ldr r3, [r7, #0]
800cb90: 68db ldr r3, [r3, #12]
Init->RowBitsNumber |\
800cb92: 431a orrs r2, r3
Init->InternalBankNumber |\
800cb94: 683b ldr r3, [r7, #0]
800cb96: 691b ldr r3, [r3, #16]
Init->MemoryDataWidth |\
800cb98: 431a orrs r2, r3
Init->CASLatency |\
800cb9a: 683b ldr r3, [r7, #0]
800cb9c: 695b ldr r3, [r3, #20]
Init->InternalBankNumber |\
800cb9e: 431a orrs r2, r3
Init->WriteProtection);
800cba0: 683b ldr r3, [r7, #0]
800cba2: 699b ldr r3, [r3, #24]
Init->CASLatency |\
800cba4: 4313 orrs r3, r2
tmpr2 |= (uint32_t)(Init->ColumnBitsNumber |\
800cba6: 68ba ldr r2, [r7, #8]
800cba8: 4313 orrs r3, r2
800cbaa: 60bb str r3, [r7, #8]
Device->SDCR[FMC_SDRAM_BANK1] = tmpr1;
800cbac: 687b ldr r3, [r7, #4]
800cbae: 68fa ldr r2, [r7, #12]
800cbb0: 601a str r2, [r3, #0]
Device->SDCR[FMC_SDRAM_BANK2] = tmpr2;
800cbb2: 687b ldr r3, [r7, #4]
800cbb4: 68ba ldr r2, [r7, #8]
800cbb6: 605a str r2, [r3, #4]
}
return HAL_OK;
800cbb8: 2300 movs r3, #0
}
800cbba: 4618 mov r0, r3
800cbbc: 3714 adds r7, #20
800cbbe: 46bd mov sp, r7
800cbc0: f85d 7b04 ldr.w r7, [sp], #4
800cbc4: 4770 bx lr
800cbc6: bf00 nop
800cbc8: ffff8000 .word 0xffff8000
0800cbcc <FMC_SDRAM_Timing_Init>:
* @param Timing Pointer to SDRAM Timing structure
* @param Bank SDRAM bank number
* @retval HAL status
*/
HAL_StatusTypeDef FMC_SDRAM_Timing_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_TimingTypeDef *Timing, uint32_t Bank)
{
800cbcc: b480 push {r7}
800cbce: b087 sub sp, #28
800cbd0: af00 add r7, sp, #0
800cbd2: 60f8 str r0, [r7, #12]
800cbd4: 60b9 str r1, [r7, #8]
800cbd6: 607a str r2, [r7, #4]
uint32_t tmpr1 = 0;
800cbd8: 2300 movs r3, #0
800cbda: 617b str r3, [r7, #20]
uint32_t tmpr2 = 0;
800cbdc: 2300 movs r3, #0
800cbde: 613b str r3, [r7, #16]
assert_param(IS_FMC_RP_DELAY(Timing->RPDelay));
assert_param(IS_FMC_RCD_DELAY(Timing->RCDDelay));
assert_param(IS_FMC_SDRAM_BANK(Bank));
/* Set SDRAM device timing parameters */
if (Bank != FMC_SDRAM_BANK2)
800cbe0: 687b ldr r3, [r7, #4]
800cbe2: 2b01 cmp r3, #1
800cbe4: d02e beq.n 800cc44 <FMC_SDRAM_Timing_Init+0x78>
{
tmpr1 = Device->SDTR[FMC_SDRAM_BANK1];
800cbe6: 68fb ldr r3, [r7, #12]
800cbe8: 689b ldr r3, [r3, #8]
800cbea: 617b str r3, [r7, #20]
/* Clear TMRD, TXSR, TRAS, TRC, TWR, TRP and TRCD bits */
tmpr1 &= ((uint32_t)~(FMC_SDTR1_TMRD | FMC_SDTR1_TXSR | FMC_SDTR1_TRAS | \
800cbec: 697b ldr r3, [r7, #20]
800cbee: f003 4370 and.w r3, r3, #4026531840 ; 0xf0000000
800cbf2: 617b str r3, [r7, #20]
FMC_SDTR1_TRC | FMC_SDTR1_TWR | FMC_SDTR1_TRP | \
FMC_SDTR1_TRCD));
tmpr1 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800cbf4: 68bb ldr r3, [r7, #8]
800cbf6: 681b ldr r3, [r3, #0]
800cbf8: 1e5a subs r2, r3, #1
(((Timing->ExitSelfRefreshDelay)-1) << 4) |\
800cbfa: 68bb ldr r3, [r7, #8]
800cbfc: 685b ldr r3, [r3, #4]
800cbfe: 3b01 subs r3, #1
800cc00: 011b lsls r3, r3, #4
tmpr1 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800cc02: 431a orrs r2, r3
(((Timing->SelfRefreshTime)-1) << 8) |\
800cc04: 68bb ldr r3, [r7, #8]
800cc06: 689b ldr r3, [r3, #8]
800cc08: 3b01 subs r3, #1
800cc0a: 021b lsls r3, r3, #8
(((Timing->ExitSelfRefreshDelay)-1) << 4) |\
800cc0c: 431a orrs r2, r3
(((Timing->RowCycleDelay)-1) << 12) |\
800cc0e: 68bb ldr r3, [r7, #8]
800cc10: 68db ldr r3, [r3, #12]
800cc12: 3b01 subs r3, #1
800cc14: 031b lsls r3, r3, #12
(((Timing->SelfRefreshTime)-1) << 8) |\
800cc16: 431a orrs r2, r3
(((Timing->WriteRecoveryTime)-1) <<16) |\
800cc18: 68bb ldr r3, [r7, #8]
800cc1a: 691b ldr r3, [r3, #16]
800cc1c: 3b01 subs r3, #1
800cc1e: 041b lsls r3, r3, #16
(((Timing->RowCycleDelay)-1) << 12) |\
800cc20: 431a orrs r2, r3
(((Timing->RPDelay)-1) << 20) |\
800cc22: 68bb ldr r3, [r7, #8]
800cc24: 695b ldr r3, [r3, #20]
800cc26: 3b01 subs r3, #1
800cc28: 051b lsls r3, r3, #20
(((Timing->WriteRecoveryTime)-1) <<16) |\
800cc2a: 431a orrs r2, r3
(((Timing->RCDDelay)-1) << 24));
800cc2c: 68bb ldr r3, [r7, #8]
800cc2e: 699b ldr r3, [r3, #24]
800cc30: 3b01 subs r3, #1
800cc32: 061b lsls r3, r3, #24
tmpr1 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800cc34: 4313 orrs r3, r2
800cc36: 697a ldr r2, [r7, #20]
800cc38: 4313 orrs r3, r2
800cc3a: 617b str r3, [r7, #20]
Device->SDTR[FMC_SDRAM_BANK1] = tmpr1;
800cc3c: 68fb ldr r3, [r7, #12]
800cc3e: 697a ldr r2, [r7, #20]
800cc40: 609a str r2, [r3, #8]
800cc42: e039 b.n 800ccb8 <FMC_SDRAM_Timing_Init+0xec>
}
else /* FMC_Bank2_SDRAM */
{
tmpr1 = Device->SDTR[FMC_SDRAM_BANK1];
800cc44: 68fb ldr r3, [r7, #12]
800cc46: 689b ldr r3, [r3, #8]
800cc48: 617b str r3, [r7, #20]
/* Clear TRC and TRP bits */
tmpr1 &= ((uint32_t)~(FMC_SDTR1_TRC | FMC_SDTR1_TRP));
800cc4a: 697a ldr r2, [r7, #20]
800cc4c: 4b1e ldr r3, [pc, #120] ; (800ccc8 <FMC_SDRAM_Timing_Init+0xfc>)
800cc4e: 4013 ands r3, r2
800cc50: 617b str r3, [r7, #20]
tmpr1 |= (uint32_t)((((Timing->RowCycleDelay)-1) << 12) |\
800cc52: 68bb ldr r3, [r7, #8]
800cc54: 68db ldr r3, [r3, #12]
800cc56: 3b01 subs r3, #1
800cc58: 031a lsls r2, r3, #12
(((Timing->RPDelay)-1) << 20));
800cc5a: 68bb ldr r3, [r7, #8]
800cc5c: 695b ldr r3, [r3, #20]
800cc5e: 3b01 subs r3, #1
800cc60: 051b lsls r3, r3, #20
tmpr1 |= (uint32_t)((((Timing->RowCycleDelay)-1) << 12) |\
800cc62: 4313 orrs r3, r2
800cc64: 697a ldr r2, [r7, #20]
800cc66: 4313 orrs r3, r2
800cc68: 617b str r3, [r7, #20]
tmpr2 = Device->SDTR[FMC_SDRAM_BANK2];
800cc6a: 68fb ldr r3, [r7, #12]
800cc6c: 68db ldr r3, [r3, #12]
800cc6e: 613b str r3, [r7, #16]
/* Clear TMRD, TXSR, TRAS, TRC, TWR, TRP and TRCD bits */
tmpr2 &= ((uint32_t)~(FMC_SDTR1_TMRD | FMC_SDTR1_TXSR | FMC_SDTR1_TRAS | \
800cc70: 693b ldr r3, [r7, #16]
800cc72: f003 4370 and.w r3, r3, #4026531840 ; 0xf0000000
800cc76: 613b str r3, [r7, #16]
FMC_SDTR1_TRC | FMC_SDTR1_TWR | FMC_SDTR1_TRP | \
FMC_SDTR1_TRCD));
tmpr2 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800cc78: 68bb ldr r3, [r7, #8]
800cc7a: 681b ldr r3, [r3, #0]
800cc7c: 1e5a subs r2, r3, #1
(((Timing->ExitSelfRefreshDelay)-1) << 4) |\
800cc7e: 68bb ldr r3, [r7, #8]
800cc80: 685b ldr r3, [r3, #4]
800cc82: 3b01 subs r3, #1
800cc84: 011b lsls r3, r3, #4
tmpr2 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800cc86: 431a orrs r2, r3
(((Timing->SelfRefreshTime)-1) << 8) |\
800cc88: 68bb ldr r3, [r7, #8]
800cc8a: 689b ldr r3, [r3, #8]
800cc8c: 3b01 subs r3, #1
800cc8e: 021b lsls r3, r3, #8
(((Timing->ExitSelfRefreshDelay)-1) << 4) |\
800cc90: 431a orrs r2, r3
(((Timing->WriteRecoveryTime)-1) <<16) |\
800cc92: 68bb ldr r3, [r7, #8]
800cc94: 691b ldr r3, [r3, #16]
800cc96: 3b01 subs r3, #1
800cc98: 041b lsls r3, r3, #16
(((Timing->SelfRefreshTime)-1) << 8) |\
800cc9a: 431a orrs r2, r3
(((Timing->RCDDelay)-1) << 24));
800cc9c: 68bb ldr r3, [r7, #8]
800cc9e: 699b ldr r3, [r3, #24]
800cca0: 3b01 subs r3, #1
800cca2: 061b lsls r3, r3, #24
tmpr2 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800cca4: 4313 orrs r3, r2
800cca6: 693a ldr r2, [r7, #16]
800cca8: 4313 orrs r3, r2
800ccaa: 613b str r3, [r7, #16]
Device->SDTR[FMC_SDRAM_BANK1] = tmpr1;
800ccac: 68fb ldr r3, [r7, #12]
800ccae: 697a ldr r2, [r7, #20]
800ccb0: 609a str r2, [r3, #8]
Device->SDTR[FMC_SDRAM_BANK2] = tmpr2;
800ccb2: 68fb ldr r3, [r7, #12]
800ccb4: 693a ldr r2, [r7, #16]
800ccb6: 60da str r2, [r3, #12]
}
return HAL_OK;
800ccb8: 2300 movs r3, #0
}
800ccba: 4618 mov r0, r3
800ccbc: 371c adds r7, #28
800ccbe: 46bd mov sp, r7
800ccc0: f85d 7b04 ldr.w r7, [sp], #4
800ccc4: 4770 bx lr
800ccc6: bf00 nop
800ccc8: ff0f0fff .word 0xff0f0fff
0800cccc <FMC_SDRAM_SendCommand>:
* @param Timing Pointer to SDRAM Timing structure
* @param Timeout Timeout wait value
* @retval HAL state
*/
HAL_StatusTypeDef FMC_SDRAM_SendCommand(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
{
800cccc: b480 push {r7}
800ccce: b087 sub sp, #28
800ccd0: af00 add r7, sp, #0
800ccd2: 60f8 str r0, [r7, #12]
800ccd4: 60b9 str r1, [r7, #8]
800ccd6: 607a str r2, [r7, #4]
__IO uint32_t tmpr = 0;
800ccd8: 2300 movs r3, #0
800ccda: 617b str r3, [r7, #20]
assert_param(IS_FMC_COMMAND_TARGET(Command->CommandTarget));
assert_param(IS_FMC_AUTOREFRESH_NUMBER(Command->AutoRefreshNumber));
assert_param(IS_FMC_MODE_REGISTER(Command->ModeRegisterDefinition));
/* Set command register */
tmpr = (uint32_t)((Command->CommandMode) |\
800ccdc: 68bb ldr r3, [r7, #8]
800ccde: 681a ldr r2, [r3, #0]
(Command->CommandTarget) |\
800cce0: 68bb ldr r3, [r7, #8]
800cce2: 685b ldr r3, [r3, #4]
tmpr = (uint32_t)((Command->CommandMode) |\
800cce4: 431a orrs r2, r3
(((Command->AutoRefreshNumber)-1) << 5) |\
800cce6: 68bb ldr r3, [r7, #8]
800cce8: 689b ldr r3, [r3, #8]
800ccea: 3b01 subs r3, #1
800ccec: 015b lsls r3, r3, #5
(Command->CommandTarget) |\
800ccee: 431a orrs r2, r3
((Command->ModeRegisterDefinition) << 9)
800ccf0: 68bb ldr r3, [r7, #8]
800ccf2: 68db ldr r3, [r3, #12]
800ccf4: 025b lsls r3, r3, #9
tmpr = (uint32_t)((Command->CommandMode) |\
800ccf6: 4313 orrs r3, r2
800ccf8: 617b str r3, [r7, #20]
);
Device->SDCMR = tmpr;
800ccfa: 697a ldr r2, [r7, #20]
800ccfc: 68fb ldr r3, [r7, #12]
800ccfe: 611a str r2, [r3, #16]
return HAL_OK;
800cd00: 2300 movs r3, #0
}
800cd02: 4618 mov r0, r3
800cd04: 371c adds r7, #28
800cd06: 46bd mov sp, r7
800cd08: f85d 7b04 ldr.w r7, [sp], #4
800cd0c: 4770 bx lr
0800cd0e <FMC_SDRAM_ProgramRefreshRate>:
* @param Device Pointer to SDRAM device instance
* @param RefreshRate The SDRAM refresh rate value.
* @retval HAL state
*/
HAL_StatusTypeDef FMC_SDRAM_ProgramRefreshRate(FMC_SDRAM_TypeDef *Device, uint32_t RefreshRate)
{
800cd0e: b480 push {r7}
800cd10: b083 sub sp, #12
800cd12: af00 add r7, sp, #0
800cd14: 6078 str r0, [r7, #4]
800cd16: 6039 str r1, [r7, #0]
/* Check the parameters */
assert_param(IS_FMC_SDRAM_DEVICE(Device));
assert_param(IS_FMC_REFRESH_RATE(RefreshRate));
/* Set the refresh rate in command register */
Device->SDRTR |= (RefreshRate<<1);
800cd18: 687b ldr r3, [r7, #4]
800cd1a: 695a ldr r2, [r3, #20]
800cd1c: 683b ldr r3, [r7, #0]
800cd1e: 005b lsls r3, r3, #1
800cd20: 431a orrs r2, r3
800cd22: 687b ldr r3, [r7, #4]
800cd24: 615a str r2, [r3, #20]
return HAL_OK;
800cd26: 2300 movs r3, #0
}
800cd28: 4618 mov r0, r3
800cd2a: 370c adds r7, #12
800cd2c: 46bd mov sp, r7
800cd2e: f85d 7b04 ldr.w r7, [sp], #4
800cd32: 4770 bx lr
0800cd34 <MX_LWIP_Init>:
/**
* LwIP initialization function
*/
void MX_LWIP_Init(void)
{
800cd34: b5b0 push {r4, r5, r7, lr}
800cd36: b08e sub sp, #56 ; 0x38
800cd38: af04 add r7, sp, #16
/* Initilialize the LwIP stack with RTOS */
tcpip_init( NULL, NULL );
800cd3a: 2100 movs r1, #0
800cd3c: 2000 movs r0, #0
800cd3e: f003 fead bl 8010a9c <tcpip_init>
/* IP addresses initialization with DHCP (IPv4) */
ipaddr.addr = 0;
800cd42: 4b2a ldr r3, [pc, #168] ; (800cdec <MX_LWIP_Init+0xb8>)
800cd44: 2200 movs r2, #0
800cd46: 601a str r2, [r3, #0]
netmask.addr = 0;
800cd48: 4b29 ldr r3, [pc, #164] ; (800cdf0 <MX_LWIP_Init+0xbc>)
800cd4a: 2200 movs r2, #0
800cd4c: 601a str r2, [r3, #0]
gw.addr = 0;
800cd4e: 4b29 ldr r3, [pc, #164] ; (800cdf4 <MX_LWIP_Init+0xc0>)
800cd50: 2200 movs r2, #0
800cd52: 601a str r2, [r3, #0]
/* add the network interface (IPv4/IPv6) with RTOS */
netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &tcpip_input);
800cd54: 4b28 ldr r3, [pc, #160] ; (800cdf8 <MX_LWIP_Init+0xc4>)
800cd56: 9302 str r3, [sp, #8]
800cd58: 4b28 ldr r3, [pc, #160] ; (800cdfc <MX_LWIP_Init+0xc8>)
800cd5a: 9301 str r3, [sp, #4]
800cd5c: 2300 movs r3, #0
800cd5e: 9300 str r3, [sp, #0]
800cd60: 4b24 ldr r3, [pc, #144] ; (800cdf4 <MX_LWIP_Init+0xc0>)
800cd62: 4a23 ldr r2, [pc, #140] ; (800cdf0 <MX_LWIP_Init+0xbc>)
800cd64: 4921 ldr r1, [pc, #132] ; (800cdec <MX_LWIP_Init+0xb8>)
800cd66: 4826 ldr r0, [pc, #152] ; (800ce00 <MX_LWIP_Init+0xcc>)
800cd68: f004 fc1c bl 80115a4 <netif_add>
/* Registers the default network interface */
netif_set_default(&gnetif);
800cd6c: 4824 ldr r0, [pc, #144] ; (800ce00 <MX_LWIP_Init+0xcc>)
800cd6e: f004 fdd3 bl 8011918 <netif_set_default>
if (netif_is_link_up(&gnetif))
800cd72: 4b23 ldr r3, [pc, #140] ; (800ce00 <MX_LWIP_Init+0xcc>)
800cd74: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800cd78: 089b lsrs r3, r3, #2
800cd7a: f003 0301 and.w r3, r3, #1
800cd7e: b2db uxtb r3, r3
800cd80: 2b00 cmp r3, #0
800cd82: d003 beq.n 800cd8c <MX_LWIP_Init+0x58>
{
/* When the netif is fully configured this function must be called */
netif_set_up(&gnetif);
800cd84: 481e ldr r0, [pc, #120] ; (800ce00 <MX_LWIP_Init+0xcc>)
800cd86: f004 fdd7 bl 8011938 <netif_set_up>
800cd8a: e002 b.n 800cd92 <MX_LWIP_Init+0x5e>
}
else
{
/* When the netif link is down this function must be called */
netif_set_down(&gnetif);
800cd8c: 481c ldr r0, [pc, #112] ; (800ce00 <MX_LWIP_Init+0xcc>)
800cd8e: f004 fe3f bl 8011a10 <netif_set_down>
}
/* Set the link callback function, this function is called on change of link status*/
netif_set_link_callback(&gnetif, ethernetif_update_config);
800cd92: 491c ldr r1, [pc, #112] ; (800ce04 <MX_LWIP_Init+0xd0>)
800cd94: 481a ldr r0, [pc, #104] ; (800ce00 <MX_LWIP_Init+0xcc>)
800cd96: f004 fed5 bl 8011b44 <netif_set_link_callback>
/* create a binary semaphore used for informing ethernetif of frame reception */
osSemaphoreDef(Netif_SEM);
800cd9a: 2300 movs r3, #0
800cd9c: 623b str r3, [r7, #32]
800cd9e: 2300 movs r3, #0
800cda0: 627b str r3, [r7, #36] ; 0x24
Netif_LinkSemaphore = osSemaphoreCreate(osSemaphore(Netif_SEM) , 1 );
800cda2: f107 0320 add.w r3, r7, #32
800cda6: 2101 movs r1, #1
800cda8: 4618 mov r0, r3
800cdaa: f000 fd75 bl 800d898 <osSemaphoreCreate>
800cdae: 4602 mov r2, r0
800cdb0: 4b15 ldr r3, [pc, #84] ; (800ce08 <MX_LWIP_Init+0xd4>)
800cdb2: 601a str r2, [r3, #0]
link_arg.netif = &gnetif;
800cdb4: 4b15 ldr r3, [pc, #84] ; (800ce0c <MX_LWIP_Init+0xd8>)
800cdb6: 4a12 ldr r2, [pc, #72] ; (800ce00 <MX_LWIP_Init+0xcc>)
800cdb8: 601a str r2, [r3, #0]
link_arg.semaphore = Netif_LinkSemaphore;
800cdba: 4b13 ldr r3, [pc, #76] ; (800ce08 <MX_LWIP_Init+0xd4>)
800cdbc: 681b ldr r3, [r3, #0]
800cdbe: 4a13 ldr r2, [pc, #76] ; (800ce0c <MX_LWIP_Init+0xd8>)
800cdc0: 6053 str r3, [r2, #4]
/* Create the Ethernet link handler thread */
/* USER CODE BEGIN OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
osThreadDef(LinkThr, ethernetif_set_link, osPriorityBelowNormal, 0, configMINIMAL_STACK_SIZE * 2);
800cdc2: 4b13 ldr r3, [pc, #76] ; (800ce10 <MX_LWIP_Init+0xdc>)
800cdc4: 1d3c adds r4, r7, #4
800cdc6: 461d mov r5, r3
800cdc8: cd0f ldmia r5!, {r0, r1, r2, r3}
800cdca: c40f stmia r4!, {r0, r1, r2, r3}
800cdcc: e895 0007 ldmia.w r5, {r0, r1, r2}
800cdd0: e884 0007 stmia.w r4, {r0, r1, r2}
osThreadCreate (osThread(LinkThr), &link_arg);
800cdd4: 1d3b adds r3, r7, #4
800cdd6: 490d ldr r1, [pc, #52] ; (800ce0c <MX_LWIP_Init+0xd8>)
800cdd8: 4618 mov r0, r3
800cdda: f000 fc60 bl 800d69e <osThreadCreate>
/* USER CODE END OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
/* Start DHCP negotiation for a network interface (IPv4) */
dhcp_start(&gnetif);
800cdde: 4808 ldr r0, [pc, #32] ; (800ce00 <MX_LWIP_Init+0xcc>)
800cde0: f00c f812 bl 8018e08 <dhcp_start>
/* USER CODE BEGIN 3 */
/* USER CODE END 3 */
}
800cde4: bf00 nop
800cde6: 3728 adds r7, #40 ; 0x28
800cde8: 46bd mov sp, r7
800cdea: bdb0 pop {r4, r5, r7, pc}
800cdec: 20008fd0 .word 0x20008fd0
800cdf0: 20008fd4 .word 0x20008fd4
800cdf4: 20008fd8 .word 0x20008fd8
800cdf8: 080109d9 .word 0x080109d9
800cdfc: 0800d42d .word 0x0800d42d
800ce00: 20008f98 .word 0x20008f98
800ce04: 0800d511 .word 0x0800d511
800ce08: 20000584 .word 0x20000584
800ce0c: 20008f90 .word 0x20008f90
800ce10: 0801df78 .word 0x0801df78
0800ce14 <HAL_ETH_MspInit>:
/* USER CODE END 3 */
/* Private functions ---------------------------------------------------------*/
void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle)
{
800ce14: b580 push {r7, lr}
800ce16: b08e sub sp, #56 ; 0x38
800ce18: af00 add r7, sp, #0
800ce1a: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
800ce1c: f107 0324 add.w r3, r7, #36 ; 0x24
800ce20: 2200 movs r2, #0
800ce22: 601a str r2, [r3, #0]
800ce24: 605a str r2, [r3, #4]
800ce26: 609a str r2, [r3, #8]
800ce28: 60da str r2, [r3, #12]
800ce2a: 611a str r2, [r3, #16]
if(ethHandle->Instance==ETH)
800ce2c: 687b ldr r3, [r7, #4]
800ce2e: 681b ldr r3, [r3, #0]
800ce30: 4a44 ldr r2, [pc, #272] ; (800cf44 <HAL_ETH_MspInit+0x130>)
800ce32: 4293 cmp r3, r2
800ce34: f040 8081 bne.w 800cf3a <HAL_ETH_MspInit+0x126>
{
/* USER CODE BEGIN ETH_MspInit 0 */
/* USER CODE END ETH_MspInit 0 */
/* Enable Peripheral clock */
__HAL_RCC_ETH_CLK_ENABLE();
800ce38: 4b43 ldr r3, [pc, #268] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce3a: 6b1b ldr r3, [r3, #48] ; 0x30
800ce3c: 4a42 ldr r2, [pc, #264] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce3e: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000
800ce42: 6313 str r3, [r2, #48] ; 0x30
800ce44: 4b40 ldr r3, [pc, #256] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce46: 6b1b ldr r3, [r3, #48] ; 0x30
800ce48: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800ce4c: 623b str r3, [r7, #32]
800ce4e: 6a3b ldr r3, [r7, #32]
800ce50: 4b3d ldr r3, [pc, #244] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce52: 6b1b ldr r3, [r3, #48] ; 0x30
800ce54: 4a3c ldr r2, [pc, #240] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce56: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
800ce5a: 6313 str r3, [r2, #48] ; 0x30
800ce5c: 4b3a ldr r3, [pc, #232] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce5e: 6b1b ldr r3, [r3, #48] ; 0x30
800ce60: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
800ce64: 61fb str r3, [r7, #28]
800ce66: 69fb ldr r3, [r7, #28]
800ce68: 4b37 ldr r3, [pc, #220] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce6a: 6b1b ldr r3, [r3, #48] ; 0x30
800ce6c: 4a36 ldr r2, [pc, #216] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce6e: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
800ce72: 6313 str r3, [r2, #48] ; 0x30
800ce74: 4b34 ldr r3, [pc, #208] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce76: 6b1b ldr r3, [r3, #48] ; 0x30
800ce78: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
800ce7c: 61bb str r3, [r7, #24]
800ce7e: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOG_CLK_ENABLE();
800ce80: 4b31 ldr r3, [pc, #196] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce82: 6b1b ldr r3, [r3, #48] ; 0x30
800ce84: 4a30 ldr r2, [pc, #192] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce86: f043 0340 orr.w r3, r3, #64 ; 0x40
800ce8a: 6313 str r3, [r2, #48] ; 0x30
800ce8c: 4b2e ldr r3, [pc, #184] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce8e: 6b1b ldr r3, [r3, #48] ; 0x30
800ce90: f003 0340 and.w r3, r3, #64 ; 0x40
800ce94: 617b str r3, [r7, #20]
800ce96: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOC_CLK_ENABLE();
800ce98: 4b2b ldr r3, [pc, #172] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce9a: 6b1b ldr r3, [r3, #48] ; 0x30
800ce9c: 4a2a ldr r2, [pc, #168] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ce9e: f043 0304 orr.w r3, r3, #4
800cea2: 6313 str r3, [r2, #48] ; 0x30
800cea4: 4b28 ldr r3, [pc, #160] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800cea6: 6b1b ldr r3, [r3, #48] ; 0x30
800cea8: f003 0304 and.w r3, r3, #4
800ceac: 613b str r3, [r7, #16]
800ceae: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
800ceb0: 4b25 ldr r3, [pc, #148] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ceb2: 6b1b ldr r3, [r3, #48] ; 0x30
800ceb4: 4a24 ldr r2, [pc, #144] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800ceb6: f043 0301 orr.w r3, r3, #1
800ceba: 6313 str r3, [r2, #48] ; 0x30
800cebc: 4b22 ldr r3, [pc, #136] ; (800cf48 <HAL_ETH_MspInit+0x134>)
800cebe: 6b1b ldr r3, [r3, #48] ; 0x30
800cec0: f003 0301 and.w r3, r3, #1
800cec4: 60fb str r3, [r7, #12]
800cec6: 68fb ldr r3, [r7, #12]
PC4 ------> ETH_RXD0
PA2 ------> ETH_MDIO
PC5 ------> ETH_RXD1
PA7 ------> ETH_CRS_DV
*/
GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_13|GPIO_PIN_11;
800cec8: f44f 43d0 mov.w r3, #26624 ; 0x6800
800cecc: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800cece: 2302 movs r3, #2
800ced0: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800ced2: 2300 movs r3, #0
800ced4: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
800ced6: 2303 movs r3, #3
800ced8: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
800ceda: 230b movs r3, #11
800cedc: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
800cede: f107 0324 add.w r3, r7, #36 ; 0x24
800cee2: 4619 mov r1, r3
800cee4: 4819 ldr r0, [pc, #100] ; (800cf4c <HAL_ETH_MspInit+0x138>)
800cee6: f7fa fe8b bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5;
800ceea: 2332 movs r3, #50 ; 0x32
800ceec: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800ceee: 2302 movs r3, #2
800cef0: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800cef2: 2300 movs r3, #0
800cef4: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
800cef6: 2303 movs r3, #3
800cef8: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
800cefa: 230b movs r3, #11
800cefc: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
800cefe: f107 0324 add.w r3, r7, #36 ; 0x24
800cf02: 4619 mov r1, r3
800cf04: 4812 ldr r0, [pc, #72] ; (800cf50 <HAL_ETH_MspInit+0x13c>)
800cf06: f7fa fe7b bl 8007c00 <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7;
800cf0a: 2386 movs r3, #134 ; 0x86
800cf0c: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800cf0e: 2302 movs r3, #2
800cf10: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800cf12: 2300 movs r3, #0
800cf14: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
800cf16: 2303 movs r3, #3
800cf18: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
800cf1a: 230b movs r3, #11
800cf1c: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
800cf1e: f107 0324 add.w r3, r7, #36 ; 0x24
800cf22: 4619 mov r1, r3
800cf24: 480b ldr r0, [pc, #44] ; (800cf54 <HAL_ETH_MspInit+0x140>)
800cf26: f7fa fe6b bl 8007c00 <HAL_GPIO_Init>
/* Peripheral interrupt init */
HAL_NVIC_SetPriority(ETH_IRQn, 5, 0);
800cf2a: 2200 movs r2, #0
800cf2c: 2105 movs r1, #5
800cf2e: 203d movs r0, #61 ; 0x3d
800cf30: f7f8 feb6 bl 8005ca0 <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(ETH_IRQn);
800cf34: 203d movs r0, #61 ; 0x3d
800cf36: f7f8 fecf bl 8005cd8 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN ETH_MspInit 1 */
/* USER CODE END ETH_MspInit 1 */
}
}
800cf3a: bf00 nop
800cf3c: 3738 adds r7, #56 ; 0x38
800cf3e: 46bd mov sp, r7
800cf40: bd80 pop {r7, pc}
800cf42: bf00 nop
800cf44: 40028000 .word 0x40028000
800cf48: 40023800 .word 0x40023800
800cf4c: 40021800 .word 0x40021800
800cf50: 40020800 .word 0x40020800
800cf54: 40020000 .word 0x40020000
0800cf58 <HAL_ETH_RxCpltCallback>:
* @brief Ethernet Rx Transfer completed callback
* @param heth: ETH handle
* @retval None
*/
void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth)
{
800cf58: b580 push {r7, lr}
800cf5a: b082 sub sp, #8
800cf5c: af00 add r7, sp, #0
800cf5e: 6078 str r0, [r7, #4]
osSemaphoreRelease(s_xSemaphore);
800cf60: 4b04 ldr r3, [pc, #16] ; (800cf74 <HAL_ETH_RxCpltCallback+0x1c>)
800cf62: 681b ldr r3, [r3, #0]
800cf64: 4618 mov r0, r3
800cf66: f000 fd25 bl 800d9b4 <osSemaphoreRelease>
}
800cf6a: bf00 nop
800cf6c: 3708 adds r7, #8
800cf6e: 46bd mov sp, r7
800cf70: bd80 pop {r7, pc}
800cf72: bf00 nop
800cf74: 20000588 .word 0x20000588
0800cf78 <low_level_init>:
*
* @param netif the already initialized lwip network interface structure
* for this ethernetif
*/
static void low_level_init(struct netif *netif)
{
800cf78: b5b0 push {r4, r5, r7, lr}
800cf7a: b090 sub sp, #64 ; 0x40
800cf7c: af00 add r7, sp, #0
800cf7e: 6078 str r0, [r7, #4]
uint32_t regvalue = 0;
800cf80: 2300 movs r3, #0
800cf82: 63bb str r3, [r7, #56] ; 0x38
HAL_StatusTypeDef hal_eth_init_status;
/* Init ETH */
uint8_t MACAddr[6] ;
heth.Instance = ETH;
800cf84: 4b60 ldr r3, [pc, #384] ; (800d108 <low_level_init+0x190>)
800cf86: 4a61 ldr r2, [pc, #388] ; (800d10c <low_level_init+0x194>)
800cf88: 601a str r2, [r3, #0]
heth.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE;
800cf8a: 4b5f ldr r3, [pc, #380] ; (800d108 <low_level_init+0x190>)
800cf8c: 2201 movs r2, #1
800cf8e: 605a str r2, [r3, #4]
heth.Init.Speed = ETH_SPEED_100M;
800cf90: 4b5d ldr r3, [pc, #372] ; (800d108 <low_level_init+0x190>)
800cf92: f44f 4280 mov.w r2, #16384 ; 0x4000
800cf96: 609a str r2, [r3, #8]
heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX;
800cf98: 4b5b ldr r3, [pc, #364] ; (800d108 <low_level_init+0x190>)
800cf9a: f44f 6200 mov.w r2, #2048 ; 0x800
800cf9e: 60da str r2, [r3, #12]
heth.Init.PhyAddress = LAN8742A_PHY_ADDRESS;
800cfa0: 4b59 ldr r3, [pc, #356] ; (800d108 <low_level_init+0x190>)
800cfa2: 2201 movs r2, #1
800cfa4: 821a strh r2, [r3, #16]
MACAddr[0] = 0x00;
800cfa6: 2300 movs r3, #0
800cfa8: f887 3030 strb.w r3, [r7, #48] ; 0x30
MACAddr[1] = 0x80;
800cfac: 2380 movs r3, #128 ; 0x80
800cfae: f887 3031 strb.w r3, [r7, #49] ; 0x31
MACAddr[2] = 0xE1;
800cfb2: 23e1 movs r3, #225 ; 0xe1
800cfb4: f887 3032 strb.w r3, [r7, #50] ; 0x32
MACAddr[3] = 0x00;
800cfb8: 2300 movs r3, #0
800cfba: f887 3033 strb.w r3, [r7, #51] ; 0x33
MACAddr[4] = 0x00;
800cfbe: 2300 movs r3, #0
800cfc0: f887 3034 strb.w r3, [r7, #52] ; 0x34
MACAddr[5] = 0x00;
800cfc4: 2300 movs r3, #0
800cfc6: f887 3035 strb.w r3, [r7, #53] ; 0x35
heth.Init.MACAddr = &MACAddr[0];
800cfca: 4a4f ldr r2, [pc, #316] ; (800d108 <low_level_init+0x190>)
800cfcc: f107 0330 add.w r3, r7, #48 ; 0x30
800cfd0: 6153 str r3, [r2, #20]
heth.Init.RxMode = ETH_RXINTERRUPT_MODE;
800cfd2: 4b4d ldr r3, [pc, #308] ; (800d108 <low_level_init+0x190>)
800cfd4: 2201 movs r2, #1
800cfd6: 619a str r2, [r3, #24]
heth.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE;
800cfd8: 4b4b ldr r3, [pc, #300] ; (800d108 <low_level_init+0x190>)
800cfda: 2200 movs r2, #0
800cfdc: 61da str r2, [r3, #28]
heth.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII;
800cfde: 4b4a ldr r3, [pc, #296] ; (800d108 <low_level_init+0x190>)
800cfe0: f44f 0200 mov.w r2, #8388608 ; 0x800000
800cfe4: 621a str r2, [r3, #32]
/* USER CODE BEGIN MACADDRESS */
/* USER CODE END MACADDRESS */
hal_eth_init_status = HAL_ETH_Init(&heth);
800cfe6: 4848 ldr r0, [pc, #288] ; (800d108 <low_level_init+0x190>)
800cfe8: f7f9 fc84 bl 80068f4 <HAL_ETH_Init>
800cfec: 4603 mov r3, r0
800cfee: f887 303f strb.w r3, [r7, #63] ; 0x3f
if (hal_eth_init_status == HAL_OK)
800cff2: f897 303f ldrb.w r3, [r7, #63] ; 0x3f
800cff6: 2b00 cmp r3, #0
800cff8: d108 bne.n 800d00c <low_level_init+0x94>
{
/* Set netif link flag */
netif->flags |= NETIF_FLAG_LINK_UP;
800cffa: 687b ldr r3, [r7, #4]
800cffc: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800d000: f043 0304 orr.w r3, r3, #4
800d004: b2da uxtb r2, r3
800d006: 687b ldr r3, [r7, #4]
800d008: f883 2031 strb.w r2, [r3, #49] ; 0x31
}
/* Initialize Tx Descriptors list: Chain Mode */
HAL_ETH_DMATxDescListInit(&heth, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB);
800d00c: 2304 movs r3, #4
800d00e: 4a40 ldr r2, [pc, #256] ; (800d110 <low_level_init+0x198>)
800d010: 4940 ldr r1, [pc, #256] ; (800d114 <low_level_init+0x19c>)
800d012: 483d ldr r0, [pc, #244] ; (800d108 <low_level_init+0x190>)
800d014: f7f9 fe0a bl 8006c2c <HAL_ETH_DMATxDescListInit>
/* Initialize Rx Descriptors list: Chain Mode */
HAL_ETH_DMARxDescListInit(&heth, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB);
800d018: 2304 movs r3, #4
800d01a: 4a3f ldr r2, [pc, #252] ; (800d118 <low_level_init+0x1a0>)
800d01c: 493f ldr r1, [pc, #252] ; (800d11c <low_level_init+0x1a4>)
800d01e: 483a ldr r0, [pc, #232] ; (800d108 <low_level_init+0x190>)
800d020: f7f9 fe6d bl 8006cfe <HAL_ETH_DMARxDescListInit>
#if LWIP_ARP || LWIP_ETHERNET
/* set MAC hardware address length */
netif->hwaddr_len = ETH_HWADDR_LEN;
800d024: 687b ldr r3, [r7, #4]
800d026: 2206 movs r2, #6
800d028: f883 2030 strb.w r2, [r3, #48] ; 0x30
/* set MAC hardware address */
netif->hwaddr[0] = heth.Init.MACAddr[0];
800d02c: 4b36 ldr r3, [pc, #216] ; (800d108 <low_level_init+0x190>)
800d02e: 695b ldr r3, [r3, #20]
800d030: 781a ldrb r2, [r3, #0]
800d032: 687b ldr r3, [r7, #4]
800d034: f883 202a strb.w r2, [r3, #42] ; 0x2a
netif->hwaddr[1] = heth.Init.MACAddr[1];
800d038: 4b33 ldr r3, [pc, #204] ; (800d108 <low_level_init+0x190>)
800d03a: 695b ldr r3, [r3, #20]
800d03c: 785a ldrb r2, [r3, #1]
800d03e: 687b ldr r3, [r7, #4]
800d040: f883 202b strb.w r2, [r3, #43] ; 0x2b
netif->hwaddr[2] = heth.Init.MACAddr[2];
800d044: 4b30 ldr r3, [pc, #192] ; (800d108 <low_level_init+0x190>)
800d046: 695b ldr r3, [r3, #20]
800d048: 789a ldrb r2, [r3, #2]
800d04a: 687b ldr r3, [r7, #4]
800d04c: f883 202c strb.w r2, [r3, #44] ; 0x2c
netif->hwaddr[3] = heth.Init.MACAddr[3];
800d050: 4b2d ldr r3, [pc, #180] ; (800d108 <low_level_init+0x190>)
800d052: 695b ldr r3, [r3, #20]
800d054: 78da ldrb r2, [r3, #3]
800d056: 687b ldr r3, [r7, #4]
800d058: f883 202d strb.w r2, [r3, #45] ; 0x2d
netif->hwaddr[4] = heth.Init.MACAddr[4];
800d05c: 4b2a ldr r3, [pc, #168] ; (800d108 <low_level_init+0x190>)
800d05e: 695b ldr r3, [r3, #20]
800d060: 791a ldrb r2, [r3, #4]
800d062: 687b ldr r3, [r7, #4]
800d064: f883 202e strb.w r2, [r3, #46] ; 0x2e
netif->hwaddr[5] = heth.Init.MACAddr[5];
800d068: 4b27 ldr r3, [pc, #156] ; (800d108 <low_level_init+0x190>)
800d06a: 695b ldr r3, [r3, #20]
800d06c: 795a ldrb r2, [r3, #5]
800d06e: 687b ldr r3, [r7, #4]
800d070: f883 202f strb.w r2, [r3, #47] ; 0x2f
/* maximum transfer unit */
netif->mtu = 1500;
800d074: 687b ldr r3, [r7, #4]
800d076: f240 52dc movw r2, #1500 ; 0x5dc
800d07a: 851a strh r2, [r3, #40] ; 0x28
/* Accept broadcast address and ARP traffic */
/* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */
#if LWIP_ARP
netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP;
800d07c: 687b ldr r3, [r7, #4]
800d07e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800d082: f043 030a orr.w r3, r3, #10
800d086: b2da uxtb r2, r3
800d088: 687b ldr r3, [r7, #4]
800d08a: f883 2031 strb.w r2, [r3, #49] ; 0x31
#else
netif->flags |= NETIF_FLAG_BROADCAST;
#endif /* LWIP_ARP */
/* create a binary semaphore used for informing ethernetif of frame reception */
osSemaphoreDef(SEM);
800d08e: 2300 movs r3, #0
800d090: 62bb str r3, [r7, #40] ; 0x28
800d092: 2300 movs r3, #0
800d094: 62fb str r3, [r7, #44] ; 0x2c
s_xSemaphore = osSemaphoreCreate(osSemaphore(SEM), 1);
800d096: f107 0328 add.w r3, r7, #40 ; 0x28
800d09a: 2101 movs r1, #1
800d09c: 4618 mov r0, r3
800d09e: f000 fbfb bl 800d898 <osSemaphoreCreate>
800d0a2: 4602 mov r2, r0
800d0a4: 4b1e ldr r3, [pc, #120] ; (800d120 <low_level_init+0x1a8>)
800d0a6: 601a str r2, [r3, #0]
/* create the task that handles the ETH_MAC */
/* USER CODE BEGIN OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
osThreadDef(EthIf, ethernetif_input, osPriorityRealtime, 0, INTERFACE_THREAD_STACK_SIZE);
800d0a8: 4b1e ldr r3, [pc, #120] ; (800d124 <low_level_init+0x1ac>)
800d0aa: f107 040c add.w r4, r7, #12
800d0ae: 461d mov r5, r3
800d0b0: cd0f ldmia r5!, {r0, r1, r2, r3}
800d0b2: c40f stmia r4!, {r0, r1, r2, r3}
800d0b4: e895 0007 ldmia.w r5, {r0, r1, r2}
800d0b8: e884 0007 stmia.w r4, {r0, r1, r2}
osThreadCreate (osThread(EthIf), netif);
800d0bc: f107 030c add.w r3, r7, #12
800d0c0: 6879 ldr r1, [r7, #4]
800d0c2: 4618 mov r0, r3
800d0c4: f000 faeb bl 800d69e <osThreadCreate>
/* USER CODE END OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
/* Enable MAC and DMA transmission and reception */
HAL_ETH_Start(&heth);
800d0c8: 480f ldr r0, [pc, #60] ; (800d108 <low_level_init+0x190>)
800d0ca: f7fa f940 bl 800734e <HAL_ETH_Start>
/* USER CODE BEGIN PHY_PRE_CONFIG */
/* USER CODE END PHY_PRE_CONFIG */
/* Read Register Configuration */
HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR, &regvalue);
800d0ce: f107 0338 add.w r3, r7, #56 ; 0x38
800d0d2: 461a mov r2, r3
800d0d4: 211d movs r1, #29
800d0d6: 480c ldr r0, [pc, #48] ; (800d108 <low_level_init+0x190>)
800d0d8: f7fa f86b bl 80071b2 <HAL_ETH_ReadPHYRegister>
regvalue |= (PHY_ISFR_INT4);
800d0dc: 6bbb ldr r3, [r7, #56] ; 0x38
800d0de: f043 030b orr.w r3, r3, #11
800d0e2: 63bb str r3, [r7, #56] ; 0x38
/* Enable Interrupt on change of link status */
HAL_ETH_WritePHYRegister(&heth, PHY_ISFR , regvalue );
800d0e4: 6bbb ldr r3, [r7, #56] ; 0x38
800d0e6: 461a mov r2, r3
800d0e8: 211d movs r1, #29
800d0ea: 4807 ldr r0, [pc, #28] ; (800d108 <low_level_init+0x190>)
800d0ec: f7fa f8c9 bl 8007282 <HAL_ETH_WritePHYRegister>
/* Read Register Configuration */
HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR , &regvalue);
800d0f0: f107 0338 add.w r3, r7, #56 ; 0x38
800d0f4: 461a mov r2, r3
800d0f6: 211d movs r1, #29
800d0f8: 4803 ldr r0, [pc, #12] ; (800d108 <low_level_init+0x190>)
800d0fa: f7fa f85a bl 80071b2 <HAL_ETH_ReadPHYRegister>
#endif /* LWIP_ARP || LWIP_ETHERNET */
/* USER CODE BEGIN LOW_LEVEL_INIT */
/* USER CODE END LOW_LEVEL_INIT */
}
800d0fe: bf00 nop
800d100: 3740 adds r7, #64 ; 0x40
800d102: 46bd mov sp, r7
800d104: bdb0 pop {r4, r5, r7, pc}
800d106: bf00 nop
800d108: 2000a8ac .word 0x2000a8ac
800d10c: 40028000 .word 0x40028000
800d110: 2000a8f4 .word 0x2000a8f4
800d114: 20008fdc .word 0x20008fdc
800d118: 2000905c .word 0x2000905c
800d11c: 2000a82c .word 0x2000a82c
800d120: 20000588 .word 0x20000588
800d124: 0801df9c .word 0x0801df9c
0800d128 <low_level_output>:
* to become availale since the stack doesn't retry to send a packet
* dropped because of memory failure (except for the TCP timers).
*/
static err_t low_level_output(struct netif *netif, struct pbuf *p)
{
800d128: b580 push {r7, lr}
800d12a: b08a sub sp, #40 ; 0x28
800d12c: af00 add r7, sp, #0
800d12e: 6078 str r0, [r7, #4]
800d130: 6039 str r1, [r7, #0]
err_t errval;
struct pbuf *q;
uint8_t *buffer = (uint8_t *)(heth.TxDesc->Buffer1Addr);
800d132: 4b4b ldr r3, [pc, #300] ; (800d260 <low_level_output+0x138>)
800d134: 6adb ldr r3, [r3, #44] ; 0x2c
800d136: 689b ldr r3, [r3, #8]
800d138: 61fb str r3, [r7, #28]
__IO ETH_DMADescTypeDef *DmaTxDesc;
uint32_t framelength = 0;
800d13a: 2300 movs r3, #0
800d13c: 617b str r3, [r7, #20]
uint32_t bufferoffset = 0;
800d13e: 2300 movs r3, #0
800d140: 613b str r3, [r7, #16]
uint32_t byteslefttocopy = 0;
800d142: 2300 movs r3, #0
800d144: 60fb str r3, [r7, #12]
uint32_t payloadoffset = 0;
800d146: 2300 movs r3, #0
800d148: 60bb str r3, [r7, #8]
DmaTxDesc = heth.TxDesc;
800d14a: 4b45 ldr r3, [pc, #276] ; (800d260 <low_level_output+0x138>)
800d14c: 6adb ldr r3, [r3, #44] ; 0x2c
800d14e: 61bb str r3, [r7, #24]
bufferoffset = 0;
800d150: 2300 movs r3, #0
800d152: 613b str r3, [r7, #16]
/* copy frame from pbufs to driver buffers */
for(q = p; q != NULL; q = q->next)
800d154: 683b ldr r3, [r7, #0]
800d156: 623b str r3, [r7, #32]
800d158: e05a b.n 800d210 <low_level_output+0xe8>
{
/* Is this buffer available? If not, goto error */
if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
800d15a: 69bb ldr r3, [r7, #24]
800d15c: 681b ldr r3, [r3, #0]
800d15e: 2b00 cmp r3, #0
800d160: da03 bge.n 800d16a <low_level_output+0x42>
{
errval = ERR_USE;
800d162: 23f8 movs r3, #248 ; 0xf8
800d164: f887 3027 strb.w r3, [r7, #39] ; 0x27
goto error;
800d168: e05c b.n 800d224 <low_level_output+0xfc>
}
/* Get bytes in current lwIP buffer */
byteslefttocopy = q->len;
800d16a: 6a3b ldr r3, [r7, #32]
800d16c: 895b ldrh r3, [r3, #10]
800d16e: 60fb str r3, [r7, #12]
payloadoffset = 0;
800d170: 2300 movs r3, #0
800d172: 60bb str r3, [r7, #8]
/* Check if the length of data to copy is bigger than Tx buffer size*/
while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE )
800d174: e02f b.n 800d1d6 <low_level_output+0xae>
{
/* Copy data to Tx buffer*/
memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), (ETH_TX_BUF_SIZE - bufferoffset) );
800d176: 69fa ldr r2, [r7, #28]
800d178: 693b ldr r3, [r7, #16]
800d17a: 18d0 adds r0, r2, r3
800d17c: 6a3b ldr r3, [r7, #32]
800d17e: 685a ldr r2, [r3, #4]
800d180: 68bb ldr r3, [r7, #8]
800d182: 18d1 adds r1, r2, r3
800d184: 693a ldr r2, [r7, #16]
800d186: f240 53f4 movw r3, #1524 ; 0x5f4
800d18a: 1a9b subs r3, r3, r2
800d18c: 461a mov r2, r3
800d18e: f00f fd86 bl 801cc9e <memcpy>
/* Point to next descriptor */
DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr);
800d192: 69bb ldr r3, [r7, #24]
800d194: 68db ldr r3, [r3, #12]
800d196: 61bb str r3, [r7, #24]
/* Check if the buffer is available */
if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
800d198: 69bb ldr r3, [r7, #24]
800d19a: 681b ldr r3, [r3, #0]
800d19c: 2b00 cmp r3, #0
800d19e: da03 bge.n 800d1a8 <low_level_output+0x80>
{
errval = ERR_USE;
800d1a0: 23f8 movs r3, #248 ; 0xf8
800d1a2: f887 3027 strb.w r3, [r7, #39] ; 0x27
goto error;
800d1a6: e03d b.n 800d224 <low_level_output+0xfc>
}
buffer = (uint8_t *)(DmaTxDesc->Buffer1Addr);
800d1a8: 69bb ldr r3, [r7, #24]
800d1aa: 689b ldr r3, [r3, #8]
800d1ac: 61fb str r3, [r7, #28]
byteslefttocopy = byteslefttocopy - (ETH_TX_BUF_SIZE - bufferoffset);
800d1ae: 693a ldr r2, [r7, #16]
800d1b0: 68fb ldr r3, [r7, #12]
800d1b2: 4413 add r3, r2
800d1b4: f2a3 53f4 subw r3, r3, #1524 ; 0x5f4
800d1b8: 60fb str r3, [r7, #12]
payloadoffset = payloadoffset + (ETH_TX_BUF_SIZE - bufferoffset);
800d1ba: 68ba ldr r2, [r7, #8]
800d1bc: 693b ldr r3, [r7, #16]
800d1be: 1ad3 subs r3, r2, r3
800d1c0: f203 53f4 addw r3, r3, #1524 ; 0x5f4
800d1c4: 60bb str r3, [r7, #8]
framelength = framelength + (ETH_TX_BUF_SIZE - bufferoffset);
800d1c6: 697a ldr r2, [r7, #20]
800d1c8: 693b ldr r3, [r7, #16]
800d1ca: 1ad3 subs r3, r2, r3
800d1cc: f203 53f4 addw r3, r3, #1524 ; 0x5f4
800d1d0: 617b str r3, [r7, #20]
bufferoffset = 0;
800d1d2: 2300 movs r3, #0
800d1d4: 613b str r3, [r7, #16]
while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE )
800d1d6: 68fa ldr r2, [r7, #12]
800d1d8: 693b ldr r3, [r7, #16]
800d1da: 4413 add r3, r2
800d1dc: f240 52f4 movw r2, #1524 ; 0x5f4
800d1e0: 4293 cmp r3, r2
800d1e2: d8c8 bhi.n 800d176 <low_level_output+0x4e>
}
/* Copy the remaining bytes */
memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), byteslefttocopy );
800d1e4: 69fa ldr r2, [r7, #28]
800d1e6: 693b ldr r3, [r7, #16]
800d1e8: 18d0 adds r0, r2, r3
800d1ea: 6a3b ldr r3, [r7, #32]
800d1ec: 685a ldr r2, [r3, #4]
800d1ee: 68bb ldr r3, [r7, #8]
800d1f0: 4413 add r3, r2
800d1f2: 68fa ldr r2, [r7, #12]
800d1f4: 4619 mov r1, r3
800d1f6: f00f fd52 bl 801cc9e <memcpy>
bufferoffset = bufferoffset + byteslefttocopy;
800d1fa: 693a ldr r2, [r7, #16]
800d1fc: 68fb ldr r3, [r7, #12]
800d1fe: 4413 add r3, r2
800d200: 613b str r3, [r7, #16]
framelength = framelength + byteslefttocopy;
800d202: 697a ldr r2, [r7, #20]
800d204: 68fb ldr r3, [r7, #12]
800d206: 4413 add r3, r2
800d208: 617b str r3, [r7, #20]
for(q = p; q != NULL; q = q->next)
800d20a: 6a3b ldr r3, [r7, #32]
800d20c: 681b ldr r3, [r3, #0]
800d20e: 623b str r3, [r7, #32]
800d210: 6a3b ldr r3, [r7, #32]
800d212: 2b00 cmp r3, #0
800d214: d1a1 bne.n 800d15a <low_level_output+0x32>
}
/* Prepare transmit descriptors to give to DMA */
HAL_ETH_TransmitFrame(&heth, framelength);
800d216: 6979 ldr r1, [r7, #20]
800d218: 4811 ldr r0, [pc, #68] ; (800d260 <low_level_output+0x138>)
800d21a: f7f9 fddd bl 8006dd8 <HAL_ETH_TransmitFrame>
errval = ERR_OK;
800d21e: 2300 movs r3, #0
800d220: f887 3027 strb.w r3, [r7, #39] ; 0x27
error:
/* When Transmit Underflow flag is set, clear it and issue a Transmit Poll Demand to resume transmission */
if ((heth.Instance->DMASR & ETH_DMASR_TUS) != (uint32_t)RESET)
800d224: 4b0e ldr r3, [pc, #56] ; (800d260 <low_level_output+0x138>)
800d226: 681a ldr r2, [r3, #0]
800d228: f241 0314 movw r3, #4116 ; 0x1014
800d22c: 4413 add r3, r2
800d22e: 681b ldr r3, [r3, #0]
800d230: f003 0320 and.w r3, r3, #32
800d234: 2b00 cmp r3, #0
800d236: d00d beq.n 800d254 <low_level_output+0x12c>
{
/* Clear TUS ETHERNET DMA flag */
heth.Instance->DMASR = ETH_DMASR_TUS;
800d238: 4b09 ldr r3, [pc, #36] ; (800d260 <low_level_output+0x138>)
800d23a: 681a ldr r2, [r3, #0]
800d23c: f241 0314 movw r3, #4116 ; 0x1014
800d240: 4413 add r3, r2
800d242: 2220 movs r2, #32
800d244: 601a str r2, [r3, #0]
/* Resume DMA transmission*/
heth.Instance->DMATPDR = 0;
800d246: 4b06 ldr r3, [pc, #24] ; (800d260 <low_level_output+0x138>)
800d248: 681a ldr r2, [r3, #0]
800d24a: f241 0304 movw r3, #4100 ; 0x1004
800d24e: 4413 add r3, r2
800d250: 2200 movs r2, #0
800d252: 601a str r2, [r3, #0]
}
return errval;
800d254: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
}
800d258: 4618 mov r0, r3
800d25a: 3728 adds r7, #40 ; 0x28
800d25c: 46bd mov sp, r7
800d25e: bd80 pop {r7, pc}
800d260: 2000a8ac .word 0x2000a8ac
0800d264 <low_level_input>:
* @param netif the lwip network interface structure for this ethernetif
* @return a pbuf filled with the received packet (including MAC header)
* NULL on memory error
*/
static struct pbuf * low_level_input(struct netif *netif)
{
800d264: b580 push {r7, lr}
800d266: b08c sub sp, #48 ; 0x30
800d268: af00 add r7, sp, #0
800d26a: 6078 str r0, [r7, #4]
struct pbuf *p = NULL;
800d26c: 2300 movs r3, #0
800d26e: 62fb str r3, [r7, #44] ; 0x2c
struct pbuf *q = NULL;
800d270: 2300 movs r3, #0
800d272: 62bb str r3, [r7, #40] ; 0x28
uint16_t len = 0;
800d274: 2300 movs r3, #0
800d276: 81fb strh r3, [r7, #14]
uint8_t *buffer;
__IO ETH_DMADescTypeDef *dmarxdesc;
uint32_t bufferoffset = 0;
800d278: 2300 movs r3, #0
800d27a: 61fb str r3, [r7, #28]
uint32_t payloadoffset = 0;
800d27c: 2300 movs r3, #0
800d27e: 61bb str r3, [r7, #24]
uint32_t byteslefttocopy = 0;
800d280: 2300 movs r3, #0
800d282: 617b str r3, [r7, #20]
uint32_t i=0;
800d284: 2300 movs r3, #0
800d286: 613b str r3, [r7, #16]
/* get received frame */
if (HAL_ETH_GetReceivedFrame_IT(&heth) != HAL_OK)
800d288: 484f ldr r0, [pc, #316] ; (800d3c8 <low_level_input+0x164>)
800d28a: f7f9 fe8f bl 8006fac <HAL_ETH_GetReceivedFrame_IT>
800d28e: 4603 mov r3, r0
800d290: 2b00 cmp r3, #0
800d292: d001 beq.n 800d298 <low_level_input+0x34>
return NULL;
800d294: 2300 movs r3, #0
800d296: e092 b.n 800d3be <low_level_input+0x15a>
/* Obtain the size of the packet and put it into the "len" variable. */
len = heth.RxFrameInfos.length;
800d298: 4b4b ldr r3, [pc, #300] ; (800d3c8 <low_level_input+0x164>)
800d29a: 6bdb ldr r3, [r3, #60] ; 0x3c
800d29c: 81fb strh r3, [r7, #14]
buffer = (uint8_t *)heth.RxFrameInfos.buffer;
800d29e: 4b4a ldr r3, [pc, #296] ; (800d3c8 <low_level_input+0x164>)
800d2a0: 6c1b ldr r3, [r3, #64] ; 0x40
800d2a2: 627b str r3, [r7, #36] ; 0x24
if (len > 0)
800d2a4: 89fb ldrh r3, [r7, #14]
800d2a6: 2b00 cmp r3, #0
800d2a8: d007 beq.n 800d2ba <low_level_input+0x56>
{
/* We allocate a pbuf chain of pbufs from the Lwip buffer pool */
p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
800d2aa: 89fb ldrh r3, [r7, #14]
800d2ac: f44f 72c1 mov.w r2, #386 ; 0x182
800d2b0: 4619 mov r1, r3
800d2b2: 2000 movs r0, #0
800d2b4: f004 fd10 bl 8011cd8 <pbuf_alloc>
800d2b8: 62f8 str r0, [r7, #44] ; 0x2c
}
if (p != NULL)
800d2ba: 6afb ldr r3, [r7, #44] ; 0x2c
800d2bc: 2b00 cmp r3, #0
800d2be: d04b beq.n 800d358 <low_level_input+0xf4>
{
dmarxdesc = heth.RxFrameInfos.FSRxDesc;
800d2c0: 4b41 ldr r3, [pc, #260] ; (800d3c8 <low_level_input+0x164>)
800d2c2: 6b1b ldr r3, [r3, #48] ; 0x30
800d2c4: 623b str r3, [r7, #32]
bufferoffset = 0;
800d2c6: 2300 movs r3, #0
800d2c8: 61fb str r3, [r7, #28]
for(q = p; q != NULL; q = q->next)
800d2ca: 6afb ldr r3, [r7, #44] ; 0x2c
800d2cc: 62bb str r3, [r7, #40] ; 0x28
800d2ce: e040 b.n 800d352 <low_level_input+0xee>
{
byteslefttocopy = q->len;
800d2d0: 6abb ldr r3, [r7, #40] ; 0x28
800d2d2: 895b ldrh r3, [r3, #10]
800d2d4: 617b str r3, [r7, #20]
payloadoffset = 0;
800d2d6: 2300 movs r3, #0
800d2d8: 61bb str r3, [r7, #24]
/* Check if the length of bytes to copy in current pbuf is bigger than Rx buffer size*/
while( (byteslefttocopy + bufferoffset) > ETH_RX_BUF_SIZE )
800d2da: e021 b.n 800d320 <low_level_input+0xbc>
{
/* Copy data to pbuf */
memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), (ETH_RX_BUF_SIZE - bufferoffset));
800d2dc: 6abb ldr r3, [r7, #40] ; 0x28
800d2de: 685a ldr r2, [r3, #4]
800d2e0: 69bb ldr r3, [r7, #24]
800d2e2: 18d0 adds r0, r2, r3
800d2e4: 6a7a ldr r2, [r7, #36] ; 0x24
800d2e6: 69fb ldr r3, [r7, #28]
800d2e8: 18d1 adds r1, r2, r3
800d2ea: 69fa ldr r2, [r7, #28]
800d2ec: f240 53f4 movw r3, #1524 ; 0x5f4
800d2f0: 1a9b subs r3, r3, r2
800d2f2: 461a mov r2, r3
800d2f4: f00f fcd3 bl 801cc9e <memcpy>
/* Point to next descriptor */
dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);
800d2f8: 6a3b ldr r3, [r7, #32]
800d2fa: 68db ldr r3, [r3, #12]
800d2fc: 623b str r3, [r7, #32]
buffer = (uint8_t *)(dmarxdesc->Buffer1Addr);
800d2fe: 6a3b ldr r3, [r7, #32]
800d300: 689b ldr r3, [r3, #8]
800d302: 627b str r3, [r7, #36] ; 0x24
byteslefttocopy = byteslefttocopy - (ETH_RX_BUF_SIZE - bufferoffset);
800d304: 69fa ldr r2, [r7, #28]
800d306: 697b ldr r3, [r7, #20]
800d308: 4413 add r3, r2
800d30a: f2a3 53f4 subw r3, r3, #1524 ; 0x5f4
800d30e: 617b str r3, [r7, #20]
payloadoffset = payloadoffset + (ETH_RX_BUF_SIZE - bufferoffset);
800d310: 69ba ldr r2, [r7, #24]
800d312: 69fb ldr r3, [r7, #28]
800d314: 1ad3 subs r3, r2, r3
800d316: f203 53f4 addw r3, r3, #1524 ; 0x5f4
800d31a: 61bb str r3, [r7, #24]
bufferoffset = 0;
800d31c: 2300 movs r3, #0
800d31e: 61fb str r3, [r7, #28]
while( (byteslefttocopy + bufferoffset) > ETH_RX_BUF_SIZE )
800d320: 697a ldr r2, [r7, #20]
800d322: 69fb ldr r3, [r7, #28]
800d324: 4413 add r3, r2
800d326: f240 52f4 movw r2, #1524 ; 0x5f4
800d32a: 4293 cmp r3, r2
800d32c: d8d6 bhi.n 800d2dc <low_level_input+0x78>
}
/* Copy remaining data in pbuf */
memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), byteslefttocopy);
800d32e: 6abb ldr r3, [r7, #40] ; 0x28
800d330: 685a ldr r2, [r3, #4]
800d332: 69bb ldr r3, [r7, #24]
800d334: 18d0 adds r0, r2, r3
800d336: 6a7a ldr r2, [r7, #36] ; 0x24
800d338: 69fb ldr r3, [r7, #28]
800d33a: 4413 add r3, r2
800d33c: 697a ldr r2, [r7, #20]
800d33e: 4619 mov r1, r3
800d340: f00f fcad bl 801cc9e <memcpy>
bufferoffset = bufferoffset + byteslefttocopy;
800d344: 69fa ldr r2, [r7, #28]
800d346: 697b ldr r3, [r7, #20]
800d348: 4413 add r3, r2
800d34a: 61fb str r3, [r7, #28]
for(q = p; q != NULL; q = q->next)
800d34c: 6abb ldr r3, [r7, #40] ; 0x28
800d34e: 681b ldr r3, [r3, #0]
800d350: 62bb str r3, [r7, #40] ; 0x28
800d352: 6abb ldr r3, [r7, #40] ; 0x28
800d354: 2b00 cmp r3, #0
800d356: d1bb bne.n 800d2d0 <low_level_input+0x6c>
}
}
/* Release descriptors to DMA */
/* Point to first descriptor */
dmarxdesc = heth.RxFrameInfos.FSRxDesc;
800d358: 4b1b ldr r3, [pc, #108] ; (800d3c8 <low_level_input+0x164>)
800d35a: 6b1b ldr r3, [r3, #48] ; 0x30
800d35c: 623b str r3, [r7, #32]
/* Set Own bit in Rx descriptors: gives the buffers back to DMA */
for (i=0; i< heth.RxFrameInfos.SegCount; i++)
800d35e: 2300 movs r3, #0
800d360: 613b str r3, [r7, #16]
800d362: e00b b.n 800d37c <low_level_input+0x118>
{
dmarxdesc->Status |= ETH_DMARXDESC_OWN;
800d364: 6a3b ldr r3, [r7, #32]
800d366: 681b ldr r3, [r3, #0]
800d368: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
800d36c: 6a3b ldr r3, [r7, #32]
800d36e: 601a str r2, [r3, #0]
dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);
800d370: 6a3b ldr r3, [r7, #32]
800d372: 68db ldr r3, [r3, #12]
800d374: 623b str r3, [r7, #32]
for (i=0; i< heth.RxFrameInfos.SegCount; i++)
800d376: 693b ldr r3, [r7, #16]
800d378: 3301 adds r3, #1
800d37a: 613b str r3, [r7, #16]
800d37c: 4b12 ldr r3, [pc, #72] ; (800d3c8 <low_level_input+0x164>)
800d37e: 6b9b ldr r3, [r3, #56] ; 0x38
800d380: 693a ldr r2, [r7, #16]
800d382: 429a cmp r2, r3
800d384: d3ee bcc.n 800d364 <low_level_input+0x100>
}
/* Clear Segment_Count */
heth.RxFrameInfos.SegCount =0;
800d386: 4b10 ldr r3, [pc, #64] ; (800d3c8 <low_level_input+0x164>)
800d388: 2200 movs r2, #0
800d38a: 639a str r2, [r3, #56] ; 0x38
/* When Rx Buffer unavailable flag is set: clear it and resume reception */
if ((heth.Instance->DMASR & ETH_DMASR_RBUS) != (uint32_t)RESET)
800d38c: 4b0e ldr r3, [pc, #56] ; (800d3c8 <low_level_input+0x164>)
800d38e: 681a ldr r2, [r3, #0]
800d390: f241 0314 movw r3, #4116 ; 0x1014
800d394: 4413 add r3, r2
800d396: 681b ldr r3, [r3, #0]
800d398: f003 0380 and.w r3, r3, #128 ; 0x80
800d39c: 2b00 cmp r3, #0
800d39e: d00d beq.n 800d3bc <low_level_input+0x158>
{
/* Clear RBUS ETHERNET DMA flag */
heth.Instance->DMASR = ETH_DMASR_RBUS;
800d3a0: 4b09 ldr r3, [pc, #36] ; (800d3c8 <low_level_input+0x164>)
800d3a2: 681a ldr r2, [r3, #0]
800d3a4: f241 0314 movw r3, #4116 ; 0x1014
800d3a8: 4413 add r3, r2
800d3aa: 2280 movs r2, #128 ; 0x80
800d3ac: 601a str r2, [r3, #0]
/* Resume DMA reception */
heth.Instance->DMARPDR = 0;
800d3ae: 4b06 ldr r3, [pc, #24] ; (800d3c8 <low_level_input+0x164>)
800d3b0: 681a ldr r2, [r3, #0]
800d3b2: f241 0308 movw r3, #4104 ; 0x1008
800d3b6: 4413 add r3, r2
800d3b8: 2200 movs r2, #0
800d3ba: 601a str r2, [r3, #0]
}
return p;
800d3bc: 6afb ldr r3, [r7, #44] ; 0x2c
}
800d3be: 4618 mov r0, r3
800d3c0: 3730 adds r7, #48 ; 0x30
800d3c2: 46bd mov sp, r7
800d3c4: bd80 pop {r7, pc}
800d3c6: bf00 nop
800d3c8: 2000a8ac .word 0x2000a8ac
0800d3cc <ethernetif_input>:
* the appropriate input function is called.
*
* @param netif the lwip network interface structure for this ethernetif
*/
void ethernetif_input(void const * argument)
{
800d3cc: b580 push {r7, lr}
800d3ce: b084 sub sp, #16
800d3d0: af00 add r7, sp, #0
800d3d2: 6078 str r0, [r7, #4]
struct pbuf *p;
struct netif *netif = (struct netif *) argument;
800d3d4: 687b ldr r3, [r7, #4]
800d3d6: 60fb str r3, [r7, #12]
for( ;; )
{
if (osSemaphoreWait(s_xSemaphore, TIME_WAITING_FOR_INPUT) == osOK)
800d3d8: 4b12 ldr r3, [pc, #72] ; (800d424 <ethernetif_input+0x58>)
800d3da: 681b ldr r3, [r3, #0]
800d3dc: f04f 31ff mov.w r1, #4294967295
800d3e0: 4618 mov r0, r3
800d3e2: f000 fa99 bl 800d918 <osSemaphoreWait>
800d3e6: 4603 mov r3, r0
800d3e8: 2b00 cmp r3, #0
800d3ea: d1f5 bne.n 800d3d8 <ethernetif_input+0xc>
{
do
{
LOCK_TCPIP_CORE();
800d3ec: 480e ldr r0, [pc, #56] ; (800d428 <ethernetif_input+0x5c>)
800d3ee: f00f fbc3 bl 801cb78 <sys_mutex_lock>
p = low_level_input( netif );
800d3f2: 68f8 ldr r0, [r7, #12]
800d3f4: f7ff ff36 bl 800d264 <low_level_input>
800d3f8: 60b8 str r0, [r7, #8]
if (p != NULL)
800d3fa: 68bb ldr r3, [r7, #8]
800d3fc: 2b00 cmp r3, #0
800d3fe: d00a beq.n 800d416 <ethernetif_input+0x4a>
{
if (netif->input( p, netif) != ERR_OK )
800d400: 68fb ldr r3, [r7, #12]
800d402: 691b ldr r3, [r3, #16]
800d404: 68f9 ldr r1, [r7, #12]
800d406: 68b8 ldr r0, [r7, #8]
800d408: 4798 blx r3
800d40a: 4603 mov r3, r0
800d40c: 2b00 cmp r3, #0
800d40e: d002 beq.n 800d416 <ethernetif_input+0x4a>
{
pbuf_free(p);
800d410: 68b8 ldr r0, [r7, #8]
800d412: f004 ff41 bl 8012298 <pbuf_free>
}
}
UNLOCK_TCPIP_CORE();
800d416: 4804 ldr r0, [pc, #16] ; (800d428 <ethernetif_input+0x5c>)
800d418: f00f fbbd bl 801cb96 <sys_mutex_unlock>
} while(p!=NULL);
800d41c: 68bb ldr r3, [r7, #8]
800d41e: 2b00 cmp r3, #0
800d420: d1e4 bne.n 800d3ec <ethernetif_input+0x20>
if (osSemaphoreWait(s_xSemaphore, TIME_WAITING_FOR_INPUT) == osOK)
800d422: e7d9 b.n 800d3d8 <ethernetif_input+0xc>
800d424: 20000588 .word 0x20000588
800d428: 2000c0c4 .word 0x2000c0c4
0800d42c <ethernetif_init>:
* @return ERR_OK if the loopif is initialized
* ERR_MEM if private data couldn't be allocated
* any other err_t on error
*/
err_t ethernetif_init(struct netif *netif)
{
800d42c: b580 push {r7, lr}
800d42e: b082 sub sp, #8
800d430: af00 add r7, sp, #0
800d432: 6078 str r0, [r7, #4]
LWIP_ASSERT("netif != NULL", (netif != NULL));
800d434: 687b ldr r3, [r7, #4]
800d436: 2b00 cmp r3, #0
800d438: d106 bne.n 800d448 <ethernetif_init+0x1c>
800d43a: 4b0e ldr r3, [pc, #56] ; (800d474 <ethernetif_init+0x48>)
800d43c: f240 222b movw r2, #555 ; 0x22b
800d440: 490d ldr r1, [pc, #52] ; (800d478 <ethernetif_init+0x4c>)
800d442: 480e ldr r0, [pc, #56] ; (800d47c <ethernetif_init+0x50>)
800d444: f00f fc58 bl 801ccf8 <iprintf>
#if LWIP_NETIF_HOSTNAME
/* Initialize interface hostname */
netif->hostname = "lwip";
#endif /* LWIP_NETIF_HOSTNAME */
netif->name[0] = IFNAME0;
800d448: 687b ldr r3, [r7, #4]
800d44a: 2273 movs r2, #115 ; 0x73
800d44c: f883 2032 strb.w r2, [r3, #50] ; 0x32
netif->name[1] = IFNAME1;
800d450: 687b ldr r3, [r7, #4]
800d452: 2274 movs r2, #116 ; 0x74
800d454: f883 2033 strb.w r2, [r3, #51] ; 0x33
* is available...) */
#if LWIP_IPV4
#if LWIP_ARP || LWIP_ETHERNET
#if LWIP_ARP
netif->output = etharp_output;
800d458: 687b ldr r3, [r7, #4]
800d45a: 4a09 ldr r2, [pc, #36] ; (800d480 <ethernetif_init+0x54>)
800d45c: 615a str r2, [r3, #20]
#if LWIP_IPV6
netif->output_ip6 = ethip6_output;
#endif /* LWIP_IPV6 */
netif->linkoutput = low_level_output;
800d45e: 687b ldr r3, [r7, #4]
800d460: 4a08 ldr r2, [pc, #32] ; (800d484 <ethernetif_init+0x58>)
800d462: 619a str r2, [r3, #24]
/* initialize the hardware */
low_level_init(netif);
800d464: 6878 ldr r0, [r7, #4]
800d466: f7ff fd87 bl 800cf78 <low_level_init>
return ERR_OK;
800d46a: 2300 movs r3, #0
}
800d46c: 4618 mov r0, r3
800d46e: 3708 adds r7, #8
800d470: 46bd mov sp, r7
800d472: bd80 pop {r7, pc}
800d474: 0801dfb8 .word 0x0801dfb8
800d478: 0801dfd4 .word 0x0801dfd4
800d47c: 0801dfe4 .word 0x0801dfe4
800d480: 0801acf5 .word 0x0801acf5
800d484: 0800d129 .word 0x0800d129
0800d488 <sys_now>:
* when LWIP_TIMERS == 1 and NO_SYS == 1
* @param None
* @retval Time
*/
u32_t sys_now(void)
{
800d488: b580 push {r7, lr}
800d48a: af00 add r7, sp, #0
return HAL_GetTick();
800d48c: f7f7 ff48 bl 8005320 <HAL_GetTick>
800d490: 4603 mov r3, r0
}
800d492: 4618 mov r0, r3
800d494: bd80 pop {r7, pc}
...
0800d498 <ethernetif_set_link>:
* @param netif: the network interface
* @retval None
*/
void ethernetif_set_link(void const *argument)
{
800d498: b580 push {r7, lr}
800d49a: b084 sub sp, #16
800d49c: af00 add r7, sp, #0
800d49e: 6078 str r0, [r7, #4]
uint32_t regvalue = 0;
800d4a0: 2300 movs r3, #0
800d4a2: 60bb str r3, [r7, #8]
struct link_str *link_arg = (struct link_str *)argument;
800d4a4: 687b ldr r3, [r7, #4]
800d4a6: 60fb str r3, [r7, #12]
for(;;)
{
/* Read PHY_BSR*/
HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, &regvalue);
800d4a8: f107 0308 add.w r3, r7, #8
800d4ac: 461a mov r2, r3
800d4ae: 2101 movs r1, #1
800d4b0: 4816 ldr r0, [pc, #88] ; (800d50c <ethernetif_set_link+0x74>)
800d4b2: f7f9 fe7e bl 80071b2 <HAL_ETH_ReadPHYRegister>
regvalue &= PHY_LINKED_STATUS;
800d4b6: 68bb ldr r3, [r7, #8]
800d4b8: f003 0304 and.w r3, r3, #4
800d4bc: 60bb str r3, [r7, #8]
/* Check whether the netif link down and the PHY link is up */
if(!netif_is_link_up(link_arg->netif) && (regvalue))
800d4be: 68fb ldr r3, [r7, #12]
800d4c0: 681b ldr r3, [r3, #0]
800d4c2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800d4c6: f003 0304 and.w r3, r3, #4
800d4ca: 2b00 cmp r3, #0
800d4cc: d108 bne.n 800d4e0 <ethernetif_set_link+0x48>
800d4ce: 68bb ldr r3, [r7, #8]
800d4d0: 2b00 cmp r3, #0
800d4d2: d005 beq.n 800d4e0 <ethernetif_set_link+0x48>
{
/* network cable is connected */
netif_set_link_up(link_arg->netif);
800d4d4: 68fb ldr r3, [r7, #12]
800d4d6: 681b ldr r3, [r3, #0]
800d4d8: 4618 mov r0, r3
800d4da: f004 facb bl 8011a74 <netif_set_link_up>
800d4de: e011 b.n 800d504 <ethernetif_set_link+0x6c>
}
else if(netif_is_link_up(link_arg->netif) && (!regvalue))
800d4e0: 68fb ldr r3, [r7, #12]
800d4e2: 681b ldr r3, [r3, #0]
800d4e4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800d4e8: 089b lsrs r3, r3, #2
800d4ea: f003 0301 and.w r3, r3, #1
800d4ee: b2db uxtb r3, r3
800d4f0: 2b00 cmp r3, #0
800d4f2: d007 beq.n 800d504 <ethernetif_set_link+0x6c>
800d4f4: 68bb ldr r3, [r7, #8]
800d4f6: 2b00 cmp r3, #0
800d4f8: d104 bne.n 800d504 <ethernetif_set_link+0x6c>
{
/* network cable is dis-connected */
netif_set_link_down(link_arg->netif);
800d4fa: 68fb ldr r3, [r7, #12]
800d4fc: 681b ldr r3, [r3, #0]
800d4fe: 4618 mov r0, r3
800d500: f004 faf0 bl 8011ae4 <netif_set_link_down>
}
/* Suspend thread for 200 ms */
osDelay(200);
800d504: 20c8 movs r0, #200 ; 0xc8
800d506: f000 f916 bl 800d736 <osDelay>
HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, &regvalue);
800d50a: e7cd b.n 800d4a8 <ethernetif_set_link+0x10>
800d50c: 2000a8ac .word 0x2000a8ac
0800d510 <ethernetif_update_config>:
* to update low level driver configuration.
* @param netif: The network interface
* @retval None
*/
void ethernetif_update_config(struct netif *netif)
{
800d510: b580 push {r7, lr}
800d512: b084 sub sp, #16
800d514: af00 add r7, sp, #0
800d516: 6078 str r0, [r7, #4]
__IO uint32_t tickstart = 0;
800d518: 2300 movs r3, #0
800d51a: 60fb str r3, [r7, #12]
uint32_t regvalue = 0;
800d51c: 2300 movs r3, #0
800d51e: 60bb str r3, [r7, #8]
if(netif_is_link_up(netif))
800d520: 687b ldr r3, [r7, #4]
800d522: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800d526: 089b lsrs r3, r3, #2
800d528: f003 0301 and.w r3, r3, #1
800d52c: b2db uxtb r3, r3
800d52e: 2b00 cmp r3, #0
800d530: d05d beq.n 800d5ee <ethernetif_update_config+0xde>
{
/* Restart the auto-negotiation */
if(heth.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE)
800d532: 4b34 ldr r3, [pc, #208] ; (800d604 <ethernetif_update_config+0xf4>)
800d534: 685b ldr r3, [r3, #4]
800d536: 2b00 cmp r3, #0
800d538: d03f beq.n 800d5ba <ethernetif_update_config+0xaa>
{
/* Enable Auto-Negotiation */
HAL_ETH_WritePHYRegister(&heth, PHY_BCR, PHY_AUTONEGOTIATION);
800d53a: f44f 5280 mov.w r2, #4096 ; 0x1000
800d53e: 2100 movs r1, #0
800d540: 4830 ldr r0, [pc, #192] ; (800d604 <ethernetif_update_config+0xf4>)
800d542: f7f9 fe9e bl 8007282 <HAL_ETH_WritePHYRegister>
/* Get tick */
tickstart = HAL_GetTick();
800d546: f7f7 feeb bl 8005320 <HAL_GetTick>
800d54a: 4603 mov r3, r0
800d54c: 60fb str r3, [r7, #12]
/* Wait until the auto-negotiation will be completed */
do
{
HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, &regvalue);
800d54e: f107 0308 add.w r3, r7, #8
800d552: 461a mov r2, r3
800d554: 2101 movs r1, #1
800d556: 482b ldr r0, [pc, #172] ; (800d604 <ethernetif_update_config+0xf4>)
800d558: f7f9 fe2b bl 80071b2 <HAL_ETH_ReadPHYRegister>
/* Check for the Timeout ( 1s ) */
if((HAL_GetTick() - tickstart ) > 1000)
800d55c: f7f7 fee0 bl 8005320 <HAL_GetTick>
800d560: 4602 mov r2, r0
800d562: 68fb ldr r3, [r7, #12]
800d564: 1ad3 subs r3, r2, r3
800d566: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800d56a: d828 bhi.n 800d5be <ethernetif_update_config+0xae>
{
/* In case of timeout */
goto error;
}
} while (((regvalue & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE));
800d56c: 68bb ldr r3, [r7, #8]
800d56e: f003 0320 and.w r3, r3, #32
800d572: 2b00 cmp r3, #0
800d574: d0eb beq.n 800d54e <ethernetif_update_config+0x3e>
/* Read the result of the auto-negotiation */
HAL_ETH_ReadPHYRegister(&heth, PHY_SR, &regvalue);
800d576: f107 0308 add.w r3, r7, #8
800d57a: 461a mov r2, r3
800d57c: 211f movs r1, #31
800d57e: 4821 ldr r0, [pc, #132] ; (800d604 <ethernetif_update_config+0xf4>)
800d580: f7f9 fe17 bl 80071b2 <HAL_ETH_ReadPHYRegister>
/* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */
if((regvalue & PHY_DUPLEX_STATUS) != (uint32_t)RESET)
800d584: 68bb ldr r3, [r7, #8]
800d586: f003 0310 and.w r3, r3, #16
800d58a: 2b00 cmp r3, #0
800d58c: d004 beq.n 800d598 <ethernetif_update_config+0x88>
{
/* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */
heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX;
800d58e: 4b1d ldr r3, [pc, #116] ; (800d604 <ethernetif_update_config+0xf4>)
800d590: f44f 6200 mov.w r2, #2048 ; 0x800
800d594: 60da str r2, [r3, #12]
800d596: e002 b.n 800d59e <ethernetif_update_config+0x8e>
}
else
{
/* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */
heth.Init.DuplexMode = ETH_MODE_HALFDUPLEX;
800d598: 4b1a ldr r3, [pc, #104] ; (800d604 <ethernetif_update_config+0xf4>)
800d59a: 2200 movs r2, #0
800d59c: 60da str r2, [r3, #12]
}
/* Configure the MAC with the speed fixed by the auto-negotiation process */
if(regvalue & PHY_SPEED_STATUS)
800d59e: 68bb ldr r3, [r7, #8]
800d5a0: f003 0304 and.w r3, r3, #4
800d5a4: 2b00 cmp r3, #0
800d5a6: d003 beq.n 800d5b0 <ethernetif_update_config+0xa0>
{
/* Set Ethernet speed to 10M following the auto-negotiation */
heth.Init.Speed = ETH_SPEED_10M;
800d5a8: 4b16 ldr r3, [pc, #88] ; (800d604 <ethernetif_update_config+0xf4>)
800d5aa: 2200 movs r2, #0
800d5ac: 609a str r2, [r3, #8]
800d5ae: e016 b.n 800d5de <ethernetif_update_config+0xce>
}
else
{
/* Set Ethernet speed to 100M following the auto-negotiation */
heth.Init.Speed = ETH_SPEED_100M;
800d5b0: 4b14 ldr r3, [pc, #80] ; (800d604 <ethernetif_update_config+0xf4>)
800d5b2: f44f 4280 mov.w r2, #16384 ; 0x4000
800d5b6: 609a str r2, [r3, #8]
800d5b8: e011 b.n 800d5de <ethernetif_update_config+0xce>
}
}
else /* AutoNegotiation Disable */
{
error :
800d5ba: bf00 nop
800d5bc: e000 b.n 800d5c0 <ethernetif_update_config+0xb0>
goto error;
800d5be: bf00 nop
/* Check parameters */
assert_param(IS_ETH_SPEED(heth.Init.Speed));
assert_param(IS_ETH_DUPLEX_MODE(heth.Init.DuplexMode));
/* Set MAC Speed and Duplex Mode to PHY */
HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) |
800d5c0: 4b10 ldr r3, [pc, #64] ; (800d604 <ethernetif_update_config+0xf4>)
800d5c2: 68db ldr r3, [r3, #12]
800d5c4: 08db lsrs r3, r3, #3
800d5c6: b29a uxth r2, r3
(uint16_t)(heth.Init.Speed >> 1)));
800d5c8: 4b0e ldr r3, [pc, #56] ; (800d604 <ethernetif_update_config+0xf4>)
800d5ca: 689b ldr r3, [r3, #8]
800d5cc: 085b lsrs r3, r3, #1
800d5ce: b29b uxth r3, r3
HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) |
800d5d0: 4313 orrs r3, r2
800d5d2: b29b uxth r3, r3
800d5d4: 461a mov r2, r3
800d5d6: 2100 movs r1, #0
800d5d8: 480a ldr r0, [pc, #40] ; (800d604 <ethernetif_update_config+0xf4>)
800d5da: f7f9 fe52 bl 8007282 <HAL_ETH_WritePHYRegister>
}
/* ETHERNET MAC Re-Configuration */
HAL_ETH_ConfigMAC(&heth, (ETH_MACInitTypeDef *) NULL);
800d5de: 2100 movs r1, #0
800d5e0: 4808 ldr r0, [pc, #32] ; (800d604 <ethernetif_update_config+0xf4>)
800d5e2: f7f9 ff13 bl 800740c <HAL_ETH_ConfigMAC>
/* Restart MAC interface */
HAL_ETH_Start(&heth);
800d5e6: 4807 ldr r0, [pc, #28] ; (800d604 <ethernetif_update_config+0xf4>)
800d5e8: f7f9 feb1 bl 800734e <HAL_ETH_Start>
800d5ec: e002 b.n 800d5f4 <ethernetif_update_config+0xe4>
}
else
{
/* Stop MAC interface */
HAL_ETH_Stop(&heth);
800d5ee: 4805 ldr r0, [pc, #20] ; (800d604 <ethernetif_update_config+0xf4>)
800d5f0: f7f9 fedc bl 80073ac <HAL_ETH_Stop>
}
ethernetif_notify_conn_changed(netif);
800d5f4: 6878 ldr r0, [r7, #4]
800d5f6: f000 f807 bl 800d608 <ethernetif_notify_conn_changed>
}
800d5fa: bf00 nop
800d5fc: 3710 adds r7, #16
800d5fe: 46bd mov sp, r7
800d600: bd80 pop {r7, pc}
800d602: bf00 nop
800d604: 2000a8ac .word 0x2000a8ac
0800d608 <ethernetif_notify_conn_changed>:
* @brief This function notify user about link status changement.
* @param netif: the network interface
* @retval None
*/
__weak void ethernetif_notify_conn_changed(struct netif *netif)
{
800d608: b480 push {r7}
800d60a: b083 sub sp, #12
800d60c: af00 add r7, sp, #0
800d60e: 6078 str r0, [r7, #4]
/* NOTE : This is function could be implemented in user file
when the callback is needed,
*/
}
800d610: bf00 nop
800d612: 370c adds r7, #12
800d614: 46bd mov sp, r7
800d616: f85d 7b04 ldr.w r7, [sp], #4
800d61a: 4770 bx lr
0800d61c <makeFreeRtosPriority>:
extern void xPortSysTickHandler(void);
/* Convert from CMSIS type osPriority to FreeRTOS priority number */
static unsigned portBASE_TYPE makeFreeRtosPriority (osPriority priority)
{
800d61c: b480 push {r7}
800d61e: b085 sub sp, #20
800d620: af00 add r7, sp, #0
800d622: 4603 mov r3, r0
800d624: 80fb strh r3, [r7, #6]
unsigned portBASE_TYPE fpriority = tskIDLE_PRIORITY;
800d626: 2300 movs r3, #0
800d628: 60fb str r3, [r7, #12]
if (priority != osPriorityError) {
800d62a: f9b7 3006 ldrsh.w r3, [r7, #6]
800d62e: 2b84 cmp r3, #132 ; 0x84
800d630: d005 beq.n 800d63e <makeFreeRtosPriority+0x22>
fpriority += (priority - osPriorityIdle);
800d632: f9b7 2006 ldrsh.w r2, [r7, #6]
800d636: 68fb ldr r3, [r7, #12]
800d638: 4413 add r3, r2
800d63a: 3303 adds r3, #3
800d63c: 60fb str r3, [r7, #12]
}
return fpriority;
800d63e: 68fb ldr r3, [r7, #12]
}
800d640: 4618 mov r0, r3
800d642: 3714 adds r7, #20
800d644: 46bd mov sp, r7
800d646: f85d 7b04 ldr.w r7, [sp], #4
800d64a: 4770 bx lr
0800d64c <inHandlerMode>:
#endif
/* Determine whether we are in thread mode or handler mode. */
static int inHandlerMode (void)
{
800d64c: b480 push {r7}
800d64e: b083 sub sp, #12
800d650: af00 add r7, sp, #0
*/
__STATIC_FORCEINLINE uint32_t __get_IPSR(void)
{
uint32_t result;
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
800d652: f3ef 8305 mrs r3, IPSR
800d656: 607b str r3, [r7, #4]
return(result);
800d658: 687b ldr r3, [r7, #4]
return __get_IPSR() != 0;
800d65a: 2b00 cmp r3, #0
800d65c: bf14 ite ne
800d65e: 2301 movne r3, #1
800d660: 2300 moveq r3, #0
800d662: b2db uxtb r3, r3
}
800d664: 4618 mov r0, r3
800d666: 370c adds r7, #12
800d668: 46bd mov sp, r7
800d66a: f85d 7b04 ldr.w r7, [sp], #4
800d66e: 4770 bx lr
0800d670 <osKernelStart>:
* @param argument pointer that is passed to the thread function as start argument.
* @retval status code that indicates the execution status of the function
* @note MUST REMAIN UNCHANGED: \b osKernelStart shall be consistent in every CMSIS-RTOS.
*/
osStatus osKernelStart (void)
{
800d670: b580 push {r7, lr}
800d672: af00 add r7, sp, #0
vTaskStartScheduler();
800d674: f001 fe1e bl 800f2b4 <vTaskStartScheduler>
return osOK;
800d678: 2300 movs r3, #0
}
800d67a: 4618 mov r0, r3
800d67c: bd80 pop {r7, pc}
0800d67e <osKernelSysTick>:
* @param None
* @retval None
* @note MUST REMAIN UNCHANGED: \b osKernelSysTick shall be consistent in every CMSIS-RTOS.
*/
uint32_t osKernelSysTick(void)
{
800d67e: b580 push {r7, lr}
800d680: af00 add r7, sp, #0
if (inHandlerMode()) {
800d682: f7ff ffe3 bl 800d64c <inHandlerMode>
800d686: 4603 mov r3, r0
800d688: 2b00 cmp r3, #0
800d68a: d003 beq.n 800d694 <osKernelSysTick+0x16>
return xTaskGetTickCountFromISR();
800d68c: f001 ff30 bl 800f4f0 <xTaskGetTickCountFromISR>
800d690: 4603 mov r3, r0
800d692: e002 b.n 800d69a <osKernelSysTick+0x1c>
}
else {
return xTaskGetTickCount();
800d694: f001 ff1c bl 800f4d0 <xTaskGetTickCount>
800d698: 4603 mov r3, r0
}
}
800d69a: 4618 mov r0, r3
800d69c: bd80 pop {r7, pc}
0800d69e <osThreadCreate>:
* @param argument pointer that is passed to the thread function as start argument.
* @retval thread ID for reference by other functions or NULL in case of error.
* @note MUST REMAIN UNCHANGED: \b osThreadCreate shall be consistent in every CMSIS-RTOS.
*/
osThreadId osThreadCreate (const osThreadDef_t *thread_def, void *argument)
{
800d69e: b5f0 push {r4, r5, r6, r7, lr}
800d6a0: b089 sub sp, #36 ; 0x24
800d6a2: af04 add r7, sp, #16
800d6a4: 6078 str r0, [r7, #4]
800d6a6: 6039 str r1, [r7, #0]
TaskHandle_t handle;
#if( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
if((thread_def->buffer != NULL) && (thread_def->controlblock != NULL)) {
800d6a8: 687b ldr r3, [r7, #4]
800d6aa: 695b ldr r3, [r3, #20]
800d6ac: 2b00 cmp r3, #0
800d6ae: d020 beq.n 800d6f2 <osThreadCreate+0x54>
800d6b0: 687b ldr r3, [r7, #4]
800d6b2: 699b ldr r3, [r3, #24]
800d6b4: 2b00 cmp r3, #0
800d6b6: d01c beq.n 800d6f2 <osThreadCreate+0x54>
handle = xTaskCreateStatic((TaskFunction_t)thread_def->pthread,(const portCHAR *)thread_def->name,
800d6b8: 687b ldr r3, [r7, #4]
800d6ba: 685c ldr r4, [r3, #4]
800d6bc: 687b ldr r3, [r7, #4]
800d6be: 681d ldr r5, [r3, #0]
800d6c0: 687b ldr r3, [r7, #4]
800d6c2: 691e ldr r6, [r3, #16]
800d6c4: 687b ldr r3, [r7, #4]
800d6c6: f9b3 3008 ldrsh.w r3, [r3, #8]
800d6ca: 4618 mov r0, r3
800d6cc: f7ff ffa6 bl 800d61c <makeFreeRtosPriority>
800d6d0: 4601 mov r1, r0
thread_def->stacksize, argument, makeFreeRtosPriority(thread_def->tpriority),
thread_def->buffer, thread_def->controlblock);
800d6d2: 687b ldr r3, [r7, #4]
800d6d4: 695b ldr r3, [r3, #20]
800d6d6: 687a ldr r2, [r7, #4]
800d6d8: 6992 ldr r2, [r2, #24]
handle = xTaskCreateStatic((TaskFunction_t)thread_def->pthread,(const portCHAR *)thread_def->name,
800d6da: 9202 str r2, [sp, #8]
800d6dc: 9301 str r3, [sp, #4]
800d6de: 9100 str r1, [sp, #0]
800d6e0: 683b ldr r3, [r7, #0]
800d6e2: 4632 mov r2, r6
800d6e4: 4629 mov r1, r5
800d6e6: 4620 mov r0, r4
800d6e8: f001 fafb bl 800ece2 <xTaskCreateStatic>
800d6ec: 4603 mov r3, r0
800d6ee: 60fb str r3, [r7, #12]
800d6f0: e01c b.n 800d72c <osThreadCreate+0x8e>
}
else {
if (xTaskCreate((TaskFunction_t)thread_def->pthread,(const portCHAR *)thread_def->name,
800d6f2: 687b ldr r3, [r7, #4]
800d6f4: 685c ldr r4, [r3, #4]
800d6f6: 687b ldr r3, [r7, #4]
800d6f8: 681d ldr r5, [r3, #0]
thread_def->stacksize, argument, makeFreeRtosPriority(thread_def->tpriority),
800d6fa: 687b ldr r3, [r7, #4]
800d6fc: 691b ldr r3, [r3, #16]
if (xTaskCreate((TaskFunction_t)thread_def->pthread,(const portCHAR *)thread_def->name,
800d6fe: b29e uxth r6, r3
800d700: 687b ldr r3, [r7, #4]
800d702: f9b3 3008 ldrsh.w r3, [r3, #8]
800d706: 4618 mov r0, r3
800d708: f7ff ff88 bl 800d61c <makeFreeRtosPriority>
800d70c: 4602 mov r2, r0
800d70e: f107 030c add.w r3, r7, #12
800d712: 9301 str r3, [sp, #4]
800d714: 9200 str r2, [sp, #0]
800d716: 683b ldr r3, [r7, #0]
800d718: 4632 mov r2, r6
800d71a: 4629 mov r1, r5
800d71c: 4620 mov r0, r4
800d71e: f001 fb40 bl 800eda2 <xTaskCreate>
800d722: 4603 mov r3, r0
800d724: 2b01 cmp r3, #1
800d726: d001 beq.n 800d72c <osThreadCreate+0x8e>
&handle) != pdPASS) {
return NULL;
800d728: 2300 movs r3, #0
800d72a: e000 b.n 800d72e <osThreadCreate+0x90>
&handle) != pdPASS) {
return NULL;
}
#endif
return handle;
800d72c: 68fb ldr r3, [r7, #12]
}
800d72e: 4618 mov r0, r3
800d730: 3714 adds r7, #20
800d732: 46bd mov sp, r7
800d734: bdf0 pop {r4, r5, r6, r7, pc}
0800d736 <osDelay>:
* @brief Wait for Timeout (Time Delay)
* @param millisec time delay value
* @retval status code that indicates the execution status of the function.
*/
osStatus osDelay (uint32_t millisec)
{
800d736: b580 push {r7, lr}
800d738: b084 sub sp, #16
800d73a: af00 add r7, sp, #0
800d73c: 6078 str r0, [r7, #4]
#if INCLUDE_vTaskDelay
TickType_t ticks = millisec / portTICK_PERIOD_MS;
800d73e: 687b ldr r3, [r7, #4]
800d740: 60fb str r3, [r7, #12]
vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */
800d742: 68fb ldr r3, [r7, #12]
800d744: 2b00 cmp r3, #0
800d746: d001 beq.n 800d74c <osDelay+0x16>
800d748: 68fb ldr r3, [r7, #12]
800d74a: e000 b.n 800d74e <osDelay+0x18>
800d74c: 2301 movs r3, #1
800d74e: 4618 mov r0, r3
800d750: f001 fd7a bl 800f248 <vTaskDelay>
return osOK;
800d754: 2300 movs r3, #0
#else
(void) millisec;
return osErrorResource;
#endif
}
800d756: 4618 mov r0, r3
800d758: 3710 adds r7, #16
800d75a: 46bd mov sp, r7
800d75c: bd80 pop {r7, pc}
0800d75e <osMutexCreate>:
* @param mutex_def mutex definition referenced with \ref osMutex.
* @retval mutex ID for reference by other functions or NULL in case of error.
* @note MUST REMAIN UNCHANGED: \b osMutexCreate shall be consistent in every CMSIS-RTOS.
*/
osMutexId osMutexCreate (const osMutexDef_t *mutex_def)
{
800d75e: b580 push {r7, lr}
800d760: b082 sub sp, #8
800d762: af00 add r7, sp, #0
800d764: 6078 str r0, [r7, #4]
#if ( configUSE_MUTEXES == 1)
#if( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
if (mutex_def->controlblock != NULL) {
800d766: 687b ldr r3, [r7, #4]
800d768: 685b ldr r3, [r3, #4]
800d76a: 2b00 cmp r3, #0
800d76c: d007 beq.n 800d77e <osMutexCreate+0x20>
return xSemaphoreCreateMutexStatic( mutex_def->controlblock );
800d76e: 687b ldr r3, [r7, #4]
800d770: 685b ldr r3, [r3, #4]
800d772: 4619 mov r1, r3
800d774: 2001 movs r0, #1
800d776: f000 fc5e bl 800e036 <xQueueCreateMutexStatic>
800d77a: 4603 mov r3, r0
800d77c: e003 b.n 800d786 <osMutexCreate+0x28>
}
else {
return xSemaphoreCreateMutex();
800d77e: 2001 movs r0, #1
800d780: f000 fc41 bl 800e006 <xQueueCreateMutex>
800d784: 4603 mov r3, r0
return xSemaphoreCreateMutex();
#endif
#else
return NULL;
#endif
}
800d786: 4618 mov r0, r3
800d788: 3708 adds r7, #8
800d78a: 46bd mov sp, r7
800d78c: bd80 pop {r7, pc}
...
0800d790 <osMutexWait>:
* @param millisec timeout value or 0 in case of no time-out.
* @retval status code that indicates the execution status of the function.
* @note MUST REMAIN UNCHANGED: \b osMutexWait shall be consistent in every CMSIS-RTOS.
*/
osStatus osMutexWait (osMutexId mutex_id, uint32_t millisec)
{
800d790: b580 push {r7, lr}
800d792: b084 sub sp, #16
800d794: af00 add r7, sp, #0
800d796: 6078 str r0, [r7, #4]
800d798: 6039 str r1, [r7, #0]
TickType_t ticks;
portBASE_TYPE taskWoken = pdFALSE;
800d79a: 2300 movs r3, #0
800d79c: 60bb str r3, [r7, #8]
if (mutex_id == NULL) {
800d79e: 687b ldr r3, [r7, #4]
800d7a0: 2b00 cmp r3, #0
800d7a2: d101 bne.n 800d7a8 <osMutexWait+0x18>
return osErrorParameter;
800d7a4: 2380 movs r3, #128 ; 0x80
800d7a6: e03a b.n 800d81e <osMutexWait+0x8e>
}
ticks = 0;
800d7a8: 2300 movs r3, #0
800d7aa: 60fb str r3, [r7, #12]
if (millisec == osWaitForever) {
800d7ac: 683b ldr r3, [r7, #0]
800d7ae: f1b3 3fff cmp.w r3, #4294967295
800d7b2: d103 bne.n 800d7bc <osMutexWait+0x2c>
ticks = portMAX_DELAY;
800d7b4: f04f 33ff mov.w r3, #4294967295
800d7b8: 60fb str r3, [r7, #12]
800d7ba: e009 b.n 800d7d0 <osMutexWait+0x40>
}
else if (millisec != 0) {
800d7bc: 683b ldr r3, [r7, #0]
800d7be: 2b00 cmp r3, #0
800d7c0: d006 beq.n 800d7d0 <osMutexWait+0x40>
ticks = millisec / portTICK_PERIOD_MS;
800d7c2: 683b ldr r3, [r7, #0]
800d7c4: 60fb str r3, [r7, #12]
if (ticks == 0) {
800d7c6: 68fb ldr r3, [r7, #12]
800d7c8: 2b00 cmp r3, #0
800d7ca: d101 bne.n 800d7d0 <osMutexWait+0x40>
ticks = 1;
800d7cc: 2301 movs r3, #1
800d7ce: 60fb str r3, [r7, #12]
}
}
if (inHandlerMode()) {
800d7d0: f7ff ff3c bl 800d64c <inHandlerMode>
800d7d4: 4603 mov r3, r0
800d7d6: 2b00 cmp r3, #0
800d7d8: d017 beq.n 800d80a <osMutexWait+0x7a>
if (xSemaphoreTakeFromISR(mutex_id, &taskWoken) != pdTRUE) {
800d7da: f107 0308 add.w r3, r7, #8
800d7de: 461a mov r2, r3
800d7e0: 2100 movs r1, #0
800d7e2: 6878 ldr r0, [r7, #4]
800d7e4: f001 f8d2 bl 800e98c <xQueueReceiveFromISR>
800d7e8: 4603 mov r3, r0
800d7ea: 2b01 cmp r3, #1
800d7ec: d001 beq.n 800d7f2 <osMutexWait+0x62>
return osErrorOS;
800d7ee: 23ff movs r3, #255 ; 0xff
800d7f0: e015 b.n 800d81e <osMutexWait+0x8e>
}
portEND_SWITCHING_ISR(taskWoken);
800d7f2: 68bb ldr r3, [r7, #8]
800d7f4: 2b00 cmp r3, #0
800d7f6: d011 beq.n 800d81c <osMutexWait+0x8c>
800d7f8: 4b0b ldr r3, [pc, #44] ; (800d828 <osMutexWait+0x98>)
800d7fa: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d7fe: 601a str r2, [r3, #0]
800d800: f3bf 8f4f dsb sy
800d804: f3bf 8f6f isb sy
800d808: e008 b.n 800d81c <osMutexWait+0x8c>
}
else if (xSemaphoreTake(mutex_id, ticks) != pdTRUE) {
800d80a: 68f9 ldr r1, [r7, #12]
800d80c: 6878 ldr r0, [r7, #4]
800d80e: f000 ffad bl 800e76c <xQueueSemaphoreTake>
800d812: 4603 mov r3, r0
800d814: 2b01 cmp r3, #1
800d816: d001 beq.n 800d81c <osMutexWait+0x8c>
return osErrorOS;
800d818: 23ff movs r3, #255 ; 0xff
800d81a: e000 b.n 800d81e <osMutexWait+0x8e>
}
return osOK;
800d81c: 2300 movs r3, #0
}
800d81e: 4618 mov r0, r3
800d820: 3710 adds r7, #16
800d822: 46bd mov sp, r7
800d824: bd80 pop {r7, pc}
800d826: bf00 nop
800d828: e000ed04 .word 0xe000ed04
0800d82c <osMutexRelease>:
* @param mutex_id mutex ID obtained by \ref osMutexCreate.
* @retval status code that indicates the execution status of the function.
* @note MUST REMAIN UNCHANGED: \b osMutexRelease shall be consistent in every CMSIS-RTOS.
*/
osStatus osMutexRelease (osMutexId mutex_id)
{
800d82c: b580 push {r7, lr}
800d82e: b084 sub sp, #16
800d830: af00 add r7, sp, #0
800d832: 6078 str r0, [r7, #4]
osStatus result = osOK;
800d834: 2300 movs r3, #0
800d836: 60fb str r3, [r7, #12]
portBASE_TYPE taskWoken = pdFALSE;
800d838: 2300 movs r3, #0
800d83a: 60bb str r3, [r7, #8]
if (inHandlerMode()) {
800d83c: f7ff ff06 bl 800d64c <inHandlerMode>
800d840: 4603 mov r3, r0
800d842: 2b00 cmp r3, #0
800d844: d016 beq.n 800d874 <osMutexRelease+0x48>
if (xSemaphoreGiveFromISR(mutex_id, &taskWoken) != pdTRUE) {
800d846: f107 0308 add.w r3, r7, #8
800d84a: 4619 mov r1, r3
800d84c: 6878 ldr r0, [r7, #4]
800d84e: f000 fe19 bl 800e484 <xQueueGiveFromISR>
800d852: 4603 mov r3, r0
800d854: 2b01 cmp r3, #1
800d856: d001 beq.n 800d85c <osMutexRelease+0x30>
return osErrorOS;
800d858: 23ff movs r3, #255 ; 0xff
800d85a: e017 b.n 800d88c <osMutexRelease+0x60>
}
portEND_SWITCHING_ISR(taskWoken);
800d85c: 68bb ldr r3, [r7, #8]
800d85e: 2b00 cmp r3, #0
800d860: d013 beq.n 800d88a <osMutexRelease+0x5e>
800d862: 4b0c ldr r3, [pc, #48] ; (800d894 <osMutexRelease+0x68>)
800d864: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d868: 601a str r2, [r3, #0]
800d86a: f3bf 8f4f dsb sy
800d86e: f3bf 8f6f isb sy
800d872: e00a b.n 800d88a <osMutexRelease+0x5e>
}
else if (xSemaphoreGive(mutex_id) != pdTRUE)
800d874: 2300 movs r3, #0
800d876: 2200 movs r2, #0
800d878: 2100 movs r1, #0
800d87a: 6878 ldr r0, [r7, #4]
800d87c: f000 fc64 bl 800e148 <xQueueGenericSend>
800d880: 4603 mov r3, r0
800d882: 2b01 cmp r3, #1
800d884: d001 beq.n 800d88a <osMutexRelease+0x5e>
{
result = osErrorOS;
800d886: 23ff movs r3, #255 ; 0xff
800d888: 60fb str r3, [r7, #12]
}
return result;
800d88a: 68fb ldr r3, [r7, #12]
}
800d88c: 4618 mov r0, r3
800d88e: 3710 adds r7, #16
800d890: 46bd mov sp, r7
800d892: bd80 pop {r7, pc}
800d894: e000ed04 .word 0xe000ed04
0800d898 <osSemaphoreCreate>:
* @param count number of available resources.
* @retval semaphore ID for reference by other functions or NULL in case of error.
* @note MUST REMAIN UNCHANGED: \b osSemaphoreCreate shall be consistent in every CMSIS-RTOS.
*/
osSemaphoreId osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count)
{
800d898: b580 push {r7, lr}
800d89a: b086 sub sp, #24
800d89c: af02 add r7, sp, #8
800d89e: 6078 str r0, [r7, #4]
800d8a0: 6039 str r1, [r7, #0]
#if( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
osSemaphoreId sema;
if (semaphore_def->controlblock != NULL){
800d8a2: 687b ldr r3, [r7, #4]
800d8a4: 685b ldr r3, [r3, #4]
800d8a6: 2b00 cmp r3, #0
800d8a8: d017 beq.n 800d8da <osSemaphoreCreate+0x42>
if (count == 1) {
800d8aa: 683b ldr r3, [r7, #0]
800d8ac: 2b01 cmp r3, #1
800d8ae: d10b bne.n 800d8c8 <osSemaphoreCreate+0x30>
return xSemaphoreCreateBinaryStatic( semaphore_def->controlblock );
800d8b0: 687b ldr r3, [r7, #4]
800d8b2: 685a ldr r2, [r3, #4]
800d8b4: 2303 movs r3, #3
800d8b6: 9300 str r3, [sp, #0]
800d8b8: 4613 mov r3, r2
800d8ba: 2200 movs r2, #0
800d8bc: 2100 movs r1, #0
800d8be: 2001 movs r0, #1
800d8c0: f000 faaa bl 800de18 <xQueueGenericCreateStatic>
800d8c4: 4603 mov r3, r0
800d8c6: e023 b.n 800d910 <osSemaphoreCreate+0x78>
}
else {
#if (configUSE_COUNTING_SEMAPHORES == 1 )
return xSemaphoreCreateCountingStatic( count, count, semaphore_def->controlblock );
800d8c8: 6838 ldr r0, [r7, #0]
800d8ca: 6839 ldr r1, [r7, #0]
800d8cc: 687b ldr r3, [r7, #4]
800d8ce: 685b ldr r3, [r3, #4]
800d8d0: 461a mov r2, r3
800d8d2: f000 fbcb bl 800e06c <xQueueCreateCountingSemaphoreStatic>
800d8d6: 4603 mov r3, r0
800d8d8: e01a b.n 800d910 <osSemaphoreCreate+0x78>
return NULL;
#endif
}
}
else {
if (count == 1) {
800d8da: 683b ldr r3, [r7, #0]
800d8dc: 2b01 cmp r3, #1
800d8de: d110 bne.n 800d902 <osSemaphoreCreate+0x6a>
vSemaphoreCreateBinary(sema);
800d8e0: 2203 movs r2, #3
800d8e2: 2100 movs r1, #0
800d8e4: 2001 movs r0, #1
800d8e6: f000 fb14 bl 800df12 <xQueueGenericCreate>
800d8ea: 60f8 str r0, [r7, #12]
800d8ec: 68fb ldr r3, [r7, #12]
800d8ee: 2b00 cmp r3, #0
800d8f0: d005 beq.n 800d8fe <osSemaphoreCreate+0x66>
800d8f2: 2300 movs r3, #0
800d8f4: 2200 movs r2, #0
800d8f6: 2100 movs r1, #0
800d8f8: 68f8 ldr r0, [r7, #12]
800d8fa: f000 fc25 bl 800e148 <xQueueGenericSend>
return sema;
800d8fe: 68fb ldr r3, [r7, #12]
800d900: e006 b.n 800d910 <osSemaphoreCreate+0x78>
}
else {
#if (configUSE_COUNTING_SEMAPHORES == 1 )
return xSemaphoreCreateCounting(count, count);
800d902: 683b ldr r3, [r7, #0]
800d904: 683a ldr r2, [r7, #0]
800d906: 4611 mov r1, r2
800d908: 4618 mov r0, r3
800d90a: f000 fbe8 bl 800e0de <xQueueCreateCountingSemaphore>
800d90e: 4603 mov r3, r0
#else
return NULL;
#endif
}
#endif
}
800d910: 4618 mov r0, r3
800d912: 3710 adds r7, #16
800d914: 46bd mov sp, r7
800d916: bd80 pop {r7, pc}
0800d918 <osSemaphoreWait>:
* @param millisec timeout value or 0 in case of no time-out.
* @retval number of available tokens, or -1 in case of incorrect parameters.
* @note MUST REMAIN UNCHANGED: \b osSemaphoreWait shall be consistent in every CMSIS-RTOS.
*/
int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t millisec)
{
800d918: b580 push {r7, lr}
800d91a: b084 sub sp, #16
800d91c: af00 add r7, sp, #0
800d91e: 6078 str r0, [r7, #4]
800d920: 6039 str r1, [r7, #0]
TickType_t ticks;
portBASE_TYPE taskWoken = pdFALSE;
800d922: 2300 movs r3, #0
800d924: 60bb str r3, [r7, #8]
if (semaphore_id == NULL) {
800d926: 687b ldr r3, [r7, #4]
800d928: 2b00 cmp r3, #0
800d92a: d101 bne.n 800d930 <osSemaphoreWait+0x18>
return osErrorParameter;
800d92c: 2380 movs r3, #128 ; 0x80
800d92e: e03a b.n 800d9a6 <osSemaphoreWait+0x8e>
}
ticks = 0;
800d930: 2300 movs r3, #0
800d932: 60fb str r3, [r7, #12]
if (millisec == osWaitForever) {
800d934: 683b ldr r3, [r7, #0]
800d936: f1b3 3fff cmp.w r3, #4294967295
800d93a: d103 bne.n 800d944 <osSemaphoreWait+0x2c>
ticks = portMAX_DELAY;
800d93c: f04f 33ff mov.w r3, #4294967295
800d940: 60fb str r3, [r7, #12]
800d942: e009 b.n 800d958 <osSemaphoreWait+0x40>
}
else if (millisec != 0) {
800d944: 683b ldr r3, [r7, #0]
800d946: 2b00 cmp r3, #0
800d948: d006 beq.n 800d958 <osSemaphoreWait+0x40>
ticks = millisec / portTICK_PERIOD_MS;
800d94a: 683b ldr r3, [r7, #0]
800d94c: 60fb str r3, [r7, #12]
if (ticks == 0) {
800d94e: 68fb ldr r3, [r7, #12]
800d950: 2b00 cmp r3, #0
800d952: d101 bne.n 800d958 <osSemaphoreWait+0x40>
ticks = 1;
800d954: 2301 movs r3, #1
800d956: 60fb str r3, [r7, #12]
}
}
if (inHandlerMode()) {
800d958: f7ff fe78 bl 800d64c <inHandlerMode>
800d95c: 4603 mov r3, r0
800d95e: 2b00 cmp r3, #0
800d960: d017 beq.n 800d992 <osSemaphoreWait+0x7a>
if (xSemaphoreTakeFromISR(semaphore_id, &taskWoken) != pdTRUE) {
800d962: f107 0308 add.w r3, r7, #8
800d966: 461a mov r2, r3
800d968: 2100 movs r1, #0
800d96a: 6878 ldr r0, [r7, #4]
800d96c: f001 f80e bl 800e98c <xQueueReceiveFromISR>
800d970: 4603 mov r3, r0
800d972: 2b01 cmp r3, #1
800d974: d001 beq.n 800d97a <osSemaphoreWait+0x62>
return osErrorOS;
800d976: 23ff movs r3, #255 ; 0xff
800d978: e015 b.n 800d9a6 <osSemaphoreWait+0x8e>
}
portEND_SWITCHING_ISR(taskWoken);
800d97a: 68bb ldr r3, [r7, #8]
800d97c: 2b00 cmp r3, #0
800d97e: d011 beq.n 800d9a4 <osSemaphoreWait+0x8c>
800d980: 4b0b ldr r3, [pc, #44] ; (800d9b0 <osSemaphoreWait+0x98>)
800d982: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d986: 601a str r2, [r3, #0]
800d988: f3bf 8f4f dsb sy
800d98c: f3bf 8f6f isb sy
800d990: e008 b.n 800d9a4 <osSemaphoreWait+0x8c>
}
else if (xSemaphoreTake(semaphore_id, ticks) != pdTRUE) {
800d992: 68f9 ldr r1, [r7, #12]
800d994: 6878 ldr r0, [r7, #4]
800d996: f000 fee9 bl 800e76c <xQueueSemaphoreTake>
800d99a: 4603 mov r3, r0
800d99c: 2b01 cmp r3, #1
800d99e: d001 beq.n 800d9a4 <osSemaphoreWait+0x8c>
return osErrorOS;
800d9a0: 23ff movs r3, #255 ; 0xff
800d9a2: e000 b.n 800d9a6 <osSemaphoreWait+0x8e>
}
return osOK;
800d9a4: 2300 movs r3, #0
}
800d9a6: 4618 mov r0, r3
800d9a8: 3710 adds r7, #16
800d9aa: 46bd mov sp, r7
800d9ac: bd80 pop {r7, pc}
800d9ae: bf00 nop
800d9b0: e000ed04 .word 0xe000ed04
0800d9b4 <osSemaphoreRelease>:
* @param semaphore_id semaphore object referenced with \ref osSemaphore.
* @retval status code that indicates the execution status of the function.
* @note MUST REMAIN UNCHANGED: \b osSemaphoreRelease shall be consistent in every CMSIS-RTOS.
*/
osStatus osSemaphoreRelease (osSemaphoreId semaphore_id)
{
800d9b4: b580 push {r7, lr}
800d9b6: b084 sub sp, #16
800d9b8: af00 add r7, sp, #0
800d9ba: 6078 str r0, [r7, #4]
osStatus result = osOK;
800d9bc: 2300 movs r3, #0
800d9be: 60fb str r3, [r7, #12]
portBASE_TYPE taskWoken = pdFALSE;
800d9c0: 2300 movs r3, #0
800d9c2: 60bb str r3, [r7, #8]
if (inHandlerMode()) {
800d9c4: f7ff fe42 bl 800d64c <inHandlerMode>
800d9c8: 4603 mov r3, r0
800d9ca: 2b00 cmp r3, #0
800d9cc: d016 beq.n 800d9fc <osSemaphoreRelease+0x48>
if (xSemaphoreGiveFromISR(semaphore_id, &taskWoken) != pdTRUE) {
800d9ce: f107 0308 add.w r3, r7, #8
800d9d2: 4619 mov r1, r3
800d9d4: 6878 ldr r0, [r7, #4]
800d9d6: f000 fd55 bl 800e484 <xQueueGiveFromISR>
800d9da: 4603 mov r3, r0
800d9dc: 2b01 cmp r3, #1
800d9de: d001 beq.n 800d9e4 <osSemaphoreRelease+0x30>
return osErrorOS;
800d9e0: 23ff movs r3, #255 ; 0xff
800d9e2: e017 b.n 800da14 <osSemaphoreRelease+0x60>
}
portEND_SWITCHING_ISR(taskWoken);
800d9e4: 68bb ldr r3, [r7, #8]
800d9e6: 2b00 cmp r3, #0
800d9e8: d013 beq.n 800da12 <osSemaphoreRelease+0x5e>
800d9ea: 4b0c ldr r3, [pc, #48] ; (800da1c <osSemaphoreRelease+0x68>)
800d9ec: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d9f0: 601a str r2, [r3, #0]
800d9f2: f3bf 8f4f dsb sy
800d9f6: f3bf 8f6f isb sy
800d9fa: e00a b.n 800da12 <osSemaphoreRelease+0x5e>
}
else {
if (xSemaphoreGive(semaphore_id) != pdTRUE) {
800d9fc: 2300 movs r3, #0
800d9fe: 2200 movs r2, #0
800da00: 2100 movs r1, #0
800da02: 6878 ldr r0, [r7, #4]
800da04: f000 fba0 bl 800e148 <xQueueGenericSend>
800da08: 4603 mov r3, r0
800da0a: 2b01 cmp r3, #1
800da0c: d001 beq.n 800da12 <osSemaphoreRelease+0x5e>
result = osErrorOS;
800da0e: 23ff movs r3, #255 ; 0xff
800da10: 60fb str r3, [r7, #12]
}
}
return result;
800da12: 68fb ldr r3, [r7, #12]
}
800da14: 4618 mov r0, r3
800da16: 3710 adds r7, #16
800da18: 46bd mov sp, r7
800da1a: bd80 pop {r7, pc}
800da1c: e000ed04 .word 0xe000ed04
0800da20 <osMessageCreate>:
* @param thread_id thread ID (obtained by \ref osThreadCreate or \ref osThreadGetId) or NULL.
* @retval message queue ID for reference by other functions or NULL in case of error.
* @note MUST REMAIN UNCHANGED: \b osMessageCreate shall be consistent in every CMSIS-RTOS.
*/
osMessageQId osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id)
{
800da20: b590 push {r4, r7, lr}
800da22: b085 sub sp, #20
800da24: af02 add r7, sp, #8
800da26: 6078 str r0, [r7, #4]
800da28: 6039 str r1, [r7, #0]
(void) thread_id;
#if( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
if ((queue_def->buffer != NULL) && (queue_def->controlblock != NULL)) {
800da2a: 687b ldr r3, [r7, #4]
800da2c: 689b ldr r3, [r3, #8]
800da2e: 2b00 cmp r3, #0
800da30: d012 beq.n 800da58 <osMessageCreate+0x38>
800da32: 687b ldr r3, [r7, #4]
800da34: 68db ldr r3, [r3, #12]
800da36: 2b00 cmp r3, #0
800da38: d00e beq.n 800da58 <osMessageCreate+0x38>
return xQueueCreateStatic(queue_def->queue_sz, queue_def->item_sz, queue_def->buffer, queue_def->controlblock);
800da3a: 687b ldr r3, [r7, #4]
800da3c: 6818 ldr r0, [r3, #0]
800da3e: 687b ldr r3, [r7, #4]
800da40: 6859 ldr r1, [r3, #4]
800da42: 687b ldr r3, [r7, #4]
800da44: 689a ldr r2, [r3, #8]
800da46: 687b ldr r3, [r7, #4]
800da48: 68dc ldr r4, [r3, #12]
800da4a: 2300 movs r3, #0
800da4c: 9300 str r3, [sp, #0]
800da4e: 4623 mov r3, r4
800da50: f000 f9e2 bl 800de18 <xQueueGenericCreateStatic>
800da54: 4603 mov r3, r0
800da56: e008 b.n 800da6a <osMessageCreate+0x4a>
}
else {
return xQueueCreate(queue_def->queue_sz, queue_def->item_sz);
800da58: 687b ldr r3, [r7, #4]
800da5a: 6818 ldr r0, [r3, #0]
800da5c: 687b ldr r3, [r7, #4]
800da5e: 685b ldr r3, [r3, #4]
800da60: 2200 movs r2, #0
800da62: 4619 mov r1, r3
800da64: f000 fa55 bl 800df12 <xQueueGenericCreate>
800da68: 4603 mov r3, r0
#elif ( configSUPPORT_STATIC_ALLOCATION == 1 )
return xQueueCreateStatic(queue_def->queue_sz, queue_def->item_sz, queue_def->buffer, queue_def->controlblock);
#else
return xQueueCreate(queue_def->queue_sz, queue_def->item_sz);
#endif
}
800da6a: 4618 mov r0, r3
800da6c: 370c adds r7, #12
800da6e: 46bd mov sp, r7
800da70: bd90 pop {r4, r7, pc}
...
0800da74 <osMessagePut>:
* @param millisec timeout value or 0 in case of no time-out.
* @retval status code that indicates the execution status of the function.
* @note MUST REMAIN UNCHANGED: \b osMessagePut shall be consistent in every CMSIS-RTOS.
*/
osStatus osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t millisec)
{
800da74: b580 push {r7, lr}
800da76: b086 sub sp, #24
800da78: af00 add r7, sp, #0
800da7a: 60f8 str r0, [r7, #12]
800da7c: 60b9 str r1, [r7, #8]
800da7e: 607a str r2, [r7, #4]
portBASE_TYPE taskWoken = pdFALSE;
800da80: 2300 movs r3, #0
800da82: 613b str r3, [r7, #16]
TickType_t ticks;
ticks = millisec / portTICK_PERIOD_MS;
800da84: 687b ldr r3, [r7, #4]
800da86: 617b str r3, [r7, #20]
if (ticks == 0) {
800da88: 697b ldr r3, [r7, #20]
800da8a: 2b00 cmp r3, #0
800da8c: d101 bne.n 800da92 <osMessagePut+0x1e>
ticks = 1;
800da8e: 2301 movs r3, #1
800da90: 617b str r3, [r7, #20]
}
if (inHandlerMode()) {
800da92: f7ff fddb bl 800d64c <inHandlerMode>
800da96: 4603 mov r3, r0
800da98: 2b00 cmp r3, #0
800da9a: d018 beq.n 800dace <osMessagePut+0x5a>
if (xQueueSendFromISR(queue_id, &info, &taskWoken) != pdTRUE) {
800da9c: f107 0210 add.w r2, r7, #16
800daa0: f107 0108 add.w r1, r7, #8
800daa4: 2300 movs r3, #0
800daa6: 68f8 ldr r0, [r7, #12]
800daa8: f000 fc50 bl 800e34c <xQueueGenericSendFromISR>
800daac: 4603 mov r3, r0
800daae: 2b01 cmp r3, #1
800dab0: d001 beq.n 800dab6 <osMessagePut+0x42>
return osErrorOS;
800dab2: 23ff movs r3, #255 ; 0xff
800dab4: e018 b.n 800dae8 <osMessagePut+0x74>
}
portEND_SWITCHING_ISR(taskWoken);
800dab6: 693b ldr r3, [r7, #16]
800dab8: 2b00 cmp r3, #0
800daba: d014 beq.n 800dae6 <osMessagePut+0x72>
800dabc: 4b0c ldr r3, [pc, #48] ; (800daf0 <osMessagePut+0x7c>)
800dabe: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800dac2: 601a str r2, [r3, #0]
800dac4: f3bf 8f4f dsb sy
800dac8: f3bf 8f6f isb sy
800dacc: e00b b.n 800dae6 <osMessagePut+0x72>
}
else {
if (xQueueSend(queue_id, &info, ticks) != pdTRUE) {
800dace: f107 0108 add.w r1, r7, #8
800dad2: 2300 movs r3, #0
800dad4: 697a ldr r2, [r7, #20]
800dad6: 68f8 ldr r0, [r7, #12]
800dad8: f000 fb36 bl 800e148 <xQueueGenericSend>
800dadc: 4603 mov r3, r0
800dade: 2b01 cmp r3, #1
800dae0: d001 beq.n 800dae6 <osMessagePut+0x72>
return osErrorOS;
800dae2: 23ff movs r3, #255 ; 0xff
800dae4: e000 b.n 800dae8 <osMessagePut+0x74>
}
}
return osOK;
800dae6: 2300 movs r3, #0
}
800dae8: 4618 mov r0, r3
800daea: 3718 adds r7, #24
800daec: 46bd mov sp, r7
800daee: bd80 pop {r7, pc}
800daf0: e000ed04 .word 0xe000ed04
0800daf4 <osMessageGet>:
* @param millisec timeout value or 0 in case of no time-out.
* @retval event information that includes status code.
* @note MUST REMAIN UNCHANGED: \b osMessageGet shall be consistent in every CMSIS-RTOS.
*/
osEvent osMessageGet (osMessageQId queue_id, uint32_t millisec)
{
800daf4: b590 push {r4, r7, lr}
800daf6: b08b sub sp, #44 ; 0x2c
800daf8: af00 add r7, sp, #0
800dafa: 60f8 str r0, [r7, #12]
800dafc: 60b9 str r1, [r7, #8]
800dafe: 607a str r2, [r7, #4]
portBASE_TYPE taskWoken;
TickType_t ticks;
osEvent event;
event.def.message_id = queue_id;
800db00: 68bb ldr r3, [r7, #8]
800db02: 61fb str r3, [r7, #28]
event.value.v = 0;
800db04: 2300 movs r3, #0
800db06: 61bb str r3, [r7, #24]
if (queue_id == NULL) {
800db08: 68bb ldr r3, [r7, #8]
800db0a: 2b00 cmp r3, #0
800db0c: d10a bne.n 800db24 <osMessageGet+0x30>
event.status = osErrorParameter;
800db0e: 2380 movs r3, #128 ; 0x80
800db10: 617b str r3, [r7, #20]
return event;
800db12: 68fb ldr r3, [r7, #12]
800db14: 461c mov r4, r3
800db16: f107 0314 add.w r3, r7, #20
800db1a: e893 0007 ldmia.w r3, {r0, r1, r2}
800db1e: e884 0007 stmia.w r4, {r0, r1, r2}
800db22: e054 b.n 800dbce <osMessageGet+0xda>
}
taskWoken = pdFALSE;
800db24: 2300 movs r3, #0
800db26: 623b str r3, [r7, #32]
ticks = 0;
800db28: 2300 movs r3, #0
800db2a: 627b str r3, [r7, #36] ; 0x24
if (millisec == osWaitForever) {
800db2c: 687b ldr r3, [r7, #4]
800db2e: f1b3 3fff cmp.w r3, #4294967295
800db32: d103 bne.n 800db3c <osMessageGet+0x48>
ticks = portMAX_DELAY;
800db34: f04f 33ff mov.w r3, #4294967295
800db38: 627b str r3, [r7, #36] ; 0x24
800db3a: e009 b.n 800db50 <osMessageGet+0x5c>
}
else if (millisec != 0) {
800db3c: 687b ldr r3, [r7, #4]
800db3e: 2b00 cmp r3, #0
800db40: d006 beq.n 800db50 <osMessageGet+0x5c>
ticks = millisec / portTICK_PERIOD_MS;
800db42: 687b ldr r3, [r7, #4]
800db44: 627b str r3, [r7, #36] ; 0x24
if (ticks == 0) {
800db46: 6a7b ldr r3, [r7, #36] ; 0x24
800db48: 2b00 cmp r3, #0
800db4a: d101 bne.n 800db50 <osMessageGet+0x5c>
ticks = 1;
800db4c: 2301 movs r3, #1
800db4e: 627b str r3, [r7, #36] ; 0x24
}
}
if (inHandlerMode()) {
800db50: f7ff fd7c bl 800d64c <inHandlerMode>
800db54: 4603 mov r3, r0
800db56: 2b00 cmp r3, #0
800db58: d01c beq.n 800db94 <osMessageGet+0xa0>
if (xQueueReceiveFromISR(queue_id, &event.value.v, &taskWoken) == pdTRUE) {
800db5a: f107 0220 add.w r2, r7, #32
800db5e: f107 0314 add.w r3, r7, #20
800db62: 3304 adds r3, #4
800db64: 4619 mov r1, r3
800db66: 68b8 ldr r0, [r7, #8]
800db68: f000 ff10 bl 800e98c <xQueueReceiveFromISR>
800db6c: 4603 mov r3, r0
800db6e: 2b01 cmp r3, #1
800db70: d102 bne.n 800db78 <osMessageGet+0x84>
/* We have mail */
event.status = osEventMessage;
800db72: 2310 movs r3, #16
800db74: 617b str r3, [r7, #20]
800db76: e001 b.n 800db7c <osMessageGet+0x88>
}
else {
event.status = osOK;
800db78: 2300 movs r3, #0
800db7a: 617b str r3, [r7, #20]
}
portEND_SWITCHING_ISR(taskWoken);
800db7c: 6a3b ldr r3, [r7, #32]
800db7e: 2b00 cmp r3, #0
800db80: d01d beq.n 800dbbe <osMessageGet+0xca>
800db82: 4b15 ldr r3, [pc, #84] ; (800dbd8 <osMessageGet+0xe4>)
800db84: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800db88: 601a str r2, [r3, #0]
800db8a: f3bf 8f4f dsb sy
800db8e: f3bf 8f6f isb sy
800db92: e014 b.n 800dbbe <osMessageGet+0xca>
}
else {
if (xQueueReceive(queue_id, &event.value.v, ticks) == pdTRUE) {
800db94: f107 0314 add.w r3, r7, #20
800db98: 3304 adds r3, #4
800db9a: 6a7a ldr r2, [r7, #36] ; 0x24
800db9c: 4619 mov r1, r3
800db9e: 68b8 ldr r0, [r7, #8]
800dba0: f000 fd02 bl 800e5a8 <xQueueReceive>
800dba4: 4603 mov r3, r0
800dba6: 2b01 cmp r3, #1
800dba8: d102 bne.n 800dbb0 <osMessageGet+0xbc>
/* We have mail */
event.status = osEventMessage;
800dbaa: 2310 movs r3, #16
800dbac: 617b str r3, [r7, #20]
800dbae: e006 b.n 800dbbe <osMessageGet+0xca>
}
else {
event.status = (ticks == 0) ? osOK : osEventTimeout;
800dbb0: 6a7b ldr r3, [r7, #36] ; 0x24
800dbb2: 2b00 cmp r3, #0
800dbb4: d101 bne.n 800dbba <osMessageGet+0xc6>
800dbb6: 2300 movs r3, #0
800dbb8: e000 b.n 800dbbc <osMessageGet+0xc8>
800dbba: 2340 movs r3, #64 ; 0x40
800dbbc: 617b str r3, [r7, #20]
}
}
return event;
800dbbe: 68fb ldr r3, [r7, #12]
800dbc0: 461c mov r4, r3
800dbc2: f107 0314 add.w r3, r7, #20
800dbc6: e893 0007 ldmia.w r3, {r0, r1, r2}
800dbca: e884 0007 stmia.w r4, {r0, r1, r2}
}
800dbce: 68f8 ldr r0, [r7, #12]
800dbd0: 372c adds r7, #44 ; 0x2c
800dbd2: 46bd mov sp, r7
800dbd4: bd90 pop {r4, r7, pc}
800dbd6: bf00 nop
800dbd8: e000ed04 .word 0xe000ed04
0800dbdc <vListInitialise>:
/*-----------------------------------------------------------
* PUBLIC LIST API documented in list.h
*----------------------------------------------------------*/
void vListInitialise( List_t * const pxList )
{
800dbdc: b480 push {r7}
800dbde: b083 sub sp, #12
800dbe0: af00 add r7, sp, #0
800dbe2: 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. */
800dbe4: 687b ldr r3, [r7, #4]
800dbe6: f103 0208 add.w r2, r3, #8
800dbea: 687b ldr r3, [r7, #4]
800dbec: 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;
800dbee: 687b ldr r3, [r7, #4]
800dbf0: f04f 32ff mov.w r2, #4294967295
800dbf4: 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. */
800dbf6: 687b ldr r3, [r7, #4]
800dbf8: f103 0208 add.w r2, r3, #8
800dbfc: 687b ldr r3, [r7, #4]
800dbfe: 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. */
800dc00: 687b ldr r3, [r7, #4]
800dc02: f103 0208 add.w r2, r3, #8
800dc06: 687b ldr r3, [r7, #4]
800dc08: 611a str r2, [r3, #16]
pxList->uxNumberOfItems = ( UBaseType_t ) 0U;
800dc0a: 687b ldr r3, [r7, #4]
800dc0c: 2200 movs r2, #0
800dc0e: 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 );
}
800dc10: bf00 nop
800dc12: 370c adds r7, #12
800dc14: 46bd mov sp, r7
800dc16: f85d 7b04 ldr.w r7, [sp], #4
800dc1a: 4770 bx lr
0800dc1c <vListInitialiseItem>:
/*-----------------------------------------------------------*/
void vListInitialiseItem( ListItem_t * const pxItem )
{
800dc1c: b480 push {r7}
800dc1e: b083 sub sp, #12
800dc20: af00 add r7, sp, #0
800dc22: 6078 str r0, [r7, #4]
/* Make sure the list item is not recorded as being on a list. */
pxItem->pxContainer = NULL;
800dc24: 687b ldr r3, [r7, #4]
800dc26: 2200 movs r2, #0
800dc28: 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 );
}
800dc2a: bf00 nop
800dc2c: 370c adds r7, #12
800dc2e: 46bd mov sp, r7
800dc30: f85d 7b04 ldr.w r7, [sp], #4
800dc34: 4770 bx lr
0800dc36 <vListInsertEnd>:
/*-----------------------------------------------------------*/
void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
{
800dc36: b480 push {r7}
800dc38: b085 sub sp, #20
800dc3a: af00 add r7, sp, #0
800dc3c: 6078 str r0, [r7, #4]
800dc3e: 6039 str r1, [r7, #0]
ListItem_t * const pxIndex = pxList->pxIndex;
800dc40: 687b ldr r3, [r7, #4]
800dc42: 685b ldr r3, [r3, #4]
800dc44: 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;
800dc46: 683b ldr r3, [r7, #0]
800dc48: 68fa ldr r2, [r7, #12]
800dc4a: 605a str r2, [r3, #4]
pxNewListItem->pxPrevious = pxIndex->pxPrevious;
800dc4c: 68fb ldr r3, [r7, #12]
800dc4e: 689a ldr r2, [r3, #8]
800dc50: 683b ldr r3, [r7, #0]
800dc52: 609a str r2, [r3, #8]
/* Only used during decision coverage testing. */
mtCOVERAGE_TEST_DELAY();
pxIndex->pxPrevious->pxNext = pxNewListItem;
800dc54: 68fb ldr r3, [r7, #12]
800dc56: 689b ldr r3, [r3, #8]
800dc58: 683a ldr r2, [r7, #0]
800dc5a: 605a str r2, [r3, #4]
pxIndex->pxPrevious = pxNewListItem;
800dc5c: 68fb ldr r3, [r7, #12]
800dc5e: 683a ldr r2, [r7, #0]
800dc60: 609a str r2, [r3, #8]
/* Remember which list the item is in. */
pxNewListItem->pxContainer = pxList;
800dc62: 683b ldr r3, [r7, #0]
800dc64: 687a ldr r2, [r7, #4]
800dc66: 611a str r2, [r3, #16]
( pxList->uxNumberOfItems )++;
800dc68: 687b ldr r3, [r7, #4]
800dc6a: 681b ldr r3, [r3, #0]
800dc6c: 1c5a adds r2, r3, #1
800dc6e: 687b ldr r3, [r7, #4]
800dc70: 601a str r2, [r3, #0]
}
800dc72: bf00 nop
800dc74: 3714 adds r7, #20
800dc76: 46bd mov sp, r7
800dc78: f85d 7b04 ldr.w r7, [sp], #4
800dc7c: 4770 bx lr
0800dc7e <vListInsert>:
/*-----------------------------------------------------------*/
void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem )
{
800dc7e: b480 push {r7}
800dc80: b085 sub sp, #20
800dc82: af00 add r7, sp, #0
800dc84: 6078 str r0, [r7, #4]
800dc86: 6039 str r1, [r7, #0]
ListItem_t *pxIterator;
const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
800dc88: 683b ldr r3, [r7, #0]
800dc8a: 681b ldr r3, [r3, #0]
800dc8c: 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 )
800dc8e: 68bb ldr r3, [r7, #8]
800dc90: f1b3 3fff cmp.w r3, #4294967295
800dc94: d103 bne.n 800dc9e <vListInsert+0x20>
{
pxIterator = pxList->xListEnd.pxPrevious;
800dc96: 687b ldr r3, [r7, #4]
800dc98: 691b ldr r3, [r3, #16]
800dc9a: 60fb str r3, [r7, #12]
800dc9c: e00c b.n 800dcb8 <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. */
800dc9e: 687b ldr r3, [r7, #4]
800dca0: 3308 adds r3, #8
800dca2: 60fb str r3, [r7, #12]
800dca4: e002 b.n 800dcac <vListInsert+0x2e>
800dca6: 68fb ldr r3, [r7, #12]
800dca8: 685b ldr r3, [r3, #4]
800dcaa: 60fb str r3, [r7, #12]
800dcac: 68fb ldr r3, [r7, #12]
800dcae: 685b ldr r3, [r3, #4]
800dcb0: 681b ldr r3, [r3, #0]
800dcb2: 68ba ldr r2, [r7, #8]
800dcb4: 429a cmp r2, r3
800dcb6: d2f6 bcs.n 800dca6 <vListInsert+0x28>
/* There is nothing to do here, just iterating to the wanted
insertion position. */
}
}
pxNewListItem->pxNext = pxIterator->pxNext;
800dcb8: 68fb ldr r3, [r7, #12]
800dcba: 685a ldr r2, [r3, #4]
800dcbc: 683b ldr r3, [r7, #0]
800dcbe: 605a str r2, [r3, #4]
pxNewListItem->pxNext->pxPrevious = pxNewListItem;
800dcc0: 683b ldr r3, [r7, #0]
800dcc2: 685b ldr r3, [r3, #4]
800dcc4: 683a ldr r2, [r7, #0]
800dcc6: 609a str r2, [r3, #8]
pxNewListItem->pxPrevious = pxIterator;
800dcc8: 683b ldr r3, [r7, #0]
800dcca: 68fa ldr r2, [r7, #12]
800dccc: 609a str r2, [r3, #8]
pxIterator->pxNext = pxNewListItem;
800dcce: 68fb ldr r3, [r7, #12]
800dcd0: 683a ldr r2, [r7, #0]
800dcd2: 605a str r2, [r3, #4]
/* Remember which list the item is in. This allows fast removal of the
item later. */
pxNewListItem->pxContainer = pxList;
800dcd4: 683b ldr r3, [r7, #0]
800dcd6: 687a ldr r2, [r7, #4]
800dcd8: 611a str r2, [r3, #16]
( pxList->uxNumberOfItems )++;
800dcda: 687b ldr r3, [r7, #4]
800dcdc: 681b ldr r3, [r3, #0]
800dcde: 1c5a adds r2, r3, #1
800dce0: 687b ldr r3, [r7, #4]
800dce2: 601a str r2, [r3, #0]
}
800dce4: bf00 nop
800dce6: 3714 adds r7, #20
800dce8: 46bd mov sp, r7
800dcea: f85d 7b04 ldr.w r7, [sp], #4
800dcee: 4770 bx lr
0800dcf0 <uxListRemove>:
/*-----------------------------------------------------------*/
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
{
800dcf0: b480 push {r7}
800dcf2: b085 sub sp, #20
800dcf4: af00 add r7, sp, #0
800dcf6: 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;
800dcf8: 687b ldr r3, [r7, #4]
800dcfa: 691b ldr r3, [r3, #16]
800dcfc: 60fb str r3, [r7, #12]
pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
800dcfe: 687b ldr r3, [r7, #4]
800dd00: 685b ldr r3, [r3, #4]
800dd02: 687a ldr r2, [r7, #4]
800dd04: 6892 ldr r2, [r2, #8]
800dd06: 609a str r2, [r3, #8]
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
800dd08: 687b ldr r3, [r7, #4]
800dd0a: 689b ldr r3, [r3, #8]
800dd0c: 687a ldr r2, [r7, #4]
800dd0e: 6852 ldr r2, [r2, #4]
800dd10: 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 )
800dd12: 68fb ldr r3, [r7, #12]
800dd14: 685b ldr r3, [r3, #4]
800dd16: 687a ldr r2, [r7, #4]
800dd18: 429a cmp r2, r3
800dd1a: d103 bne.n 800dd24 <uxListRemove+0x34>
{
pxList->pxIndex = pxItemToRemove->pxPrevious;
800dd1c: 687b ldr r3, [r7, #4]
800dd1e: 689a ldr r2, [r3, #8]
800dd20: 68fb ldr r3, [r7, #12]
800dd22: 605a str r2, [r3, #4]
else
{
mtCOVERAGE_TEST_MARKER();
}
pxItemToRemove->pxContainer = NULL;
800dd24: 687b ldr r3, [r7, #4]
800dd26: 2200 movs r2, #0
800dd28: 611a str r2, [r3, #16]
( pxList->uxNumberOfItems )--;
800dd2a: 68fb ldr r3, [r7, #12]
800dd2c: 681b ldr r3, [r3, #0]
800dd2e: 1e5a subs r2, r3, #1
800dd30: 68fb ldr r3, [r7, #12]
800dd32: 601a str r2, [r3, #0]
return pxList->uxNumberOfItems;
800dd34: 68fb ldr r3, [r7, #12]
800dd36: 681b ldr r3, [r3, #0]
}
800dd38: 4618 mov r0, r3
800dd3a: 3714 adds r7, #20
800dd3c: 46bd mov sp, r7
800dd3e: f85d 7b04 ldr.w r7, [sp], #4
800dd42: 4770 bx lr
0800dd44 <xQueueGenericReset>:
} \
taskEXIT_CRITICAL()
/*-----------------------------------------------------------*/
BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue )
{
800dd44: b580 push {r7, lr}
800dd46: b084 sub sp, #16
800dd48: af00 add r7, sp, #0
800dd4a: 6078 str r0, [r7, #4]
800dd4c: 6039 str r1, [r7, #0]
Queue_t * const pxQueue = xQueue;
800dd4e: 687b ldr r3, [r7, #4]
800dd50: 60fb str r3, [r7, #12]
configASSERT( pxQueue );
800dd52: 68fb ldr r3, [r7, #12]
800dd54: 2b00 cmp r3, #0
800dd56: d10b bne.n 800dd70 <xQueueGenericReset+0x2c>
portFORCE_INLINE static void vPortRaiseBASEPRI( void )
{
uint32_t ulNewBASEPRI;
__asm volatile
800dd58: f04f 0350 mov.w r3, #80 ; 0x50
800dd5c: b672 cpsid i
800dd5e: f383 8811 msr BASEPRI, r3
800dd62: f3bf 8f6f isb sy
800dd66: f3bf 8f4f dsb sy
800dd6a: b662 cpsie i
800dd6c: 60bb str r3, [r7, #8]
800dd6e: e7fe b.n 800dd6e <xQueueGenericReset+0x2a>
taskENTER_CRITICAL();
800dd70: f002 fa3a bl 80101e8 <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. */
800dd74: 68fb ldr r3, [r7, #12]
800dd76: 681a ldr r2, [r3, #0]
800dd78: 68fb ldr r3, [r7, #12]
800dd7a: 6bdb ldr r3, [r3, #60] ; 0x3c
800dd7c: 68f9 ldr r1, [r7, #12]
800dd7e: 6c09 ldr r1, [r1, #64] ; 0x40
800dd80: fb01 f303 mul.w r3, r1, r3
800dd84: 441a add r2, r3
800dd86: 68fb ldr r3, [r7, #12]
800dd88: 609a str r2, [r3, #8]
pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U;
800dd8a: 68fb ldr r3, [r7, #12]
800dd8c: 2200 movs r2, #0
800dd8e: 639a str r2, [r3, #56] ; 0x38
pxQueue->pcWriteTo = pxQueue->pcHead;
800dd90: 68fb ldr r3, [r7, #12]
800dd92: 681a ldr r2, [r3, #0]
800dd94: 68fb ldr r3, [r7, #12]
800dd96: 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. */
800dd98: 68fb ldr r3, [r7, #12]
800dd9a: 681a ldr r2, [r3, #0]
800dd9c: 68fb ldr r3, [r7, #12]
800dd9e: 6bdb ldr r3, [r3, #60] ; 0x3c
800dda0: 3b01 subs r3, #1
800dda2: 68f9 ldr r1, [r7, #12]
800dda4: 6c09 ldr r1, [r1, #64] ; 0x40
800dda6: fb01 f303 mul.w r3, r1, r3
800ddaa: 441a add r2, r3
800ddac: 68fb ldr r3, [r7, #12]
800ddae: 60da str r2, [r3, #12]
pxQueue->cRxLock = queueUNLOCKED;
800ddb0: 68fb ldr r3, [r7, #12]
800ddb2: 22ff movs r2, #255 ; 0xff
800ddb4: f883 2044 strb.w r2, [r3, #68] ; 0x44
pxQueue->cTxLock = queueUNLOCKED;
800ddb8: 68fb ldr r3, [r7, #12]
800ddba: 22ff movs r2, #255 ; 0xff
800ddbc: f883 2045 strb.w r2, [r3, #69] ; 0x45
if( xNewQueue == pdFALSE )
800ddc0: 683b ldr r3, [r7, #0]
800ddc2: 2b00 cmp r3, #0
800ddc4: d114 bne.n 800ddf0 <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 )
800ddc6: 68fb ldr r3, [r7, #12]
800ddc8: 691b ldr r3, [r3, #16]
800ddca: 2b00 cmp r3, #0
800ddcc: d01a beq.n 800de04 <xQueueGenericReset+0xc0>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800ddce: 68fb ldr r3, [r7, #12]
800ddd0: 3310 adds r3, #16
800ddd2: 4618 mov r0, r3
800ddd4: f001 fd00 bl 800f7d8 <xTaskRemoveFromEventList>
800ddd8: 4603 mov r3, r0
800ddda: 2b00 cmp r3, #0
800dddc: d012 beq.n 800de04 <xQueueGenericReset+0xc0>
{
queueYIELD_IF_USING_PREEMPTION();
800ddde: 4b0d ldr r3, [pc, #52] ; (800de14 <xQueueGenericReset+0xd0>)
800dde0: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800dde4: 601a str r2, [r3, #0]
800dde6: f3bf 8f4f dsb sy
800ddea: f3bf 8f6f isb sy
800ddee: e009 b.n 800de04 <xQueueGenericReset+0xc0>
}
}
else
{
/* Ensure the event queues start in the correct state. */
vListInitialise( &( pxQueue->xTasksWaitingToSend ) );
800ddf0: 68fb ldr r3, [r7, #12]
800ddf2: 3310 adds r3, #16
800ddf4: 4618 mov r0, r3
800ddf6: f7ff fef1 bl 800dbdc <vListInitialise>
vListInitialise( &( pxQueue->xTasksWaitingToReceive ) );
800ddfa: 68fb ldr r3, [r7, #12]
800ddfc: 3324 adds r3, #36 ; 0x24
800ddfe: 4618 mov r0, r3
800de00: f7ff feec bl 800dbdc <vListInitialise>
}
}
taskEXIT_CRITICAL();
800de04: f002 fa22 bl 801024c <vPortExitCritical>
/* A value is returned for calling semantic consistency with previous
versions. */
return pdPASS;
800de08: 2301 movs r3, #1
}
800de0a: 4618 mov r0, r3
800de0c: 3710 adds r7, #16
800de0e: 46bd mov sp, r7
800de10: bd80 pop {r7, pc}
800de12: bf00 nop
800de14: e000ed04 .word 0xe000ed04
0800de18 <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 )
{
800de18: b580 push {r7, lr}
800de1a: b08e sub sp, #56 ; 0x38
800de1c: af02 add r7, sp, #8
800de1e: 60f8 str r0, [r7, #12]
800de20: 60b9 str r1, [r7, #8]
800de22: 607a str r2, [r7, #4]
800de24: 603b str r3, [r7, #0]
Queue_t *pxNewQueue;
configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
800de26: 68fb ldr r3, [r7, #12]
800de28: 2b00 cmp r3, #0
800de2a: d10b bne.n 800de44 <xQueueGenericCreateStatic+0x2c>
800de2c: f04f 0350 mov.w r3, #80 ; 0x50
800de30: b672 cpsid i
800de32: f383 8811 msr BASEPRI, r3
800de36: f3bf 8f6f isb sy
800de3a: f3bf 8f4f dsb sy
800de3e: b662 cpsie i
800de40: 62bb str r3, [r7, #40] ; 0x28
800de42: e7fe b.n 800de42 <xQueueGenericCreateStatic+0x2a>
/* The StaticQueue_t structure and the queue storage area must be
supplied. */
configASSERT( pxStaticQueue != NULL );
800de44: 683b ldr r3, [r7, #0]
800de46: 2b00 cmp r3, #0
800de48: d10b bne.n 800de62 <xQueueGenericCreateStatic+0x4a>
800de4a: f04f 0350 mov.w r3, #80 ; 0x50
800de4e: b672 cpsid i
800de50: f383 8811 msr BASEPRI, r3
800de54: f3bf 8f6f isb sy
800de58: f3bf 8f4f dsb sy
800de5c: b662 cpsie i
800de5e: 627b str r3, [r7, #36] ; 0x24
800de60: e7fe b.n 800de60 <xQueueGenericCreateStatic+0x48>
/* 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 ) ) );
800de62: 687b ldr r3, [r7, #4]
800de64: 2b00 cmp r3, #0
800de66: d002 beq.n 800de6e <xQueueGenericCreateStatic+0x56>
800de68: 68bb ldr r3, [r7, #8]
800de6a: 2b00 cmp r3, #0
800de6c: d001 beq.n 800de72 <xQueueGenericCreateStatic+0x5a>
800de6e: 2301 movs r3, #1
800de70: e000 b.n 800de74 <xQueueGenericCreateStatic+0x5c>
800de72: 2300 movs r3, #0
800de74: 2b00 cmp r3, #0
800de76: d10b bne.n 800de90 <xQueueGenericCreateStatic+0x78>
800de78: f04f 0350 mov.w r3, #80 ; 0x50
800de7c: b672 cpsid i
800de7e: f383 8811 msr BASEPRI, r3
800de82: f3bf 8f6f isb sy
800de86: f3bf 8f4f dsb sy
800de8a: b662 cpsie i
800de8c: 623b str r3, [r7, #32]
800de8e: e7fe b.n 800de8e <xQueueGenericCreateStatic+0x76>
configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) );
800de90: 687b ldr r3, [r7, #4]
800de92: 2b00 cmp r3, #0
800de94: d102 bne.n 800de9c <xQueueGenericCreateStatic+0x84>
800de96: 68bb ldr r3, [r7, #8]
800de98: 2b00 cmp r3, #0
800de9a: d101 bne.n 800dea0 <xQueueGenericCreateStatic+0x88>
800de9c: 2301 movs r3, #1
800de9e: e000 b.n 800dea2 <xQueueGenericCreateStatic+0x8a>
800dea0: 2300 movs r3, #0
800dea2: 2b00 cmp r3, #0
800dea4: d10b bne.n 800debe <xQueueGenericCreateStatic+0xa6>
800dea6: f04f 0350 mov.w r3, #80 ; 0x50
800deaa: b672 cpsid i
800deac: f383 8811 msr BASEPRI, r3
800deb0: f3bf 8f6f isb sy
800deb4: f3bf 8f4f dsb sy
800deb8: b662 cpsie i
800deba: 61fb str r3, [r7, #28]
800debc: e7fe b.n 800debc <xQueueGenericCreateStatic+0xa4>
#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 );
800debe: 2348 movs r3, #72 ; 0x48
800dec0: 617b str r3, [r7, #20]
configASSERT( xSize == sizeof( Queue_t ) );
800dec2: 697b ldr r3, [r7, #20]
800dec4: 2b48 cmp r3, #72 ; 0x48
800dec6: d00b beq.n 800dee0 <xQueueGenericCreateStatic+0xc8>
800dec8: f04f 0350 mov.w r3, #80 ; 0x50
800decc: b672 cpsid i
800dece: f383 8811 msr BASEPRI, r3
800ded2: f3bf 8f6f isb sy
800ded6: f3bf 8f4f dsb sy
800deda: b662 cpsie i
800dedc: 61bb str r3, [r7, #24]
800dede: e7fe b.n 800dede <xQueueGenericCreateStatic+0xc6>
( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */
800dee0: 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. */
800dee2: 683b ldr r3, [r7, #0]
800dee4: 62fb str r3, [r7, #44] ; 0x2c
if( pxNewQueue != NULL )
800dee6: 6afb ldr r3, [r7, #44] ; 0x2c
800dee8: 2b00 cmp r3, #0
800deea: d00d beq.n 800df08 <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;
800deec: 6afb ldr r3, [r7, #44] ; 0x2c
800deee: 2201 movs r2, #1
800def0: f883 2046 strb.w r2, [r3, #70] ; 0x46
}
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
800def4: f897 2038 ldrb.w r2, [r7, #56] ; 0x38
800def8: 6afb ldr r3, [r7, #44] ; 0x2c
800defa: 9300 str r3, [sp, #0]
800defc: 4613 mov r3, r2
800defe: 687a ldr r2, [r7, #4]
800df00: 68b9 ldr r1, [r7, #8]
800df02: 68f8 ldr r0, [r7, #12]
800df04: f000 f846 bl 800df94 <prvInitialiseNewQueue>
{
traceQUEUE_CREATE_FAILED( ucQueueType );
mtCOVERAGE_TEST_MARKER();
}
return pxNewQueue;
800df08: 6afb ldr r3, [r7, #44] ; 0x2c
}
800df0a: 4618 mov r0, r3
800df0c: 3730 adds r7, #48 ; 0x30
800df0e: 46bd mov sp, r7
800df10: bd80 pop {r7, pc}
0800df12 <xQueueGenericCreate>:
/*-----------------------------------------------------------*/
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType )
{
800df12: b580 push {r7, lr}
800df14: b08a sub sp, #40 ; 0x28
800df16: af02 add r7, sp, #8
800df18: 60f8 str r0, [r7, #12]
800df1a: 60b9 str r1, [r7, #8]
800df1c: 4613 mov r3, r2
800df1e: 71fb strb r3, [r7, #7]
Queue_t *pxNewQueue;
size_t xQueueSizeInBytes;
uint8_t *pucQueueStorage;
configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
800df20: 68fb ldr r3, [r7, #12]
800df22: 2b00 cmp r3, #0
800df24: d10b bne.n 800df3e <xQueueGenericCreate+0x2c>
800df26: f04f 0350 mov.w r3, #80 ; 0x50
800df2a: b672 cpsid i
800df2c: f383 8811 msr BASEPRI, r3
800df30: f3bf 8f6f isb sy
800df34: f3bf 8f4f dsb sy
800df38: b662 cpsie i
800df3a: 613b str r3, [r7, #16]
800df3c: e7fe b.n 800df3c <xQueueGenericCreate+0x2a>
if( uxItemSize == ( UBaseType_t ) 0 )
800df3e: 68bb ldr r3, [r7, #8]
800df40: 2b00 cmp r3, #0
800df42: d102 bne.n 800df4a <xQueueGenericCreate+0x38>
{
/* There is not going to be a queue storage area. */
xQueueSizeInBytes = ( size_t ) 0;
800df44: 2300 movs r3, #0
800df46: 61fb str r3, [r7, #28]
800df48: e004 b.n 800df54 <xQueueGenericCreate+0x42>
}
else
{
/* Allocate enough space to hold the maximum number of items that
can be in the queue at any time. */
xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
800df4a: 68fb ldr r3, [r7, #12]
800df4c: 68ba ldr r2, [r7, #8]
800df4e: fb02 f303 mul.w r3, r2, r3
800df52: 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. */
800df54: 69fb ldr r3, [r7, #28]
800df56: 3348 adds r3, #72 ; 0x48
800df58: 4618 mov r0, r3
800df5a: f002 fa67 bl 801042c <pvPortMalloc>
800df5e: 61b8 str r0, [r7, #24]
if( pxNewQueue != NULL )
800df60: 69bb ldr r3, [r7, #24]
800df62: 2b00 cmp r3, #0
800df64: d011 beq.n 800df8a <xQueueGenericCreate+0x78>
{
/* Jump past the queue structure to find the location of the queue
storage area. */
pucQueueStorage = ( uint8_t * ) pxNewQueue;
800df66: 69bb ldr r3, [r7, #24]
800df68: 617b str r3, [r7, #20]
pucQueueStorage += sizeof( Queue_t ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
800df6a: 697b ldr r3, [r7, #20]
800df6c: 3348 adds r3, #72 ; 0x48
800df6e: 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;
800df70: 69bb ldr r3, [r7, #24]
800df72: 2200 movs r2, #0
800df74: f883 2046 strb.w r2, [r3, #70] ; 0x46
}
#endif /* configSUPPORT_STATIC_ALLOCATION */
prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
800df78: 79fa ldrb r2, [r7, #7]
800df7a: 69bb ldr r3, [r7, #24]
800df7c: 9300 str r3, [sp, #0]
800df7e: 4613 mov r3, r2
800df80: 697a ldr r2, [r7, #20]
800df82: 68b9 ldr r1, [r7, #8]
800df84: 68f8 ldr r0, [r7, #12]
800df86: f000 f805 bl 800df94 <prvInitialiseNewQueue>
{
traceQUEUE_CREATE_FAILED( ucQueueType );
mtCOVERAGE_TEST_MARKER();
}
return pxNewQueue;
800df8a: 69bb ldr r3, [r7, #24]
}
800df8c: 4618 mov r0, r3
800df8e: 3720 adds r7, #32
800df90: 46bd mov sp, r7
800df92: bd80 pop {r7, pc}
0800df94 <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 )
{
800df94: b580 push {r7, lr}
800df96: b084 sub sp, #16
800df98: af00 add r7, sp, #0
800df9a: 60f8 str r0, [r7, #12]
800df9c: 60b9 str r1, [r7, #8]
800df9e: 607a str r2, [r7, #4]
800dfa0: 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 )
800dfa2: 68bb ldr r3, [r7, #8]
800dfa4: 2b00 cmp r3, #0
800dfa6: d103 bne.n 800dfb0 <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;
800dfa8: 69bb ldr r3, [r7, #24]
800dfaa: 69ba ldr r2, [r7, #24]
800dfac: 601a str r2, [r3, #0]
800dfae: e002 b.n 800dfb6 <prvInitialiseNewQueue+0x22>
}
else
{
/* Set the head to the start of the queue storage area. */
pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage;
800dfb0: 69bb ldr r3, [r7, #24]
800dfb2: 687a ldr r2, [r7, #4]
800dfb4: 601a str r2, [r3, #0]
}
/* Initialise the queue members as described where the queue type is
defined. */
pxNewQueue->uxLength = uxQueueLength;
800dfb6: 69bb ldr r3, [r7, #24]
800dfb8: 68fa ldr r2, [r7, #12]
800dfba: 63da str r2, [r3, #60] ; 0x3c
pxNewQueue->uxItemSize = uxItemSize;
800dfbc: 69bb ldr r3, [r7, #24]
800dfbe: 68ba ldr r2, [r7, #8]
800dfc0: 641a str r2, [r3, #64] ; 0x40
( void ) xQueueGenericReset( pxNewQueue, pdTRUE );
800dfc2: 2101 movs r1, #1
800dfc4: 69b8 ldr r0, [r7, #24]
800dfc6: f7ff febd bl 800dd44 <xQueueGenericReset>
pxNewQueue->pxQueueSetContainer = NULL;
}
#endif /* configUSE_QUEUE_SETS */
traceQUEUE_CREATE( pxNewQueue );
}
800dfca: bf00 nop
800dfcc: 3710 adds r7, #16
800dfce: 46bd mov sp, r7
800dfd0: bd80 pop {r7, pc}
0800dfd2 <prvInitialiseMutex>:
/*-----------------------------------------------------------*/
#if( configUSE_MUTEXES == 1 )
static void prvInitialiseMutex( Queue_t *pxNewQueue )
{
800dfd2: b580 push {r7, lr}
800dfd4: b082 sub sp, #8
800dfd6: af00 add r7, sp, #0
800dfd8: 6078 str r0, [r7, #4]
if( pxNewQueue != NULL )
800dfda: 687b ldr r3, [r7, #4]
800dfdc: 2b00 cmp r3, #0
800dfde: d00e beq.n 800dffe <prvInitialiseMutex+0x2c>
{
/* The queue create function will set all the queue structure members
correctly for a generic queue, but this function is creating a
mutex. Overwrite those members that need to be set differently -
in particular the information required for priority inheritance. */
pxNewQueue->u.xSemaphore.xMutexHolder = NULL;
800dfe0: 687b ldr r3, [r7, #4]
800dfe2: 2200 movs r2, #0
800dfe4: 609a str r2, [r3, #8]
pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX;
800dfe6: 687b ldr r3, [r7, #4]
800dfe8: 2200 movs r2, #0
800dfea: 601a str r2, [r3, #0]
/* In case this is a recursive mutex. */
pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0;
800dfec: 687b ldr r3, [r7, #4]
800dfee: 2200 movs r2, #0
800dff0: 60da str r2, [r3, #12]
traceCREATE_MUTEX( pxNewQueue );
/* Start with the semaphore in the expected state. */
( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK );
800dff2: 2300 movs r3, #0
800dff4: 2200 movs r2, #0
800dff6: 2100 movs r1, #0
800dff8: 6878 ldr r0, [r7, #4]
800dffa: f000 f8a5 bl 800e148 <xQueueGenericSend>
}
else
{
traceCREATE_MUTEX_FAILED();
}
}
800dffe: bf00 nop
800e000: 3708 adds r7, #8
800e002: 46bd mov sp, r7
800e004: bd80 pop {r7, pc}
0800e006 <xQueueCreateMutex>:
/*-----------------------------------------------------------*/
#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType )
{
800e006: b580 push {r7, lr}
800e008: b086 sub sp, #24
800e00a: af00 add r7, sp, #0
800e00c: 4603 mov r3, r0
800e00e: 71fb strb r3, [r7, #7]
QueueHandle_t xNewQueue;
const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0;
800e010: 2301 movs r3, #1
800e012: 617b str r3, [r7, #20]
800e014: 2300 movs r3, #0
800e016: 613b str r3, [r7, #16]
xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType );
800e018: 79fb ldrb r3, [r7, #7]
800e01a: 461a mov r2, r3
800e01c: 6939 ldr r1, [r7, #16]
800e01e: 6978 ldr r0, [r7, #20]
800e020: f7ff ff77 bl 800df12 <xQueueGenericCreate>
800e024: 60f8 str r0, [r7, #12]
prvInitialiseMutex( ( Queue_t * ) xNewQueue );
800e026: 68f8 ldr r0, [r7, #12]
800e028: f7ff ffd3 bl 800dfd2 <prvInitialiseMutex>
return xNewQueue;
800e02c: 68fb ldr r3, [r7, #12]
}
800e02e: 4618 mov r0, r3
800e030: 3718 adds r7, #24
800e032: 46bd mov sp, r7
800e034: bd80 pop {r7, pc}
0800e036 <xQueueCreateMutexStatic>:
/*-----------------------------------------------------------*/
#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue )
{
800e036: b580 push {r7, lr}
800e038: b088 sub sp, #32
800e03a: af02 add r7, sp, #8
800e03c: 4603 mov r3, r0
800e03e: 6039 str r1, [r7, #0]
800e040: 71fb strb r3, [r7, #7]
QueueHandle_t xNewQueue;
const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0;
800e042: 2301 movs r3, #1
800e044: 617b str r3, [r7, #20]
800e046: 2300 movs r3, #0
800e048: 613b str r3, [r7, #16]
/* Prevent compiler warnings about unused parameters if
configUSE_TRACE_FACILITY does not equal 1. */
( void ) ucQueueType;
xNewQueue = xQueueGenericCreateStatic( uxMutexLength, uxMutexSize, NULL, pxStaticQueue, ucQueueType );
800e04a: 79fb ldrb r3, [r7, #7]
800e04c: 9300 str r3, [sp, #0]
800e04e: 683b ldr r3, [r7, #0]
800e050: 2200 movs r2, #0
800e052: 6939 ldr r1, [r7, #16]
800e054: 6978 ldr r0, [r7, #20]
800e056: f7ff fedf bl 800de18 <xQueueGenericCreateStatic>
800e05a: 60f8 str r0, [r7, #12]
prvInitialiseMutex( ( Queue_t * ) xNewQueue );
800e05c: 68f8 ldr r0, [r7, #12]
800e05e: f7ff ffb8 bl 800dfd2 <prvInitialiseMutex>
return xNewQueue;
800e062: 68fb ldr r3, [r7, #12]
}
800e064: 4618 mov r0, r3
800e066: 3718 adds r7, #24
800e068: 46bd mov sp, r7
800e06a: bd80 pop {r7, pc}
0800e06c <xQueueCreateCountingSemaphoreStatic>:
/*-----------------------------------------------------------*/
#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue )
{
800e06c: b580 push {r7, lr}
800e06e: b08a sub sp, #40 ; 0x28
800e070: af02 add r7, sp, #8
800e072: 60f8 str r0, [r7, #12]
800e074: 60b9 str r1, [r7, #8]
800e076: 607a str r2, [r7, #4]
QueueHandle_t xHandle;
configASSERT( uxMaxCount != 0 );
800e078: 68fb ldr r3, [r7, #12]
800e07a: 2b00 cmp r3, #0
800e07c: d10b bne.n 800e096 <xQueueCreateCountingSemaphoreStatic+0x2a>
800e07e: f04f 0350 mov.w r3, #80 ; 0x50
800e082: b672 cpsid i
800e084: f383 8811 msr BASEPRI, r3
800e088: f3bf 8f6f isb sy
800e08c: f3bf 8f4f dsb sy
800e090: b662 cpsie i
800e092: 61bb str r3, [r7, #24]
800e094: e7fe b.n 800e094 <xQueueCreateCountingSemaphoreStatic+0x28>
configASSERT( uxInitialCount <= uxMaxCount );
800e096: 68ba ldr r2, [r7, #8]
800e098: 68fb ldr r3, [r7, #12]
800e09a: 429a cmp r2, r3
800e09c: d90b bls.n 800e0b6 <xQueueCreateCountingSemaphoreStatic+0x4a>
800e09e: f04f 0350 mov.w r3, #80 ; 0x50
800e0a2: b672 cpsid i
800e0a4: f383 8811 msr BASEPRI, r3
800e0a8: f3bf 8f6f isb sy
800e0ac: f3bf 8f4f dsb sy
800e0b0: b662 cpsie i
800e0b2: 617b str r3, [r7, #20]
800e0b4: e7fe b.n 800e0b4 <xQueueCreateCountingSemaphoreStatic+0x48>
xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
800e0b6: 2302 movs r3, #2
800e0b8: 9300 str r3, [sp, #0]
800e0ba: 687b ldr r3, [r7, #4]
800e0bc: 2200 movs r2, #0
800e0be: 2100 movs r1, #0
800e0c0: 68f8 ldr r0, [r7, #12]
800e0c2: f7ff fea9 bl 800de18 <xQueueGenericCreateStatic>
800e0c6: 61f8 str r0, [r7, #28]
if( xHandle != NULL )
800e0c8: 69fb ldr r3, [r7, #28]
800e0ca: 2b00 cmp r3, #0
800e0cc: d002 beq.n 800e0d4 <xQueueCreateCountingSemaphoreStatic+0x68>
{
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
800e0ce: 69fb ldr r3, [r7, #28]
800e0d0: 68ba ldr r2, [r7, #8]
800e0d2: 639a str r2, [r3, #56] ; 0x38
else
{
traceCREATE_COUNTING_SEMAPHORE_FAILED();
}
return xHandle;
800e0d4: 69fb ldr r3, [r7, #28]
}
800e0d6: 4618 mov r0, r3
800e0d8: 3720 adds r7, #32
800e0da: 46bd mov sp, r7
800e0dc: bd80 pop {r7, pc}
0800e0de <xQueueCreateCountingSemaphore>:
/*-----------------------------------------------------------*/
#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount )
{
800e0de: b580 push {r7, lr}
800e0e0: b086 sub sp, #24
800e0e2: af00 add r7, sp, #0
800e0e4: 6078 str r0, [r7, #4]
800e0e6: 6039 str r1, [r7, #0]
QueueHandle_t xHandle;
configASSERT( uxMaxCount != 0 );
800e0e8: 687b ldr r3, [r7, #4]
800e0ea: 2b00 cmp r3, #0
800e0ec: d10b bne.n 800e106 <xQueueCreateCountingSemaphore+0x28>
800e0ee: f04f 0350 mov.w r3, #80 ; 0x50
800e0f2: b672 cpsid i
800e0f4: f383 8811 msr BASEPRI, r3
800e0f8: f3bf 8f6f isb sy
800e0fc: f3bf 8f4f dsb sy
800e100: b662 cpsie i
800e102: 613b str r3, [r7, #16]
800e104: e7fe b.n 800e104 <xQueueCreateCountingSemaphore+0x26>
configASSERT( uxInitialCount <= uxMaxCount );
800e106: 683a ldr r2, [r7, #0]
800e108: 687b ldr r3, [r7, #4]
800e10a: 429a cmp r2, r3
800e10c: d90b bls.n 800e126 <xQueueCreateCountingSemaphore+0x48>
800e10e: f04f 0350 mov.w r3, #80 ; 0x50
800e112: b672 cpsid i
800e114: f383 8811 msr BASEPRI, r3
800e118: f3bf 8f6f isb sy
800e11c: f3bf 8f4f dsb sy
800e120: b662 cpsie i
800e122: 60fb str r3, [r7, #12]
800e124: e7fe b.n 800e124 <xQueueCreateCountingSemaphore+0x46>
xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
800e126: 2202 movs r2, #2
800e128: 2100 movs r1, #0
800e12a: 6878 ldr r0, [r7, #4]
800e12c: f7ff fef1 bl 800df12 <xQueueGenericCreate>
800e130: 6178 str r0, [r7, #20]
if( xHandle != NULL )
800e132: 697b ldr r3, [r7, #20]
800e134: 2b00 cmp r3, #0
800e136: d002 beq.n 800e13e <xQueueCreateCountingSemaphore+0x60>
{
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
800e138: 697b ldr r3, [r7, #20]
800e13a: 683a ldr r2, [r7, #0]
800e13c: 639a str r2, [r3, #56] ; 0x38
else
{
traceCREATE_COUNTING_SEMAPHORE_FAILED();
}
return xHandle;
800e13e: 697b ldr r3, [r7, #20]
}
800e140: 4618 mov r0, r3
800e142: 3718 adds r7, #24
800e144: 46bd mov sp, r7
800e146: bd80 pop {r7, pc}
0800e148 <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 )
{
800e148: b580 push {r7, lr}
800e14a: b08e sub sp, #56 ; 0x38
800e14c: af00 add r7, sp, #0
800e14e: 60f8 str r0, [r7, #12]
800e150: 60b9 str r1, [r7, #8]
800e152: 607a str r2, [r7, #4]
800e154: 603b str r3, [r7, #0]
BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired;
800e156: 2300 movs r3, #0
800e158: 637b str r3, [r7, #52] ; 0x34
TimeOut_t xTimeOut;
Queue_t * const pxQueue = xQueue;
800e15a: 68fb ldr r3, [r7, #12]
800e15c: 633b str r3, [r7, #48] ; 0x30
configASSERT( pxQueue );
800e15e: 6b3b ldr r3, [r7, #48] ; 0x30
800e160: 2b00 cmp r3, #0
800e162: d10b bne.n 800e17c <xQueueGenericSend+0x34>
800e164: f04f 0350 mov.w r3, #80 ; 0x50
800e168: b672 cpsid i
800e16a: f383 8811 msr BASEPRI, r3
800e16e: f3bf 8f6f isb sy
800e172: f3bf 8f4f dsb sy
800e176: b662 cpsie i
800e178: 62bb str r3, [r7, #40] ; 0x28
800e17a: e7fe b.n 800e17a <xQueueGenericSend+0x32>
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
800e17c: 68bb ldr r3, [r7, #8]
800e17e: 2b00 cmp r3, #0
800e180: d103 bne.n 800e18a <xQueueGenericSend+0x42>
800e182: 6b3b ldr r3, [r7, #48] ; 0x30
800e184: 6c1b ldr r3, [r3, #64] ; 0x40
800e186: 2b00 cmp r3, #0
800e188: d101 bne.n 800e18e <xQueueGenericSend+0x46>
800e18a: 2301 movs r3, #1
800e18c: e000 b.n 800e190 <xQueueGenericSend+0x48>
800e18e: 2300 movs r3, #0
800e190: 2b00 cmp r3, #0
800e192: d10b bne.n 800e1ac <xQueueGenericSend+0x64>
800e194: f04f 0350 mov.w r3, #80 ; 0x50
800e198: b672 cpsid i
800e19a: f383 8811 msr BASEPRI, r3
800e19e: f3bf 8f6f isb sy
800e1a2: f3bf 8f4f dsb sy
800e1a6: b662 cpsie i
800e1a8: 627b str r3, [r7, #36] ; 0x24
800e1aa: e7fe b.n 800e1aa <xQueueGenericSend+0x62>
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
800e1ac: 683b ldr r3, [r7, #0]
800e1ae: 2b02 cmp r3, #2
800e1b0: d103 bne.n 800e1ba <xQueueGenericSend+0x72>
800e1b2: 6b3b ldr r3, [r7, #48] ; 0x30
800e1b4: 6bdb ldr r3, [r3, #60] ; 0x3c
800e1b6: 2b01 cmp r3, #1
800e1b8: d101 bne.n 800e1be <xQueueGenericSend+0x76>
800e1ba: 2301 movs r3, #1
800e1bc: e000 b.n 800e1c0 <xQueueGenericSend+0x78>
800e1be: 2300 movs r3, #0
800e1c0: 2b00 cmp r3, #0
800e1c2: d10b bne.n 800e1dc <xQueueGenericSend+0x94>
800e1c4: f04f 0350 mov.w r3, #80 ; 0x50
800e1c8: b672 cpsid i
800e1ca: f383 8811 msr BASEPRI, r3
800e1ce: f3bf 8f6f isb sy
800e1d2: f3bf 8f4f dsb sy
800e1d6: b662 cpsie i
800e1d8: 623b str r3, [r7, #32]
800e1da: e7fe b.n 800e1da <xQueueGenericSend+0x92>
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
{
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
800e1dc: f001 fcbc bl 800fb58 <xTaskGetSchedulerState>
800e1e0: 4603 mov r3, r0
800e1e2: 2b00 cmp r3, #0
800e1e4: d102 bne.n 800e1ec <xQueueGenericSend+0xa4>
800e1e6: 687b ldr r3, [r7, #4]
800e1e8: 2b00 cmp r3, #0
800e1ea: d101 bne.n 800e1f0 <xQueueGenericSend+0xa8>
800e1ec: 2301 movs r3, #1
800e1ee: e000 b.n 800e1f2 <xQueueGenericSend+0xaa>
800e1f0: 2300 movs r3, #0
800e1f2: 2b00 cmp r3, #0
800e1f4: d10b bne.n 800e20e <xQueueGenericSend+0xc6>
800e1f6: f04f 0350 mov.w r3, #80 ; 0x50
800e1fa: b672 cpsid i
800e1fc: f383 8811 msr BASEPRI, r3
800e200: f3bf 8f6f isb sy
800e204: f3bf 8f4f dsb sy
800e208: b662 cpsie i
800e20a: 61fb str r3, [r7, #28]
800e20c: e7fe b.n 800e20c <xQueueGenericSend+0xc4>
/*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();
800e20e: f001 ffeb bl 80101e8 <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 ) )
800e212: 6b3b ldr r3, [r7, #48] ; 0x30
800e214: 6b9a ldr r2, [r3, #56] ; 0x38
800e216: 6b3b ldr r3, [r7, #48] ; 0x30
800e218: 6bdb ldr r3, [r3, #60] ; 0x3c
800e21a: 429a cmp r2, r3
800e21c: d302 bcc.n 800e224 <xQueueGenericSend+0xdc>
800e21e: 683b ldr r3, [r7, #0]
800e220: 2b02 cmp r3, #2
800e222: d129 bne.n 800e278 <xQueueGenericSend+0x130>
}
}
}
#else /* configUSE_QUEUE_SETS */
{
xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
800e224: 683a ldr r2, [r7, #0]
800e226: 68b9 ldr r1, [r7, #8]
800e228: 6b38 ldr r0, [r7, #48] ; 0x30
800e22a: f000 fc4a bl 800eac2 <prvCopyDataToQueue>
800e22e: 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 )
800e230: 6b3b ldr r3, [r7, #48] ; 0x30
800e232: 6a5b ldr r3, [r3, #36] ; 0x24
800e234: 2b00 cmp r3, #0
800e236: d010 beq.n 800e25a <xQueueGenericSend+0x112>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
800e238: 6b3b ldr r3, [r7, #48] ; 0x30
800e23a: 3324 adds r3, #36 ; 0x24
800e23c: 4618 mov r0, r3
800e23e: f001 facb bl 800f7d8 <xTaskRemoveFromEventList>
800e242: 4603 mov r3, r0
800e244: 2b00 cmp r3, #0
800e246: d013 beq.n 800e270 <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();
800e248: 4b3f ldr r3, [pc, #252] ; (800e348 <xQueueGenericSend+0x200>)
800e24a: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e24e: 601a str r2, [r3, #0]
800e250: f3bf 8f4f dsb sy
800e254: f3bf 8f6f isb sy
800e258: e00a b.n 800e270 <xQueueGenericSend+0x128>
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else if( xYieldRequired != pdFALSE )
800e25a: 6afb ldr r3, [r7, #44] ; 0x2c
800e25c: 2b00 cmp r3, #0
800e25e: d007 beq.n 800e270 <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();
800e260: 4b39 ldr r3, [pc, #228] ; (800e348 <xQueueGenericSend+0x200>)
800e262: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e266: 601a str r2, [r3, #0]
800e268: f3bf 8f4f dsb sy
800e26c: f3bf 8f6f isb sy
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_QUEUE_SETS */
taskEXIT_CRITICAL();
800e270: f001 ffec bl 801024c <vPortExitCritical>
return pdPASS;
800e274: 2301 movs r3, #1
800e276: e063 b.n 800e340 <xQueueGenericSend+0x1f8>
}
else
{
if( xTicksToWait == ( TickType_t ) 0 )
800e278: 687b ldr r3, [r7, #4]
800e27a: 2b00 cmp r3, #0
800e27c: d103 bne.n 800e286 <xQueueGenericSend+0x13e>
{
/* The queue was full and no block time is specified (or
the block time has expired) so leave now. */
taskEXIT_CRITICAL();
800e27e: f001 ffe5 bl 801024c <vPortExitCritical>
/* Return to the original privilege level before exiting
the function. */
traceQUEUE_SEND_FAILED( pxQueue );
return errQUEUE_FULL;
800e282: 2300 movs r3, #0
800e284: e05c b.n 800e340 <xQueueGenericSend+0x1f8>
}
else if( xEntryTimeSet == pdFALSE )
800e286: 6b7b ldr r3, [r7, #52] ; 0x34
800e288: 2b00 cmp r3, #0
800e28a: d106 bne.n 800e29a <xQueueGenericSend+0x152>
{
/* The queue was full and a block time was specified so
configure the timeout structure. */
vTaskInternalSetTimeOutState( &xTimeOut );
800e28c: f107 0314 add.w r3, r7, #20
800e290: 4618 mov r0, r3
800e292: f001 fb05 bl 800f8a0 <vTaskInternalSetTimeOutState>
xEntryTimeSet = pdTRUE;
800e296: 2301 movs r3, #1
800e298: 637b str r3, [r7, #52] ; 0x34
/* Entry time was already set. */
mtCOVERAGE_TEST_MARKER();
}
}
}
taskEXIT_CRITICAL();
800e29a: f001 ffd7 bl 801024c <vPortExitCritical>
/* Interrupts and other tasks can send to and receive from the queue
now the critical section has been exited. */
vTaskSuspendAll();
800e29e: f001 f86b bl 800f378 <vTaskSuspendAll>
prvLockQueue( pxQueue );
800e2a2: f001 ffa1 bl 80101e8 <vPortEnterCritical>
800e2a6: 6b3b ldr r3, [r7, #48] ; 0x30
800e2a8: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800e2ac: b25b sxtb r3, r3
800e2ae: f1b3 3fff cmp.w r3, #4294967295
800e2b2: d103 bne.n 800e2bc <xQueueGenericSend+0x174>
800e2b4: 6b3b ldr r3, [r7, #48] ; 0x30
800e2b6: 2200 movs r2, #0
800e2b8: f883 2044 strb.w r2, [r3, #68] ; 0x44
800e2bc: 6b3b ldr r3, [r7, #48] ; 0x30
800e2be: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800e2c2: b25b sxtb r3, r3
800e2c4: f1b3 3fff cmp.w r3, #4294967295
800e2c8: d103 bne.n 800e2d2 <xQueueGenericSend+0x18a>
800e2ca: 6b3b ldr r3, [r7, #48] ; 0x30
800e2cc: 2200 movs r2, #0
800e2ce: f883 2045 strb.w r2, [r3, #69] ; 0x45
800e2d2: f001 ffbb bl 801024c <vPortExitCritical>
/* Update the timeout state to see if it has expired yet. */
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
800e2d6: 1d3a adds r2, r7, #4
800e2d8: f107 0314 add.w r3, r7, #20
800e2dc: 4611 mov r1, r2
800e2de: 4618 mov r0, r3
800e2e0: f001 faf4 bl 800f8cc <xTaskCheckForTimeOut>
800e2e4: 4603 mov r3, r0
800e2e6: 2b00 cmp r3, #0
800e2e8: d124 bne.n 800e334 <xQueueGenericSend+0x1ec>
{
if( prvIsQueueFull( pxQueue ) != pdFALSE )
800e2ea: 6b38 ldr r0, [r7, #48] ; 0x30
800e2ec: f000 fce1 bl 800ecb2 <prvIsQueueFull>
800e2f0: 4603 mov r3, r0
800e2f2: 2b00 cmp r3, #0
800e2f4: d018 beq.n 800e328 <xQueueGenericSend+0x1e0>
{
traceBLOCKING_ON_QUEUE_SEND( pxQueue );
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );
800e2f6: 6b3b ldr r3, [r7, #48] ; 0x30
800e2f8: 3310 adds r3, #16
800e2fa: 687a ldr r2, [r7, #4]
800e2fc: 4611 mov r1, r2
800e2fe: 4618 mov r0, r3
800e300: f001 fa44 bl 800f78c <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 );
800e304: 6b38 ldr r0, [r7, #48] ; 0x30
800e306: f000 fc6c bl 800ebe2 <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 )
800e30a: f001 f843 bl 800f394 <xTaskResumeAll>
800e30e: 4603 mov r3, r0
800e310: 2b00 cmp r3, #0
800e312: f47f af7c bne.w 800e20e <xQueueGenericSend+0xc6>
{
portYIELD_WITHIN_API();
800e316: 4b0c ldr r3, [pc, #48] ; (800e348 <xQueueGenericSend+0x200>)
800e318: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e31c: 601a str r2, [r3, #0]
800e31e: f3bf 8f4f dsb sy
800e322: f3bf 8f6f isb sy
800e326: e772 b.n 800e20e <xQueueGenericSend+0xc6>
}
}
else
{
/* Try again. */
prvUnlockQueue( pxQueue );
800e328: 6b38 ldr r0, [r7, #48] ; 0x30
800e32a: f000 fc5a bl 800ebe2 <prvUnlockQueue>
( void ) xTaskResumeAll();
800e32e: f001 f831 bl 800f394 <xTaskResumeAll>
800e332: e76c b.n 800e20e <xQueueGenericSend+0xc6>
}
}
else
{
/* The timeout has expired. */
prvUnlockQueue( pxQueue );
800e334: 6b38 ldr r0, [r7, #48] ; 0x30
800e336: f000 fc54 bl 800ebe2 <prvUnlockQueue>
( void ) xTaskResumeAll();
800e33a: f001 f82b bl 800f394 <xTaskResumeAll>
traceQUEUE_SEND_FAILED( pxQueue );
return errQUEUE_FULL;
800e33e: 2300 movs r3, #0
}
} /*lint -restore */
}
800e340: 4618 mov r0, r3
800e342: 3738 adds r7, #56 ; 0x38
800e344: 46bd mov sp, r7
800e346: bd80 pop {r7, pc}
800e348: e000ed04 .word 0xe000ed04
0800e34c <xQueueGenericSendFromISR>:
/*-----------------------------------------------------------*/
BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition )
{
800e34c: b580 push {r7, lr}
800e34e: b08e sub sp, #56 ; 0x38
800e350: af00 add r7, sp, #0
800e352: 60f8 str r0, [r7, #12]
800e354: 60b9 str r1, [r7, #8]
800e356: 607a str r2, [r7, #4]
800e358: 603b str r3, [r7, #0]
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
Queue_t * const pxQueue = xQueue;
800e35a: 68fb ldr r3, [r7, #12]
800e35c: 633b str r3, [r7, #48] ; 0x30
configASSERT( pxQueue );
800e35e: 6b3b ldr r3, [r7, #48] ; 0x30
800e360: 2b00 cmp r3, #0
800e362: d10b bne.n 800e37c <xQueueGenericSendFromISR+0x30>
800e364: f04f 0350 mov.w r3, #80 ; 0x50
800e368: b672 cpsid i
800e36a: f383 8811 msr BASEPRI, r3
800e36e: f3bf 8f6f isb sy
800e372: f3bf 8f4f dsb sy
800e376: b662 cpsie i
800e378: 627b str r3, [r7, #36] ; 0x24
800e37a: e7fe b.n 800e37a <xQueueGenericSendFromISR+0x2e>
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
800e37c: 68bb ldr r3, [r7, #8]
800e37e: 2b00 cmp r3, #0
800e380: d103 bne.n 800e38a <xQueueGenericSendFromISR+0x3e>
800e382: 6b3b ldr r3, [r7, #48] ; 0x30
800e384: 6c1b ldr r3, [r3, #64] ; 0x40
800e386: 2b00 cmp r3, #0
800e388: d101 bne.n 800e38e <xQueueGenericSendFromISR+0x42>
800e38a: 2301 movs r3, #1
800e38c: e000 b.n 800e390 <xQueueGenericSendFromISR+0x44>
800e38e: 2300 movs r3, #0
800e390: 2b00 cmp r3, #0
800e392: d10b bne.n 800e3ac <xQueueGenericSendFromISR+0x60>
800e394: f04f 0350 mov.w r3, #80 ; 0x50
800e398: b672 cpsid i
800e39a: f383 8811 msr BASEPRI, r3
800e39e: f3bf 8f6f isb sy
800e3a2: f3bf 8f4f dsb sy
800e3a6: b662 cpsie i
800e3a8: 623b str r3, [r7, #32]
800e3aa: e7fe b.n 800e3aa <xQueueGenericSendFromISR+0x5e>
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
800e3ac: 683b ldr r3, [r7, #0]
800e3ae: 2b02 cmp r3, #2
800e3b0: d103 bne.n 800e3ba <xQueueGenericSendFromISR+0x6e>
800e3b2: 6b3b ldr r3, [r7, #48] ; 0x30
800e3b4: 6bdb ldr r3, [r3, #60] ; 0x3c
800e3b6: 2b01 cmp r3, #1
800e3b8: d101 bne.n 800e3be <xQueueGenericSendFromISR+0x72>
800e3ba: 2301 movs r3, #1
800e3bc: e000 b.n 800e3c0 <xQueueGenericSendFromISR+0x74>
800e3be: 2300 movs r3, #0
800e3c0: 2b00 cmp r3, #0
800e3c2: d10b bne.n 800e3dc <xQueueGenericSendFromISR+0x90>
800e3c4: f04f 0350 mov.w r3, #80 ; 0x50
800e3c8: b672 cpsid i
800e3ca: f383 8811 msr BASEPRI, r3
800e3ce: f3bf 8f6f isb sy
800e3d2: f3bf 8f4f dsb sy
800e3d6: b662 cpsie i
800e3d8: 61fb str r3, [r7, #28]
800e3da: e7fe b.n 800e3da <xQueueGenericSendFromISR+0x8e>
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();
800e3dc: f001 ffe4 bl 80103a8 <vPortValidateInterruptPriority>
portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void )
{
uint32_t ulOriginalBASEPRI, ulNewBASEPRI;
__asm volatile
800e3e0: f3ef 8211 mrs r2, BASEPRI
800e3e4: f04f 0350 mov.w r3, #80 ; 0x50
800e3e8: b672 cpsid i
800e3ea: f383 8811 msr BASEPRI, r3
800e3ee: f3bf 8f6f isb sy
800e3f2: f3bf 8f4f dsb sy
800e3f6: b662 cpsie i
800e3f8: 61ba str r2, [r7, #24]
800e3fa: 617b str r3, [r7, #20]
:"=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;
800e3fc: 69bb ldr r3, [r7, #24]
/* 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();
800e3fe: 62fb str r3, [r7, #44] ; 0x2c
{
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
800e400: 6b3b ldr r3, [r7, #48] ; 0x30
800e402: 6b9a ldr r2, [r3, #56] ; 0x38
800e404: 6b3b ldr r3, [r7, #48] ; 0x30
800e406: 6bdb ldr r3, [r3, #60] ; 0x3c
800e408: 429a cmp r2, r3
800e40a: d302 bcc.n 800e412 <xQueueGenericSendFromISR+0xc6>
800e40c: 683b ldr r3, [r7, #0]
800e40e: 2b02 cmp r3, #2
800e410: d12c bne.n 800e46c <xQueueGenericSendFromISR+0x120>
{
const int8_t cTxLock = pxQueue->cTxLock;
800e412: 6b3b ldr r3, [r7, #48] ; 0x30
800e414: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800e418: f887 302b strb.w r3, [r7, #43] ; 0x2b
/* 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 );
800e41c: 683a ldr r2, [r7, #0]
800e41e: 68b9 ldr r1, [r7, #8]
800e420: 6b38 ldr r0, [r7, #48] ; 0x30
800e422: f000 fb4e bl 800eac2 <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 )
800e426: f997 302b ldrsb.w r3, [r7, #43] ; 0x2b
800e42a: f1b3 3fff cmp.w r3, #4294967295
800e42e: d112 bne.n 800e456 <xQueueGenericSendFromISR+0x10a>
}
}
}
#else /* configUSE_QUEUE_SETS */
{
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
800e430: 6b3b ldr r3, [r7, #48] ; 0x30
800e432: 6a5b ldr r3, [r3, #36] ; 0x24
800e434: 2b00 cmp r3, #0
800e436: d016 beq.n 800e466 <xQueueGenericSendFromISR+0x11a>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
800e438: 6b3b ldr r3, [r7, #48] ; 0x30
800e43a: 3324 adds r3, #36 ; 0x24
800e43c: 4618 mov r0, r3
800e43e: f001 f9cb bl 800f7d8 <xTaskRemoveFromEventList>
800e442: 4603 mov r3, r0
800e444: 2b00 cmp r3, #0
800e446: d00e beq.n 800e466 <xQueueGenericSendFromISR+0x11a>
{
/* The task waiting has a higher priority so record that a
context switch is required. */
if( pxHigherPriorityTaskWoken != NULL )
800e448: 687b ldr r3, [r7, #4]
800e44a: 2b00 cmp r3, #0
800e44c: d00b beq.n 800e466 <xQueueGenericSendFromISR+0x11a>
{
*pxHigherPriorityTaskWoken = pdTRUE;
800e44e: 687b ldr r3, [r7, #4]
800e450: 2201 movs r2, #1
800e452: 601a str r2, [r3, #0]
800e454: e007 b.n 800e466 <xQueueGenericSendFromISR+0x11a>
}
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 );
800e456: f897 302b ldrb.w r3, [r7, #43] ; 0x2b
800e45a: 3301 adds r3, #1
800e45c: b2db uxtb r3, r3
800e45e: b25a sxtb r2, r3
800e460: 6b3b ldr r3, [r7, #48] ; 0x30
800e462: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
xReturn = pdPASS;
800e466: 2301 movs r3, #1
800e468: 637b str r3, [r7, #52] ; 0x34
{
800e46a: e001 b.n 800e470 <xQueueGenericSendFromISR+0x124>
}
else
{
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
xReturn = errQUEUE_FULL;
800e46c: 2300 movs r3, #0
800e46e: 637b str r3, [r7, #52] ; 0x34
800e470: 6afb ldr r3, [r7, #44] ; 0x2c
800e472: 613b str r3, [r7, #16]
}
/*-----------------------------------------------------------*/
portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue )
{
__asm volatile
800e474: 693b ldr r3, [r7, #16]
800e476: f383 8811 msr BASEPRI, r3
}
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return xReturn;
800e47a: 6b7b ldr r3, [r7, #52] ; 0x34
}
800e47c: 4618 mov r0, r3
800e47e: 3738 adds r7, #56 ; 0x38
800e480: 46bd mov sp, r7
800e482: bd80 pop {r7, pc}
0800e484 <xQueueGiveFromISR>:
/*-----------------------------------------------------------*/
BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken )
{
800e484: b580 push {r7, lr}
800e486: b08e sub sp, #56 ; 0x38
800e488: af00 add r7, sp, #0
800e48a: 6078 str r0, [r7, #4]
800e48c: 6039 str r1, [r7, #0]
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
Queue_t * const pxQueue = xQueue;
800e48e: 687b ldr r3, [r7, #4]
800e490: 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 );
800e492: 6b3b ldr r3, [r7, #48] ; 0x30
800e494: 2b00 cmp r3, #0
800e496: d10b bne.n 800e4b0 <xQueueGiveFromISR+0x2c>
__asm volatile
800e498: f04f 0350 mov.w r3, #80 ; 0x50
800e49c: b672 cpsid i
800e49e: f383 8811 msr BASEPRI, r3
800e4a2: f3bf 8f6f isb sy
800e4a6: f3bf 8f4f dsb sy
800e4aa: b662 cpsie i
800e4ac: 623b str r3, [r7, #32]
800e4ae: e7fe b.n 800e4ae <xQueueGiveFromISR+0x2a>
/* xQueueGenericSendFromISR() should be used instead of xQueueGiveFromISR()
if the item size is not 0. */
configASSERT( pxQueue->uxItemSize == 0 );
800e4b0: 6b3b ldr r3, [r7, #48] ; 0x30
800e4b2: 6c1b ldr r3, [r3, #64] ; 0x40
800e4b4: 2b00 cmp r3, #0
800e4b6: d00b beq.n 800e4d0 <xQueueGiveFromISR+0x4c>
800e4b8: f04f 0350 mov.w r3, #80 ; 0x50
800e4bc: b672 cpsid i
800e4be: f383 8811 msr BASEPRI, r3
800e4c2: f3bf 8f6f isb sy
800e4c6: f3bf 8f4f dsb sy
800e4ca: b662 cpsie i
800e4cc: 61fb str r3, [r7, #28]
800e4ce: e7fe b.n 800e4ce <xQueueGiveFromISR+0x4a>
/* 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 ) ) );
800e4d0: 6b3b ldr r3, [r7, #48] ; 0x30
800e4d2: 681b ldr r3, [r3, #0]
800e4d4: 2b00 cmp r3, #0
800e4d6: d103 bne.n 800e4e0 <xQueueGiveFromISR+0x5c>
800e4d8: 6b3b ldr r3, [r7, #48] ; 0x30
800e4da: 689b ldr r3, [r3, #8]
800e4dc: 2b00 cmp r3, #0
800e4de: d101 bne.n 800e4e4 <xQueueGiveFromISR+0x60>
800e4e0: 2301 movs r3, #1
800e4e2: e000 b.n 800e4e6 <xQueueGiveFromISR+0x62>
800e4e4: 2300 movs r3, #0
800e4e6: 2b00 cmp r3, #0
800e4e8: d10b bne.n 800e502 <xQueueGiveFromISR+0x7e>
800e4ea: f04f 0350 mov.w r3, #80 ; 0x50
800e4ee: b672 cpsid i
800e4f0: f383 8811 msr BASEPRI, r3
800e4f4: f3bf 8f6f isb sy
800e4f8: f3bf 8f4f dsb sy
800e4fc: b662 cpsie i
800e4fe: 61bb str r3, [r7, #24]
800e500: e7fe b.n 800e500 <xQueueGiveFromISR+0x7c>
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();
800e502: f001 ff51 bl 80103a8 <vPortValidateInterruptPriority>
__asm volatile
800e506: f3ef 8211 mrs r2, BASEPRI
800e50a: f04f 0350 mov.w r3, #80 ; 0x50
800e50e: b672 cpsid i
800e510: f383 8811 msr BASEPRI, r3
800e514: f3bf 8f6f isb sy
800e518: f3bf 8f4f dsb sy
800e51c: b662 cpsie i
800e51e: 617a str r2, [r7, #20]
800e520: 613b str r3, [r7, #16]
return ulOriginalBASEPRI;
800e522: 697b ldr r3, [r7, #20]
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
800e524: 62fb str r3, [r7, #44] ; 0x2c
{
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
800e526: 6b3b ldr r3, [r7, #48] ; 0x30
800e528: 6b9b ldr r3, [r3, #56] ; 0x38
800e52a: 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 )
800e52c: 6b3b ldr r3, [r7, #48] ; 0x30
800e52e: 6bdb ldr r3, [r3, #60] ; 0x3c
800e530: 6aba ldr r2, [r7, #40] ; 0x28
800e532: 429a cmp r2, r3
800e534: d22b bcs.n 800e58e <xQueueGiveFromISR+0x10a>
{
const int8_t cTxLock = pxQueue->cTxLock;
800e536: 6b3b ldr r3, [r7, #48] ; 0x30
800e538: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800e53c: 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;
800e540: 6abb ldr r3, [r7, #40] ; 0x28
800e542: 1c5a adds r2, r3, #1
800e544: 6b3b ldr r3, [r7, #48] ; 0x30
800e546: 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 )
800e548: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
800e54c: f1b3 3fff cmp.w r3, #4294967295
800e550: d112 bne.n 800e578 <xQueueGiveFromISR+0xf4>
}
}
}
#else /* configUSE_QUEUE_SETS */
{
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
800e552: 6b3b ldr r3, [r7, #48] ; 0x30
800e554: 6a5b ldr r3, [r3, #36] ; 0x24
800e556: 2b00 cmp r3, #0
800e558: d016 beq.n 800e588 <xQueueGiveFromISR+0x104>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
800e55a: 6b3b ldr r3, [r7, #48] ; 0x30
800e55c: 3324 adds r3, #36 ; 0x24
800e55e: 4618 mov r0, r3
800e560: f001 f93a bl 800f7d8 <xTaskRemoveFromEventList>
800e564: 4603 mov r3, r0
800e566: 2b00 cmp r3, #0
800e568: d00e beq.n 800e588 <xQueueGiveFromISR+0x104>
{
/* The task waiting has a higher priority so record that a
context switch is required. */
if( pxHigherPriorityTaskWoken != NULL )
800e56a: 683b ldr r3, [r7, #0]
800e56c: 2b00 cmp r3, #0
800e56e: d00b beq.n 800e588 <xQueueGiveFromISR+0x104>
{
*pxHigherPriorityTaskWoken = pdTRUE;
800e570: 683b ldr r3, [r7, #0]
800e572: 2201 movs r2, #1
800e574: 601a str r2, [r3, #0]
800e576: e007 b.n 800e588 <xQueueGiveFromISR+0x104>
}
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 );
800e578: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800e57c: 3301 adds r3, #1
800e57e: b2db uxtb r3, r3
800e580: b25a sxtb r2, r3
800e582: 6b3b ldr r3, [r7, #48] ; 0x30
800e584: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
xReturn = pdPASS;
800e588: 2301 movs r3, #1
800e58a: 637b str r3, [r7, #52] ; 0x34
800e58c: e001 b.n 800e592 <xQueueGiveFromISR+0x10e>
}
else
{
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
xReturn = errQUEUE_FULL;
800e58e: 2300 movs r3, #0
800e590: 637b str r3, [r7, #52] ; 0x34
800e592: 6afb ldr r3, [r7, #44] ; 0x2c
800e594: 60fb str r3, [r7, #12]
__asm volatile
800e596: 68fb ldr r3, [r7, #12]
800e598: f383 8811 msr BASEPRI, r3
}
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return xReturn;
800e59c: 6b7b ldr r3, [r7, #52] ; 0x34
}
800e59e: 4618 mov r0, r3
800e5a0: 3738 adds r7, #56 ; 0x38
800e5a2: 46bd mov sp, r7
800e5a4: bd80 pop {r7, pc}
...
0800e5a8 <xQueueReceive>:
/*-----------------------------------------------------------*/
BaseType_t xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait )
{
800e5a8: b580 push {r7, lr}
800e5aa: b08c sub sp, #48 ; 0x30
800e5ac: af00 add r7, sp, #0
800e5ae: 60f8 str r0, [r7, #12]
800e5b0: 60b9 str r1, [r7, #8]
800e5b2: 607a str r2, [r7, #4]
BaseType_t xEntryTimeSet = pdFALSE;
800e5b4: 2300 movs r3, #0
800e5b6: 62fb str r3, [r7, #44] ; 0x2c
TimeOut_t xTimeOut;
Queue_t * const pxQueue = xQueue;
800e5b8: 68fb ldr r3, [r7, #12]
800e5ba: 62bb str r3, [r7, #40] ; 0x28
/* Check the pointer is not NULL. */
configASSERT( ( pxQueue ) );
800e5bc: 6abb ldr r3, [r7, #40] ; 0x28
800e5be: 2b00 cmp r3, #0
800e5c0: d10b bne.n 800e5da <xQueueReceive+0x32>
__asm volatile
800e5c2: f04f 0350 mov.w r3, #80 ; 0x50
800e5c6: b672 cpsid i
800e5c8: f383 8811 msr BASEPRI, r3
800e5cc: f3bf 8f6f isb sy
800e5d0: f3bf 8f4f dsb sy
800e5d4: b662 cpsie i
800e5d6: 623b str r3, [r7, #32]
800e5d8: e7fe b.n 800e5d8 <xQueueReceive+0x30>
/* 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 ) ) );
800e5da: 68bb ldr r3, [r7, #8]
800e5dc: 2b00 cmp r3, #0
800e5de: d103 bne.n 800e5e8 <xQueueReceive+0x40>
800e5e0: 6abb ldr r3, [r7, #40] ; 0x28
800e5e2: 6c1b ldr r3, [r3, #64] ; 0x40
800e5e4: 2b00 cmp r3, #0
800e5e6: d101 bne.n 800e5ec <xQueueReceive+0x44>
800e5e8: 2301 movs r3, #1
800e5ea: e000 b.n 800e5ee <xQueueReceive+0x46>
800e5ec: 2300 movs r3, #0
800e5ee: 2b00 cmp r3, #0
800e5f0: d10b bne.n 800e60a <xQueueReceive+0x62>
800e5f2: f04f 0350 mov.w r3, #80 ; 0x50
800e5f6: b672 cpsid i
800e5f8: f383 8811 msr BASEPRI, r3
800e5fc: f3bf 8f6f isb sy
800e600: f3bf 8f4f dsb sy
800e604: b662 cpsie i
800e606: 61fb str r3, [r7, #28]
800e608: e7fe b.n 800e608 <xQueueReceive+0x60>
/* Cannot block if the scheduler is suspended. */
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
{
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
800e60a: f001 faa5 bl 800fb58 <xTaskGetSchedulerState>
800e60e: 4603 mov r3, r0
800e610: 2b00 cmp r3, #0
800e612: d102 bne.n 800e61a <xQueueReceive+0x72>
800e614: 687b ldr r3, [r7, #4]
800e616: 2b00 cmp r3, #0
800e618: d101 bne.n 800e61e <xQueueReceive+0x76>
800e61a: 2301 movs r3, #1
800e61c: e000 b.n 800e620 <xQueueReceive+0x78>
800e61e: 2300 movs r3, #0
800e620: 2b00 cmp r3, #0
800e622: d10b bne.n 800e63c <xQueueReceive+0x94>
800e624: f04f 0350 mov.w r3, #80 ; 0x50
800e628: b672 cpsid i
800e62a: f383 8811 msr BASEPRI, r3
800e62e: f3bf 8f6f isb sy
800e632: f3bf 8f4f dsb sy
800e636: b662 cpsie i
800e638: 61bb str r3, [r7, #24]
800e63a: e7fe b.n 800e63a <xQueueReceive+0x92>
/*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();
800e63c: f001 fdd4 bl 80101e8 <vPortEnterCritical>
{
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
800e640: 6abb ldr r3, [r7, #40] ; 0x28
800e642: 6b9b ldr r3, [r3, #56] ; 0x38
800e644: 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 )
800e646: 6a7b ldr r3, [r7, #36] ; 0x24
800e648: 2b00 cmp r3, #0
800e64a: d01f beq.n 800e68c <xQueueReceive+0xe4>
{
/* Data available, remove one item. */
prvCopyDataFromQueue( pxQueue, pvBuffer );
800e64c: 68b9 ldr r1, [r7, #8]
800e64e: 6ab8 ldr r0, [r7, #40] ; 0x28
800e650: f000 faa1 bl 800eb96 <prvCopyDataFromQueue>
traceQUEUE_RECEIVE( pxQueue );
pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
800e654: 6a7b ldr r3, [r7, #36] ; 0x24
800e656: 1e5a subs r2, r3, #1
800e658: 6abb ldr r3, [r7, #40] ; 0x28
800e65a: 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 )
800e65c: 6abb ldr r3, [r7, #40] ; 0x28
800e65e: 691b ldr r3, [r3, #16]
800e660: 2b00 cmp r3, #0
800e662: d00f beq.n 800e684 <xQueueReceive+0xdc>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800e664: 6abb ldr r3, [r7, #40] ; 0x28
800e666: 3310 adds r3, #16
800e668: 4618 mov r0, r3
800e66a: f001 f8b5 bl 800f7d8 <xTaskRemoveFromEventList>
800e66e: 4603 mov r3, r0
800e670: 2b00 cmp r3, #0
800e672: d007 beq.n 800e684 <xQueueReceive+0xdc>
{
queueYIELD_IF_USING_PREEMPTION();
800e674: 4b3c ldr r3, [pc, #240] ; (800e768 <xQueueReceive+0x1c0>)
800e676: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e67a: 601a str r2, [r3, #0]
800e67c: f3bf 8f4f dsb sy
800e680: f3bf 8f6f isb sy
else
{
mtCOVERAGE_TEST_MARKER();
}
taskEXIT_CRITICAL();
800e684: f001 fde2 bl 801024c <vPortExitCritical>
return pdPASS;
800e688: 2301 movs r3, #1
800e68a: e069 b.n 800e760 <xQueueReceive+0x1b8>
}
else
{
if( xTicksToWait == ( TickType_t ) 0 )
800e68c: 687b ldr r3, [r7, #4]
800e68e: 2b00 cmp r3, #0
800e690: d103 bne.n 800e69a <xQueueReceive+0xf2>
{
/* The queue was empty and no block time is specified (or
the block time has expired) so leave now. */
taskEXIT_CRITICAL();
800e692: f001 fddb bl 801024c <vPortExitCritical>
traceQUEUE_RECEIVE_FAILED( pxQueue );
return errQUEUE_EMPTY;
800e696: 2300 movs r3, #0
800e698: e062 b.n 800e760 <xQueueReceive+0x1b8>
}
else if( xEntryTimeSet == pdFALSE )
800e69a: 6afb ldr r3, [r7, #44] ; 0x2c
800e69c: 2b00 cmp r3, #0
800e69e: d106 bne.n 800e6ae <xQueueReceive+0x106>
{
/* The queue was empty and a block time was specified so
configure the timeout structure. */
vTaskInternalSetTimeOutState( &xTimeOut );
800e6a0: f107 0310 add.w r3, r7, #16
800e6a4: 4618 mov r0, r3
800e6a6: f001 f8fb bl 800f8a0 <vTaskInternalSetTimeOutState>
xEntryTimeSet = pdTRUE;
800e6aa: 2301 movs r3, #1
800e6ac: 62fb str r3, [r7, #44] ; 0x2c
/* Entry time was already set. */
mtCOVERAGE_TEST_MARKER();
}
}
}
taskEXIT_CRITICAL();
800e6ae: f001 fdcd bl 801024c <vPortExitCritical>
/* Interrupts and other tasks can send to and receive from the queue
now the critical section has been exited. */
vTaskSuspendAll();
800e6b2: f000 fe61 bl 800f378 <vTaskSuspendAll>
prvLockQueue( pxQueue );
800e6b6: f001 fd97 bl 80101e8 <vPortEnterCritical>
800e6ba: 6abb ldr r3, [r7, #40] ; 0x28
800e6bc: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800e6c0: b25b sxtb r3, r3
800e6c2: f1b3 3fff cmp.w r3, #4294967295
800e6c6: d103 bne.n 800e6d0 <xQueueReceive+0x128>
800e6c8: 6abb ldr r3, [r7, #40] ; 0x28
800e6ca: 2200 movs r2, #0
800e6cc: f883 2044 strb.w r2, [r3, #68] ; 0x44
800e6d0: 6abb ldr r3, [r7, #40] ; 0x28
800e6d2: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800e6d6: b25b sxtb r3, r3
800e6d8: f1b3 3fff cmp.w r3, #4294967295
800e6dc: d103 bne.n 800e6e6 <xQueueReceive+0x13e>
800e6de: 6abb ldr r3, [r7, #40] ; 0x28
800e6e0: 2200 movs r2, #0
800e6e2: f883 2045 strb.w r2, [r3, #69] ; 0x45
800e6e6: f001 fdb1 bl 801024c <vPortExitCritical>
/* Update the timeout state to see if it has expired yet. */
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
800e6ea: 1d3a adds r2, r7, #4
800e6ec: f107 0310 add.w r3, r7, #16
800e6f0: 4611 mov r1, r2
800e6f2: 4618 mov r0, r3
800e6f4: f001 f8ea bl 800f8cc <xTaskCheckForTimeOut>
800e6f8: 4603 mov r3, r0
800e6fa: 2b00 cmp r3, #0
800e6fc: d123 bne.n 800e746 <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 )
800e6fe: 6ab8 ldr r0, [r7, #40] ; 0x28
800e700: f000 fac1 bl 800ec86 <prvIsQueueEmpty>
800e704: 4603 mov r3, r0
800e706: 2b00 cmp r3, #0
800e708: d017 beq.n 800e73a <xQueueReceive+0x192>
{
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
800e70a: 6abb ldr r3, [r7, #40] ; 0x28
800e70c: 3324 adds r3, #36 ; 0x24
800e70e: 687a ldr r2, [r7, #4]
800e710: 4611 mov r1, r2
800e712: 4618 mov r0, r3
800e714: f001 f83a bl 800f78c <vTaskPlaceOnEventList>
prvUnlockQueue( pxQueue );
800e718: 6ab8 ldr r0, [r7, #40] ; 0x28
800e71a: f000 fa62 bl 800ebe2 <prvUnlockQueue>
if( xTaskResumeAll() == pdFALSE )
800e71e: f000 fe39 bl 800f394 <xTaskResumeAll>
800e722: 4603 mov r3, r0
800e724: 2b00 cmp r3, #0
800e726: d189 bne.n 800e63c <xQueueReceive+0x94>
{
portYIELD_WITHIN_API();
800e728: 4b0f ldr r3, [pc, #60] ; (800e768 <xQueueReceive+0x1c0>)
800e72a: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e72e: 601a str r2, [r3, #0]
800e730: f3bf 8f4f dsb sy
800e734: f3bf 8f6f isb sy
800e738: e780 b.n 800e63c <xQueueReceive+0x94>
}
else
{
/* The queue contains data again. Loop back to try and read the
data. */
prvUnlockQueue( pxQueue );
800e73a: 6ab8 ldr r0, [r7, #40] ; 0x28
800e73c: f000 fa51 bl 800ebe2 <prvUnlockQueue>
( void ) xTaskResumeAll();
800e740: f000 fe28 bl 800f394 <xTaskResumeAll>
800e744: e77a b.n 800e63c <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 );
800e746: 6ab8 ldr r0, [r7, #40] ; 0x28
800e748: f000 fa4b bl 800ebe2 <prvUnlockQueue>
( void ) xTaskResumeAll();
800e74c: f000 fe22 bl 800f394 <xTaskResumeAll>
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
800e750: 6ab8 ldr r0, [r7, #40] ; 0x28
800e752: f000 fa98 bl 800ec86 <prvIsQueueEmpty>
800e756: 4603 mov r3, r0
800e758: 2b00 cmp r3, #0
800e75a: f43f af6f beq.w 800e63c <xQueueReceive+0x94>
{
traceQUEUE_RECEIVE_FAILED( pxQueue );
return errQUEUE_EMPTY;
800e75e: 2300 movs r3, #0
{
mtCOVERAGE_TEST_MARKER();
}
}
} /*lint -restore */
}
800e760: 4618 mov r0, r3
800e762: 3730 adds r7, #48 ; 0x30
800e764: 46bd mov sp, r7
800e766: bd80 pop {r7, pc}
800e768: e000ed04 .word 0xe000ed04
0800e76c <xQueueSemaphoreTake>:
/*-----------------------------------------------------------*/
BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait )
{
800e76c: b580 push {r7, lr}
800e76e: b08e sub sp, #56 ; 0x38
800e770: af00 add r7, sp, #0
800e772: 6078 str r0, [r7, #4]
800e774: 6039 str r1, [r7, #0]
BaseType_t xEntryTimeSet = pdFALSE;
800e776: 2300 movs r3, #0
800e778: 637b str r3, [r7, #52] ; 0x34
TimeOut_t xTimeOut;
Queue_t * const pxQueue = xQueue;
800e77a: 687b ldr r3, [r7, #4]
800e77c: 62fb str r3, [r7, #44] ; 0x2c
#if( configUSE_MUTEXES == 1 )
BaseType_t xInheritanceOccurred = pdFALSE;
800e77e: 2300 movs r3, #0
800e780: 633b str r3, [r7, #48] ; 0x30
#endif
/* Check the queue pointer is not NULL. */
configASSERT( ( pxQueue ) );
800e782: 6afb ldr r3, [r7, #44] ; 0x2c
800e784: 2b00 cmp r3, #0
800e786: d10b bne.n 800e7a0 <xQueueSemaphoreTake+0x34>
800e788: f04f 0350 mov.w r3, #80 ; 0x50
800e78c: b672 cpsid i
800e78e: f383 8811 msr BASEPRI, r3
800e792: f3bf 8f6f isb sy
800e796: f3bf 8f4f dsb sy
800e79a: b662 cpsie i
800e79c: 623b str r3, [r7, #32]
800e79e: e7fe b.n 800e79e <xQueueSemaphoreTake+0x32>
/* Check this really is a semaphore, in which case the item size will be
0. */
configASSERT( pxQueue->uxItemSize == 0 );
800e7a0: 6afb ldr r3, [r7, #44] ; 0x2c
800e7a2: 6c1b ldr r3, [r3, #64] ; 0x40
800e7a4: 2b00 cmp r3, #0
800e7a6: d00b beq.n 800e7c0 <xQueueSemaphoreTake+0x54>
800e7a8: f04f 0350 mov.w r3, #80 ; 0x50
800e7ac: b672 cpsid i
800e7ae: f383 8811 msr BASEPRI, r3
800e7b2: f3bf 8f6f isb sy
800e7b6: f3bf 8f4f dsb sy
800e7ba: b662 cpsie i
800e7bc: 61fb str r3, [r7, #28]
800e7be: e7fe b.n 800e7be <xQueueSemaphoreTake+0x52>
/* Cannot block if the scheduler is suspended. */
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
{
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
800e7c0: f001 f9ca bl 800fb58 <xTaskGetSchedulerState>
800e7c4: 4603 mov r3, r0
800e7c6: 2b00 cmp r3, #0
800e7c8: d102 bne.n 800e7d0 <xQueueSemaphoreTake+0x64>
800e7ca: 683b ldr r3, [r7, #0]
800e7cc: 2b00 cmp r3, #0
800e7ce: d101 bne.n 800e7d4 <xQueueSemaphoreTake+0x68>
800e7d0: 2301 movs r3, #1
800e7d2: e000 b.n 800e7d6 <xQueueSemaphoreTake+0x6a>
800e7d4: 2300 movs r3, #0
800e7d6: 2b00 cmp r3, #0
800e7d8: d10b bne.n 800e7f2 <xQueueSemaphoreTake+0x86>
800e7da: f04f 0350 mov.w r3, #80 ; 0x50
800e7de: b672 cpsid i
800e7e0: f383 8811 msr BASEPRI, r3
800e7e4: f3bf 8f6f isb sy
800e7e8: f3bf 8f4f dsb sy
800e7ec: b662 cpsie i
800e7ee: 61bb str r3, [r7, #24]
800e7f0: e7fe b.n 800e7f0 <xQueueSemaphoreTake+0x84>
/*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();
800e7f2: f001 fcf9 bl 80101e8 <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;
800e7f6: 6afb ldr r3, [r7, #44] ; 0x2c
800e7f8: 6b9b ldr r3, [r3, #56] ; 0x38
800e7fa: 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 )
800e7fc: 6abb ldr r3, [r7, #40] ; 0x28
800e7fe: 2b00 cmp r3, #0
800e800: d024 beq.n 800e84c <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;
800e802: 6abb ldr r3, [r7, #40] ; 0x28
800e804: 1e5a subs r2, r3, #1
800e806: 6afb ldr r3, [r7, #44] ; 0x2c
800e808: 639a str r2, [r3, #56] ; 0x38
#if ( configUSE_MUTEXES == 1 )
{
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
800e80a: 6afb ldr r3, [r7, #44] ; 0x2c
800e80c: 681b ldr r3, [r3, #0]
800e80e: 2b00 cmp r3, #0
800e810: d104 bne.n 800e81c <xQueueSemaphoreTake+0xb0>
{
/* Record the information required to implement
priority inheritance should it become necessary. */
pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount();
800e812: f001 fb63 bl 800fedc <pvTaskIncrementMutexHeldCount>
800e816: 4602 mov r2, r0
800e818: 6afb ldr r3, [r7, #44] ; 0x2c
800e81a: 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 )
800e81c: 6afb ldr r3, [r7, #44] ; 0x2c
800e81e: 691b ldr r3, [r3, #16]
800e820: 2b00 cmp r3, #0
800e822: d00f beq.n 800e844 <xQueueSemaphoreTake+0xd8>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800e824: 6afb ldr r3, [r7, #44] ; 0x2c
800e826: 3310 adds r3, #16
800e828: 4618 mov r0, r3
800e82a: f000 ffd5 bl 800f7d8 <xTaskRemoveFromEventList>
800e82e: 4603 mov r3, r0
800e830: 2b00 cmp r3, #0
800e832: d007 beq.n 800e844 <xQueueSemaphoreTake+0xd8>
{
queueYIELD_IF_USING_PREEMPTION();
800e834: 4b54 ldr r3, [pc, #336] ; (800e988 <xQueueSemaphoreTake+0x21c>)
800e836: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e83a: 601a str r2, [r3, #0]
800e83c: f3bf 8f4f dsb sy
800e840: f3bf 8f6f isb sy
else
{
mtCOVERAGE_TEST_MARKER();
}
taskEXIT_CRITICAL();
800e844: f001 fd02 bl 801024c <vPortExitCritical>
return pdPASS;
800e848: 2301 movs r3, #1
800e84a: e098 b.n 800e97e <xQueueSemaphoreTake+0x212>
}
else
{
if( xTicksToWait == ( TickType_t ) 0 )
800e84c: 683b ldr r3, [r7, #0]
800e84e: 2b00 cmp r3, #0
800e850: d112 bne.n 800e878 <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 );
800e852: 6b3b ldr r3, [r7, #48] ; 0x30
800e854: 2b00 cmp r3, #0
800e856: d00b beq.n 800e870 <xQueueSemaphoreTake+0x104>
800e858: f04f 0350 mov.w r3, #80 ; 0x50
800e85c: b672 cpsid i
800e85e: f383 8811 msr BASEPRI, r3
800e862: f3bf 8f6f isb sy
800e866: f3bf 8f4f dsb sy
800e86a: b662 cpsie i
800e86c: 617b str r3, [r7, #20]
800e86e: e7fe b.n 800e86e <xQueueSemaphoreTake+0x102>
}
#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();
800e870: f001 fcec bl 801024c <vPortExitCritical>
traceQUEUE_RECEIVE_FAILED( pxQueue );
return errQUEUE_EMPTY;
800e874: 2300 movs r3, #0
800e876: e082 b.n 800e97e <xQueueSemaphoreTake+0x212>
}
else if( xEntryTimeSet == pdFALSE )
800e878: 6b7b ldr r3, [r7, #52] ; 0x34
800e87a: 2b00 cmp r3, #0
800e87c: d106 bne.n 800e88c <xQueueSemaphoreTake+0x120>
{
/* The semaphore count was 0 and a block time was specified
so configure the timeout structure ready to block. */
vTaskInternalSetTimeOutState( &xTimeOut );
800e87e: f107 030c add.w r3, r7, #12
800e882: 4618 mov r0, r3
800e884: f001 f80c bl 800f8a0 <vTaskInternalSetTimeOutState>
xEntryTimeSet = pdTRUE;
800e888: 2301 movs r3, #1
800e88a: 637b str r3, [r7, #52] ; 0x34
/* Entry time was already set. */
mtCOVERAGE_TEST_MARKER();
}
}
}
taskEXIT_CRITICAL();
800e88c: f001 fcde bl 801024c <vPortExitCritical>
/* Interrupts and other tasks can give to and take from the semaphore
now the critical section has been exited. */
vTaskSuspendAll();
800e890: f000 fd72 bl 800f378 <vTaskSuspendAll>
prvLockQueue( pxQueue );
800e894: f001 fca8 bl 80101e8 <vPortEnterCritical>
800e898: 6afb ldr r3, [r7, #44] ; 0x2c
800e89a: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800e89e: b25b sxtb r3, r3
800e8a0: f1b3 3fff cmp.w r3, #4294967295
800e8a4: d103 bne.n 800e8ae <xQueueSemaphoreTake+0x142>
800e8a6: 6afb ldr r3, [r7, #44] ; 0x2c
800e8a8: 2200 movs r2, #0
800e8aa: f883 2044 strb.w r2, [r3, #68] ; 0x44
800e8ae: 6afb ldr r3, [r7, #44] ; 0x2c
800e8b0: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800e8b4: b25b sxtb r3, r3
800e8b6: f1b3 3fff cmp.w r3, #4294967295
800e8ba: d103 bne.n 800e8c4 <xQueueSemaphoreTake+0x158>
800e8bc: 6afb ldr r3, [r7, #44] ; 0x2c
800e8be: 2200 movs r2, #0
800e8c0: f883 2045 strb.w r2, [r3, #69] ; 0x45
800e8c4: f001 fcc2 bl 801024c <vPortExitCritical>
/* Update the timeout state to see if it has expired yet. */
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
800e8c8: 463a mov r2, r7
800e8ca: f107 030c add.w r3, r7, #12
800e8ce: 4611 mov r1, r2
800e8d0: 4618 mov r0, r3
800e8d2: f000 fffb bl 800f8cc <xTaskCheckForTimeOut>
800e8d6: 4603 mov r3, r0
800e8d8: 2b00 cmp r3, #0
800e8da: d132 bne.n 800e942 <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 )
800e8dc: 6af8 ldr r0, [r7, #44] ; 0x2c
800e8de: f000 f9d2 bl 800ec86 <prvIsQueueEmpty>
800e8e2: 4603 mov r3, r0
800e8e4: 2b00 cmp r3, #0
800e8e6: d026 beq.n 800e936 <xQueueSemaphoreTake+0x1ca>
{
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );
#if ( configUSE_MUTEXES == 1 )
{
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
800e8e8: 6afb ldr r3, [r7, #44] ; 0x2c
800e8ea: 681b ldr r3, [r3, #0]
800e8ec: 2b00 cmp r3, #0
800e8ee: d109 bne.n 800e904 <xQueueSemaphoreTake+0x198>
{
taskENTER_CRITICAL();
800e8f0: f001 fc7a bl 80101e8 <vPortEnterCritical>
{
xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder );
800e8f4: 6afb ldr r3, [r7, #44] ; 0x2c
800e8f6: 689b ldr r3, [r3, #8]
800e8f8: 4618 mov r0, r3
800e8fa: f001 f94b bl 800fb94 <xTaskPriorityInherit>
800e8fe: 6338 str r0, [r7, #48] ; 0x30
}
taskEXIT_CRITICAL();
800e900: f001 fca4 bl 801024c <vPortExitCritical>
mtCOVERAGE_TEST_MARKER();
}
}
#endif
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
800e904: 6afb ldr r3, [r7, #44] ; 0x2c
800e906: 3324 adds r3, #36 ; 0x24
800e908: 683a ldr r2, [r7, #0]
800e90a: 4611 mov r1, r2
800e90c: 4618 mov r0, r3
800e90e: f000 ff3d bl 800f78c <vTaskPlaceOnEventList>
prvUnlockQueue( pxQueue );
800e912: 6af8 ldr r0, [r7, #44] ; 0x2c
800e914: f000 f965 bl 800ebe2 <prvUnlockQueue>
if( xTaskResumeAll() == pdFALSE )
800e918: f000 fd3c bl 800f394 <xTaskResumeAll>
800e91c: 4603 mov r3, r0
800e91e: 2b00 cmp r3, #0
800e920: f47f af67 bne.w 800e7f2 <xQueueSemaphoreTake+0x86>
{
portYIELD_WITHIN_API();
800e924: 4b18 ldr r3, [pc, #96] ; (800e988 <xQueueSemaphoreTake+0x21c>)
800e926: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e92a: 601a str r2, [r3, #0]
800e92c: f3bf 8f4f dsb sy
800e930: f3bf 8f6f isb sy
800e934: e75d b.n 800e7f2 <xQueueSemaphoreTake+0x86>
}
else
{
/* There was no timeout and the semaphore count was not 0, so
attempt to take the semaphore again. */
prvUnlockQueue( pxQueue );
800e936: 6af8 ldr r0, [r7, #44] ; 0x2c
800e938: f000 f953 bl 800ebe2 <prvUnlockQueue>
( void ) xTaskResumeAll();
800e93c: f000 fd2a bl 800f394 <xTaskResumeAll>
800e940: e757 b.n 800e7f2 <xQueueSemaphoreTake+0x86>
}
}
else
{
/* Timed out. */
prvUnlockQueue( pxQueue );
800e942: 6af8 ldr r0, [r7, #44] ; 0x2c
800e944: f000 f94d bl 800ebe2 <prvUnlockQueue>
( void ) xTaskResumeAll();
800e948: f000 fd24 bl 800f394 <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 )
800e94c: 6af8 ldr r0, [r7, #44] ; 0x2c
800e94e: f000 f99a bl 800ec86 <prvIsQueueEmpty>
800e952: 4603 mov r3, r0
800e954: 2b00 cmp r3, #0
800e956: f43f af4c beq.w 800e7f2 <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 )
800e95a: 6b3b ldr r3, [r7, #48] ; 0x30
800e95c: 2b00 cmp r3, #0
800e95e: d00d beq.n 800e97c <xQueueSemaphoreTake+0x210>
{
taskENTER_CRITICAL();
800e960: f001 fc42 bl 80101e8 <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 );
800e964: 6af8 ldr r0, [r7, #44] ; 0x2c
800e966: f000 f894 bl 800ea92 <prvGetDisinheritPriorityAfterTimeout>
800e96a: 6278 str r0, [r7, #36] ; 0x24
vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority );
800e96c: 6afb ldr r3, [r7, #44] ; 0x2c
800e96e: 689b ldr r3, [r3, #8]
800e970: 6a79 ldr r1, [r7, #36] ; 0x24
800e972: 4618 mov r0, r3
800e974: f001 fa16 bl 800fda4 <vTaskPriorityDisinheritAfterTimeout>
}
taskEXIT_CRITICAL();
800e978: f001 fc68 bl 801024c <vPortExitCritical>
}
}
#endif /* configUSE_MUTEXES */
traceQUEUE_RECEIVE_FAILED( pxQueue );
return errQUEUE_EMPTY;
800e97c: 2300 movs r3, #0
{
mtCOVERAGE_TEST_MARKER();
}
}
} /*lint -restore */
}
800e97e: 4618 mov r0, r3
800e980: 3738 adds r7, #56 ; 0x38
800e982: 46bd mov sp, r7
800e984: bd80 pop {r7, pc}
800e986: bf00 nop
800e988: e000ed04 .word 0xe000ed04
0800e98c <xQueueReceiveFromISR>:
} /*lint -restore */
}
/*-----------------------------------------------------------*/
BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken )
{
800e98c: b580 push {r7, lr}
800e98e: b08e sub sp, #56 ; 0x38
800e990: af00 add r7, sp, #0
800e992: 60f8 str r0, [r7, #12]
800e994: 60b9 str r1, [r7, #8]
800e996: 607a str r2, [r7, #4]
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
Queue_t * const pxQueue = xQueue;
800e998: 68fb ldr r3, [r7, #12]
800e99a: 633b str r3, [r7, #48] ; 0x30
configASSERT( pxQueue );
800e99c: 6b3b ldr r3, [r7, #48] ; 0x30
800e99e: 2b00 cmp r3, #0
800e9a0: d10b bne.n 800e9ba <xQueueReceiveFromISR+0x2e>
800e9a2: f04f 0350 mov.w r3, #80 ; 0x50
800e9a6: b672 cpsid i
800e9a8: f383 8811 msr BASEPRI, r3
800e9ac: f3bf 8f6f isb sy
800e9b0: f3bf 8f4f dsb sy
800e9b4: b662 cpsie i
800e9b6: 623b str r3, [r7, #32]
800e9b8: e7fe b.n 800e9b8 <xQueueReceiveFromISR+0x2c>
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
800e9ba: 68bb ldr r3, [r7, #8]
800e9bc: 2b00 cmp r3, #0
800e9be: d103 bne.n 800e9c8 <xQueueReceiveFromISR+0x3c>
800e9c0: 6b3b ldr r3, [r7, #48] ; 0x30
800e9c2: 6c1b ldr r3, [r3, #64] ; 0x40
800e9c4: 2b00 cmp r3, #0
800e9c6: d101 bne.n 800e9cc <xQueueReceiveFromISR+0x40>
800e9c8: 2301 movs r3, #1
800e9ca: e000 b.n 800e9ce <xQueueReceiveFromISR+0x42>
800e9cc: 2300 movs r3, #0
800e9ce: 2b00 cmp r3, #0
800e9d0: d10b bne.n 800e9ea <xQueueReceiveFromISR+0x5e>
800e9d2: f04f 0350 mov.w r3, #80 ; 0x50
800e9d6: b672 cpsid i
800e9d8: f383 8811 msr BASEPRI, r3
800e9dc: f3bf 8f6f isb sy
800e9e0: f3bf 8f4f dsb sy
800e9e4: b662 cpsie i
800e9e6: 61fb str r3, [r7, #28]
800e9e8: e7fe b.n 800e9e8 <xQueueReceiveFromISR+0x5c>
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();
800e9ea: f001 fcdd bl 80103a8 <vPortValidateInterruptPriority>
__asm volatile
800e9ee: f3ef 8211 mrs r2, BASEPRI
800e9f2: f04f 0350 mov.w r3, #80 ; 0x50
800e9f6: b672 cpsid i
800e9f8: f383 8811 msr BASEPRI, r3
800e9fc: f3bf 8f6f isb sy
800ea00: f3bf 8f4f dsb sy
800ea04: b662 cpsie i
800ea06: 61ba str r2, [r7, #24]
800ea08: 617b str r3, [r7, #20]
return ulOriginalBASEPRI;
800ea0a: 69bb ldr r3, [r7, #24]
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
800ea0c: 62fb str r3, [r7, #44] ; 0x2c
{
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
800ea0e: 6b3b ldr r3, [r7, #48] ; 0x30
800ea10: 6b9b ldr r3, [r3, #56] ; 0x38
800ea12: 62bb str r3, [r7, #40] ; 0x28
/* Cannot block in an ISR, so check there is data available. */
if( uxMessagesWaiting > ( UBaseType_t ) 0 )
800ea14: 6abb ldr r3, [r7, #40] ; 0x28
800ea16: 2b00 cmp r3, #0
800ea18: d02f beq.n 800ea7a <xQueueReceiveFromISR+0xee>
{
const int8_t cRxLock = pxQueue->cRxLock;
800ea1a: 6b3b ldr r3, [r7, #48] ; 0x30
800ea1c: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800ea20: f887 3027 strb.w r3, [r7, #39] ; 0x27
traceQUEUE_RECEIVE_FROM_ISR( pxQueue );
prvCopyDataFromQueue( pxQueue, pvBuffer );
800ea24: 68b9 ldr r1, [r7, #8]
800ea26: 6b38 ldr r0, [r7, #48] ; 0x30
800ea28: f000 f8b5 bl 800eb96 <prvCopyDataFromQueue>
pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
800ea2c: 6abb ldr r3, [r7, #40] ; 0x28
800ea2e: 1e5a subs r2, r3, #1
800ea30: 6b3b ldr r3, [r7, #48] ; 0x30
800ea32: 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 )
800ea34: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
800ea38: f1b3 3fff cmp.w r3, #4294967295
800ea3c: d112 bne.n 800ea64 <xQueueReceiveFromISR+0xd8>
{
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
800ea3e: 6b3b ldr r3, [r7, #48] ; 0x30
800ea40: 691b ldr r3, [r3, #16]
800ea42: 2b00 cmp r3, #0
800ea44: d016 beq.n 800ea74 <xQueueReceiveFromISR+0xe8>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800ea46: 6b3b ldr r3, [r7, #48] ; 0x30
800ea48: 3310 adds r3, #16
800ea4a: 4618 mov r0, r3
800ea4c: f000 fec4 bl 800f7d8 <xTaskRemoveFromEventList>
800ea50: 4603 mov r3, r0
800ea52: 2b00 cmp r3, #0
800ea54: d00e beq.n 800ea74 <xQueueReceiveFromISR+0xe8>
{
/* The task waiting has a higher priority than us so
force a context switch. */
if( pxHigherPriorityTaskWoken != NULL )
800ea56: 687b ldr r3, [r7, #4]
800ea58: 2b00 cmp r3, #0
800ea5a: d00b beq.n 800ea74 <xQueueReceiveFromISR+0xe8>
{
*pxHigherPriorityTaskWoken = pdTRUE;
800ea5c: 687b ldr r3, [r7, #4]
800ea5e: 2201 movs r2, #1
800ea60: 601a str r2, [r3, #0]
800ea62: e007 b.n 800ea74 <xQueueReceiveFromISR+0xe8>
}
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 );
800ea64: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800ea68: 3301 adds r3, #1
800ea6a: b2db uxtb r3, r3
800ea6c: b25a sxtb r2, r3
800ea6e: 6b3b ldr r3, [r7, #48] ; 0x30
800ea70: f883 2044 strb.w r2, [r3, #68] ; 0x44
}
xReturn = pdPASS;
800ea74: 2301 movs r3, #1
800ea76: 637b str r3, [r7, #52] ; 0x34
800ea78: e001 b.n 800ea7e <xQueueReceiveFromISR+0xf2>
}
else
{
xReturn = pdFAIL;
800ea7a: 2300 movs r3, #0
800ea7c: 637b str r3, [r7, #52] ; 0x34
800ea7e: 6afb ldr r3, [r7, #44] ; 0x2c
800ea80: 613b str r3, [r7, #16]
__asm volatile
800ea82: 693b ldr r3, [r7, #16]
800ea84: f383 8811 msr BASEPRI, r3
traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );
}
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return xReturn;
800ea88: 6b7b ldr r3, [r7, #52] ; 0x34
}
800ea8a: 4618 mov r0, r3
800ea8c: 3738 adds r7, #56 ; 0x38
800ea8e: 46bd mov sp, r7
800ea90: bd80 pop {r7, pc}
0800ea92 <prvGetDisinheritPriorityAfterTimeout>:
/*-----------------------------------------------------------*/
#if( configUSE_MUTEXES == 1 )
static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue )
{
800ea92: b480 push {r7}
800ea94: b085 sub sp, #20
800ea96: af00 add r7, sp, #0
800ea98: 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 )
800ea9a: 687b ldr r3, [r7, #4]
800ea9c: 6a5b ldr r3, [r3, #36] ; 0x24
800ea9e: 2b00 cmp r3, #0
800eaa0: d006 beq.n 800eab0 <prvGetDisinheritPriorityAfterTimeout+0x1e>
{
uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) );
800eaa2: 687b ldr r3, [r7, #4]
800eaa4: 6b1b ldr r3, [r3, #48] ; 0x30
800eaa6: 681b ldr r3, [r3, #0]
800eaa8: f1c3 0307 rsb r3, r3, #7
800eaac: 60fb str r3, [r7, #12]
800eaae: e001 b.n 800eab4 <prvGetDisinheritPriorityAfterTimeout+0x22>
}
else
{
uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY;
800eab0: 2300 movs r3, #0
800eab2: 60fb str r3, [r7, #12]
}
return uxHighestPriorityOfWaitingTasks;
800eab4: 68fb ldr r3, [r7, #12]
}
800eab6: 4618 mov r0, r3
800eab8: 3714 adds r7, #20
800eaba: 46bd mov sp, r7
800eabc: f85d 7b04 ldr.w r7, [sp], #4
800eac0: 4770 bx lr
0800eac2 <prvCopyDataToQueue>:
#endif /* configUSE_MUTEXES */
/*-----------------------------------------------------------*/
static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition )
{
800eac2: b580 push {r7, lr}
800eac4: b086 sub sp, #24
800eac6: af00 add r7, sp, #0
800eac8: 60f8 str r0, [r7, #12]
800eaca: 60b9 str r1, [r7, #8]
800eacc: 607a str r2, [r7, #4]
BaseType_t xReturn = pdFALSE;
800eace: 2300 movs r3, #0
800ead0: 617b str r3, [r7, #20]
UBaseType_t uxMessagesWaiting;
/* This function is called from a critical section. */
uxMessagesWaiting = pxQueue->uxMessagesWaiting;
800ead2: 68fb ldr r3, [r7, #12]
800ead4: 6b9b ldr r3, [r3, #56] ; 0x38
800ead6: 613b str r3, [r7, #16]
if( pxQueue->uxItemSize == ( UBaseType_t ) 0 )
800ead8: 68fb ldr r3, [r7, #12]
800eada: 6c1b ldr r3, [r3, #64] ; 0x40
800eadc: 2b00 cmp r3, #0
800eade: d10d bne.n 800eafc <prvCopyDataToQueue+0x3a>
{
#if ( configUSE_MUTEXES == 1 )
{
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
800eae0: 68fb ldr r3, [r7, #12]
800eae2: 681b ldr r3, [r3, #0]
800eae4: 2b00 cmp r3, #0
800eae6: d14d bne.n 800eb84 <prvCopyDataToQueue+0xc2>
{
/* The mutex is no longer being held. */
xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder );
800eae8: 68fb ldr r3, [r7, #12]
800eaea: 689b ldr r3, [r3, #8]
800eaec: 4618 mov r0, r3
800eaee: f001 f8d1 bl 800fc94 <xTaskPriorityDisinherit>
800eaf2: 6178 str r0, [r7, #20]
pxQueue->u.xSemaphore.xMutexHolder = NULL;
800eaf4: 68fb ldr r3, [r7, #12]
800eaf6: 2200 movs r2, #0
800eaf8: 609a str r2, [r3, #8]
800eafa: e043 b.n 800eb84 <prvCopyDataToQueue+0xc2>
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_MUTEXES */
}
else if( xPosition == queueSEND_TO_BACK )
800eafc: 687b ldr r3, [r7, #4]
800eafe: 2b00 cmp r3, #0
800eb00: d119 bne.n 800eb36 <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. */
800eb02: 68fb ldr r3, [r7, #12]
800eb04: 6858 ldr r0, [r3, #4]
800eb06: 68fb ldr r3, [r7, #12]
800eb08: 6c1b ldr r3, [r3, #64] ; 0x40
800eb0a: 461a mov r2, r3
800eb0c: 68b9 ldr r1, [r7, #8]
800eb0e: f00e f8c6 bl 801cc9e <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. */
800eb12: 68fb ldr r3, [r7, #12]
800eb14: 685a ldr r2, [r3, #4]
800eb16: 68fb ldr r3, [r7, #12]
800eb18: 6c1b ldr r3, [r3, #64] ; 0x40
800eb1a: 441a add r2, r3
800eb1c: 68fb ldr r3, [r7, #12]
800eb1e: 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. */
800eb20: 68fb ldr r3, [r7, #12]
800eb22: 685a ldr r2, [r3, #4]
800eb24: 68fb ldr r3, [r7, #12]
800eb26: 689b ldr r3, [r3, #8]
800eb28: 429a cmp r2, r3
800eb2a: d32b bcc.n 800eb84 <prvCopyDataToQueue+0xc2>
{
pxQueue->pcWriteTo = pxQueue->pcHead;
800eb2c: 68fb ldr r3, [r7, #12]
800eb2e: 681a ldr r2, [r3, #0]
800eb30: 68fb ldr r3, [r7, #12]
800eb32: 605a str r2, [r3, #4]
800eb34: e026 b.n 800eb84 <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. */
800eb36: 68fb ldr r3, [r7, #12]
800eb38: 68d8 ldr r0, [r3, #12]
800eb3a: 68fb ldr r3, [r7, #12]
800eb3c: 6c1b ldr r3, [r3, #64] ; 0x40
800eb3e: 461a mov r2, r3
800eb40: 68b9 ldr r1, [r7, #8]
800eb42: f00e f8ac bl 801cc9e <memcpy>
pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize;
800eb46: 68fb ldr r3, [r7, #12]
800eb48: 68da ldr r2, [r3, #12]
800eb4a: 68fb ldr r3, [r7, #12]
800eb4c: 6c1b ldr r3, [r3, #64] ; 0x40
800eb4e: 425b negs r3, r3
800eb50: 441a add r2, r3
800eb52: 68fb ldr r3, [r7, #12]
800eb54: 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. */
800eb56: 68fb ldr r3, [r7, #12]
800eb58: 68da ldr r2, [r3, #12]
800eb5a: 68fb ldr r3, [r7, #12]
800eb5c: 681b ldr r3, [r3, #0]
800eb5e: 429a cmp r2, r3
800eb60: d207 bcs.n 800eb72 <prvCopyDataToQueue+0xb0>
{
pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize );
800eb62: 68fb ldr r3, [r7, #12]
800eb64: 689a ldr r2, [r3, #8]
800eb66: 68fb ldr r3, [r7, #12]
800eb68: 6c1b ldr r3, [r3, #64] ; 0x40
800eb6a: 425b negs r3, r3
800eb6c: 441a add r2, r3
800eb6e: 68fb ldr r3, [r7, #12]
800eb70: 60da str r2, [r3, #12]
else
{
mtCOVERAGE_TEST_MARKER();
}
if( xPosition == queueOVERWRITE )
800eb72: 687b ldr r3, [r7, #4]
800eb74: 2b02 cmp r3, #2
800eb76: d105 bne.n 800eb84 <prvCopyDataToQueue+0xc2>
{
if( uxMessagesWaiting > ( UBaseType_t ) 0 )
800eb78: 693b ldr r3, [r7, #16]
800eb7a: 2b00 cmp r3, #0
800eb7c: d002 beq.n 800eb84 <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;
800eb7e: 693b ldr r3, [r7, #16]
800eb80: 3b01 subs r3, #1
800eb82: 613b str r3, [r7, #16]
{
mtCOVERAGE_TEST_MARKER();
}
}
pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;
800eb84: 693b ldr r3, [r7, #16]
800eb86: 1c5a adds r2, r3, #1
800eb88: 68fb ldr r3, [r7, #12]
800eb8a: 639a str r2, [r3, #56] ; 0x38
return xReturn;
800eb8c: 697b ldr r3, [r7, #20]
}
800eb8e: 4618 mov r0, r3
800eb90: 3718 adds r7, #24
800eb92: 46bd mov sp, r7
800eb94: bd80 pop {r7, pc}
0800eb96 <prvCopyDataFromQueue>:
/*-----------------------------------------------------------*/
static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer )
{
800eb96: b580 push {r7, lr}
800eb98: b082 sub sp, #8
800eb9a: af00 add r7, sp, #0
800eb9c: 6078 str r0, [r7, #4]
800eb9e: 6039 str r1, [r7, #0]
if( pxQueue->uxItemSize != ( UBaseType_t ) 0 )
800eba0: 687b ldr r3, [r7, #4]
800eba2: 6c1b ldr r3, [r3, #64] ; 0x40
800eba4: 2b00 cmp r3, #0
800eba6: d018 beq.n 800ebda <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. */
800eba8: 687b ldr r3, [r7, #4]
800ebaa: 68da ldr r2, [r3, #12]
800ebac: 687b ldr r3, [r7, #4]
800ebae: 6c1b ldr r3, [r3, #64] ; 0x40
800ebb0: 441a add r2, r3
800ebb2: 687b ldr r3, [r7, #4]
800ebb4: 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. */
800ebb6: 687b ldr r3, [r7, #4]
800ebb8: 68da ldr r2, [r3, #12]
800ebba: 687b ldr r3, [r7, #4]
800ebbc: 689b ldr r3, [r3, #8]
800ebbe: 429a cmp r2, r3
800ebc0: d303 bcc.n 800ebca <prvCopyDataFromQueue+0x34>
{
pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead;
800ebc2: 687b ldr r3, [r7, #4]
800ebc4: 681a ldr r2, [r3, #0]
800ebc6: 687b ldr r3, [r7, #4]
800ebc8: 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. */
800ebca: 687b ldr r3, [r7, #4]
800ebcc: 68d9 ldr r1, [r3, #12]
800ebce: 687b ldr r3, [r7, #4]
800ebd0: 6c1b ldr r3, [r3, #64] ; 0x40
800ebd2: 461a mov r2, r3
800ebd4: 6838 ldr r0, [r7, #0]
800ebd6: f00e f862 bl 801cc9e <memcpy>
}
}
800ebda: bf00 nop
800ebdc: 3708 adds r7, #8
800ebde: 46bd mov sp, r7
800ebe0: bd80 pop {r7, pc}
0800ebe2 <prvUnlockQueue>:
/*-----------------------------------------------------------*/
static void prvUnlockQueue( Queue_t * const pxQueue )
{
800ebe2: b580 push {r7, lr}
800ebe4: b084 sub sp, #16
800ebe6: af00 add r7, sp, #0
800ebe8: 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();
800ebea: f001 fafd bl 80101e8 <vPortEnterCritical>
{
int8_t cTxLock = pxQueue->cTxLock;
800ebee: 687b ldr r3, [r7, #4]
800ebf0: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800ebf4: 73fb strb r3, [r7, #15]
/* See if data was added to the queue while it was locked. */
while( cTxLock > queueLOCKED_UNMODIFIED )
800ebf6: e011 b.n 800ec1c <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 )
800ebf8: 687b ldr r3, [r7, #4]
800ebfa: 6a5b ldr r3, [r3, #36] ; 0x24
800ebfc: 2b00 cmp r3, #0
800ebfe: d012 beq.n 800ec26 <prvUnlockQueue+0x44>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
800ec00: 687b ldr r3, [r7, #4]
800ec02: 3324 adds r3, #36 ; 0x24
800ec04: 4618 mov r0, r3
800ec06: f000 fde7 bl 800f7d8 <xTaskRemoveFromEventList>
800ec0a: 4603 mov r3, r0
800ec0c: 2b00 cmp r3, #0
800ec0e: d001 beq.n 800ec14 <prvUnlockQueue+0x32>
{
/* The task waiting has a higher priority so record that
a context switch is required. */
vTaskMissedYield();
800ec10: f000 fec0 bl 800f994 <vTaskMissedYield>
break;
}
}
#endif /* configUSE_QUEUE_SETS */
--cTxLock;
800ec14: 7bfb ldrb r3, [r7, #15]
800ec16: 3b01 subs r3, #1
800ec18: b2db uxtb r3, r3
800ec1a: 73fb strb r3, [r7, #15]
while( cTxLock > queueLOCKED_UNMODIFIED )
800ec1c: f997 300f ldrsb.w r3, [r7, #15]
800ec20: 2b00 cmp r3, #0
800ec22: dce9 bgt.n 800ebf8 <prvUnlockQueue+0x16>
800ec24: e000 b.n 800ec28 <prvUnlockQueue+0x46>
break;
800ec26: bf00 nop
}
pxQueue->cTxLock = queueUNLOCKED;
800ec28: 687b ldr r3, [r7, #4]
800ec2a: 22ff movs r2, #255 ; 0xff
800ec2c: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
taskEXIT_CRITICAL();
800ec30: f001 fb0c bl 801024c <vPortExitCritical>
/* Do the same for the Rx lock. */
taskENTER_CRITICAL();
800ec34: f001 fad8 bl 80101e8 <vPortEnterCritical>
{
int8_t cRxLock = pxQueue->cRxLock;
800ec38: 687b ldr r3, [r7, #4]
800ec3a: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800ec3e: 73bb strb r3, [r7, #14]
while( cRxLock > queueLOCKED_UNMODIFIED )
800ec40: e011 b.n 800ec66 <prvUnlockQueue+0x84>
{
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
800ec42: 687b ldr r3, [r7, #4]
800ec44: 691b ldr r3, [r3, #16]
800ec46: 2b00 cmp r3, #0
800ec48: d012 beq.n 800ec70 <prvUnlockQueue+0x8e>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800ec4a: 687b ldr r3, [r7, #4]
800ec4c: 3310 adds r3, #16
800ec4e: 4618 mov r0, r3
800ec50: f000 fdc2 bl 800f7d8 <xTaskRemoveFromEventList>
800ec54: 4603 mov r3, r0
800ec56: 2b00 cmp r3, #0
800ec58: d001 beq.n 800ec5e <prvUnlockQueue+0x7c>
{
vTaskMissedYield();
800ec5a: f000 fe9b bl 800f994 <vTaskMissedYield>
else
{
mtCOVERAGE_TEST_MARKER();
}
--cRxLock;
800ec5e: 7bbb ldrb r3, [r7, #14]
800ec60: 3b01 subs r3, #1
800ec62: b2db uxtb r3, r3
800ec64: 73bb strb r3, [r7, #14]
while( cRxLock > queueLOCKED_UNMODIFIED )
800ec66: f997 300e ldrsb.w r3, [r7, #14]
800ec6a: 2b00 cmp r3, #0
800ec6c: dce9 bgt.n 800ec42 <prvUnlockQueue+0x60>
800ec6e: e000 b.n 800ec72 <prvUnlockQueue+0x90>
}
else
{
break;
800ec70: bf00 nop
}
}
pxQueue->cRxLock = queueUNLOCKED;
800ec72: 687b ldr r3, [r7, #4]
800ec74: 22ff movs r2, #255 ; 0xff
800ec76: f883 2044 strb.w r2, [r3, #68] ; 0x44
}
taskEXIT_CRITICAL();
800ec7a: f001 fae7 bl 801024c <vPortExitCritical>
}
800ec7e: bf00 nop
800ec80: 3710 adds r7, #16
800ec82: 46bd mov sp, r7
800ec84: bd80 pop {r7, pc}
0800ec86 <prvIsQueueEmpty>:
/*-----------------------------------------------------------*/
static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue )
{
800ec86: b580 push {r7, lr}
800ec88: b084 sub sp, #16
800ec8a: af00 add r7, sp, #0
800ec8c: 6078 str r0, [r7, #4]
BaseType_t xReturn;
taskENTER_CRITICAL();
800ec8e: f001 faab bl 80101e8 <vPortEnterCritical>
{
if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
800ec92: 687b ldr r3, [r7, #4]
800ec94: 6b9b ldr r3, [r3, #56] ; 0x38
800ec96: 2b00 cmp r3, #0
800ec98: d102 bne.n 800eca0 <prvIsQueueEmpty+0x1a>
{
xReturn = pdTRUE;
800ec9a: 2301 movs r3, #1
800ec9c: 60fb str r3, [r7, #12]
800ec9e: e001 b.n 800eca4 <prvIsQueueEmpty+0x1e>
}
else
{
xReturn = pdFALSE;
800eca0: 2300 movs r3, #0
800eca2: 60fb str r3, [r7, #12]
}
}
taskEXIT_CRITICAL();
800eca4: f001 fad2 bl 801024c <vPortExitCritical>
return xReturn;
800eca8: 68fb ldr r3, [r7, #12]
}
800ecaa: 4618 mov r0, r3
800ecac: 3710 adds r7, #16
800ecae: 46bd mov sp, r7
800ecb0: bd80 pop {r7, pc}
0800ecb2 <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 )
{
800ecb2: b580 push {r7, lr}
800ecb4: b084 sub sp, #16
800ecb6: af00 add r7, sp, #0
800ecb8: 6078 str r0, [r7, #4]
BaseType_t xReturn;
taskENTER_CRITICAL();
800ecba: f001 fa95 bl 80101e8 <vPortEnterCritical>
{
if( pxQueue->uxMessagesWaiting == pxQueue->uxLength )
800ecbe: 687b ldr r3, [r7, #4]
800ecc0: 6b9a ldr r2, [r3, #56] ; 0x38
800ecc2: 687b ldr r3, [r7, #4]
800ecc4: 6bdb ldr r3, [r3, #60] ; 0x3c
800ecc6: 429a cmp r2, r3
800ecc8: d102 bne.n 800ecd0 <prvIsQueueFull+0x1e>
{
xReturn = pdTRUE;
800ecca: 2301 movs r3, #1
800eccc: 60fb str r3, [r7, #12]
800ecce: e001 b.n 800ecd4 <prvIsQueueFull+0x22>
}
else
{
xReturn = pdFALSE;
800ecd0: 2300 movs r3, #0
800ecd2: 60fb str r3, [r7, #12]
}
}
taskEXIT_CRITICAL();
800ecd4: f001 faba bl 801024c <vPortExitCritical>
return xReturn;
800ecd8: 68fb ldr r3, [r7, #12]
}
800ecda: 4618 mov r0, r3
800ecdc: 3710 adds r7, #16
800ecde: 46bd mov sp, r7
800ece0: bd80 pop {r7, pc}
0800ece2 <xTaskCreateStatic>:
const uint32_t ulStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
StackType_t * const puxStackBuffer,
StaticTask_t * const pxTaskBuffer )
{
800ece2: b580 push {r7, lr}
800ece4: b08e sub sp, #56 ; 0x38
800ece6: af04 add r7, sp, #16
800ece8: 60f8 str r0, [r7, #12]
800ecea: 60b9 str r1, [r7, #8]
800ecec: 607a str r2, [r7, #4]
800ecee: 603b str r3, [r7, #0]
TCB_t *pxNewTCB;
TaskHandle_t xReturn;
configASSERT( puxStackBuffer != NULL );
800ecf0: 6b7b ldr r3, [r7, #52] ; 0x34
800ecf2: 2b00 cmp r3, #0
800ecf4: d10b bne.n 800ed0e <xTaskCreateStatic+0x2c>
__asm volatile
800ecf6: f04f 0350 mov.w r3, #80 ; 0x50
800ecfa: b672 cpsid i
800ecfc: f383 8811 msr BASEPRI, r3
800ed00: f3bf 8f6f isb sy
800ed04: f3bf 8f4f dsb sy
800ed08: b662 cpsie i
800ed0a: 623b str r3, [r7, #32]
800ed0c: e7fe b.n 800ed0c <xTaskCreateStatic+0x2a>
configASSERT( pxTaskBuffer != NULL );
800ed0e: 6bbb ldr r3, [r7, #56] ; 0x38
800ed10: 2b00 cmp r3, #0
800ed12: d10b bne.n 800ed2c <xTaskCreateStatic+0x4a>
800ed14: f04f 0350 mov.w r3, #80 ; 0x50
800ed18: b672 cpsid i
800ed1a: f383 8811 msr BASEPRI, r3
800ed1e: f3bf 8f6f isb sy
800ed22: f3bf 8f4f dsb sy
800ed26: b662 cpsie i
800ed28: 61fb str r3, [r7, #28]
800ed2a: e7fe b.n 800ed2a <xTaskCreateStatic+0x48>
#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 );
800ed2c: 2358 movs r3, #88 ; 0x58
800ed2e: 613b str r3, [r7, #16]
configASSERT( xSize == sizeof( TCB_t ) );
800ed30: 693b ldr r3, [r7, #16]
800ed32: 2b58 cmp r3, #88 ; 0x58
800ed34: d00b beq.n 800ed4e <xTaskCreateStatic+0x6c>
800ed36: f04f 0350 mov.w r3, #80 ; 0x50
800ed3a: b672 cpsid i
800ed3c: f383 8811 msr BASEPRI, r3
800ed40: f3bf 8f6f isb sy
800ed44: f3bf 8f4f dsb sy
800ed48: b662 cpsie i
800ed4a: 61bb str r3, [r7, #24]
800ed4c: e7fe b.n 800ed4c <xTaskCreateStatic+0x6a>
( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */
800ed4e: 693b ldr r3, [r7, #16]
}
#endif /* configASSERT_DEFINED */
if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) )
800ed50: 6bbb ldr r3, [r7, #56] ; 0x38
800ed52: 2b00 cmp r3, #0
800ed54: d01e beq.n 800ed94 <xTaskCreateStatic+0xb2>
800ed56: 6b7b ldr r3, [r7, #52] ; 0x34
800ed58: 2b00 cmp r3, #0
800ed5a: d01b beq.n 800ed94 <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. */
800ed5c: 6bbb ldr r3, [r7, #56] ; 0x38
800ed5e: 627b str r3, [r7, #36] ; 0x24
pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer;
800ed60: 6a7b ldr r3, [r7, #36] ; 0x24
800ed62: 6b7a ldr r2, [r7, #52] ; 0x34
800ed64: 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;
800ed66: 6a7b ldr r3, [r7, #36] ; 0x24
800ed68: 2202 movs r2, #2
800ed6a: f883 2055 strb.w r2, [r3, #85] ; 0x55
}
#endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */
prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL );
800ed6e: 2300 movs r3, #0
800ed70: 9303 str r3, [sp, #12]
800ed72: 6a7b ldr r3, [r7, #36] ; 0x24
800ed74: 9302 str r3, [sp, #8]
800ed76: f107 0314 add.w r3, r7, #20
800ed7a: 9301 str r3, [sp, #4]
800ed7c: 6b3b ldr r3, [r7, #48] ; 0x30
800ed7e: 9300 str r3, [sp, #0]
800ed80: 683b ldr r3, [r7, #0]
800ed82: 687a ldr r2, [r7, #4]
800ed84: 68b9 ldr r1, [r7, #8]
800ed86: 68f8 ldr r0, [r7, #12]
800ed88: f000 f850 bl 800ee2c <prvInitialiseNewTask>
prvAddNewTaskToReadyList( pxNewTCB );
800ed8c: 6a78 ldr r0, [r7, #36] ; 0x24
800ed8e: f000 f8e1 bl 800ef54 <prvAddNewTaskToReadyList>
800ed92: e001 b.n 800ed98 <xTaskCreateStatic+0xb6>
}
else
{
xReturn = NULL;
800ed94: 2300 movs r3, #0
800ed96: 617b str r3, [r7, #20]
}
return xReturn;
800ed98: 697b ldr r3, [r7, #20]
}
800ed9a: 4618 mov r0, r3
800ed9c: 3728 adds r7, #40 ; 0x28
800ed9e: 46bd mov sp, r7
800eda0: bd80 pop {r7, pc}
0800eda2 <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 )
{
800eda2: b580 push {r7, lr}
800eda4: b08c sub sp, #48 ; 0x30
800eda6: af04 add r7, sp, #16
800eda8: 60f8 str r0, [r7, #12]
800edaa: 60b9 str r1, [r7, #8]
800edac: 603b str r3, [r7, #0]
800edae: 4613 mov r3, r2
800edb0: 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. */
800edb2: 88fb ldrh r3, [r7, #6]
800edb4: 009b lsls r3, r3, #2
800edb6: 4618 mov r0, r3
800edb8: f001 fb38 bl 801042c <pvPortMalloc>
800edbc: 6178 str r0, [r7, #20]
if( pxStack != NULL )
800edbe: 697b ldr r3, [r7, #20]
800edc0: 2b00 cmp r3, #0
800edc2: d00e beq.n 800ede2 <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. */
800edc4: 2058 movs r0, #88 ; 0x58
800edc6: f001 fb31 bl 801042c <pvPortMalloc>
800edca: 61f8 str r0, [r7, #28]
if( pxNewTCB != NULL )
800edcc: 69fb ldr r3, [r7, #28]
800edce: 2b00 cmp r3, #0
800edd0: d003 beq.n 800edda <xTaskCreate+0x38>
{
/* Store the stack location in the TCB. */
pxNewTCB->pxStack = pxStack;
800edd2: 69fb ldr r3, [r7, #28]
800edd4: 697a ldr r2, [r7, #20]
800edd6: 631a str r2, [r3, #48] ; 0x30
800edd8: e005 b.n 800ede6 <xTaskCreate+0x44>
}
else
{
/* The stack cannot be used as the TCB was not created. Free
it again. */
vPortFree( pxStack );
800edda: 6978 ldr r0, [r7, #20]
800eddc: f001 fbf2 bl 80105c4 <vPortFree>
800ede0: e001 b.n 800ede6 <xTaskCreate+0x44>
}
}
else
{
pxNewTCB = NULL;
800ede2: 2300 movs r3, #0
800ede4: 61fb str r3, [r7, #28]
}
}
#endif /* portSTACK_GROWTH */
if( pxNewTCB != NULL )
800ede6: 69fb ldr r3, [r7, #28]
800ede8: 2b00 cmp r3, #0
800edea: d017 beq.n 800ee1c <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;
800edec: 69fb ldr r3, [r7, #28]
800edee: 2200 movs r2, #0
800edf0: f883 2055 strb.w r2, [r3, #85] ; 0x55
}
#endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */
prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL );
800edf4: 88fa ldrh r2, [r7, #6]
800edf6: 2300 movs r3, #0
800edf8: 9303 str r3, [sp, #12]
800edfa: 69fb ldr r3, [r7, #28]
800edfc: 9302 str r3, [sp, #8]
800edfe: 6afb ldr r3, [r7, #44] ; 0x2c
800ee00: 9301 str r3, [sp, #4]
800ee02: 6abb ldr r3, [r7, #40] ; 0x28
800ee04: 9300 str r3, [sp, #0]
800ee06: 683b ldr r3, [r7, #0]
800ee08: 68b9 ldr r1, [r7, #8]
800ee0a: 68f8 ldr r0, [r7, #12]
800ee0c: f000 f80e bl 800ee2c <prvInitialiseNewTask>
prvAddNewTaskToReadyList( pxNewTCB );
800ee10: 69f8 ldr r0, [r7, #28]
800ee12: f000 f89f bl 800ef54 <prvAddNewTaskToReadyList>
xReturn = pdPASS;
800ee16: 2301 movs r3, #1
800ee18: 61bb str r3, [r7, #24]
800ee1a: e002 b.n 800ee22 <xTaskCreate+0x80>
}
else
{
xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY;
800ee1c: f04f 33ff mov.w r3, #4294967295
800ee20: 61bb str r3, [r7, #24]
}
return xReturn;
800ee22: 69bb ldr r3, [r7, #24]
}
800ee24: 4618 mov r0, r3
800ee26: 3720 adds r7, #32
800ee28: 46bd mov sp, r7
800ee2a: bd80 pop {r7, pc}
0800ee2c <prvInitialiseNewTask>:
void * const pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask,
TCB_t *pxNewTCB,
const MemoryRegion_t * const xRegions )
{
800ee2c: b580 push {r7, lr}
800ee2e: b088 sub sp, #32
800ee30: af00 add r7, sp, #0
800ee32: 60f8 str r0, [r7, #12]
800ee34: 60b9 str r1, [r7, #8]
800ee36: 607a str r2, [r7, #4]
800ee38: 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 ) );
800ee3a: 6b3b ldr r3, [r7, #48] ; 0x30
800ee3c: 6b18 ldr r0, [r3, #48] ; 0x30
800ee3e: 687b ldr r3, [r7, #4]
800ee40: 009b lsls r3, r3, #2
800ee42: 461a mov r2, r3
800ee44: 21a5 movs r1, #165 ; 0xa5
800ee46: f00d ff4e bl 801cce6 <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 ] );
800ee4a: 6b3b ldr r3, [r7, #48] ; 0x30
800ee4c: 6b1a ldr r2, [r3, #48] ; 0x30
800ee4e: 6879 ldr r1, [r7, #4]
800ee50: f06f 4340 mvn.w r3, #3221225472 ; 0xc0000000
800ee54: 440b add r3, r1
800ee56: 009b lsls r3, r3, #2
800ee58: 4413 add r3, r2
800ee5a: 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(). */
800ee5c: 69bb ldr r3, [r7, #24]
800ee5e: f023 0307 bic.w r3, r3, #7
800ee62: 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 ) );
800ee64: 69bb ldr r3, [r7, #24]
800ee66: f003 0307 and.w r3, r3, #7
800ee6a: 2b00 cmp r3, #0
800ee6c: d00b beq.n 800ee86 <prvInitialiseNewTask+0x5a>
800ee6e: f04f 0350 mov.w r3, #80 ; 0x50
800ee72: b672 cpsid i
800ee74: f383 8811 msr BASEPRI, r3
800ee78: f3bf 8f6f isb sy
800ee7c: f3bf 8f4f dsb sy
800ee80: b662 cpsie i
800ee82: 617b str r3, [r7, #20]
800ee84: e7fe b.n 800ee84 <prvInitialiseNewTask+0x58>
pxNewTCB->pxEndOfStack = pxNewTCB->pxStack + ( ulStackDepth - ( uint32_t ) 1 );
}
#endif /* portSTACK_GROWTH */
/* Store the task name in the TCB. */
if( pcName != NULL )
800ee86: 68bb ldr r3, [r7, #8]
800ee88: 2b00 cmp r3, #0
800ee8a: d01f beq.n 800eecc <prvInitialiseNewTask+0xa0>
{
for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
800ee8c: 2300 movs r3, #0
800ee8e: 61fb str r3, [r7, #28]
800ee90: e012 b.n 800eeb8 <prvInitialiseNewTask+0x8c>
{
pxNewTCB->pcTaskName[ x ] = pcName[ x ];
800ee92: 68ba ldr r2, [r7, #8]
800ee94: 69fb ldr r3, [r7, #28]
800ee96: 4413 add r3, r2
800ee98: 7819 ldrb r1, [r3, #0]
800ee9a: 6b3a ldr r2, [r7, #48] ; 0x30
800ee9c: 69fb ldr r3, [r7, #28]
800ee9e: 4413 add r3, r2
800eea0: 3334 adds r3, #52 ; 0x34
800eea2: 460a mov r2, r1
800eea4: 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 )
800eea6: 68ba ldr r2, [r7, #8]
800eea8: 69fb ldr r3, [r7, #28]
800eeaa: 4413 add r3, r2
800eeac: 781b ldrb r3, [r3, #0]
800eeae: 2b00 cmp r3, #0
800eeb0: d006 beq.n 800eec0 <prvInitialiseNewTask+0x94>
for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
800eeb2: 69fb ldr r3, [r7, #28]
800eeb4: 3301 adds r3, #1
800eeb6: 61fb str r3, [r7, #28]
800eeb8: 69fb ldr r3, [r7, #28]
800eeba: 2b0f cmp r3, #15
800eebc: d9e9 bls.n 800ee92 <prvInitialiseNewTask+0x66>
800eebe: e000 b.n 800eec2 <prvInitialiseNewTask+0x96>
{
break;
800eec0: 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';
800eec2: 6b3b ldr r3, [r7, #48] ; 0x30
800eec4: 2200 movs r2, #0
800eec6: f883 2043 strb.w r2, [r3, #67] ; 0x43
800eeca: e003 b.n 800eed4 <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;
800eecc: 6b3b ldr r3, [r7, #48] ; 0x30
800eece: 2200 movs r2, #0
800eed0: 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 )
800eed4: 6abb ldr r3, [r7, #40] ; 0x28
800eed6: 2b06 cmp r3, #6
800eed8: d901 bls.n 800eede <prvInitialiseNewTask+0xb2>
{
uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U;
800eeda: 2306 movs r3, #6
800eedc: 62bb str r3, [r7, #40] ; 0x28
else
{
mtCOVERAGE_TEST_MARKER();
}
pxNewTCB->uxPriority = uxPriority;
800eede: 6b3b ldr r3, [r7, #48] ; 0x30
800eee0: 6aba ldr r2, [r7, #40] ; 0x28
800eee2: 62da str r2, [r3, #44] ; 0x2c
#if ( configUSE_MUTEXES == 1 )
{
pxNewTCB->uxBasePriority = uxPriority;
800eee4: 6b3b ldr r3, [r7, #48] ; 0x30
800eee6: 6aba ldr r2, [r7, #40] ; 0x28
800eee8: 645a str r2, [r3, #68] ; 0x44
pxNewTCB->uxMutexesHeld = 0;
800eeea: 6b3b ldr r3, [r7, #48] ; 0x30
800eeec: 2200 movs r2, #0
800eeee: 649a str r2, [r3, #72] ; 0x48
}
#endif /* configUSE_MUTEXES */
vListInitialiseItem( &( pxNewTCB->xStateListItem ) );
800eef0: 6b3b ldr r3, [r7, #48] ; 0x30
800eef2: 3304 adds r3, #4
800eef4: 4618 mov r0, r3
800eef6: f7fe fe91 bl 800dc1c <vListInitialiseItem>
vListInitialiseItem( &( pxNewTCB->xEventListItem ) );
800eefa: 6b3b ldr r3, [r7, #48] ; 0x30
800eefc: 3318 adds r3, #24
800eefe: 4618 mov r0, r3
800ef00: f7fe fe8c bl 800dc1c <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 );
800ef04: 6b3b ldr r3, [r7, #48] ; 0x30
800ef06: 6b3a ldr r2, [r7, #48] ; 0x30
800ef08: 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. */
800ef0a: 6abb ldr r3, [r7, #40] ; 0x28
800ef0c: f1c3 0207 rsb r2, r3, #7
800ef10: 6b3b ldr r3, [r7, #48] ; 0x30
800ef12: 619a str r2, [r3, #24]
listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB );
800ef14: 6b3b ldr r3, [r7, #48] ; 0x30
800ef16: 6b3a ldr r2, [r7, #48] ; 0x30
800ef18: 625a str r2, [r3, #36] ; 0x24
}
#endif /* portCRITICAL_NESTING_IN_TCB */
#if ( configUSE_APPLICATION_TASK_TAG == 1 )
{
pxNewTCB->pxTaskTag = NULL;
800ef1a: 6b3b ldr r3, [r7, #48] ; 0x30
800ef1c: 2200 movs r2, #0
800ef1e: 64da str r2, [r3, #76] ; 0x4c
}
#endif
#if ( configUSE_TASK_NOTIFICATIONS == 1 )
{
pxNewTCB->ulNotifiedValue = 0;
800ef20: 6b3b ldr r3, [r7, #48] ; 0x30
800ef22: 2200 movs r2, #0
800ef24: 651a str r2, [r3, #80] ; 0x50
pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION;
800ef26: 6b3b ldr r3, [r7, #48] ; 0x30
800ef28: 2200 movs r2, #0
800ef2a: f883 2054 strb.w r2, [r3, #84] ; 0x54
}
#endif /* portSTACK_GROWTH */
}
#else /* portHAS_STACK_OVERFLOW_CHECKING */
{
pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters );
800ef2e: 683a ldr r2, [r7, #0]
800ef30: 68f9 ldr r1, [r7, #12]
800ef32: 69b8 ldr r0, [r7, #24]
800ef34: f001 f84c bl 800ffd0 <pxPortInitialiseStack>
800ef38: 4602 mov r2, r0
800ef3a: 6b3b ldr r3, [r7, #48] ; 0x30
800ef3c: 601a str r2, [r3, #0]
}
#endif /* portHAS_STACK_OVERFLOW_CHECKING */
}
#endif /* portUSING_MPU_WRAPPERS */
if( pxCreatedTask != NULL )
800ef3e: 6afb ldr r3, [r7, #44] ; 0x2c
800ef40: 2b00 cmp r3, #0
800ef42: d002 beq.n 800ef4a <prvInitialiseNewTask+0x11e>
{
/* 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;
800ef44: 6afb ldr r3, [r7, #44] ; 0x2c
800ef46: 6b3a ldr r2, [r7, #48] ; 0x30
800ef48: 601a str r2, [r3, #0]
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800ef4a: bf00 nop
800ef4c: 3720 adds r7, #32
800ef4e: 46bd mov sp, r7
800ef50: bd80 pop {r7, pc}
...
0800ef54 <prvAddNewTaskToReadyList>:
/*-----------------------------------------------------------*/
static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
{
800ef54: b580 push {r7, lr}
800ef56: b082 sub sp, #8
800ef58: af00 add r7, sp, #0
800ef5a: 6078 str r0, [r7, #4]
/* Ensure interrupts don't access the task lists while the lists are being
updated. */
taskENTER_CRITICAL();
800ef5c: f001 f944 bl 80101e8 <vPortEnterCritical>
{
uxCurrentNumberOfTasks++;
800ef60: 4b2a ldr r3, [pc, #168] ; (800f00c <prvAddNewTaskToReadyList+0xb8>)
800ef62: 681b ldr r3, [r3, #0]
800ef64: 3301 adds r3, #1
800ef66: 4a29 ldr r2, [pc, #164] ; (800f00c <prvAddNewTaskToReadyList+0xb8>)
800ef68: 6013 str r3, [r2, #0]
if( pxCurrentTCB == NULL )
800ef6a: 4b29 ldr r3, [pc, #164] ; (800f010 <prvAddNewTaskToReadyList+0xbc>)
800ef6c: 681b ldr r3, [r3, #0]
800ef6e: 2b00 cmp r3, #0
800ef70: d109 bne.n 800ef86 <prvAddNewTaskToReadyList+0x32>
{
/* There are no other tasks, or all the other tasks are in
the suspended state - make this the current task. */
pxCurrentTCB = pxNewTCB;
800ef72: 4a27 ldr r2, [pc, #156] ; (800f010 <prvAddNewTaskToReadyList+0xbc>)
800ef74: 687b ldr r3, [r7, #4]
800ef76: 6013 str r3, [r2, #0]
if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 )
800ef78: 4b24 ldr r3, [pc, #144] ; (800f00c <prvAddNewTaskToReadyList+0xb8>)
800ef7a: 681b ldr r3, [r3, #0]
800ef7c: 2b01 cmp r3, #1
800ef7e: d110 bne.n 800efa2 <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();
800ef80: f000 fd2e bl 800f9e0 <prvInitialiseTaskLists>
800ef84: e00d b.n 800efa2 <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 )
800ef86: 4b23 ldr r3, [pc, #140] ; (800f014 <prvAddNewTaskToReadyList+0xc0>)
800ef88: 681b ldr r3, [r3, #0]
800ef8a: 2b00 cmp r3, #0
800ef8c: d109 bne.n 800efa2 <prvAddNewTaskToReadyList+0x4e>
{
if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority )
800ef8e: 4b20 ldr r3, [pc, #128] ; (800f010 <prvAddNewTaskToReadyList+0xbc>)
800ef90: 681b ldr r3, [r3, #0]
800ef92: 6ada ldr r2, [r3, #44] ; 0x2c
800ef94: 687b ldr r3, [r7, #4]
800ef96: 6adb ldr r3, [r3, #44] ; 0x2c
800ef98: 429a cmp r2, r3
800ef9a: d802 bhi.n 800efa2 <prvAddNewTaskToReadyList+0x4e>
{
pxCurrentTCB = pxNewTCB;
800ef9c: 4a1c ldr r2, [pc, #112] ; (800f010 <prvAddNewTaskToReadyList+0xbc>)
800ef9e: 687b ldr r3, [r7, #4]
800efa0: 6013 str r3, [r2, #0]
{
mtCOVERAGE_TEST_MARKER();
}
}
uxTaskNumber++;
800efa2: 4b1d ldr r3, [pc, #116] ; (800f018 <prvAddNewTaskToReadyList+0xc4>)
800efa4: 681b ldr r3, [r3, #0]
800efa6: 3301 adds r3, #1
800efa8: 4a1b ldr r2, [pc, #108] ; (800f018 <prvAddNewTaskToReadyList+0xc4>)
800efaa: 6013 str r3, [r2, #0]
pxNewTCB->uxTCBNumber = uxTaskNumber;
}
#endif /* configUSE_TRACE_FACILITY */
traceTASK_CREATE( pxNewTCB );
prvAddTaskToReadyList( pxNewTCB );
800efac: 687b ldr r3, [r7, #4]
800efae: 6adb ldr r3, [r3, #44] ; 0x2c
800efb0: 2201 movs r2, #1
800efb2: 409a lsls r2, r3
800efb4: 4b19 ldr r3, [pc, #100] ; (800f01c <prvAddNewTaskToReadyList+0xc8>)
800efb6: 681b ldr r3, [r3, #0]
800efb8: 4313 orrs r3, r2
800efba: 4a18 ldr r2, [pc, #96] ; (800f01c <prvAddNewTaskToReadyList+0xc8>)
800efbc: 6013 str r3, [r2, #0]
800efbe: 687b ldr r3, [r7, #4]
800efc0: 6ada ldr r2, [r3, #44] ; 0x2c
800efc2: 4613 mov r3, r2
800efc4: 009b lsls r3, r3, #2
800efc6: 4413 add r3, r2
800efc8: 009b lsls r3, r3, #2
800efca: 4a15 ldr r2, [pc, #84] ; (800f020 <prvAddNewTaskToReadyList+0xcc>)
800efcc: 441a add r2, r3
800efce: 687b ldr r3, [r7, #4]
800efd0: 3304 adds r3, #4
800efd2: 4619 mov r1, r3
800efd4: 4610 mov r0, r2
800efd6: f7fe fe2e bl 800dc36 <vListInsertEnd>
portSETUP_TCB( pxNewTCB );
}
taskEXIT_CRITICAL();
800efda: f001 f937 bl 801024c <vPortExitCritical>
if( xSchedulerRunning != pdFALSE )
800efde: 4b0d ldr r3, [pc, #52] ; (800f014 <prvAddNewTaskToReadyList+0xc0>)
800efe0: 681b ldr r3, [r3, #0]
800efe2: 2b00 cmp r3, #0
800efe4: d00e beq.n 800f004 <prvAddNewTaskToReadyList+0xb0>
{
/* If the created task is of a higher priority than the current task
then it should run now. */
if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority )
800efe6: 4b0a ldr r3, [pc, #40] ; (800f010 <prvAddNewTaskToReadyList+0xbc>)
800efe8: 681b ldr r3, [r3, #0]
800efea: 6ada ldr r2, [r3, #44] ; 0x2c
800efec: 687b ldr r3, [r7, #4]
800efee: 6adb ldr r3, [r3, #44] ; 0x2c
800eff0: 429a cmp r2, r3
800eff2: d207 bcs.n 800f004 <prvAddNewTaskToReadyList+0xb0>
{
taskYIELD_IF_USING_PREEMPTION();
800eff4: 4b0b ldr r3, [pc, #44] ; (800f024 <prvAddNewTaskToReadyList+0xd0>)
800eff6: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800effa: 601a str r2, [r3, #0]
800effc: f3bf 8f4f dsb sy
800f000: f3bf 8f6f isb sy
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800f004: bf00 nop
800f006: 3708 adds r7, #8
800f008: 46bd mov sp, r7
800f00a: bd80 pop {r7, pc}
800f00c: 2000068c .word 0x2000068c
800f010: 2000058c .word 0x2000058c
800f014: 20000698 .word 0x20000698
800f018: 200006a8 .word 0x200006a8
800f01c: 20000694 .word 0x20000694
800f020: 20000590 .word 0x20000590
800f024: e000ed04 .word 0xe000ed04
0800f028 <vTaskDelete>:
/*-----------------------------------------------------------*/
#if ( INCLUDE_vTaskDelete == 1 )
void vTaskDelete( TaskHandle_t xTaskToDelete )
{
800f028: b580 push {r7, lr}
800f02a: b084 sub sp, #16
800f02c: af00 add r7, sp, #0
800f02e: 6078 str r0, [r7, #4]
TCB_t *pxTCB;
taskENTER_CRITICAL();
800f030: f001 f8da bl 80101e8 <vPortEnterCritical>
{
/* If null is passed in here then it is the calling task that is
being deleted. */
pxTCB = prvGetTCBFromHandle( xTaskToDelete );
800f034: 687b ldr r3, [r7, #4]
800f036: 2b00 cmp r3, #0
800f038: d102 bne.n 800f040 <vTaskDelete+0x18>
800f03a: 4b39 ldr r3, [pc, #228] ; (800f120 <vTaskDelete+0xf8>)
800f03c: 681b ldr r3, [r3, #0]
800f03e: e000 b.n 800f042 <vTaskDelete+0x1a>
800f040: 687b ldr r3, [r7, #4]
800f042: 60fb str r3, [r7, #12]
/* Remove task from the ready list. */
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
800f044: 68fb ldr r3, [r7, #12]
800f046: 3304 adds r3, #4
800f048: 4618 mov r0, r3
800f04a: f7fe fe51 bl 800dcf0 <uxListRemove>
800f04e: 4603 mov r3, r0
800f050: 2b00 cmp r3, #0
800f052: d115 bne.n 800f080 <vTaskDelete+0x58>
{
taskRESET_READY_PRIORITY( pxTCB->uxPriority );
800f054: 68fb ldr r3, [r7, #12]
800f056: 6ada ldr r2, [r3, #44] ; 0x2c
800f058: 4932 ldr r1, [pc, #200] ; (800f124 <vTaskDelete+0xfc>)
800f05a: 4613 mov r3, r2
800f05c: 009b lsls r3, r3, #2
800f05e: 4413 add r3, r2
800f060: 009b lsls r3, r3, #2
800f062: 440b add r3, r1
800f064: 681b ldr r3, [r3, #0]
800f066: 2b00 cmp r3, #0
800f068: d10a bne.n 800f080 <vTaskDelete+0x58>
800f06a: 68fb ldr r3, [r7, #12]
800f06c: 6adb ldr r3, [r3, #44] ; 0x2c
800f06e: 2201 movs r2, #1
800f070: fa02 f303 lsl.w r3, r2, r3
800f074: 43da mvns r2, r3
800f076: 4b2c ldr r3, [pc, #176] ; (800f128 <vTaskDelete+0x100>)
800f078: 681b ldr r3, [r3, #0]
800f07a: 4013 ands r3, r2
800f07c: 4a2a ldr r2, [pc, #168] ; (800f128 <vTaskDelete+0x100>)
800f07e: 6013 str r3, [r2, #0]
{
mtCOVERAGE_TEST_MARKER();
}
/* Is the task waiting on an event also? */
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )
800f080: 68fb ldr r3, [r7, #12]
800f082: 6a9b ldr r3, [r3, #40] ; 0x28
800f084: 2b00 cmp r3, #0
800f086: d004 beq.n 800f092 <vTaskDelete+0x6a>
{
( void ) uxListRemove( &( pxTCB->xEventListItem ) );
800f088: 68fb ldr r3, [r7, #12]
800f08a: 3318 adds r3, #24
800f08c: 4618 mov r0, r3
800f08e: f7fe fe2f bl 800dcf0 <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++;
800f092: 4b26 ldr r3, [pc, #152] ; (800f12c <vTaskDelete+0x104>)
800f094: 681b ldr r3, [r3, #0]
800f096: 3301 adds r3, #1
800f098: 4a24 ldr r2, [pc, #144] ; (800f12c <vTaskDelete+0x104>)
800f09a: 6013 str r3, [r2, #0]
if( pxTCB == pxCurrentTCB )
800f09c: 4b20 ldr r3, [pc, #128] ; (800f120 <vTaskDelete+0xf8>)
800f09e: 681b ldr r3, [r3, #0]
800f0a0: 68fa ldr r2, [r7, #12]
800f0a2: 429a cmp r2, r3
800f0a4: d10b bne.n 800f0be <vTaskDelete+0x96>
/* 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 ) );
800f0a6: 68fb ldr r3, [r7, #12]
800f0a8: 3304 adds r3, #4
800f0aa: 4619 mov r1, r3
800f0ac: 4820 ldr r0, [pc, #128] ; (800f130 <vTaskDelete+0x108>)
800f0ae: f7fe fdc2 bl 800dc36 <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;
800f0b2: 4b20 ldr r3, [pc, #128] ; (800f134 <vTaskDelete+0x10c>)
800f0b4: 681b ldr r3, [r3, #0]
800f0b6: 3301 adds r3, #1
800f0b8: 4a1e ldr r2, [pc, #120] ; (800f134 <vTaskDelete+0x10c>)
800f0ba: 6013 str r3, [r2, #0]
800f0bc: e009 b.n 800f0d2 <vTaskDelete+0xaa>
required. */
portPRE_TASK_DELETE_HOOK( pxTCB, &xYieldPending );
}
else
{
--uxCurrentNumberOfTasks;
800f0be: 4b1e ldr r3, [pc, #120] ; (800f138 <vTaskDelete+0x110>)
800f0c0: 681b ldr r3, [r3, #0]
800f0c2: 3b01 subs r3, #1
800f0c4: 4a1c ldr r2, [pc, #112] ; (800f138 <vTaskDelete+0x110>)
800f0c6: 6013 str r3, [r2, #0]
prvDeleteTCB( pxTCB );
800f0c8: 68f8 ldr r0, [r7, #12]
800f0ca: f000 fcf5 bl 800fab8 <prvDeleteTCB>
/* Reset the next expected unblock time in case it referred to
the task that has just been deleted. */
prvResetNextTaskUnblockTime();
800f0ce: f000 fd23 bl 800fb18 <prvResetNextTaskUnblockTime>
}
traceTASK_DELETE( pxTCB );
}
taskEXIT_CRITICAL();
800f0d2: f001 f8bb bl 801024c <vPortExitCritical>
/* Force a reschedule if it is the currently running task that has just
been deleted. */
if( xSchedulerRunning != pdFALSE )
800f0d6: 4b19 ldr r3, [pc, #100] ; (800f13c <vTaskDelete+0x114>)
800f0d8: 681b ldr r3, [r3, #0]
800f0da: 2b00 cmp r3, #0
800f0dc: d01c beq.n 800f118 <vTaskDelete+0xf0>
{
if( pxTCB == pxCurrentTCB )
800f0de: 4b10 ldr r3, [pc, #64] ; (800f120 <vTaskDelete+0xf8>)
800f0e0: 681b ldr r3, [r3, #0]
800f0e2: 68fa ldr r2, [r7, #12]
800f0e4: 429a cmp r2, r3
800f0e6: d117 bne.n 800f118 <vTaskDelete+0xf0>
{
configASSERT( uxSchedulerSuspended == 0 );
800f0e8: 4b15 ldr r3, [pc, #84] ; (800f140 <vTaskDelete+0x118>)
800f0ea: 681b ldr r3, [r3, #0]
800f0ec: 2b00 cmp r3, #0
800f0ee: d00b beq.n 800f108 <vTaskDelete+0xe0>
800f0f0: f04f 0350 mov.w r3, #80 ; 0x50
800f0f4: b672 cpsid i
800f0f6: f383 8811 msr BASEPRI, r3
800f0fa: f3bf 8f6f isb sy
800f0fe: f3bf 8f4f dsb sy
800f102: b662 cpsie i
800f104: 60bb str r3, [r7, #8]
800f106: e7fe b.n 800f106 <vTaskDelete+0xde>
portYIELD_WITHIN_API();
800f108: 4b0e ldr r3, [pc, #56] ; (800f144 <vTaskDelete+0x11c>)
800f10a: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800f10e: 601a str r2, [r3, #0]
800f110: f3bf 8f4f dsb sy
800f114: f3bf 8f6f isb sy
else
{
mtCOVERAGE_TEST_MARKER();
}
}
}
800f118: bf00 nop
800f11a: 3710 adds r7, #16
800f11c: 46bd mov sp, r7
800f11e: bd80 pop {r7, pc}
800f120: 2000058c .word 0x2000058c
800f124: 20000590 .word 0x20000590
800f128: 20000694 .word 0x20000694
800f12c: 200006a8 .word 0x200006a8
800f130: 20000660 .word 0x20000660
800f134: 20000674 .word 0x20000674
800f138: 2000068c .word 0x2000068c
800f13c: 20000698 .word 0x20000698
800f140: 200006b4 .word 0x200006b4
800f144: e000ed04 .word 0xe000ed04
0800f148 <vTaskDelayUntil>:
/*-----------------------------------------------------------*/
#if ( INCLUDE_vTaskDelayUntil == 1 )
void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement )
{
800f148: b580 push {r7, lr}
800f14a: b08a sub sp, #40 ; 0x28
800f14c: af00 add r7, sp, #0
800f14e: 6078 str r0, [r7, #4]
800f150: 6039 str r1, [r7, #0]
TickType_t xTimeToWake;
BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE;
800f152: 2300 movs r3, #0
800f154: 627b str r3, [r7, #36] ; 0x24
configASSERT( pxPreviousWakeTime );
800f156: 687b ldr r3, [r7, #4]
800f158: 2b00 cmp r3, #0
800f15a: d10b bne.n 800f174 <vTaskDelayUntil+0x2c>
800f15c: f04f 0350 mov.w r3, #80 ; 0x50
800f160: b672 cpsid i
800f162: f383 8811 msr BASEPRI, r3
800f166: f3bf 8f6f isb sy
800f16a: f3bf 8f4f dsb sy
800f16e: b662 cpsie i
800f170: 617b str r3, [r7, #20]
800f172: e7fe b.n 800f172 <vTaskDelayUntil+0x2a>
configASSERT( ( xTimeIncrement > 0U ) );
800f174: 683b ldr r3, [r7, #0]
800f176: 2b00 cmp r3, #0
800f178: d10b bne.n 800f192 <vTaskDelayUntil+0x4a>
800f17a: f04f 0350 mov.w r3, #80 ; 0x50
800f17e: b672 cpsid i
800f180: f383 8811 msr BASEPRI, r3
800f184: f3bf 8f6f isb sy
800f188: f3bf 8f4f dsb sy
800f18c: b662 cpsie i
800f18e: 613b str r3, [r7, #16]
800f190: e7fe b.n 800f190 <vTaskDelayUntil+0x48>
configASSERT( uxSchedulerSuspended == 0 );
800f192: 4b2a ldr r3, [pc, #168] ; (800f23c <vTaskDelayUntil+0xf4>)
800f194: 681b ldr r3, [r3, #0]
800f196: 2b00 cmp r3, #0
800f198: d00b beq.n 800f1b2 <vTaskDelayUntil+0x6a>
800f19a: f04f 0350 mov.w r3, #80 ; 0x50
800f19e: b672 cpsid i
800f1a0: f383 8811 msr BASEPRI, r3
800f1a4: f3bf 8f6f isb sy
800f1a8: f3bf 8f4f dsb sy
800f1ac: b662 cpsie i
800f1ae: 60fb str r3, [r7, #12]
800f1b0: e7fe b.n 800f1b0 <vTaskDelayUntil+0x68>
vTaskSuspendAll();
800f1b2: f000 f8e1 bl 800f378 <vTaskSuspendAll>
{
/* Minor optimisation. The tick count cannot change in this
block. */
const TickType_t xConstTickCount = xTickCount;
800f1b6: 4b22 ldr r3, [pc, #136] ; (800f240 <vTaskDelayUntil+0xf8>)
800f1b8: 681b ldr r3, [r3, #0]
800f1ba: 623b str r3, [r7, #32]
/* Generate the tick time at which the task wants to wake. */
xTimeToWake = *pxPreviousWakeTime + xTimeIncrement;
800f1bc: 687b ldr r3, [r7, #4]
800f1be: 681b ldr r3, [r3, #0]
800f1c0: 683a ldr r2, [r7, #0]
800f1c2: 4413 add r3, r2
800f1c4: 61fb str r3, [r7, #28]
if( xConstTickCount < *pxPreviousWakeTime )
800f1c6: 687b ldr r3, [r7, #4]
800f1c8: 681b ldr r3, [r3, #0]
800f1ca: 6a3a ldr r2, [r7, #32]
800f1cc: 429a cmp r2, r3
800f1ce: d20b bcs.n 800f1e8 <vTaskDelayUntil+0xa0>
/* The tick count has overflowed since this function was
lasted called. In this case the only time we should ever
actually delay is if the wake time has also overflowed,
and the wake time is greater than the tick time. When this
is the case it is as if neither time had overflowed. */
if( ( xTimeToWake < *pxPreviousWakeTime ) && ( xTimeToWake > xConstTickCount ) )
800f1d0: 687b ldr r3, [r7, #4]
800f1d2: 681b ldr r3, [r3, #0]
800f1d4: 69fa ldr r2, [r7, #28]
800f1d6: 429a cmp r2, r3
800f1d8: d211 bcs.n 800f1fe <vTaskDelayUntil+0xb6>
800f1da: 69fa ldr r2, [r7, #28]
800f1dc: 6a3b ldr r3, [r7, #32]
800f1de: 429a cmp r2, r3
800f1e0: d90d bls.n 800f1fe <vTaskDelayUntil+0xb6>
{
xShouldDelay = pdTRUE;
800f1e2: 2301 movs r3, #1
800f1e4: 627b str r3, [r7, #36] ; 0x24
800f1e6: e00a b.n 800f1fe <vTaskDelayUntil+0xb6>
else
{
/* The tick time has not overflowed. In this case we will
delay if either the wake time has overflowed, and/or the
tick time is less than the wake time. */
if( ( xTimeToWake < *pxPreviousWakeTime ) || ( xTimeToWake > xConstTickCount ) )
800f1e8: 687b ldr r3, [r7, #4]
800f1ea: 681b ldr r3, [r3, #0]
800f1ec: 69fa ldr r2, [r7, #28]
800f1ee: 429a cmp r2, r3
800f1f0: d303 bcc.n 800f1fa <vTaskDelayUntil+0xb2>
800f1f2: 69fa ldr r2, [r7, #28]
800f1f4: 6a3b ldr r3, [r7, #32]
800f1f6: 429a cmp r2, r3
800f1f8: d901 bls.n 800f1fe <vTaskDelayUntil+0xb6>
{
xShouldDelay = pdTRUE;
800f1fa: 2301 movs r3, #1
800f1fc: 627b str r3, [r7, #36] ; 0x24
mtCOVERAGE_TEST_MARKER();
}
}
/* Update the wake time ready for the next call. */
*pxPreviousWakeTime = xTimeToWake;
800f1fe: 687b ldr r3, [r7, #4]
800f200: 69fa ldr r2, [r7, #28]
800f202: 601a str r2, [r3, #0]
if( xShouldDelay != pdFALSE )
800f204: 6a7b ldr r3, [r7, #36] ; 0x24
800f206: 2b00 cmp r3, #0
800f208: d006 beq.n 800f218 <vTaskDelayUntil+0xd0>
{
traceTASK_DELAY_UNTIL( xTimeToWake );
/* prvAddCurrentTaskToDelayedList() needs the block time, not
the time to wake, so subtract the current tick count. */
prvAddCurrentTaskToDelayedList( xTimeToWake - xConstTickCount, pdFALSE );
800f20a: 69fa ldr r2, [r7, #28]
800f20c: 6a3b ldr r3, [r7, #32]
800f20e: 1ad3 subs r3, r2, r3
800f210: 2100 movs r1, #0
800f212: 4618 mov r0, r3
800f214: f000 fe76 bl 800ff04 <prvAddCurrentTaskToDelayedList>
else
{
mtCOVERAGE_TEST_MARKER();
}
}
xAlreadyYielded = xTaskResumeAll();
800f218: f000 f8bc bl 800f394 <xTaskResumeAll>
800f21c: 61b8 str r0, [r7, #24]
/* Force a reschedule if xTaskResumeAll has not already done so, we may
have put ourselves to sleep. */
if( xAlreadyYielded == pdFALSE )
800f21e: 69bb ldr r3, [r7, #24]
800f220: 2b00 cmp r3, #0
800f222: d107 bne.n 800f234 <vTaskDelayUntil+0xec>
{
portYIELD_WITHIN_API();
800f224: 4b07 ldr r3, [pc, #28] ; (800f244 <vTaskDelayUntil+0xfc>)
800f226: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800f22a: 601a str r2, [r3, #0]
800f22c: f3bf 8f4f dsb sy
800f230: f3bf 8f6f isb sy
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800f234: bf00 nop
800f236: 3728 adds r7, #40 ; 0x28
800f238: 46bd mov sp, r7
800f23a: bd80 pop {r7, pc}
800f23c: 200006b4 .word 0x200006b4
800f240: 20000690 .word 0x20000690
800f244: e000ed04 .word 0xe000ed04
0800f248 <vTaskDelay>:
/*-----------------------------------------------------------*/
#if ( INCLUDE_vTaskDelay == 1 )
void vTaskDelay( const TickType_t xTicksToDelay )
{
800f248: b580 push {r7, lr}
800f24a: b084 sub sp, #16
800f24c: af00 add r7, sp, #0
800f24e: 6078 str r0, [r7, #4]
BaseType_t xAlreadyYielded = pdFALSE;
800f250: 2300 movs r3, #0
800f252: 60fb str r3, [r7, #12]
/* A delay time of zero just forces a reschedule. */
if( xTicksToDelay > ( TickType_t ) 0U )
800f254: 687b ldr r3, [r7, #4]
800f256: 2b00 cmp r3, #0
800f258: d018 beq.n 800f28c <vTaskDelay+0x44>
{
configASSERT( uxSchedulerSuspended == 0 );
800f25a: 4b14 ldr r3, [pc, #80] ; (800f2ac <vTaskDelay+0x64>)
800f25c: 681b ldr r3, [r3, #0]
800f25e: 2b00 cmp r3, #0
800f260: d00b beq.n 800f27a <vTaskDelay+0x32>
800f262: f04f 0350 mov.w r3, #80 ; 0x50
800f266: b672 cpsid i
800f268: f383 8811 msr BASEPRI, r3
800f26c: f3bf 8f6f isb sy
800f270: f3bf 8f4f dsb sy
800f274: b662 cpsie i
800f276: 60bb str r3, [r7, #8]
800f278: e7fe b.n 800f278 <vTaskDelay+0x30>
vTaskSuspendAll();
800f27a: f000 f87d bl 800f378 <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 );
800f27e: 2100 movs r1, #0
800f280: 6878 ldr r0, [r7, #4]
800f282: f000 fe3f bl 800ff04 <prvAddCurrentTaskToDelayedList>
}
xAlreadyYielded = xTaskResumeAll();
800f286: f000 f885 bl 800f394 <xTaskResumeAll>
800f28a: 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 )
800f28c: 68fb ldr r3, [r7, #12]
800f28e: 2b00 cmp r3, #0
800f290: d107 bne.n 800f2a2 <vTaskDelay+0x5a>
{
portYIELD_WITHIN_API();
800f292: 4b07 ldr r3, [pc, #28] ; (800f2b0 <vTaskDelay+0x68>)
800f294: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800f298: 601a str r2, [r3, #0]
800f29a: f3bf 8f4f dsb sy
800f29e: f3bf 8f6f isb sy
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800f2a2: bf00 nop
800f2a4: 3710 adds r7, #16
800f2a6: 46bd mov sp, r7
800f2a8: bd80 pop {r7, pc}
800f2aa: bf00 nop
800f2ac: 200006b4 .word 0x200006b4
800f2b0: e000ed04 .word 0xe000ed04
0800f2b4 <vTaskStartScheduler>:
#endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */
/*-----------------------------------------------------------*/
void vTaskStartScheduler( void )
{
800f2b4: b580 push {r7, lr}
800f2b6: b08a sub sp, #40 ; 0x28
800f2b8: 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;
800f2ba: 2300 movs r3, #0
800f2bc: 60bb str r3, [r7, #8]
StackType_t *pxIdleTaskStackBuffer = NULL;
800f2be: 2300 movs r3, #0
800f2c0: 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 );
800f2c2: 463a mov r2, r7
800f2c4: 1d39 adds r1, r7, #4
800f2c6: f107 0308 add.w r3, r7, #8
800f2ca: 4618 mov r0, r3
800f2cc: f7f1 f98a bl 80005e4 <vApplicationGetIdleTaskMemory>
xIdleTaskHandle = xTaskCreateStatic( prvIdleTask,
800f2d0: 6839 ldr r1, [r7, #0]
800f2d2: 687b ldr r3, [r7, #4]
800f2d4: 68ba ldr r2, [r7, #8]
800f2d6: 9202 str r2, [sp, #8]
800f2d8: 9301 str r3, [sp, #4]
800f2da: 2300 movs r3, #0
800f2dc: 9300 str r3, [sp, #0]
800f2de: 2300 movs r3, #0
800f2e0: 460a mov r2, r1
800f2e2: 491f ldr r1, [pc, #124] ; (800f360 <vTaskStartScheduler+0xac>)
800f2e4: 481f ldr r0, [pc, #124] ; (800f364 <vTaskStartScheduler+0xb0>)
800f2e6: f7ff fcfc bl 800ece2 <xTaskCreateStatic>
800f2ea: 4602 mov r2, r0
800f2ec: 4b1e ldr r3, [pc, #120] ; (800f368 <vTaskStartScheduler+0xb4>)
800f2ee: 601a str r2, [r3, #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 )
800f2f0: 4b1d ldr r3, [pc, #116] ; (800f368 <vTaskStartScheduler+0xb4>)
800f2f2: 681b ldr r3, [r3, #0]
800f2f4: 2b00 cmp r3, #0
800f2f6: d002 beq.n 800f2fe <vTaskStartScheduler+0x4a>
{
xReturn = pdPASS;
800f2f8: 2301 movs r3, #1
800f2fa: 617b str r3, [r7, #20]
800f2fc: e001 b.n 800f302 <vTaskStartScheduler+0x4e>
}
else
{
xReturn = pdFAIL;
800f2fe: 2300 movs r3, #0
800f300: 617b str r3, [r7, #20]
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_TIMERS */
if( xReturn == pdPASS )
800f302: 697b ldr r3, [r7, #20]
800f304: 2b01 cmp r3, #1
800f306: d117 bne.n 800f338 <vTaskStartScheduler+0x84>
800f308: f04f 0350 mov.w r3, #80 ; 0x50
800f30c: b672 cpsid i
800f30e: f383 8811 msr BASEPRI, r3
800f312: f3bf 8f6f isb sy
800f316: f3bf 8f4f dsb sy
800f31a: b662 cpsie i
800f31c: 613b str r3, [r7, #16]
structure specific to the task that will run first. */
_impure_ptr = &( pxCurrentTCB->xNewLib_reent );
}
#endif /* configUSE_NEWLIB_REENTRANT */
xNextTaskUnblockTime = portMAX_DELAY;
800f31e: 4b13 ldr r3, [pc, #76] ; (800f36c <vTaskStartScheduler+0xb8>)
800f320: f04f 32ff mov.w r2, #4294967295
800f324: 601a str r2, [r3, #0]
xSchedulerRunning = pdTRUE;
800f326: 4b12 ldr r3, [pc, #72] ; (800f370 <vTaskStartScheduler+0xbc>)
800f328: 2201 movs r2, #1
800f32a: 601a str r2, [r3, #0]
xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT;
800f32c: 4b11 ldr r3, [pc, #68] ; (800f374 <vTaskStartScheduler+0xc0>)
800f32e: 2200 movs r2, #0
800f330: 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 )
800f332: f000 fedd bl 80100f0 <xPortStartScheduler>
}
/* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0,
meaning xIdleTaskHandle is not used anywhere else. */
( void ) xIdleTaskHandle;
}
800f336: e00f b.n 800f358 <vTaskStartScheduler+0xa4>
configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY );
800f338: 697b ldr r3, [r7, #20]
800f33a: f1b3 3fff cmp.w r3, #4294967295
800f33e: d10b bne.n 800f358 <vTaskStartScheduler+0xa4>
800f340: f04f 0350 mov.w r3, #80 ; 0x50
800f344: b672 cpsid i
800f346: f383 8811 msr BASEPRI, r3
800f34a: f3bf 8f6f isb sy
800f34e: f3bf 8f4f dsb sy
800f352: b662 cpsie i
800f354: 60fb str r3, [r7, #12]
800f356: e7fe b.n 800f356 <vTaskStartScheduler+0xa2>
}
800f358: bf00 nop
800f35a: 3718 adds r7, #24
800f35c: 46bd mov sp, r7
800f35e: bd80 pop {r7, pc}
800f360: 0801e00c .word 0x0801e00c
800f364: 0800f9ad .word 0x0800f9ad
800f368: 200006b0 .word 0x200006b0
800f36c: 200006ac .word 0x200006ac
800f370: 20000698 .word 0x20000698
800f374: 20000690 .word 0x20000690
0800f378 <vTaskSuspendAll>:
vPortEndScheduler();
}
/*----------------------------------------------------------*/
void vTaskSuspendAll( void )
{
800f378: b480 push {r7}
800f37a: af00 add r7, sp, #0
/* A critical section is not required as the variable is of type
BaseType_t. Please read Richard Barry's reply in the following link to a
post in the FreeRTOS support forum before reporting this as a bug! -
http://goo.gl/wu4acr */
++uxSchedulerSuspended;
800f37c: 4b04 ldr r3, [pc, #16] ; (800f390 <vTaskSuspendAll+0x18>)
800f37e: 681b ldr r3, [r3, #0]
800f380: 3301 adds r3, #1
800f382: 4a03 ldr r2, [pc, #12] ; (800f390 <vTaskSuspendAll+0x18>)
800f384: 6013 str r3, [r2, #0]
portMEMORY_BARRIER();
}
800f386: bf00 nop
800f388: 46bd mov sp, r7
800f38a: f85d 7b04 ldr.w r7, [sp], #4
800f38e: 4770 bx lr
800f390: 200006b4 .word 0x200006b4
0800f394 <xTaskResumeAll>:
#endif /* configUSE_TICKLESS_IDLE */
/*----------------------------------------------------------*/
BaseType_t xTaskResumeAll( void )
{
800f394: b580 push {r7, lr}
800f396: b084 sub sp, #16
800f398: af00 add r7, sp, #0
TCB_t *pxTCB = NULL;
800f39a: 2300 movs r3, #0
800f39c: 60fb str r3, [r7, #12]
BaseType_t xAlreadyYielded = pdFALSE;
800f39e: 2300 movs r3, #0
800f3a0: 60bb str r3, [r7, #8]
/* If uxSchedulerSuspended is zero then this function does not match a
previous call to vTaskSuspendAll(). */
configASSERT( uxSchedulerSuspended );
800f3a2: 4b42 ldr r3, [pc, #264] ; (800f4ac <xTaskResumeAll+0x118>)
800f3a4: 681b ldr r3, [r3, #0]
800f3a6: 2b00 cmp r3, #0
800f3a8: d10b bne.n 800f3c2 <xTaskResumeAll+0x2e>
800f3aa: f04f 0350 mov.w r3, #80 ; 0x50
800f3ae: b672 cpsid i
800f3b0: f383 8811 msr BASEPRI, r3
800f3b4: f3bf 8f6f isb sy
800f3b8: f3bf 8f4f dsb sy
800f3bc: b662 cpsie i
800f3be: 603b str r3, [r7, #0]
800f3c0: e7fe b.n 800f3c0 <xTaskResumeAll+0x2c>
/* 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();
800f3c2: f000 ff11 bl 80101e8 <vPortEnterCritical>
{
--uxSchedulerSuspended;
800f3c6: 4b39 ldr r3, [pc, #228] ; (800f4ac <xTaskResumeAll+0x118>)
800f3c8: 681b ldr r3, [r3, #0]
800f3ca: 3b01 subs r3, #1
800f3cc: 4a37 ldr r2, [pc, #220] ; (800f4ac <xTaskResumeAll+0x118>)
800f3ce: 6013 str r3, [r2, #0]
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
800f3d0: 4b36 ldr r3, [pc, #216] ; (800f4ac <xTaskResumeAll+0x118>)
800f3d2: 681b ldr r3, [r3, #0]
800f3d4: 2b00 cmp r3, #0
800f3d6: d161 bne.n 800f49c <xTaskResumeAll+0x108>
{
if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U )
800f3d8: 4b35 ldr r3, [pc, #212] ; (800f4b0 <xTaskResumeAll+0x11c>)
800f3da: 681b ldr r3, [r3, #0]
800f3dc: 2b00 cmp r3, #0
800f3de: d05d beq.n 800f49c <xTaskResumeAll+0x108>
{
/* Move any readied tasks from the pending list into the
appropriate ready list. */
while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
800f3e0: e02e b.n 800f440 <xTaskResumeAll+0xac>
{
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. */
800f3e2: 4b34 ldr r3, [pc, #208] ; (800f4b4 <xTaskResumeAll+0x120>)
800f3e4: 68db ldr r3, [r3, #12]
800f3e6: 68db ldr r3, [r3, #12]
800f3e8: 60fb str r3, [r7, #12]
( void ) uxListRemove( &( pxTCB->xEventListItem ) );
800f3ea: 68fb ldr r3, [r7, #12]
800f3ec: 3318 adds r3, #24
800f3ee: 4618 mov r0, r3
800f3f0: f7fe fc7e bl 800dcf0 <uxListRemove>
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
800f3f4: 68fb ldr r3, [r7, #12]
800f3f6: 3304 adds r3, #4
800f3f8: 4618 mov r0, r3
800f3fa: f7fe fc79 bl 800dcf0 <uxListRemove>
prvAddTaskToReadyList( pxTCB );
800f3fe: 68fb ldr r3, [r7, #12]
800f400: 6adb ldr r3, [r3, #44] ; 0x2c
800f402: 2201 movs r2, #1
800f404: 409a lsls r2, r3
800f406: 4b2c ldr r3, [pc, #176] ; (800f4b8 <xTaskResumeAll+0x124>)
800f408: 681b ldr r3, [r3, #0]
800f40a: 4313 orrs r3, r2
800f40c: 4a2a ldr r2, [pc, #168] ; (800f4b8 <xTaskResumeAll+0x124>)
800f40e: 6013 str r3, [r2, #0]
800f410: 68fb ldr r3, [r7, #12]
800f412: 6ada ldr r2, [r3, #44] ; 0x2c
800f414: 4613 mov r3, r2
800f416: 009b lsls r3, r3, #2
800f418: 4413 add r3, r2
800f41a: 009b lsls r3, r3, #2
800f41c: 4a27 ldr r2, [pc, #156] ; (800f4bc <xTaskResumeAll+0x128>)
800f41e: 441a add r2, r3
800f420: 68fb ldr r3, [r7, #12]
800f422: 3304 adds r3, #4
800f424: 4619 mov r1, r3
800f426: 4610 mov r0, r2
800f428: f7fe fc05 bl 800dc36 <vListInsertEnd>
/* If the moved task has a priority higher than the current
task then a yield must be performed. */
if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
800f42c: 68fb ldr r3, [r7, #12]
800f42e: 6ada ldr r2, [r3, #44] ; 0x2c
800f430: 4b23 ldr r3, [pc, #140] ; (800f4c0 <xTaskResumeAll+0x12c>)
800f432: 681b ldr r3, [r3, #0]
800f434: 6adb ldr r3, [r3, #44] ; 0x2c
800f436: 429a cmp r2, r3
800f438: d302 bcc.n 800f440 <xTaskResumeAll+0xac>
{
xYieldPending = pdTRUE;
800f43a: 4b22 ldr r3, [pc, #136] ; (800f4c4 <xTaskResumeAll+0x130>)
800f43c: 2201 movs r2, #1
800f43e: 601a str r2, [r3, #0]
while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
800f440: 4b1c ldr r3, [pc, #112] ; (800f4b4 <xTaskResumeAll+0x120>)
800f442: 681b ldr r3, [r3, #0]
800f444: 2b00 cmp r3, #0
800f446: d1cc bne.n 800f3e2 <xTaskResumeAll+0x4e>
{
mtCOVERAGE_TEST_MARKER();
}
}
if( pxTCB != NULL )
800f448: 68fb ldr r3, [r7, #12]
800f44a: 2b00 cmp r3, #0
800f44c: d001 beq.n 800f452 <xTaskResumeAll+0xbe>
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();
800f44e: f000 fb63 bl 800fb18 <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. */
{
UBaseType_t uxPendedCounts = uxPendedTicks; /* Non-volatile copy. */
800f452: 4b1d ldr r3, [pc, #116] ; (800f4c8 <xTaskResumeAll+0x134>)
800f454: 681b ldr r3, [r3, #0]
800f456: 607b str r3, [r7, #4]
if( uxPendedCounts > ( UBaseType_t ) 0U )
800f458: 687b ldr r3, [r7, #4]
800f45a: 2b00 cmp r3, #0
800f45c: d010 beq.n 800f480 <xTaskResumeAll+0xec>
{
do
{
if( xTaskIncrementTick() != pdFALSE )
800f45e: f000 f859 bl 800f514 <xTaskIncrementTick>
800f462: 4603 mov r3, r0
800f464: 2b00 cmp r3, #0
800f466: d002 beq.n 800f46e <xTaskResumeAll+0xda>
{
xYieldPending = pdTRUE;
800f468: 4b16 ldr r3, [pc, #88] ; (800f4c4 <xTaskResumeAll+0x130>)
800f46a: 2201 movs r2, #1
800f46c: 601a str r2, [r3, #0]
}
else
{
mtCOVERAGE_TEST_MARKER();
}
--uxPendedCounts;
800f46e: 687b ldr r3, [r7, #4]
800f470: 3b01 subs r3, #1
800f472: 607b str r3, [r7, #4]
} while( uxPendedCounts > ( UBaseType_t ) 0U );
800f474: 687b ldr r3, [r7, #4]
800f476: 2b00 cmp r3, #0
800f478: d1f1 bne.n 800f45e <xTaskResumeAll+0xca>
uxPendedTicks = 0;
800f47a: 4b13 ldr r3, [pc, #76] ; (800f4c8 <xTaskResumeAll+0x134>)
800f47c: 2200 movs r2, #0
800f47e: 601a str r2, [r3, #0]
{
mtCOVERAGE_TEST_MARKER();
}
}
if( xYieldPending != pdFALSE )
800f480: 4b10 ldr r3, [pc, #64] ; (800f4c4 <xTaskResumeAll+0x130>)
800f482: 681b ldr r3, [r3, #0]
800f484: 2b00 cmp r3, #0
800f486: d009 beq.n 800f49c <xTaskResumeAll+0x108>
{
#if( configUSE_PREEMPTION != 0 )
{
xAlreadyYielded = pdTRUE;
800f488: 2301 movs r3, #1
800f48a: 60bb str r3, [r7, #8]
}
#endif
taskYIELD_IF_USING_PREEMPTION();
800f48c: 4b0f ldr r3, [pc, #60] ; (800f4cc <xTaskResumeAll+0x138>)
800f48e: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800f492: 601a str r2, [r3, #0]
800f494: f3bf 8f4f dsb sy
800f498: f3bf 8f6f isb sy
else
{
mtCOVERAGE_TEST_MARKER();
}
}
taskEXIT_CRITICAL();
800f49c: f000 fed6 bl 801024c <vPortExitCritical>
return xAlreadyYielded;
800f4a0: 68bb ldr r3, [r7, #8]
}
800f4a2: 4618 mov r0, r3
800f4a4: 3710 adds r7, #16
800f4a6: 46bd mov sp, r7
800f4a8: bd80 pop {r7, pc}
800f4aa: bf00 nop
800f4ac: 200006b4 .word 0x200006b4
800f4b0: 2000068c .word 0x2000068c
800f4b4: 2000064c .word 0x2000064c
800f4b8: 20000694 .word 0x20000694
800f4bc: 20000590 .word 0x20000590
800f4c0: 2000058c .word 0x2000058c
800f4c4: 200006a0 .word 0x200006a0
800f4c8: 2000069c .word 0x2000069c
800f4cc: e000ed04 .word 0xe000ed04
0800f4d0 <xTaskGetTickCount>:
/*-----------------------------------------------------------*/
TickType_t xTaskGetTickCount( void )
{
800f4d0: b480 push {r7}
800f4d2: b083 sub sp, #12
800f4d4: af00 add r7, sp, #0
TickType_t xTicks;
/* Critical section required if running on a 16 bit processor. */
portTICK_TYPE_ENTER_CRITICAL();
{
xTicks = xTickCount;
800f4d6: 4b05 ldr r3, [pc, #20] ; (800f4ec <xTaskGetTickCount+0x1c>)
800f4d8: 681b ldr r3, [r3, #0]
800f4da: 607b str r3, [r7, #4]
}
portTICK_TYPE_EXIT_CRITICAL();
return xTicks;
800f4dc: 687b ldr r3, [r7, #4]
}
800f4de: 4618 mov r0, r3
800f4e0: 370c adds r7, #12
800f4e2: 46bd mov sp, r7
800f4e4: f85d 7b04 ldr.w r7, [sp], #4
800f4e8: 4770 bx lr
800f4ea: bf00 nop
800f4ec: 20000690 .word 0x20000690
0800f4f0 <xTaskGetTickCountFromISR>:
/*-----------------------------------------------------------*/
TickType_t xTaskGetTickCountFromISR( void )
{
800f4f0: b580 push {r7, lr}
800f4f2: b082 sub sp, #8
800f4f4: af00 add r7, sp, #0
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: https://www.freertos.org/RTOS-Cortex-M3-M4.html */
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
800f4f6: f000 ff57 bl 80103a8 <vPortValidateInterruptPriority>
uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR();
800f4fa: 2300 movs r3, #0
800f4fc: 607b str r3, [r7, #4]
{
xReturn = xTickCount;
800f4fe: 4b04 ldr r3, [pc, #16] ; (800f510 <xTaskGetTickCountFromISR+0x20>)
800f500: 681b ldr r3, [r3, #0]
800f502: 603b str r3, [r7, #0]
}
portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return xReturn;
800f504: 683b ldr r3, [r7, #0]
}
800f506: 4618 mov r0, r3
800f508: 3708 adds r7, #8
800f50a: 46bd mov sp, r7
800f50c: bd80 pop {r7, pc}
800f50e: bf00 nop
800f510: 20000690 .word 0x20000690
0800f514 <xTaskIncrementTick>:
#endif /* INCLUDE_xTaskAbortDelay */
/*----------------------------------------------------------*/
BaseType_t xTaskIncrementTick( void )
{
800f514: b580 push {r7, lr}
800f516: b086 sub sp, #24
800f518: af00 add r7, sp, #0
TCB_t * pxTCB;
TickType_t xItemValue;
BaseType_t xSwitchRequired = pdFALSE;
800f51a: 2300 movs r3, #0
800f51c: 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 )
800f51e: 4b4f ldr r3, [pc, #316] ; (800f65c <xTaskIncrementTick+0x148>)
800f520: 681b ldr r3, [r3, #0]
800f522: 2b00 cmp r3, #0
800f524: f040 8089 bne.w 800f63a <xTaskIncrementTick+0x126>
{
/* Minor optimisation. The tick count cannot change in this
block. */
const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1;
800f528: 4b4d ldr r3, [pc, #308] ; (800f660 <xTaskIncrementTick+0x14c>)
800f52a: 681b ldr r3, [r3, #0]
800f52c: 3301 adds r3, #1
800f52e: 613b str r3, [r7, #16]
/* Increment the RTOS tick, switching the delayed and overflowed
delayed lists if it wraps to 0. */
xTickCount = xConstTickCount;
800f530: 4a4b ldr r2, [pc, #300] ; (800f660 <xTaskIncrementTick+0x14c>)
800f532: 693b ldr r3, [r7, #16]
800f534: 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. */
800f536: 693b ldr r3, [r7, #16]
800f538: 2b00 cmp r3, #0
800f53a: d121 bne.n 800f580 <xTaskIncrementTick+0x6c>
{
taskSWITCH_DELAYED_LISTS();
800f53c: 4b49 ldr r3, [pc, #292] ; (800f664 <xTaskIncrementTick+0x150>)
800f53e: 681b ldr r3, [r3, #0]
800f540: 681b ldr r3, [r3, #0]
800f542: 2b00 cmp r3, #0
800f544: d00b beq.n 800f55e <xTaskIncrementTick+0x4a>
800f546: f04f 0350 mov.w r3, #80 ; 0x50
800f54a: b672 cpsid i
800f54c: f383 8811 msr BASEPRI, r3
800f550: f3bf 8f6f isb sy
800f554: f3bf 8f4f dsb sy
800f558: b662 cpsie i
800f55a: 603b str r3, [r7, #0]
800f55c: e7fe b.n 800f55c <xTaskIncrementTick+0x48>
800f55e: 4b41 ldr r3, [pc, #260] ; (800f664 <xTaskIncrementTick+0x150>)
800f560: 681b ldr r3, [r3, #0]
800f562: 60fb str r3, [r7, #12]
800f564: 4b40 ldr r3, [pc, #256] ; (800f668 <xTaskIncrementTick+0x154>)
800f566: 681b ldr r3, [r3, #0]
800f568: 4a3e ldr r2, [pc, #248] ; (800f664 <xTaskIncrementTick+0x150>)
800f56a: 6013 str r3, [r2, #0]
800f56c: 4a3e ldr r2, [pc, #248] ; (800f668 <xTaskIncrementTick+0x154>)
800f56e: 68fb ldr r3, [r7, #12]
800f570: 6013 str r3, [r2, #0]
800f572: 4b3e ldr r3, [pc, #248] ; (800f66c <xTaskIncrementTick+0x158>)
800f574: 681b ldr r3, [r3, #0]
800f576: 3301 adds r3, #1
800f578: 4a3c ldr r2, [pc, #240] ; (800f66c <xTaskIncrementTick+0x158>)
800f57a: 6013 str r3, [r2, #0]
800f57c: f000 facc bl 800fb18 <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 )
800f580: 4b3b ldr r3, [pc, #236] ; (800f670 <xTaskIncrementTick+0x15c>)
800f582: 681b ldr r3, [r3, #0]
800f584: 693a ldr r2, [r7, #16]
800f586: 429a cmp r2, r3
800f588: d348 bcc.n 800f61c <xTaskIncrementTick+0x108>
{
for( ;; )
{
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
800f58a: 4b36 ldr r3, [pc, #216] ; (800f664 <xTaskIncrementTick+0x150>)
800f58c: 681b ldr r3, [r3, #0]
800f58e: 681b ldr r3, [r3, #0]
800f590: 2b00 cmp r3, #0
800f592: d104 bne.n 800f59e <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. */
800f594: 4b36 ldr r3, [pc, #216] ; (800f670 <xTaskIncrementTick+0x15c>)
800f596: f04f 32ff mov.w r2, #4294967295
800f59a: 601a str r2, [r3, #0]
break;
800f59c: e03e b.n 800f61c <xTaskIncrementTick+0x108>
{
/* 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. */
800f59e: 4b31 ldr r3, [pc, #196] ; (800f664 <xTaskIncrementTick+0x150>)
800f5a0: 681b ldr r3, [r3, #0]
800f5a2: 68db ldr r3, [r3, #12]
800f5a4: 68db ldr r3, [r3, #12]
800f5a6: 60bb str r3, [r7, #8]
xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) );
800f5a8: 68bb ldr r3, [r7, #8]
800f5aa: 685b ldr r3, [r3, #4]
800f5ac: 607b str r3, [r7, #4]
if( xConstTickCount < xItemValue )
800f5ae: 693a ldr r2, [r7, #16]
800f5b0: 687b ldr r3, [r7, #4]
800f5b2: 429a cmp r2, r3
800f5b4: d203 bcs.n 800f5be <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;
800f5b6: 4a2e ldr r2, [pc, #184] ; (800f670 <xTaskIncrementTick+0x15c>)
800f5b8: 687b ldr r3, [r7, #4]
800f5ba: 6013 str r3, [r2, #0]
break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */
800f5bc: e02e b.n 800f61c <xTaskIncrementTick+0x108>
{
mtCOVERAGE_TEST_MARKER();
}
/* It is time to remove the item from the Blocked state. */
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
800f5be: 68bb ldr r3, [r7, #8]
800f5c0: 3304 adds r3, #4
800f5c2: 4618 mov r0, r3
800f5c4: f7fe fb94 bl 800dcf0 <uxListRemove>
/* Is the task waiting on an event also? If so remove
it from the event list. */
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )
800f5c8: 68bb ldr r3, [r7, #8]
800f5ca: 6a9b ldr r3, [r3, #40] ; 0x28
800f5cc: 2b00 cmp r3, #0
800f5ce: d004 beq.n 800f5da <xTaskIncrementTick+0xc6>
{
( void ) uxListRemove( &( pxTCB->xEventListItem ) );
800f5d0: 68bb ldr r3, [r7, #8]
800f5d2: 3318 adds r3, #24
800f5d4: 4618 mov r0, r3
800f5d6: f7fe fb8b bl 800dcf0 <uxListRemove>
mtCOVERAGE_TEST_MARKER();
}
/* Place the unblocked task into the appropriate ready
list. */
prvAddTaskToReadyList( pxTCB );
800f5da: 68bb ldr r3, [r7, #8]
800f5dc: 6adb ldr r3, [r3, #44] ; 0x2c
800f5de: 2201 movs r2, #1
800f5e0: 409a lsls r2, r3
800f5e2: 4b24 ldr r3, [pc, #144] ; (800f674 <xTaskIncrementTick+0x160>)
800f5e4: 681b ldr r3, [r3, #0]
800f5e6: 4313 orrs r3, r2
800f5e8: 4a22 ldr r2, [pc, #136] ; (800f674 <xTaskIncrementTick+0x160>)
800f5ea: 6013 str r3, [r2, #0]
800f5ec: 68bb ldr r3, [r7, #8]
800f5ee: 6ada ldr r2, [r3, #44] ; 0x2c
800f5f0: 4613 mov r3, r2
800f5f2: 009b lsls r3, r3, #2
800f5f4: 4413 add r3, r2
800f5f6: 009b lsls r3, r3, #2
800f5f8: 4a1f ldr r2, [pc, #124] ; (800f678 <xTaskIncrementTick+0x164>)
800f5fa: 441a add r2, r3
800f5fc: 68bb ldr r3, [r7, #8]
800f5fe: 3304 adds r3, #4
800f600: 4619 mov r1, r3
800f602: 4610 mov r0, r2
800f604: f7fe fb17 bl 800dc36 <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 )
800f608: 68bb ldr r3, [r7, #8]
800f60a: 6ada ldr r2, [r3, #44] ; 0x2c
800f60c: 4b1b ldr r3, [pc, #108] ; (800f67c <xTaskIncrementTick+0x168>)
800f60e: 681b ldr r3, [r3, #0]
800f610: 6adb ldr r3, [r3, #44] ; 0x2c
800f612: 429a cmp r2, r3
800f614: d3b9 bcc.n 800f58a <xTaskIncrementTick+0x76>
{
xSwitchRequired = pdTRUE;
800f616: 2301 movs r3, #1
800f618: 617b str r3, [r7, #20]
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
800f61a: e7b6 b.n 800f58a <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 )
800f61c: 4b17 ldr r3, [pc, #92] ; (800f67c <xTaskIncrementTick+0x168>)
800f61e: 681b ldr r3, [r3, #0]
800f620: 6ada ldr r2, [r3, #44] ; 0x2c
800f622: 4915 ldr r1, [pc, #84] ; (800f678 <xTaskIncrementTick+0x164>)
800f624: 4613 mov r3, r2
800f626: 009b lsls r3, r3, #2
800f628: 4413 add r3, r2
800f62a: 009b lsls r3, r3, #2
800f62c: 440b add r3, r1
800f62e: 681b ldr r3, [r3, #0]
800f630: 2b01 cmp r3, #1
800f632: d907 bls.n 800f644 <xTaskIncrementTick+0x130>
{
xSwitchRequired = pdTRUE;
800f634: 2301 movs r3, #1
800f636: 617b str r3, [r7, #20]
800f638: e004 b.n 800f644 <xTaskIncrementTick+0x130>
}
#endif /* configUSE_TICK_HOOK */
}
else
{
++uxPendedTicks;
800f63a: 4b11 ldr r3, [pc, #68] ; (800f680 <xTaskIncrementTick+0x16c>)
800f63c: 681b ldr r3, [r3, #0]
800f63e: 3301 adds r3, #1
800f640: 4a0f ldr r2, [pc, #60] ; (800f680 <xTaskIncrementTick+0x16c>)
800f642: 6013 str r3, [r2, #0]
#endif
}
#if ( configUSE_PREEMPTION == 1 )
{
if( xYieldPending != pdFALSE )
800f644: 4b0f ldr r3, [pc, #60] ; (800f684 <xTaskIncrementTick+0x170>)
800f646: 681b ldr r3, [r3, #0]
800f648: 2b00 cmp r3, #0
800f64a: d001 beq.n 800f650 <xTaskIncrementTick+0x13c>
{
xSwitchRequired = pdTRUE;
800f64c: 2301 movs r3, #1
800f64e: 617b str r3, [r7, #20]
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_PREEMPTION */
return xSwitchRequired;
800f650: 697b ldr r3, [r7, #20]
}
800f652: 4618 mov r0, r3
800f654: 3718 adds r7, #24
800f656: 46bd mov sp, r7
800f658: bd80 pop {r7, pc}
800f65a: bf00 nop
800f65c: 200006b4 .word 0x200006b4
800f660: 20000690 .word 0x20000690
800f664: 20000644 .word 0x20000644
800f668: 20000648 .word 0x20000648
800f66c: 200006a4 .word 0x200006a4
800f670: 200006ac .word 0x200006ac
800f674: 20000694 .word 0x20000694
800f678: 20000590 .word 0x20000590
800f67c: 2000058c .word 0x2000058c
800f680: 2000069c .word 0x2000069c
800f684: 200006a0 .word 0x200006a0
0800f688 <vTaskSwitchContext>:
#endif /* configUSE_APPLICATION_TASK_TAG */
/*-----------------------------------------------------------*/
void vTaskSwitchContext( void )
{
800f688: b580 push {r7, lr}
800f68a: b088 sub sp, #32
800f68c: af00 add r7, sp, #0
if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
800f68e: 4b3a ldr r3, [pc, #232] ; (800f778 <vTaskSwitchContext+0xf0>)
800f690: 681b ldr r3, [r3, #0]
800f692: 2b00 cmp r3, #0
800f694: d003 beq.n 800f69e <vTaskSwitchContext+0x16>
{
/* The scheduler is currently suspended - do not allow a context
switch. */
xYieldPending = pdTRUE;
800f696: 4b39 ldr r3, [pc, #228] ; (800f77c <vTaskSwitchContext+0xf4>)
800f698: 2201 movs r2, #1
800f69a: 601a str r2, [r3, #0]
structure specific to this task. */
_impure_ptr = &( pxCurrentTCB->xNewLib_reent );
}
#endif /* configUSE_NEWLIB_REENTRANT */
}
}
800f69c: e067 b.n 800f76e <vTaskSwitchContext+0xe6>
xYieldPending = pdFALSE;
800f69e: 4b37 ldr r3, [pc, #220] ; (800f77c <vTaskSwitchContext+0xf4>)
800f6a0: 2200 movs r2, #0
800f6a2: 601a str r2, [r3, #0]
taskCHECK_FOR_STACK_OVERFLOW();
800f6a4: 4b36 ldr r3, [pc, #216] ; (800f780 <vTaskSwitchContext+0xf8>)
800f6a6: 681b ldr r3, [r3, #0]
800f6a8: 6b1b ldr r3, [r3, #48] ; 0x30
800f6aa: 61fb str r3, [r7, #28]
800f6ac: f04f 33a5 mov.w r3, #2779096485 ; 0xa5a5a5a5
800f6b0: 61bb str r3, [r7, #24]
800f6b2: 69fb ldr r3, [r7, #28]
800f6b4: 681b ldr r3, [r3, #0]
800f6b6: 69ba ldr r2, [r7, #24]
800f6b8: 429a cmp r2, r3
800f6ba: d111 bne.n 800f6e0 <vTaskSwitchContext+0x58>
800f6bc: 69fb ldr r3, [r7, #28]
800f6be: 3304 adds r3, #4
800f6c0: 681b ldr r3, [r3, #0]
800f6c2: 69ba ldr r2, [r7, #24]
800f6c4: 429a cmp r2, r3
800f6c6: d10b bne.n 800f6e0 <vTaskSwitchContext+0x58>
800f6c8: 69fb ldr r3, [r7, #28]
800f6ca: 3308 adds r3, #8
800f6cc: 681b ldr r3, [r3, #0]
800f6ce: 69ba ldr r2, [r7, #24]
800f6d0: 429a cmp r2, r3
800f6d2: d105 bne.n 800f6e0 <vTaskSwitchContext+0x58>
800f6d4: 69fb ldr r3, [r7, #28]
800f6d6: 330c adds r3, #12
800f6d8: 681b ldr r3, [r3, #0]
800f6da: 69ba ldr r2, [r7, #24]
800f6dc: 429a cmp r2, r3
800f6de: d008 beq.n 800f6f2 <vTaskSwitchContext+0x6a>
800f6e0: 4b27 ldr r3, [pc, #156] ; (800f780 <vTaskSwitchContext+0xf8>)
800f6e2: 681a ldr r2, [r3, #0]
800f6e4: 4b26 ldr r3, [pc, #152] ; (800f780 <vTaskSwitchContext+0xf8>)
800f6e6: 681b ldr r3, [r3, #0]
800f6e8: 3334 adds r3, #52 ; 0x34
800f6ea: 4619 mov r1, r3
800f6ec: 4610 mov r0, r2
800f6ee: f7f0 ff66 bl 80005be <vApplicationStackOverflowHook>
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. */
800f6f2: 4b24 ldr r3, [pc, #144] ; (800f784 <vTaskSwitchContext+0xfc>)
800f6f4: 681b ldr r3, [r3, #0]
800f6f6: 60fb str r3, [r7, #12]
__asm volatile ( "clz %0, %1" : "=r" ( ucReturn ) : "r" ( ulBitmap ) : "memory" );
800f6f8: 68fb ldr r3, [r7, #12]
800f6fa: fab3 f383 clz r3, r3
800f6fe: 72fb strb r3, [r7, #11]
return ucReturn;
800f700: 7afb ldrb r3, [r7, #11]
800f702: f1c3 031f rsb r3, r3, #31
800f706: 617b str r3, [r7, #20]
800f708: 491f ldr r1, [pc, #124] ; (800f788 <vTaskSwitchContext+0x100>)
800f70a: 697a ldr r2, [r7, #20]
800f70c: 4613 mov r3, r2
800f70e: 009b lsls r3, r3, #2
800f710: 4413 add r3, r2
800f712: 009b lsls r3, r3, #2
800f714: 440b add r3, r1
800f716: 681b ldr r3, [r3, #0]
800f718: 2b00 cmp r3, #0
800f71a: d10b bne.n 800f734 <vTaskSwitchContext+0xac>
__asm volatile
800f71c: f04f 0350 mov.w r3, #80 ; 0x50
800f720: b672 cpsid i
800f722: f383 8811 msr BASEPRI, r3
800f726: f3bf 8f6f isb sy
800f72a: f3bf 8f4f dsb sy
800f72e: b662 cpsie i
800f730: 607b str r3, [r7, #4]
800f732: e7fe b.n 800f732 <vTaskSwitchContext+0xaa>
800f734: 697a ldr r2, [r7, #20]
800f736: 4613 mov r3, r2
800f738: 009b lsls r3, r3, #2
800f73a: 4413 add r3, r2
800f73c: 009b lsls r3, r3, #2
800f73e: 4a12 ldr r2, [pc, #72] ; (800f788 <vTaskSwitchContext+0x100>)
800f740: 4413 add r3, r2
800f742: 613b str r3, [r7, #16]
800f744: 693b ldr r3, [r7, #16]
800f746: 685b ldr r3, [r3, #4]
800f748: 685a ldr r2, [r3, #4]
800f74a: 693b ldr r3, [r7, #16]
800f74c: 605a str r2, [r3, #4]
800f74e: 693b ldr r3, [r7, #16]
800f750: 685a ldr r2, [r3, #4]
800f752: 693b ldr r3, [r7, #16]
800f754: 3308 adds r3, #8
800f756: 429a cmp r2, r3
800f758: d104 bne.n 800f764 <vTaskSwitchContext+0xdc>
800f75a: 693b ldr r3, [r7, #16]
800f75c: 685b ldr r3, [r3, #4]
800f75e: 685a ldr r2, [r3, #4]
800f760: 693b ldr r3, [r7, #16]
800f762: 605a str r2, [r3, #4]
800f764: 693b ldr r3, [r7, #16]
800f766: 685b ldr r3, [r3, #4]
800f768: 68db ldr r3, [r3, #12]
800f76a: 4a05 ldr r2, [pc, #20] ; (800f780 <vTaskSwitchContext+0xf8>)
800f76c: 6013 str r3, [r2, #0]
}
800f76e: bf00 nop
800f770: 3720 adds r7, #32
800f772: 46bd mov sp, r7
800f774: bd80 pop {r7, pc}
800f776: bf00 nop
800f778: 200006b4 .word 0x200006b4
800f77c: 200006a0 .word 0x200006a0
800f780: 2000058c .word 0x2000058c
800f784: 20000694 .word 0x20000694
800f788: 20000590 .word 0x20000590
0800f78c <vTaskPlaceOnEventList>:
/*-----------------------------------------------------------*/
void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait )
{
800f78c: b580 push {r7, lr}
800f78e: b084 sub sp, #16
800f790: af00 add r7, sp, #0
800f792: 6078 str r0, [r7, #4]
800f794: 6039 str r1, [r7, #0]
configASSERT( pxEventList );
800f796: 687b ldr r3, [r7, #4]
800f798: 2b00 cmp r3, #0
800f79a: d10b bne.n 800f7b4 <vTaskPlaceOnEventList+0x28>
800f79c: f04f 0350 mov.w r3, #80 ; 0x50
800f7a0: b672 cpsid i
800f7a2: f383 8811 msr BASEPRI, r3
800f7a6: f3bf 8f6f isb sy
800f7aa: f3bf 8f4f dsb sy
800f7ae: b662 cpsie i
800f7b0: 60fb str r3, [r7, #12]
800f7b2: e7fe b.n 800f7b2 <vTaskPlaceOnEventList+0x26>
/* 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 ) );
800f7b4: 4b07 ldr r3, [pc, #28] ; (800f7d4 <vTaskPlaceOnEventList+0x48>)
800f7b6: 681b ldr r3, [r3, #0]
800f7b8: 3318 adds r3, #24
800f7ba: 4619 mov r1, r3
800f7bc: 6878 ldr r0, [r7, #4]
800f7be: f7fe fa5e bl 800dc7e <vListInsert>
prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE );
800f7c2: 2101 movs r1, #1
800f7c4: 6838 ldr r0, [r7, #0]
800f7c6: f000 fb9d bl 800ff04 <prvAddCurrentTaskToDelayedList>
}
800f7ca: bf00 nop
800f7cc: 3710 adds r7, #16
800f7ce: 46bd mov sp, r7
800f7d0: bd80 pop {r7, pc}
800f7d2: bf00 nop
800f7d4: 2000058c .word 0x2000058c
0800f7d8 <xTaskRemoveFromEventList>:
#endif /* configUSE_TIMERS */
/*-----------------------------------------------------------*/
BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
{
800f7d8: b580 push {r7, lr}
800f7da: b086 sub sp, #24
800f7dc: af00 add r7, sp, #0
800f7de: 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. */
800f7e0: 687b ldr r3, [r7, #4]
800f7e2: 68db ldr r3, [r3, #12]
800f7e4: 68db ldr r3, [r3, #12]
800f7e6: 613b str r3, [r7, #16]
configASSERT( pxUnblockedTCB );
800f7e8: 693b ldr r3, [r7, #16]
800f7ea: 2b00 cmp r3, #0
800f7ec: d10b bne.n 800f806 <xTaskRemoveFromEventList+0x2e>
800f7ee: f04f 0350 mov.w r3, #80 ; 0x50
800f7f2: b672 cpsid i
800f7f4: f383 8811 msr BASEPRI, r3
800f7f8: f3bf 8f6f isb sy
800f7fc: f3bf 8f4f dsb sy
800f800: b662 cpsie i
800f802: 60fb str r3, [r7, #12]
800f804: e7fe b.n 800f804 <xTaskRemoveFromEventList+0x2c>
( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) );
800f806: 693b ldr r3, [r7, #16]
800f808: 3318 adds r3, #24
800f80a: 4618 mov r0, r3
800f80c: f7fe fa70 bl 800dcf0 <uxListRemove>
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
800f810: 4b1d ldr r3, [pc, #116] ; (800f888 <xTaskRemoveFromEventList+0xb0>)
800f812: 681b ldr r3, [r3, #0]
800f814: 2b00 cmp r3, #0
800f816: d11c bne.n 800f852 <xTaskRemoveFromEventList+0x7a>
{
( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) );
800f818: 693b ldr r3, [r7, #16]
800f81a: 3304 adds r3, #4
800f81c: 4618 mov r0, r3
800f81e: f7fe fa67 bl 800dcf0 <uxListRemove>
prvAddTaskToReadyList( pxUnblockedTCB );
800f822: 693b ldr r3, [r7, #16]
800f824: 6adb ldr r3, [r3, #44] ; 0x2c
800f826: 2201 movs r2, #1
800f828: 409a lsls r2, r3
800f82a: 4b18 ldr r3, [pc, #96] ; (800f88c <xTaskRemoveFromEventList+0xb4>)
800f82c: 681b ldr r3, [r3, #0]
800f82e: 4313 orrs r3, r2
800f830: 4a16 ldr r2, [pc, #88] ; (800f88c <xTaskRemoveFromEventList+0xb4>)
800f832: 6013 str r3, [r2, #0]
800f834: 693b ldr r3, [r7, #16]
800f836: 6ada ldr r2, [r3, #44] ; 0x2c
800f838: 4613 mov r3, r2
800f83a: 009b lsls r3, r3, #2
800f83c: 4413 add r3, r2
800f83e: 009b lsls r3, r3, #2
800f840: 4a13 ldr r2, [pc, #76] ; (800f890 <xTaskRemoveFromEventList+0xb8>)
800f842: 441a add r2, r3
800f844: 693b ldr r3, [r7, #16]
800f846: 3304 adds r3, #4
800f848: 4619 mov r1, r3
800f84a: 4610 mov r0, r2
800f84c: f7fe f9f3 bl 800dc36 <vListInsertEnd>
800f850: e005 b.n 800f85e <xTaskRemoveFromEventList+0x86>
}
else
{
/* The delayed and ready lists cannot be accessed, so hold this task
pending until the scheduler is resumed. */
vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) );
800f852: 693b ldr r3, [r7, #16]
800f854: 3318 adds r3, #24
800f856: 4619 mov r1, r3
800f858: 480e ldr r0, [pc, #56] ; (800f894 <xTaskRemoveFromEventList+0xbc>)
800f85a: f7fe f9ec bl 800dc36 <vListInsertEnd>
}
if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority )
800f85e: 693b ldr r3, [r7, #16]
800f860: 6ada ldr r2, [r3, #44] ; 0x2c
800f862: 4b0d ldr r3, [pc, #52] ; (800f898 <xTaskRemoveFromEventList+0xc0>)
800f864: 681b ldr r3, [r3, #0]
800f866: 6adb ldr r3, [r3, #44] ; 0x2c
800f868: 429a cmp r2, r3
800f86a: d905 bls.n 800f878 <xTaskRemoveFromEventList+0xa0>
{
/* 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;
800f86c: 2301 movs r3, #1
800f86e: 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;
800f870: 4b0a ldr r3, [pc, #40] ; (800f89c <xTaskRemoveFromEventList+0xc4>)
800f872: 2201 movs r2, #1
800f874: 601a str r2, [r3, #0]
800f876: e001 b.n 800f87c <xTaskRemoveFromEventList+0xa4>
}
else
{
xReturn = pdFALSE;
800f878: 2300 movs r3, #0
800f87a: 617b str r3, [r7, #20]
}
return xReturn;
800f87c: 697b ldr r3, [r7, #20]
}
800f87e: 4618 mov r0, r3
800f880: 3718 adds r7, #24
800f882: 46bd mov sp, r7
800f884: bd80 pop {r7, pc}
800f886: bf00 nop
800f888: 200006b4 .word 0x200006b4
800f88c: 20000694 .word 0x20000694
800f890: 20000590 .word 0x20000590
800f894: 2000064c .word 0x2000064c
800f898: 2000058c .word 0x2000058c
800f89c: 200006a0 .word 0x200006a0
0800f8a0 <vTaskInternalSetTimeOutState>:
taskEXIT_CRITICAL();
}
/*-----------------------------------------------------------*/
void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut )
{
800f8a0: b480 push {r7}
800f8a2: b083 sub sp, #12
800f8a4: af00 add r7, sp, #0
800f8a6: 6078 str r0, [r7, #4]
/* For internal use only as it does not use a critical section. */
pxTimeOut->xOverflowCount = xNumOfOverflows;
800f8a8: 4b06 ldr r3, [pc, #24] ; (800f8c4 <vTaskInternalSetTimeOutState+0x24>)
800f8aa: 681a ldr r2, [r3, #0]
800f8ac: 687b ldr r3, [r7, #4]
800f8ae: 601a str r2, [r3, #0]
pxTimeOut->xTimeOnEntering = xTickCount;
800f8b0: 4b05 ldr r3, [pc, #20] ; (800f8c8 <vTaskInternalSetTimeOutState+0x28>)
800f8b2: 681a ldr r2, [r3, #0]
800f8b4: 687b ldr r3, [r7, #4]
800f8b6: 605a str r2, [r3, #4]
}
800f8b8: bf00 nop
800f8ba: 370c adds r7, #12
800f8bc: 46bd mov sp, r7
800f8be: f85d 7b04 ldr.w r7, [sp], #4
800f8c2: 4770 bx lr
800f8c4: 200006a4 .word 0x200006a4
800f8c8: 20000690 .word 0x20000690
0800f8cc <xTaskCheckForTimeOut>:
/*-----------------------------------------------------------*/
BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait )
{
800f8cc: b580 push {r7, lr}
800f8ce: b088 sub sp, #32
800f8d0: af00 add r7, sp, #0
800f8d2: 6078 str r0, [r7, #4]
800f8d4: 6039 str r1, [r7, #0]
BaseType_t xReturn;
configASSERT( pxTimeOut );
800f8d6: 687b ldr r3, [r7, #4]
800f8d8: 2b00 cmp r3, #0
800f8da: d10b bne.n 800f8f4 <xTaskCheckForTimeOut+0x28>
800f8dc: f04f 0350 mov.w r3, #80 ; 0x50
800f8e0: b672 cpsid i
800f8e2: f383 8811 msr BASEPRI, r3
800f8e6: f3bf 8f6f isb sy
800f8ea: f3bf 8f4f dsb sy
800f8ee: b662 cpsie i
800f8f0: 613b str r3, [r7, #16]
800f8f2: e7fe b.n 800f8f2 <xTaskCheckForTimeOut+0x26>
configASSERT( pxTicksToWait );
800f8f4: 683b ldr r3, [r7, #0]
800f8f6: 2b00 cmp r3, #0
800f8f8: d10b bne.n 800f912 <xTaskCheckForTimeOut+0x46>
800f8fa: f04f 0350 mov.w r3, #80 ; 0x50
800f8fe: b672 cpsid i
800f900: f383 8811 msr BASEPRI, r3
800f904: f3bf 8f6f isb sy
800f908: f3bf 8f4f dsb sy
800f90c: b662 cpsie i
800f90e: 60fb str r3, [r7, #12]
800f910: e7fe b.n 800f910 <xTaskCheckForTimeOut+0x44>
taskENTER_CRITICAL();
800f912: f000 fc69 bl 80101e8 <vPortEnterCritical>
{
/* Minor optimisation. The tick count cannot change in this block. */
const TickType_t xConstTickCount = xTickCount;
800f916: 4b1d ldr r3, [pc, #116] ; (800f98c <xTaskCheckForTimeOut+0xc0>)
800f918: 681b ldr r3, [r3, #0]
800f91a: 61bb str r3, [r7, #24]
const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering;
800f91c: 687b ldr r3, [r7, #4]
800f91e: 685b ldr r3, [r3, #4]
800f920: 69ba ldr r2, [r7, #24]
800f922: 1ad3 subs r3, r2, r3
800f924: 617b str r3, [r7, #20]
}
else
#endif
#if ( INCLUDE_vTaskSuspend == 1 )
if( *pxTicksToWait == portMAX_DELAY )
800f926: 683b ldr r3, [r7, #0]
800f928: 681b ldr r3, [r3, #0]
800f92a: f1b3 3fff cmp.w r3, #4294967295
800f92e: d102 bne.n 800f936 <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;
800f930: 2300 movs r3, #0
800f932: 61fb str r3, [r7, #28]
800f934: e023 b.n 800f97e <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. */
800f936: 687b ldr r3, [r7, #4]
800f938: 681a ldr r2, [r3, #0]
800f93a: 4b15 ldr r3, [pc, #84] ; (800f990 <xTaskCheckForTimeOut+0xc4>)
800f93c: 681b ldr r3, [r3, #0]
800f93e: 429a cmp r2, r3
800f940: d007 beq.n 800f952 <xTaskCheckForTimeOut+0x86>
800f942: 687b ldr r3, [r7, #4]
800f944: 685b ldr r3, [r3, #4]
800f946: 69ba ldr r2, [r7, #24]
800f948: 429a cmp r2, r3
800f94a: d302 bcc.n 800f952 <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;
800f94c: 2301 movs r3, #1
800f94e: 61fb str r3, [r7, #28]
800f950: e015 b.n 800f97e <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. */
800f952: 683b ldr r3, [r7, #0]
800f954: 681b ldr r3, [r3, #0]
800f956: 697a ldr r2, [r7, #20]
800f958: 429a cmp r2, r3
800f95a: d20b bcs.n 800f974 <xTaskCheckForTimeOut+0xa8>
{
/* Not a genuine timeout. Adjust parameters for time remaining. */
*pxTicksToWait -= xElapsedTime;
800f95c: 683b ldr r3, [r7, #0]
800f95e: 681a ldr r2, [r3, #0]
800f960: 697b ldr r3, [r7, #20]
800f962: 1ad2 subs r2, r2, r3
800f964: 683b ldr r3, [r7, #0]
800f966: 601a str r2, [r3, #0]
vTaskInternalSetTimeOutState( pxTimeOut );
800f968: 6878 ldr r0, [r7, #4]
800f96a: f7ff ff99 bl 800f8a0 <vTaskInternalSetTimeOutState>
xReturn = pdFALSE;
800f96e: 2300 movs r3, #0
800f970: 61fb str r3, [r7, #28]
800f972: e004 b.n 800f97e <xTaskCheckForTimeOut+0xb2>
}
else
{
*pxTicksToWait = 0;
800f974: 683b ldr r3, [r7, #0]
800f976: 2200 movs r2, #0
800f978: 601a str r2, [r3, #0]
xReturn = pdTRUE;
800f97a: 2301 movs r3, #1
800f97c: 61fb str r3, [r7, #28]
}
}
taskEXIT_CRITICAL();
800f97e: f000 fc65 bl 801024c <vPortExitCritical>
return xReturn;
800f982: 69fb ldr r3, [r7, #28]
}
800f984: 4618 mov r0, r3
800f986: 3720 adds r7, #32
800f988: 46bd mov sp, r7
800f98a: bd80 pop {r7, pc}
800f98c: 20000690 .word 0x20000690
800f990: 200006a4 .word 0x200006a4
0800f994 <vTaskMissedYield>:
/*-----------------------------------------------------------*/
void vTaskMissedYield( void )
{
800f994: b480 push {r7}
800f996: af00 add r7, sp, #0
xYieldPending = pdTRUE;
800f998: 4b03 ldr r3, [pc, #12] ; (800f9a8 <vTaskMissedYield+0x14>)
800f99a: 2201 movs r2, #1
800f99c: 601a str r2, [r3, #0]
}
800f99e: bf00 nop
800f9a0: 46bd mov sp, r7
800f9a2: f85d 7b04 ldr.w r7, [sp], #4
800f9a6: 4770 bx lr
800f9a8: 200006a0 .word 0x200006a0
0800f9ac <prvIdleTask>:
*
* void prvIdleTask( void *pvParameters );
*
*/
static portTASK_FUNCTION( prvIdleTask, pvParameters )
{
800f9ac: b580 push {r7, lr}
800f9ae: b082 sub sp, #8
800f9b0: af00 add r7, sp, #0
800f9b2: 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();
800f9b4: f000 f854 bl 800fa60 <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 )
800f9b8: 4b07 ldr r3, [pc, #28] ; (800f9d8 <prvIdleTask+0x2c>)
800f9ba: 681b ldr r3, [r3, #0]
800f9bc: 2b01 cmp r3, #1
800f9be: d907 bls.n 800f9d0 <prvIdleTask+0x24>
{
taskYIELD();
800f9c0: 4b06 ldr r3, [pc, #24] ; (800f9dc <prvIdleTask+0x30>)
800f9c2: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800f9c6: 601a str r2, [r3, #0]
800f9c8: f3bf 8f4f dsb sy
800f9cc: f3bf 8f6f isb sy
/* Call the user defined function from within the idle task. This
allows the application designer to add background functionality
without the overhead of a separate task.
NOTE: vApplicationIdleHook() MUST NOT, UNDER ANY CIRCUMSTANCES,
CALL A FUNCTION THAT MIGHT BLOCK. */
vApplicationIdleHook();
800f9d0: f7f0 fdee bl 80005b0 <vApplicationIdleHook>
prvCheckTasksWaitingTermination();
800f9d4: e7ee b.n 800f9b4 <prvIdleTask+0x8>
800f9d6: bf00 nop
800f9d8: 20000590 .word 0x20000590
800f9dc: e000ed04 .word 0xe000ed04
0800f9e0 <prvInitialiseTaskLists>:
#endif /* portUSING_MPU_WRAPPERS */
/*-----------------------------------------------------------*/
static void prvInitialiseTaskLists( void )
{
800f9e0: b580 push {r7, lr}
800f9e2: b082 sub sp, #8
800f9e4: af00 add r7, sp, #0
UBaseType_t uxPriority;
for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
800f9e6: 2300 movs r3, #0
800f9e8: 607b str r3, [r7, #4]
800f9ea: e00c b.n 800fa06 <prvInitialiseTaskLists+0x26>
{
vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) );
800f9ec: 687a ldr r2, [r7, #4]
800f9ee: 4613 mov r3, r2
800f9f0: 009b lsls r3, r3, #2
800f9f2: 4413 add r3, r2
800f9f4: 009b lsls r3, r3, #2
800f9f6: 4a12 ldr r2, [pc, #72] ; (800fa40 <prvInitialiseTaskLists+0x60>)
800f9f8: 4413 add r3, r2
800f9fa: 4618 mov r0, r3
800f9fc: f7fe f8ee bl 800dbdc <vListInitialise>
for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
800fa00: 687b ldr r3, [r7, #4]
800fa02: 3301 adds r3, #1
800fa04: 607b str r3, [r7, #4]
800fa06: 687b ldr r3, [r7, #4]
800fa08: 2b06 cmp r3, #6
800fa0a: d9ef bls.n 800f9ec <prvInitialiseTaskLists+0xc>
}
vListInitialise( &xDelayedTaskList1 );
800fa0c: 480d ldr r0, [pc, #52] ; (800fa44 <prvInitialiseTaskLists+0x64>)
800fa0e: f7fe f8e5 bl 800dbdc <vListInitialise>
vListInitialise( &xDelayedTaskList2 );
800fa12: 480d ldr r0, [pc, #52] ; (800fa48 <prvInitialiseTaskLists+0x68>)
800fa14: f7fe f8e2 bl 800dbdc <vListInitialise>
vListInitialise( &xPendingReadyList );
800fa18: 480c ldr r0, [pc, #48] ; (800fa4c <prvInitialiseTaskLists+0x6c>)
800fa1a: f7fe f8df bl 800dbdc <vListInitialise>
#if ( INCLUDE_vTaskDelete == 1 )
{
vListInitialise( &xTasksWaitingTermination );
800fa1e: 480c ldr r0, [pc, #48] ; (800fa50 <prvInitialiseTaskLists+0x70>)
800fa20: f7fe f8dc bl 800dbdc <vListInitialise>
}
#endif /* INCLUDE_vTaskDelete */
#if ( INCLUDE_vTaskSuspend == 1 )
{
vListInitialise( &xSuspendedTaskList );
800fa24: 480b ldr r0, [pc, #44] ; (800fa54 <prvInitialiseTaskLists+0x74>)
800fa26: f7fe f8d9 bl 800dbdc <vListInitialise>
}
#endif /* INCLUDE_vTaskSuspend */
/* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList
using list2. */
pxDelayedTaskList = &xDelayedTaskList1;
800fa2a: 4b0b ldr r3, [pc, #44] ; (800fa58 <prvInitialiseTaskLists+0x78>)
800fa2c: 4a05 ldr r2, [pc, #20] ; (800fa44 <prvInitialiseTaskLists+0x64>)
800fa2e: 601a str r2, [r3, #0]
pxOverflowDelayedTaskList = &xDelayedTaskList2;
800fa30: 4b0a ldr r3, [pc, #40] ; (800fa5c <prvInitialiseTaskLists+0x7c>)
800fa32: 4a05 ldr r2, [pc, #20] ; (800fa48 <prvInitialiseTaskLists+0x68>)
800fa34: 601a str r2, [r3, #0]
}
800fa36: bf00 nop
800fa38: 3708 adds r7, #8
800fa3a: 46bd mov sp, r7
800fa3c: bd80 pop {r7, pc}
800fa3e: bf00 nop
800fa40: 20000590 .word 0x20000590
800fa44: 2000061c .word 0x2000061c
800fa48: 20000630 .word 0x20000630
800fa4c: 2000064c .word 0x2000064c
800fa50: 20000660 .word 0x20000660
800fa54: 20000678 .word 0x20000678
800fa58: 20000644 .word 0x20000644
800fa5c: 20000648 .word 0x20000648
0800fa60 <prvCheckTasksWaitingTermination>:
/*-----------------------------------------------------------*/
static void prvCheckTasksWaitingTermination( void )
{
800fa60: b580 push {r7, lr}
800fa62: b082 sub sp, #8
800fa64: 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 )
800fa66: e019 b.n 800fa9c <prvCheckTasksWaitingTermination+0x3c>
{
taskENTER_CRITICAL();
800fa68: f000 fbbe bl 80101e8 <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. */
800fa6c: 4b0f ldr r3, [pc, #60] ; (800faac <prvCheckTasksWaitingTermination+0x4c>)
800fa6e: 68db ldr r3, [r3, #12]
800fa70: 68db ldr r3, [r3, #12]
800fa72: 607b str r3, [r7, #4]
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
800fa74: 687b ldr r3, [r7, #4]
800fa76: 3304 adds r3, #4
800fa78: 4618 mov r0, r3
800fa7a: f7fe f939 bl 800dcf0 <uxListRemove>
--uxCurrentNumberOfTasks;
800fa7e: 4b0c ldr r3, [pc, #48] ; (800fab0 <prvCheckTasksWaitingTermination+0x50>)
800fa80: 681b ldr r3, [r3, #0]
800fa82: 3b01 subs r3, #1
800fa84: 4a0a ldr r2, [pc, #40] ; (800fab0 <prvCheckTasksWaitingTermination+0x50>)
800fa86: 6013 str r3, [r2, #0]
--uxDeletedTasksWaitingCleanUp;
800fa88: 4b0a ldr r3, [pc, #40] ; (800fab4 <prvCheckTasksWaitingTermination+0x54>)
800fa8a: 681b ldr r3, [r3, #0]
800fa8c: 3b01 subs r3, #1
800fa8e: 4a09 ldr r2, [pc, #36] ; (800fab4 <prvCheckTasksWaitingTermination+0x54>)
800fa90: 6013 str r3, [r2, #0]
}
taskEXIT_CRITICAL();
800fa92: f000 fbdb bl 801024c <vPortExitCritical>
prvDeleteTCB( pxTCB );
800fa96: 6878 ldr r0, [r7, #4]
800fa98: f000 f80e bl 800fab8 <prvDeleteTCB>
while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
800fa9c: 4b05 ldr r3, [pc, #20] ; (800fab4 <prvCheckTasksWaitingTermination+0x54>)
800fa9e: 681b ldr r3, [r3, #0]
800faa0: 2b00 cmp r3, #0
800faa2: d1e1 bne.n 800fa68 <prvCheckTasksWaitingTermination+0x8>
}
}
#endif /* INCLUDE_vTaskDelete */
}
800faa4: bf00 nop
800faa6: 3708 adds r7, #8
800faa8: 46bd mov sp, r7
800faaa: bd80 pop {r7, pc}
800faac: 20000660 .word 0x20000660
800fab0: 2000068c .word 0x2000068c
800fab4: 20000674 .word 0x20000674
0800fab8 <prvDeleteTCB>:
/*-----------------------------------------------------------*/
#if ( INCLUDE_vTaskDelete == 1 )
static void prvDeleteTCB( TCB_t *pxTCB )
{
800fab8: b580 push {r7, lr}
800faba: b084 sub sp, #16
800fabc: af00 add r7, sp, #0
800fabe: 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 )
800fac0: 687b ldr r3, [r7, #4]
800fac2: f893 3055 ldrb.w r3, [r3, #85] ; 0x55
800fac6: 2b00 cmp r3, #0
800fac8: d108 bne.n 800fadc <prvDeleteTCB+0x24>
{
/* Both the stack and TCB were allocated dynamically, so both
must be freed. */
vPortFree( pxTCB->pxStack );
800faca: 687b ldr r3, [r7, #4]
800facc: 6b1b ldr r3, [r3, #48] ; 0x30
800face: 4618 mov r0, r3
800fad0: f000 fd78 bl 80105c4 <vPortFree>
vPortFree( pxTCB );
800fad4: 6878 ldr r0, [r7, #4]
800fad6: f000 fd75 bl 80105c4 <vPortFree>
configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB );
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
}
800fada: e019 b.n 800fb10 <prvDeleteTCB+0x58>
else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY )
800fadc: 687b ldr r3, [r7, #4]
800fade: f893 3055 ldrb.w r3, [r3, #85] ; 0x55
800fae2: 2b01 cmp r3, #1
800fae4: d103 bne.n 800faee <prvDeleteTCB+0x36>
vPortFree( pxTCB );
800fae6: 6878 ldr r0, [r7, #4]
800fae8: f000 fd6c bl 80105c4 <vPortFree>
}
800faec: e010 b.n 800fb10 <prvDeleteTCB+0x58>
configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB );
800faee: 687b ldr r3, [r7, #4]
800faf0: f893 3055 ldrb.w r3, [r3, #85] ; 0x55
800faf4: 2b02 cmp r3, #2
800faf6: d00b beq.n 800fb10 <prvDeleteTCB+0x58>
800faf8: f04f 0350 mov.w r3, #80 ; 0x50
800fafc: b672 cpsid i
800fafe: f383 8811 msr BASEPRI, r3
800fb02: f3bf 8f6f isb sy
800fb06: f3bf 8f4f dsb sy
800fb0a: b662 cpsie i
800fb0c: 60fb str r3, [r7, #12]
800fb0e: e7fe b.n 800fb0e <prvDeleteTCB+0x56>
}
800fb10: bf00 nop
800fb12: 3710 adds r7, #16
800fb14: 46bd mov sp, r7
800fb16: bd80 pop {r7, pc}
0800fb18 <prvResetNextTaskUnblockTime>:
#endif /* INCLUDE_vTaskDelete */
/*-----------------------------------------------------------*/
static void prvResetNextTaskUnblockTime( void )
{
800fb18: b480 push {r7}
800fb1a: b083 sub sp, #12
800fb1c: af00 add r7, sp, #0
TCB_t *pxTCB;
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
800fb1e: 4b0c ldr r3, [pc, #48] ; (800fb50 <prvResetNextTaskUnblockTime+0x38>)
800fb20: 681b ldr r3, [r3, #0]
800fb22: 681b ldr r3, [r3, #0]
800fb24: 2b00 cmp r3, #0
800fb26: d104 bne.n 800fb32 <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;
800fb28: 4b0a ldr r3, [pc, #40] ; (800fb54 <prvResetNextTaskUnblockTime+0x3c>)
800fb2a: f04f 32ff mov.w r2, #4294967295
800fb2e: 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 ) );
}
}
800fb30: e008 b.n 800fb44 <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. */
800fb32: 4b07 ldr r3, [pc, #28] ; (800fb50 <prvResetNextTaskUnblockTime+0x38>)
800fb34: 681b ldr r3, [r3, #0]
800fb36: 68db ldr r3, [r3, #12]
800fb38: 68db ldr r3, [r3, #12]
800fb3a: 607b str r3, [r7, #4]
xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) );
800fb3c: 687b ldr r3, [r7, #4]
800fb3e: 685b ldr r3, [r3, #4]
800fb40: 4a04 ldr r2, [pc, #16] ; (800fb54 <prvResetNextTaskUnblockTime+0x3c>)
800fb42: 6013 str r3, [r2, #0]
}
800fb44: bf00 nop
800fb46: 370c adds r7, #12
800fb48: 46bd mov sp, r7
800fb4a: f85d 7b04 ldr.w r7, [sp], #4
800fb4e: 4770 bx lr
800fb50: 20000644 .word 0x20000644
800fb54: 200006ac .word 0x200006ac
0800fb58 <xTaskGetSchedulerState>:
/*-----------------------------------------------------------*/
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
BaseType_t xTaskGetSchedulerState( void )
{
800fb58: b480 push {r7}
800fb5a: b083 sub sp, #12
800fb5c: af00 add r7, sp, #0
BaseType_t xReturn;
if( xSchedulerRunning == pdFALSE )
800fb5e: 4b0b ldr r3, [pc, #44] ; (800fb8c <xTaskGetSchedulerState+0x34>)
800fb60: 681b ldr r3, [r3, #0]
800fb62: 2b00 cmp r3, #0
800fb64: d102 bne.n 800fb6c <xTaskGetSchedulerState+0x14>
{
xReturn = taskSCHEDULER_NOT_STARTED;
800fb66: 2301 movs r3, #1
800fb68: 607b str r3, [r7, #4]
800fb6a: e008 b.n 800fb7e <xTaskGetSchedulerState+0x26>
}
else
{
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
800fb6c: 4b08 ldr r3, [pc, #32] ; (800fb90 <xTaskGetSchedulerState+0x38>)
800fb6e: 681b ldr r3, [r3, #0]
800fb70: 2b00 cmp r3, #0
800fb72: d102 bne.n 800fb7a <xTaskGetSchedulerState+0x22>
{
xReturn = taskSCHEDULER_RUNNING;
800fb74: 2302 movs r3, #2
800fb76: 607b str r3, [r7, #4]
800fb78: e001 b.n 800fb7e <xTaskGetSchedulerState+0x26>
}
else
{
xReturn = taskSCHEDULER_SUSPENDED;
800fb7a: 2300 movs r3, #0
800fb7c: 607b str r3, [r7, #4]
}
}
return xReturn;
800fb7e: 687b ldr r3, [r7, #4]
}
800fb80: 4618 mov r0, r3
800fb82: 370c adds r7, #12
800fb84: 46bd mov sp, r7
800fb86: f85d 7b04 ldr.w r7, [sp], #4
800fb8a: 4770 bx lr
800fb8c: 20000698 .word 0x20000698
800fb90: 200006b4 .word 0x200006b4
0800fb94 <xTaskPriorityInherit>:
/*-----------------------------------------------------------*/
#if ( configUSE_MUTEXES == 1 )
BaseType_t xTaskPriorityInherit( TaskHandle_t const pxMutexHolder )
{
800fb94: b580 push {r7, lr}
800fb96: b084 sub sp, #16
800fb98: af00 add r7, sp, #0
800fb9a: 6078 str r0, [r7, #4]
TCB_t * const pxMutexHolderTCB = pxMutexHolder;
800fb9c: 687b ldr r3, [r7, #4]
800fb9e: 60bb str r3, [r7, #8]
BaseType_t xReturn = pdFALSE;
800fba0: 2300 movs r3, #0
800fba2: 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 )
800fba4: 687b ldr r3, [r7, #4]
800fba6: 2b00 cmp r3, #0
800fba8: d069 beq.n 800fc7e <xTaskPriorityInherit+0xea>
{
/* 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 )
800fbaa: 68bb ldr r3, [r7, #8]
800fbac: 6ada ldr r2, [r3, #44] ; 0x2c
800fbae: 4b36 ldr r3, [pc, #216] ; (800fc88 <xTaskPriorityInherit+0xf4>)
800fbb0: 681b ldr r3, [r3, #0]
800fbb2: 6adb ldr r3, [r3, #44] ; 0x2c
800fbb4: 429a cmp r2, r3
800fbb6: d259 bcs.n 800fc6c <xTaskPriorityInherit+0xd8>
{
/* 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 )
800fbb8: 68bb ldr r3, [r7, #8]
800fbba: 699b ldr r3, [r3, #24]
800fbbc: 2b00 cmp r3, #0
800fbbe: db06 blt.n 800fbce <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. */
800fbc0: 4b31 ldr r3, [pc, #196] ; (800fc88 <xTaskPriorityInherit+0xf4>)
800fbc2: 681b ldr r3, [r3, #0]
800fbc4: 6adb ldr r3, [r3, #44] ; 0x2c
800fbc6: f1c3 0207 rsb r2, r3, #7
800fbca: 68bb ldr r3, [r7, #8]
800fbcc: 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 )
800fbce: 68bb ldr r3, [r7, #8]
800fbd0: 6959 ldr r1, [r3, #20]
800fbd2: 68bb ldr r3, [r7, #8]
800fbd4: 6ada ldr r2, [r3, #44] ; 0x2c
800fbd6: 4613 mov r3, r2
800fbd8: 009b lsls r3, r3, #2
800fbda: 4413 add r3, r2
800fbdc: 009b lsls r3, r3, #2
800fbde: 4a2b ldr r2, [pc, #172] ; (800fc8c <xTaskPriorityInherit+0xf8>)
800fbe0: 4413 add r3, r2
800fbe2: 4299 cmp r1, r3
800fbe4: d13a bne.n 800fc5c <xTaskPriorityInherit+0xc8>
{
if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
800fbe6: 68bb ldr r3, [r7, #8]
800fbe8: 3304 adds r3, #4
800fbea: 4618 mov r0, r3
800fbec: f7fe f880 bl 800dcf0 <uxListRemove>
800fbf0: 4603 mov r3, r0
800fbf2: 2b00 cmp r3, #0
800fbf4: d115 bne.n 800fc22 <xTaskPriorityInherit+0x8e>
{
taskRESET_READY_PRIORITY( pxMutexHolderTCB->uxPriority );
800fbf6: 68bb ldr r3, [r7, #8]
800fbf8: 6ada ldr r2, [r3, #44] ; 0x2c
800fbfa: 4924 ldr r1, [pc, #144] ; (800fc8c <xTaskPriorityInherit+0xf8>)
800fbfc: 4613 mov r3, r2
800fbfe: 009b lsls r3, r3, #2
800fc00: 4413 add r3, r2
800fc02: 009b lsls r3, r3, #2
800fc04: 440b add r3, r1
800fc06: 681b ldr r3, [r3, #0]
800fc08: 2b00 cmp r3, #0
800fc0a: d10a bne.n 800fc22 <xTaskPriorityInherit+0x8e>
800fc0c: 68bb ldr r3, [r7, #8]
800fc0e: 6adb ldr r3, [r3, #44] ; 0x2c
800fc10: 2201 movs r2, #1
800fc12: fa02 f303 lsl.w r3, r2, r3
800fc16: 43da mvns r2, r3
800fc18: 4b1d ldr r3, [pc, #116] ; (800fc90 <xTaskPriorityInherit+0xfc>)
800fc1a: 681b ldr r3, [r3, #0]
800fc1c: 4013 ands r3, r2
800fc1e: 4a1c ldr r2, [pc, #112] ; (800fc90 <xTaskPriorityInherit+0xfc>)
800fc20: 6013 str r3, [r2, #0]
{
mtCOVERAGE_TEST_MARKER();
}
/* Inherit the priority before being moved into the new list. */
pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
800fc22: 4b19 ldr r3, [pc, #100] ; (800fc88 <xTaskPriorityInherit+0xf4>)
800fc24: 681b ldr r3, [r3, #0]
800fc26: 6ada ldr r2, [r3, #44] ; 0x2c
800fc28: 68bb ldr r3, [r7, #8]
800fc2a: 62da str r2, [r3, #44] ; 0x2c
prvAddTaskToReadyList( pxMutexHolderTCB );
800fc2c: 68bb ldr r3, [r7, #8]
800fc2e: 6adb ldr r3, [r3, #44] ; 0x2c
800fc30: 2201 movs r2, #1
800fc32: 409a lsls r2, r3
800fc34: 4b16 ldr r3, [pc, #88] ; (800fc90 <xTaskPriorityInherit+0xfc>)
800fc36: 681b ldr r3, [r3, #0]
800fc38: 4313 orrs r3, r2
800fc3a: 4a15 ldr r2, [pc, #84] ; (800fc90 <xTaskPriorityInherit+0xfc>)
800fc3c: 6013 str r3, [r2, #0]
800fc3e: 68bb ldr r3, [r7, #8]
800fc40: 6ada ldr r2, [r3, #44] ; 0x2c
800fc42: 4613 mov r3, r2
800fc44: 009b lsls r3, r3, #2
800fc46: 4413 add r3, r2
800fc48: 009b lsls r3, r3, #2
800fc4a: 4a10 ldr r2, [pc, #64] ; (800fc8c <xTaskPriorityInherit+0xf8>)
800fc4c: 441a add r2, r3
800fc4e: 68bb ldr r3, [r7, #8]
800fc50: 3304 adds r3, #4
800fc52: 4619 mov r1, r3
800fc54: 4610 mov r0, r2
800fc56: f7fd ffee bl 800dc36 <vListInsertEnd>
800fc5a: e004 b.n 800fc66 <xTaskPriorityInherit+0xd2>
}
else
{
/* Just inherit the priority. */
pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
800fc5c: 4b0a ldr r3, [pc, #40] ; (800fc88 <xTaskPriorityInherit+0xf4>)
800fc5e: 681b ldr r3, [r3, #0]
800fc60: 6ada ldr r2, [r3, #44] ; 0x2c
800fc62: 68bb ldr r3, [r7, #8]
800fc64: 62da str r2, [r3, #44] ; 0x2c
}
traceTASK_PRIORITY_INHERIT( pxMutexHolderTCB, pxCurrentTCB->uxPriority );
/* Inheritance occurred. */
xReturn = pdTRUE;
800fc66: 2301 movs r3, #1
800fc68: 60fb str r3, [r7, #12]
800fc6a: e008 b.n 800fc7e <xTaskPriorityInherit+0xea>
}
else
{
if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority )
800fc6c: 68bb ldr r3, [r7, #8]
800fc6e: 6c5a ldr r2, [r3, #68] ; 0x44
800fc70: 4b05 ldr r3, [pc, #20] ; (800fc88 <xTaskPriorityInherit+0xf4>)
800fc72: 681b ldr r3, [r3, #0]
800fc74: 6adb ldr r3, [r3, #44] ; 0x2c
800fc76: 429a cmp r2, r3
800fc78: d201 bcs.n 800fc7e <xTaskPriorityInherit+0xea>
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;
800fc7a: 2301 movs r3, #1
800fc7c: 60fb str r3, [r7, #12]
else
{
mtCOVERAGE_TEST_MARKER();
}
return xReturn;
800fc7e: 68fb ldr r3, [r7, #12]
}
800fc80: 4618 mov r0, r3
800fc82: 3710 adds r7, #16
800fc84: 46bd mov sp, r7
800fc86: bd80 pop {r7, pc}
800fc88: 2000058c .word 0x2000058c
800fc8c: 20000590 .word 0x20000590
800fc90: 20000694 .word 0x20000694
0800fc94 <xTaskPriorityDisinherit>:
/*-----------------------------------------------------------*/
#if ( configUSE_MUTEXES == 1 )
BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder )
{
800fc94: b580 push {r7, lr}
800fc96: b086 sub sp, #24
800fc98: af00 add r7, sp, #0
800fc9a: 6078 str r0, [r7, #4]
TCB_t * const pxTCB = pxMutexHolder;
800fc9c: 687b ldr r3, [r7, #4]
800fc9e: 613b str r3, [r7, #16]
BaseType_t xReturn = pdFALSE;
800fca0: 2300 movs r3, #0
800fca2: 617b str r3, [r7, #20]
if( pxMutexHolder != NULL )
800fca4: 687b ldr r3, [r7, #4]
800fca6: 2b00 cmp r3, #0
800fca8: d070 beq.n 800fd8c <xTaskPriorityDisinherit+0xf8>
{
/* 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 );
800fcaa: 4b3b ldr r3, [pc, #236] ; (800fd98 <xTaskPriorityDisinherit+0x104>)
800fcac: 681b ldr r3, [r3, #0]
800fcae: 693a ldr r2, [r7, #16]
800fcb0: 429a cmp r2, r3
800fcb2: d00b beq.n 800fccc <xTaskPriorityDisinherit+0x38>
800fcb4: f04f 0350 mov.w r3, #80 ; 0x50
800fcb8: b672 cpsid i
800fcba: f383 8811 msr BASEPRI, r3
800fcbe: f3bf 8f6f isb sy
800fcc2: f3bf 8f4f dsb sy
800fcc6: b662 cpsie i
800fcc8: 60fb str r3, [r7, #12]
800fcca: e7fe b.n 800fcca <xTaskPriorityDisinherit+0x36>
configASSERT( pxTCB->uxMutexesHeld );
800fccc: 693b ldr r3, [r7, #16]
800fcce: 6c9b ldr r3, [r3, #72] ; 0x48
800fcd0: 2b00 cmp r3, #0
800fcd2: d10b bne.n 800fcec <xTaskPriorityDisinherit+0x58>
800fcd4: f04f 0350 mov.w r3, #80 ; 0x50
800fcd8: b672 cpsid i
800fcda: f383 8811 msr BASEPRI, r3
800fcde: f3bf 8f6f isb sy
800fce2: f3bf 8f4f dsb sy
800fce6: b662 cpsie i
800fce8: 60bb str r3, [r7, #8]
800fcea: e7fe b.n 800fcea <xTaskPriorityDisinherit+0x56>
( pxTCB->uxMutexesHeld )--;
800fcec: 693b ldr r3, [r7, #16]
800fcee: 6c9b ldr r3, [r3, #72] ; 0x48
800fcf0: 1e5a subs r2, r3, #1
800fcf2: 693b ldr r3, [r7, #16]
800fcf4: 649a str r2, [r3, #72] ; 0x48
/* Has the holder of the mutex inherited the priority of another
task? */
if( pxTCB->uxPriority != pxTCB->uxBasePriority )
800fcf6: 693b ldr r3, [r7, #16]
800fcf8: 6ada ldr r2, [r3, #44] ; 0x2c
800fcfa: 693b ldr r3, [r7, #16]
800fcfc: 6c5b ldr r3, [r3, #68] ; 0x44
800fcfe: 429a cmp r2, r3
800fd00: d044 beq.n 800fd8c <xTaskPriorityDisinherit+0xf8>
{
/* Only disinherit if no other mutexes are held. */
if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 )
800fd02: 693b ldr r3, [r7, #16]
800fd04: 6c9b ldr r3, [r3, #72] ; 0x48
800fd06: 2b00 cmp r3, #0
800fd08: d140 bne.n 800fd8c <xTaskPriorityDisinherit+0xf8>
/* 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 list. */
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
800fd0a: 693b ldr r3, [r7, #16]
800fd0c: 3304 adds r3, #4
800fd0e: 4618 mov r0, r3
800fd10: f7fd ffee bl 800dcf0 <uxListRemove>
800fd14: 4603 mov r3, r0
800fd16: 2b00 cmp r3, #0
800fd18: d115 bne.n 800fd46 <xTaskPriorityDisinherit+0xb2>
{
taskRESET_READY_PRIORITY( pxTCB->uxPriority );
800fd1a: 693b ldr r3, [r7, #16]
800fd1c: 6ada ldr r2, [r3, #44] ; 0x2c
800fd1e: 491f ldr r1, [pc, #124] ; (800fd9c <xTaskPriorityDisinherit+0x108>)
800fd20: 4613 mov r3, r2
800fd22: 009b lsls r3, r3, #2
800fd24: 4413 add r3, r2
800fd26: 009b lsls r3, r3, #2
800fd28: 440b add r3, r1
800fd2a: 681b ldr r3, [r3, #0]
800fd2c: 2b00 cmp r3, #0
800fd2e: d10a bne.n 800fd46 <xTaskPriorityDisinherit+0xb2>
800fd30: 693b ldr r3, [r7, #16]
800fd32: 6adb ldr r3, [r3, #44] ; 0x2c
800fd34: 2201 movs r2, #1
800fd36: fa02 f303 lsl.w r3, r2, r3
800fd3a: 43da mvns r2, r3
800fd3c: 4b18 ldr r3, [pc, #96] ; (800fda0 <xTaskPriorityDisinherit+0x10c>)
800fd3e: 681b ldr r3, [r3, #0]
800fd40: 4013 ands r3, r2
800fd42: 4a17 ldr r2, [pc, #92] ; (800fda0 <xTaskPriorityDisinherit+0x10c>)
800fd44: 6013 str r3, [r2, #0]
}
/* Disinherit the priority before adding the task into the
new ready list. */
traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority );
pxTCB->uxPriority = pxTCB->uxBasePriority;
800fd46: 693b ldr r3, [r7, #16]
800fd48: 6c5a ldr r2, [r3, #68] ; 0x44
800fd4a: 693b ldr r3, [r7, #16]
800fd4c: 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. */
800fd4e: 693b ldr r3, [r7, #16]
800fd50: 6adb ldr r3, [r3, #44] ; 0x2c
800fd52: f1c3 0207 rsb r2, r3, #7
800fd56: 693b ldr r3, [r7, #16]
800fd58: 619a str r2, [r3, #24]
prvAddTaskToReadyList( pxTCB );
800fd5a: 693b ldr r3, [r7, #16]
800fd5c: 6adb ldr r3, [r3, #44] ; 0x2c
800fd5e: 2201 movs r2, #1
800fd60: 409a lsls r2, r3
800fd62: 4b0f ldr r3, [pc, #60] ; (800fda0 <xTaskPriorityDisinherit+0x10c>)
800fd64: 681b ldr r3, [r3, #0]
800fd66: 4313 orrs r3, r2
800fd68: 4a0d ldr r2, [pc, #52] ; (800fda0 <xTaskPriorityDisinherit+0x10c>)
800fd6a: 6013 str r3, [r2, #0]
800fd6c: 693b ldr r3, [r7, #16]
800fd6e: 6ada ldr r2, [r3, #44] ; 0x2c
800fd70: 4613 mov r3, r2
800fd72: 009b lsls r3, r3, #2
800fd74: 4413 add r3, r2
800fd76: 009b lsls r3, r3, #2
800fd78: 4a08 ldr r2, [pc, #32] ; (800fd9c <xTaskPriorityDisinherit+0x108>)
800fd7a: 441a add r2, r3
800fd7c: 693b ldr r3, [r7, #16]
800fd7e: 3304 adds r3, #4
800fd80: 4619 mov r1, r3
800fd82: 4610 mov r0, r2
800fd84: f7fd ff57 bl 800dc36 <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;
800fd88: 2301 movs r3, #1
800fd8a: 617b str r3, [r7, #20]
else
{
mtCOVERAGE_TEST_MARKER();
}
return xReturn;
800fd8c: 697b ldr r3, [r7, #20]
}
800fd8e: 4618 mov r0, r3
800fd90: 3718 adds r7, #24
800fd92: 46bd mov sp, r7
800fd94: bd80 pop {r7, pc}
800fd96: bf00 nop
800fd98: 2000058c .word 0x2000058c
800fd9c: 20000590 .word 0x20000590
800fda0: 20000694 .word 0x20000694
0800fda4 <vTaskPriorityDisinheritAfterTimeout>:
/*-----------------------------------------------------------*/
#if ( configUSE_MUTEXES == 1 )
void vTaskPriorityDisinheritAfterTimeout( TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask )
{
800fda4: b580 push {r7, lr}
800fda6: b088 sub sp, #32
800fda8: af00 add r7, sp, #0
800fdaa: 6078 str r0, [r7, #4]
800fdac: 6039 str r1, [r7, #0]
TCB_t * const pxTCB = pxMutexHolder;
800fdae: 687b ldr r3, [r7, #4]
800fdb0: 61bb str r3, [r7, #24]
UBaseType_t uxPriorityUsedOnEntry, uxPriorityToUse;
const UBaseType_t uxOnlyOneMutexHeld = ( UBaseType_t ) 1;
800fdb2: 2301 movs r3, #1
800fdb4: 617b str r3, [r7, #20]
if( pxMutexHolder != NULL )
800fdb6: 687b ldr r3, [r7, #4]
800fdb8: 2b00 cmp r3, #0
800fdba: f000 8085 beq.w 800fec8 <vTaskPriorityDisinheritAfterTimeout+0x124>
{
/* If pxMutexHolder is not NULL then the holder must hold at least
one mutex. */
configASSERT( pxTCB->uxMutexesHeld );
800fdbe: 69bb ldr r3, [r7, #24]
800fdc0: 6c9b ldr r3, [r3, #72] ; 0x48
800fdc2: 2b00 cmp r3, #0
800fdc4: d10b bne.n 800fdde <vTaskPriorityDisinheritAfterTimeout+0x3a>
800fdc6: f04f 0350 mov.w r3, #80 ; 0x50
800fdca: b672 cpsid i
800fdcc: f383 8811 msr BASEPRI, r3
800fdd0: f3bf 8f6f isb sy
800fdd4: f3bf 8f4f dsb sy
800fdd8: b662 cpsie i
800fdda: 60fb str r3, [r7, #12]
800fddc: e7fe b.n 800fddc <vTaskPriorityDisinheritAfterTimeout+0x38>
/* 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 )
800fdde: 69bb ldr r3, [r7, #24]
800fde0: 6c5b ldr r3, [r3, #68] ; 0x44
800fde2: 683a ldr r2, [r7, #0]
800fde4: 429a cmp r2, r3
800fde6: d902 bls.n 800fdee <vTaskPriorityDisinheritAfterTimeout+0x4a>
{
uxPriorityToUse = uxHighestPriorityWaitingTask;
800fde8: 683b ldr r3, [r7, #0]
800fdea: 61fb str r3, [r7, #28]
800fdec: e002 b.n 800fdf4 <vTaskPriorityDisinheritAfterTimeout+0x50>
}
else
{
uxPriorityToUse = pxTCB->uxBasePriority;
800fdee: 69bb ldr r3, [r7, #24]
800fdf0: 6c5b ldr r3, [r3, #68] ; 0x44
800fdf2: 61fb str r3, [r7, #28]
}
/* Does the priority need to change? */
if( pxTCB->uxPriority != uxPriorityToUse )
800fdf4: 69bb ldr r3, [r7, #24]
800fdf6: 6adb ldr r3, [r3, #44] ; 0x2c
800fdf8: 69fa ldr r2, [r7, #28]
800fdfa: 429a cmp r2, r3
800fdfc: d064 beq.n 800fec8 <vTaskPriorityDisinheritAfterTimeout+0x124>
{
/* 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 )
800fdfe: 69bb ldr r3, [r7, #24]
800fe00: 6c9b ldr r3, [r3, #72] ; 0x48
800fe02: 697a ldr r2, [r7, #20]
800fe04: 429a cmp r2, r3
800fe06: d15f bne.n 800fec8 <vTaskPriorityDisinheritAfterTimeout+0x124>
{
/* 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 );
800fe08: 4b31 ldr r3, [pc, #196] ; (800fed0 <vTaskPriorityDisinheritAfterTimeout+0x12c>)
800fe0a: 681b ldr r3, [r3, #0]
800fe0c: 69ba ldr r2, [r7, #24]
800fe0e: 429a cmp r2, r3
800fe10: d10b bne.n 800fe2a <vTaskPriorityDisinheritAfterTimeout+0x86>
800fe12: f04f 0350 mov.w r3, #80 ; 0x50
800fe16: b672 cpsid i
800fe18: f383 8811 msr BASEPRI, r3
800fe1c: f3bf 8f6f isb sy
800fe20: f3bf 8f4f dsb sy
800fe24: b662 cpsie i
800fe26: 60bb str r3, [r7, #8]
800fe28: e7fe b.n 800fe28 <vTaskPriorityDisinheritAfterTimeout+0x84>
/* Disinherit the priority, remembering the previous
priority to facilitate determining the subject task's
state. */
traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority );
uxPriorityUsedOnEntry = pxTCB->uxPriority;
800fe2a: 69bb ldr r3, [r7, #24]
800fe2c: 6adb ldr r3, [r3, #44] ; 0x2c
800fe2e: 613b str r3, [r7, #16]
pxTCB->uxPriority = uxPriorityToUse;
800fe30: 69bb ldr r3, [r7, #24]
800fe32: 69fa ldr r2, [r7, #28]
800fe34: 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 )
800fe36: 69bb ldr r3, [r7, #24]
800fe38: 699b ldr r3, [r3, #24]
800fe3a: 2b00 cmp r3, #0
800fe3c: db04 blt.n 800fe48 <vTaskPriorityDisinheritAfterTimeout+0xa4>
{
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. */
800fe3e: 69fb ldr r3, [r7, #28]
800fe40: f1c3 0207 rsb r2, r3, #7
800fe44: 69bb ldr r3, [r7, #24]
800fe46: 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 )
800fe48: 69bb ldr r3, [r7, #24]
800fe4a: 6959 ldr r1, [r3, #20]
800fe4c: 693a ldr r2, [r7, #16]
800fe4e: 4613 mov r3, r2
800fe50: 009b lsls r3, r3, #2
800fe52: 4413 add r3, r2
800fe54: 009b lsls r3, r3, #2
800fe56: 4a1f ldr r2, [pc, #124] ; (800fed4 <vTaskPriorityDisinheritAfterTimeout+0x130>)
800fe58: 4413 add r3, r2
800fe5a: 4299 cmp r1, r3
800fe5c: d134 bne.n 800fec8 <vTaskPriorityDisinheritAfterTimeout+0x124>
{
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
800fe5e: 69bb ldr r3, [r7, #24]
800fe60: 3304 adds r3, #4
800fe62: 4618 mov r0, r3
800fe64: f7fd ff44 bl 800dcf0 <uxListRemove>
800fe68: 4603 mov r3, r0
800fe6a: 2b00 cmp r3, #0
800fe6c: d115 bne.n 800fe9a <vTaskPriorityDisinheritAfterTimeout+0xf6>
{
taskRESET_READY_PRIORITY( pxTCB->uxPriority );
800fe6e: 69bb ldr r3, [r7, #24]
800fe70: 6ada ldr r2, [r3, #44] ; 0x2c
800fe72: 4918 ldr r1, [pc, #96] ; (800fed4 <vTaskPriorityDisinheritAfterTimeout+0x130>)
800fe74: 4613 mov r3, r2
800fe76: 009b lsls r3, r3, #2
800fe78: 4413 add r3, r2
800fe7a: 009b lsls r3, r3, #2
800fe7c: 440b add r3, r1
800fe7e: 681b ldr r3, [r3, #0]
800fe80: 2b00 cmp r3, #0
800fe82: d10a bne.n 800fe9a <vTaskPriorityDisinheritAfterTimeout+0xf6>
800fe84: 69bb ldr r3, [r7, #24]
800fe86: 6adb ldr r3, [r3, #44] ; 0x2c
800fe88: 2201 movs r2, #1
800fe8a: fa02 f303 lsl.w r3, r2, r3
800fe8e: 43da mvns r2, r3
800fe90: 4b11 ldr r3, [pc, #68] ; (800fed8 <vTaskPriorityDisinheritAfterTimeout+0x134>)
800fe92: 681b ldr r3, [r3, #0]
800fe94: 4013 ands r3, r2
800fe96: 4a10 ldr r2, [pc, #64] ; (800fed8 <vTaskPriorityDisinheritAfterTimeout+0x134>)
800fe98: 6013 str r3, [r2, #0]
else
{
mtCOVERAGE_TEST_MARKER();
}
prvAddTaskToReadyList( pxTCB );
800fe9a: 69bb ldr r3, [r7, #24]
800fe9c: 6adb ldr r3, [r3, #44] ; 0x2c
800fe9e: 2201 movs r2, #1
800fea0: 409a lsls r2, r3
800fea2: 4b0d ldr r3, [pc, #52] ; (800fed8 <vTaskPriorityDisinheritAfterTimeout+0x134>)
800fea4: 681b ldr r3, [r3, #0]
800fea6: 4313 orrs r3, r2
800fea8: 4a0b ldr r2, [pc, #44] ; (800fed8 <vTaskPriorityDisinheritAfterTimeout+0x134>)
800feaa: 6013 str r3, [r2, #0]
800feac: 69bb ldr r3, [r7, #24]
800feae: 6ada ldr r2, [r3, #44] ; 0x2c
800feb0: 4613 mov r3, r2
800feb2: 009b lsls r3, r3, #2
800feb4: 4413 add r3, r2
800feb6: 009b lsls r3, r3, #2
800feb8: 4a06 ldr r2, [pc, #24] ; (800fed4 <vTaskPriorityDisinheritAfterTimeout+0x130>)
800feba: 441a add r2, r3
800febc: 69bb ldr r3, [r7, #24]
800febe: 3304 adds r3, #4
800fec0: 4619 mov r1, r3
800fec2: 4610 mov r0, r2
800fec4: f7fd feb7 bl 800dc36 <vListInsertEnd>
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800fec8: bf00 nop
800feca: 3720 adds r7, #32
800fecc: 46bd mov sp, r7
800fece: bd80 pop {r7, pc}
800fed0: 2000058c .word 0x2000058c
800fed4: 20000590 .word 0x20000590
800fed8: 20000694 .word 0x20000694
0800fedc <pvTaskIncrementMutexHeldCount>:
/*-----------------------------------------------------------*/
#if ( configUSE_MUTEXES == 1 )
TaskHandle_t pvTaskIncrementMutexHeldCount( void )
{
800fedc: b480 push {r7}
800fede: af00 add r7, sp, #0
/* If xSemaphoreCreateMutex() is called before any tasks have been created
then pxCurrentTCB will be NULL. */
if( pxCurrentTCB != NULL )
800fee0: 4b07 ldr r3, [pc, #28] ; (800ff00 <pvTaskIncrementMutexHeldCount+0x24>)
800fee2: 681b ldr r3, [r3, #0]
800fee4: 2b00 cmp r3, #0
800fee6: d004 beq.n 800fef2 <pvTaskIncrementMutexHeldCount+0x16>
{
( pxCurrentTCB->uxMutexesHeld )++;
800fee8: 4b05 ldr r3, [pc, #20] ; (800ff00 <pvTaskIncrementMutexHeldCount+0x24>)
800feea: 681b ldr r3, [r3, #0]
800feec: 6c9a ldr r2, [r3, #72] ; 0x48
800feee: 3201 adds r2, #1
800fef0: 649a str r2, [r3, #72] ; 0x48
}
return pxCurrentTCB;
800fef2: 4b03 ldr r3, [pc, #12] ; (800ff00 <pvTaskIncrementMutexHeldCount+0x24>)
800fef4: 681b ldr r3, [r3, #0]
}
800fef6: 4618 mov r0, r3
800fef8: 46bd mov sp, r7
800fefa: f85d 7b04 ldr.w r7, [sp], #4
800fefe: 4770 bx lr
800ff00: 2000058c .word 0x2000058c
0800ff04 <prvAddCurrentTaskToDelayedList>:
}
#endif
/*-----------------------------------------------------------*/
static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely )
{
800ff04: b580 push {r7, lr}
800ff06: b084 sub sp, #16
800ff08: af00 add r7, sp, #0
800ff0a: 6078 str r0, [r7, #4]
800ff0c: 6039 str r1, [r7, #0]
TickType_t xTimeToWake;
const TickType_t xConstTickCount = xTickCount;
800ff0e: 4b29 ldr r3, [pc, #164] ; (800ffb4 <prvAddCurrentTaskToDelayedList+0xb0>)
800ff10: 681b ldr r3, [r3, #0]
800ff12: 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 )
800ff14: 4b28 ldr r3, [pc, #160] ; (800ffb8 <prvAddCurrentTaskToDelayedList+0xb4>)
800ff16: 681b ldr r3, [r3, #0]
800ff18: 3304 adds r3, #4
800ff1a: 4618 mov r0, r3
800ff1c: f7fd fee8 bl 800dcf0 <uxListRemove>
800ff20: 4603 mov r3, r0
800ff22: 2b00 cmp r3, #0
800ff24: d10b bne.n 800ff3e <prvAddCurrentTaskToDelayedList+0x3a>
{
/* The current task must be in a ready list, so there is no need to
check, and the port reset macro can be called directly. */
portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority ); /*lint !e931 pxCurrentTCB cannot change as it is the calling task. pxCurrentTCB->uxPriority and uxTopReadyPriority cannot change as called with scheduler suspended or in a critical section. */
800ff26: 4b24 ldr r3, [pc, #144] ; (800ffb8 <prvAddCurrentTaskToDelayedList+0xb4>)
800ff28: 681b ldr r3, [r3, #0]
800ff2a: 6adb ldr r3, [r3, #44] ; 0x2c
800ff2c: 2201 movs r2, #1
800ff2e: fa02 f303 lsl.w r3, r2, r3
800ff32: 43da mvns r2, r3
800ff34: 4b21 ldr r3, [pc, #132] ; (800ffbc <prvAddCurrentTaskToDelayedList+0xb8>)
800ff36: 681b ldr r3, [r3, #0]
800ff38: 4013 ands r3, r2
800ff3a: 4a20 ldr r2, [pc, #128] ; (800ffbc <prvAddCurrentTaskToDelayedList+0xb8>)
800ff3c: 6013 str r3, [r2, #0]
mtCOVERAGE_TEST_MARKER();
}
#if ( INCLUDE_vTaskSuspend == 1 )
{
if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) )
800ff3e: 687b ldr r3, [r7, #4]
800ff40: f1b3 3fff cmp.w r3, #4294967295
800ff44: d10a bne.n 800ff5c <prvAddCurrentTaskToDelayedList+0x58>
800ff46: 683b ldr r3, [r7, #0]
800ff48: 2b00 cmp r3, #0
800ff4a: d007 beq.n 800ff5c <prvAddCurrentTaskToDelayedList+0x58>
{
/* 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 ) );
800ff4c: 4b1a ldr r3, [pc, #104] ; (800ffb8 <prvAddCurrentTaskToDelayedList+0xb4>)
800ff4e: 681b ldr r3, [r3, #0]
800ff50: 3304 adds r3, #4
800ff52: 4619 mov r1, r3
800ff54: 481a ldr r0, [pc, #104] ; (800ffc0 <prvAddCurrentTaskToDelayedList+0xbc>)
800ff56: f7fd fe6e bl 800dc36 <vListInsertEnd>
/* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */
( void ) xCanBlockIndefinitely;
}
#endif /* INCLUDE_vTaskSuspend */
}
800ff5a: e026 b.n 800ffaa <prvAddCurrentTaskToDelayedList+0xa6>
xTimeToWake = xConstTickCount + xTicksToWait;
800ff5c: 68fa ldr r2, [r7, #12]
800ff5e: 687b ldr r3, [r7, #4]
800ff60: 4413 add r3, r2
800ff62: 60bb str r3, [r7, #8]
listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake );
800ff64: 4b14 ldr r3, [pc, #80] ; (800ffb8 <prvAddCurrentTaskToDelayedList+0xb4>)
800ff66: 681b ldr r3, [r3, #0]
800ff68: 68ba ldr r2, [r7, #8]
800ff6a: 605a str r2, [r3, #4]
if( xTimeToWake < xConstTickCount )
800ff6c: 68ba ldr r2, [r7, #8]
800ff6e: 68fb ldr r3, [r7, #12]
800ff70: 429a cmp r2, r3
800ff72: d209 bcs.n 800ff88 <prvAddCurrentTaskToDelayedList+0x84>
vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
800ff74: 4b13 ldr r3, [pc, #76] ; (800ffc4 <prvAddCurrentTaskToDelayedList+0xc0>)
800ff76: 681a ldr r2, [r3, #0]
800ff78: 4b0f ldr r3, [pc, #60] ; (800ffb8 <prvAddCurrentTaskToDelayedList+0xb4>)
800ff7a: 681b ldr r3, [r3, #0]
800ff7c: 3304 adds r3, #4
800ff7e: 4619 mov r1, r3
800ff80: 4610 mov r0, r2
800ff82: f7fd fe7c bl 800dc7e <vListInsert>
}
800ff86: e010 b.n 800ffaa <prvAddCurrentTaskToDelayedList+0xa6>
vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
800ff88: 4b0f ldr r3, [pc, #60] ; (800ffc8 <prvAddCurrentTaskToDelayedList+0xc4>)
800ff8a: 681a ldr r2, [r3, #0]
800ff8c: 4b0a ldr r3, [pc, #40] ; (800ffb8 <prvAddCurrentTaskToDelayedList+0xb4>)
800ff8e: 681b ldr r3, [r3, #0]
800ff90: 3304 adds r3, #4
800ff92: 4619 mov r1, r3
800ff94: 4610 mov r0, r2
800ff96: f7fd fe72 bl 800dc7e <vListInsert>
if( xTimeToWake < xNextTaskUnblockTime )
800ff9a: 4b0c ldr r3, [pc, #48] ; (800ffcc <prvAddCurrentTaskToDelayedList+0xc8>)
800ff9c: 681b ldr r3, [r3, #0]
800ff9e: 68ba ldr r2, [r7, #8]
800ffa0: 429a cmp r2, r3
800ffa2: d202 bcs.n 800ffaa <prvAddCurrentTaskToDelayedList+0xa6>
xNextTaskUnblockTime = xTimeToWake;
800ffa4: 4a09 ldr r2, [pc, #36] ; (800ffcc <prvAddCurrentTaskToDelayedList+0xc8>)
800ffa6: 68bb ldr r3, [r7, #8]
800ffa8: 6013 str r3, [r2, #0]
}
800ffaa: bf00 nop
800ffac: 3710 adds r7, #16
800ffae: 46bd mov sp, r7
800ffb0: bd80 pop {r7, pc}
800ffb2: bf00 nop
800ffb4: 20000690 .word 0x20000690
800ffb8: 2000058c .word 0x2000058c
800ffbc: 20000694 .word 0x20000694
800ffc0: 20000678 .word 0x20000678
800ffc4: 20000648 .word 0x20000648
800ffc8: 20000644 .word 0x20000644
800ffcc: 200006ac .word 0x200006ac
0800ffd0 <pxPortInitialiseStack>:
/*
* See header file for description.
*/
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{
800ffd0: b480 push {r7}
800ffd2: b085 sub sp, #20
800ffd4: af00 add r7, sp, #0
800ffd6: 60f8 str r0, [r7, #12]
800ffd8: 60b9 str r1, [r7, #8]
800ffda: 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--;
800ffdc: 68fb ldr r3, [r7, #12]
800ffde: 3b04 subs r3, #4
800ffe0: 60fb str r3, [r7, #12]
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */
800ffe2: 68fb ldr r3, [r7, #12]
800ffe4: f04f 7280 mov.w r2, #16777216 ; 0x1000000
800ffe8: 601a str r2, [r3, #0]
pxTopOfStack--;
800ffea: 68fb ldr r3, [r7, #12]
800ffec: 3b04 subs r3, #4
800ffee: 60fb str r3, [r7, #12]
*pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */
800fff0: 68bb ldr r3, [r7, #8]
800fff2: f023 0201 bic.w r2, r3, #1
800fff6: 68fb ldr r3, [r7, #12]
800fff8: 601a str r2, [r3, #0]
pxTopOfStack--;
800fffa: 68fb ldr r3, [r7, #12]
800fffc: 3b04 subs r3, #4
800fffe: 60fb str r3, [r7, #12]
*pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */
8010000: 4a0c ldr r2, [pc, #48] ; (8010034 <pxPortInitialiseStack+0x64>)
8010002: 68fb ldr r3, [r7, #12]
8010004: 601a str r2, [r3, #0]
/* Save code space by skipping register initialisation. */
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */
8010006: 68fb ldr r3, [r7, #12]
8010008: 3b14 subs r3, #20
801000a: 60fb str r3, [r7, #12]
*pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */
801000c: 687a ldr r2, [r7, #4]
801000e: 68fb ldr r3, [r7, #12]
8010010: 601a str r2, [r3, #0]
/* A save method is being used that requires each task to maintain its
own exec return value. */
pxTopOfStack--;
8010012: 68fb ldr r3, [r7, #12]
8010014: 3b04 subs r3, #4
8010016: 60fb str r3, [r7, #12]
*pxTopOfStack = portINITIAL_EXC_RETURN;
8010018: 68fb ldr r3, [r7, #12]
801001a: f06f 0202 mvn.w r2, #2
801001e: 601a str r2, [r3, #0]
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
8010020: 68fb ldr r3, [r7, #12]
8010022: 3b20 subs r3, #32
8010024: 60fb str r3, [r7, #12]
return pxTopOfStack;
8010026: 68fb ldr r3, [r7, #12]
}
8010028: 4618 mov r0, r3
801002a: 3714 adds r7, #20
801002c: 46bd mov sp, r7
801002e: f85d 7b04 ldr.w r7, [sp], #4
8010032: 4770 bx lr
8010034: 08010039 .word 0x08010039
08010038 <prvTaskExitError>:
/*-----------------------------------------------------------*/
static void prvTaskExitError( void )
{
8010038: b480 push {r7}
801003a: b085 sub sp, #20
801003c: af00 add r7, sp, #0
volatile uint32_t ulDummy = 0;
801003e: 2300 movs r3, #0
8010040: 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 );
8010042: 4b13 ldr r3, [pc, #76] ; (8010090 <prvTaskExitError+0x58>)
8010044: 681b ldr r3, [r3, #0]
8010046: f1b3 3fff cmp.w r3, #4294967295
801004a: d00b beq.n 8010064 <prvTaskExitError+0x2c>
801004c: f04f 0350 mov.w r3, #80 ; 0x50
8010050: b672 cpsid i
8010052: f383 8811 msr BASEPRI, r3
8010056: f3bf 8f6f isb sy
801005a: f3bf 8f4f dsb sy
801005e: b662 cpsie i
8010060: 60fb str r3, [r7, #12]
8010062: e7fe b.n 8010062 <prvTaskExitError+0x2a>
8010064: f04f 0350 mov.w r3, #80 ; 0x50
8010068: b672 cpsid i
801006a: f383 8811 msr BASEPRI, r3
801006e: f3bf 8f6f isb sy
8010072: f3bf 8f4f dsb sy
8010076: b662 cpsie i
8010078: 60bb str r3, [r7, #8]
portDISABLE_INTERRUPTS();
while( ulDummy == 0 )
801007a: bf00 nop
801007c: 687b ldr r3, [r7, #4]
801007e: 2b00 cmp r3, #0
8010080: d0fc beq.n 801007c <prvTaskExitError+0x44>
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. */
}
}
8010082: bf00 nop
8010084: 3714 adds r7, #20
8010086: 46bd mov sp, r7
8010088: f85d 7b04 ldr.w r7, [sp], #4
801008c: 4770 bx lr
801008e: bf00 nop
8010090: 20000070 .word 0x20000070
...
080100a0 <SVC_Handler>:
/*-----------------------------------------------------------*/
void vPortSVCHandler( void )
{
__asm volatile (
80100a0: 4b07 ldr r3, [pc, #28] ; (80100c0 <pxCurrentTCBConst2>)
80100a2: 6819 ldr r1, [r3, #0]
80100a4: 6808 ldr r0, [r1, #0]
80100a6: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
80100aa: f380 8809 msr PSP, r0
80100ae: f3bf 8f6f isb sy
80100b2: f04f 0000 mov.w r0, #0
80100b6: f380 8811 msr BASEPRI, r0
80100ba: 4770 bx lr
80100bc: f3af 8000 nop.w
080100c0 <pxCurrentTCBConst2>:
80100c0: 2000058c .word 0x2000058c
" bx r14 \n"
" \n"
" .align 4 \n"
"pxCurrentTCBConst2: .word pxCurrentTCB \n"
);
}
80100c4: bf00 nop
80100c6: bf00 nop
080100c8 <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(
80100c8: 4808 ldr r0, [pc, #32] ; (80100ec <prvPortStartFirstTask+0x24>)
80100ca: 6800 ldr r0, [r0, #0]
80100cc: 6800 ldr r0, [r0, #0]
80100ce: f380 8808 msr MSP, r0
80100d2: f04f 0000 mov.w r0, #0
80100d6: f380 8814 msr CONTROL, r0
80100da: b662 cpsie i
80100dc: b661 cpsie f
80100de: f3bf 8f4f dsb sy
80100e2: f3bf 8f6f isb sy
80100e6: df00 svc 0
80100e8: bf00 nop
" dsb \n"
" isb \n"
" svc 0 \n" /* System call to start first task. */
" nop \n"
);
}
80100ea: bf00 nop
80100ec: e000ed08 .word 0xe000ed08
080100f0 <xPortStartScheduler>:
/*
* See header file for description.
*/
BaseType_t xPortStartScheduler( void )
{
80100f0: b580 push {r7, lr}
80100f2: b084 sub sp, #16
80100f4: af00 add r7, sp, #0
configASSERT( configMAX_SYSCALL_INTERRUPT_PRIORITY );
#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 );
80100f6: 4b36 ldr r3, [pc, #216] ; (80101d0 <xPortStartScheduler+0xe0>)
80100f8: 60fb str r3, [r7, #12]
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;
80100fa: 68fb ldr r3, [r7, #12]
80100fc: 781b ldrb r3, [r3, #0]
80100fe: b2db uxtb r3, r3
8010100: 607b str r3, [r7, #4]
/* Determine the number of priority bits available. First write to all
possible bits. */
*pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE;
8010102: 68fb ldr r3, [r7, #12]
8010104: 22ff movs r2, #255 ; 0xff
8010106: 701a strb r2, [r3, #0]
/* Read the value back to see how many bits stuck. */
ucMaxPriorityValue = *pucFirstUserPriorityRegister;
8010108: 68fb ldr r3, [r7, #12]
801010a: 781b ldrb r3, [r3, #0]
801010c: b2db uxtb r3, r3
801010e: 70fb strb r3, [r7, #3]
/* Use the same mask on the maximum system call priority. */
ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue;
8010110: 78fb ldrb r3, [r7, #3]
8010112: b2db uxtb r3, r3
8010114: f003 0350 and.w r3, r3, #80 ; 0x50
8010118: b2da uxtb r2, r3
801011a: 4b2e ldr r3, [pc, #184] ; (80101d4 <xPortStartScheduler+0xe4>)
801011c: 701a strb r2, [r3, #0]
/* Calculate the maximum acceptable priority group value for the number
of bits read back. */
ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS;
801011e: 4b2e ldr r3, [pc, #184] ; (80101d8 <xPortStartScheduler+0xe8>)
8010120: 2207 movs r2, #7
8010122: 601a str r2, [r3, #0]
while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
8010124: e009 b.n 801013a <xPortStartScheduler+0x4a>
{
ulMaxPRIGROUPValue--;
8010126: 4b2c ldr r3, [pc, #176] ; (80101d8 <xPortStartScheduler+0xe8>)
8010128: 681b ldr r3, [r3, #0]
801012a: 3b01 subs r3, #1
801012c: 4a2a ldr r2, [pc, #168] ; (80101d8 <xPortStartScheduler+0xe8>)
801012e: 6013 str r3, [r2, #0]
ucMaxPriorityValue <<= ( uint8_t ) 0x01;
8010130: 78fb ldrb r3, [r7, #3]
8010132: b2db uxtb r3, r3
8010134: 005b lsls r3, r3, #1
8010136: b2db uxtb r3, r3
8010138: 70fb strb r3, [r7, #3]
while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
801013a: 78fb ldrb r3, [r7, #3]
801013c: b2db uxtb r3, r3
801013e: f003 0380 and.w r3, r3, #128 ; 0x80
8010142: 2b80 cmp r3, #128 ; 0x80
8010144: d0ef beq.n 8010126 <xPortStartScheduler+0x36>
#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 );
8010146: 4b24 ldr r3, [pc, #144] ; (80101d8 <xPortStartScheduler+0xe8>)
8010148: 681b ldr r3, [r3, #0]
801014a: f1c3 0307 rsb r3, r3, #7
801014e: 2b04 cmp r3, #4
8010150: d00b beq.n 801016a <xPortStartScheduler+0x7a>
8010152: f04f 0350 mov.w r3, #80 ; 0x50
8010156: b672 cpsid i
8010158: f383 8811 msr BASEPRI, r3
801015c: f3bf 8f6f isb sy
8010160: f3bf 8f4f dsb sy
8010164: b662 cpsie i
8010166: 60bb str r3, [r7, #8]
8010168: e7fe b.n 8010168 <xPortStartScheduler+0x78>
}
#endif
/* Shift the priority group value back to its position within the AIRCR
register. */
ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT;
801016a: 4b1b ldr r3, [pc, #108] ; (80101d8 <xPortStartScheduler+0xe8>)
801016c: 681b ldr r3, [r3, #0]
801016e: 021b lsls r3, r3, #8
8010170: 4a19 ldr r2, [pc, #100] ; (80101d8 <xPortStartScheduler+0xe8>)
8010172: 6013 str r3, [r2, #0]
ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK;
8010174: 4b18 ldr r3, [pc, #96] ; (80101d8 <xPortStartScheduler+0xe8>)
8010176: 681b ldr r3, [r3, #0]
8010178: f403 63e0 and.w r3, r3, #1792 ; 0x700
801017c: 4a16 ldr r2, [pc, #88] ; (80101d8 <xPortStartScheduler+0xe8>)
801017e: 6013 str r3, [r2, #0]
/* Restore the clobbered interrupt priority register to its original
value. */
*pucFirstUserPriorityRegister = ulOriginalPriority;
8010180: 687b ldr r3, [r7, #4]
8010182: b2da uxtb r2, r3
8010184: 68fb ldr r3, [r7, #12]
8010186: 701a strb r2, [r3, #0]
}
#endif /* conifgASSERT_DEFINED */
/* Make PendSV and SysTick the lowest priority interrupts. */
portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI;
8010188: 4b14 ldr r3, [pc, #80] ; (80101dc <xPortStartScheduler+0xec>)
801018a: 681b ldr r3, [r3, #0]
801018c: 4a13 ldr r2, [pc, #76] ; (80101dc <xPortStartScheduler+0xec>)
801018e: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
8010192: 6013 str r3, [r2, #0]
portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI;
8010194: 4b11 ldr r3, [pc, #68] ; (80101dc <xPortStartScheduler+0xec>)
8010196: 681b ldr r3, [r3, #0]
8010198: 4a10 ldr r2, [pc, #64] ; (80101dc <xPortStartScheduler+0xec>)
801019a: f043 4370 orr.w r3, r3, #4026531840 ; 0xf0000000
801019e: 6013 str r3, [r2, #0]
/* Start the timer that generates the tick ISR. Interrupts are disabled
here already. */
vPortSetupTimerInterrupt();
80101a0: f000 f8d4 bl 801034c <vPortSetupTimerInterrupt>
/* Initialise the critical nesting count ready for the first task. */
uxCriticalNesting = 0;
80101a4: 4b0e ldr r3, [pc, #56] ; (80101e0 <xPortStartScheduler+0xf0>)
80101a6: 2200 movs r2, #0
80101a8: 601a str r2, [r3, #0]
/* Ensure the VFP is enabled - it should be anyway. */
vPortEnableVFP();
80101aa: f000 f8f3 bl 8010394 <vPortEnableVFP>
/* Lazy save always. */
*( portFPCCR ) |= portASPEN_AND_LSPEN_BITS;
80101ae: 4b0d ldr r3, [pc, #52] ; (80101e4 <xPortStartScheduler+0xf4>)
80101b0: 681b ldr r3, [r3, #0]
80101b2: 4a0c ldr r2, [pc, #48] ; (80101e4 <xPortStartScheduler+0xf4>)
80101b4: f043 4340 orr.w r3, r3, #3221225472 ; 0xc0000000
80101b8: 6013 str r3, [r2, #0]
/* Start the first task. */
prvPortStartFirstTask();
80101ba: f7ff ff85 bl 80100c8 <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();
80101be: f7ff fa63 bl 800f688 <vTaskSwitchContext>
prvTaskExitError();
80101c2: f7ff ff39 bl 8010038 <prvTaskExitError>
/* Should not get here! */
return 0;
80101c6: 2300 movs r3, #0
}
80101c8: 4618 mov r0, r3
80101ca: 3710 adds r7, #16
80101cc: 46bd mov sp, r7
80101ce: bd80 pop {r7, pc}
80101d0: e000e400 .word 0xe000e400
80101d4: 200006b8 .word 0x200006b8
80101d8: 200006bc .word 0x200006bc
80101dc: e000ed20 .word 0xe000ed20
80101e0: 20000070 .word 0x20000070
80101e4: e000ef34 .word 0xe000ef34
080101e8 <vPortEnterCritical>:
configASSERT( uxCriticalNesting == 1000UL );
}
/*-----------------------------------------------------------*/
void vPortEnterCritical( void )
{
80101e8: b480 push {r7}
80101ea: b083 sub sp, #12
80101ec: af00 add r7, sp, #0
80101ee: f04f 0350 mov.w r3, #80 ; 0x50
80101f2: b672 cpsid i
80101f4: f383 8811 msr BASEPRI, r3
80101f8: f3bf 8f6f isb sy
80101fc: f3bf 8f4f dsb sy
8010200: b662 cpsie i
8010202: 607b str r3, [r7, #4]
portDISABLE_INTERRUPTS();
uxCriticalNesting++;
8010204: 4b0f ldr r3, [pc, #60] ; (8010244 <vPortEnterCritical+0x5c>)
8010206: 681b ldr r3, [r3, #0]
8010208: 3301 adds r3, #1
801020a: 4a0e ldr r2, [pc, #56] ; (8010244 <vPortEnterCritical+0x5c>)
801020c: 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 )
801020e: 4b0d ldr r3, [pc, #52] ; (8010244 <vPortEnterCritical+0x5c>)
8010210: 681b ldr r3, [r3, #0]
8010212: 2b01 cmp r3, #1
8010214: d110 bne.n 8010238 <vPortEnterCritical+0x50>
{
configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 );
8010216: 4b0c ldr r3, [pc, #48] ; (8010248 <vPortEnterCritical+0x60>)
8010218: 681b ldr r3, [r3, #0]
801021a: b2db uxtb r3, r3
801021c: 2b00 cmp r3, #0
801021e: d00b beq.n 8010238 <vPortEnterCritical+0x50>
8010220: f04f 0350 mov.w r3, #80 ; 0x50
8010224: b672 cpsid i
8010226: f383 8811 msr BASEPRI, r3
801022a: f3bf 8f6f isb sy
801022e: f3bf 8f4f dsb sy
8010232: b662 cpsie i
8010234: 603b str r3, [r7, #0]
8010236: e7fe b.n 8010236 <vPortEnterCritical+0x4e>
}
}
8010238: bf00 nop
801023a: 370c adds r7, #12
801023c: 46bd mov sp, r7
801023e: f85d 7b04 ldr.w r7, [sp], #4
8010242: 4770 bx lr
8010244: 20000070 .word 0x20000070
8010248: e000ed04 .word 0xe000ed04
0801024c <vPortExitCritical>:
/*-----------------------------------------------------------*/
void vPortExitCritical( void )
{
801024c: b480 push {r7}
801024e: b083 sub sp, #12
8010250: af00 add r7, sp, #0
configASSERT( uxCriticalNesting );
8010252: 4b12 ldr r3, [pc, #72] ; (801029c <vPortExitCritical+0x50>)
8010254: 681b ldr r3, [r3, #0]
8010256: 2b00 cmp r3, #0
8010258: d10b bne.n 8010272 <vPortExitCritical+0x26>
801025a: f04f 0350 mov.w r3, #80 ; 0x50
801025e: b672 cpsid i
8010260: f383 8811 msr BASEPRI, r3
8010264: f3bf 8f6f isb sy
8010268: f3bf 8f4f dsb sy
801026c: b662 cpsie i
801026e: 607b str r3, [r7, #4]
8010270: e7fe b.n 8010270 <vPortExitCritical+0x24>
uxCriticalNesting--;
8010272: 4b0a ldr r3, [pc, #40] ; (801029c <vPortExitCritical+0x50>)
8010274: 681b ldr r3, [r3, #0]
8010276: 3b01 subs r3, #1
8010278: 4a08 ldr r2, [pc, #32] ; (801029c <vPortExitCritical+0x50>)
801027a: 6013 str r3, [r2, #0]
if( uxCriticalNesting == 0 )
801027c: 4b07 ldr r3, [pc, #28] ; (801029c <vPortExitCritical+0x50>)
801027e: 681b ldr r3, [r3, #0]
8010280: 2b00 cmp r3, #0
8010282: d104 bne.n 801028e <vPortExitCritical+0x42>
8010284: 2300 movs r3, #0
8010286: 603b str r3, [r7, #0]
__asm volatile
8010288: 683b ldr r3, [r7, #0]
801028a: f383 8811 msr BASEPRI, r3
{
portENABLE_INTERRUPTS();
}
}
801028e: bf00 nop
8010290: 370c adds r7, #12
8010292: 46bd mov sp, r7
8010294: f85d 7b04 ldr.w r7, [sp], #4
8010298: 4770 bx lr
801029a: bf00 nop
801029c: 20000070 .word 0x20000070
080102a0 <PendSV_Handler>:
void xPortPendSVHandler( void )
{
/* This is a naked function. */
__asm volatile
80102a0: f3ef 8009 mrs r0, PSP
80102a4: f3bf 8f6f isb sy
80102a8: 4b15 ldr r3, [pc, #84] ; (8010300 <pxCurrentTCBConst>)
80102aa: 681a ldr r2, [r3, #0]
80102ac: f01e 0f10 tst.w lr, #16
80102b0: bf08 it eq
80102b2: ed20 8a10 vstmdbeq r0!, {s16-s31}
80102b6: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
80102ba: 6010 str r0, [r2, #0]
80102bc: e92d 0009 stmdb sp!, {r0, r3}
80102c0: f04f 0050 mov.w r0, #80 ; 0x50
80102c4: b672 cpsid i
80102c6: f380 8811 msr BASEPRI, r0
80102ca: f3bf 8f4f dsb sy
80102ce: f3bf 8f6f isb sy
80102d2: b662 cpsie i
80102d4: f7ff f9d8 bl 800f688 <vTaskSwitchContext>
80102d8: f04f 0000 mov.w r0, #0
80102dc: f380 8811 msr BASEPRI, r0
80102e0: bc09 pop {r0, r3}
80102e2: 6819 ldr r1, [r3, #0]
80102e4: 6808 ldr r0, [r1, #0]
80102e6: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
80102ea: f01e 0f10 tst.w lr, #16
80102ee: bf08 it eq
80102f0: ecb0 8a10 vldmiaeq r0!, {s16-s31}
80102f4: f380 8809 msr PSP, r0
80102f8: f3bf 8f6f isb sy
80102fc: 4770 bx lr
80102fe: bf00 nop
08010300 <pxCurrentTCBConst>:
8010300: 2000058c .word 0x2000058c
" \n"
" .align 4 \n"
"pxCurrentTCBConst: .word pxCurrentTCB \n"
::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY)
);
}
8010304: bf00 nop
8010306: bf00 nop
08010308 <SysTick_Handler>:
/*-----------------------------------------------------------*/
void xPortSysTickHandler( void )
{
8010308: b580 push {r7, lr}
801030a: b082 sub sp, #8
801030c: af00 add r7, sp, #0
__asm volatile
801030e: f04f 0350 mov.w r3, #80 ; 0x50
8010312: b672 cpsid i
8010314: f383 8811 msr BASEPRI, r3
8010318: f3bf 8f6f isb sy
801031c: f3bf 8f4f dsb sy
8010320: b662 cpsie i
8010322: 607b str r3, [r7, #4]
save and then restore the interrupt mask value as its value is already
known. */
portDISABLE_INTERRUPTS();
{
/* Increment the RTOS tick. */
if( xTaskIncrementTick() != pdFALSE )
8010324: f7ff f8f6 bl 800f514 <xTaskIncrementTick>
8010328: 4603 mov r3, r0
801032a: 2b00 cmp r3, #0
801032c: d003 beq.n 8010336 <SysTick_Handler+0x2e>
{
/* A context switch is required. Context switching is performed in
the PendSV interrupt. Pend the PendSV interrupt. */
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
801032e: 4b06 ldr r3, [pc, #24] ; (8010348 <SysTick_Handler+0x40>)
8010330: f04f 5280 mov.w r2, #268435456 ; 0x10000000
8010334: 601a str r2, [r3, #0]
8010336: 2300 movs r3, #0
8010338: 603b str r3, [r7, #0]
__asm volatile
801033a: 683b ldr r3, [r7, #0]
801033c: f383 8811 msr BASEPRI, r3
}
}
portENABLE_INTERRUPTS();
}
8010340: bf00 nop
8010342: 3708 adds r7, #8
8010344: 46bd mov sp, r7
8010346: bd80 pop {r7, pc}
8010348: e000ed04 .word 0xe000ed04
0801034c <vPortSetupTimerInterrupt>:
/*
* Setup the systick timer to generate the tick interrupts at the required
* frequency.
*/
__attribute__(( weak )) void vPortSetupTimerInterrupt( void )
{
801034c: b480 push {r7}
801034e: 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;
8010350: 4b0b ldr r3, [pc, #44] ; (8010380 <vPortSetupTimerInterrupt+0x34>)
8010352: 2200 movs r2, #0
8010354: 601a str r2, [r3, #0]
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;
8010356: 4b0b ldr r3, [pc, #44] ; (8010384 <vPortSetupTimerInterrupt+0x38>)
8010358: 2200 movs r2, #0
801035a: 601a str r2, [r3, #0]
/* Configure SysTick to interrupt at the requested rate. */
portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
801035c: 4b0a ldr r3, [pc, #40] ; (8010388 <vPortSetupTimerInterrupt+0x3c>)
801035e: 681b ldr r3, [r3, #0]
8010360: 4a0a ldr r2, [pc, #40] ; (801038c <vPortSetupTimerInterrupt+0x40>)
8010362: fba2 2303 umull r2, r3, r2, r3
8010366: 099b lsrs r3, r3, #6
8010368: 4a09 ldr r2, [pc, #36] ; (8010390 <vPortSetupTimerInterrupt+0x44>)
801036a: 3b01 subs r3, #1
801036c: 6013 str r3, [r2, #0]
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT );
801036e: 4b04 ldr r3, [pc, #16] ; (8010380 <vPortSetupTimerInterrupt+0x34>)
8010370: 2207 movs r2, #7
8010372: 601a str r2, [r3, #0]
}
8010374: bf00 nop
8010376: 46bd mov sp, r7
8010378: f85d 7b04 ldr.w r7, [sp], #4
801037c: 4770 bx lr
801037e: bf00 nop
8010380: e000e010 .word 0xe000e010
8010384: e000e018 .word 0xe000e018
8010388: 20000064 .word 0x20000064
801038c: 10624dd3 .word 0x10624dd3
8010390: e000e014 .word 0xe000e014
08010394 <vPortEnableVFP>:
/*-----------------------------------------------------------*/
/* This is a naked function. */
static void vPortEnableVFP( void )
{
__asm volatile
8010394: f8df 000c ldr.w r0, [pc, #12] ; 80103a4 <vPortEnableVFP+0x10>
8010398: 6801 ldr r1, [r0, #0]
801039a: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000
801039e: 6001 str r1, [r0, #0]
80103a0: 4770 bx lr
" \n"
" orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */
" str r1, [r0] \n"
" bx r14 "
);
}
80103a2: bf00 nop
80103a4: e000ed88 .word 0xe000ed88
080103a8 <vPortValidateInterruptPriority>:
/*-----------------------------------------------------------*/
#if( configASSERT_DEFINED == 1 )
void vPortValidateInterruptPriority( void )
{
80103a8: b480 push {r7}
80103aa: b085 sub sp, #20
80103ac: 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" );
80103ae: f3ef 8305 mrs r3, IPSR
80103b2: 60fb str r3, [r7, #12]
/* Is the interrupt number a user defined interrupt? */
if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER )
80103b4: 68fb ldr r3, [r7, #12]
80103b6: 2b0f cmp r3, #15
80103b8: d915 bls.n 80103e6 <vPortValidateInterruptPriority+0x3e>
{
/* Look up the interrupt's priority. */
ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ];
80103ba: 4a18 ldr r2, [pc, #96] ; (801041c <vPortValidateInterruptPriority+0x74>)
80103bc: 68fb ldr r3, [r7, #12]
80103be: 4413 add r3, r2
80103c0: 781b ldrb r3, [r3, #0]
80103c2: 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 );
80103c4: 4b16 ldr r3, [pc, #88] ; (8010420 <vPortValidateInterruptPriority+0x78>)
80103c6: 781b ldrb r3, [r3, #0]
80103c8: 7afa ldrb r2, [r7, #11]
80103ca: 429a cmp r2, r3
80103cc: d20b bcs.n 80103e6 <vPortValidateInterruptPriority+0x3e>
__asm volatile
80103ce: f04f 0350 mov.w r3, #80 ; 0x50
80103d2: b672 cpsid i
80103d4: f383 8811 msr BASEPRI, r3
80103d8: f3bf 8f6f isb sy
80103dc: f3bf 8f4f dsb sy
80103e0: b662 cpsie i
80103e2: 607b str r3, [r7, #4]
80103e4: e7fe b.n 80103e4 <vPortValidateInterruptPriority+0x3c>
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 );
80103e6: 4b0f ldr r3, [pc, #60] ; (8010424 <vPortValidateInterruptPriority+0x7c>)
80103e8: 681b ldr r3, [r3, #0]
80103ea: f403 62e0 and.w r2, r3, #1792 ; 0x700
80103ee: 4b0e ldr r3, [pc, #56] ; (8010428 <vPortValidateInterruptPriority+0x80>)
80103f0: 681b ldr r3, [r3, #0]
80103f2: 429a cmp r2, r3
80103f4: d90b bls.n 801040e <vPortValidateInterruptPriority+0x66>
80103f6: f04f 0350 mov.w r3, #80 ; 0x50
80103fa: b672 cpsid i
80103fc: f383 8811 msr BASEPRI, r3
8010400: f3bf 8f6f isb sy
8010404: f3bf 8f4f dsb sy
8010408: b662 cpsie i
801040a: 603b str r3, [r7, #0]
801040c: e7fe b.n 801040c <vPortValidateInterruptPriority+0x64>
}
801040e: bf00 nop
8010410: 3714 adds r7, #20
8010412: 46bd mov sp, r7
8010414: f85d 7b04 ldr.w r7, [sp], #4
8010418: 4770 bx lr
801041a: bf00 nop
801041c: e000e3f0 .word 0xe000e3f0
8010420: 200006b8 .word 0x200006b8
8010424: e000ed0c .word 0xe000ed0c
8010428: 200006bc .word 0x200006bc
0801042c <pvPortMalloc>:
static size_t xBlockAllocatedBit = 0;
/*-----------------------------------------------------------*/
void *pvPortMalloc( size_t xWantedSize )
{
801042c: b580 push {r7, lr}
801042e: b08a sub sp, #40 ; 0x28
8010430: af00 add r7, sp, #0
8010432: 6078 str r0, [r7, #4]
BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
void *pvReturn = NULL;
8010434: 2300 movs r3, #0
8010436: 61fb str r3, [r7, #28]
vTaskSuspendAll();
8010438: f7fe ff9e bl 800f378 <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 )
801043c: 4b5c ldr r3, [pc, #368] ; (80105b0 <pvPortMalloc+0x184>)
801043e: 681b ldr r3, [r3, #0]
8010440: 2b00 cmp r3, #0
8010442: d101 bne.n 8010448 <pvPortMalloc+0x1c>
{
prvHeapInit();
8010444: f000 f91a bl 801067c <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 )
8010448: 4b5a ldr r3, [pc, #360] ; (80105b4 <pvPortMalloc+0x188>)
801044a: 681a ldr r2, [r3, #0]
801044c: 687b ldr r3, [r7, #4]
801044e: 4013 ands r3, r2
8010450: 2b00 cmp r3, #0
8010452: f040 8090 bne.w 8010576 <pvPortMalloc+0x14a>
{
/* The wanted size is increased so it can contain a BlockLink_t
structure in addition to the requested amount of bytes. */
if( xWantedSize > 0 )
8010456: 687b ldr r3, [r7, #4]
8010458: 2b00 cmp r3, #0
801045a: d01e beq.n 801049a <pvPortMalloc+0x6e>
{
xWantedSize += xHeapStructSize;
801045c: 2208 movs r2, #8
801045e: 687b ldr r3, [r7, #4]
8010460: 4413 add r3, r2
8010462: 607b str r3, [r7, #4]
/* Ensure that blocks are always aligned to the required number
of bytes. */
if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )
8010464: 687b ldr r3, [r7, #4]
8010466: f003 0307 and.w r3, r3, #7
801046a: 2b00 cmp r3, #0
801046c: d015 beq.n 801049a <pvPortMalloc+0x6e>
{
/* Byte alignment required. */
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
801046e: 687b ldr r3, [r7, #4]
8010470: f023 0307 bic.w r3, r3, #7
8010474: 3308 adds r3, #8
8010476: 607b str r3, [r7, #4]
configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 );
8010478: 687b ldr r3, [r7, #4]
801047a: f003 0307 and.w r3, r3, #7
801047e: 2b00 cmp r3, #0
8010480: d00b beq.n 801049a <pvPortMalloc+0x6e>
8010482: f04f 0350 mov.w r3, #80 ; 0x50
8010486: b672 cpsid i
8010488: f383 8811 msr BASEPRI, r3
801048c: f3bf 8f6f isb sy
8010490: f3bf 8f4f dsb sy
8010494: b662 cpsie i
8010496: 617b str r3, [r7, #20]
8010498: e7fe b.n 8010498 <pvPortMalloc+0x6c>
else
{
mtCOVERAGE_TEST_MARKER();
}
if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) )
801049a: 687b ldr r3, [r7, #4]
801049c: 2b00 cmp r3, #0
801049e: d06a beq.n 8010576 <pvPortMalloc+0x14a>
80104a0: 4b45 ldr r3, [pc, #276] ; (80105b8 <pvPortMalloc+0x18c>)
80104a2: 681b ldr r3, [r3, #0]
80104a4: 687a ldr r2, [r7, #4]
80104a6: 429a cmp r2, r3
80104a8: d865 bhi.n 8010576 <pvPortMalloc+0x14a>
{
/* Traverse the list from the start (lowest address) block until
one of adequate size is found. */
pxPreviousBlock = &xStart;
80104aa: 4b44 ldr r3, [pc, #272] ; (80105bc <pvPortMalloc+0x190>)
80104ac: 623b str r3, [r7, #32]
pxBlock = xStart.pxNextFreeBlock;
80104ae: 4b43 ldr r3, [pc, #268] ; (80105bc <pvPortMalloc+0x190>)
80104b0: 681b ldr r3, [r3, #0]
80104b2: 627b str r3, [r7, #36] ; 0x24
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
80104b4: e004 b.n 80104c0 <pvPortMalloc+0x94>
{
pxPreviousBlock = pxBlock;
80104b6: 6a7b ldr r3, [r7, #36] ; 0x24
80104b8: 623b str r3, [r7, #32]
pxBlock = pxBlock->pxNextFreeBlock;
80104ba: 6a7b ldr r3, [r7, #36] ; 0x24
80104bc: 681b ldr r3, [r3, #0]
80104be: 627b str r3, [r7, #36] ; 0x24
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
80104c0: 6a7b ldr r3, [r7, #36] ; 0x24
80104c2: 685b ldr r3, [r3, #4]
80104c4: 687a ldr r2, [r7, #4]
80104c6: 429a cmp r2, r3
80104c8: d903 bls.n 80104d2 <pvPortMalloc+0xa6>
80104ca: 6a7b ldr r3, [r7, #36] ; 0x24
80104cc: 681b ldr r3, [r3, #0]
80104ce: 2b00 cmp r3, #0
80104d0: d1f1 bne.n 80104b6 <pvPortMalloc+0x8a>
}
/* If the end marker was reached then a block of adequate size
was not found. */
if( pxBlock != pxEnd )
80104d2: 4b37 ldr r3, [pc, #220] ; (80105b0 <pvPortMalloc+0x184>)
80104d4: 681b ldr r3, [r3, #0]
80104d6: 6a7a ldr r2, [r7, #36] ; 0x24
80104d8: 429a cmp r2, r3
80104da: d04c beq.n 8010576 <pvPortMalloc+0x14a>
{
/* Return the memory space pointed to - jumping over the
BlockLink_t structure at its start. */
pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize );
80104dc: 6a3b ldr r3, [r7, #32]
80104de: 681b ldr r3, [r3, #0]
80104e0: 2208 movs r2, #8
80104e2: 4413 add r3, r2
80104e4: 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;
80104e6: 6a7b ldr r3, [r7, #36] ; 0x24
80104e8: 681a ldr r2, [r3, #0]
80104ea: 6a3b ldr r3, [r7, #32]
80104ec: 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 )
80104ee: 6a7b ldr r3, [r7, #36] ; 0x24
80104f0: 685a ldr r2, [r3, #4]
80104f2: 687b ldr r3, [r7, #4]
80104f4: 1ad2 subs r2, r2, r3
80104f6: 2308 movs r3, #8
80104f8: 005b lsls r3, r3, #1
80104fa: 429a cmp r2, r3
80104fc: d920 bls.n 8010540 <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 );
80104fe: 6a7a ldr r2, [r7, #36] ; 0x24
8010500: 687b ldr r3, [r7, #4]
8010502: 4413 add r3, r2
8010504: 61bb str r3, [r7, #24]
configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 );
8010506: 69bb ldr r3, [r7, #24]
8010508: f003 0307 and.w r3, r3, #7
801050c: 2b00 cmp r3, #0
801050e: d00b beq.n 8010528 <pvPortMalloc+0xfc>
8010510: f04f 0350 mov.w r3, #80 ; 0x50
8010514: b672 cpsid i
8010516: f383 8811 msr BASEPRI, r3
801051a: f3bf 8f6f isb sy
801051e: f3bf 8f4f dsb sy
8010522: b662 cpsie i
8010524: 613b str r3, [r7, #16]
8010526: e7fe b.n 8010526 <pvPortMalloc+0xfa>
/* Calculate the sizes of two blocks split from the
single block. */
pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
8010528: 6a7b ldr r3, [r7, #36] ; 0x24
801052a: 685a ldr r2, [r3, #4]
801052c: 687b ldr r3, [r7, #4]
801052e: 1ad2 subs r2, r2, r3
8010530: 69bb ldr r3, [r7, #24]
8010532: 605a str r2, [r3, #4]
pxBlock->xBlockSize = xWantedSize;
8010534: 6a7b ldr r3, [r7, #36] ; 0x24
8010536: 687a ldr r2, [r7, #4]
8010538: 605a str r2, [r3, #4]
/* Insert the new block into the list of free blocks. */
prvInsertBlockIntoFreeList( pxNewBlockLink );
801053a: 69b8 ldr r0, [r7, #24]
801053c: f000 f900 bl 8010740 <prvInsertBlockIntoFreeList>
else
{
mtCOVERAGE_TEST_MARKER();
}
xFreeBytesRemaining -= pxBlock->xBlockSize;
8010540: 4b1d ldr r3, [pc, #116] ; (80105b8 <pvPortMalloc+0x18c>)
8010542: 681a ldr r2, [r3, #0]
8010544: 6a7b ldr r3, [r7, #36] ; 0x24
8010546: 685b ldr r3, [r3, #4]
8010548: 1ad3 subs r3, r2, r3
801054a: 4a1b ldr r2, [pc, #108] ; (80105b8 <pvPortMalloc+0x18c>)
801054c: 6013 str r3, [r2, #0]
if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining )
801054e: 4b1a ldr r3, [pc, #104] ; (80105b8 <pvPortMalloc+0x18c>)
8010550: 681a ldr r2, [r3, #0]
8010552: 4b1b ldr r3, [pc, #108] ; (80105c0 <pvPortMalloc+0x194>)
8010554: 681b ldr r3, [r3, #0]
8010556: 429a cmp r2, r3
8010558: d203 bcs.n 8010562 <pvPortMalloc+0x136>
{
xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;
801055a: 4b17 ldr r3, [pc, #92] ; (80105b8 <pvPortMalloc+0x18c>)
801055c: 681b ldr r3, [r3, #0]
801055e: 4a18 ldr r2, [pc, #96] ; (80105c0 <pvPortMalloc+0x194>)
8010560: 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;
8010562: 6a7b ldr r3, [r7, #36] ; 0x24
8010564: 685a ldr r2, [r3, #4]
8010566: 4b13 ldr r3, [pc, #76] ; (80105b4 <pvPortMalloc+0x188>)
8010568: 681b ldr r3, [r3, #0]
801056a: 431a orrs r2, r3
801056c: 6a7b ldr r3, [r7, #36] ; 0x24
801056e: 605a str r2, [r3, #4]
pxBlock->pxNextFreeBlock = NULL;
8010570: 6a7b ldr r3, [r7, #36] ; 0x24
8010572: 2200 movs r2, #0
8010574: 601a str r2, [r3, #0]
mtCOVERAGE_TEST_MARKER();
}
traceMALLOC( pvReturn, xWantedSize );
}
( void ) xTaskResumeAll();
8010576: f7fe ff0d bl 800f394 <xTaskResumeAll>
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
{
if( pvReturn == NULL )
801057a: 69fb ldr r3, [r7, #28]
801057c: 2b00 cmp r3, #0
801057e: d101 bne.n 8010584 <pvPortMalloc+0x158>
{
extern void vApplicationMallocFailedHook( void );
vApplicationMallocFailedHook();
8010580: f7f0 f828 bl 80005d4 <vApplicationMallocFailedHook>
mtCOVERAGE_TEST_MARKER();
}
}
#endif
configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 );
8010584: 69fb ldr r3, [r7, #28]
8010586: f003 0307 and.w r3, r3, #7
801058a: 2b00 cmp r3, #0
801058c: d00b beq.n 80105a6 <pvPortMalloc+0x17a>
801058e: f04f 0350 mov.w r3, #80 ; 0x50
8010592: b672 cpsid i
8010594: f383 8811 msr BASEPRI, r3
8010598: f3bf 8f6f isb sy
801059c: f3bf 8f4f dsb sy
80105a0: b662 cpsie i
80105a2: 60fb str r3, [r7, #12]
80105a4: e7fe b.n 80105a4 <pvPortMalloc+0x178>
return pvReturn;
80105a6: 69fb ldr r3, [r7, #28]
}
80105a8: 4618 mov r0, r3
80105aa: 3728 adds r7, #40 ; 0x28
80105ac: 46bd mov sp, r7
80105ae: bd80 pop {r7, pc}
80105b0: 200086c8 .word 0x200086c8
80105b4: 200086d4 .word 0x200086d4
80105b8: 200086cc .word 0x200086cc
80105bc: 200086c0 .word 0x200086c0
80105c0: 200086d0 .word 0x200086d0
080105c4 <vPortFree>:
/*-----------------------------------------------------------*/
void vPortFree( void *pv )
{
80105c4: b580 push {r7, lr}
80105c6: b086 sub sp, #24
80105c8: af00 add r7, sp, #0
80105ca: 6078 str r0, [r7, #4]
uint8_t *puc = ( uint8_t * ) pv;
80105cc: 687b ldr r3, [r7, #4]
80105ce: 617b str r3, [r7, #20]
BlockLink_t *pxLink;
if( pv != NULL )
80105d0: 687b ldr r3, [r7, #4]
80105d2: 2b00 cmp r3, #0
80105d4: d04a beq.n 801066c <vPortFree+0xa8>
{
/* The memory being freed will have an BlockLink_t structure immediately
before it. */
puc -= xHeapStructSize;
80105d6: 2308 movs r3, #8
80105d8: 425b negs r3, r3
80105da: 697a ldr r2, [r7, #20]
80105dc: 4413 add r3, r2
80105de: 617b str r3, [r7, #20]
/* This casting is to keep the compiler from issuing warnings. */
pxLink = ( void * ) puc;
80105e0: 697b ldr r3, [r7, #20]
80105e2: 613b str r3, [r7, #16]
/* Check the block is actually allocated. */
configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
80105e4: 693b ldr r3, [r7, #16]
80105e6: 685a ldr r2, [r3, #4]
80105e8: 4b22 ldr r3, [pc, #136] ; (8010674 <vPortFree+0xb0>)
80105ea: 681b ldr r3, [r3, #0]
80105ec: 4013 ands r3, r2
80105ee: 2b00 cmp r3, #0
80105f0: d10b bne.n 801060a <vPortFree+0x46>
80105f2: f04f 0350 mov.w r3, #80 ; 0x50
80105f6: b672 cpsid i
80105f8: f383 8811 msr BASEPRI, r3
80105fc: f3bf 8f6f isb sy
8010600: f3bf 8f4f dsb sy
8010604: b662 cpsie i
8010606: 60fb str r3, [r7, #12]
8010608: e7fe b.n 8010608 <vPortFree+0x44>
configASSERT( pxLink->pxNextFreeBlock == NULL );
801060a: 693b ldr r3, [r7, #16]
801060c: 681b ldr r3, [r3, #0]
801060e: 2b00 cmp r3, #0
8010610: d00b beq.n 801062a <vPortFree+0x66>
8010612: f04f 0350 mov.w r3, #80 ; 0x50
8010616: b672 cpsid i
8010618: f383 8811 msr BASEPRI, r3
801061c: f3bf 8f6f isb sy
8010620: f3bf 8f4f dsb sy
8010624: b662 cpsie i
8010626: 60bb str r3, [r7, #8]
8010628: e7fe b.n 8010628 <vPortFree+0x64>
if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 )
801062a: 693b ldr r3, [r7, #16]
801062c: 685a ldr r2, [r3, #4]
801062e: 4b11 ldr r3, [pc, #68] ; (8010674 <vPortFree+0xb0>)
8010630: 681b ldr r3, [r3, #0]
8010632: 4013 ands r3, r2
8010634: 2b00 cmp r3, #0
8010636: d019 beq.n 801066c <vPortFree+0xa8>
{
if( pxLink->pxNextFreeBlock == NULL )
8010638: 693b ldr r3, [r7, #16]
801063a: 681b ldr r3, [r3, #0]
801063c: 2b00 cmp r3, #0
801063e: d115 bne.n 801066c <vPortFree+0xa8>
{
/* The block is being returned to the heap - it is no longer
allocated. */
pxLink->xBlockSize &= ~xBlockAllocatedBit;
8010640: 693b ldr r3, [r7, #16]
8010642: 685a ldr r2, [r3, #4]
8010644: 4b0b ldr r3, [pc, #44] ; (8010674 <vPortFree+0xb0>)
8010646: 681b ldr r3, [r3, #0]
8010648: 43db mvns r3, r3
801064a: 401a ands r2, r3
801064c: 693b ldr r3, [r7, #16]
801064e: 605a str r2, [r3, #4]
vTaskSuspendAll();
8010650: f7fe fe92 bl 800f378 <vTaskSuspendAll>
{
/* Add this block to the list of free blocks. */
xFreeBytesRemaining += pxLink->xBlockSize;
8010654: 693b ldr r3, [r7, #16]
8010656: 685a ldr r2, [r3, #4]
8010658: 4b07 ldr r3, [pc, #28] ; (8010678 <vPortFree+0xb4>)
801065a: 681b ldr r3, [r3, #0]
801065c: 4413 add r3, r2
801065e: 4a06 ldr r2, [pc, #24] ; (8010678 <vPortFree+0xb4>)
8010660: 6013 str r3, [r2, #0]
traceFREE( pv, pxLink->xBlockSize );
prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
8010662: 6938 ldr r0, [r7, #16]
8010664: f000 f86c bl 8010740 <prvInsertBlockIntoFreeList>
}
( void ) xTaskResumeAll();
8010668: f7fe fe94 bl 800f394 <xTaskResumeAll>
else
{
mtCOVERAGE_TEST_MARKER();
}
}
}
801066c: bf00 nop
801066e: 3718 adds r7, #24
8010670: 46bd mov sp, r7
8010672: bd80 pop {r7, pc}
8010674: 200086d4 .word 0x200086d4
8010678: 200086cc .word 0x200086cc
0801067c <prvHeapInit>:
/* This just exists to keep the linker quiet. */
}
/*-----------------------------------------------------------*/
static void prvHeapInit( void )
{
801067c: b480 push {r7}
801067e: b085 sub sp, #20
8010680: af00 add r7, sp, #0
BlockLink_t *pxFirstFreeBlock;
uint8_t *pucAlignedHeap;
size_t uxAddress;
size_t xTotalHeapSize = configTOTAL_HEAP_SIZE;
8010682: f44f 4300 mov.w r3, #32768 ; 0x8000
8010686: 60bb str r3, [r7, #8]
/* Ensure the heap starts on a correctly aligned boundary. */
uxAddress = ( size_t ) ucHeap;
8010688: 4b27 ldr r3, [pc, #156] ; (8010728 <prvHeapInit+0xac>)
801068a: 60fb str r3, [r7, #12]
if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 )
801068c: 68fb ldr r3, [r7, #12]
801068e: f003 0307 and.w r3, r3, #7
8010692: 2b00 cmp r3, #0
8010694: d00c beq.n 80106b0 <prvHeapInit+0x34>
{
uxAddress += ( portBYTE_ALIGNMENT - 1 );
8010696: 68fb ldr r3, [r7, #12]
8010698: 3307 adds r3, #7
801069a: 60fb str r3, [r7, #12]
uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
801069c: 68fb ldr r3, [r7, #12]
801069e: f023 0307 bic.w r3, r3, #7
80106a2: 60fb str r3, [r7, #12]
xTotalHeapSize -= uxAddress - ( size_t ) ucHeap;
80106a4: 68ba ldr r2, [r7, #8]
80106a6: 68fb ldr r3, [r7, #12]
80106a8: 1ad3 subs r3, r2, r3
80106aa: 4a1f ldr r2, [pc, #124] ; (8010728 <prvHeapInit+0xac>)
80106ac: 4413 add r3, r2
80106ae: 60bb str r3, [r7, #8]
}
pucAlignedHeap = ( uint8_t * ) uxAddress;
80106b0: 68fb ldr r3, [r7, #12]
80106b2: 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;
80106b4: 4a1d ldr r2, [pc, #116] ; (801072c <prvHeapInit+0xb0>)
80106b6: 687b ldr r3, [r7, #4]
80106b8: 6013 str r3, [r2, #0]
xStart.xBlockSize = ( size_t ) 0;
80106ba: 4b1c ldr r3, [pc, #112] ; (801072c <prvHeapInit+0xb0>)
80106bc: 2200 movs r2, #0
80106be: 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;
80106c0: 687b ldr r3, [r7, #4]
80106c2: 68ba ldr r2, [r7, #8]
80106c4: 4413 add r3, r2
80106c6: 60fb str r3, [r7, #12]
uxAddress -= xHeapStructSize;
80106c8: 2208 movs r2, #8
80106ca: 68fb ldr r3, [r7, #12]
80106cc: 1a9b subs r3, r3, r2
80106ce: 60fb str r3, [r7, #12]
uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
80106d0: 68fb ldr r3, [r7, #12]
80106d2: f023 0307 bic.w r3, r3, #7
80106d6: 60fb str r3, [r7, #12]
pxEnd = ( void * ) uxAddress;
80106d8: 68fb ldr r3, [r7, #12]
80106da: 4a15 ldr r2, [pc, #84] ; (8010730 <prvHeapInit+0xb4>)
80106dc: 6013 str r3, [r2, #0]
pxEnd->xBlockSize = 0;
80106de: 4b14 ldr r3, [pc, #80] ; (8010730 <prvHeapInit+0xb4>)
80106e0: 681b ldr r3, [r3, #0]
80106e2: 2200 movs r2, #0
80106e4: 605a str r2, [r3, #4]
pxEnd->pxNextFreeBlock = NULL;
80106e6: 4b12 ldr r3, [pc, #72] ; (8010730 <prvHeapInit+0xb4>)
80106e8: 681b ldr r3, [r3, #0]
80106ea: 2200 movs r2, #0
80106ec: 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;
80106ee: 687b ldr r3, [r7, #4]
80106f0: 603b str r3, [r7, #0]
pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock;
80106f2: 683b ldr r3, [r7, #0]
80106f4: 68fa ldr r2, [r7, #12]
80106f6: 1ad2 subs r2, r2, r3
80106f8: 683b ldr r3, [r7, #0]
80106fa: 605a str r2, [r3, #4]
pxFirstFreeBlock->pxNextFreeBlock = pxEnd;
80106fc: 4b0c ldr r3, [pc, #48] ; (8010730 <prvHeapInit+0xb4>)
80106fe: 681a ldr r2, [r3, #0]
8010700: 683b ldr r3, [r7, #0]
8010702: 601a str r2, [r3, #0]
/* Only one block exists - and it covers the entire usable heap space. */
xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
8010704: 683b ldr r3, [r7, #0]
8010706: 685b ldr r3, [r3, #4]
8010708: 4a0a ldr r2, [pc, #40] ; (8010734 <prvHeapInit+0xb8>)
801070a: 6013 str r3, [r2, #0]
xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
801070c: 683b ldr r3, [r7, #0]
801070e: 685b ldr r3, [r3, #4]
8010710: 4a09 ldr r2, [pc, #36] ; (8010738 <prvHeapInit+0xbc>)
8010712: 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 );
8010714: 4b09 ldr r3, [pc, #36] ; (801073c <prvHeapInit+0xc0>)
8010716: f04f 4200 mov.w r2, #2147483648 ; 0x80000000
801071a: 601a str r2, [r3, #0]
}
801071c: bf00 nop
801071e: 3714 adds r7, #20
8010720: 46bd mov sp, r7
8010722: f85d 7b04 ldr.w r7, [sp], #4
8010726: 4770 bx lr
8010728: 200006c0 .word 0x200006c0
801072c: 200086c0 .word 0x200086c0
8010730: 200086c8 .word 0x200086c8
8010734: 200086d0 .word 0x200086d0
8010738: 200086cc .word 0x200086cc
801073c: 200086d4 .word 0x200086d4
08010740 <prvInsertBlockIntoFreeList>:
/*-----------------------------------------------------------*/
static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert )
{
8010740: b480 push {r7}
8010742: b085 sub sp, #20
8010744: af00 add r7, sp, #0
8010746: 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 )
8010748: 4b28 ldr r3, [pc, #160] ; (80107ec <prvInsertBlockIntoFreeList+0xac>)
801074a: 60fb str r3, [r7, #12]
801074c: e002 b.n 8010754 <prvInsertBlockIntoFreeList+0x14>
801074e: 68fb ldr r3, [r7, #12]
8010750: 681b ldr r3, [r3, #0]
8010752: 60fb str r3, [r7, #12]
8010754: 68fb ldr r3, [r7, #12]
8010756: 681b ldr r3, [r3, #0]
8010758: 687a ldr r2, [r7, #4]
801075a: 429a cmp r2, r3
801075c: d8f7 bhi.n 801074e <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;
801075e: 68fb ldr r3, [r7, #12]
8010760: 60bb str r3, [r7, #8]
if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert )
8010762: 68fb ldr r3, [r7, #12]
8010764: 685b ldr r3, [r3, #4]
8010766: 68ba ldr r2, [r7, #8]
8010768: 4413 add r3, r2
801076a: 687a ldr r2, [r7, #4]
801076c: 429a cmp r2, r3
801076e: d108 bne.n 8010782 <prvInsertBlockIntoFreeList+0x42>
{
pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
8010770: 68fb ldr r3, [r7, #12]
8010772: 685a ldr r2, [r3, #4]
8010774: 687b ldr r3, [r7, #4]
8010776: 685b ldr r3, [r3, #4]
8010778: 441a add r2, r3
801077a: 68fb ldr r3, [r7, #12]
801077c: 605a str r2, [r3, #4]
pxBlockToInsert = pxIterator;
801077e: 68fb ldr r3, [r7, #12]
8010780: 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;
8010782: 687b ldr r3, [r7, #4]
8010784: 60bb str r3, [r7, #8]
if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock )
8010786: 687b ldr r3, [r7, #4]
8010788: 685b ldr r3, [r3, #4]
801078a: 68ba ldr r2, [r7, #8]
801078c: 441a add r2, r3
801078e: 68fb ldr r3, [r7, #12]
8010790: 681b ldr r3, [r3, #0]
8010792: 429a cmp r2, r3
8010794: d118 bne.n 80107c8 <prvInsertBlockIntoFreeList+0x88>
{
if( pxIterator->pxNextFreeBlock != pxEnd )
8010796: 68fb ldr r3, [r7, #12]
8010798: 681a ldr r2, [r3, #0]
801079a: 4b15 ldr r3, [pc, #84] ; (80107f0 <prvInsertBlockIntoFreeList+0xb0>)
801079c: 681b ldr r3, [r3, #0]
801079e: 429a cmp r2, r3
80107a0: d00d beq.n 80107be <prvInsertBlockIntoFreeList+0x7e>
{
/* Form one big block from the two blocks. */
pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
80107a2: 687b ldr r3, [r7, #4]
80107a4: 685a ldr r2, [r3, #4]
80107a6: 68fb ldr r3, [r7, #12]
80107a8: 681b ldr r3, [r3, #0]
80107aa: 685b ldr r3, [r3, #4]
80107ac: 441a add r2, r3
80107ae: 687b ldr r3, [r7, #4]
80107b0: 605a str r2, [r3, #4]
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
80107b2: 68fb ldr r3, [r7, #12]
80107b4: 681b ldr r3, [r3, #0]
80107b6: 681a ldr r2, [r3, #0]
80107b8: 687b ldr r3, [r7, #4]
80107ba: 601a str r2, [r3, #0]
80107bc: e008 b.n 80107d0 <prvInsertBlockIntoFreeList+0x90>
}
else
{
pxBlockToInsert->pxNextFreeBlock = pxEnd;
80107be: 4b0c ldr r3, [pc, #48] ; (80107f0 <prvInsertBlockIntoFreeList+0xb0>)
80107c0: 681a ldr r2, [r3, #0]
80107c2: 687b ldr r3, [r7, #4]
80107c4: 601a str r2, [r3, #0]
80107c6: e003 b.n 80107d0 <prvInsertBlockIntoFreeList+0x90>
}
}
else
{
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
80107c8: 68fb ldr r3, [r7, #12]
80107ca: 681a ldr r2, [r3, #0]
80107cc: 687b ldr r3, [r7, #4]
80107ce: 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 )
80107d0: 68fa ldr r2, [r7, #12]
80107d2: 687b ldr r3, [r7, #4]
80107d4: 429a cmp r2, r3
80107d6: d002 beq.n 80107de <prvInsertBlockIntoFreeList+0x9e>
{
pxIterator->pxNextFreeBlock = pxBlockToInsert;
80107d8: 68fb ldr r3, [r7, #12]
80107da: 687a ldr r2, [r7, #4]
80107dc: 601a str r2, [r3, #0]
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
80107de: bf00 nop
80107e0: 3714 adds r7, #20
80107e2: 46bd mov sp, r7
80107e4: f85d 7b04 ldr.w r7, [sp], #4
80107e8: 4770 bx lr
80107ea: bf00 nop
80107ec: 200086c0 .word 0x200086c0
80107f0: 200086c8 .word 0x200086c8
080107f4 <tcpip_timeouts_mbox_fetch>:
* @param mbox the mbox to fetch the message from
* @param msg the place to store the message
*/
static void
tcpip_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
{
80107f4: b580 push {r7, lr}
80107f6: b084 sub sp, #16
80107f8: af00 add r7, sp, #0
80107fa: 6078 str r0, [r7, #4]
80107fc: 6039 str r1, [r7, #0]
u32_t sleeptime, res;
again:
LWIP_ASSERT_CORE_LOCKED();
sleeptime = sys_timeouts_sleeptime();
80107fe: f007 fa91 bl 8017d24 <sys_timeouts_sleeptime>
8010802: 60f8 str r0, [r7, #12]
if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) {
8010804: 68fb ldr r3, [r7, #12]
8010806: f1b3 3fff cmp.w r3, #4294967295
801080a: d10b bne.n 8010824 <tcpip_timeouts_mbox_fetch+0x30>
UNLOCK_TCPIP_CORE();
801080c: 4813 ldr r0, [pc, #76] ; (801085c <tcpip_timeouts_mbox_fetch+0x68>)
801080e: f00c f9c2 bl 801cb96 <sys_mutex_unlock>
sys_arch_mbox_fetch(mbox, msg, 0);
8010812: 2200 movs r2, #0
8010814: 6839 ldr r1, [r7, #0]
8010816: 6878 ldr r0, [r7, #4]
8010818: f00c f934 bl 801ca84 <sys_arch_mbox_fetch>
LOCK_TCPIP_CORE();
801081c: 480f ldr r0, [pc, #60] ; (801085c <tcpip_timeouts_mbox_fetch+0x68>)
801081e: f00c f9ab bl 801cb78 <sys_mutex_lock>
return;
8010822: e018 b.n 8010856 <tcpip_timeouts_mbox_fetch+0x62>
} else if (sleeptime == 0) {
8010824: 68fb ldr r3, [r7, #12]
8010826: 2b00 cmp r3, #0
8010828: d102 bne.n 8010830 <tcpip_timeouts_mbox_fetch+0x3c>
sys_check_timeouts();
801082a: f007 fa41 bl 8017cb0 <sys_check_timeouts>
/* We try again to fetch a message from the mbox. */
goto again;
801082e: e7e6 b.n 80107fe <tcpip_timeouts_mbox_fetch+0xa>
}
UNLOCK_TCPIP_CORE();
8010830: 480a ldr r0, [pc, #40] ; (801085c <tcpip_timeouts_mbox_fetch+0x68>)
8010832: f00c f9b0 bl 801cb96 <sys_mutex_unlock>
res = sys_arch_mbox_fetch(mbox, msg, sleeptime);
8010836: 68fa ldr r2, [r7, #12]
8010838: 6839 ldr r1, [r7, #0]
801083a: 6878 ldr r0, [r7, #4]
801083c: f00c f922 bl 801ca84 <sys_arch_mbox_fetch>
8010840: 60b8 str r0, [r7, #8]
LOCK_TCPIP_CORE();
8010842: 4806 ldr r0, [pc, #24] ; (801085c <tcpip_timeouts_mbox_fetch+0x68>)
8010844: f00c f998 bl 801cb78 <sys_mutex_lock>
if (res == SYS_ARCH_TIMEOUT) {
8010848: 68bb ldr r3, [r7, #8]
801084a: f1b3 3fff cmp.w r3, #4294967295
801084e: d102 bne.n 8010856 <tcpip_timeouts_mbox_fetch+0x62>
/* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred
before a message could be fetched. */
sys_check_timeouts();
8010850: f007 fa2e bl 8017cb0 <sys_check_timeouts>
/* We try again to fetch a message from the mbox. */
goto again;
8010854: e7d3 b.n 80107fe <tcpip_timeouts_mbox_fetch+0xa>
}
}
8010856: 3710 adds r7, #16
8010858: 46bd mov sp, r7
801085a: bd80 pop {r7, pc}
801085c: 2000c0c4 .word 0x2000c0c4
08010860 <tcpip_thread>:
*
* @param arg unused argument
*/
static void
tcpip_thread(void *arg)
{
8010860: b580 push {r7, lr}
8010862: b084 sub sp, #16
8010864: af00 add r7, sp, #0
8010866: 6078 str r0, [r7, #4]
struct tcpip_msg *msg;
LWIP_UNUSED_ARG(arg);
LWIP_MARK_TCPIP_THREAD();
LOCK_TCPIP_CORE();
8010868: 4810 ldr r0, [pc, #64] ; (80108ac <tcpip_thread+0x4c>)
801086a: f00c f985 bl 801cb78 <sys_mutex_lock>
if (tcpip_init_done != NULL) {
801086e: 4b10 ldr r3, [pc, #64] ; (80108b0 <tcpip_thread+0x50>)
8010870: 681b ldr r3, [r3, #0]
8010872: 2b00 cmp r3, #0
8010874: d005 beq.n 8010882 <tcpip_thread+0x22>
tcpip_init_done(tcpip_init_done_arg);
8010876: 4b0e ldr r3, [pc, #56] ; (80108b0 <tcpip_thread+0x50>)
8010878: 681b ldr r3, [r3, #0]
801087a: 4a0e ldr r2, [pc, #56] ; (80108b4 <tcpip_thread+0x54>)
801087c: 6812 ldr r2, [r2, #0]
801087e: 4610 mov r0, r2
8010880: 4798 blx r3
}
while (1) { /* MAIN Loop */
LWIP_TCPIP_THREAD_ALIVE();
/* wait for a message, timeouts are processed while waiting */
TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg);
8010882: f107 030c add.w r3, r7, #12
8010886: 4619 mov r1, r3
8010888: 480b ldr r0, [pc, #44] ; (80108b8 <tcpip_thread+0x58>)
801088a: f7ff ffb3 bl 80107f4 <tcpip_timeouts_mbox_fetch>
if (msg == NULL) {
801088e: 68fb ldr r3, [r7, #12]
8010890: 2b00 cmp r3, #0
8010892: d106 bne.n 80108a2 <tcpip_thread+0x42>
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n"));
LWIP_ASSERT("tcpip_thread: invalid message", 0);
8010894: 4b09 ldr r3, [pc, #36] ; (80108bc <tcpip_thread+0x5c>)
8010896: 2291 movs r2, #145 ; 0x91
8010898: 4909 ldr r1, [pc, #36] ; (80108c0 <tcpip_thread+0x60>)
801089a: 480a ldr r0, [pc, #40] ; (80108c4 <tcpip_thread+0x64>)
801089c: f00c fa2c bl 801ccf8 <iprintf>
continue;
80108a0: e003 b.n 80108aa <tcpip_thread+0x4a>
}
tcpip_thread_handle_msg(msg);
80108a2: 68fb ldr r3, [r7, #12]
80108a4: 4618 mov r0, r3
80108a6: f000 f80f bl 80108c8 <tcpip_thread_handle_msg>
TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg);
80108aa: e7ea b.n 8010882 <tcpip_thread+0x22>
80108ac: 2000c0c4 .word 0x2000c0c4
80108b0: 200086d8 .word 0x200086d8
80108b4: 200086dc .word 0x200086dc
80108b8: 200086e0 .word 0x200086e0
80108bc: 0801e014 .word 0x0801e014
80108c0: 0801e044 .word 0x0801e044
80108c4: 0801e064 .word 0x0801e064
080108c8 <tcpip_thread_handle_msg>:
/* Handle a single tcpip_msg
* This is in its own function for access by tests only.
*/
static void
tcpip_thread_handle_msg(struct tcpip_msg *msg)
{
80108c8: b580 push {r7, lr}
80108ca: b082 sub sp, #8
80108cc: af00 add r7, sp, #0
80108ce: 6078 str r0, [r7, #4]
switch (msg->type) {
80108d0: 687b ldr r3, [r7, #4]
80108d2: 781b ldrb r3, [r3, #0]
80108d4: 2b01 cmp r3, #1
80108d6: d018 beq.n 801090a <tcpip_thread_handle_msg+0x42>
80108d8: 2b02 cmp r3, #2
80108da: d021 beq.n 8010920 <tcpip_thread_handle_msg+0x58>
80108dc: 2b00 cmp r3, #0
80108de: d126 bne.n 801092e <tcpip_thread_handle_msg+0x66>
#endif /* !LWIP_TCPIP_CORE_LOCKING */
#if !LWIP_TCPIP_CORE_LOCKING_INPUT
case TCPIP_MSG_INPKT:
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg));
if (msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif) != ERR_OK) {
80108e0: 687b ldr r3, [r7, #4]
80108e2: 68db ldr r3, [r3, #12]
80108e4: 687a ldr r2, [r7, #4]
80108e6: 6850 ldr r0, [r2, #4]
80108e8: 687a ldr r2, [r7, #4]
80108ea: 6892 ldr r2, [r2, #8]
80108ec: 4611 mov r1, r2
80108ee: 4798 blx r3
80108f0: 4603 mov r3, r0
80108f2: 2b00 cmp r3, #0
80108f4: d004 beq.n 8010900 <tcpip_thread_handle_msg+0x38>
pbuf_free(msg->msg.inp.p);
80108f6: 687b ldr r3, [r7, #4]
80108f8: 685b ldr r3, [r3, #4]
80108fa: 4618 mov r0, r3
80108fc: f001 fccc bl 8012298 <pbuf_free>
}
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
8010900: 6879 ldr r1, [r7, #4]
8010902: 2009 movs r0, #9
8010904: f000 fe1c bl 8011540 <memp_free>
break;
8010908: e018 b.n 801093c <tcpip_thread_handle_msg+0x74>
break;
#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */
case TCPIP_MSG_CALLBACK:
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg));
msg->msg.cb.function(msg->msg.cb.ctx);
801090a: 687b ldr r3, [r7, #4]
801090c: 685b ldr r3, [r3, #4]
801090e: 687a ldr r2, [r7, #4]
8010910: 6892 ldr r2, [r2, #8]
8010912: 4610 mov r0, r2
8010914: 4798 blx r3
memp_free(MEMP_TCPIP_MSG_API, msg);
8010916: 6879 ldr r1, [r7, #4]
8010918: 2008 movs r0, #8
801091a: f000 fe11 bl 8011540 <memp_free>
break;
801091e: e00d b.n 801093c <tcpip_thread_handle_msg+0x74>
case TCPIP_MSG_CALLBACK_STATIC:
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK_STATIC %p\n", (void *)msg));
msg->msg.cb.function(msg->msg.cb.ctx);
8010920: 687b ldr r3, [r7, #4]
8010922: 685b ldr r3, [r3, #4]
8010924: 687a ldr r2, [r7, #4]
8010926: 6892 ldr r2, [r2, #8]
8010928: 4610 mov r0, r2
801092a: 4798 blx r3
break;
801092c: e006 b.n 801093c <tcpip_thread_handle_msg+0x74>
default:
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type));
LWIP_ASSERT("tcpip_thread: invalid message", 0);
801092e: 4b05 ldr r3, [pc, #20] ; (8010944 <tcpip_thread_handle_msg+0x7c>)
8010930: 22cf movs r2, #207 ; 0xcf
8010932: 4905 ldr r1, [pc, #20] ; (8010948 <tcpip_thread_handle_msg+0x80>)
8010934: 4805 ldr r0, [pc, #20] ; (801094c <tcpip_thread_handle_msg+0x84>)
8010936: f00c f9df bl 801ccf8 <iprintf>
break;
801093a: bf00 nop
}
}
801093c: bf00 nop
801093e: 3708 adds r7, #8
8010940: 46bd mov sp, r7
8010942: bd80 pop {r7, pc}
8010944: 0801e014 .word 0x0801e014
8010948: 0801e044 .word 0x0801e044
801094c: 0801e064 .word 0x0801e064
08010950 <tcpip_inpkt>:
* @param inp the network interface on which the packet was received
* @param input_fn input function to call
*/
err_t
tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn)
{
8010950: b580 push {r7, lr}
8010952: b086 sub sp, #24
8010954: af00 add r7, sp, #0
8010956: 60f8 str r0, [r7, #12]
8010958: 60b9 str r1, [r7, #8]
801095a: 607a str r2, [r7, #4]
UNLOCK_TCPIP_CORE();
return ret;
#else /* LWIP_TCPIP_CORE_LOCKING_INPUT */
struct tcpip_msg *msg;
LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
801095c: 481a ldr r0, [pc, #104] ; (80109c8 <tcpip_inpkt+0x78>)
801095e: f00c f8d0 bl 801cb02 <sys_mbox_valid>
8010962: 4603 mov r3, r0
8010964: 2b00 cmp r3, #0
8010966: d105 bne.n 8010974 <tcpip_inpkt+0x24>
8010968: 4b18 ldr r3, [pc, #96] ; (80109cc <tcpip_inpkt+0x7c>)
801096a: 22fc movs r2, #252 ; 0xfc
801096c: 4918 ldr r1, [pc, #96] ; (80109d0 <tcpip_inpkt+0x80>)
801096e: 4819 ldr r0, [pc, #100] ; (80109d4 <tcpip_inpkt+0x84>)
8010970: f00c f9c2 bl 801ccf8 <iprintf>
msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT);
8010974: 2009 movs r0, #9
8010976: f000 fd91 bl 801149c <memp_malloc>
801097a: 6178 str r0, [r7, #20]
if (msg == NULL) {
801097c: 697b ldr r3, [r7, #20]
801097e: 2b00 cmp r3, #0
8010980: d102 bne.n 8010988 <tcpip_inpkt+0x38>
return ERR_MEM;
8010982: f04f 33ff mov.w r3, #4294967295
8010986: e01a b.n 80109be <tcpip_inpkt+0x6e>
}
msg->type = TCPIP_MSG_INPKT;
8010988: 697b ldr r3, [r7, #20]
801098a: 2200 movs r2, #0
801098c: 701a strb r2, [r3, #0]
msg->msg.inp.p = p;
801098e: 697b ldr r3, [r7, #20]
8010990: 68fa ldr r2, [r7, #12]
8010992: 605a str r2, [r3, #4]
msg->msg.inp.netif = inp;
8010994: 697b ldr r3, [r7, #20]
8010996: 68ba ldr r2, [r7, #8]
8010998: 609a str r2, [r3, #8]
msg->msg.inp.input_fn = input_fn;
801099a: 697b ldr r3, [r7, #20]
801099c: 687a ldr r2, [r7, #4]
801099e: 60da str r2, [r3, #12]
if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) {
80109a0: 6979 ldr r1, [r7, #20]
80109a2: 4809 ldr r0, [pc, #36] ; (80109c8 <tcpip_inpkt+0x78>)
80109a4: f00c f854 bl 801ca50 <sys_mbox_trypost>
80109a8: 4603 mov r3, r0
80109aa: 2b00 cmp r3, #0
80109ac: d006 beq.n 80109bc <tcpip_inpkt+0x6c>
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
80109ae: 6979 ldr r1, [r7, #20]
80109b0: 2009 movs r0, #9
80109b2: f000 fdc5 bl 8011540 <memp_free>
return ERR_MEM;
80109b6: f04f 33ff mov.w r3, #4294967295
80109ba: e000 b.n 80109be <tcpip_inpkt+0x6e>
}
return ERR_OK;
80109bc: 2300 movs r3, #0
#endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */
}
80109be: 4618 mov r0, r3
80109c0: 3718 adds r7, #24
80109c2: 46bd mov sp, r7
80109c4: bd80 pop {r7, pc}
80109c6: bf00 nop
80109c8: 200086e0 .word 0x200086e0
80109cc: 0801e014 .word 0x0801e014
80109d0: 0801e08c .word 0x0801e08c
80109d4: 0801e064 .word 0x0801e064
080109d8 <tcpip_input>:
* NETIF_FLAG_ETHERNET flags)
* @param inp the network interface on which the packet was received
*/
err_t
tcpip_input(struct pbuf *p, struct netif *inp)
{
80109d8: b580 push {r7, lr}
80109da: b082 sub sp, #8
80109dc: af00 add r7, sp, #0
80109de: 6078 str r0, [r7, #4]
80109e0: 6039 str r1, [r7, #0]
#if LWIP_ETHERNET
if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) {
80109e2: 683b ldr r3, [r7, #0]
80109e4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80109e8: f003 0318 and.w r3, r3, #24
80109ec: 2b00 cmp r3, #0
80109ee: d006 beq.n 80109fe <tcpip_input+0x26>
return tcpip_inpkt(p, inp, ethernet_input);
80109f0: 4a08 ldr r2, [pc, #32] ; (8010a14 <tcpip_input+0x3c>)
80109f2: 6839 ldr r1, [r7, #0]
80109f4: 6878 ldr r0, [r7, #4]
80109f6: f7ff ffab bl 8010950 <tcpip_inpkt>
80109fa: 4603 mov r3, r0
80109fc: e005 b.n 8010a0a <tcpip_input+0x32>
} else
#endif /* LWIP_ETHERNET */
return tcpip_inpkt(p, inp, ip_input);
80109fe: 4a06 ldr r2, [pc, #24] ; (8010a18 <tcpip_input+0x40>)
8010a00: 6839 ldr r1, [r7, #0]
8010a02: 6878 ldr r0, [r7, #4]
8010a04: f7ff ffa4 bl 8010950 <tcpip_inpkt>
8010a08: 4603 mov r3, r0
}
8010a0a: 4618 mov r0, r3
8010a0c: 3708 adds r7, #8
8010a0e: 46bd mov sp, r7
8010a10: bd80 pop {r7, pc}
8010a12: bf00 nop
8010a14: 0801c861 .word 0x0801c861
8010a18: 0801b745 .word 0x0801b745
08010a1c <tcpip_try_callback>:
*
* @see tcpip_callback
*/
err_t
tcpip_try_callback(tcpip_callback_fn function, void *ctx)
{
8010a1c: b580 push {r7, lr}
8010a1e: b084 sub sp, #16
8010a20: af00 add r7, sp, #0
8010a22: 6078 str r0, [r7, #4]
8010a24: 6039 str r1, [r7, #0]
struct tcpip_msg *msg;
LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
8010a26: 4819 ldr r0, [pc, #100] ; (8010a8c <tcpip_try_callback+0x70>)
8010a28: f00c f86b bl 801cb02 <sys_mbox_valid>
8010a2c: 4603 mov r3, r0
8010a2e: 2b00 cmp r3, #0
8010a30: d106 bne.n 8010a40 <tcpip_try_callback+0x24>
8010a32: 4b17 ldr r3, [pc, #92] ; (8010a90 <tcpip_try_callback+0x74>)
8010a34: f240 125d movw r2, #349 ; 0x15d
8010a38: 4916 ldr r1, [pc, #88] ; (8010a94 <tcpip_try_callback+0x78>)
8010a3a: 4817 ldr r0, [pc, #92] ; (8010a98 <tcpip_try_callback+0x7c>)
8010a3c: f00c f95c bl 801ccf8 <iprintf>
msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API);
8010a40: 2008 movs r0, #8
8010a42: f000 fd2b bl 801149c <memp_malloc>
8010a46: 60f8 str r0, [r7, #12]
if (msg == NULL) {
8010a48: 68fb ldr r3, [r7, #12]
8010a4a: 2b00 cmp r3, #0
8010a4c: d102 bne.n 8010a54 <tcpip_try_callback+0x38>
return ERR_MEM;
8010a4e: f04f 33ff mov.w r3, #4294967295
8010a52: e017 b.n 8010a84 <tcpip_try_callback+0x68>
}
msg->type = TCPIP_MSG_CALLBACK;
8010a54: 68fb ldr r3, [r7, #12]
8010a56: 2201 movs r2, #1
8010a58: 701a strb r2, [r3, #0]
msg->msg.cb.function = function;
8010a5a: 68fb ldr r3, [r7, #12]
8010a5c: 687a ldr r2, [r7, #4]
8010a5e: 605a str r2, [r3, #4]
msg->msg.cb.ctx = ctx;
8010a60: 68fb ldr r3, [r7, #12]
8010a62: 683a ldr r2, [r7, #0]
8010a64: 609a str r2, [r3, #8]
if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) {
8010a66: 68f9 ldr r1, [r7, #12]
8010a68: 4808 ldr r0, [pc, #32] ; (8010a8c <tcpip_try_callback+0x70>)
8010a6a: f00b fff1 bl 801ca50 <sys_mbox_trypost>
8010a6e: 4603 mov r3, r0
8010a70: 2b00 cmp r3, #0
8010a72: d006 beq.n 8010a82 <tcpip_try_callback+0x66>
memp_free(MEMP_TCPIP_MSG_API, msg);
8010a74: 68f9 ldr r1, [r7, #12]
8010a76: 2008 movs r0, #8
8010a78: f000 fd62 bl 8011540 <memp_free>
return ERR_MEM;
8010a7c: f04f 33ff mov.w r3, #4294967295
8010a80: e000 b.n 8010a84 <tcpip_try_callback+0x68>
}
return ERR_OK;
8010a82: 2300 movs r3, #0
}
8010a84: 4618 mov r0, r3
8010a86: 3710 adds r7, #16
8010a88: 46bd mov sp, r7
8010a8a: bd80 pop {r7, pc}
8010a8c: 200086e0 .word 0x200086e0
8010a90: 0801e014 .word 0x0801e014
8010a94: 0801e08c .word 0x0801e08c
8010a98: 0801e064 .word 0x0801e064
08010a9c <tcpip_init>:
* @param initfunc a function to call when tcpip_thread is running and finished initializing
* @param arg argument to pass to initfunc
*/
void
tcpip_init(tcpip_init_done_fn initfunc, void *arg)
{
8010a9c: b580 push {r7, lr}
8010a9e: b084 sub sp, #16
8010aa0: af02 add r7, sp, #8
8010aa2: 6078 str r0, [r7, #4]
8010aa4: 6039 str r1, [r7, #0]
lwip_init();
8010aa6: f000 f871 bl 8010b8c <lwip_init>
tcpip_init_done = initfunc;
8010aaa: 4a17 ldr r2, [pc, #92] ; (8010b08 <tcpip_init+0x6c>)
8010aac: 687b ldr r3, [r7, #4]
8010aae: 6013 str r3, [r2, #0]
tcpip_init_done_arg = arg;
8010ab0: 4a16 ldr r2, [pc, #88] ; (8010b0c <tcpip_init+0x70>)
8010ab2: 683b ldr r3, [r7, #0]
8010ab4: 6013 str r3, [r2, #0]
if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) {
8010ab6: 2106 movs r1, #6
8010ab8: 4815 ldr r0, [pc, #84] ; (8010b10 <tcpip_init+0x74>)
8010aba: f00b ffa7 bl 801ca0c <sys_mbox_new>
8010abe: 4603 mov r3, r0
8010ac0: 2b00 cmp r3, #0
8010ac2: d006 beq.n 8010ad2 <tcpip_init+0x36>
LWIP_ASSERT("failed to create tcpip_thread mbox", 0);
8010ac4: 4b13 ldr r3, [pc, #76] ; (8010b14 <tcpip_init+0x78>)
8010ac6: f240 2261 movw r2, #609 ; 0x261
8010aca: 4913 ldr r1, [pc, #76] ; (8010b18 <tcpip_init+0x7c>)
8010acc: 4813 ldr r0, [pc, #76] ; (8010b1c <tcpip_init+0x80>)
8010ace: f00c f913 bl 801ccf8 <iprintf>
}
#if LWIP_TCPIP_CORE_LOCKING
if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) {
8010ad2: 4813 ldr r0, [pc, #76] ; (8010b20 <tcpip_init+0x84>)
8010ad4: f00c f834 bl 801cb40 <sys_mutex_new>
8010ad8: 4603 mov r3, r0
8010ada: 2b00 cmp r3, #0
8010adc: d006 beq.n 8010aec <tcpip_init+0x50>
LWIP_ASSERT("failed to create lock_tcpip_core", 0);
8010ade: 4b0d ldr r3, [pc, #52] ; (8010b14 <tcpip_init+0x78>)
8010ae0: f240 2265 movw r2, #613 ; 0x265
8010ae4: 490f ldr r1, [pc, #60] ; (8010b24 <tcpip_init+0x88>)
8010ae6: 480d ldr r0, [pc, #52] ; (8010b1c <tcpip_init+0x80>)
8010ae8: f00c f906 bl 801ccf8 <iprintf>
}
#endif /* LWIP_TCPIP_CORE_LOCKING */
sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);
8010aec: 2300 movs r3, #0
8010aee: 9300 str r3, [sp, #0]
8010af0: f44f 6380 mov.w r3, #1024 ; 0x400
8010af4: 2200 movs r2, #0
8010af6: 490c ldr r1, [pc, #48] ; (8010b28 <tcpip_init+0x8c>)
8010af8: 480c ldr r0, [pc, #48] ; (8010b2c <tcpip_init+0x90>)
8010afa: f00c f859 bl 801cbb0 <sys_thread_new>
}
8010afe: bf00 nop
8010b00: 3708 adds r7, #8
8010b02: 46bd mov sp, r7
8010b04: bd80 pop {r7, pc}
8010b06: bf00 nop
8010b08: 200086d8 .word 0x200086d8
8010b0c: 200086dc .word 0x200086dc
8010b10: 200086e0 .word 0x200086e0
8010b14: 0801e014 .word 0x0801e014
8010b18: 0801e09c .word 0x0801e09c
8010b1c: 0801e064 .word 0x0801e064
8010b20: 2000c0c4 .word 0x2000c0c4
8010b24: 0801e0c0 .word 0x0801e0c0
8010b28: 08010861 .word 0x08010861
8010b2c: 0801e0e4 .word 0x0801e0e4
08010b30 <lwip_htons>:
* @param n u16_t in host byte order
* @return n in network byte order
*/
u16_t
lwip_htons(u16_t n)
{
8010b30: b480 push {r7}
8010b32: b083 sub sp, #12
8010b34: af00 add r7, sp, #0
8010b36: 4603 mov r3, r0
8010b38: 80fb strh r3, [r7, #6]
return PP_HTONS(n);
8010b3a: 88fb ldrh r3, [r7, #6]
8010b3c: 021b lsls r3, r3, #8
8010b3e: b21a sxth r2, r3
8010b40: 88fb ldrh r3, [r7, #6]
8010b42: 0a1b lsrs r3, r3, #8
8010b44: b29b uxth r3, r3
8010b46: b21b sxth r3, r3
8010b48: 4313 orrs r3, r2
8010b4a: b21b sxth r3, r3
8010b4c: b29b uxth r3, r3
}
8010b4e: 4618 mov r0, r3
8010b50: 370c adds r7, #12
8010b52: 46bd mov sp, r7
8010b54: f85d 7b04 ldr.w r7, [sp], #4
8010b58: 4770 bx lr
08010b5a <lwip_htonl>:
* @param n u32_t in host byte order
* @return n in network byte order
*/
u32_t
lwip_htonl(u32_t n)
{
8010b5a: b480 push {r7}
8010b5c: b083 sub sp, #12
8010b5e: af00 add r7, sp, #0
8010b60: 6078 str r0, [r7, #4]
return PP_HTONL(n);
8010b62: 687b ldr r3, [r7, #4]
8010b64: 061a lsls r2, r3, #24
8010b66: 687b ldr r3, [r7, #4]
8010b68: 021b lsls r3, r3, #8
8010b6a: f403 037f and.w r3, r3, #16711680 ; 0xff0000
8010b6e: 431a orrs r2, r3
8010b70: 687b ldr r3, [r7, #4]
8010b72: 0a1b lsrs r3, r3, #8
8010b74: f403 437f and.w r3, r3, #65280 ; 0xff00
8010b78: 431a orrs r2, r3
8010b7a: 687b ldr r3, [r7, #4]
8010b7c: 0e1b lsrs r3, r3, #24
8010b7e: 4313 orrs r3, r2
}
8010b80: 4618 mov r0, r3
8010b82: 370c adds r7, #12
8010b84: 46bd mov sp, r7
8010b86: f85d 7b04 ldr.w r7, [sp], #4
8010b8a: 4770 bx lr
08010b8c <lwip_init>:
* Initialize all modules.
* Use this in NO_SYS mode. Use tcpip_init() otherwise.
*/
void
lwip_init(void)
{
8010b8c: b580 push {r7, lr}
8010b8e: b082 sub sp, #8
8010b90: af00 add r7, sp, #0
#ifndef LWIP_SKIP_CONST_CHECK
int a = 0;
8010b92: 2300 movs r3, #0
8010b94: 607b str r3, [r7, #4]
#endif
/* Modules initialization */
stats_init();
#if !NO_SYS
sys_init();
8010b96: f00b ffc5 bl 801cb24 <sys_init>
#endif /* !NO_SYS */
mem_init();
8010b9a: f000 f8d5 bl 8010d48 <mem_init>
memp_init();
8010b9e: f000 fc31 bl 8011404 <memp_init>
pbuf_init();
netif_init();
8010ba2: f000 fcf7 bl 8011594 <netif_init>
#endif /* LWIP_IPV4 */
#if LWIP_RAW
raw_init();
#endif /* LWIP_RAW */
#if LWIP_UDP
udp_init();
8010ba6: f007 f8f5 bl 8017d94 <udp_init>
#endif /* LWIP_UDP */
#if LWIP_TCP
tcp_init();
8010baa: f001 fe1f bl 80127ec <tcp_init>
#if PPP_SUPPORT
ppp_init();
#endif
#if LWIP_TIMERS
sys_timeouts_init();
8010bae: f007 f839 bl 8017c24 <sys_timeouts_init>
#endif /* LWIP_TIMERS */
}
8010bb2: bf00 nop
8010bb4: 3708 adds r7, #8
8010bb6: 46bd mov sp, r7
8010bb8: bd80 pop {r7, pc}
...
08010bbc <ptr_to_mem>:
#define mem_overflow_check_element(mem)
#endif /* MEM_OVERFLOW_CHECK */
static struct mem *
ptr_to_mem(mem_size_t ptr)
{
8010bbc: b480 push {r7}
8010bbe: b083 sub sp, #12
8010bc0: af00 add r7, sp, #0
8010bc2: 4603 mov r3, r0
8010bc4: 80fb strh r3, [r7, #6]
return (struct mem *)(void *)&ram[ptr];
8010bc6: 4b05 ldr r3, [pc, #20] ; (8010bdc <ptr_to_mem+0x20>)
8010bc8: 681a ldr r2, [r3, #0]
8010bca: 88fb ldrh r3, [r7, #6]
8010bcc: 4413 add r3, r2
}
8010bce: 4618 mov r0, r3
8010bd0: 370c adds r7, #12
8010bd2: 46bd mov sp, r7
8010bd4: f85d 7b04 ldr.w r7, [sp], #4
8010bd8: 4770 bx lr
8010bda: bf00 nop
8010bdc: 200086e4 .word 0x200086e4
08010be0 <mem_to_ptr>:
static mem_size_t
mem_to_ptr(void *mem)
{
8010be0: b480 push {r7}
8010be2: b083 sub sp, #12
8010be4: af00 add r7, sp, #0
8010be6: 6078 str r0, [r7, #4]
return (mem_size_t)((u8_t *)mem - ram);
8010be8: 687b ldr r3, [r7, #4]
8010bea: 4a05 ldr r2, [pc, #20] ; (8010c00 <mem_to_ptr+0x20>)
8010bec: 6812 ldr r2, [r2, #0]
8010bee: 1a9b subs r3, r3, r2
8010bf0: b29b uxth r3, r3
}
8010bf2: 4618 mov r0, r3
8010bf4: 370c adds r7, #12
8010bf6: 46bd mov sp, r7
8010bf8: f85d 7b04 ldr.w r7, [sp], #4
8010bfc: 4770 bx lr
8010bfe: bf00 nop
8010c00: 200086e4 .word 0x200086e4
08010c04 <plug_holes>:
* This assumes access to the heap is protected by the calling function
* already.
*/
static void
plug_holes(struct mem *mem)
{
8010c04: b590 push {r4, r7, lr}
8010c06: b085 sub sp, #20
8010c08: af00 add r7, sp, #0
8010c0a: 6078 str r0, [r7, #4]
struct mem *nmem;
struct mem *pmem;
LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
8010c0c: 4b45 ldr r3, [pc, #276] ; (8010d24 <plug_holes+0x120>)
8010c0e: 681b ldr r3, [r3, #0]
8010c10: 687a ldr r2, [r7, #4]
8010c12: 429a cmp r2, r3
8010c14: d206 bcs.n 8010c24 <plug_holes+0x20>
8010c16: 4b44 ldr r3, [pc, #272] ; (8010d28 <plug_holes+0x124>)
8010c18: f240 12df movw r2, #479 ; 0x1df
8010c1c: 4943 ldr r1, [pc, #268] ; (8010d2c <plug_holes+0x128>)
8010c1e: 4844 ldr r0, [pc, #272] ; (8010d30 <plug_holes+0x12c>)
8010c20: f00c f86a bl 801ccf8 <iprintf>
LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
8010c24: 4b43 ldr r3, [pc, #268] ; (8010d34 <plug_holes+0x130>)
8010c26: 681b ldr r3, [r3, #0]
8010c28: 687a ldr r2, [r7, #4]
8010c2a: 429a cmp r2, r3
8010c2c: d306 bcc.n 8010c3c <plug_holes+0x38>
8010c2e: 4b3e ldr r3, [pc, #248] ; (8010d28 <plug_holes+0x124>)
8010c30: f44f 72f0 mov.w r2, #480 ; 0x1e0
8010c34: 4940 ldr r1, [pc, #256] ; (8010d38 <plug_holes+0x134>)
8010c36: 483e ldr r0, [pc, #248] ; (8010d30 <plug_holes+0x12c>)
8010c38: f00c f85e bl 801ccf8 <iprintf>
LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
8010c3c: 687b ldr r3, [r7, #4]
8010c3e: 791b ldrb r3, [r3, #4]
8010c40: 2b00 cmp r3, #0
8010c42: d006 beq.n 8010c52 <plug_holes+0x4e>
8010c44: 4b38 ldr r3, [pc, #224] ; (8010d28 <plug_holes+0x124>)
8010c46: f240 12e1 movw r2, #481 ; 0x1e1
8010c4a: 493c ldr r1, [pc, #240] ; (8010d3c <plug_holes+0x138>)
8010c4c: 4838 ldr r0, [pc, #224] ; (8010d30 <plug_holes+0x12c>)
8010c4e: f00c f853 bl 801ccf8 <iprintf>
/* plug hole forward */
LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
8010c52: 687b ldr r3, [r7, #4]
8010c54: 881b ldrh r3, [r3, #0]
8010c56: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010c5a: d906 bls.n 8010c6a <plug_holes+0x66>
8010c5c: 4b32 ldr r3, [pc, #200] ; (8010d28 <plug_holes+0x124>)
8010c5e: f44f 72f2 mov.w r2, #484 ; 0x1e4
8010c62: 4937 ldr r1, [pc, #220] ; (8010d40 <plug_holes+0x13c>)
8010c64: 4832 ldr r0, [pc, #200] ; (8010d30 <plug_holes+0x12c>)
8010c66: f00c f847 bl 801ccf8 <iprintf>
nmem = ptr_to_mem(mem->next);
8010c6a: 687b ldr r3, [r7, #4]
8010c6c: 881b ldrh r3, [r3, #0]
8010c6e: 4618 mov r0, r3
8010c70: f7ff ffa4 bl 8010bbc <ptr_to_mem>
8010c74: 60f8 str r0, [r7, #12]
if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) {
8010c76: 687a ldr r2, [r7, #4]
8010c78: 68fb ldr r3, [r7, #12]
8010c7a: 429a cmp r2, r3
8010c7c: d024 beq.n 8010cc8 <plug_holes+0xc4>
8010c7e: 68fb ldr r3, [r7, #12]
8010c80: 791b ldrb r3, [r3, #4]
8010c82: 2b00 cmp r3, #0
8010c84: d120 bne.n 8010cc8 <plug_holes+0xc4>
8010c86: 4b2b ldr r3, [pc, #172] ; (8010d34 <plug_holes+0x130>)
8010c88: 681b ldr r3, [r3, #0]
8010c8a: 68fa ldr r2, [r7, #12]
8010c8c: 429a cmp r2, r3
8010c8e: d01b beq.n 8010cc8 <plug_holes+0xc4>
/* if mem->next is unused and not end of ram, combine mem and mem->next */
if (lfree == nmem) {
8010c90: 4b2c ldr r3, [pc, #176] ; (8010d44 <plug_holes+0x140>)
8010c92: 681b ldr r3, [r3, #0]
8010c94: 68fa ldr r2, [r7, #12]
8010c96: 429a cmp r2, r3
8010c98: d102 bne.n 8010ca0 <plug_holes+0x9c>
lfree = mem;
8010c9a: 4a2a ldr r2, [pc, #168] ; (8010d44 <plug_holes+0x140>)
8010c9c: 687b ldr r3, [r7, #4]
8010c9e: 6013 str r3, [r2, #0]
}
mem->next = nmem->next;
8010ca0: 68fb ldr r3, [r7, #12]
8010ca2: 881a ldrh r2, [r3, #0]
8010ca4: 687b ldr r3, [r7, #4]
8010ca6: 801a strh r2, [r3, #0]
if (nmem->next != MEM_SIZE_ALIGNED) {
8010ca8: 68fb ldr r3, [r7, #12]
8010caa: 881b ldrh r3, [r3, #0]
8010cac: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010cb0: d00a beq.n 8010cc8 <plug_holes+0xc4>
ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem);
8010cb2: 68fb ldr r3, [r7, #12]
8010cb4: 881b ldrh r3, [r3, #0]
8010cb6: 4618 mov r0, r3
8010cb8: f7ff ff80 bl 8010bbc <ptr_to_mem>
8010cbc: 4604 mov r4, r0
8010cbe: 6878 ldr r0, [r7, #4]
8010cc0: f7ff ff8e bl 8010be0 <mem_to_ptr>
8010cc4: 4603 mov r3, r0
8010cc6: 8063 strh r3, [r4, #2]
}
}
/* plug hole backward */
pmem = ptr_to_mem(mem->prev);
8010cc8: 687b ldr r3, [r7, #4]
8010cca: 885b ldrh r3, [r3, #2]
8010ccc: 4618 mov r0, r3
8010cce: f7ff ff75 bl 8010bbc <ptr_to_mem>
8010cd2: 60b8 str r0, [r7, #8]
if (pmem != mem && pmem->used == 0) {
8010cd4: 68ba ldr r2, [r7, #8]
8010cd6: 687b ldr r3, [r7, #4]
8010cd8: 429a cmp r2, r3
8010cda: d01f beq.n 8010d1c <plug_holes+0x118>
8010cdc: 68bb ldr r3, [r7, #8]
8010cde: 791b ldrb r3, [r3, #4]
8010ce0: 2b00 cmp r3, #0
8010ce2: d11b bne.n 8010d1c <plug_holes+0x118>
/* if mem->prev is unused, combine mem and mem->prev */
if (lfree == mem) {
8010ce4: 4b17 ldr r3, [pc, #92] ; (8010d44 <plug_holes+0x140>)
8010ce6: 681b ldr r3, [r3, #0]
8010ce8: 687a ldr r2, [r7, #4]
8010cea: 429a cmp r2, r3
8010cec: d102 bne.n 8010cf4 <plug_holes+0xf0>
lfree = pmem;
8010cee: 4a15 ldr r2, [pc, #84] ; (8010d44 <plug_holes+0x140>)
8010cf0: 68bb ldr r3, [r7, #8]
8010cf2: 6013 str r3, [r2, #0]
}
pmem->next = mem->next;
8010cf4: 687b ldr r3, [r7, #4]
8010cf6: 881a ldrh r2, [r3, #0]
8010cf8: 68bb ldr r3, [r7, #8]
8010cfa: 801a strh r2, [r3, #0]
if (mem->next != MEM_SIZE_ALIGNED) {
8010cfc: 687b ldr r3, [r7, #4]
8010cfe: 881b ldrh r3, [r3, #0]
8010d00: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010d04: d00a beq.n 8010d1c <plug_holes+0x118>
ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem);
8010d06: 687b ldr r3, [r7, #4]
8010d08: 881b ldrh r3, [r3, #0]
8010d0a: 4618 mov r0, r3
8010d0c: f7ff ff56 bl 8010bbc <ptr_to_mem>
8010d10: 4604 mov r4, r0
8010d12: 68b8 ldr r0, [r7, #8]
8010d14: f7ff ff64 bl 8010be0 <mem_to_ptr>
8010d18: 4603 mov r3, r0
8010d1a: 8063 strh r3, [r4, #2]
}
}
}
8010d1c: bf00 nop
8010d1e: 3714 adds r7, #20
8010d20: 46bd mov sp, r7
8010d22: bd90 pop {r4, r7, pc}
8010d24: 200086e4 .word 0x200086e4
8010d28: 0801e0f4 .word 0x0801e0f4
8010d2c: 0801e124 .word 0x0801e124
8010d30: 0801e13c .word 0x0801e13c
8010d34: 200086e8 .word 0x200086e8
8010d38: 0801e164 .word 0x0801e164
8010d3c: 0801e180 .word 0x0801e180
8010d40: 0801e19c .word 0x0801e19c
8010d44: 200086f0 .word 0x200086f0
08010d48 <mem_init>:
/**
* Zero the heap and initialize start, end and lowest-free
*/
void
mem_init(void)
{
8010d48: b580 push {r7, lr}
8010d4a: b082 sub sp, #8
8010d4c: af00 add r7, sp, #0
LWIP_ASSERT("Sanity check alignment",
(SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT - 1)) == 0);
/* align the heap */
ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER);
8010d4e: 4b1f ldr r3, [pc, #124] ; (8010dcc <mem_init+0x84>)
8010d50: 3303 adds r3, #3
8010d52: f023 0303 bic.w r3, r3, #3
8010d56: 461a mov r2, r3
8010d58: 4b1d ldr r3, [pc, #116] ; (8010dd0 <mem_init+0x88>)
8010d5a: 601a str r2, [r3, #0]
/* initialize the start of the heap */
mem = (struct mem *)(void *)ram;
8010d5c: 4b1c ldr r3, [pc, #112] ; (8010dd0 <mem_init+0x88>)
8010d5e: 681b ldr r3, [r3, #0]
8010d60: 607b str r3, [r7, #4]
mem->next = MEM_SIZE_ALIGNED;
8010d62: 687b ldr r3, [r7, #4]
8010d64: f44f 62c8 mov.w r2, #1600 ; 0x640
8010d68: 801a strh r2, [r3, #0]
mem->prev = 0;
8010d6a: 687b ldr r3, [r7, #4]
8010d6c: 2200 movs r2, #0
8010d6e: 805a strh r2, [r3, #2]
mem->used = 0;
8010d70: 687b ldr r3, [r7, #4]
8010d72: 2200 movs r2, #0
8010d74: 711a strb r2, [r3, #4]
/* initialize the end of the heap */
ram_end = ptr_to_mem(MEM_SIZE_ALIGNED);
8010d76: f44f 60c8 mov.w r0, #1600 ; 0x640
8010d7a: f7ff ff1f bl 8010bbc <ptr_to_mem>
8010d7e: 4602 mov r2, r0
8010d80: 4b14 ldr r3, [pc, #80] ; (8010dd4 <mem_init+0x8c>)
8010d82: 601a str r2, [r3, #0]
ram_end->used = 1;
8010d84: 4b13 ldr r3, [pc, #76] ; (8010dd4 <mem_init+0x8c>)
8010d86: 681b ldr r3, [r3, #0]
8010d88: 2201 movs r2, #1
8010d8a: 711a strb r2, [r3, #4]
ram_end->next = MEM_SIZE_ALIGNED;
8010d8c: 4b11 ldr r3, [pc, #68] ; (8010dd4 <mem_init+0x8c>)
8010d8e: 681b ldr r3, [r3, #0]
8010d90: f44f 62c8 mov.w r2, #1600 ; 0x640
8010d94: 801a strh r2, [r3, #0]
ram_end->prev = MEM_SIZE_ALIGNED;
8010d96: 4b0f ldr r3, [pc, #60] ; (8010dd4 <mem_init+0x8c>)
8010d98: 681b ldr r3, [r3, #0]
8010d9a: f44f 62c8 mov.w r2, #1600 ; 0x640
8010d9e: 805a strh r2, [r3, #2]
MEM_SANITY();
/* initialize the lowest-free pointer to the start of the heap */
lfree = (struct mem *)(void *)ram;
8010da0: 4b0b ldr r3, [pc, #44] ; (8010dd0 <mem_init+0x88>)
8010da2: 681b ldr r3, [r3, #0]
8010da4: 4a0c ldr r2, [pc, #48] ; (8010dd8 <mem_init+0x90>)
8010da6: 6013 str r3, [r2, #0]
MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED);
if (sys_mutex_new(&mem_mutex) != ERR_OK) {
8010da8: 480c ldr r0, [pc, #48] ; (8010ddc <mem_init+0x94>)
8010daa: f00b fec9 bl 801cb40 <sys_mutex_new>
8010dae: 4603 mov r3, r0
8010db0: 2b00 cmp r3, #0
8010db2: d006 beq.n 8010dc2 <mem_init+0x7a>
LWIP_ASSERT("failed to create mem_mutex", 0);
8010db4: 4b0a ldr r3, [pc, #40] ; (8010de0 <mem_init+0x98>)
8010db6: f240 221f movw r2, #543 ; 0x21f
8010dba: 490a ldr r1, [pc, #40] ; (8010de4 <mem_init+0x9c>)
8010dbc: 480a ldr r0, [pc, #40] ; (8010de8 <mem_init+0xa0>)
8010dbe: f00b ff9b bl 801ccf8 <iprintf>
}
}
8010dc2: bf00 nop
8010dc4: 3708 adds r7, #8
8010dc6: 46bd mov sp, r7
8010dc8: bd80 pop {r7, pc}
8010dca: bf00 nop
8010dcc: 2000c0e0 .word 0x2000c0e0
8010dd0: 200086e4 .word 0x200086e4
8010dd4: 200086e8 .word 0x200086e8
8010dd8: 200086f0 .word 0x200086f0
8010ddc: 200086ec .word 0x200086ec
8010de0: 0801e0f4 .word 0x0801e0f4
8010de4: 0801e1c8 .word 0x0801e1c8
8010de8: 0801e13c .word 0x0801e13c
08010dec <mem_link_valid>:
/* Check if a struct mem is correctly linked.
* If not, double-free is a possible reason.
*/
static int
mem_link_valid(struct mem *mem)
{
8010dec: b580 push {r7, lr}
8010dee: b086 sub sp, #24
8010df0: af00 add r7, sp, #0
8010df2: 6078 str r0, [r7, #4]
struct mem *nmem, *pmem;
mem_size_t rmem_idx;
rmem_idx = mem_to_ptr(mem);
8010df4: 6878 ldr r0, [r7, #4]
8010df6: f7ff fef3 bl 8010be0 <mem_to_ptr>
8010dfa: 4603 mov r3, r0
8010dfc: 82fb strh r3, [r7, #22]
nmem = ptr_to_mem(mem->next);
8010dfe: 687b ldr r3, [r7, #4]
8010e00: 881b ldrh r3, [r3, #0]
8010e02: 4618 mov r0, r3
8010e04: f7ff feda bl 8010bbc <ptr_to_mem>
8010e08: 6138 str r0, [r7, #16]
pmem = ptr_to_mem(mem->prev);
8010e0a: 687b ldr r3, [r7, #4]
8010e0c: 885b ldrh r3, [r3, #2]
8010e0e: 4618 mov r0, r3
8010e10: f7ff fed4 bl 8010bbc <ptr_to_mem>
8010e14: 60f8 str r0, [r7, #12]
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
8010e16: 687b ldr r3, [r7, #4]
8010e18: 881b ldrh r3, [r3, #0]
8010e1a: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010e1e: d818 bhi.n 8010e52 <mem_link_valid+0x66>
8010e20: 687b ldr r3, [r7, #4]
8010e22: 885b ldrh r3, [r3, #2]
8010e24: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010e28: d813 bhi.n 8010e52 <mem_link_valid+0x66>
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
8010e2a: 687b ldr r3, [r7, #4]
8010e2c: 885b ldrh r3, [r3, #2]
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
8010e2e: 8afa ldrh r2, [r7, #22]
8010e30: 429a cmp r2, r3
8010e32: d004 beq.n 8010e3e <mem_link_valid+0x52>
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
8010e34: 68fb ldr r3, [r7, #12]
8010e36: 881b ldrh r3, [r3, #0]
8010e38: 8afa ldrh r2, [r7, #22]
8010e3a: 429a cmp r2, r3
8010e3c: d109 bne.n 8010e52 <mem_link_valid+0x66>
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
8010e3e: 4b08 ldr r3, [pc, #32] ; (8010e60 <mem_link_valid+0x74>)
8010e40: 681b ldr r3, [r3, #0]
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
8010e42: 693a ldr r2, [r7, #16]
8010e44: 429a cmp r2, r3
8010e46: d006 beq.n 8010e56 <mem_link_valid+0x6a>
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
8010e48: 693b ldr r3, [r7, #16]
8010e4a: 885b ldrh r3, [r3, #2]
8010e4c: 8afa ldrh r2, [r7, #22]
8010e4e: 429a cmp r2, r3
8010e50: d001 beq.n 8010e56 <mem_link_valid+0x6a>
return 0;
8010e52: 2300 movs r3, #0
8010e54: e000 b.n 8010e58 <mem_link_valid+0x6c>
}
return 1;
8010e56: 2301 movs r3, #1
}
8010e58: 4618 mov r0, r3
8010e5a: 3718 adds r7, #24
8010e5c: 46bd mov sp, r7
8010e5e: bd80 pop {r7, pc}
8010e60: 200086e8 .word 0x200086e8
08010e64 <mem_free>:
* @param rmem is the data portion of a struct mem as returned by a previous
* call to mem_malloc()
*/
void
mem_free(void *rmem)
{
8010e64: b580 push {r7, lr}
8010e66: b088 sub sp, #32
8010e68: af00 add r7, sp, #0
8010e6a: 6078 str r0, [r7, #4]
struct mem *mem;
LWIP_MEM_FREE_DECL_PROTECT();
if (rmem == NULL) {
8010e6c: 687b ldr r3, [r7, #4]
8010e6e: 2b00 cmp r3, #0
8010e70: d070 beq.n 8010f54 <mem_free+0xf0>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n"));
return;
}
if ((((mem_ptr_t)rmem) & (MEM_ALIGNMENT - 1)) != 0) {
8010e72: 687b ldr r3, [r7, #4]
8010e74: f003 0303 and.w r3, r3, #3
8010e78: 2b00 cmp r3, #0
8010e7a: d00d beq.n 8010e98 <mem_free+0x34>
LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment");
8010e7c: 4b37 ldr r3, [pc, #220] ; (8010f5c <mem_free+0xf8>)
8010e7e: f240 2273 movw r2, #627 ; 0x273
8010e82: 4937 ldr r1, [pc, #220] ; (8010f60 <mem_free+0xfc>)
8010e84: 4837 ldr r0, [pc, #220] ; (8010f64 <mem_free+0x100>)
8010e86: f00b ff37 bl 801ccf8 <iprintf>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: sanity check alignment\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
8010e8a: f00b feb7 bl 801cbfc <sys_arch_protect>
8010e8e: 60f8 str r0, [r7, #12]
8010e90: 68f8 ldr r0, [r7, #12]
8010e92: f00b fec1 bl 801cc18 <sys_arch_unprotect>
return;
8010e96: e05e b.n 8010f56 <mem_free+0xf2>
}
/* Get the corresponding struct mem: */
/* cast through void* to get rid of alignment warnings */
mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
8010e98: 687b ldr r3, [r7, #4]
8010e9a: 3b08 subs r3, #8
8010e9c: 61fb str r3, [r7, #28]
if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) {
8010e9e: 4b32 ldr r3, [pc, #200] ; (8010f68 <mem_free+0x104>)
8010ea0: 681b ldr r3, [r3, #0]
8010ea2: 69fa ldr r2, [r7, #28]
8010ea4: 429a cmp r2, r3
8010ea6: d306 bcc.n 8010eb6 <mem_free+0x52>
8010ea8: 687b ldr r3, [r7, #4]
8010eaa: f103 020c add.w r2, r3, #12
8010eae: 4b2f ldr r3, [pc, #188] ; (8010f6c <mem_free+0x108>)
8010eb0: 681b ldr r3, [r3, #0]
8010eb2: 429a cmp r2, r3
8010eb4: d90d bls.n 8010ed2 <mem_free+0x6e>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory");
8010eb6: 4b29 ldr r3, [pc, #164] ; (8010f5c <mem_free+0xf8>)
8010eb8: f240 227f movw r2, #639 ; 0x27f
8010ebc: 492c ldr r1, [pc, #176] ; (8010f70 <mem_free+0x10c>)
8010ebe: 4829 ldr r0, [pc, #164] ; (8010f64 <mem_free+0x100>)
8010ec0: f00b ff1a bl 801ccf8 <iprintf>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
8010ec4: f00b fe9a bl 801cbfc <sys_arch_protect>
8010ec8: 6138 str r0, [r7, #16]
8010eca: 6938 ldr r0, [r7, #16]
8010ecc: f00b fea4 bl 801cc18 <sys_arch_unprotect>
return;
8010ed0: e041 b.n 8010f56 <mem_free+0xf2>
}
#if MEM_OVERFLOW_CHECK
mem_overflow_check_element(mem);
#endif
/* protect the heap from concurrent access */
LWIP_MEM_FREE_PROTECT();
8010ed2: 4828 ldr r0, [pc, #160] ; (8010f74 <mem_free+0x110>)
8010ed4: f00b fe50 bl 801cb78 <sys_mutex_lock>
/* mem has to be in a used state */
if (!mem->used) {
8010ed8: 69fb ldr r3, [r7, #28]
8010eda: 791b ldrb r3, [r3, #4]
8010edc: 2b00 cmp r3, #0
8010ede: d110 bne.n 8010f02 <mem_free+0x9e>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free");
8010ee0: 4b1e ldr r3, [pc, #120] ; (8010f5c <mem_free+0xf8>)
8010ee2: f44f 7223 mov.w r2, #652 ; 0x28c
8010ee6: 4924 ldr r1, [pc, #144] ; (8010f78 <mem_free+0x114>)
8010ee8: 481e ldr r0, [pc, #120] ; (8010f64 <mem_free+0x100>)
8010eea: f00b ff05 bl 801ccf8 <iprintf>
LWIP_MEM_FREE_UNPROTECT();
8010eee: 4821 ldr r0, [pc, #132] ; (8010f74 <mem_free+0x110>)
8010ef0: f00b fe51 bl 801cb96 <sys_mutex_unlock>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory: double free?\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
8010ef4: f00b fe82 bl 801cbfc <sys_arch_protect>
8010ef8: 6178 str r0, [r7, #20]
8010efa: 6978 ldr r0, [r7, #20]
8010efc: f00b fe8c bl 801cc18 <sys_arch_unprotect>
return;
8010f00: e029 b.n 8010f56 <mem_free+0xf2>
}
if (!mem_link_valid(mem)) {
8010f02: 69f8 ldr r0, [r7, #28]
8010f04: f7ff ff72 bl 8010dec <mem_link_valid>
8010f08: 4603 mov r3, r0
8010f0a: 2b00 cmp r3, #0
8010f0c: d110 bne.n 8010f30 <mem_free+0xcc>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free");
8010f0e: 4b13 ldr r3, [pc, #76] ; (8010f5c <mem_free+0xf8>)
8010f10: f240 2295 movw r2, #661 ; 0x295
8010f14: 4919 ldr r1, [pc, #100] ; (8010f7c <mem_free+0x118>)
8010f16: 4813 ldr r0, [pc, #76] ; (8010f64 <mem_free+0x100>)
8010f18: f00b feee bl 801ccf8 <iprintf>
LWIP_MEM_FREE_UNPROTECT();
8010f1c: 4815 ldr r0, [pc, #84] ; (8010f74 <mem_free+0x110>)
8010f1e: f00b fe3a bl 801cb96 <sys_mutex_unlock>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory: non-linked: double free?\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
8010f22: f00b fe6b bl 801cbfc <sys_arch_protect>
8010f26: 61b8 str r0, [r7, #24]
8010f28: 69b8 ldr r0, [r7, #24]
8010f2a: f00b fe75 bl 801cc18 <sys_arch_unprotect>
return;
8010f2e: e012 b.n 8010f56 <mem_free+0xf2>
}
/* mem is now unused. */
mem->used = 0;
8010f30: 69fb ldr r3, [r7, #28]
8010f32: 2200 movs r2, #0
8010f34: 711a strb r2, [r3, #4]
if (mem < lfree) {
8010f36: 4b12 ldr r3, [pc, #72] ; (8010f80 <mem_free+0x11c>)
8010f38: 681b ldr r3, [r3, #0]
8010f3a: 69fa ldr r2, [r7, #28]
8010f3c: 429a cmp r2, r3
8010f3e: d202 bcs.n 8010f46 <mem_free+0xe2>
/* the newly freed struct is now the lowest */
lfree = mem;
8010f40: 4a0f ldr r2, [pc, #60] ; (8010f80 <mem_free+0x11c>)
8010f42: 69fb ldr r3, [r7, #28]
8010f44: 6013 str r3, [r2, #0]
}
MEM_STATS_DEC_USED(used, mem->next - (mem_size_t)(((u8_t *)mem - ram)));
/* finally, see if prev or next are free also */
plug_holes(mem);
8010f46: 69f8 ldr r0, [r7, #28]
8010f48: f7ff fe5c bl 8010c04 <plug_holes>
MEM_SANITY();
#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
mem_free_count = 1;
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
LWIP_MEM_FREE_UNPROTECT();
8010f4c: 4809 ldr r0, [pc, #36] ; (8010f74 <mem_free+0x110>)
8010f4e: f00b fe22 bl 801cb96 <sys_mutex_unlock>
8010f52: e000 b.n 8010f56 <mem_free+0xf2>
return;
8010f54: bf00 nop
}
8010f56: 3720 adds r7, #32
8010f58: 46bd mov sp, r7
8010f5a: bd80 pop {r7, pc}
8010f5c: 0801e0f4 .word 0x0801e0f4
8010f60: 0801e1e4 .word 0x0801e1e4
8010f64: 0801e13c .word 0x0801e13c
8010f68: 200086e4 .word 0x200086e4
8010f6c: 200086e8 .word 0x200086e8
8010f70: 0801e208 .word 0x0801e208
8010f74: 200086ec .word 0x200086ec
8010f78: 0801e224 .word 0x0801e224
8010f7c: 0801e24c .word 0x0801e24c
8010f80: 200086f0 .word 0x200086f0
08010f84 <mem_trim>:
* or NULL if newsize is > old size, in which case rmem is NOT touched
* or freed!
*/
void *
mem_trim(void *rmem, mem_size_t new_size)
{
8010f84: b580 push {r7, lr}
8010f86: b088 sub sp, #32
8010f88: af00 add r7, sp, #0
8010f8a: 6078 str r0, [r7, #4]
8010f8c: 460b mov r3, r1
8010f8e: 807b strh r3, [r7, #2]
/* use the FREE_PROTECT here: it protects with sem OR SYS_ARCH_PROTECT */
LWIP_MEM_FREE_DECL_PROTECT();
/* Expand the size of the allocated memory region so that we can
adjust for alignment. */
newsize = (mem_size_t)LWIP_MEM_ALIGN_SIZE(new_size);
8010f90: 887b ldrh r3, [r7, #2]
8010f92: 3303 adds r3, #3
8010f94: b29b uxth r3, r3
8010f96: f023 0303 bic.w r3, r3, #3
8010f9a: 83fb strh r3, [r7, #30]
if (newsize < MIN_SIZE_ALIGNED) {
8010f9c: 8bfb ldrh r3, [r7, #30]
8010f9e: 2b0b cmp r3, #11
8010fa0: d801 bhi.n 8010fa6 <mem_trim+0x22>
/* every data block must be at least MIN_SIZE_ALIGNED long */
newsize = MIN_SIZE_ALIGNED;
8010fa2: 230c movs r3, #12
8010fa4: 83fb strh r3, [r7, #30]
}
#if MEM_OVERFLOW_CHECK
newsize += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED;
#endif
if ((newsize > MEM_SIZE_ALIGNED) || (newsize < new_size)) {
8010fa6: 8bfb ldrh r3, [r7, #30]
8010fa8: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010fac: d803 bhi.n 8010fb6 <mem_trim+0x32>
8010fae: 8bfa ldrh r2, [r7, #30]
8010fb0: 887b ldrh r3, [r7, #2]
8010fb2: 429a cmp r2, r3
8010fb4: d201 bcs.n 8010fba <mem_trim+0x36>
return NULL;
8010fb6: 2300 movs r3, #0
8010fb8: e0d8 b.n 801116c <mem_trim+0x1e8>
}
LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
8010fba: 4b6e ldr r3, [pc, #440] ; (8011174 <mem_trim+0x1f0>)
8010fbc: 681b ldr r3, [r3, #0]
8010fbe: 687a ldr r2, [r7, #4]
8010fc0: 429a cmp r2, r3
8010fc2: d304 bcc.n 8010fce <mem_trim+0x4a>
8010fc4: 4b6c ldr r3, [pc, #432] ; (8011178 <mem_trim+0x1f4>)
8010fc6: 681b ldr r3, [r3, #0]
8010fc8: 687a ldr r2, [r7, #4]
8010fca: 429a cmp r2, r3
8010fcc: d306 bcc.n 8010fdc <mem_trim+0x58>
8010fce: 4b6b ldr r3, [pc, #428] ; (801117c <mem_trim+0x1f8>)
8010fd0: f240 22d2 movw r2, #722 ; 0x2d2
8010fd4: 496a ldr r1, [pc, #424] ; (8011180 <mem_trim+0x1fc>)
8010fd6: 486b ldr r0, [pc, #428] ; (8011184 <mem_trim+0x200>)
8010fd8: f00b fe8e bl 801ccf8 <iprintf>
(u8_t *)rmem < (u8_t *)ram_end);
if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
8010fdc: 4b65 ldr r3, [pc, #404] ; (8011174 <mem_trim+0x1f0>)
8010fde: 681b ldr r3, [r3, #0]
8010fe0: 687a ldr r2, [r7, #4]
8010fe2: 429a cmp r2, r3
8010fe4: d304 bcc.n 8010ff0 <mem_trim+0x6c>
8010fe6: 4b64 ldr r3, [pc, #400] ; (8011178 <mem_trim+0x1f4>)
8010fe8: 681b ldr r3, [r3, #0]
8010fea: 687a ldr r2, [r7, #4]
8010fec: 429a cmp r2, r3
8010fee: d307 bcc.n 8011000 <mem_trim+0x7c>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n"));
/* protect mem stats from concurrent access */
MEM_STATS_INC_LOCKED(illegal);
8010ff0: f00b fe04 bl 801cbfc <sys_arch_protect>
8010ff4: 60b8 str r0, [r7, #8]
8010ff6: 68b8 ldr r0, [r7, #8]
8010ff8: f00b fe0e bl 801cc18 <sys_arch_unprotect>
return rmem;
8010ffc: 687b ldr r3, [r7, #4]
8010ffe: e0b5 b.n 801116c <mem_trim+0x1e8>
}
/* Get the corresponding struct mem ... */
/* cast through void* to get rid of alignment warnings */
mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
8011000: 687b ldr r3, [r7, #4]
8011002: 3b08 subs r3, #8
8011004: 61bb str r3, [r7, #24]
#if MEM_OVERFLOW_CHECK
mem_overflow_check_element(mem);
#endif
/* ... and its offset pointer */
ptr = mem_to_ptr(mem);
8011006: 69b8 ldr r0, [r7, #24]
8011008: f7ff fdea bl 8010be0 <mem_to_ptr>
801100c: 4603 mov r3, r0
801100e: 82fb strh r3, [r7, #22]
size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD));
8011010: 69bb ldr r3, [r7, #24]
8011012: 881a ldrh r2, [r3, #0]
8011014: 8afb ldrh r3, [r7, #22]
8011016: 1ad3 subs r3, r2, r3
8011018: b29b uxth r3, r3
801101a: 3b08 subs r3, #8
801101c: 82bb strh r3, [r7, #20]
LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
801101e: 8bfa ldrh r2, [r7, #30]
8011020: 8abb ldrh r3, [r7, #20]
8011022: 429a cmp r2, r3
8011024: d906 bls.n 8011034 <mem_trim+0xb0>
8011026: 4b55 ldr r3, [pc, #340] ; (801117c <mem_trim+0x1f8>)
8011028: f44f 7239 mov.w r2, #740 ; 0x2e4
801102c: 4956 ldr r1, [pc, #344] ; (8011188 <mem_trim+0x204>)
801102e: 4855 ldr r0, [pc, #340] ; (8011184 <mem_trim+0x200>)
8011030: f00b fe62 bl 801ccf8 <iprintf>
if (newsize > size) {
8011034: 8bfa ldrh r2, [r7, #30]
8011036: 8abb ldrh r3, [r7, #20]
8011038: 429a cmp r2, r3
801103a: d901 bls.n 8011040 <mem_trim+0xbc>
/* not supported */
return NULL;
801103c: 2300 movs r3, #0
801103e: e095 b.n 801116c <mem_trim+0x1e8>
}
if (newsize == size) {
8011040: 8bfa ldrh r2, [r7, #30]
8011042: 8abb ldrh r3, [r7, #20]
8011044: 429a cmp r2, r3
8011046: d101 bne.n 801104c <mem_trim+0xc8>
/* No change in size, simply return */
return rmem;
8011048: 687b ldr r3, [r7, #4]
801104a: e08f b.n 801116c <mem_trim+0x1e8>
}
/* protect the heap from concurrent access */
LWIP_MEM_FREE_PROTECT();
801104c: 484f ldr r0, [pc, #316] ; (801118c <mem_trim+0x208>)
801104e: f00b fd93 bl 801cb78 <sys_mutex_lock>
mem2 = ptr_to_mem(mem->next);
8011052: 69bb ldr r3, [r7, #24]
8011054: 881b ldrh r3, [r3, #0]
8011056: 4618 mov r0, r3
8011058: f7ff fdb0 bl 8010bbc <ptr_to_mem>
801105c: 6138 str r0, [r7, #16]
if (mem2->used == 0) {
801105e: 693b ldr r3, [r7, #16]
8011060: 791b ldrb r3, [r3, #4]
8011062: 2b00 cmp r3, #0
8011064: d13f bne.n 80110e6 <mem_trim+0x162>
/* The next struct is unused, we can simply move it at little */
mem_size_t next;
LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
8011066: 69bb ldr r3, [r7, #24]
8011068: 881b ldrh r3, [r3, #0]
801106a: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
801106e: d106 bne.n 801107e <mem_trim+0xfa>
8011070: 4b42 ldr r3, [pc, #264] ; (801117c <mem_trim+0x1f8>)
8011072: f240 22f5 movw r2, #757 ; 0x2f5
8011076: 4946 ldr r1, [pc, #280] ; (8011190 <mem_trim+0x20c>)
8011078: 4842 ldr r0, [pc, #264] ; (8011184 <mem_trim+0x200>)
801107a: f00b fe3d bl 801ccf8 <iprintf>
/* remember the old next pointer */
next = mem2->next;
801107e: 693b ldr r3, [r7, #16]
8011080: 881b ldrh r3, [r3, #0]
8011082: 81bb strh r3, [r7, #12]
/* create new struct mem which is moved directly after the shrinked mem */
ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize);
8011084: 8afa ldrh r2, [r7, #22]
8011086: 8bfb ldrh r3, [r7, #30]
8011088: 4413 add r3, r2
801108a: b29b uxth r3, r3
801108c: 3308 adds r3, #8
801108e: 81fb strh r3, [r7, #14]
if (lfree == mem2) {
8011090: 4b40 ldr r3, [pc, #256] ; (8011194 <mem_trim+0x210>)
8011092: 681b ldr r3, [r3, #0]
8011094: 693a ldr r2, [r7, #16]
8011096: 429a cmp r2, r3
8011098: d106 bne.n 80110a8 <mem_trim+0x124>
lfree = ptr_to_mem(ptr2);
801109a: 89fb ldrh r3, [r7, #14]
801109c: 4618 mov r0, r3
801109e: f7ff fd8d bl 8010bbc <ptr_to_mem>
80110a2: 4602 mov r2, r0
80110a4: 4b3b ldr r3, [pc, #236] ; (8011194 <mem_trim+0x210>)
80110a6: 601a str r2, [r3, #0]
}
mem2 = ptr_to_mem(ptr2);
80110a8: 89fb ldrh r3, [r7, #14]
80110aa: 4618 mov r0, r3
80110ac: f7ff fd86 bl 8010bbc <ptr_to_mem>
80110b0: 6138 str r0, [r7, #16]
mem2->used = 0;
80110b2: 693b ldr r3, [r7, #16]
80110b4: 2200 movs r2, #0
80110b6: 711a strb r2, [r3, #4]
/* restore the next pointer */
mem2->next = next;
80110b8: 693b ldr r3, [r7, #16]
80110ba: 89ba ldrh r2, [r7, #12]
80110bc: 801a strh r2, [r3, #0]
/* link it back to mem */
mem2->prev = ptr;
80110be: 693b ldr r3, [r7, #16]
80110c0: 8afa ldrh r2, [r7, #22]
80110c2: 805a strh r2, [r3, #2]
/* link mem to it */
mem->next = ptr2;
80110c4: 69bb ldr r3, [r7, #24]
80110c6: 89fa ldrh r2, [r7, #14]
80110c8: 801a strh r2, [r3, #0]
/* last thing to restore linked list: as we have moved mem2,
* let 'mem2->next->prev' point to mem2 again. but only if mem2->next is not
* the end of the heap */
if (mem2->next != MEM_SIZE_ALIGNED) {
80110ca: 693b ldr r3, [r7, #16]
80110cc: 881b ldrh r3, [r3, #0]
80110ce: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80110d2: d047 beq.n 8011164 <mem_trim+0x1e0>
ptr_to_mem(mem2->next)->prev = ptr2;
80110d4: 693b ldr r3, [r7, #16]
80110d6: 881b ldrh r3, [r3, #0]
80110d8: 4618 mov r0, r3
80110da: f7ff fd6f bl 8010bbc <ptr_to_mem>
80110de: 4602 mov r2, r0
80110e0: 89fb ldrh r3, [r7, #14]
80110e2: 8053 strh r3, [r2, #2]
80110e4: e03e b.n 8011164 <mem_trim+0x1e0>
}
MEM_STATS_DEC_USED(used, (size - newsize));
/* no need to plug holes, we've already done that */
} else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) {
80110e6: 8bfb ldrh r3, [r7, #30]
80110e8: f103 0214 add.w r2, r3, #20
80110ec: 8abb ldrh r3, [r7, #20]
80110ee: 429a cmp r2, r3
80110f0: d838 bhi.n 8011164 <mem_trim+0x1e0>
* Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem
* ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED').
* @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty
* region that couldn't hold data, but when mem->next gets freed,
* the 2 regions would be combined, resulting in more free memory */
ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize);
80110f2: 8afa ldrh r2, [r7, #22]
80110f4: 8bfb ldrh r3, [r7, #30]
80110f6: 4413 add r3, r2
80110f8: b29b uxth r3, r3
80110fa: 3308 adds r3, #8
80110fc: 81fb strh r3, [r7, #14]
LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
80110fe: 69bb ldr r3, [r7, #24]
8011100: 881b ldrh r3, [r3, #0]
8011102: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8011106: d106 bne.n 8011116 <mem_trim+0x192>
8011108: 4b1c ldr r3, [pc, #112] ; (801117c <mem_trim+0x1f8>)
801110a: f240 3216 movw r2, #790 ; 0x316
801110e: 4920 ldr r1, [pc, #128] ; (8011190 <mem_trim+0x20c>)
8011110: 481c ldr r0, [pc, #112] ; (8011184 <mem_trim+0x200>)
8011112: f00b fdf1 bl 801ccf8 <iprintf>
mem2 = ptr_to_mem(ptr2);
8011116: 89fb ldrh r3, [r7, #14]
8011118: 4618 mov r0, r3
801111a: f7ff fd4f bl 8010bbc <ptr_to_mem>
801111e: 6138 str r0, [r7, #16]
if (mem2 < lfree) {
8011120: 4b1c ldr r3, [pc, #112] ; (8011194 <mem_trim+0x210>)
8011122: 681b ldr r3, [r3, #0]
8011124: 693a ldr r2, [r7, #16]
8011126: 429a cmp r2, r3
8011128: d202 bcs.n 8011130 <mem_trim+0x1ac>
lfree = mem2;
801112a: 4a1a ldr r2, [pc, #104] ; (8011194 <mem_trim+0x210>)
801112c: 693b ldr r3, [r7, #16]
801112e: 6013 str r3, [r2, #0]
}
mem2->used = 0;
8011130: 693b ldr r3, [r7, #16]
8011132: 2200 movs r2, #0
8011134: 711a strb r2, [r3, #4]
mem2->next = mem->next;
8011136: 69bb ldr r3, [r7, #24]
8011138: 881a ldrh r2, [r3, #0]
801113a: 693b ldr r3, [r7, #16]
801113c: 801a strh r2, [r3, #0]
mem2->prev = ptr;
801113e: 693b ldr r3, [r7, #16]
8011140: 8afa ldrh r2, [r7, #22]
8011142: 805a strh r2, [r3, #2]
mem->next = ptr2;
8011144: 69bb ldr r3, [r7, #24]
8011146: 89fa ldrh r2, [r7, #14]
8011148: 801a strh r2, [r3, #0]
if (mem2->next != MEM_SIZE_ALIGNED) {
801114a: 693b ldr r3, [r7, #16]
801114c: 881b ldrh r3, [r3, #0]
801114e: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8011152: d007 beq.n 8011164 <mem_trim+0x1e0>
ptr_to_mem(mem2->next)->prev = ptr2;
8011154: 693b ldr r3, [r7, #16]
8011156: 881b ldrh r3, [r3, #0]
8011158: 4618 mov r0, r3
801115a: f7ff fd2f bl 8010bbc <ptr_to_mem>
801115e: 4602 mov r2, r0
8011160: 89fb ldrh r3, [r7, #14]
8011162: 8053 strh r3, [r2, #2]
#endif
MEM_SANITY();
#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
mem_free_count = 1;
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
LWIP_MEM_FREE_UNPROTECT();
8011164: 4809 ldr r0, [pc, #36] ; (801118c <mem_trim+0x208>)
8011166: f00b fd16 bl 801cb96 <sys_mutex_unlock>
return rmem;
801116a: 687b ldr r3, [r7, #4]
}
801116c: 4618 mov r0, r3
801116e: 3720 adds r7, #32
8011170: 46bd mov sp, r7
8011172: bd80 pop {r7, pc}
8011174: 200086e4 .word 0x200086e4
8011178: 200086e8 .word 0x200086e8
801117c: 0801e0f4 .word 0x0801e0f4
8011180: 0801e280 .word 0x0801e280
8011184: 0801e13c .word 0x0801e13c
8011188: 0801e298 .word 0x0801e298
801118c: 200086ec .word 0x200086ec
8011190: 0801e2b8 .word 0x0801e2b8
8011194: 200086f0 .word 0x200086f0
08011198 <mem_malloc>:
*
* Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT).
*/
void *
mem_malloc(mem_size_t size_in)
{
8011198: b580 push {r7, lr}
801119a: b088 sub sp, #32
801119c: af00 add r7, sp, #0
801119e: 4603 mov r3, r0
80111a0: 80fb strh r3, [r7, #6]
#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
u8_t local_mem_free_count = 0;
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
LWIP_MEM_ALLOC_DECL_PROTECT();
if (size_in == 0) {
80111a2: 88fb ldrh r3, [r7, #6]
80111a4: 2b00 cmp r3, #0
80111a6: d101 bne.n 80111ac <mem_malloc+0x14>
return NULL;
80111a8: 2300 movs r3, #0
80111aa: e0e2 b.n 8011372 <mem_malloc+0x1da>
}
/* Expand the size of the allocated memory region so that we can
adjust for alignment. */
size = (mem_size_t)LWIP_MEM_ALIGN_SIZE(size_in);
80111ac: 88fb ldrh r3, [r7, #6]
80111ae: 3303 adds r3, #3
80111b0: b29b uxth r3, r3
80111b2: f023 0303 bic.w r3, r3, #3
80111b6: 83bb strh r3, [r7, #28]
if (size < MIN_SIZE_ALIGNED) {
80111b8: 8bbb ldrh r3, [r7, #28]
80111ba: 2b0b cmp r3, #11
80111bc: d801 bhi.n 80111c2 <mem_malloc+0x2a>
/* every data block must be at least MIN_SIZE_ALIGNED long */
size = MIN_SIZE_ALIGNED;
80111be: 230c movs r3, #12
80111c0: 83bb strh r3, [r7, #28]
}
#if MEM_OVERFLOW_CHECK
size += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED;
#endif
if ((size > MEM_SIZE_ALIGNED) || (size < size_in)) {
80111c2: 8bbb ldrh r3, [r7, #28]
80111c4: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80111c8: d803 bhi.n 80111d2 <mem_malloc+0x3a>
80111ca: 8bba ldrh r2, [r7, #28]
80111cc: 88fb ldrh r3, [r7, #6]
80111ce: 429a cmp r2, r3
80111d0: d201 bcs.n 80111d6 <mem_malloc+0x3e>
return NULL;
80111d2: 2300 movs r3, #0
80111d4: e0cd b.n 8011372 <mem_malloc+0x1da>
}
/* protect the heap from concurrent access */
sys_mutex_lock(&mem_mutex);
80111d6: 4869 ldr r0, [pc, #420] ; (801137c <mem_malloc+0x1e4>)
80111d8: f00b fcce bl 801cb78 <sys_mutex_lock>
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
/* Scan through the heap searching for a free block that is big enough,
* beginning with the lowest free block.
*/
for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
80111dc: 4b68 ldr r3, [pc, #416] ; (8011380 <mem_malloc+0x1e8>)
80111de: 681b ldr r3, [r3, #0]
80111e0: 4618 mov r0, r3
80111e2: f7ff fcfd bl 8010be0 <mem_to_ptr>
80111e6: 4603 mov r3, r0
80111e8: 83fb strh r3, [r7, #30]
80111ea: e0b7 b.n 801135c <mem_malloc+0x1c4>
ptr = ptr_to_mem(ptr)->next) {
mem = ptr_to_mem(ptr);
80111ec: 8bfb ldrh r3, [r7, #30]
80111ee: 4618 mov r0, r3
80111f0: f7ff fce4 bl 8010bbc <ptr_to_mem>
80111f4: 6178 str r0, [r7, #20]
local_mem_free_count = 1;
break;
}
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
if ((!mem->used) &&
80111f6: 697b ldr r3, [r7, #20]
80111f8: 791b ldrb r3, [r3, #4]
80111fa: 2b00 cmp r3, #0
80111fc: f040 80a7 bne.w 801134e <mem_malloc+0x1b6>
(mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
8011200: 697b ldr r3, [r7, #20]
8011202: 881b ldrh r3, [r3, #0]
8011204: 461a mov r2, r3
8011206: 8bfb ldrh r3, [r7, #30]
8011208: 1ad3 subs r3, r2, r3
801120a: f1a3 0208 sub.w r2, r3, #8
801120e: 8bbb ldrh r3, [r7, #28]
if ((!mem->used) &&
8011210: 429a cmp r2, r3
8011212: f0c0 809c bcc.w 801134e <mem_malloc+0x1b6>
/* mem is not used and at least perfect fit is possible:
* mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */
if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) {
8011216: 697b ldr r3, [r7, #20]
8011218: 881b ldrh r3, [r3, #0]
801121a: 461a mov r2, r3
801121c: 8bfb ldrh r3, [r7, #30]
801121e: 1ad3 subs r3, r2, r3
8011220: f1a3 0208 sub.w r2, r3, #8
8011224: 8bbb ldrh r3, [r7, #28]
8011226: 3314 adds r3, #20
8011228: 429a cmp r2, r3
801122a: d333 bcc.n 8011294 <mem_malloc+0xfc>
* struct mem would fit in but no data between mem2 and mem2->next
* @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty
* region that couldn't hold data, but when mem->next gets freed,
* the 2 regions would be combined, resulting in more free memory
*/
ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + size);
801122c: 8bfa ldrh r2, [r7, #30]
801122e: 8bbb ldrh r3, [r7, #28]
8011230: 4413 add r3, r2
8011232: b29b uxth r3, r3
8011234: 3308 adds r3, #8
8011236: 827b strh r3, [r7, #18]
LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
8011238: 8a7b ldrh r3, [r7, #18]
801123a: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
801123e: d106 bne.n 801124e <mem_malloc+0xb6>
8011240: 4b50 ldr r3, [pc, #320] ; (8011384 <mem_malloc+0x1ec>)
8011242: f240 3287 movw r2, #903 ; 0x387
8011246: 4950 ldr r1, [pc, #320] ; (8011388 <mem_malloc+0x1f0>)
8011248: 4850 ldr r0, [pc, #320] ; (801138c <mem_malloc+0x1f4>)
801124a: f00b fd55 bl 801ccf8 <iprintf>
/* create mem2 struct */
mem2 = ptr_to_mem(ptr2);
801124e: 8a7b ldrh r3, [r7, #18]
8011250: 4618 mov r0, r3
8011252: f7ff fcb3 bl 8010bbc <ptr_to_mem>
8011256: 60f8 str r0, [r7, #12]
mem2->used = 0;
8011258: 68fb ldr r3, [r7, #12]
801125a: 2200 movs r2, #0
801125c: 711a strb r2, [r3, #4]
mem2->next = mem->next;
801125e: 697b ldr r3, [r7, #20]
8011260: 881a ldrh r2, [r3, #0]
8011262: 68fb ldr r3, [r7, #12]
8011264: 801a strh r2, [r3, #0]
mem2->prev = ptr;
8011266: 68fb ldr r3, [r7, #12]
8011268: 8bfa ldrh r2, [r7, #30]
801126a: 805a strh r2, [r3, #2]
/* and insert it between mem and mem->next */
mem->next = ptr2;
801126c: 697b ldr r3, [r7, #20]
801126e: 8a7a ldrh r2, [r7, #18]
8011270: 801a strh r2, [r3, #0]
mem->used = 1;
8011272: 697b ldr r3, [r7, #20]
8011274: 2201 movs r2, #1
8011276: 711a strb r2, [r3, #4]
if (mem2->next != MEM_SIZE_ALIGNED) {
8011278: 68fb ldr r3, [r7, #12]
801127a: 881b ldrh r3, [r3, #0]
801127c: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8011280: d00b beq.n 801129a <mem_malloc+0x102>
ptr_to_mem(mem2->next)->prev = ptr2;
8011282: 68fb ldr r3, [r7, #12]
8011284: 881b ldrh r3, [r3, #0]
8011286: 4618 mov r0, r3
8011288: f7ff fc98 bl 8010bbc <ptr_to_mem>
801128c: 4602 mov r2, r0
801128e: 8a7b ldrh r3, [r7, #18]
8011290: 8053 strh r3, [r2, #2]
8011292: e002 b.n 801129a <mem_malloc+0x102>
* take care of this).
* -> near fit or exact fit: do not split, no mem2 creation
* also can't move mem->next directly behind mem, since mem->next
* will always be used at this point!
*/
mem->used = 1;
8011294: 697b ldr r3, [r7, #20]
8011296: 2201 movs r2, #1
8011298: 711a strb r2, [r3, #4]
MEM_STATS_INC_USED(used, mem->next - mem_to_ptr(mem));
}
#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
mem_malloc_adjust_lfree:
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
if (mem == lfree) {
801129a: 4b39 ldr r3, [pc, #228] ; (8011380 <mem_malloc+0x1e8>)
801129c: 681b ldr r3, [r3, #0]
801129e: 697a ldr r2, [r7, #20]
80112a0: 429a cmp r2, r3
80112a2: d127 bne.n 80112f4 <mem_malloc+0x15c>
struct mem *cur = lfree;
80112a4: 4b36 ldr r3, [pc, #216] ; (8011380 <mem_malloc+0x1e8>)
80112a6: 681b ldr r3, [r3, #0]
80112a8: 61bb str r3, [r7, #24]
/* Find next free block after mem and update lowest free pointer */
while (cur->used && cur != ram_end) {
80112aa: e005 b.n 80112b8 <mem_malloc+0x120>
/* If mem_free or mem_trim have run, we have to restart since they
could have altered our current struct mem or lfree. */
goto mem_malloc_adjust_lfree;
}
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
cur = ptr_to_mem(cur->next);
80112ac: 69bb ldr r3, [r7, #24]
80112ae: 881b ldrh r3, [r3, #0]
80112b0: 4618 mov r0, r3
80112b2: f7ff fc83 bl 8010bbc <ptr_to_mem>
80112b6: 61b8 str r0, [r7, #24]
while (cur->used && cur != ram_end) {
80112b8: 69bb ldr r3, [r7, #24]
80112ba: 791b ldrb r3, [r3, #4]
80112bc: 2b00 cmp r3, #0
80112be: d004 beq.n 80112ca <mem_malloc+0x132>
80112c0: 4b33 ldr r3, [pc, #204] ; (8011390 <mem_malloc+0x1f8>)
80112c2: 681b ldr r3, [r3, #0]
80112c4: 69ba ldr r2, [r7, #24]
80112c6: 429a cmp r2, r3
80112c8: d1f0 bne.n 80112ac <mem_malloc+0x114>
}
lfree = cur;
80112ca: 4a2d ldr r2, [pc, #180] ; (8011380 <mem_malloc+0x1e8>)
80112cc: 69bb ldr r3, [r7, #24]
80112ce: 6013 str r3, [r2, #0]
LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
80112d0: 4b2b ldr r3, [pc, #172] ; (8011380 <mem_malloc+0x1e8>)
80112d2: 681a ldr r2, [r3, #0]
80112d4: 4b2e ldr r3, [pc, #184] ; (8011390 <mem_malloc+0x1f8>)
80112d6: 681b ldr r3, [r3, #0]
80112d8: 429a cmp r2, r3
80112da: d00b beq.n 80112f4 <mem_malloc+0x15c>
80112dc: 4b28 ldr r3, [pc, #160] ; (8011380 <mem_malloc+0x1e8>)
80112de: 681b ldr r3, [r3, #0]
80112e0: 791b ldrb r3, [r3, #4]
80112e2: 2b00 cmp r3, #0
80112e4: d006 beq.n 80112f4 <mem_malloc+0x15c>
80112e6: 4b27 ldr r3, [pc, #156] ; (8011384 <mem_malloc+0x1ec>)
80112e8: f240 32b5 movw r2, #949 ; 0x3b5
80112ec: 4929 ldr r1, [pc, #164] ; (8011394 <mem_malloc+0x1fc>)
80112ee: 4827 ldr r0, [pc, #156] ; (801138c <mem_malloc+0x1f4>)
80112f0: f00b fd02 bl 801ccf8 <iprintf>
}
LWIP_MEM_ALLOC_UNPROTECT();
sys_mutex_unlock(&mem_mutex);
80112f4: 4821 ldr r0, [pc, #132] ; (801137c <mem_malloc+0x1e4>)
80112f6: f00b fc4e bl 801cb96 <sys_mutex_unlock>
LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
80112fa: 8bba ldrh r2, [r7, #28]
80112fc: 697b ldr r3, [r7, #20]
80112fe: 4413 add r3, r2
8011300: 3308 adds r3, #8
8011302: 4a23 ldr r2, [pc, #140] ; (8011390 <mem_malloc+0x1f8>)
8011304: 6812 ldr r2, [r2, #0]
8011306: 4293 cmp r3, r2
8011308: d906 bls.n 8011318 <mem_malloc+0x180>
801130a: 4b1e ldr r3, [pc, #120] ; (8011384 <mem_malloc+0x1ec>)
801130c: f240 32ba movw r2, #954 ; 0x3ba
8011310: 4921 ldr r1, [pc, #132] ; (8011398 <mem_malloc+0x200>)
8011312: 481e ldr r0, [pc, #120] ; (801138c <mem_malloc+0x1f4>)
8011314: f00b fcf0 bl 801ccf8 <iprintf>
(mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
8011318: 697b ldr r3, [r7, #20]
801131a: f003 0303 and.w r3, r3, #3
801131e: 2b00 cmp r3, #0
8011320: d006 beq.n 8011330 <mem_malloc+0x198>
8011322: 4b18 ldr r3, [pc, #96] ; (8011384 <mem_malloc+0x1ec>)
8011324: f44f 726f mov.w r2, #956 ; 0x3bc
8011328: 491c ldr r1, [pc, #112] ; (801139c <mem_malloc+0x204>)
801132a: 4818 ldr r0, [pc, #96] ; (801138c <mem_malloc+0x1f4>)
801132c: f00b fce4 bl 801ccf8 <iprintf>
((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
LWIP_ASSERT("mem_malloc: sanity check alignment",
8011330: 697b ldr r3, [r7, #20]
8011332: f003 0303 and.w r3, r3, #3
8011336: 2b00 cmp r3, #0
8011338: d006 beq.n 8011348 <mem_malloc+0x1b0>
801133a: 4b12 ldr r3, [pc, #72] ; (8011384 <mem_malloc+0x1ec>)
801133c: f240 32be movw r2, #958 ; 0x3be
8011340: 4917 ldr r1, [pc, #92] ; (80113a0 <mem_malloc+0x208>)
8011342: 4812 ldr r0, [pc, #72] ; (801138c <mem_malloc+0x1f4>)
8011344: f00b fcd8 bl 801ccf8 <iprintf>
#if MEM_OVERFLOW_CHECK
mem_overflow_init_element(mem, size_in);
#endif
MEM_SANITY();
return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET;
8011348: 697b ldr r3, [r7, #20]
801134a: 3308 adds r3, #8
801134c: e011 b.n 8011372 <mem_malloc+0x1da>
ptr = ptr_to_mem(ptr)->next) {
801134e: 8bfb ldrh r3, [r7, #30]
8011350: 4618 mov r0, r3
8011352: f7ff fc33 bl 8010bbc <ptr_to_mem>
8011356: 4603 mov r3, r0
8011358: 881b ldrh r3, [r3, #0]
801135a: 83fb strh r3, [r7, #30]
for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
801135c: 8bfa ldrh r2, [r7, #30]
801135e: 8bbb ldrh r3, [r7, #28]
8011360: f5c3 63c8 rsb r3, r3, #1600 ; 0x640
8011364: 429a cmp r2, r3
8011366: f4ff af41 bcc.w 80111ec <mem_malloc+0x54>
/* if we got interrupted by a mem_free, try again */
} while (local_mem_free_count != 0);
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
MEM_STATS_INC(err);
LWIP_MEM_ALLOC_UNPROTECT();
sys_mutex_unlock(&mem_mutex);
801136a: 4804 ldr r0, [pc, #16] ; (801137c <mem_malloc+0x1e4>)
801136c: f00b fc13 bl 801cb96 <sys_mutex_unlock>
LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size));
return NULL;
8011370: 2300 movs r3, #0
}
8011372: 4618 mov r0, r3
8011374: 3720 adds r7, #32
8011376: 46bd mov sp, r7
8011378: bd80 pop {r7, pc}
801137a: bf00 nop
801137c: 200086ec .word 0x200086ec
8011380: 200086f0 .word 0x200086f0
8011384: 0801e0f4 .word 0x0801e0f4
8011388: 0801e2b8 .word 0x0801e2b8
801138c: 0801e13c .word 0x0801e13c
8011390: 200086e8 .word 0x200086e8
8011394: 0801e2cc .word 0x0801e2cc
8011398: 0801e2e8 .word 0x0801e2e8
801139c: 0801e318 .word 0x0801e318
80113a0: 0801e348 .word 0x0801e348
080113a4 <memp_init_pool>:
*
* @param desc pool to initialize
*/
void
memp_init_pool(const struct memp_desc *desc)
{
80113a4: b480 push {r7}
80113a6: b085 sub sp, #20
80113a8: af00 add r7, sp, #0
80113aa: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(desc);
#else
int i;
struct memp *memp;
*desc->tab = NULL;
80113ac: 687b ldr r3, [r7, #4]
80113ae: 689b ldr r3, [r3, #8]
80113b0: 2200 movs r2, #0
80113b2: 601a str r2, [r3, #0]
memp = (struct memp *)LWIP_MEM_ALIGN(desc->base);
80113b4: 687b ldr r3, [r7, #4]
80113b6: 685b ldr r3, [r3, #4]
80113b8: 3303 adds r3, #3
80113ba: f023 0303 bic.w r3, r3, #3
80113be: 60bb str r3, [r7, #8]
+ MEM_SANITY_REGION_AFTER_ALIGNED
#endif
));
#endif
/* create a linked list of memp elements */
for (i = 0; i < desc->num; ++i) {
80113c0: 2300 movs r3, #0
80113c2: 60fb str r3, [r7, #12]
80113c4: e011 b.n 80113ea <memp_init_pool+0x46>
memp->next = *desc->tab;
80113c6: 687b ldr r3, [r7, #4]
80113c8: 689b ldr r3, [r3, #8]
80113ca: 681a ldr r2, [r3, #0]
80113cc: 68bb ldr r3, [r7, #8]
80113ce: 601a str r2, [r3, #0]
*desc->tab = memp;
80113d0: 687b ldr r3, [r7, #4]
80113d2: 689b ldr r3, [r3, #8]
80113d4: 68ba ldr r2, [r7, #8]
80113d6: 601a str r2, [r3, #0]
#if MEMP_OVERFLOW_CHECK
memp_overflow_init_element(memp, desc);
#endif /* MEMP_OVERFLOW_CHECK */
/* cast through void* to get rid of alignment warnings */
memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size
80113d8: 687b ldr r3, [r7, #4]
80113da: 881b ldrh r3, [r3, #0]
80113dc: 461a mov r2, r3
80113de: 68bb ldr r3, [r7, #8]
80113e0: 4413 add r3, r2
80113e2: 60bb str r3, [r7, #8]
for (i = 0; i < desc->num; ++i) {
80113e4: 68fb ldr r3, [r7, #12]
80113e6: 3301 adds r3, #1
80113e8: 60fb str r3, [r7, #12]
80113ea: 687b ldr r3, [r7, #4]
80113ec: 885b ldrh r3, [r3, #2]
80113ee: 461a mov r2, r3
80113f0: 68fb ldr r3, [r7, #12]
80113f2: 4293 cmp r3, r2
80113f4: dbe7 blt.n 80113c6 <memp_init_pool+0x22>
#endif /* !MEMP_MEM_MALLOC */
#if MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY)
desc->stats->name = desc->desc;
#endif /* MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) */
}
80113f6: bf00 nop
80113f8: 3714 adds r7, #20
80113fa: 46bd mov sp, r7
80113fc: f85d 7b04 ldr.w r7, [sp], #4
8011400: 4770 bx lr
...
08011404 <memp_init>:
*
* Carves out memp_memory into linked lists for each pool-type.
*/
void
memp_init(void)
{
8011404: b580 push {r7, lr}
8011406: b082 sub sp, #8
8011408: af00 add r7, sp, #0
u16_t i;
/* for every pool: */
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
801140a: 2300 movs r3, #0
801140c: 80fb strh r3, [r7, #6]
801140e: e009 b.n 8011424 <memp_init+0x20>
memp_init_pool(memp_pools[i]);
8011410: 88fb ldrh r3, [r7, #6]
8011412: 4a08 ldr r2, [pc, #32] ; (8011434 <memp_init+0x30>)
8011414: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8011418: 4618 mov r0, r3
801141a: f7ff ffc3 bl 80113a4 <memp_init_pool>
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
801141e: 88fb ldrh r3, [r7, #6]
8011420: 3301 adds r3, #1
8011422: 80fb strh r3, [r7, #6]
8011424: 88fb ldrh r3, [r7, #6]
8011426: 2b0c cmp r3, #12
8011428: d9f2 bls.n 8011410 <memp_init+0xc>
#if MEMP_OVERFLOW_CHECK >= 2
/* check everything a first time to see if it worked */
memp_overflow_check_all();
#endif /* MEMP_OVERFLOW_CHECK >= 2 */
}
801142a: bf00 nop
801142c: 3708 adds r7, #8
801142e: 46bd mov sp, r7
8011430: bd80 pop {r7, pc}
8011432: bf00 nop
8011434: 08022e24 .word 0x08022e24
08011438 <do_memp_malloc_pool>:
#if !MEMP_OVERFLOW_CHECK
do_memp_malloc_pool(const struct memp_desc *desc)
#else
do_memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line)
#endif
{
8011438: b580 push {r7, lr}
801143a: b084 sub sp, #16
801143c: af00 add r7, sp, #0
801143e: 6078 str r0, [r7, #4]
#if MEMP_MEM_MALLOC
memp = (struct memp *)mem_malloc(MEMP_SIZE + MEMP_ALIGN_SIZE(desc->size));
SYS_ARCH_PROTECT(old_level);
#else /* MEMP_MEM_MALLOC */
SYS_ARCH_PROTECT(old_level);
8011440: f00b fbdc bl 801cbfc <sys_arch_protect>
8011444: 60f8 str r0, [r7, #12]
memp = *desc->tab;
8011446: 687b ldr r3, [r7, #4]
8011448: 689b ldr r3, [r3, #8]
801144a: 681b ldr r3, [r3, #0]
801144c: 60bb str r3, [r7, #8]
#endif /* MEMP_MEM_MALLOC */
if (memp != NULL) {
801144e: 68bb ldr r3, [r7, #8]
8011450: 2b00 cmp r3, #0
8011452: d015 beq.n 8011480 <do_memp_malloc_pool+0x48>
#if !MEMP_MEM_MALLOC
#if MEMP_OVERFLOW_CHECK == 1
memp_overflow_check_element(memp, desc);
#endif /* MEMP_OVERFLOW_CHECK */
*desc->tab = memp->next;
8011454: 687b ldr r3, [r7, #4]
8011456: 689b ldr r3, [r3, #8]
8011458: 68ba ldr r2, [r7, #8]
801145a: 6812 ldr r2, [r2, #0]
801145c: 601a str r2, [r3, #0]
memp->line = line;
#if MEMP_MEM_MALLOC
memp_overflow_init_element(memp, desc);
#endif /* MEMP_MEM_MALLOC */
#endif /* MEMP_OVERFLOW_CHECK */
LWIP_ASSERT("memp_malloc: memp properly aligned",
801145e: 68bb ldr r3, [r7, #8]
8011460: f003 0303 and.w r3, r3, #3
8011464: 2b00 cmp r3, #0
8011466: d006 beq.n 8011476 <do_memp_malloc_pool+0x3e>
8011468: 4b09 ldr r3, [pc, #36] ; (8011490 <do_memp_malloc_pool+0x58>)
801146a: f240 1219 movw r2, #281 ; 0x119
801146e: 4909 ldr r1, [pc, #36] ; (8011494 <do_memp_malloc_pool+0x5c>)
8011470: 4809 ldr r0, [pc, #36] ; (8011498 <do_memp_malloc_pool+0x60>)
8011472: f00b fc41 bl 801ccf8 <iprintf>
desc->stats->used++;
if (desc->stats->used > desc->stats->max) {
desc->stats->max = desc->stats->used;
}
#endif
SYS_ARCH_UNPROTECT(old_level);
8011476: 68f8 ldr r0, [r7, #12]
8011478: f00b fbce bl 801cc18 <sys_arch_unprotect>
/* cast through u8_t* to get rid of alignment warnings */
return ((u8_t *)memp + MEMP_SIZE);
801147c: 68bb ldr r3, [r7, #8]
801147e: e003 b.n 8011488 <do_memp_malloc_pool+0x50>
} else {
#if MEMP_STATS
desc->stats->err++;
#endif
SYS_ARCH_UNPROTECT(old_level);
8011480: 68f8 ldr r0, [r7, #12]
8011482: f00b fbc9 bl 801cc18 <sys_arch_unprotect>
LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc));
}
return NULL;
8011486: 2300 movs r3, #0
}
8011488: 4618 mov r0, r3
801148a: 3710 adds r7, #16
801148c: 46bd mov sp, r7
801148e: bd80 pop {r7, pc}
8011490: 0801e36c .word 0x0801e36c
8011494: 0801e39c .word 0x0801e39c
8011498: 0801e3c0 .word 0x0801e3c0
0801149c <memp_malloc>:
#if !MEMP_OVERFLOW_CHECK
memp_malloc(memp_t type)
#else
memp_malloc_fn(memp_t type, const char *file, const int line)
#endif
{
801149c: b580 push {r7, lr}
801149e: b084 sub sp, #16
80114a0: af00 add r7, sp, #0
80114a2: 4603 mov r3, r0
80114a4: 71fb strb r3, [r7, #7]
void *memp;
LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
80114a6: 79fb ldrb r3, [r7, #7]
80114a8: 2b0c cmp r3, #12
80114aa: d908 bls.n 80114be <memp_malloc+0x22>
80114ac: 4b0a ldr r3, [pc, #40] ; (80114d8 <memp_malloc+0x3c>)
80114ae: f240 1257 movw r2, #343 ; 0x157
80114b2: 490a ldr r1, [pc, #40] ; (80114dc <memp_malloc+0x40>)
80114b4: 480a ldr r0, [pc, #40] ; (80114e0 <memp_malloc+0x44>)
80114b6: f00b fc1f bl 801ccf8 <iprintf>
80114ba: 2300 movs r3, #0
80114bc: e008 b.n 80114d0 <memp_malloc+0x34>
#if MEMP_OVERFLOW_CHECK >= 2
memp_overflow_check_all();
#endif /* MEMP_OVERFLOW_CHECK >= 2 */
#if !MEMP_OVERFLOW_CHECK
memp = do_memp_malloc_pool(memp_pools[type]);
80114be: 79fb ldrb r3, [r7, #7]
80114c0: 4a08 ldr r2, [pc, #32] ; (80114e4 <memp_malloc+0x48>)
80114c2: f852 3023 ldr.w r3, [r2, r3, lsl #2]
80114c6: 4618 mov r0, r3
80114c8: f7ff ffb6 bl 8011438 <do_memp_malloc_pool>
80114cc: 60f8 str r0, [r7, #12]
#else
memp = do_memp_malloc_pool_fn(memp_pools[type], file, line);
#endif
return memp;
80114ce: 68fb ldr r3, [r7, #12]
}
80114d0: 4618 mov r0, r3
80114d2: 3710 adds r7, #16
80114d4: 46bd mov sp, r7
80114d6: bd80 pop {r7, pc}
80114d8: 0801e36c .word 0x0801e36c
80114dc: 0801e3fc .word 0x0801e3fc
80114e0: 0801e3c0 .word 0x0801e3c0
80114e4: 08022e24 .word 0x08022e24
080114e8 <do_memp_free_pool>:
static void
do_memp_free_pool(const struct memp_desc *desc, void *mem)
{
80114e8: b580 push {r7, lr}
80114ea: b084 sub sp, #16
80114ec: af00 add r7, sp, #0
80114ee: 6078 str r0, [r7, #4]
80114f0: 6039 str r1, [r7, #0]
struct memp *memp;
SYS_ARCH_DECL_PROTECT(old_level);
LWIP_ASSERT("memp_free: mem properly aligned",
80114f2: 683b ldr r3, [r7, #0]
80114f4: f003 0303 and.w r3, r3, #3
80114f8: 2b00 cmp r3, #0
80114fa: d006 beq.n 801150a <do_memp_free_pool+0x22>
80114fc: 4b0d ldr r3, [pc, #52] ; (8011534 <do_memp_free_pool+0x4c>)
80114fe: f240 126d movw r2, #365 ; 0x16d
8011502: 490d ldr r1, [pc, #52] ; (8011538 <do_memp_free_pool+0x50>)
8011504: 480d ldr r0, [pc, #52] ; (801153c <do_memp_free_pool+0x54>)
8011506: f00b fbf7 bl 801ccf8 <iprintf>
((mem_ptr_t)mem % MEM_ALIGNMENT) == 0);
/* cast through void* to get rid of alignment warnings */
memp = (struct memp *)(void *)((u8_t *)mem - MEMP_SIZE);
801150a: 683b ldr r3, [r7, #0]
801150c: 60fb str r3, [r7, #12]
SYS_ARCH_PROTECT(old_level);
801150e: f00b fb75 bl 801cbfc <sys_arch_protect>
8011512: 60b8 str r0, [r7, #8]
#if MEMP_MEM_MALLOC
LWIP_UNUSED_ARG(desc);
SYS_ARCH_UNPROTECT(old_level);
mem_free(memp);
#else /* MEMP_MEM_MALLOC */
memp->next = *desc->tab;
8011514: 687b ldr r3, [r7, #4]
8011516: 689b ldr r3, [r3, #8]
8011518: 681a ldr r2, [r3, #0]
801151a: 68fb ldr r3, [r7, #12]
801151c: 601a str r2, [r3, #0]
*desc->tab = memp;
801151e: 687b ldr r3, [r7, #4]
8011520: 689b ldr r3, [r3, #8]
8011522: 68fa ldr r2, [r7, #12]
8011524: 601a str r2, [r3, #0]
#if MEMP_SANITY_CHECK
LWIP_ASSERT("memp sanity", memp_sanity(desc));
#endif /* MEMP_SANITY_CHECK */
SYS_ARCH_UNPROTECT(old_level);
8011526: 68b8 ldr r0, [r7, #8]
8011528: f00b fb76 bl 801cc18 <sys_arch_unprotect>
#endif /* !MEMP_MEM_MALLOC */
}
801152c: bf00 nop
801152e: 3710 adds r7, #16
8011530: 46bd mov sp, r7
8011532: bd80 pop {r7, pc}
8011534: 0801e36c .word 0x0801e36c
8011538: 0801e41c .word 0x0801e41c
801153c: 0801e3c0 .word 0x0801e3c0
08011540 <memp_free>:
* @param type the pool where to put mem
* @param mem the memp element to free
*/
void
memp_free(memp_t type, void *mem)
{
8011540: b580 push {r7, lr}
8011542: b082 sub sp, #8
8011544: af00 add r7, sp, #0
8011546: 4603 mov r3, r0
8011548: 6039 str r1, [r7, #0]
801154a: 71fb strb r3, [r7, #7]
#ifdef LWIP_HOOK_MEMP_AVAILABLE
struct memp *old_first;
#endif
LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;);
801154c: 79fb ldrb r3, [r7, #7]
801154e: 2b0c cmp r3, #12
8011550: d907 bls.n 8011562 <memp_free+0x22>
8011552: 4b0c ldr r3, [pc, #48] ; (8011584 <memp_free+0x44>)
8011554: f44f 72d5 mov.w r2, #426 ; 0x1aa
8011558: 490b ldr r1, [pc, #44] ; (8011588 <memp_free+0x48>)
801155a: 480c ldr r0, [pc, #48] ; (801158c <memp_free+0x4c>)
801155c: f00b fbcc bl 801ccf8 <iprintf>
8011560: e00c b.n 801157c <memp_free+0x3c>
if (mem == NULL) {
8011562: 683b ldr r3, [r7, #0]
8011564: 2b00 cmp r3, #0
8011566: d008 beq.n 801157a <memp_free+0x3a>
#ifdef LWIP_HOOK_MEMP_AVAILABLE
old_first = *memp_pools[type]->tab;
#endif
do_memp_free_pool(memp_pools[type], mem);
8011568: 79fb ldrb r3, [r7, #7]
801156a: 4a09 ldr r2, [pc, #36] ; (8011590 <memp_free+0x50>)
801156c: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8011570: 6839 ldr r1, [r7, #0]
8011572: 4618 mov r0, r3
8011574: f7ff ffb8 bl 80114e8 <do_memp_free_pool>
8011578: e000 b.n 801157c <memp_free+0x3c>
return;
801157a: bf00 nop
#ifdef LWIP_HOOK_MEMP_AVAILABLE
if (old_first == NULL) {
LWIP_HOOK_MEMP_AVAILABLE(type);
}
#endif
}
801157c: 3708 adds r7, #8
801157e: 46bd mov sp, r7
8011580: bd80 pop {r7, pc}
8011582: bf00 nop
8011584: 0801e36c .word 0x0801e36c
8011588: 0801e43c .word 0x0801e43c
801158c: 0801e3c0 .word 0x0801e3c0
8011590: 08022e24 .word 0x08022e24
08011594 <netif_init>:
}
#endif /* LWIP_HAVE_LOOPIF */
void
netif_init(void)
{
8011594: b480 push {r7}
8011596: af00 add r7, sp, #0
netif_set_link_up(&loop_netif);
netif_set_up(&loop_netif);
#endif /* LWIP_HAVE_LOOPIF */
}
8011598: bf00 nop
801159a: 46bd mov sp, r7
801159c: f85d 7b04 ldr.w r7, [sp], #4
80115a0: 4770 bx lr
...
080115a4 <netif_add>:
netif_add(struct netif *netif,
#if LWIP_IPV4
const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
#endif /* LWIP_IPV4 */
void *state, netif_init_fn init, netif_input_fn input)
{
80115a4: b580 push {r7, lr}
80115a6: b086 sub sp, #24
80115a8: af00 add r7, sp, #0
80115aa: 60f8 str r0, [r7, #12]
80115ac: 60b9 str r1, [r7, #8]
80115ae: 607a str r2, [r7, #4]
80115b0: 603b str r3, [r7, #0]
LWIP_ASSERT("single netif already set", 0);
return NULL;
}
#endif
LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL);
80115b2: 68fb ldr r3, [r7, #12]
80115b4: 2b00 cmp r3, #0
80115b6: d108 bne.n 80115ca <netif_add+0x26>
80115b8: 4b5b ldr r3, [pc, #364] ; (8011728 <netif_add+0x184>)
80115ba: f240 1227 movw r2, #295 ; 0x127
80115be: 495b ldr r1, [pc, #364] ; (801172c <netif_add+0x188>)
80115c0: 485b ldr r0, [pc, #364] ; (8011730 <netif_add+0x18c>)
80115c2: f00b fb99 bl 801ccf8 <iprintf>
80115c6: 2300 movs r3, #0
80115c8: e0a9 b.n 801171e <netif_add+0x17a>
LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
80115ca: 6a7b ldr r3, [r7, #36] ; 0x24
80115cc: 2b00 cmp r3, #0
80115ce: d108 bne.n 80115e2 <netif_add+0x3e>
80115d0: 4b55 ldr r3, [pc, #340] ; (8011728 <netif_add+0x184>)
80115d2: f44f 7294 mov.w r2, #296 ; 0x128
80115d6: 4957 ldr r1, [pc, #348] ; (8011734 <netif_add+0x190>)
80115d8: 4855 ldr r0, [pc, #340] ; (8011730 <netif_add+0x18c>)
80115da: f00b fb8d bl 801ccf8 <iprintf>
80115de: 2300 movs r3, #0
80115e0: e09d b.n 801171e <netif_add+0x17a>
#if LWIP_IPV4
if (ipaddr == NULL) {
80115e2: 68bb ldr r3, [r7, #8]
80115e4: 2b00 cmp r3, #0
80115e6: d101 bne.n 80115ec <netif_add+0x48>
ipaddr = ip_2_ip4(IP4_ADDR_ANY);
80115e8: 4b53 ldr r3, [pc, #332] ; (8011738 <netif_add+0x194>)
80115ea: 60bb str r3, [r7, #8]
}
if (netmask == NULL) {
80115ec: 687b ldr r3, [r7, #4]
80115ee: 2b00 cmp r3, #0
80115f0: d101 bne.n 80115f6 <netif_add+0x52>
netmask = ip_2_ip4(IP4_ADDR_ANY);
80115f2: 4b51 ldr r3, [pc, #324] ; (8011738 <netif_add+0x194>)
80115f4: 607b str r3, [r7, #4]
}
if (gw == NULL) {
80115f6: 683b ldr r3, [r7, #0]
80115f8: 2b00 cmp r3, #0
80115fa: d101 bne.n 8011600 <netif_add+0x5c>
gw = ip_2_ip4(IP4_ADDR_ANY);
80115fc: 4b4e ldr r3, [pc, #312] ; (8011738 <netif_add+0x194>)
80115fe: 603b str r3, [r7, #0]
}
/* reset new interface configuration state */
ip_addr_set_zero_ip4(&netif->ip_addr);
8011600: 68fb ldr r3, [r7, #12]
8011602: 2200 movs r2, #0
8011604: 605a str r2, [r3, #4]
ip_addr_set_zero_ip4(&netif->netmask);
8011606: 68fb ldr r3, [r7, #12]
8011608: 2200 movs r2, #0
801160a: 609a str r2, [r3, #8]
ip_addr_set_zero_ip4(&netif->gw);
801160c: 68fb ldr r3, [r7, #12]
801160e: 2200 movs r2, #0
8011610: 60da str r2, [r3, #12]
netif->output = netif_null_output_ip4;
8011612: 68fb ldr r3, [r7, #12]
8011614: 4a49 ldr r2, [pc, #292] ; (801173c <netif_add+0x198>)
8011616: 615a str r2, [r3, #20]
#endif /* LWIP_IPV6_ADDRESS_LIFETIMES */
}
netif->output_ip6 = netif_null_output_ip6;
#endif /* LWIP_IPV6 */
NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_ENABLE_ALL);
netif->mtu = 0;
8011618: 68fb ldr r3, [r7, #12]
801161a: 2200 movs r2, #0
801161c: 851a strh r2, [r3, #40] ; 0x28
netif->flags = 0;
801161e: 68fb ldr r3, [r7, #12]
8011620: 2200 movs r2, #0
8011622: f883 2031 strb.w r2, [r3, #49] ; 0x31
#ifdef netif_get_client_data
memset(netif->client_data, 0, sizeof(netif->client_data));
8011626: 68fb ldr r3, [r7, #12]
8011628: 3324 adds r3, #36 ; 0x24
801162a: 2204 movs r2, #4
801162c: 2100 movs r1, #0
801162e: 4618 mov r0, r3
8011630: f00b fb59 bl 801cce6 <memset>
#endif /* LWIP_IPV6 */
#if LWIP_NETIF_STATUS_CALLBACK
netif->status_callback = NULL;
#endif /* LWIP_NETIF_STATUS_CALLBACK */
#if LWIP_NETIF_LINK_CALLBACK
netif->link_callback = NULL;
8011634: 68fb ldr r3, [r7, #12]
8011636: 2200 movs r2, #0
8011638: 61da str r2, [r3, #28]
netif->loop_first = NULL;
netif->loop_last = NULL;
#endif /* ENABLE_LOOPBACK */
/* remember netif specific state information data */
netif->state = state;
801163a: 68fb ldr r3, [r7, #12]
801163c: 6a3a ldr r2, [r7, #32]
801163e: 621a str r2, [r3, #32]
netif->num = netif_num;
8011640: 4b3f ldr r3, [pc, #252] ; (8011740 <netif_add+0x19c>)
8011642: 781a ldrb r2, [r3, #0]
8011644: 68fb ldr r3, [r7, #12]
8011646: f883 2034 strb.w r2, [r3, #52] ; 0x34
netif->input = input;
801164a: 68fb ldr r3, [r7, #12]
801164c: 6aba ldr r2, [r7, #40] ; 0x28
801164e: 611a str r2, [r3, #16]
#if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS
netif->loop_cnt_current = 0;
#endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */
#if LWIP_IPV4
netif_set_addr(netif, ipaddr, netmask, gw);
8011650: 683b ldr r3, [r7, #0]
8011652: 687a ldr r2, [r7, #4]
8011654: 68b9 ldr r1, [r7, #8]
8011656: 68f8 ldr r0, [r7, #12]
8011658: f000 f914 bl 8011884 <netif_set_addr>
#endif /* LWIP_IPV4 */
/* call user specified initialization function for netif */
if (init(netif) != ERR_OK) {
801165c: 6a7b ldr r3, [r7, #36] ; 0x24
801165e: 68f8 ldr r0, [r7, #12]
8011660: 4798 blx r3
8011662: 4603 mov r3, r0
8011664: 2b00 cmp r3, #0
8011666: d001 beq.n 801166c <netif_add+0xc8>
return NULL;
8011668: 2300 movs r3, #0
801166a: e058 b.n 801171e <netif_add+0x17a>
*/
{
struct netif *netif2;
int num_netifs;
do {
if (netif->num == 255) {
801166c: 68fb ldr r3, [r7, #12]
801166e: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8011672: 2bff cmp r3, #255 ; 0xff
8011674: d103 bne.n 801167e <netif_add+0xda>
netif->num = 0;
8011676: 68fb ldr r3, [r7, #12]
8011678: 2200 movs r2, #0
801167a: f883 2034 strb.w r2, [r3, #52] ; 0x34
}
num_netifs = 0;
801167e: 2300 movs r3, #0
8011680: 613b str r3, [r7, #16]
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
8011682: 4b30 ldr r3, [pc, #192] ; (8011744 <netif_add+0x1a0>)
8011684: 681b ldr r3, [r3, #0]
8011686: 617b str r3, [r7, #20]
8011688: e02b b.n 80116e2 <netif_add+0x13e>
LWIP_ASSERT("netif already added", netif2 != netif);
801168a: 697a ldr r2, [r7, #20]
801168c: 68fb ldr r3, [r7, #12]
801168e: 429a cmp r2, r3
8011690: d106 bne.n 80116a0 <netif_add+0xfc>
8011692: 4b25 ldr r3, [pc, #148] ; (8011728 <netif_add+0x184>)
8011694: f240 128b movw r2, #395 ; 0x18b
8011698: 492b ldr r1, [pc, #172] ; (8011748 <netif_add+0x1a4>)
801169a: 4825 ldr r0, [pc, #148] ; (8011730 <netif_add+0x18c>)
801169c: f00b fb2c bl 801ccf8 <iprintf>
num_netifs++;
80116a0: 693b ldr r3, [r7, #16]
80116a2: 3301 adds r3, #1
80116a4: 613b str r3, [r7, #16]
LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255);
80116a6: 693b ldr r3, [r7, #16]
80116a8: 2bff cmp r3, #255 ; 0xff
80116aa: dd06 ble.n 80116ba <netif_add+0x116>
80116ac: 4b1e ldr r3, [pc, #120] ; (8011728 <netif_add+0x184>)
80116ae: f240 128d movw r2, #397 ; 0x18d
80116b2: 4926 ldr r1, [pc, #152] ; (801174c <netif_add+0x1a8>)
80116b4: 481e ldr r0, [pc, #120] ; (8011730 <netif_add+0x18c>)
80116b6: f00b fb1f bl 801ccf8 <iprintf>
if (netif2->num == netif->num) {
80116ba: 697b ldr r3, [r7, #20]
80116bc: f893 2034 ldrb.w r2, [r3, #52] ; 0x34
80116c0: 68fb ldr r3, [r7, #12]
80116c2: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80116c6: 429a cmp r2, r3
80116c8: d108 bne.n 80116dc <netif_add+0x138>
netif->num++;
80116ca: 68fb ldr r3, [r7, #12]
80116cc: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80116d0: 3301 adds r3, #1
80116d2: b2da uxtb r2, r3
80116d4: 68fb ldr r3, [r7, #12]
80116d6: f883 2034 strb.w r2, [r3, #52] ; 0x34
break;
80116da: e005 b.n 80116e8 <netif_add+0x144>
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
80116dc: 697b ldr r3, [r7, #20]
80116de: 681b ldr r3, [r3, #0]
80116e0: 617b str r3, [r7, #20]
80116e2: 697b ldr r3, [r7, #20]
80116e4: 2b00 cmp r3, #0
80116e6: d1d0 bne.n 801168a <netif_add+0xe6>
}
}
} while (netif2 != NULL);
80116e8: 697b ldr r3, [r7, #20]
80116ea: 2b00 cmp r3, #0
80116ec: d1be bne.n 801166c <netif_add+0xc8>
}
if (netif->num == 254) {
80116ee: 68fb ldr r3, [r7, #12]
80116f0: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80116f4: 2bfe cmp r3, #254 ; 0xfe
80116f6: d103 bne.n 8011700 <netif_add+0x15c>
netif_num = 0;
80116f8: 4b11 ldr r3, [pc, #68] ; (8011740 <netif_add+0x19c>)
80116fa: 2200 movs r2, #0
80116fc: 701a strb r2, [r3, #0]
80116fe: e006 b.n 801170e <netif_add+0x16a>
} else {
netif_num = (u8_t)(netif->num + 1);
8011700: 68fb ldr r3, [r7, #12]
8011702: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8011706: 3301 adds r3, #1
8011708: b2da uxtb r2, r3
801170a: 4b0d ldr r3, [pc, #52] ; (8011740 <netif_add+0x19c>)
801170c: 701a strb r2, [r3, #0]
}
/* add this netif to the list */
netif->next = netif_list;
801170e: 4b0d ldr r3, [pc, #52] ; (8011744 <netif_add+0x1a0>)
8011710: 681a ldr r2, [r3, #0]
8011712: 68fb ldr r3, [r7, #12]
8011714: 601a str r2, [r3, #0]
netif_list = netif;
8011716: 4a0b ldr r2, [pc, #44] ; (8011744 <netif_add+0x1a0>)
8011718: 68fb ldr r3, [r7, #12]
801171a: 6013 str r3, [r2, #0]
#endif /* LWIP_IPV4 */
LWIP_DEBUGF(NETIF_DEBUG, ("\n"));
netif_invoke_ext_callback(netif, LWIP_NSC_NETIF_ADDED, NULL);
return netif;
801171c: 68fb ldr r3, [r7, #12]
}
801171e: 4618 mov r0, r3
8011720: 3718 adds r7, #24
8011722: 46bd mov sp, r7
8011724: bd80 pop {r7, pc}
8011726: bf00 nop
8011728: 0801e458 .word 0x0801e458
801172c: 0801e4ec .word 0x0801e4ec
8011730: 0801e4a8 .word 0x0801e4a8
8011734: 0801e508 .word 0x0801e508
8011738: 08022ea8 .word 0x08022ea8
801173c: 08011b67 .word 0x08011b67
8011740: 20008728 .word 0x20008728
8011744: 2000f7ec .word 0x2000f7ec
8011748: 0801e52c .word 0x0801e52c
801174c: 0801e540 .word 0x0801e540
08011750 <netif_do_ip_addr_changed>:
static void
netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
{
8011750: b580 push {r7, lr}
8011752: b082 sub sp, #8
8011754: af00 add r7, sp, #0
8011756: 6078 str r0, [r7, #4]
8011758: 6039 str r1, [r7, #0]
#if LWIP_TCP
tcp_netif_ip_addr_changed(old_addr, new_addr);
801175a: 6839 ldr r1, [r7, #0]
801175c: 6878 ldr r0, [r7, #4]
801175e: f002 fb81 bl 8013e64 <tcp_netif_ip_addr_changed>
#endif /* LWIP_TCP */
#if LWIP_UDP
udp_netif_ip_addr_changed(old_addr, new_addr);
8011762: 6839 ldr r1, [r7, #0]
8011764: 6878 ldr r0, [r7, #4]
8011766: f006 ffa1 bl 80186ac <udp_netif_ip_addr_changed>
#endif /* LWIP_UDP */
#if LWIP_RAW
raw_netif_ip_addr_changed(old_addr, new_addr);
#endif /* LWIP_RAW */
}
801176a: bf00 nop
801176c: 3708 adds r7, #8
801176e: 46bd mov sp, r7
8011770: bd80 pop {r7, pc}
...
08011774 <netif_do_set_ipaddr>:
#if LWIP_IPV4
static int
netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *old_addr)
{
8011774: b580 push {r7, lr}
8011776: b086 sub sp, #24
8011778: af00 add r7, sp, #0
801177a: 60f8 str r0, [r7, #12]
801177c: 60b9 str r1, [r7, #8]
801177e: 607a str r2, [r7, #4]
LWIP_ASSERT("invalid pointer", ipaddr != NULL);
8011780: 68bb ldr r3, [r7, #8]
8011782: 2b00 cmp r3, #0
8011784: d106 bne.n 8011794 <netif_do_set_ipaddr+0x20>
8011786: 4b1d ldr r3, [pc, #116] ; (80117fc <netif_do_set_ipaddr+0x88>)
8011788: f240 12cb movw r2, #459 ; 0x1cb
801178c: 491c ldr r1, [pc, #112] ; (8011800 <netif_do_set_ipaddr+0x8c>)
801178e: 481d ldr r0, [pc, #116] ; (8011804 <netif_do_set_ipaddr+0x90>)
8011790: f00b fab2 bl 801ccf8 <iprintf>
LWIP_ASSERT("invalid pointer", old_addr != NULL);
8011794: 687b ldr r3, [r7, #4]
8011796: 2b00 cmp r3, #0
8011798: d106 bne.n 80117a8 <netif_do_set_ipaddr+0x34>
801179a: 4b18 ldr r3, [pc, #96] ; (80117fc <netif_do_set_ipaddr+0x88>)
801179c: f44f 72e6 mov.w r2, #460 ; 0x1cc
80117a0: 4917 ldr r1, [pc, #92] ; (8011800 <netif_do_set_ipaddr+0x8c>)
80117a2: 4818 ldr r0, [pc, #96] ; (8011804 <netif_do_set_ipaddr+0x90>)
80117a4: f00b faa8 bl 801ccf8 <iprintf>
/* address is actually being changed? */
if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) {
80117a8: 68bb ldr r3, [r7, #8]
80117aa: 681a ldr r2, [r3, #0]
80117ac: 68fb ldr r3, [r7, #12]
80117ae: 3304 adds r3, #4
80117b0: 681b ldr r3, [r3, #0]
80117b2: 429a cmp r2, r3
80117b4: d01c beq.n 80117f0 <netif_do_set_ipaddr+0x7c>
ip_addr_t new_addr;
*ip_2_ip4(&new_addr) = *ipaddr;
80117b6: 68bb ldr r3, [r7, #8]
80117b8: 681b ldr r3, [r3, #0]
80117ba: 617b str r3, [r7, #20]
IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4);
ip_addr_copy(*old_addr, *netif_ip_addr4(netif));
80117bc: 68fb ldr r3, [r7, #12]
80117be: 3304 adds r3, #4
80117c0: 681a ldr r2, [r3, #0]
80117c2: 687b ldr r3, [r7, #4]
80117c4: 601a str r2, [r3, #0]
LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n"));
netif_do_ip_addr_changed(old_addr, &new_addr);
80117c6: f107 0314 add.w r3, r7, #20
80117ca: 4619 mov r1, r3
80117cc: 6878 ldr r0, [r7, #4]
80117ce: f7ff ffbf bl 8011750 <netif_do_ip_addr_changed>
mib2_remove_ip4(netif);
mib2_remove_route_ip4(0, netif);
/* set new IP address to netif */
ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr);
80117d2: 68bb ldr r3, [r7, #8]
80117d4: 2b00 cmp r3, #0
80117d6: d002 beq.n 80117de <netif_do_set_ipaddr+0x6a>
80117d8: 68bb ldr r3, [r7, #8]
80117da: 681b ldr r3, [r3, #0]
80117dc: e000 b.n 80117e0 <netif_do_set_ipaddr+0x6c>
80117de: 2300 movs r3, #0
80117e0: 68fa ldr r2, [r7, #12]
80117e2: 6053 str r3, [r2, #4]
IP_SET_TYPE_VAL(netif->ip_addr, IPADDR_TYPE_V4);
mib2_add_ip4(netif);
mib2_add_route_ip4(0, netif);
netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4);
80117e4: 2101 movs r1, #1
80117e6: 68f8 ldr r0, [r7, #12]
80117e8: f000 f8d2 bl 8011990 <netif_issue_reports>
NETIF_STATUS_CALLBACK(netif);
return 1; /* address changed */
80117ec: 2301 movs r3, #1
80117ee: e000 b.n 80117f2 <netif_do_set_ipaddr+0x7e>
}
return 0; /* address unchanged */
80117f0: 2300 movs r3, #0
}
80117f2: 4618 mov r0, r3
80117f4: 3718 adds r7, #24
80117f6: 46bd mov sp, r7
80117f8: bd80 pop {r7, pc}
80117fa: bf00 nop
80117fc: 0801e458 .word 0x0801e458
8011800: 0801e570 .word 0x0801e570
8011804: 0801e4a8 .word 0x0801e4a8
08011808 <netif_do_set_netmask>:
}
}
static int
netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm)
{
8011808: b480 push {r7}
801180a: b085 sub sp, #20
801180c: af00 add r7, sp, #0
801180e: 60f8 str r0, [r7, #12]
8011810: 60b9 str r1, [r7, #8]
8011812: 607a str r2, [r7, #4]
/* address is actually being changed? */
if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) {
8011814: 68bb ldr r3, [r7, #8]
8011816: 681a ldr r2, [r3, #0]
8011818: 68fb ldr r3, [r7, #12]
801181a: 3308 adds r3, #8
801181c: 681b ldr r3, [r3, #0]
801181e: 429a cmp r2, r3
8011820: d00a beq.n 8011838 <netif_do_set_netmask+0x30>
#else
LWIP_UNUSED_ARG(old_nm);
#endif
mib2_remove_route_ip4(0, netif);
/* set new netmask to netif */
ip4_addr_set(ip_2_ip4(&netif->netmask), netmask);
8011822: 68bb ldr r3, [r7, #8]
8011824: 2b00 cmp r3, #0
8011826: d002 beq.n 801182e <netif_do_set_netmask+0x26>
8011828: 68bb ldr r3, [r7, #8]
801182a: 681b ldr r3, [r3, #0]
801182c: e000 b.n 8011830 <netif_do_set_netmask+0x28>
801182e: 2300 movs r3, #0
8011830: 68fa ldr r2, [r7, #12]
8011832: 6093 str r3, [r2, #8]
netif->name[0], netif->name[1],
ip4_addr1_16(netif_ip4_netmask(netif)),
ip4_addr2_16(netif_ip4_netmask(netif)),
ip4_addr3_16(netif_ip4_netmask(netif)),
ip4_addr4_16(netif_ip4_netmask(netif))));
return 1; /* netmask changed */
8011834: 2301 movs r3, #1
8011836: e000 b.n 801183a <netif_do_set_netmask+0x32>
}
return 0; /* netmask unchanged */
8011838: 2300 movs r3, #0
}
801183a: 4618 mov r0, r3
801183c: 3714 adds r7, #20
801183e: 46bd mov sp, r7
8011840: f85d 7b04 ldr.w r7, [sp], #4
8011844: 4770 bx lr
08011846 <netif_do_set_gw>:
}
}
static int
netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw)
{
8011846: b480 push {r7}
8011848: b085 sub sp, #20
801184a: af00 add r7, sp, #0
801184c: 60f8 str r0, [r7, #12]
801184e: 60b9 str r1, [r7, #8]
8011850: 607a str r2, [r7, #4]
/* address is actually being changed? */
if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) {
8011852: 68bb ldr r3, [r7, #8]
8011854: 681a ldr r2, [r3, #0]
8011856: 68fb ldr r3, [r7, #12]
8011858: 330c adds r3, #12
801185a: 681b ldr r3, [r3, #0]
801185c: 429a cmp r2, r3
801185e: d00a beq.n 8011876 <netif_do_set_gw+0x30>
ip_addr_copy(*old_gw, *netif_ip_gw4(netif));
#else
LWIP_UNUSED_ARG(old_gw);
#endif
ip4_addr_set(ip_2_ip4(&netif->gw), gw);
8011860: 68bb ldr r3, [r7, #8]
8011862: 2b00 cmp r3, #0
8011864: d002 beq.n 801186c <netif_do_set_gw+0x26>
8011866: 68bb ldr r3, [r7, #8]
8011868: 681b ldr r3, [r3, #0]
801186a: e000 b.n 801186e <netif_do_set_gw+0x28>
801186c: 2300 movs r3, #0
801186e: 68fa ldr r2, [r7, #12]
8011870: 60d3 str r3, [r2, #12]
netif->name[0], netif->name[1],
ip4_addr1_16(netif_ip4_gw(netif)),
ip4_addr2_16(netif_ip4_gw(netif)),
ip4_addr3_16(netif_ip4_gw(netif)),
ip4_addr4_16(netif_ip4_gw(netif))));
return 1; /* gateway changed */
8011872: 2301 movs r3, #1
8011874: e000 b.n 8011878 <netif_do_set_gw+0x32>
}
return 0; /* gateway unchanged */
8011876: 2300 movs r3, #0
}
8011878: 4618 mov r0, r3
801187a: 3714 adds r7, #20
801187c: 46bd mov sp, r7
801187e: f85d 7b04 ldr.w r7, [sp], #4
8011882: 4770 bx lr
08011884 <netif_set_addr>:
* @param gw the new default gateway
*/
void
netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,
const ip4_addr_t *gw)
{
8011884: b580 push {r7, lr}
8011886: b088 sub sp, #32
8011888: af00 add r7, sp, #0
801188a: 60f8 str r0, [r7, #12]
801188c: 60b9 str r1, [r7, #8]
801188e: 607a str r2, [r7, #4]
8011890: 603b str r3, [r7, #0]
ip_addr_t old_nm_val;
ip_addr_t old_gw_val;
ip_addr_t *old_nm = &old_nm_val;
ip_addr_t *old_gw = &old_gw_val;
#else
ip_addr_t *old_nm = NULL;
8011892: 2300 movs r3, #0
8011894: 61fb str r3, [r7, #28]
ip_addr_t *old_gw = NULL;
8011896: 2300 movs r3, #0
8011898: 61bb str r3, [r7, #24]
int remove;
LWIP_ASSERT_CORE_LOCKED();
/* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
if (ipaddr == NULL) {
801189a: 68bb ldr r3, [r7, #8]
801189c: 2b00 cmp r3, #0
801189e: d101 bne.n 80118a4 <netif_set_addr+0x20>
ipaddr = IP4_ADDR_ANY4;
80118a0: 4b1c ldr r3, [pc, #112] ; (8011914 <netif_set_addr+0x90>)
80118a2: 60bb str r3, [r7, #8]
}
if (netmask == NULL) {
80118a4: 687b ldr r3, [r7, #4]
80118a6: 2b00 cmp r3, #0
80118a8: d101 bne.n 80118ae <netif_set_addr+0x2a>
netmask = IP4_ADDR_ANY4;
80118aa: 4b1a ldr r3, [pc, #104] ; (8011914 <netif_set_addr+0x90>)
80118ac: 607b str r3, [r7, #4]
}
if (gw == NULL) {
80118ae: 683b ldr r3, [r7, #0]
80118b0: 2b00 cmp r3, #0
80118b2: d101 bne.n 80118b8 <netif_set_addr+0x34>
gw = IP4_ADDR_ANY4;
80118b4: 4b17 ldr r3, [pc, #92] ; (8011914 <netif_set_addr+0x90>)
80118b6: 603b str r3, [r7, #0]
}
remove = ip4_addr_isany(ipaddr);
80118b8: 68bb ldr r3, [r7, #8]
80118ba: 2b00 cmp r3, #0
80118bc: d003 beq.n 80118c6 <netif_set_addr+0x42>
80118be: 68bb ldr r3, [r7, #8]
80118c0: 681b ldr r3, [r3, #0]
80118c2: 2b00 cmp r3, #0
80118c4: d101 bne.n 80118ca <netif_set_addr+0x46>
80118c6: 2301 movs r3, #1
80118c8: e000 b.n 80118cc <netif_set_addr+0x48>
80118ca: 2300 movs r3, #0
80118cc: 617b str r3, [r7, #20]
if (remove) {
80118ce: 697b ldr r3, [r7, #20]
80118d0: 2b00 cmp r3, #0
80118d2: d006 beq.n 80118e2 <netif_set_addr+0x5e>
/* when removing an address, we have to remove it *before* changing netmask/gw
to ensure that tcp RST segment can be sent correctly */
if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) {
80118d4: f107 0310 add.w r3, r7, #16
80118d8: 461a mov r2, r3
80118da: 68b9 ldr r1, [r7, #8]
80118dc: 68f8 ldr r0, [r7, #12]
80118de: f7ff ff49 bl 8011774 <netif_do_set_ipaddr>
change_reason |= LWIP_NSC_IPV4_ADDRESS_CHANGED;
cb_args.ipv4_changed.old_address = &old_addr;
#endif
}
}
if (netif_do_set_netmask(netif, netmask, old_nm)) {
80118e2: 69fa ldr r2, [r7, #28]
80118e4: 6879 ldr r1, [r7, #4]
80118e6: 68f8 ldr r0, [r7, #12]
80118e8: f7ff ff8e bl 8011808 <netif_do_set_netmask>
#if LWIP_NETIF_EXT_STATUS_CALLBACK
change_reason |= LWIP_NSC_IPV4_NETMASK_CHANGED;
cb_args.ipv4_changed.old_netmask = old_nm;
#endif
}
if (netif_do_set_gw(netif, gw, old_gw)) {
80118ec: 69ba ldr r2, [r7, #24]
80118ee: 6839 ldr r1, [r7, #0]
80118f0: 68f8 ldr r0, [r7, #12]
80118f2: f7ff ffa8 bl 8011846 <netif_do_set_gw>
#if LWIP_NETIF_EXT_STATUS_CALLBACK
change_reason |= LWIP_NSC_IPV4_GATEWAY_CHANGED;
cb_args.ipv4_changed.old_gw = old_gw;
#endif
}
if (!remove) {
80118f6: 697b ldr r3, [r7, #20]
80118f8: 2b00 cmp r3, #0
80118fa: d106 bne.n 801190a <netif_set_addr+0x86>
/* set ipaddr last to ensure netmask/gw have been set when status callback is called */
if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) {
80118fc: f107 0310 add.w r3, r7, #16
8011900: 461a mov r2, r3
8011902: 68b9 ldr r1, [r7, #8]
8011904: 68f8 ldr r0, [r7, #12]
8011906: f7ff ff35 bl 8011774 <netif_do_set_ipaddr>
if (change_reason != LWIP_NSC_NONE) {
change_reason |= LWIP_NSC_IPV4_SETTINGS_CHANGED;
netif_invoke_ext_callback(netif, change_reason, &cb_args);
}
#endif
}
801190a: bf00 nop
801190c: 3720 adds r7, #32
801190e: 46bd mov sp, r7
8011910: bd80 pop {r7, pc}
8011912: bf00 nop
8011914: 08022ea8 .word 0x08022ea8
08011918 <netif_set_default>:
*
* @param netif the default network interface
*/
void
netif_set_default(struct netif *netif)
{
8011918: b480 push {r7}
801191a: b083 sub sp, #12
801191c: af00 add r7, sp, #0
801191e: 6078 str r0, [r7, #4]
mib2_remove_route_ip4(1, netif);
} else {
/* install default route */
mib2_add_route_ip4(1, netif);
}
netif_default = netif;
8011920: 4a04 ldr r2, [pc, #16] ; (8011934 <netif_set_default+0x1c>)
8011922: 687b ldr r3, [r7, #4]
8011924: 6013 str r3, [r2, #0]
LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n",
netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\''));
}
8011926: bf00 nop
8011928: 370c adds r7, #12
801192a: 46bd mov sp, r7
801192c: f85d 7b04 ldr.w r7, [sp], #4
8011930: 4770 bx lr
8011932: bf00 nop
8011934: 2000f7f0 .word 0x2000f7f0
08011938 <netif_set_up>:
* Bring an interface up, available for processing
* traffic.
*/
void
netif_set_up(struct netif *netif)
{
8011938: b580 push {r7, lr}
801193a: b082 sub sp, #8
801193c: af00 add r7, sp, #0
801193e: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
8011940: 687b ldr r3, [r7, #4]
8011942: 2b00 cmp r3, #0
8011944: d107 bne.n 8011956 <netif_set_up+0x1e>
8011946: 4b0f ldr r3, [pc, #60] ; (8011984 <netif_set_up+0x4c>)
8011948: f44f 7254 mov.w r2, #848 ; 0x350
801194c: 490e ldr r1, [pc, #56] ; (8011988 <netif_set_up+0x50>)
801194e: 480f ldr r0, [pc, #60] ; (801198c <netif_set_up+0x54>)
8011950: f00b f9d2 bl 801ccf8 <iprintf>
8011954: e013 b.n 801197e <netif_set_up+0x46>
if (!(netif->flags & NETIF_FLAG_UP)) {
8011956: 687b ldr r3, [r7, #4]
8011958: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801195c: f003 0301 and.w r3, r3, #1
8011960: 2b00 cmp r3, #0
8011962: d10c bne.n 801197e <netif_set_up+0x46>
netif_set_flags(netif, NETIF_FLAG_UP);
8011964: 687b ldr r3, [r7, #4]
8011966: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801196a: f043 0301 orr.w r3, r3, #1
801196e: b2da uxtb r2, r3
8011970: 687b ldr r3, [r7, #4]
8011972: f883 2031 strb.w r2, [r3, #49] ; 0x31
args.status_changed.state = 1;
netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args);
}
#endif
netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6);
8011976: 2103 movs r1, #3
8011978: 6878 ldr r0, [r7, #4]
801197a: f000 f809 bl 8011990 <netif_issue_reports>
#if LWIP_IPV6
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
}
}
801197e: 3708 adds r7, #8
8011980: 46bd mov sp, r7
8011982: bd80 pop {r7, pc}
8011984: 0801e458 .word 0x0801e458
8011988: 0801e5e0 .word 0x0801e5e0
801198c: 0801e4a8 .word 0x0801e4a8
08011990 <netif_issue_reports>:
/** Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change
*/
static void
netif_issue_reports(struct netif *netif, u8_t report_type)
{
8011990: b580 push {r7, lr}
8011992: b082 sub sp, #8
8011994: af00 add r7, sp, #0
8011996: 6078 str r0, [r7, #4]
8011998: 460b mov r3, r1
801199a: 70fb strb r3, [r7, #3]
LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
801199c: 687b ldr r3, [r7, #4]
801199e: 2b00 cmp r3, #0
80119a0: d106 bne.n 80119b0 <netif_issue_reports+0x20>
80119a2: 4b18 ldr r3, [pc, #96] ; (8011a04 <netif_issue_reports+0x74>)
80119a4: f240 326d movw r2, #877 ; 0x36d
80119a8: 4917 ldr r1, [pc, #92] ; (8011a08 <netif_issue_reports+0x78>)
80119aa: 4818 ldr r0, [pc, #96] ; (8011a0c <netif_issue_reports+0x7c>)
80119ac: f00b f9a4 bl 801ccf8 <iprintf>
/* Only send reports when both link and admin states are up */
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
80119b0: 687b ldr r3, [r7, #4]
80119b2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80119b6: f003 0304 and.w r3, r3, #4
80119ba: 2b00 cmp r3, #0
80119bc: d01e beq.n 80119fc <netif_issue_reports+0x6c>
!(netif->flags & NETIF_FLAG_UP)) {
80119be: 687b ldr r3, [r7, #4]
80119c0: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80119c4: f003 0301 and.w r3, r3, #1
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
80119c8: 2b00 cmp r3, #0
80119ca: d017 beq.n 80119fc <netif_issue_reports+0x6c>
return;
}
#if LWIP_IPV4
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
80119cc: 78fb ldrb r3, [r7, #3]
80119ce: f003 0301 and.w r3, r3, #1
80119d2: 2b00 cmp r3, #0
80119d4: d013 beq.n 80119fe <netif_issue_reports+0x6e>
!ip4_addr_isany_val(*netif_ip4_addr(netif))) {
80119d6: 687b ldr r3, [r7, #4]
80119d8: 3304 adds r3, #4
80119da: 681b ldr r3, [r3, #0]
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
80119dc: 2b00 cmp r3, #0
80119de: d00e beq.n 80119fe <netif_issue_reports+0x6e>
#if LWIP_ARP
/* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */
if (netif->flags & (NETIF_FLAG_ETHARP)) {
80119e0: 687b ldr r3, [r7, #4]
80119e2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80119e6: f003 0308 and.w r3, r3, #8
80119ea: 2b00 cmp r3, #0
80119ec: d007 beq.n 80119fe <netif_issue_reports+0x6e>
etharp_gratuitous(netif);
80119ee: 687b ldr r3, [r7, #4]
80119f0: 3304 adds r3, #4
80119f2: 4619 mov r1, r3
80119f4: 6878 ldr r0, [r7, #4]
80119f6: f009 fc6b bl 801b2d0 <etharp_request>
80119fa: e000 b.n 80119fe <netif_issue_reports+0x6e>
return;
80119fc: bf00 nop
/* send mld memberships */
mld6_report_groups(netif);
#endif /* LWIP_IPV6_MLD */
}
#endif /* LWIP_IPV6 */
}
80119fe: 3708 adds r7, #8
8011a00: 46bd mov sp, r7
8011a02: bd80 pop {r7, pc}
8011a04: 0801e458 .word 0x0801e458
8011a08: 0801e5fc .word 0x0801e5fc
8011a0c: 0801e4a8 .word 0x0801e4a8
08011a10 <netif_set_down>:
* @ingroup netif
* Bring an interface down, disabling any traffic processing.
*/
void
netif_set_down(struct netif *netif)
{
8011a10: b580 push {r7, lr}
8011a12: b082 sub sp, #8
8011a14: af00 add r7, sp, #0
8011a16: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
8011a18: 687b ldr r3, [r7, #4]
8011a1a: 2b00 cmp r3, #0
8011a1c: d107 bne.n 8011a2e <netif_set_down+0x1e>
8011a1e: 4b12 ldr r3, [pc, #72] ; (8011a68 <netif_set_down+0x58>)
8011a20: f240 329b movw r2, #923 ; 0x39b
8011a24: 4911 ldr r1, [pc, #68] ; (8011a6c <netif_set_down+0x5c>)
8011a26: 4812 ldr r0, [pc, #72] ; (8011a70 <netif_set_down+0x60>)
8011a28: f00b f966 bl 801ccf8 <iprintf>
8011a2c: e019 b.n 8011a62 <netif_set_down+0x52>
if (netif->flags & NETIF_FLAG_UP) {
8011a2e: 687b ldr r3, [r7, #4]
8011a30: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011a34: f003 0301 and.w r3, r3, #1
8011a38: 2b00 cmp r3, #0
8011a3a: d012 beq.n 8011a62 <netif_set_down+0x52>
args.status_changed.state = 0;
netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args);
}
#endif
netif_clear_flags(netif, NETIF_FLAG_UP);
8011a3c: 687b ldr r3, [r7, #4]
8011a3e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011a42: f023 0301 bic.w r3, r3, #1
8011a46: b2da uxtb r2, r3
8011a48: 687b ldr r3, [r7, #4]
8011a4a: f883 2031 strb.w r2, [r3, #49] ; 0x31
MIB2_COPY_SYSUPTIME_TO(&netif->ts);
#if LWIP_IPV4 && LWIP_ARP
if (netif->flags & NETIF_FLAG_ETHARP) {
8011a4e: 687b ldr r3, [r7, #4]
8011a50: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011a54: f003 0308 and.w r3, r3, #8
8011a58: 2b00 cmp r3, #0
8011a5a: d002 beq.n 8011a62 <netif_set_down+0x52>
etharp_cleanup_netif(netif);
8011a5c: 6878 ldr r0, [r7, #4]
8011a5e: f008 fff1 bl 801aa44 <etharp_cleanup_netif>
nd6_cleanup_netif(netif);
#endif /* LWIP_IPV6 */
NETIF_STATUS_CALLBACK(netif);
}
}
8011a62: 3708 adds r7, #8
8011a64: 46bd mov sp, r7
8011a66: bd80 pop {r7, pc}
8011a68: 0801e458 .word 0x0801e458
8011a6c: 0801e620 .word 0x0801e620
8011a70: 0801e4a8 .word 0x0801e4a8
08011a74 <netif_set_link_up>:
* @ingroup netif
* Called by a driver when its link goes up
*/
void
netif_set_link_up(struct netif *netif)
{
8011a74: b580 push {r7, lr}
8011a76: b082 sub sp, #8
8011a78: af00 add r7, sp, #0
8011a7a: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return);
8011a7c: 687b ldr r3, [r7, #4]
8011a7e: 2b00 cmp r3, #0
8011a80: d107 bne.n 8011a92 <netif_set_link_up+0x1e>
8011a82: 4b15 ldr r3, [pc, #84] ; (8011ad8 <netif_set_link_up+0x64>)
8011a84: f44f 7278 mov.w r2, #992 ; 0x3e0
8011a88: 4914 ldr r1, [pc, #80] ; (8011adc <netif_set_link_up+0x68>)
8011a8a: 4815 ldr r0, [pc, #84] ; (8011ae0 <netif_set_link_up+0x6c>)
8011a8c: f00b f934 bl 801ccf8 <iprintf>
8011a90: e01e b.n 8011ad0 <netif_set_link_up+0x5c>
if (!(netif->flags & NETIF_FLAG_LINK_UP)) {
8011a92: 687b ldr r3, [r7, #4]
8011a94: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011a98: f003 0304 and.w r3, r3, #4
8011a9c: 2b00 cmp r3, #0
8011a9e: d117 bne.n 8011ad0 <netif_set_link_up+0x5c>
netif_set_flags(netif, NETIF_FLAG_LINK_UP);
8011aa0: 687b ldr r3, [r7, #4]
8011aa2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011aa6: f043 0304 orr.w r3, r3, #4
8011aaa: b2da uxtb r2, r3
8011aac: 687b ldr r3, [r7, #4]
8011aae: f883 2031 strb.w r2, [r3, #49] ; 0x31
#if LWIP_DHCP
dhcp_network_changed(netif);
8011ab2: 6878 ldr r0, [r7, #4]
8011ab4: f007 fa26 bl 8018f04 <dhcp_network_changed>
#if LWIP_AUTOIP
autoip_network_changed(netif);
#endif /* LWIP_AUTOIP */
netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6);
8011ab8: 2103 movs r1, #3
8011aba: 6878 ldr r0, [r7, #4]
8011abc: f7ff ff68 bl 8011990 <netif_issue_reports>
#if LWIP_IPV6
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
NETIF_LINK_CALLBACK(netif);
8011ac0: 687b ldr r3, [r7, #4]
8011ac2: 69db ldr r3, [r3, #28]
8011ac4: 2b00 cmp r3, #0
8011ac6: d003 beq.n 8011ad0 <netif_set_link_up+0x5c>
8011ac8: 687b ldr r3, [r7, #4]
8011aca: 69db ldr r3, [r3, #28]
8011acc: 6878 ldr r0, [r7, #4]
8011ace: 4798 blx r3
args.link_changed.state = 1;
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
}
#endif
}
}
8011ad0: 3708 adds r7, #8
8011ad2: 46bd mov sp, r7
8011ad4: bd80 pop {r7, pc}
8011ad6: bf00 nop
8011ad8: 0801e458 .word 0x0801e458
8011adc: 0801e640 .word 0x0801e640
8011ae0: 0801e4a8 .word 0x0801e4a8
08011ae4 <netif_set_link_down>:
* @ingroup netif
* Called by a driver when its link goes down
*/
void
netif_set_link_down(struct netif *netif)
{
8011ae4: b580 push {r7, lr}
8011ae6: b082 sub sp, #8
8011ae8: af00 add r7, sp, #0
8011aea: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
8011aec: 687b ldr r3, [r7, #4]
8011aee: 2b00 cmp r3, #0
8011af0: d107 bne.n 8011b02 <netif_set_link_down+0x1e>
8011af2: 4b11 ldr r3, [pc, #68] ; (8011b38 <netif_set_link_down+0x54>)
8011af4: f240 4206 movw r2, #1030 ; 0x406
8011af8: 4910 ldr r1, [pc, #64] ; (8011b3c <netif_set_link_down+0x58>)
8011afa: 4811 ldr r0, [pc, #68] ; (8011b40 <netif_set_link_down+0x5c>)
8011afc: f00b f8fc bl 801ccf8 <iprintf>
8011b00: e017 b.n 8011b32 <netif_set_link_down+0x4e>
if (netif->flags & NETIF_FLAG_LINK_UP) {
8011b02: 687b ldr r3, [r7, #4]
8011b04: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011b08: f003 0304 and.w r3, r3, #4
8011b0c: 2b00 cmp r3, #0
8011b0e: d010 beq.n 8011b32 <netif_set_link_down+0x4e>
netif_clear_flags(netif, NETIF_FLAG_LINK_UP);
8011b10: 687b ldr r3, [r7, #4]
8011b12: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011b16: f023 0304 bic.w r3, r3, #4
8011b1a: b2da uxtb r2, r3
8011b1c: 687b ldr r3, [r7, #4]
8011b1e: f883 2031 strb.w r2, [r3, #49] ; 0x31
NETIF_LINK_CALLBACK(netif);
8011b22: 687b ldr r3, [r7, #4]
8011b24: 69db ldr r3, [r3, #28]
8011b26: 2b00 cmp r3, #0
8011b28: d003 beq.n 8011b32 <netif_set_link_down+0x4e>
8011b2a: 687b ldr r3, [r7, #4]
8011b2c: 69db ldr r3, [r3, #28]
8011b2e: 6878 ldr r0, [r7, #4]
8011b30: 4798 blx r3
args.link_changed.state = 0;
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
}
#endif
}
}
8011b32: 3708 adds r7, #8
8011b34: 46bd mov sp, r7
8011b36: bd80 pop {r7, pc}
8011b38: 0801e458 .word 0x0801e458
8011b3c: 0801e664 .word 0x0801e664
8011b40: 0801e4a8 .word 0x0801e4a8
08011b44 <netif_set_link_callback>:
* @ingroup netif
* Set callback to be called when link is brought up/down
*/
void
netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback)
{
8011b44: b480 push {r7}
8011b46: b083 sub sp, #12
8011b48: af00 add r7, sp, #0
8011b4a: 6078 str r0, [r7, #4]
8011b4c: 6039 str r1, [r7, #0]
LWIP_ASSERT_CORE_LOCKED();
if (netif) {
8011b4e: 687b ldr r3, [r7, #4]
8011b50: 2b00 cmp r3, #0
8011b52: d002 beq.n 8011b5a <netif_set_link_callback+0x16>
netif->link_callback = link_callback;
8011b54: 687b ldr r3, [r7, #4]
8011b56: 683a ldr r2, [r7, #0]
8011b58: 61da str r2, [r3, #28]
}
}
8011b5a: bf00 nop
8011b5c: 370c adds r7, #12
8011b5e: 46bd mov sp, r7
8011b60: f85d 7b04 ldr.w r7, [sp], #4
8011b64: 4770 bx lr
08011b66 <netif_null_output_ip4>:
#if LWIP_IPV4
/** Dummy IPv4 output function for netifs not supporting IPv4
*/
static err_t
netif_null_output_ip4(struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr)
{
8011b66: b480 push {r7}
8011b68: b085 sub sp, #20
8011b6a: af00 add r7, sp, #0
8011b6c: 60f8 str r0, [r7, #12]
8011b6e: 60b9 str r1, [r7, #8]
8011b70: 607a str r2, [r7, #4]
LWIP_UNUSED_ARG(netif);
LWIP_UNUSED_ARG(p);
LWIP_UNUSED_ARG(ipaddr);
return ERR_IF;
8011b72: f06f 030b mvn.w r3, #11
}
8011b76: 4618 mov r0, r3
8011b78: 3714 adds r7, #20
8011b7a: 46bd mov sp, r7
8011b7c: f85d 7b04 ldr.w r7, [sp], #4
8011b80: 4770 bx lr
...
08011b84 <netif_get_by_index>:
*
* @param idx index of netif to find
*/
struct netif *
netif_get_by_index(u8_t idx)
{
8011b84: b480 push {r7}
8011b86: b085 sub sp, #20
8011b88: af00 add r7, sp, #0
8011b8a: 4603 mov r3, r0
8011b8c: 71fb strb r3, [r7, #7]
struct netif *netif;
LWIP_ASSERT_CORE_LOCKED();
if (idx != NETIF_NO_INDEX) {
8011b8e: 79fb ldrb r3, [r7, #7]
8011b90: 2b00 cmp r3, #0
8011b92: d013 beq.n 8011bbc <netif_get_by_index+0x38>
NETIF_FOREACH(netif) {
8011b94: 4b0d ldr r3, [pc, #52] ; (8011bcc <netif_get_by_index+0x48>)
8011b96: 681b ldr r3, [r3, #0]
8011b98: 60fb str r3, [r7, #12]
8011b9a: e00c b.n 8011bb6 <netif_get_by_index+0x32>
if (idx == netif_get_index(netif)) {
8011b9c: 68fb ldr r3, [r7, #12]
8011b9e: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8011ba2: 3301 adds r3, #1
8011ba4: b2db uxtb r3, r3
8011ba6: 79fa ldrb r2, [r7, #7]
8011ba8: 429a cmp r2, r3
8011baa: d101 bne.n 8011bb0 <netif_get_by_index+0x2c>
return netif; /* found! */
8011bac: 68fb ldr r3, [r7, #12]
8011bae: e006 b.n 8011bbe <netif_get_by_index+0x3a>
NETIF_FOREACH(netif) {
8011bb0: 68fb ldr r3, [r7, #12]
8011bb2: 681b ldr r3, [r3, #0]
8011bb4: 60fb str r3, [r7, #12]
8011bb6: 68fb ldr r3, [r7, #12]
8011bb8: 2b00 cmp r3, #0
8011bba: d1ef bne.n 8011b9c <netif_get_by_index+0x18>
}
}
}
return NULL;
8011bbc: 2300 movs r3, #0
}
8011bbe: 4618 mov r0, r3
8011bc0: 3714 adds r7, #20
8011bc2: 46bd mov sp, r7
8011bc4: f85d 7b04 ldr.w r7, [sp], #4
8011bc8: 4770 bx lr
8011bca: bf00 nop
8011bcc: 2000f7ec .word 0x2000f7ec
08011bd0 <pbuf_free_ooseq>:
#if !NO_SYS
static
#endif /* !NO_SYS */
void
pbuf_free_ooseq(void)
{
8011bd0: b580 push {r7, lr}
8011bd2: b082 sub sp, #8
8011bd4: af00 add r7, sp, #0
struct tcp_pcb *pcb;
SYS_ARCH_SET(pbuf_free_ooseq_pending, 0);
8011bd6: f00b f811 bl 801cbfc <sys_arch_protect>
8011bda: 6038 str r0, [r7, #0]
8011bdc: 4b0d ldr r3, [pc, #52] ; (8011c14 <pbuf_free_ooseq+0x44>)
8011bde: 2200 movs r2, #0
8011be0: 701a strb r2, [r3, #0]
8011be2: 6838 ldr r0, [r7, #0]
8011be4: f00b f818 bl 801cc18 <sys_arch_unprotect>
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
8011be8: 4b0b ldr r3, [pc, #44] ; (8011c18 <pbuf_free_ooseq+0x48>)
8011bea: 681b ldr r3, [r3, #0]
8011bec: 607b str r3, [r7, #4]
8011bee: e00a b.n 8011c06 <pbuf_free_ooseq+0x36>
if (pcb->ooseq != NULL) {
8011bf0: 687b ldr r3, [r7, #4]
8011bf2: 6f5b ldr r3, [r3, #116] ; 0x74
8011bf4: 2b00 cmp r3, #0
8011bf6: d003 beq.n 8011c00 <pbuf_free_ooseq+0x30>
/** Free the ooseq pbufs of one PCB only */
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free_ooseq: freeing out-of-sequence pbufs\n"));
tcp_free_ooseq(pcb);
8011bf8: 6878 ldr r0, [r7, #4]
8011bfa: f002 f971 bl 8013ee0 <tcp_free_ooseq>
return;
8011bfe: e005 b.n 8011c0c <pbuf_free_ooseq+0x3c>
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
8011c00: 687b ldr r3, [r7, #4]
8011c02: 68db ldr r3, [r3, #12]
8011c04: 607b str r3, [r7, #4]
8011c06: 687b ldr r3, [r7, #4]
8011c08: 2b00 cmp r3, #0
8011c0a: d1f1 bne.n 8011bf0 <pbuf_free_ooseq+0x20>
}
}
}
8011c0c: 3708 adds r7, #8
8011c0e: 46bd mov sp, r7
8011c10: bd80 pop {r7, pc}
8011c12: bf00 nop
8011c14: 2000f7f4 .word 0x2000f7f4
8011c18: 2000f7fc .word 0x2000f7fc
08011c1c <pbuf_free_ooseq_callback>:
/**
* Just a callback function for tcpip_callback() that calls pbuf_free_ooseq().
*/
static void
pbuf_free_ooseq_callback(void *arg)
{
8011c1c: b580 push {r7, lr}
8011c1e: b082 sub sp, #8
8011c20: af00 add r7, sp, #0
8011c22: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(arg);
pbuf_free_ooseq();
8011c24: f7ff ffd4 bl 8011bd0 <pbuf_free_ooseq>
}
8011c28: bf00 nop
8011c2a: 3708 adds r7, #8
8011c2c: 46bd mov sp, r7
8011c2e: bd80 pop {r7, pc}
08011c30 <pbuf_pool_is_empty>:
#endif /* !NO_SYS */
/** Queue a call to pbuf_free_ooseq if not already queued. */
static void
pbuf_pool_is_empty(void)
{
8011c30: b580 push {r7, lr}
8011c32: b082 sub sp, #8
8011c34: af00 add r7, sp, #0
#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL
SYS_ARCH_SET(pbuf_free_ooseq_pending, 1);
#else /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */
u8_t queued;
SYS_ARCH_DECL_PROTECT(old_level);
SYS_ARCH_PROTECT(old_level);
8011c36: f00a ffe1 bl 801cbfc <sys_arch_protect>
8011c3a: 6078 str r0, [r7, #4]
queued = pbuf_free_ooseq_pending;
8011c3c: 4b0f ldr r3, [pc, #60] ; (8011c7c <pbuf_pool_is_empty+0x4c>)
8011c3e: 781b ldrb r3, [r3, #0]
8011c40: 70fb strb r3, [r7, #3]
pbuf_free_ooseq_pending = 1;
8011c42: 4b0e ldr r3, [pc, #56] ; (8011c7c <pbuf_pool_is_empty+0x4c>)
8011c44: 2201 movs r2, #1
8011c46: 701a strb r2, [r3, #0]
SYS_ARCH_UNPROTECT(old_level);
8011c48: 6878 ldr r0, [r7, #4]
8011c4a: f00a ffe5 bl 801cc18 <sys_arch_unprotect>
if (!queued) {
8011c4e: 78fb ldrb r3, [r7, #3]
8011c50: 2b00 cmp r3, #0
8011c52: d10f bne.n 8011c74 <pbuf_pool_is_empty+0x44>
/* queue a call to pbuf_free_ooseq if not already queued */
PBUF_POOL_FREE_OOSEQ_QUEUE_CALL();
8011c54: 2100 movs r1, #0
8011c56: 480a ldr r0, [pc, #40] ; (8011c80 <pbuf_pool_is_empty+0x50>)
8011c58: f7fe fee0 bl 8010a1c <tcpip_try_callback>
8011c5c: 4603 mov r3, r0
8011c5e: 2b00 cmp r3, #0
8011c60: d008 beq.n 8011c74 <pbuf_pool_is_empty+0x44>
8011c62: f00a ffcb bl 801cbfc <sys_arch_protect>
8011c66: 6078 str r0, [r7, #4]
8011c68: 4b04 ldr r3, [pc, #16] ; (8011c7c <pbuf_pool_is_empty+0x4c>)
8011c6a: 2200 movs r2, #0
8011c6c: 701a strb r2, [r3, #0]
8011c6e: 6878 ldr r0, [r7, #4]
8011c70: f00a ffd2 bl 801cc18 <sys_arch_unprotect>
}
#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */
}
8011c74: bf00 nop
8011c76: 3708 adds r7, #8
8011c78: 46bd mov sp, r7
8011c7a: bd80 pop {r7, pc}
8011c7c: 2000f7f4 .word 0x2000f7f4
8011c80: 08011c1d .word 0x08011c1d
08011c84 <pbuf_init_alloced_pbuf>:
#endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */
/* Initialize members of struct pbuf after allocation */
static void
pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len, pbuf_type type, u8_t flags)
{
8011c84: b480 push {r7}
8011c86: b085 sub sp, #20
8011c88: af00 add r7, sp, #0
8011c8a: 60f8 str r0, [r7, #12]
8011c8c: 60b9 str r1, [r7, #8]
8011c8e: 4611 mov r1, r2
8011c90: 461a mov r2, r3
8011c92: 460b mov r3, r1
8011c94: 80fb strh r3, [r7, #6]
8011c96: 4613 mov r3, r2
8011c98: 80bb strh r3, [r7, #4]
p->next = NULL;
8011c9a: 68fb ldr r3, [r7, #12]
8011c9c: 2200 movs r2, #0
8011c9e: 601a str r2, [r3, #0]
p->payload = payload;
8011ca0: 68fb ldr r3, [r7, #12]
8011ca2: 68ba ldr r2, [r7, #8]
8011ca4: 605a str r2, [r3, #4]
p->tot_len = tot_len;
8011ca6: 68fb ldr r3, [r7, #12]
8011ca8: 88fa ldrh r2, [r7, #6]
8011caa: 811a strh r2, [r3, #8]
p->len = len;
8011cac: 68fb ldr r3, [r7, #12]
8011cae: 88ba ldrh r2, [r7, #4]
8011cb0: 815a strh r2, [r3, #10]
p->type_internal = (u8_t)type;
8011cb2: 8b3b ldrh r3, [r7, #24]
8011cb4: b2da uxtb r2, r3
8011cb6: 68fb ldr r3, [r7, #12]
8011cb8: 731a strb r2, [r3, #12]
p->flags = flags;
8011cba: 68fb ldr r3, [r7, #12]
8011cbc: 7f3a ldrb r2, [r7, #28]
8011cbe: 735a strb r2, [r3, #13]
p->ref = 1;
8011cc0: 68fb ldr r3, [r7, #12]
8011cc2: 2201 movs r2, #1
8011cc4: 739a strb r2, [r3, #14]
p->if_idx = NETIF_NO_INDEX;
8011cc6: 68fb ldr r3, [r7, #12]
8011cc8: 2200 movs r2, #0
8011cca: 73da strb r2, [r3, #15]
}
8011ccc: bf00 nop
8011cce: 3714 adds r7, #20
8011cd0: 46bd mov sp, r7
8011cd2: f85d 7b04 ldr.w r7, [sp], #4
8011cd6: 4770 bx lr
08011cd8 <pbuf_alloc>:
* @return the allocated pbuf. If multiple pbufs where allocated, this
* is the first pbuf of a pbuf chain.
*/
struct pbuf *
pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
{
8011cd8: b580 push {r7, lr}
8011cda: b08c sub sp, #48 ; 0x30
8011cdc: af02 add r7, sp, #8
8011cde: 4603 mov r3, r0
8011ce0: 71fb strb r3, [r7, #7]
8011ce2: 460b mov r3, r1
8011ce4: 80bb strh r3, [r7, #4]
8011ce6: 4613 mov r3, r2
8011ce8: 807b strh r3, [r7, #2]
struct pbuf *p;
u16_t offset = (u16_t)layer;
8011cea: 79fb ldrb r3, [r7, #7]
8011cec: 847b strh r3, [r7, #34] ; 0x22
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length));
switch (type) {
8011cee: 887b ldrh r3, [r7, #2]
8011cf0: 2b41 cmp r3, #65 ; 0x41
8011cf2: d00b beq.n 8011d0c <pbuf_alloc+0x34>
8011cf4: 2b41 cmp r3, #65 ; 0x41
8011cf6: dc02 bgt.n 8011cfe <pbuf_alloc+0x26>
8011cf8: 2b01 cmp r3, #1
8011cfa: d007 beq.n 8011d0c <pbuf_alloc+0x34>
8011cfc: e0c2 b.n 8011e84 <pbuf_alloc+0x1ac>
8011cfe: f5b3 7fc1 cmp.w r3, #386 ; 0x182
8011d02: d00b beq.n 8011d1c <pbuf_alloc+0x44>
8011d04: f5b3 7f20 cmp.w r3, #640 ; 0x280
8011d08: d070 beq.n 8011dec <pbuf_alloc+0x114>
8011d0a: e0bb b.n 8011e84 <pbuf_alloc+0x1ac>
case PBUF_REF: /* fall through */
case PBUF_ROM:
p = pbuf_alloc_reference(NULL, length, type);
8011d0c: 887a ldrh r2, [r7, #2]
8011d0e: 88bb ldrh r3, [r7, #4]
8011d10: 4619 mov r1, r3
8011d12: 2000 movs r0, #0
8011d14: f000 f8d2 bl 8011ebc <pbuf_alloc_reference>
8011d18: 6278 str r0, [r7, #36] ; 0x24
break;
8011d1a: e0bd b.n 8011e98 <pbuf_alloc+0x1c0>
case PBUF_POOL: {
struct pbuf *q, *last;
u16_t rem_len; /* remaining length */
p = NULL;
8011d1c: 2300 movs r3, #0
8011d1e: 627b str r3, [r7, #36] ; 0x24
last = NULL;
8011d20: 2300 movs r3, #0
8011d22: 61fb str r3, [r7, #28]
rem_len = length;
8011d24: 88bb ldrh r3, [r7, #4]
8011d26: 837b strh r3, [r7, #26]
do {
u16_t qlen;
q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL);
8011d28: 200c movs r0, #12
8011d2a: f7ff fbb7 bl 801149c <memp_malloc>
8011d2e: 6138 str r0, [r7, #16]
if (q == NULL) {
8011d30: 693b ldr r3, [r7, #16]
8011d32: 2b00 cmp r3, #0
8011d34: d109 bne.n 8011d4a <pbuf_alloc+0x72>
PBUF_POOL_IS_EMPTY();
8011d36: f7ff ff7b bl 8011c30 <pbuf_pool_is_empty>
/* free chain so far allocated */
if (p) {
8011d3a: 6a7b ldr r3, [r7, #36] ; 0x24
8011d3c: 2b00 cmp r3, #0
8011d3e: d002 beq.n 8011d46 <pbuf_alloc+0x6e>
pbuf_free(p);
8011d40: 6a78 ldr r0, [r7, #36] ; 0x24
8011d42: f000 faa9 bl 8012298 <pbuf_free>
}
/* bail out unsuccessfully */
return NULL;
8011d46: 2300 movs r3, #0
8011d48: e0a7 b.n 8011e9a <pbuf_alloc+0x1c2>
}
qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)));
8011d4a: 8c7b ldrh r3, [r7, #34] ; 0x22
8011d4c: 3303 adds r3, #3
8011d4e: b29b uxth r3, r3
8011d50: f023 0303 bic.w r3, r3, #3
8011d54: b29b uxth r3, r3
8011d56: f5c3 7314 rsb r3, r3, #592 ; 0x250
8011d5a: b29b uxth r3, r3
8011d5c: 8b7a ldrh r2, [r7, #26]
8011d5e: 4293 cmp r3, r2
8011d60: bf28 it cs
8011d62: 4613 movcs r3, r2
8011d64: 81fb strh r3, [r7, #14]
pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)),
8011d66: 8c7b ldrh r3, [r7, #34] ; 0x22
8011d68: 3310 adds r3, #16
8011d6a: 693a ldr r2, [r7, #16]
8011d6c: 4413 add r3, r2
8011d6e: 3303 adds r3, #3
8011d70: f023 0303 bic.w r3, r3, #3
8011d74: 4618 mov r0, r3
8011d76: 89f9 ldrh r1, [r7, #14]
8011d78: 8b7a ldrh r2, [r7, #26]
8011d7a: 2300 movs r3, #0
8011d7c: 9301 str r3, [sp, #4]
8011d7e: 887b ldrh r3, [r7, #2]
8011d80: 9300 str r3, [sp, #0]
8011d82: 460b mov r3, r1
8011d84: 4601 mov r1, r0
8011d86: 6938 ldr r0, [r7, #16]
8011d88: f7ff ff7c bl 8011c84 <pbuf_init_alloced_pbuf>
rem_len, qlen, type, 0);
LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned",
8011d8c: 693b ldr r3, [r7, #16]
8011d8e: 685b ldr r3, [r3, #4]
8011d90: f003 0303 and.w r3, r3, #3
8011d94: 2b00 cmp r3, #0
8011d96: d006 beq.n 8011da6 <pbuf_alloc+0xce>
8011d98: 4b42 ldr r3, [pc, #264] ; (8011ea4 <pbuf_alloc+0x1cc>)
8011d9a: f240 1201 movw r2, #257 ; 0x101
8011d9e: 4942 ldr r1, [pc, #264] ; (8011ea8 <pbuf_alloc+0x1d0>)
8011da0: 4842 ldr r0, [pc, #264] ; (8011eac <pbuf_alloc+0x1d4>)
8011da2: f00a ffa9 bl 801ccf8 <iprintf>
((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0);
LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT",
8011da6: 8c7b ldrh r3, [r7, #34] ; 0x22
8011da8: 3303 adds r3, #3
8011daa: f023 0303 bic.w r3, r3, #3
8011dae: f5b3 7f14 cmp.w r3, #592 ; 0x250
8011db2: d106 bne.n 8011dc2 <pbuf_alloc+0xea>
8011db4: 4b3b ldr r3, [pc, #236] ; (8011ea4 <pbuf_alloc+0x1cc>)
8011db6: f240 1203 movw r2, #259 ; 0x103
8011dba: 493d ldr r1, [pc, #244] ; (8011eb0 <pbuf_alloc+0x1d8>)
8011dbc: 483b ldr r0, [pc, #236] ; (8011eac <pbuf_alloc+0x1d4>)
8011dbe: f00a ff9b bl 801ccf8 <iprintf>
(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 );
if (p == NULL) {
8011dc2: 6a7b ldr r3, [r7, #36] ; 0x24
8011dc4: 2b00 cmp r3, #0
8011dc6: d102 bne.n 8011dce <pbuf_alloc+0xf6>
/* allocated head of pbuf chain (into p) */
p = q;
8011dc8: 693b ldr r3, [r7, #16]
8011dca: 627b str r3, [r7, #36] ; 0x24
8011dcc: e002 b.n 8011dd4 <pbuf_alloc+0xfc>
} else {
/* make previous pbuf point to this pbuf */
last->next = q;
8011dce: 69fb ldr r3, [r7, #28]
8011dd0: 693a ldr r2, [r7, #16]
8011dd2: 601a str r2, [r3, #0]
}
last = q;
8011dd4: 693b ldr r3, [r7, #16]
8011dd6: 61fb str r3, [r7, #28]
rem_len = (u16_t)(rem_len - qlen);
8011dd8: 8b7a ldrh r2, [r7, #26]
8011dda: 89fb ldrh r3, [r7, #14]
8011ddc: 1ad3 subs r3, r2, r3
8011dde: 837b strh r3, [r7, #26]
offset = 0;
8011de0: 2300 movs r3, #0
8011de2: 847b strh r3, [r7, #34] ; 0x22
} while (rem_len > 0);
8011de4: 8b7b ldrh r3, [r7, #26]
8011de6: 2b00 cmp r3, #0
8011de8: d19e bne.n 8011d28 <pbuf_alloc+0x50>
break;
8011dea: e055 b.n 8011e98 <pbuf_alloc+0x1c0>
}
case PBUF_RAM: {
u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
8011dec: 8c7b ldrh r3, [r7, #34] ; 0x22
8011dee: 3303 adds r3, #3
8011df0: b29b uxth r3, r3
8011df2: f023 0303 bic.w r3, r3, #3
8011df6: b29a uxth r2, r3
8011df8: 88bb ldrh r3, [r7, #4]
8011dfa: 3303 adds r3, #3
8011dfc: b29b uxth r3, r3
8011dfe: f023 0303 bic.w r3, r3, #3
8011e02: b29b uxth r3, r3
8011e04: 4413 add r3, r2
8011e06: 833b strh r3, [r7, #24]
mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
8011e08: 8b3b ldrh r3, [r7, #24]
8011e0a: 3310 adds r3, #16
8011e0c: 82fb strh r3, [r7, #22]
/* bug #50040: Check for integer overflow when calculating alloc_len */
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
8011e0e: 8b3a ldrh r2, [r7, #24]
8011e10: 88bb ldrh r3, [r7, #4]
8011e12: 3303 adds r3, #3
8011e14: f023 0303 bic.w r3, r3, #3
8011e18: 429a cmp r2, r3
8011e1a: d306 bcc.n 8011e2a <pbuf_alloc+0x152>
(alloc_len < LWIP_MEM_ALIGN_SIZE(length))) {
8011e1c: 8afa ldrh r2, [r7, #22]
8011e1e: 88bb ldrh r3, [r7, #4]
8011e20: 3303 adds r3, #3
8011e22: f023 0303 bic.w r3, r3, #3
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
8011e26: 429a cmp r2, r3
8011e28: d201 bcs.n 8011e2e <pbuf_alloc+0x156>
return NULL;
8011e2a: 2300 movs r3, #0
8011e2c: e035 b.n 8011e9a <pbuf_alloc+0x1c2>
}
/* If pbuf is to be allocated in RAM, allocate memory for it. */
p = (struct pbuf *)mem_malloc(alloc_len);
8011e2e: 8afb ldrh r3, [r7, #22]
8011e30: 4618 mov r0, r3
8011e32: f7ff f9b1 bl 8011198 <mem_malloc>
8011e36: 6278 str r0, [r7, #36] ; 0x24
if (p == NULL) {
8011e38: 6a7b ldr r3, [r7, #36] ; 0x24
8011e3a: 2b00 cmp r3, #0
8011e3c: d101 bne.n 8011e42 <pbuf_alloc+0x16a>
return NULL;
8011e3e: 2300 movs r3, #0
8011e40: e02b b.n 8011e9a <pbuf_alloc+0x1c2>
}
pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)),
8011e42: 8c7b ldrh r3, [r7, #34] ; 0x22
8011e44: 3310 adds r3, #16
8011e46: 6a7a ldr r2, [r7, #36] ; 0x24
8011e48: 4413 add r3, r2
8011e4a: 3303 adds r3, #3
8011e4c: f023 0303 bic.w r3, r3, #3
8011e50: 4618 mov r0, r3
8011e52: 88b9 ldrh r1, [r7, #4]
8011e54: 88ba ldrh r2, [r7, #4]
8011e56: 2300 movs r3, #0
8011e58: 9301 str r3, [sp, #4]
8011e5a: 887b ldrh r3, [r7, #2]
8011e5c: 9300 str r3, [sp, #0]
8011e5e: 460b mov r3, r1
8011e60: 4601 mov r1, r0
8011e62: 6a78 ldr r0, [r7, #36] ; 0x24
8011e64: f7ff ff0e bl 8011c84 <pbuf_init_alloced_pbuf>
length, length, type, 0);
LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned",
8011e68: 6a7b ldr r3, [r7, #36] ; 0x24
8011e6a: 685b ldr r3, [r3, #4]
8011e6c: f003 0303 and.w r3, r3, #3
8011e70: 2b00 cmp r3, #0
8011e72: d010 beq.n 8011e96 <pbuf_alloc+0x1be>
8011e74: 4b0b ldr r3, [pc, #44] ; (8011ea4 <pbuf_alloc+0x1cc>)
8011e76: f240 1223 movw r2, #291 ; 0x123
8011e7a: 490e ldr r1, [pc, #56] ; (8011eb4 <pbuf_alloc+0x1dc>)
8011e7c: 480b ldr r0, [pc, #44] ; (8011eac <pbuf_alloc+0x1d4>)
8011e7e: f00a ff3b bl 801ccf8 <iprintf>
((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0);
break;
8011e82: e008 b.n 8011e96 <pbuf_alloc+0x1be>
}
default:
LWIP_ASSERT("pbuf_alloc: erroneous type", 0);
8011e84: 4b07 ldr r3, [pc, #28] ; (8011ea4 <pbuf_alloc+0x1cc>)
8011e86: f240 1227 movw r2, #295 ; 0x127
8011e8a: 490b ldr r1, [pc, #44] ; (8011eb8 <pbuf_alloc+0x1e0>)
8011e8c: 4807 ldr r0, [pc, #28] ; (8011eac <pbuf_alloc+0x1d4>)
8011e8e: f00a ff33 bl 801ccf8 <iprintf>
return NULL;
8011e92: 2300 movs r3, #0
8011e94: e001 b.n 8011e9a <pbuf_alloc+0x1c2>
break;
8011e96: bf00 nop
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p));
return p;
8011e98: 6a7b ldr r3, [r7, #36] ; 0x24
}
8011e9a: 4618 mov r0, r3
8011e9c: 3728 adds r7, #40 ; 0x28
8011e9e: 46bd mov sp, r7
8011ea0: bd80 pop {r7, pc}
8011ea2: bf00 nop
8011ea4: 0801e688 .word 0x0801e688
8011ea8: 0801e6b8 .word 0x0801e6b8
8011eac: 0801e6e8 .word 0x0801e6e8
8011eb0: 0801e710 .word 0x0801e710
8011eb4: 0801e744 .word 0x0801e744
8011eb8: 0801e770 .word 0x0801e770
08011ebc <pbuf_alloc_reference>:
*
* @return the allocated pbuf.
*/
struct pbuf *
pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type)
{
8011ebc: b580 push {r7, lr}
8011ebe: b086 sub sp, #24
8011ec0: af02 add r7, sp, #8
8011ec2: 6078 str r0, [r7, #4]
8011ec4: 460b mov r3, r1
8011ec6: 807b strh r3, [r7, #2]
8011ec8: 4613 mov r3, r2
8011eca: 803b strh r3, [r7, #0]
struct pbuf *p;
LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
8011ecc: 883b ldrh r3, [r7, #0]
8011ece: 2b41 cmp r3, #65 ; 0x41
8011ed0: d009 beq.n 8011ee6 <pbuf_alloc_reference+0x2a>
8011ed2: 883b ldrh r3, [r7, #0]
8011ed4: 2b01 cmp r3, #1
8011ed6: d006 beq.n 8011ee6 <pbuf_alloc_reference+0x2a>
8011ed8: 4b0f ldr r3, [pc, #60] ; (8011f18 <pbuf_alloc_reference+0x5c>)
8011eda: f44f 72a5 mov.w r2, #330 ; 0x14a
8011ede: 490f ldr r1, [pc, #60] ; (8011f1c <pbuf_alloc_reference+0x60>)
8011ee0: 480f ldr r0, [pc, #60] ; (8011f20 <pbuf_alloc_reference+0x64>)
8011ee2: f00a ff09 bl 801ccf8 <iprintf>
/* only allocate memory for the pbuf structure */
p = (struct pbuf *)memp_malloc(MEMP_PBUF);
8011ee6: 200b movs r0, #11
8011ee8: f7ff fad8 bl 801149c <memp_malloc>
8011eec: 60f8 str r0, [r7, #12]
if (p == NULL) {
8011eee: 68fb ldr r3, [r7, #12]
8011ef0: 2b00 cmp r3, #0
8011ef2: d101 bne.n 8011ef8 <pbuf_alloc_reference+0x3c>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
("pbuf_alloc_reference: Could not allocate MEMP_PBUF for PBUF_%s.\n",
(type == PBUF_ROM) ? "ROM" : "REF"));
return NULL;
8011ef4: 2300 movs r3, #0
8011ef6: e00b b.n 8011f10 <pbuf_alloc_reference+0x54>
}
pbuf_init_alloced_pbuf(p, payload, length, length, type, 0);
8011ef8: 8879 ldrh r1, [r7, #2]
8011efa: 887a ldrh r2, [r7, #2]
8011efc: 2300 movs r3, #0
8011efe: 9301 str r3, [sp, #4]
8011f00: 883b ldrh r3, [r7, #0]
8011f02: 9300 str r3, [sp, #0]
8011f04: 460b mov r3, r1
8011f06: 6879 ldr r1, [r7, #4]
8011f08: 68f8 ldr r0, [r7, #12]
8011f0a: f7ff febb bl 8011c84 <pbuf_init_alloced_pbuf>
return p;
8011f0e: 68fb ldr r3, [r7, #12]
}
8011f10: 4618 mov r0, r3
8011f12: 3710 adds r7, #16
8011f14: 46bd mov sp, r7
8011f16: bd80 pop {r7, pc}
8011f18: 0801e688 .word 0x0801e688
8011f1c: 0801e78c .word 0x0801e78c
8011f20: 0801e6e8 .word 0x0801e6e8
08011f24 <pbuf_alloced_custom>:
* big enough to hold 'length' plus the header size
*/
struct pbuf *
pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p,
void *payload_mem, u16_t payload_mem_len)
{
8011f24: b580 push {r7, lr}
8011f26: b088 sub sp, #32
8011f28: af02 add r7, sp, #8
8011f2a: 607b str r3, [r7, #4]
8011f2c: 4603 mov r3, r0
8011f2e: 73fb strb r3, [r7, #15]
8011f30: 460b mov r3, r1
8011f32: 81bb strh r3, [r7, #12]
8011f34: 4613 mov r3, r2
8011f36: 817b strh r3, [r7, #10]
u16_t offset = (u16_t)l;
8011f38: 7bfb ldrb r3, [r7, #15]
8011f3a: 827b strh r3, [r7, #18]
void *payload;
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length));
if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) {
8011f3c: 8a7b ldrh r3, [r7, #18]
8011f3e: 3303 adds r3, #3
8011f40: f023 0203 bic.w r2, r3, #3
8011f44: 89bb ldrh r3, [r7, #12]
8011f46: 441a add r2, r3
8011f48: 8cbb ldrh r3, [r7, #36] ; 0x24
8011f4a: 429a cmp r2, r3
8011f4c: d901 bls.n 8011f52 <pbuf_alloced_custom+0x2e>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length));
return NULL;
8011f4e: 2300 movs r3, #0
8011f50: e018 b.n 8011f84 <pbuf_alloced_custom+0x60>
}
if (payload_mem != NULL) {
8011f52: 6a3b ldr r3, [r7, #32]
8011f54: 2b00 cmp r3, #0
8011f56: d007 beq.n 8011f68 <pbuf_alloced_custom+0x44>
payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset);
8011f58: 8a7b ldrh r3, [r7, #18]
8011f5a: 3303 adds r3, #3
8011f5c: f023 0303 bic.w r3, r3, #3
8011f60: 6a3a ldr r2, [r7, #32]
8011f62: 4413 add r3, r2
8011f64: 617b str r3, [r7, #20]
8011f66: e001 b.n 8011f6c <pbuf_alloced_custom+0x48>
} else {
payload = NULL;
8011f68: 2300 movs r3, #0
8011f6a: 617b str r3, [r7, #20]
}
pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM);
8011f6c: 6878 ldr r0, [r7, #4]
8011f6e: 89b9 ldrh r1, [r7, #12]
8011f70: 89ba ldrh r2, [r7, #12]
8011f72: 2302 movs r3, #2
8011f74: 9301 str r3, [sp, #4]
8011f76: 897b ldrh r3, [r7, #10]
8011f78: 9300 str r3, [sp, #0]
8011f7a: 460b mov r3, r1
8011f7c: 6979 ldr r1, [r7, #20]
8011f7e: f7ff fe81 bl 8011c84 <pbuf_init_alloced_pbuf>
return &p->pbuf;
8011f82: 687b ldr r3, [r7, #4]
}
8011f84: 4618 mov r0, r3
8011f86: 3718 adds r7, #24
8011f88: 46bd mov sp, r7
8011f8a: bd80 pop {r7, pc}
08011f8c <pbuf_realloc>:
*
* @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain).
*/
void
pbuf_realloc(struct pbuf *p, u16_t new_len)
{
8011f8c: b580 push {r7, lr}
8011f8e: b084 sub sp, #16
8011f90: af00 add r7, sp, #0
8011f92: 6078 str r0, [r7, #4]
8011f94: 460b mov r3, r1
8011f96: 807b strh r3, [r7, #2]
struct pbuf *q;
u16_t rem_len; /* remaining length */
u16_t shrink;
LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL);
8011f98: 687b ldr r3, [r7, #4]
8011f9a: 2b00 cmp r3, #0
8011f9c: d106 bne.n 8011fac <pbuf_realloc+0x20>
8011f9e: 4b3a ldr r3, [pc, #232] ; (8012088 <pbuf_realloc+0xfc>)
8011fa0: f44f 72cc mov.w r2, #408 ; 0x198
8011fa4: 4939 ldr r1, [pc, #228] ; (801208c <pbuf_realloc+0x100>)
8011fa6: 483a ldr r0, [pc, #232] ; (8012090 <pbuf_realloc+0x104>)
8011fa8: f00a fea6 bl 801ccf8 <iprintf>
/* desired length larger than current length? */
if (new_len >= p->tot_len) {
8011fac: 687b ldr r3, [r7, #4]
8011fae: 891b ldrh r3, [r3, #8]
8011fb0: 887a ldrh r2, [r7, #2]
8011fb2: 429a cmp r2, r3
8011fb4: d264 bcs.n 8012080 <pbuf_realloc+0xf4>
return;
}
/* the pbuf chain grows by (new_len - p->tot_len) bytes
* (which may be negative in case of shrinking) */
shrink = (u16_t)(p->tot_len - new_len);
8011fb6: 687b ldr r3, [r7, #4]
8011fb8: 891a ldrh r2, [r3, #8]
8011fba: 887b ldrh r3, [r7, #2]
8011fbc: 1ad3 subs r3, r2, r3
8011fbe: 813b strh r3, [r7, #8]
/* first, step over any pbufs that should remain in the chain */
rem_len = new_len;
8011fc0: 887b ldrh r3, [r7, #2]
8011fc2: 817b strh r3, [r7, #10]
q = p;
8011fc4: 687b ldr r3, [r7, #4]
8011fc6: 60fb str r3, [r7, #12]
/* should this pbuf be kept? */
while (rem_len > q->len) {
8011fc8: e018 b.n 8011ffc <pbuf_realloc+0x70>
/* decrease remaining length by pbuf length */
rem_len = (u16_t)(rem_len - q->len);
8011fca: 68fb ldr r3, [r7, #12]
8011fcc: 895b ldrh r3, [r3, #10]
8011fce: 897a ldrh r2, [r7, #10]
8011fd0: 1ad3 subs r3, r2, r3
8011fd2: 817b strh r3, [r7, #10]
/* decrease total length indicator */
q->tot_len = (u16_t)(q->tot_len - shrink);
8011fd4: 68fb ldr r3, [r7, #12]
8011fd6: 891a ldrh r2, [r3, #8]
8011fd8: 893b ldrh r3, [r7, #8]
8011fda: 1ad3 subs r3, r2, r3
8011fdc: b29a uxth r2, r3
8011fde: 68fb ldr r3, [r7, #12]
8011fe0: 811a strh r2, [r3, #8]
/* proceed to next pbuf in chain */
q = q->next;
8011fe2: 68fb ldr r3, [r7, #12]
8011fe4: 681b ldr r3, [r3, #0]
8011fe6: 60fb str r3, [r7, #12]
LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL);
8011fe8: 68fb ldr r3, [r7, #12]
8011fea: 2b00 cmp r3, #0
8011fec: d106 bne.n 8011ffc <pbuf_realloc+0x70>
8011fee: 4b26 ldr r3, [pc, #152] ; (8012088 <pbuf_realloc+0xfc>)
8011ff0: f240 12af movw r2, #431 ; 0x1af
8011ff4: 4927 ldr r1, [pc, #156] ; (8012094 <pbuf_realloc+0x108>)
8011ff6: 4826 ldr r0, [pc, #152] ; (8012090 <pbuf_realloc+0x104>)
8011ff8: f00a fe7e bl 801ccf8 <iprintf>
while (rem_len > q->len) {
8011ffc: 68fb ldr r3, [r7, #12]
8011ffe: 895b ldrh r3, [r3, #10]
8012000: 897a ldrh r2, [r7, #10]
8012002: 429a cmp r2, r3
8012004: d8e1 bhi.n 8011fca <pbuf_realloc+0x3e>
/* we have now reached the new last pbuf (in q) */
/* rem_len == desired length for pbuf q */
/* shrink allocated memory for PBUF_RAM */
/* (other types merely adjust their length fields */
if (pbuf_match_allocsrc(q, PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) && (rem_len != q->len)
8012006: 68fb ldr r3, [r7, #12]
8012008: 7b1b ldrb r3, [r3, #12]
801200a: f003 030f and.w r3, r3, #15
801200e: 2b00 cmp r3, #0
8012010: d122 bne.n 8012058 <pbuf_realloc+0xcc>
8012012: 68fb ldr r3, [r7, #12]
8012014: 895b ldrh r3, [r3, #10]
8012016: 897a ldrh r2, [r7, #10]
8012018: 429a cmp r2, r3
801201a: d01d beq.n 8012058 <pbuf_realloc+0xcc>
#if LWIP_SUPPORT_CUSTOM_PBUF
&& ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0)
801201c: 68fb ldr r3, [r7, #12]
801201e: 7b5b ldrb r3, [r3, #13]
8012020: f003 0302 and.w r3, r3, #2
8012024: 2b00 cmp r3, #0
8012026: d117 bne.n 8012058 <pbuf_realloc+0xcc>
#endif /* LWIP_SUPPORT_CUSTOM_PBUF */
) {
/* reallocate and adjust the length of the pbuf that will be split */
q = (struct pbuf *)mem_trim(q, (mem_size_t)(((u8_t *)q->payload - (u8_t *)q) + rem_len));
8012028: 68fb ldr r3, [r7, #12]
801202a: 685b ldr r3, [r3, #4]
801202c: 461a mov r2, r3
801202e: 68fb ldr r3, [r7, #12]
8012030: 1ad3 subs r3, r2, r3
8012032: b29a uxth r2, r3
8012034: 897b ldrh r3, [r7, #10]
8012036: 4413 add r3, r2
8012038: b29b uxth r3, r3
801203a: 4619 mov r1, r3
801203c: 68f8 ldr r0, [r7, #12]
801203e: f7fe ffa1 bl 8010f84 <mem_trim>
8012042: 60f8 str r0, [r7, #12]
LWIP_ASSERT("mem_trim returned q == NULL", q != NULL);
8012044: 68fb ldr r3, [r7, #12]
8012046: 2b00 cmp r3, #0
8012048: d106 bne.n 8012058 <pbuf_realloc+0xcc>
801204a: 4b0f ldr r3, [pc, #60] ; (8012088 <pbuf_realloc+0xfc>)
801204c: f240 12bd movw r2, #445 ; 0x1bd
8012050: 4911 ldr r1, [pc, #68] ; (8012098 <pbuf_realloc+0x10c>)
8012052: 480f ldr r0, [pc, #60] ; (8012090 <pbuf_realloc+0x104>)
8012054: f00a fe50 bl 801ccf8 <iprintf>
}
/* adjust length fields for new last pbuf */
q->len = rem_len;
8012058: 68fb ldr r3, [r7, #12]
801205a: 897a ldrh r2, [r7, #10]
801205c: 815a strh r2, [r3, #10]
q->tot_len = q->len;
801205e: 68fb ldr r3, [r7, #12]
8012060: 895a ldrh r2, [r3, #10]
8012062: 68fb ldr r3, [r7, #12]
8012064: 811a strh r2, [r3, #8]
/* any remaining pbufs in chain? */
if (q->next != NULL) {
8012066: 68fb ldr r3, [r7, #12]
8012068: 681b ldr r3, [r3, #0]
801206a: 2b00 cmp r3, #0
801206c: d004 beq.n 8012078 <pbuf_realloc+0xec>
/* free remaining pbufs in chain */
pbuf_free(q->next);
801206e: 68fb ldr r3, [r7, #12]
8012070: 681b ldr r3, [r3, #0]
8012072: 4618 mov r0, r3
8012074: f000 f910 bl 8012298 <pbuf_free>
}
/* q is last packet in chain */
q->next = NULL;
8012078: 68fb ldr r3, [r7, #12]
801207a: 2200 movs r2, #0
801207c: 601a str r2, [r3, #0]
801207e: e000 b.n 8012082 <pbuf_realloc+0xf6>
return;
8012080: bf00 nop
}
8012082: 3710 adds r7, #16
8012084: 46bd mov sp, r7
8012086: bd80 pop {r7, pc}
8012088: 0801e688 .word 0x0801e688
801208c: 0801e7a0 .word 0x0801e7a0
8012090: 0801e6e8 .word 0x0801e6e8
8012094: 0801e7b8 .word 0x0801e7b8
8012098: 0801e7d0 .word 0x0801e7d0
0801209c <pbuf_add_header_impl>:
* @return non-zero on failure, zero on success.
*
*/
static u8_t
pbuf_add_header_impl(struct pbuf *p, size_t header_size_increment, u8_t force)
{
801209c: b580 push {r7, lr}
801209e: b086 sub sp, #24
80120a0: af00 add r7, sp, #0
80120a2: 60f8 str r0, [r7, #12]
80120a4: 60b9 str r1, [r7, #8]
80120a6: 4613 mov r3, r2
80120a8: 71fb strb r3, [r7, #7]
u16_t type_internal;
void *payload;
u16_t increment_magnitude;
LWIP_ASSERT("p != NULL", p != NULL);
80120aa: 68fb ldr r3, [r7, #12]
80120ac: 2b00 cmp r3, #0
80120ae: d106 bne.n 80120be <pbuf_add_header_impl+0x22>
80120b0: 4b2b ldr r3, [pc, #172] ; (8012160 <pbuf_add_header_impl+0xc4>)
80120b2: f240 12df movw r2, #479 ; 0x1df
80120b6: 492b ldr r1, [pc, #172] ; (8012164 <pbuf_add_header_impl+0xc8>)
80120b8: 482b ldr r0, [pc, #172] ; (8012168 <pbuf_add_header_impl+0xcc>)
80120ba: f00a fe1d bl 801ccf8 <iprintf>
if ((p == NULL) || (header_size_increment > 0xFFFF)) {
80120be: 68fb ldr r3, [r7, #12]
80120c0: 2b00 cmp r3, #0
80120c2: d003 beq.n 80120cc <pbuf_add_header_impl+0x30>
80120c4: 68bb ldr r3, [r7, #8]
80120c6: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80120ca: d301 bcc.n 80120d0 <pbuf_add_header_impl+0x34>
return 1;
80120cc: 2301 movs r3, #1
80120ce: e043 b.n 8012158 <pbuf_add_header_impl+0xbc>
}
if (header_size_increment == 0) {
80120d0: 68bb ldr r3, [r7, #8]
80120d2: 2b00 cmp r3, #0
80120d4: d101 bne.n 80120da <pbuf_add_header_impl+0x3e>
return 0;
80120d6: 2300 movs r3, #0
80120d8: e03e b.n 8012158 <pbuf_add_header_impl+0xbc>
}
increment_magnitude = (u16_t)header_size_increment;
80120da: 68bb ldr r3, [r7, #8]
80120dc: 827b strh r3, [r7, #18]
/* Do not allow tot_len to wrap as a result. */
if ((u16_t)(increment_magnitude + p->tot_len) < increment_magnitude) {
80120de: 68fb ldr r3, [r7, #12]
80120e0: 891a ldrh r2, [r3, #8]
80120e2: 8a7b ldrh r3, [r7, #18]
80120e4: 4413 add r3, r2
80120e6: b29b uxth r3, r3
80120e8: 8a7a ldrh r2, [r7, #18]
80120ea: 429a cmp r2, r3
80120ec: d901 bls.n 80120f2 <pbuf_add_header_impl+0x56>
return 1;
80120ee: 2301 movs r3, #1
80120f0: e032 b.n 8012158 <pbuf_add_header_impl+0xbc>
}
type_internal = p->type_internal;
80120f2: 68fb ldr r3, [r7, #12]
80120f4: 7b1b ldrb r3, [r3, #12]
80120f6: 823b strh r3, [r7, #16]
/* pbuf types containing payloads? */
if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) {
80120f8: 8a3b ldrh r3, [r7, #16]
80120fa: f003 0380 and.w r3, r3, #128 ; 0x80
80120fe: 2b00 cmp r3, #0
8012100: d00c beq.n 801211c <pbuf_add_header_impl+0x80>
/* set new payload pointer */
payload = (u8_t *)p->payload - header_size_increment;
8012102: 68fb ldr r3, [r7, #12]
8012104: 685a ldr r2, [r3, #4]
8012106: 68bb ldr r3, [r7, #8]
8012108: 425b negs r3, r3
801210a: 4413 add r3, r2
801210c: 617b str r3, [r7, #20]
/* boundary check fails? */
if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) {
801210e: 68fb ldr r3, [r7, #12]
8012110: 3310 adds r3, #16
8012112: 697a ldr r2, [r7, #20]
8012114: 429a cmp r2, r3
8012116: d20d bcs.n 8012134 <pbuf_add_header_impl+0x98>
LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE,
("pbuf_add_header: failed as %p < %p (not enough space for new header size)\n",
(void *)payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF)));
/* bail out unsuccessfully */
return 1;
8012118: 2301 movs r3, #1
801211a: e01d b.n 8012158 <pbuf_add_header_impl+0xbc>
}
/* pbuf types referring to external payloads? */
} else {
/* hide a header in the payload? */
if (force) {
801211c: 79fb ldrb r3, [r7, #7]
801211e: 2b00 cmp r3, #0
8012120: d006 beq.n 8012130 <pbuf_add_header_impl+0x94>
payload = (u8_t *)p->payload - header_size_increment;
8012122: 68fb ldr r3, [r7, #12]
8012124: 685a ldr r2, [r3, #4]
8012126: 68bb ldr r3, [r7, #8]
8012128: 425b negs r3, r3
801212a: 4413 add r3, r2
801212c: 617b str r3, [r7, #20]
801212e: e001 b.n 8012134 <pbuf_add_header_impl+0x98>
} else {
/* cannot expand payload to front (yet!)
* bail out unsuccessfully */
return 1;
8012130: 2301 movs r3, #1
8012132: e011 b.n 8012158 <pbuf_add_header_impl+0xbc>
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_add_header: old %p new %p (%"U16_F")\n",
(void *)p->payload, (void *)payload, increment_magnitude));
/* modify pbuf fields */
p->payload = payload;
8012134: 68fb ldr r3, [r7, #12]
8012136: 697a ldr r2, [r7, #20]
8012138: 605a str r2, [r3, #4]
p->len = (u16_t)(p->len + increment_magnitude);
801213a: 68fb ldr r3, [r7, #12]
801213c: 895a ldrh r2, [r3, #10]
801213e: 8a7b ldrh r3, [r7, #18]
8012140: 4413 add r3, r2
8012142: b29a uxth r2, r3
8012144: 68fb ldr r3, [r7, #12]
8012146: 815a strh r2, [r3, #10]
p->tot_len = (u16_t)(p->tot_len + increment_magnitude);
8012148: 68fb ldr r3, [r7, #12]
801214a: 891a ldrh r2, [r3, #8]
801214c: 8a7b ldrh r3, [r7, #18]
801214e: 4413 add r3, r2
8012150: b29a uxth r2, r3
8012152: 68fb ldr r3, [r7, #12]
8012154: 811a strh r2, [r3, #8]
return 0;
8012156: 2300 movs r3, #0
}
8012158: 4618 mov r0, r3
801215a: 3718 adds r7, #24
801215c: 46bd mov sp, r7
801215e: bd80 pop {r7, pc}
8012160: 0801e688 .word 0x0801e688
8012164: 0801e7ec .word 0x0801e7ec
8012168: 0801e6e8 .word 0x0801e6e8
0801216c <pbuf_add_header>:
* @return non-zero on failure, zero on success.
*
*/
u8_t
pbuf_add_header(struct pbuf *p, size_t header_size_increment)
{
801216c: b580 push {r7, lr}
801216e: b082 sub sp, #8
8012170: af00 add r7, sp, #0
8012172: 6078 str r0, [r7, #4]
8012174: 6039 str r1, [r7, #0]
return pbuf_add_header_impl(p, header_size_increment, 0);
8012176: 2200 movs r2, #0
8012178: 6839 ldr r1, [r7, #0]
801217a: 6878 ldr r0, [r7, #4]
801217c: f7ff ff8e bl 801209c <pbuf_add_header_impl>
8012180: 4603 mov r3, r0
}
8012182: 4618 mov r0, r3
8012184: 3708 adds r7, #8
8012186: 46bd mov sp, r7
8012188: bd80 pop {r7, pc}
...
0801218c <pbuf_remove_header>:
* @return non-zero on failure, zero on success.
*
*/
u8_t
pbuf_remove_header(struct pbuf *p, size_t header_size_decrement)
{
801218c: b580 push {r7, lr}
801218e: b084 sub sp, #16
8012190: af00 add r7, sp, #0
8012192: 6078 str r0, [r7, #4]
8012194: 6039 str r1, [r7, #0]
void *payload;
u16_t increment_magnitude;
LWIP_ASSERT("p != NULL", p != NULL);
8012196: 687b ldr r3, [r7, #4]
8012198: 2b00 cmp r3, #0
801219a: d106 bne.n 80121aa <pbuf_remove_header+0x1e>
801219c: 4b20 ldr r3, [pc, #128] ; (8012220 <pbuf_remove_header+0x94>)
801219e: f240 224b movw r2, #587 ; 0x24b
80121a2: 4920 ldr r1, [pc, #128] ; (8012224 <pbuf_remove_header+0x98>)
80121a4: 4820 ldr r0, [pc, #128] ; (8012228 <pbuf_remove_header+0x9c>)
80121a6: f00a fda7 bl 801ccf8 <iprintf>
if ((p == NULL) || (header_size_decrement > 0xFFFF)) {
80121aa: 687b ldr r3, [r7, #4]
80121ac: 2b00 cmp r3, #0
80121ae: d003 beq.n 80121b8 <pbuf_remove_header+0x2c>
80121b0: 683b ldr r3, [r7, #0]
80121b2: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80121b6: d301 bcc.n 80121bc <pbuf_remove_header+0x30>
return 1;
80121b8: 2301 movs r3, #1
80121ba: e02c b.n 8012216 <pbuf_remove_header+0x8a>
}
if (header_size_decrement == 0) {
80121bc: 683b ldr r3, [r7, #0]
80121be: 2b00 cmp r3, #0
80121c0: d101 bne.n 80121c6 <pbuf_remove_header+0x3a>
return 0;
80121c2: 2300 movs r3, #0
80121c4: e027 b.n 8012216 <pbuf_remove_header+0x8a>
}
increment_magnitude = (u16_t)header_size_decrement;
80121c6: 683b ldr r3, [r7, #0]
80121c8: 81fb strh r3, [r7, #14]
/* Check that we aren't going to move off the end of the pbuf */
LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;);
80121ca: 687b ldr r3, [r7, #4]
80121cc: 895b ldrh r3, [r3, #10]
80121ce: 89fa ldrh r2, [r7, #14]
80121d0: 429a cmp r2, r3
80121d2: d908 bls.n 80121e6 <pbuf_remove_header+0x5a>
80121d4: 4b12 ldr r3, [pc, #72] ; (8012220 <pbuf_remove_header+0x94>)
80121d6: f240 2255 movw r2, #597 ; 0x255
80121da: 4914 ldr r1, [pc, #80] ; (801222c <pbuf_remove_header+0xa0>)
80121dc: 4812 ldr r0, [pc, #72] ; (8012228 <pbuf_remove_header+0x9c>)
80121de: f00a fd8b bl 801ccf8 <iprintf>
80121e2: 2301 movs r3, #1
80121e4: e017 b.n 8012216 <pbuf_remove_header+0x8a>
/* remember current payload pointer */
payload = p->payload;
80121e6: 687b ldr r3, [r7, #4]
80121e8: 685b ldr r3, [r3, #4]
80121ea: 60bb str r3, [r7, #8]
LWIP_UNUSED_ARG(payload); /* only used in LWIP_DEBUGF below */
/* increase payload pointer (guarded by length check above) */
p->payload = (u8_t *)p->payload + header_size_decrement;
80121ec: 687b ldr r3, [r7, #4]
80121ee: 685a ldr r2, [r3, #4]
80121f0: 683b ldr r3, [r7, #0]
80121f2: 441a add r2, r3
80121f4: 687b ldr r3, [r7, #4]
80121f6: 605a str r2, [r3, #4]
/* modify pbuf length fields */
p->len = (u16_t)(p->len - increment_magnitude);
80121f8: 687b ldr r3, [r7, #4]
80121fa: 895a ldrh r2, [r3, #10]
80121fc: 89fb ldrh r3, [r7, #14]
80121fe: 1ad3 subs r3, r2, r3
8012200: b29a uxth r2, r3
8012202: 687b ldr r3, [r7, #4]
8012204: 815a strh r2, [r3, #10]
p->tot_len = (u16_t)(p->tot_len - increment_magnitude);
8012206: 687b ldr r3, [r7, #4]
8012208: 891a ldrh r2, [r3, #8]
801220a: 89fb ldrh r3, [r7, #14]
801220c: 1ad3 subs r3, r2, r3
801220e: b29a uxth r2, r3
8012210: 687b ldr r3, [r7, #4]
8012212: 811a strh r2, [r3, #8]
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_remove_header: old %p new %p (%"U16_F")\n",
(void *)payload, (void *)p->payload, increment_magnitude));
return 0;
8012214: 2300 movs r3, #0
}
8012216: 4618 mov r0, r3
8012218: 3710 adds r7, #16
801221a: 46bd mov sp, r7
801221c: bd80 pop {r7, pc}
801221e: bf00 nop
8012220: 0801e688 .word 0x0801e688
8012224: 0801e7ec .word 0x0801e7ec
8012228: 0801e6e8 .word 0x0801e6e8
801222c: 0801e7f8 .word 0x0801e7f8
08012230 <pbuf_header_impl>:
static u8_t
pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force)
{
8012230: b580 push {r7, lr}
8012232: b082 sub sp, #8
8012234: af00 add r7, sp, #0
8012236: 6078 str r0, [r7, #4]
8012238: 460b mov r3, r1
801223a: 807b strh r3, [r7, #2]
801223c: 4613 mov r3, r2
801223e: 707b strb r3, [r7, #1]
if (header_size_increment < 0) {
8012240: f9b7 3002 ldrsh.w r3, [r7, #2]
8012244: 2b00 cmp r3, #0
8012246: da08 bge.n 801225a <pbuf_header_impl+0x2a>
return pbuf_remove_header(p, (size_t) - header_size_increment);
8012248: f9b7 3002 ldrsh.w r3, [r7, #2]
801224c: 425b negs r3, r3
801224e: 4619 mov r1, r3
8012250: 6878 ldr r0, [r7, #4]
8012252: f7ff ff9b bl 801218c <pbuf_remove_header>
8012256: 4603 mov r3, r0
8012258: e007 b.n 801226a <pbuf_header_impl+0x3a>
} else {
return pbuf_add_header_impl(p, (size_t)header_size_increment, force);
801225a: f9b7 3002 ldrsh.w r3, [r7, #2]
801225e: 787a ldrb r2, [r7, #1]
8012260: 4619 mov r1, r3
8012262: 6878 ldr r0, [r7, #4]
8012264: f7ff ff1a bl 801209c <pbuf_add_header_impl>
8012268: 4603 mov r3, r0
}
}
801226a: 4618 mov r0, r3
801226c: 3708 adds r7, #8
801226e: 46bd mov sp, r7
8012270: bd80 pop {r7, pc}
08012272 <pbuf_header_force>:
* Same as pbuf_header but does not check if 'header_size > 0' is allowed.
* This is used internally only, to allow PBUF_REF for RX.
*/
u8_t
pbuf_header_force(struct pbuf *p, s16_t header_size_increment)
{
8012272: b580 push {r7, lr}
8012274: b082 sub sp, #8
8012276: af00 add r7, sp, #0
8012278: 6078 str r0, [r7, #4]
801227a: 460b mov r3, r1
801227c: 807b strh r3, [r7, #2]
return pbuf_header_impl(p, header_size_increment, 1);
801227e: f9b7 3002 ldrsh.w r3, [r7, #2]
8012282: 2201 movs r2, #1
8012284: 4619 mov r1, r3
8012286: 6878 ldr r0, [r7, #4]
8012288: f7ff ffd2 bl 8012230 <pbuf_header_impl>
801228c: 4603 mov r3, r0
}
801228e: 4618 mov r0, r3
8012290: 3708 adds r7, #8
8012292: 46bd mov sp, r7
8012294: bd80 pop {r7, pc}
...
08012298 <pbuf_free>:
* 1->1->1 becomes .......
*
*/
u8_t
pbuf_free(struct pbuf *p)
{
8012298: b580 push {r7, lr}
801229a: b088 sub sp, #32
801229c: af00 add r7, sp, #0
801229e: 6078 str r0, [r7, #4]
u8_t alloc_src;
struct pbuf *q;
u8_t count;
if (p == NULL) {
80122a0: 687b ldr r3, [r7, #4]
80122a2: 2b00 cmp r3, #0
80122a4: d10b bne.n 80122be <pbuf_free+0x26>
LWIP_ASSERT("p != NULL", p != NULL);
80122a6: 687b ldr r3, [r7, #4]
80122a8: 2b00 cmp r3, #0
80122aa: d106 bne.n 80122ba <pbuf_free+0x22>
80122ac: 4b3b ldr r3, [pc, #236] ; (801239c <pbuf_free+0x104>)
80122ae: f44f 7237 mov.w r2, #732 ; 0x2dc
80122b2: 493b ldr r1, [pc, #236] ; (80123a0 <pbuf_free+0x108>)
80122b4: 483b ldr r0, [pc, #236] ; (80123a4 <pbuf_free+0x10c>)
80122b6: f00a fd1f bl 801ccf8 <iprintf>
/* if assertions are disabled, proceed with debug output */
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
("pbuf_free(p == NULL) was called.\n"));
return 0;
80122ba: 2300 movs r3, #0
80122bc: e069 b.n 8012392 <pbuf_free+0xfa>
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p));
PERF_START;
count = 0;
80122be: 2300 movs r3, #0
80122c0: 77fb strb r3, [r7, #31]
/* de-allocate all consecutive pbufs from the head of the chain that
* obtain a zero reference count after decrementing*/
while (p != NULL) {
80122c2: e062 b.n 801238a <pbuf_free+0xf2>
LWIP_PBUF_REF_T ref;
SYS_ARCH_DECL_PROTECT(old_level);
/* Since decrementing ref cannot be guaranteed to be a single machine operation
* we must protect it. We put the new ref into a local variable to prevent
* further protection. */
SYS_ARCH_PROTECT(old_level);
80122c4: f00a fc9a bl 801cbfc <sys_arch_protect>
80122c8: 61b8 str r0, [r7, #24]
/* all pbufs in a chain are referenced at least once */
LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);
80122ca: 687b ldr r3, [r7, #4]
80122cc: 7b9b ldrb r3, [r3, #14]
80122ce: 2b00 cmp r3, #0
80122d0: d106 bne.n 80122e0 <pbuf_free+0x48>
80122d2: 4b32 ldr r3, [pc, #200] ; (801239c <pbuf_free+0x104>)
80122d4: f240 22f1 movw r2, #753 ; 0x2f1
80122d8: 4933 ldr r1, [pc, #204] ; (80123a8 <pbuf_free+0x110>)
80122da: 4832 ldr r0, [pc, #200] ; (80123a4 <pbuf_free+0x10c>)
80122dc: f00a fd0c bl 801ccf8 <iprintf>
/* decrease reference count (number of pointers to pbuf) */
ref = --(p->ref);
80122e0: 687b ldr r3, [r7, #4]
80122e2: 7b9b ldrb r3, [r3, #14]
80122e4: 3b01 subs r3, #1
80122e6: b2da uxtb r2, r3
80122e8: 687b ldr r3, [r7, #4]
80122ea: 739a strb r2, [r3, #14]
80122ec: 687b ldr r3, [r7, #4]
80122ee: 7b9b ldrb r3, [r3, #14]
80122f0: 75fb strb r3, [r7, #23]
SYS_ARCH_UNPROTECT(old_level);
80122f2: 69b8 ldr r0, [r7, #24]
80122f4: f00a fc90 bl 801cc18 <sys_arch_unprotect>
/* this pbuf is no longer referenced to? */
if (ref == 0) {
80122f8: 7dfb ldrb r3, [r7, #23]
80122fa: 2b00 cmp r3, #0
80122fc: d143 bne.n 8012386 <pbuf_free+0xee>
/* remember next pbuf in chain for next iteration */
q = p->next;
80122fe: 687b ldr r3, [r7, #4]
8012300: 681b ldr r3, [r3, #0]
8012302: 613b str r3, [r7, #16]
LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p));
alloc_src = pbuf_get_allocsrc(p);
8012304: 687b ldr r3, [r7, #4]
8012306: 7b1b ldrb r3, [r3, #12]
8012308: f003 030f and.w r3, r3, #15
801230c: 73fb strb r3, [r7, #15]
#if LWIP_SUPPORT_CUSTOM_PBUF
/* is this a custom pbuf? */
if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) {
801230e: 687b ldr r3, [r7, #4]
8012310: 7b5b ldrb r3, [r3, #13]
8012312: f003 0302 and.w r3, r3, #2
8012316: 2b00 cmp r3, #0
8012318: d011 beq.n 801233e <pbuf_free+0xa6>
struct pbuf_custom *pc = (struct pbuf_custom *)p;
801231a: 687b ldr r3, [r7, #4]
801231c: 60bb str r3, [r7, #8]
LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL);
801231e: 68bb ldr r3, [r7, #8]
8012320: 691b ldr r3, [r3, #16]
8012322: 2b00 cmp r3, #0
8012324: d106 bne.n 8012334 <pbuf_free+0x9c>
8012326: 4b1d ldr r3, [pc, #116] ; (801239c <pbuf_free+0x104>)
8012328: f240 22ff movw r2, #767 ; 0x2ff
801232c: 491f ldr r1, [pc, #124] ; (80123ac <pbuf_free+0x114>)
801232e: 481d ldr r0, [pc, #116] ; (80123a4 <pbuf_free+0x10c>)
8012330: f00a fce2 bl 801ccf8 <iprintf>
pc->custom_free_function(p);
8012334: 68bb ldr r3, [r7, #8]
8012336: 691b ldr r3, [r3, #16]
8012338: 6878 ldr r0, [r7, #4]
801233a: 4798 blx r3
801233c: e01d b.n 801237a <pbuf_free+0xe2>
} else
#endif /* LWIP_SUPPORT_CUSTOM_PBUF */
{
/* is this a pbuf from the pool? */
if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL) {
801233e: 7bfb ldrb r3, [r7, #15]
8012340: 2b02 cmp r3, #2
8012342: d104 bne.n 801234e <pbuf_free+0xb6>
memp_free(MEMP_PBUF_POOL, p);
8012344: 6879 ldr r1, [r7, #4]
8012346: 200c movs r0, #12
8012348: f7ff f8fa bl 8011540 <memp_free>
801234c: e015 b.n 801237a <pbuf_free+0xe2>
/* is this a ROM or RAM referencing pbuf? */
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) {
801234e: 7bfb ldrb r3, [r7, #15]
8012350: 2b01 cmp r3, #1
8012352: d104 bne.n 801235e <pbuf_free+0xc6>
memp_free(MEMP_PBUF, p);
8012354: 6879 ldr r1, [r7, #4]
8012356: 200b movs r0, #11
8012358: f7ff f8f2 bl 8011540 <memp_free>
801235c: e00d b.n 801237a <pbuf_free+0xe2>
/* type == PBUF_RAM */
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) {
801235e: 7bfb ldrb r3, [r7, #15]
8012360: 2b00 cmp r3, #0
8012362: d103 bne.n 801236c <pbuf_free+0xd4>
mem_free(p);
8012364: 6878 ldr r0, [r7, #4]
8012366: f7fe fd7d bl 8010e64 <mem_free>
801236a: e006 b.n 801237a <pbuf_free+0xe2>
} else {
/* @todo: support freeing other types */
LWIP_ASSERT("invalid pbuf type", 0);
801236c: 4b0b ldr r3, [pc, #44] ; (801239c <pbuf_free+0x104>)
801236e: f240 320f movw r2, #783 ; 0x30f
8012372: 490f ldr r1, [pc, #60] ; (80123b0 <pbuf_free+0x118>)
8012374: 480b ldr r0, [pc, #44] ; (80123a4 <pbuf_free+0x10c>)
8012376: f00a fcbf bl 801ccf8 <iprintf>
}
}
count++;
801237a: 7ffb ldrb r3, [r7, #31]
801237c: 3301 adds r3, #1
801237e: 77fb strb r3, [r7, #31]
/* proceed to next pbuf */
p = q;
8012380: 693b ldr r3, [r7, #16]
8012382: 607b str r3, [r7, #4]
8012384: e001 b.n 801238a <pbuf_free+0xf2>
/* p->ref > 0, this pbuf is still referenced to */
/* (and so the remaining pbufs in chain as well) */
} else {
LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, (u16_t)ref));
/* stop walking through the chain */
p = NULL;
8012386: 2300 movs r3, #0
8012388: 607b str r3, [r7, #4]
while (p != NULL) {
801238a: 687b ldr r3, [r7, #4]
801238c: 2b00 cmp r3, #0
801238e: d199 bne.n 80122c4 <pbuf_free+0x2c>
}
}
PERF_STOP("pbuf_free");
/* return number of de-allocated pbufs */
return count;
8012390: 7ffb ldrb r3, [r7, #31]
}
8012392: 4618 mov r0, r3
8012394: 3720 adds r7, #32
8012396: 46bd mov sp, r7
8012398: bd80 pop {r7, pc}
801239a: bf00 nop
801239c: 0801e688 .word 0x0801e688
80123a0: 0801e7ec .word 0x0801e7ec
80123a4: 0801e6e8 .word 0x0801e6e8
80123a8: 0801e818 .word 0x0801e818
80123ac: 0801e830 .word 0x0801e830
80123b0: 0801e854 .word 0x0801e854
080123b4 <pbuf_clen>:
* @param p first pbuf of chain
* @return the number of pbufs in a chain
*/
u16_t
pbuf_clen(const struct pbuf *p)
{
80123b4: b480 push {r7}
80123b6: b085 sub sp, #20
80123b8: af00 add r7, sp, #0
80123ba: 6078 str r0, [r7, #4]
u16_t len;
len = 0;
80123bc: 2300 movs r3, #0
80123be: 81fb strh r3, [r7, #14]
while (p != NULL) {
80123c0: e005 b.n 80123ce <pbuf_clen+0x1a>
++len;
80123c2: 89fb ldrh r3, [r7, #14]
80123c4: 3301 adds r3, #1
80123c6: 81fb strh r3, [r7, #14]
p = p->next;
80123c8: 687b ldr r3, [r7, #4]
80123ca: 681b ldr r3, [r3, #0]
80123cc: 607b str r3, [r7, #4]
while (p != NULL) {
80123ce: 687b ldr r3, [r7, #4]
80123d0: 2b00 cmp r3, #0
80123d2: d1f6 bne.n 80123c2 <pbuf_clen+0xe>
}
return len;
80123d4: 89fb ldrh r3, [r7, #14]
}
80123d6: 4618 mov r0, r3
80123d8: 3714 adds r7, #20
80123da: 46bd mov sp, r7
80123dc: f85d 7b04 ldr.w r7, [sp], #4
80123e0: 4770 bx lr
...
080123e4 <pbuf_ref>:
* @param p pbuf to increase reference counter of
*
*/
void
pbuf_ref(struct pbuf *p)
{
80123e4: b580 push {r7, lr}
80123e6: b084 sub sp, #16
80123e8: af00 add r7, sp, #0
80123ea: 6078 str r0, [r7, #4]
/* pbuf given? */
if (p != NULL) {
80123ec: 687b ldr r3, [r7, #4]
80123ee: 2b00 cmp r3, #0
80123f0: d016 beq.n 8012420 <pbuf_ref+0x3c>
SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1));
80123f2: f00a fc03 bl 801cbfc <sys_arch_protect>
80123f6: 60f8 str r0, [r7, #12]
80123f8: 687b ldr r3, [r7, #4]
80123fa: 7b9b ldrb r3, [r3, #14]
80123fc: 3301 adds r3, #1
80123fe: b2da uxtb r2, r3
8012400: 687b ldr r3, [r7, #4]
8012402: 739a strb r2, [r3, #14]
8012404: 68f8 ldr r0, [r7, #12]
8012406: f00a fc07 bl 801cc18 <sys_arch_unprotect>
LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
801240a: 687b ldr r3, [r7, #4]
801240c: 7b9b ldrb r3, [r3, #14]
801240e: 2b00 cmp r3, #0
8012410: d106 bne.n 8012420 <pbuf_ref+0x3c>
8012412: 4b05 ldr r3, [pc, #20] ; (8012428 <pbuf_ref+0x44>)
8012414: f240 3242 movw r2, #834 ; 0x342
8012418: 4904 ldr r1, [pc, #16] ; (801242c <pbuf_ref+0x48>)
801241a: 4805 ldr r0, [pc, #20] ; (8012430 <pbuf_ref+0x4c>)
801241c: f00a fc6c bl 801ccf8 <iprintf>
}
}
8012420: bf00 nop
8012422: 3710 adds r7, #16
8012424: 46bd mov sp, r7
8012426: bd80 pop {r7, pc}
8012428: 0801e688 .word 0x0801e688
801242c: 0801e868 .word 0x0801e868
8012430: 0801e6e8 .word 0x0801e6e8
08012434 <pbuf_cat>:
*
* @see pbuf_chain()
*/
void
pbuf_cat(struct pbuf *h, struct pbuf *t)
{
8012434: b580 push {r7, lr}
8012436: b084 sub sp, #16
8012438: af00 add r7, sp, #0
801243a: 6078 str r0, [r7, #4]
801243c: 6039 str r1, [r7, #0]
struct pbuf *p;
LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)",
801243e: 687b ldr r3, [r7, #4]
8012440: 2b00 cmp r3, #0
8012442: d002 beq.n 801244a <pbuf_cat+0x16>
8012444: 683b ldr r3, [r7, #0]
8012446: 2b00 cmp r3, #0
8012448: d107 bne.n 801245a <pbuf_cat+0x26>
801244a: 4b20 ldr r3, [pc, #128] ; (80124cc <pbuf_cat+0x98>)
801244c: f240 325a movw r2, #858 ; 0x35a
8012450: 491f ldr r1, [pc, #124] ; (80124d0 <pbuf_cat+0x9c>)
8012452: 4820 ldr r0, [pc, #128] ; (80124d4 <pbuf_cat+0xa0>)
8012454: f00a fc50 bl 801ccf8 <iprintf>
8012458: e034 b.n 80124c4 <pbuf_cat+0x90>
((h != NULL) && (t != NULL)), return;);
/* proceed to last pbuf of chain */
for (p = h; p->next != NULL; p = p->next) {
801245a: 687b ldr r3, [r7, #4]
801245c: 60fb str r3, [r7, #12]
801245e: e00a b.n 8012476 <pbuf_cat+0x42>
/* add total length of second chain to all totals of first chain */
p->tot_len = (u16_t)(p->tot_len + t->tot_len);
8012460: 68fb ldr r3, [r7, #12]
8012462: 891a ldrh r2, [r3, #8]
8012464: 683b ldr r3, [r7, #0]
8012466: 891b ldrh r3, [r3, #8]
8012468: 4413 add r3, r2
801246a: b29a uxth r2, r3
801246c: 68fb ldr r3, [r7, #12]
801246e: 811a strh r2, [r3, #8]
for (p = h; p->next != NULL; p = p->next) {
8012470: 68fb ldr r3, [r7, #12]
8012472: 681b ldr r3, [r3, #0]
8012474: 60fb str r3, [r7, #12]
8012476: 68fb ldr r3, [r7, #12]
8012478: 681b ldr r3, [r3, #0]
801247a: 2b00 cmp r3, #0
801247c: d1f0 bne.n 8012460 <pbuf_cat+0x2c>
}
/* { p is last pbuf of first h chain, p->next == NULL } */
LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len);
801247e: 68fb ldr r3, [r7, #12]
8012480: 891a ldrh r2, [r3, #8]
8012482: 68fb ldr r3, [r7, #12]
8012484: 895b ldrh r3, [r3, #10]
8012486: 429a cmp r2, r3
8012488: d006 beq.n 8012498 <pbuf_cat+0x64>
801248a: 4b10 ldr r3, [pc, #64] ; (80124cc <pbuf_cat+0x98>)
801248c: f240 3262 movw r2, #866 ; 0x362
8012490: 4911 ldr r1, [pc, #68] ; (80124d8 <pbuf_cat+0xa4>)
8012492: 4810 ldr r0, [pc, #64] ; (80124d4 <pbuf_cat+0xa0>)
8012494: f00a fc30 bl 801ccf8 <iprintf>
LWIP_ASSERT("p->next == NULL", p->next == NULL);
8012498: 68fb ldr r3, [r7, #12]
801249a: 681b ldr r3, [r3, #0]
801249c: 2b00 cmp r3, #0
801249e: d006 beq.n 80124ae <pbuf_cat+0x7a>
80124a0: 4b0a ldr r3, [pc, #40] ; (80124cc <pbuf_cat+0x98>)
80124a2: f240 3263 movw r2, #867 ; 0x363
80124a6: 490d ldr r1, [pc, #52] ; (80124dc <pbuf_cat+0xa8>)
80124a8: 480a ldr r0, [pc, #40] ; (80124d4 <pbuf_cat+0xa0>)
80124aa: f00a fc25 bl 801ccf8 <iprintf>
/* add total length of second chain to last pbuf total of first chain */
p->tot_len = (u16_t)(p->tot_len + t->tot_len);
80124ae: 68fb ldr r3, [r7, #12]
80124b0: 891a ldrh r2, [r3, #8]
80124b2: 683b ldr r3, [r7, #0]
80124b4: 891b ldrh r3, [r3, #8]
80124b6: 4413 add r3, r2
80124b8: b29a uxth r2, r3
80124ba: 68fb ldr r3, [r7, #12]
80124bc: 811a strh r2, [r3, #8]
/* chain last pbuf of head (p) with first of tail (t) */
p->next = t;
80124be: 68fb ldr r3, [r7, #12]
80124c0: 683a ldr r2, [r7, #0]
80124c2: 601a str r2, [r3, #0]
/* p->next now references t, but the caller will drop its reference to t,
* so netto there is no change to the reference count of t.
*/
}
80124c4: 3710 adds r7, #16
80124c6: 46bd mov sp, r7
80124c8: bd80 pop {r7, pc}
80124ca: bf00 nop
80124cc: 0801e688 .word 0x0801e688
80124d0: 0801e87c .word 0x0801e87c
80124d4: 0801e6e8 .word 0x0801e6e8
80124d8: 0801e8b4 .word 0x0801e8b4
80124dc: 0801e8e4 .word 0x0801e8e4
080124e0 <pbuf_chain>:
* The ->ref field of the first pbuf of the tail chain is adjusted.
*
*/
void
pbuf_chain(struct pbuf *h, struct pbuf *t)
{
80124e0: b580 push {r7, lr}
80124e2: b082 sub sp, #8
80124e4: af00 add r7, sp, #0
80124e6: 6078 str r0, [r7, #4]
80124e8: 6039 str r1, [r7, #0]
pbuf_cat(h, t);
80124ea: 6839 ldr r1, [r7, #0]
80124ec: 6878 ldr r0, [r7, #4]
80124ee: f7ff ffa1 bl 8012434 <pbuf_cat>
/* t is now referenced by h */
pbuf_ref(t);
80124f2: 6838 ldr r0, [r7, #0]
80124f4: f7ff ff76 bl 80123e4 <pbuf_ref>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t));
}
80124f8: bf00 nop
80124fa: 3708 adds r7, #8
80124fc: 46bd mov sp, r7
80124fe: bd80 pop {r7, pc}
08012500 <pbuf_copy>:
* ERR_ARG if one of the pbufs is NULL or p_to is not big
* enough to hold p_from
*/
err_t
pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)
{
8012500: b580 push {r7, lr}
8012502: b086 sub sp, #24
8012504: af00 add r7, sp, #0
8012506: 6078 str r0, [r7, #4]
8012508: 6039 str r1, [r7, #0]
size_t offset_to = 0, offset_from = 0, len;
801250a: 2300 movs r3, #0
801250c: 617b str r3, [r7, #20]
801250e: 2300 movs r3, #0
8012510: 613b str r3, [r7, #16]
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy(%p, %p)\n",
(const void *)p_to, (const void *)p_from));
/* is the target big enough to hold the source? */
LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) &&
8012512: 687b ldr r3, [r7, #4]
8012514: 2b00 cmp r3, #0
8012516: d008 beq.n 801252a <pbuf_copy+0x2a>
8012518: 683b ldr r3, [r7, #0]
801251a: 2b00 cmp r3, #0
801251c: d005 beq.n 801252a <pbuf_copy+0x2a>
801251e: 687b ldr r3, [r7, #4]
8012520: 891a ldrh r2, [r3, #8]
8012522: 683b ldr r3, [r7, #0]
8012524: 891b ldrh r3, [r3, #8]
8012526: 429a cmp r2, r3
8012528: d209 bcs.n 801253e <pbuf_copy+0x3e>
801252a: 4b57 ldr r3, [pc, #348] ; (8012688 <pbuf_copy+0x188>)
801252c: f240 32ca movw r2, #970 ; 0x3ca
8012530: 4956 ldr r1, [pc, #344] ; (801268c <pbuf_copy+0x18c>)
8012532: 4857 ldr r0, [pc, #348] ; (8012690 <pbuf_copy+0x190>)
8012534: f00a fbe0 bl 801ccf8 <iprintf>
8012538: f06f 030f mvn.w r3, #15
801253c: e09f b.n 801267e <pbuf_copy+0x17e>
(p_from != NULL) && (p_to->tot_len >= p_from->tot_len)), return ERR_ARG;);
/* iterate through pbuf chain */
do {
/* copy one part of the original chain */
if ((p_to->len - offset_to) >= (p_from->len - offset_from)) {
801253e: 687b ldr r3, [r7, #4]
8012540: 895b ldrh r3, [r3, #10]
8012542: 461a mov r2, r3
8012544: 697b ldr r3, [r7, #20]
8012546: 1ad2 subs r2, r2, r3
8012548: 683b ldr r3, [r7, #0]
801254a: 895b ldrh r3, [r3, #10]
801254c: 4619 mov r1, r3
801254e: 693b ldr r3, [r7, #16]
8012550: 1acb subs r3, r1, r3
8012552: 429a cmp r2, r3
8012554: d306 bcc.n 8012564 <pbuf_copy+0x64>
/* complete current p_from fits into current p_to */
len = p_from->len - offset_from;
8012556: 683b ldr r3, [r7, #0]
8012558: 895b ldrh r3, [r3, #10]
801255a: 461a mov r2, r3
801255c: 693b ldr r3, [r7, #16]
801255e: 1ad3 subs r3, r2, r3
8012560: 60fb str r3, [r7, #12]
8012562: e005 b.n 8012570 <pbuf_copy+0x70>
} else {
/* current p_from does not fit into current p_to */
len = p_to->len - offset_to;
8012564: 687b ldr r3, [r7, #4]
8012566: 895b ldrh r3, [r3, #10]
8012568: 461a mov r2, r3
801256a: 697b ldr r3, [r7, #20]
801256c: 1ad3 subs r3, r2, r3
801256e: 60fb str r3, [r7, #12]
}
MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
8012570: 687b ldr r3, [r7, #4]
8012572: 685a ldr r2, [r3, #4]
8012574: 697b ldr r3, [r7, #20]
8012576: 18d0 adds r0, r2, r3
8012578: 683b ldr r3, [r7, #0]
801257a: 685a ldr r2, [r3, #4]
801257c: 693b ldr r3, [r7, #16]
801257e: 4413 add r3, r2
8012580: 68fa ldr r2, [r7, #12]
8012582: 4619 mov r1, r3
8012584: f00a fb8b bl 801cc9e <memcpy>
offset_to += len;
8012588: 697a ldr r2, [r7, #20]
801258a: 68fb ldr r3, [r7, #12]
801258c: 4413 add r3, r2
801258e: 617b str r3, [r7, #20]
offset_from += len;
8012590: 693a ldr r2, [r7, #16]
8012592: 68fb ldr r3, [r7, #12]
8012594: 4413 add r3, r2
8012596: 613b str r3, [r7, #16]
LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
8012598: 687b ldr r3, [r7, #4]
801259a: 895b ldrh r3, [r3, #10]
801259c: 461a mov r2, r3
801259e: 697b ldr r3, [r7, #20]
80125a0: 4293 cmp r3, r2
80125a2: d906 bls.n 80125b2 <pbuf_copy+0xb2>
80125a4: 4b38 ldr r3, [pc, #224] ; (8012688 <pbuf_copy+0x188>)
80125a6: f240 32d9 movw r2, #985 ; 0x3d9
80125aa: 493a ldr r1, [pc, #232] ; (8012694 <pbuf_copy+0x194>)
80125ac: 4838 ldr r0, [pc, #224] ; (8012690 <pbuf_copy+0x190>)
80125ae: f00a fba3 bl 801ccf8 <iprintf>
LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
80125b2: 683b ldr r3, [r7, #0]
80125b4: 895b ldrh r3, [r3, #10]
80125b6: 461a mov r2, r3
80125b8: 693b ldr r3, [r7, #16]
80125ba: 4293 cmp r3, r2
80125bc: d906 bls.n 80125cc <pbuf_copy+0xcc>
80125be: 4b32 ldr r3, [pc, #200] ; (8012688 <pbuf_copy+0x188>)
80125c0: f240 32da movw r2, #986 ; 0x3da
80125c4: 4934 ldr r1, [pc, #208] ; (8012698 <pbuf_copy+0x198>)
80125c6: 4832 ldr r0, [pc, #200] ; (8012690 <pbuf_copy+0x190>)
80125c8: f00a fb96 bl 801ccf8 <iprintf>
if (offset_from >= p_from->len) {
80125cc: 683b ldr r3, [r7, #0]
80125ce: 895b ldrh r3, [r3, #10]
80125d0: 461a mov r2, r3
80125d2: 693b ldr r3, [r7, #16]
80125d4: 4293 cmp r3, r2
80125d6: d304 bcc.n 80125e2 <pbuf_copy+0xe2>
/* on to next p_from (if any) */
offset_from = 0;
80125d8: 2300 movs r3, #0
80125da: 613b str r3, [r7, #16]
p_from = p_from->next;
80125dc: 683b ldr r3, [r7, #0]
80125de: 681b ldr r3, [r3, #0]
80125e0: 603b str r3, [r7, #0]
}
if (offset_to == p_to->len) {
80125e2: 687b ldr r3, [r7, #4]
80125e4: 895b ldrh r3, [r3, #10]
80125e6: 461a mov r2, r3
80125e8: 697b ldr r3, [r7, #20]
80125ea: 4293 cmp r3, r2
80125ec: d114 bne.n 8012618 <pbuf_copy+0x118>
/* on to next p_to (if any) */
offset_to = 0;
80125ee: 2300 movs r3, #0
80125f0: 617b str r3, [r7, #20]
p_to = p_to->next;
80125f2: 687b ldr r3, [r7, #4]
80125f4: 681b ldr r3, [r3, #0]
80125f6: 607b str r3, [r7, #4]
LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
80125f8: 687b ldr r3, [r7, #4]
80125fa: 2b00 cmp r3, #0
80125fc: d10c bne.n 8012618 <pbuf_copy+0x118>
80125fe: 683b ldr r3, [r7, #0]
8012600: 2b00 cmp r3, #0
8012602: d009 beq.n 8012618 <pbuf_copy+0x118>
8012604: 4b20 ldr r3, [pc, #128] ; (8012688 <pbuf_copy+0x188>)
8012606: f44f 7279 mov.w r2, #996 ; 0x3e4
801260a: 4924 ldr r1, [pc, #144] ; (801269c <pbuf_copy+0x19c>)
801260c: 4820 ldr r0, [pc, #128] ; (8012690 <pbuf_copy+0x190>)
801260e: f00a fb73 bl 801ccf8 <iprintf>
8012612: f06f 030f mvn.w r3, #15
8012616: e032 b.n 801267e <pbuf_copy+0x17e>
}
if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
8012618: 683b ldr r3, [r7, #0]
801261a: 2b00 cmp r3, #0
801261c: d013 beq.n 8012646 <pbuf_copy+0x146>
801261e: 683b ldr r3, [r7, #0]
8012620: 895a ldrh r2, [r3, #10]
8012622: 683b ldr r3, [r7, #0]
8012624: 891b ldrh r3, [r3, #8]
8012626: 429a cmp r2, r3
8012628: d10d bne.n 8012646 <pbuf_copy+0x146>
/* don't copy more than one packet! */
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
801262a: 683b ldr r3, [r7, #0]
801262c: 681b ldr r3, [r3, #0]
801262e: 2b00 cmp r3, #0
8012630: d009 beq.n 8012646 <pbuf_copy+0x146>
8012632: 4b15 ldr r3, [pc, #84] ; (8012688 <pbuf_copy+0x188>)
8012634: f240 32ea movw r2, #1002 ; 0x3ea
8012638: 4919 ldr r1, [pc, #100] ; (80126a0 <pbuf_copy+0x1a0>)
801263a: 4815 ldr r0, [pc, #84] ; (8012690 <pbuf_copy+0x190>)
801263c: f00a fb5c bl 801ccf8 <iprintf>
8012640: f06f 0305 mvn.w r3, #5
8012644: e01b b.n 801267e <pbuf_copy+0x17e>
(p_from->next == NULL), return ERR_VAL;);
}
if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
8012646: 687b ldr r3, [r7, #4]
8012648: 2b00 cmp r3, #0
801264a: d013 beq.n 8012674 <pbuf_copy+0x174>
801264c: 687b ldr r3, [r7, #4]
801264e: 895a ldrh r2, [r3, #10]
8012650: 687b ldr r3, [r7, #4]
8012652: 891b ldrh r3, [r3, #8]
8012654: 429a cmp r2, r3
8012656: d10d bne.n 8012674 <pbuf_copy+0x174>
/* don't copy more than one packet! */
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
8012658: 687b ldr r3, [r7, #4]
801265a: 681b ldr r3, [r3, #0]
801265c: 2b00 cmp r3, #0
801265e: d009 beq.n 8012674 <pbuf_copy+0x174>
8012660: 4b09 ldr r3, [pc, #36] ; (8012688 <pbuf_copy+0x188>)
8012662: f240 32ef movw r2, #1007 ; 0x3ef
8012666: 490e ldr r1, [pc, #56] ; (80126a0 <pbuf_copy+0x1a0>)
8012668: 4809 ldr r0, [pc, #36] ; (8012690 <pbuf_copy+0x190>)
801266a: f00a fb45 bl 801ccf8 <iprintf>
801266e: f06f 0305 mvn.w r3, #5
8012672: e004 b.n 801267e <pbuf_copy+0x17e>
(p_to->next == NULL), return ERR_VAL;);
}
} while (p_from);
8012674: 683b ldr r3, [r7, #0]
8012676: 2b00 cmp r3, #0
8012678: f47f af61 bne.w 801253e <pbuf_copy+0x3e>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n"));
return ERR_OK;
801267c: 2300 movs r3, #0
}
801267e: 4618 mov r0, r3
8012680: 3718 adds r7, #24
8012682: 46bd mov sp, r7
8012684: bd80 pop {r7, pc}
8012686: bf00 nop
8012688: 0801e688 .word 0x0801e688
801268c: 0801e930 .word 0x0801e930
8012690: 0801e6e8 .word 0x0801e6e8
8012694: 0801e960 .word 0x0801e960
8012698: 0801e978 .word 0x0801e978
801269c: 0801e994 .word 0x0801e994
80126a0: 0801e9a4 .word 0x0801e9a4
080126a4 <pbuf_copy_partial>:
* @param offset offset into the packet buffer from where to begin copying len bytes
* @return the number of bytes copied, or 0 on failure
*/
u16_t
pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset)
{
80126a4: b580 push {r7, lr}
80126a6: b088 sub sp, #32
80126a8: af00 add r7, sp, #0
80126aa: 60f8 str r0, [r7, #12]
80126ac: 60b9 str r1, [r7, #8]
80126ae: 4611 mov r1, r2
80126b0: 461a mov r2, r3
80126b2: 460b mov r3, r1
80126b4: 80fb strh r3, [r7, #6]
80126b6: 4613 mov r3, r2
80126b8: 80bb strh r3, [r7, #4]
const struct pbuf *p;
u16_t left = 0;
80126ba: 2300 movs r3, #0
80126bc: 837b strh r3, [r7, #26]
u16_t buf_copy_len;
u16_t copied_total = 0;
80126be: 2300 movs r3, #0
80126c0: 82fb strh r3, [r7, #22]
LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
80126c2: 68fb ldr r3, [r7, #12]
80126c4: 2b00 cmp r3, #0
80126c6: d108 bne.n 80126da <pbuf_copy_partial+0x36>
80126c8: 4b2b ldr r3, [pc, #172] ; (8012778 <pbuf_copy_partial+0xd4>)
80126ca: f240 420a movw r2, #1034 ; 0x40a
80126ce: 492b ldr r1, [pc, #172] ; (801277c <pbuf_copy_partial+0xd8>)
80126d0: 482b ldr r0, [pc, #172] ; (8012780 <pbuf_copy_partial+0xdc>)
80126d2: f00a fb11 bl 801ccf8 <iprintf>
80126d6: 2300 movs r3, #0
80126d8: e04a b.n 8012770 <pbuf_copy_partial+0xcc>
LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
80126da: 68bb ldr r3, [r7, #8]
80126dc: 2b00 cmp r3, #0
80126de: d108 bne.n 80126f2 <pbuf_copy_partial+0x4e>
80126e0: 4b25 ldr r3, [pc, #148] ; (8012778 <pbuf_copy_partial+0xd4>)
80126e2: f240 420b movw r2, #1035 ; 0x40b
80126e6: 4927 ldr r1, [pc, #156] ; (8012784 <pbuf_copy_partial+0xe0>)
80126e8: 4825 ldr r0, [pc, #148] ; (8012780 <pbuf_copy_partial+0xdc>)
80126ea: f00a fb05 bl 801ccf8 <iprintf>
80126ee: 2300 movs r3, #0
80126f0: e03e b.n 8012770 <pbuf_copy_partial+0xcc>
/* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */
for (p = buf; len != 0 && p != NULL; p = p->next) {
80126f2: 68fb ldr r3, [r7, #12]
80126f4: 61fb str r3, [r7, #28]
80126f6: e034 b.n 8012762 <pbuf_copy_partial+0xbe>
if ((offset != 0) && (offset >= p->len)) {
80126f8: 88bb ldrh r3, [r7, #4]
80126fa: 2b00 cmp r3, #0
80126fc: d00a beq.n 8012714 <pbuf_copy_partial+0x70>
80126fe: 69fb ldr r3, [r7, #28]
8012700: 895b ldrh r3, [r3, #10]
8012702: 88ba ldrh r2, [r7, #4]
8012704: 429a cmp r2, r3
8012706: d305 bcc.n 8012714 <pbuf_copy_partial+0x70>
/* don't copy from this buffer -> on to the next */
offset = (u16_t)(offset - p->len);
8012708: 69fb ldr r3, [r7, #28]
801270a: 895b ldrh r3, [r3, #10]
801270c: 88ba ldrh r2, [r7, #4]
801270e: 1ad3 subs r3, r2, r3
8012710: 80bb strh r3, [r7, #4]
8012712: e023 b.n 801275c <pbuf_copy_partial+0xb8>
} else {
/* copy from this buffer. maybe only partially. */
buf_copy_len = (u16_t)(p->len - offset);
8012714: 69fb ldr r3, [r7, #28]
8012716: 895a ldrh r2, [r3, #10]
8012718: 88bb ldrh r3, [r7, #4]
801271a: 1ad3 subs r3, r2, r3
801271c: 833b strh r3, [r7, #24]
if (buf_copy_len > len) {
801271e: 8b3a ldrh r2, [r7, #24]
8012720: 88fb ldrh r3, [r7, #6]
8012722: 429a cmp r2, r3
8012724: d901 bls.n 801272a <pbuf_copy_partial+0x86>
buf_copy_len = len;
8012726: 88fb ldrh r3, [r7, #6]
8012728: 833b strh r3, [r7, #24]
}
/* copy the necessary parts of the buffer */
MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len);
801272a: 8b7b ldrh r3, [r7, #26]
801272c: 68ba ldr r2, [r7, #8]
801272e: 18d0 adds r0, r2, r3
8012730: 69fb ldr r3, [r7, #28]
8012732: 685a ldr r2, [r3, #4]
8012734: 88bb ldrh r3, [r7, #4]
8012736: 4413 add r3, r2
8012738: 8b3a ldrh r2, [r7, #24]
801273a: 4619 mov r1, r3
801273c: f00a faaf bl 801cc9e <memcpy>
copied_total = (u16_t)(copied_total + buf_copy_len);
8012740: 8afa ldrh r2, [r7, #22]
8012742: 8b3b ldrh r3, [r7, #24]
8012744: 4413 add r3, r2
8012746: 82fb strh r3, [r7, #22]
left = (u16_t)(left + buf_copy_len);
8012748: 8b7a ldrh r2, [r7, #26]
801274a: 8b3b ldrh r3, [r7, #24]
801274c: 4413 add r3, r2
801274e: 837b strh r3, [r7, #26]
len = (u16_t)(len - buf_copy_len);
8012750: 88fa ldrh r2, [r7, #6]
8012752: 8b3b ldrh r3, [r7, #24]
8012754: 1ad3 subs r3, r2, r3
8012756: 80fb strh r3, [r7, #6]
offset = 0;
8012758: 2300 movs r3, #0
801275a: 80bb strh r3, [r7, #4]
for (p = buf; len != 0 && p != NULL; p = p->next) {
801275c: 69fb ldr r3, [r7, #28]
801275e: 681b ldr r3, [r3, #0]
8012760: 61fb str r3, [r7, #28]
8012762: 88fb ldrh r3, [r7, #6]
8012764: 2b00 cmp r3, #0
8012766: d002 beq.n 801276e <pbuf_copy_partial+0xca>
8012768: 69fb ldr r3, [r7, #28]
801276a: 2b00 cmp r3, #0
801276c: d1c4 bne.n 80126f8 <pbuf_copy_partial+0x54>
}
}
return copied_total;
801276e: 8afb ldrh r3, [r7, #22]
}
8012770: 4618 mov r0, r3
8012772: 3720 adds r7, #32
8012774: 46bd mov sp, r7
8012776: bd80 pop {r7, pc}
8012778: 0801e688 .word 0x0801e688
801277c: 0801e9d0 .word 0x0801e9d0
8012780: 0801e6e8 .word 0x0801e6e8
8012784: 0801e9f0 .word 0x0801e9f0
08012788 <pbuf_clone>:
*
* @return a new pbuf or NULL if allocation fails
*/
struct pbuf *
pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p)
{
8012788: b580 push {r7, lr}
801278a: b084 sub sp, #16
801278c: af00 add r7, sp, #0
801278e: 4603 mov r3, r0
8012790: 603a str r2, [r7, #0]
8012792: 71fb strb r3, [r7, #7]
8012794: 460b mov r3, r1
8012796: 80bb strh r3, [r7, #4]
struct pbuf *q;
err_t err;
q = pbuf_alloc(layer, p->tot_len, type);
8012798: 683b ldr r3, [r7, #0]
801279a: 8919 ldrh r1, [r3, #8]
801279c: 88ba ldrh r2, [r7, #4]
801279e: 79fb ldrb r3, [r7, #7]
80127a0: 4618 mov r0, r3
80127a2: f7ff fa99 bl 8011cd8 <pbuf_alloc>
80127a6: 60f8 str r0, [r7, #12]
if (q == NULL) {
80127a8: 68fb ldr r3, [r7, #12]
80127aa: 2b00 cmp r3, #0
80127ac: d101 bne.n 80127b2 <pbuf_clone+0x2a>
return NULL;
80127ae: 2300 movs r3, #0
80127b0: e011 b.n 80127d6 <pbuf_clone+0x4e>
}
err = pbuf_copy(q, p);
80127b2: 6839 ldr r1, [r7, #0]
80127b4: 68f8 ldr r0, [r7, #12]
80127b6: f7ff fea3 bl 8012500 <pbuf_copy>
80127ba: 4603 mov r3, r0
80127bc: 72fb strb r3, [r7, #11]
LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */
LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
80127be: f997 300b ldrsb.w r3, [r7, #11]
80127c2: 2b00 cmp r3, #0
80127c4: d006 beq.n 80127d4 <pbuf_clone+0x4c>
80127c6: 4b06 ldr r3, [pc, #24] ; (80127e0 <pbuf_clone+0x58>)
80127c8: f240 5224 movw r2, #1316 ; 0x524
80127cc: 4905 ldr r1, [pc, #20] ; (80127e4 <pbuf_clone+0x5c>)
80127ce: 4806 ldr r0, [pc, #24] ; (80127e8 <pbuf_clone+0x60>)
80127d0: f00a fa92 bl 801ccf8 <iprintf>
return q;
80127d4: 68fb ldr r3, [r7, #12]
}
80127d6: 4618 mov r0, r3
80127d8: 3710 adds r7, #16
80127da: 46bd mov sp, r7
80127dc: bd80 pop {r7, pc}
80127de: bf00 nop
80127e0: 0801e688 .word 0x0801e688
80127e4: 0801eafc .word 0x0801eafc
80127e8: 0801e6e8 .word 0x0801e6e8
080127ec <tcp_init>:
/**
* Initialize this module.
*/
void
tcp_init(void)
{
80127ec: b580 push {r7, lr}
80127ee: af00 add r7, sp, #0
#ifdef LWIP_RAND
tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
80127f0: f00a fa9a bl 801cd28 <rand>
80127f4: 4603 mov r3, r0
80127f6: b29b uxth r3, r3
80127f8: f3c3 030d ubfx r3, r3, #0, #14
80127fc: b29b uxth r3, r3
80127fe: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
8012802: b29a uxth r2, r3
8012804: 4b01 ldr r3, [pc, #4] ; (801280c <tcp_init+0x20>)
8012806: 801a strh r2, [r3, #0]
#endif /* LWIP_RAND */
}
8012808: bf00 nop
801280a: bd80 pop {r7, pc}
801280c: 20000074 .word 0x20000074
08012810 <tcp_free>:
/** Free a tcp pcb */
void
tcp_free(struct tcp_pcb *pcb)
{
8012810: b580 push {r7, lr}
8012812: b082 sub sp, #8
8012814: af00 add r7, sp, #0
8012816: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
8012818: 687b ldr r3, [r7, #4]
801281a: 7d1b ldrb r3, [r3, #20]
801281c: 2b01 cmp r3, #1
801281e: d105 bne.n 801282c <tcp_free+0x1c>
8012820: 4b06 ldr r3, [pc, #24] ; (801283c <tcp_free+0x2c>)
8012822: 22d4 movs r2, #212 ; 0xd4
8012824: 4906 ldr r1, [pc, #24] ; (8012840 <tcp_free+0x30>)
8012826: 4807 ldr r0, [pc, #28] ; (8012844 <tcp_free+0x34>)
8012828: f00a fa66 bl 801ccf8 <iprintf>
#if LWIP_TCP_PCB_NUM_EXT_ARGS
tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args);
#endif
memp_free(MEMP_TCP_PCB, pcb);
801282c: 6879 ldr r1, [r7, #4]
801282e: 2001 movs r0, #1
8012830: f7fe fe86 bl 8011540 <memp_free>
}
8012834: bf00 nop
8012836: 3708 adds r7, #8
8012838: 46bd mov sp, r7
801283a: bd80 pop {r7, pc}
801283c: 0801eb88 .word 0x0801eb88
8012840: 0801ebb8 .word 0x0801ebb8
8012844: 0801ebcc .word 0x0801ebcc
08012848 <tcp_free_listen>:
/** Free a tcp listen pcb */
static void
tcp_free_listen(struct tcp_pcb *pcb)
{
8012848: b580 push {r7, lr}
801284a: b082 sub sp, #8
801284c: af00 add r7, sp, #0
801284e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
8012850: 687b ldr r3, [r7, #4]
8012852: 7d1b ldrb r3, [r3, #20]
8012854: 2b01 cmp r3, #1
8012856: d105 bne.n 8012864 <tcp_free_listen+0x1c>
8012858: 4b06 ldr r3, [pc, #24] ; (8012874 <tcp_free_listen+0x2c>)
801285a: 22df movs r2, #223 ; 0xdf
801285c: 4906 ldr r1, [pc, #24] ; (8012878 <tcp_free_listen+0x30>)
801285e: 4807 ldr r0, [pc, #28] ; (801287c <tcp_free_listen+0x34>)
8012860: f00a fa4a bl 801ccf8 <iprintf>
#if LWIP_TCP_PCB_NUM_EXT_ARGS
tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args);
#endif
memp_free(MEMP_TCP_PCB_LISTEN, pcb);
8012864: 6879 ldr r1, [r7, #4]
8012866: 2002 movs r0, #2
8012868: f7fe fe6a bl 8011540 <memp_free>
}
801286c: bf00 nop
801286e: 3708 adds r7, #8
8012870: 46bd mov sp, r7
8012872: bd80 pop {r7, pc}
8012874: 0801eb88 .word 0x0801eb88
8012878: 0801ebf4 .word 0x0801ebf4
801287c: 0801ebcc .word 0x0801ebcc
08012880 <tcp_tmr>:
/**
* Called periodically to dispatch TCP timers.
*/
void
tcp_tmr(void)
{
8012880: b580 push {r7, lr}
8012882: af00 add r7, sp, #0
/* Call tcp_fasttmr() every 250 ms */
tcp_fasttmr();
8012884: f000 fe98 bl 80135b8 <tcp_fasttmr>
if (++tcp_timer & 1) {
8012888: 4b07 ldr r3, [pc, #28] ; (80128a8 <tcp_tmr+0x28>)
801288a: 781b ldrb r3, [r3, #0]
801288c: 3301 adds r3, #1
801288e: b2da uxtb r2, r3
8012890: 4b05 ldr r3, [pc, #20] ; (80128a8 <tcp_tmr+0x28>)
8012892: 701a strb r2, [r3, #0]
8012894: 4b04 ldr r3, [pc, #16] ; (80128a8 <tcp_tmr+0x28>)
8012896: 781b ldrb r3, [r3, #0]
8012898: f003 0301 and.w r3, r3, #1
801289c: 2b00 cmp r3, #0
801289e: d001 beq.n 80128a4 <tcp_tmr+0x24>
/* Call tcp_slowtmr() every 500 ms, i.e., every other timer
tcp_tmr() is called. */
tcp_slowtmr();
80128a0: f000 fb4c bl 8012f3c <tcp_slowtmr>
}
}
80128a4: bf00 nop
80128a6: bd80 pop {r7, pc}
80128a8: 20008729 .word 0x20008729
080128ac <tcp_remove_listener>:
/** Called when a listen pcb is closed. Iterates one pcb list and removes the
* closed listener pcb from pcb->listener if matching.
*/
static void
tcp_remove_listener(struct tcp_pcb *list, struct tcp_pcb_listen *lpcb)
{
80128ac: b580 push {r7, lr}
80128ae: b084 sub sp, #16
80128b0: af00 add r7, sp, #0
80128b2: 6078 str r0, [r7, #4]
80128b4: 6039 str r1, [r7, #0]
struct tcp_pcb *pcb;
LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL);
80128b6: 683b ldr r3, [r7, #0]
80128b8: 2b00 cmp r3, #0
80128ba: d105 bne.n 80128c8 <tcp_remove_listener+0x1c>
80128bc: 4b0d ldr r3, [pc, #52] ; (80128f4 <tcp_remove_listener+0x48>)
80128be: 22ff movs r2, #255 ; 0xff
80128c0: 490d ldr r1, [pc, #52] ; (80128f8 <tcp_remove_listener+0x4c>)
80128c2: 480e ldr r0, [pc, #56] ; (80128fc <tcp_remove_listener+0x50>)
80128c4: f00a fa18 bl 801ccf8 <iprintf>
for (pcb = list; pcb != NULL; pcb = pcb->next) {
80128c8: 687b ldr r3, [r7, #4]
80128ca: 60fb str r3, [r7, #12]
80128cc: e00a b.n 80128e4 <tcp_remove_listener+0x38>
if (pcb->listener == lpcb) {
80128ce: 68fb ldr r3, [r7, #12]
80128d0: 6fdb ldr r3, [r3, #124] ; 0x7c
80128d2: 683a ldr r2, [r7, #0]
80128d4: 429a cmp r2, r3
80128d6: d102 bne.n 80128de <tcp_remove_listener+0x32>
pcb->listener = NULL;
80128d8: 68fb ldr r3, [r7, #12]
80128da: 2200 movs r2, #0
80128dc: 67da str r2, [r3, #124] ; 0x7c
for (pcb = list; pcb != NULL; pcb = pcb->next) {
80128de: 68fb ldr r3, [r7, #12]
80128e0: 68db ldr r3, [r3, #12]
80128e2: 60fb str r3, [r7, #12]
80128e4: 68fb ldr r3, [r7, #12]
80128e6: 2b00 cmp r3, #0
80128e8: d1f1 bne.n 80128ce <tcp_remove_listener+0x22>
}
}
}
80128ea: bf00 nop
80128ec: 3710 adds r7, #16
80128ee: 46bd mov sp, r7
80128f0: bd80 pop {r7, pc}
80128f2: bf00 nop
80128f4: 0801eb88 .word 0x0801eb88
80128f8: 0801ec10 .word 0x0801ec10
80128fc: 0801ebcc .word 0x0801ebcc
08012900 <tcp_listen_closed>:
/** Called when a listen pcb is closed. Iterates all pcb lists and removes the
* closed listener pcb from pcb->listener if matching.
*/
static void
tcp_listen_closed(struct tcp_pcb *pcb)
{
8012900: b580 push {r7, lr}
8012902: b084 sub sp, #16
8012904: af00 add r7, sp, #0
8012906: 6078 str r0, [r7, #4]
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
size_t i;
LWIP_ASSERT("pcb != NULL", pcb != NULL);
8012908: 687b ldr r3, [r7, #4]
801290a: 2b00 cmp r3, #0
801290c: d106 bne.n 801291c <tcp_listen_closed+0x1c>
801290e: 4b14 ldr r3, [pc, #80] ; (8012960 <tcp_listen_closed+0x60>)
8012910: f240 1211 movw r2, #273 ; 0x111
8012914: 4913 ldr r1, [pc, #76] ; (8012964 <tcp_listen_closed+0x64>)
8012916: 4814 ldr r0, [pc, #80] ; (8012968 <tcp_listen_closed+0x68>)
8012918: f00a f9ee bl 801ccf8 <iprintf>
LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
801291c: 687b ldr r3, [r7, #4]
801291e: 7d1b ldrb r3, [r3, #20]
8012920: 2b01 cmp r3, #1
8012922: d006 beq.n 8012932 <tcp_listen_closed+0x32>
8012924: 4b0e ldr r3, [pc, #56] ; (8012960 <tcp_listen_closed+0x60>)
8012926: f44f 7289 mov.w r2, #274 ; 0x112
801292a: 4910 ldr r1, [pc, #64] ; (801296c <tcp_listen_closed+0x6c>)
801292c: 480e ldr r0, [pc, #56] ; (8012968 <tcp_listen_closed+0x68>)
801292e: f00a f9e3 bl 801ccf8 <iprintf>
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
8012932: 2301 movs r3, #1
8012934: 60fb str r3, [r7, #12]
8012936: e00b b.n 8012950 <tcp_listen_closed+0x50>
tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb);
8012938: 4a0d ldr r2, [pc, #52] ; (8012970 <tcp_listen_closed+0x70>)
801293a: 68fb ldr r3, [r7, #12]
801293c: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8012940: 681b ldr r3, [r3, #0]
8012942: 6879 ldr r1, [r7, #4]
8012944: 4618 mov r0, r3
8012946: f7ff ffb1 bl 80128ac <tcp_remove_listener>
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
801294a: 68fb ldr r3, [r7, #12]
801294c: 3301 adds r3, #1
801294e: 60fb str r3, [r7, #12]
8012950: 68fb ldr r3, [r7, #12]
8012952: 2b03 cmp r3, #3
8012954: d9f0 bls.n 8012938 <tcp_listen_closed+0x38>
}
#endif
LWIP_UNUSED_ARG(pcb);
}
8012956: bf00 nop
8012958: 3710 adds r7, #16
801295a: 46bd mov sp, r7
801295c: bd80 pop {r7, pc}
801295e: bf00 nop
8012960: 0801eb88 .word 0x0801eb88
8012964: 0801ec38 .word 0x0801ec38
8012968: 0801ebcc .word 0x0801ebcc
801296c: 0801ec44 .word 0x0801ec44
8012970: 08022e70 .word 0x08022e70
08012974 <tcp_close_shutdown>:
* @return ERR_OK if connection has been closed
* another err_t if closing failed and pcb is not freed
*/
static err_t
tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data)
{
8012974: b5b0 push {r4, r5, r7, lr}
8012976: b088 sub sp, #32
8012978: af04 add r7, sp, #16
801297a: 6078 str r0, [r7, #4]
801297c: 460b mov r3, r1
801297e: 70fb strb r3, [r7, #3]
LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
8012980: 687b ldr r3, [r7, #4]
8012982: 2b00 cmp r3, #0
8012984: d106 bne.n 8012994 <tcp_close_shutdown+0x20>
8012986: 4b61 ldr r3, [pc, #388] ; (8012b0c <tcp_close_shutdown+0x198>)
8012988: f44f 72af mov.w r2, #350 ; 0x15e
801298c: 4960 ldr r1, [pc, #384] ; (8012b10 <tcp_close_shutdown+0x19c>)
801298e: 4861 ldr r0, [pc, #388] ; (8012b14 <tcp_close_shutdown+0x1a0>)
8012990: f00a f9b2 bl 801ccf8 <iprintf>
if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) {
8012994: 78fb ldrb r3, [r7, #3]
8012996: 2b00 cmp r3, #0
8012998: d066 beq.n 8012a68 <tcp_close_shutdown+0xf4>
801299a: 687b ldr r3, [r7, #4]
801299c: 7d1b ldrb r3, [r3, #20]
801299e: 2b04 cmp r3, #4
80129a0: d003 beq.n 80129aa <tcp_close_shutdown+0x36>
80129a2: 687b ldr r3, [r7, #4]
80129a4: 7d1b ldrb r3, [r3, #20]
80129a6: 2b07 cmp r3, #7
80129a8: d15e bne.n 8012a68 <tcp_close_shutdown+0xf4>
if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
80129aa: 687b ldr r3, [r7, #4]
80129ac: 6f9b ldr r3, [r3, #120] ; 0x78
80129ae: 2b00 cmp r3, #0
80129b0: d104 bne.n 80129bc <tcp_close_shutdown+0x48>
80129b2: 687b ldr r3, [r7, #4]
80129b4: 8d1b ldrh r3, [r3, #40] ; 0x28
80129b6: f5b3 6f06 cmp.w r3, #2144 ; 0x860
80129ba: d055 beq.n 8012a68 <tcp_close_shutdown+0xf4>
/* Not all data received by application, send RST to tell the remote
side about this. */
LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED);
80129bc: 687b ldr r3, [r7, #4]
80129be: 8b5b ldrh r3, [r3, #26]
80129c0: f003 0310 and.w r3, r3, #16
80129c4: 2b00 cmp r3, #0
80129c6: d106 bne.n 80129d6 <tcp_close_shutdown+0x62>
80129c8: 4b50 ldr r3, [pc, #320] ; (8012b0c <tcp_close_shutdown+0x198>)
80129ca: f44f 72b2 mov.w r2, #356 ; 0x164
80129ce: 4952 ldr r1, [pc, #328] ; (8012b18 <tcp_close_shutdown+0x1a4>)
80129d0: 4850 ldr r0, [pc, #320] ; (8012b14 <tcp_close_shutdown+0x1a0>)
80129d2: f00a f991 bl 801ccf8 <iprintf>
/* don't call tcp_abort here: we must not deallocate the pcb since
that might not be expected when calling tcp_close */
tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
80129d6: 687b ldr r3, [r7, #4]
80129d8: 6d18 ldr r0, [r3, #80] ; 0x50
80129da: 687b ldr r3, [r7, #4]
80129dc: 6a5c ldr r4, [r3, #36] ; 0x24
80129de: 687d ldr r5, [r7, #4]
80129e0: 687b ldr r3, [r7, #4]
80129e2: 3304 adds r3, #4
80129e4: 687a ldr r2, [r7, #4]
80129e6: 8ad2 ldrh r2, [r2, #22]
80129e8: 6879 ldr r1, [r7, #4]
80129ea: 8b09 ldrh r1, [r1, #24]
80129ec: 9102 str r1, [sp, #8]
80129ee: 9201 str r2, [sp, #4]
80129f0: 9300 str r3, [sp, #0]
80129f2: 462b mov r3, r5
80129f4: 4622 mov r2, r4
80129f6: 4601 mov r1, r0
80129f8: 6878 ldr r0, [r7, #4]
80129fa: f004 fe91 bl 8017720 <tcp_rst>
pcb->local_port, pcb->remote_port);
tcp_pcb_purge(pcb);
80129fe: 6878 ldr r0, [r7, #4]
8012a00: f001 f8ba bl 8013b78 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8012a04: 4b45 ldr r3, [pc, #276] ; (8012b1c <tcp_close_shutdown+0x1a8>)
8012a06: 681b ldr r3, [r3, #0]
8012a08: 687a ldr r2, [r7, #4]
8012a0a: 429a cmp r2, r3
8012a0c: d105 bne.n 8012a1a <tcp_close_shutdown+0xa6>
8012a0e: 4b43 ldr r3, [pc, #268] ; (8012b1c <tcp_close_shutdown+0x1a8>)
8012a10: 681b ldr r3, [r3, #0]
8012a12: 68db ldr r3, [r3, #12]
8012a14: 4a41 ldr r2, [pc, #260] ; (8012b1c <tcp_close_shutdown+0x1a8>)
8012a16: 6013 str r3, [r2, #0]
8012a18: e013 b.n 8012a42 <tcp_close_shutdown+0xce>
8012a1a: 4b40 ldr r3, [pc, #256] ; (8012b1c <tcp_close_shutdown+0x1a8>)
8012a1c: 681b ldr r3, [r3, #0]
8012a1e: 60fb str r3, [r7, #12]
8012a20: e00c b.n 8012a3c <tcp_close_shutdown+0xc8>
8012a22: 68fb ldr r3, [r7, #12]
8012a24: 68db ldr r3, [r3, #12]
8012a26: 687a ldr r2, [r7, #4]
8012a28: 429a cmp r2, r3
8012a2a: d104 bne.n 8012a36 <tcp_close_shutdown+0xc2>
8012a2c: 687b ldr r3, [r7, #4]
8012a2e: 68da ldr r2, [r3, #12]
8012a30: 68fb ldr r3, [r7, #12]
8012a32: 60da str r2, [r3, #12]
8012a34: e005 b.n 8012a42 <tcp_close_shutdown+0xce>
8012a36: 68fb ldr r3, [r7, #12]
8012a38: 68db ldr r3, [r3, #12]
8012a3a: 60fb str r3, [r7, #12]
8012a3c: 68fb ldr r3, [r7, #12]
8012a3e: 2b00 cmp r3, #0
8012a40: d1ef bne.n 8012a22 <tcp_close_shutdown+0xae>
8012a42: 687b ldr r3, [r7, #4]
8012a44: 2200 movs r2, #0
8012a46: 60da str r2, [r3, #12]
8012a48: 4b35 ldr r3, [pc, #212] ; (8012b20 <tcp_close_shutdown+0x1ac>)
8012a4a: 2201 movs r2, #1
8012a4c: 701a strb r2, [r3, #0]
/* Deallocate the pcb since we already sent a RST for it */
if (tcp_input_pcb == pcb) {
8012a4e: 4b35 ldr r3, [pc, #212] ; (8012b24 <tcp_close_shutdown+0x1b0>)
8012a50: 681b ldr r3, [r3, #0]
8012a52: 687a ldr r2, [r7, #4]
8012a54: 429a cmp r2, r3
8012a56: d102 bne.n 8012a5e <tcp_close_shutdown+0xea>
/* prevent using a deallocated pcb: free it from tcp_input later */
tcp_trigger_input_pcb_close();
8012a58: f003 fd4c bl 80164f4 <tcp_trigger_input_pcb_close>
8012a5c: e002 b.n 8012a64 <tcp_close_shutdown+0xf0>
} else {
tcp_free(pcb);
8012a5e: 6878 ldr r0, [r7, #4]
8012a60: f7ff fed6 bl 8012810 <tcp_free>
}
return ERR_OK;
8012a64: 2300 movs r3, #0
8012a66: e04d b.n 8012b04 <tcp_close_shutdown+0x190>
}
}
/* - states which free the pcb are handled here,
- states which send FIN and change state are handled in tcp_close_shutdown_fin() */
switch (pcb->state) {
8012a68: 687b ldr r3, [r7, #4]
8012a6a: 7d1b ldrb r3, [r3, #20]
8012a6c: 2b01 cmp r3, #1
8012a6e: d02d beq.n 8012acc <tcp_close_shutdown+0x158>
8012a70: 2b02 cmp r3, #2
8012a72: d036 beq.n 8012ae2 <tcp_close_shutdown+0x16e>
8012a74: 2b00 cmp r3, #0
8012a76: d13f bne.n 8012af8 <tcp_close_shutdown+0x184>
* and the user needs some way to free it should the need arise.
* Calling tcp_close() with a pcb that has already been closed, (i.e. twice)
* or for a pcb that has been used and then entered the CLOSED state
* is erroneous, but this should never happen as the pcb has in those cases
* been freed, and so any remaining handles are bogus. */
if (pcb->local_port != 0) {
8012a78: 687b ldr r3, [r7, #4]
8012a7a: 8adb ldrh r3, [r3, #22]
8012a7c: 2b00 cmp r3, #0
8012a7e: d021 beq.n 8012ac4 <tcp_close_shutdown+0x150>
TCP_RMV(&tcp_bound_pcbs, pcb);
8012a80: 4b29 ldr r3, [pc, #164] ; (8012b28 <tcp_close_shutdown+0x1b4>)
8012a82: 681b ldr r3, [r3, #0]
8012a84: 687a ldr r2, [r7, #4]
8012a86: 429a cmp r2, r3
8012a88: d105 bne.n 8012a96 <tcp_close_shutdown+0x122>
8012a8a: 4b27 ldr r3, [pc, #156] ; (8012b28 <tcp_close_shutdown+0x1b4>)
8012a8c: 681b ldr r3, [r3, #0]
8012a8e: 68db ldr r3, [r3, #12]
8012a90: 4a25 ldr r2, [pc, #148] ; (8012b28 <tcp_close_shutdown+0x1b4>)
8012a92: 6013 str r3, [r2, #0]
8012a94: e013 b.n 8012abe <tcp_close_shutdown+0x14a>
8012a96: 4b24 ldr r3, [pc, #144] ; (8012b28 <tcp_close_shutdown+0x1b4>)
8012a98: 681b ldr r3, [r3, #0]
8012a9a: 60bb str r3, [r7, #8]
8012a9c: e00c b.n 8012ab8 <tcp_close_shutdown+0x144>
8012a9e: 68bb ldr r3, [r7, #8]
8012aa0: 68db ldr r3, [r3, #12]
8012aa2: 687a ldr r2, [r7, #4]
8012aa4: 429a cmp r2, r3
8012aa6: d104 bne.n 8012ab2 <tcp_close_shutdown+0x13e>
8012aa8: 687b ldr r3, [r7, #4]
8012aaa: 68da ldr r2, [r3, #12]
8012aac: 68bb ldr r3, [r7, #8]
8012aae: 60da str r2, [r3, #12]
8012ab0: e005 b.n 8012abe <tcp_close_shutdown+0x14a>
8012ab2: 68bb ldr r3, [r7, #8]
8012ab4: 68db ldr r3, [r3, #12]
8012ab6: 60bb str r3, [r7, #8]
8012ab8: 68bb ldr r3, [r7, #8]
8012aba: 2b00 cmp r3, #0
8012abc: d1ef bne.n 8012a9e <tcp_close_shutdown+0x12a>
8012abe: 687b ldr r3, [r7, #4]
8012ac0: 2200 movs r2, #0
8012ac2: 60da str r2, [r3, #12]
}
tcp_free(pcb);
8012ac4: 6878 ldr r0, [r7, #4]
8012ac6: f7ff fea3 bl 8012810 <tcp_free>
break;
8012aca: e01a b.n 8012b02 <tcp_close_shutdown+0x18e>
case LISTEN:
tcp_listen_closed(pcb);
8012acc: 6878 ldr r0, [r7, #4]
8012ace: f7ff ff17 bl 8012900 <tcp_listen_closed>
tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
8012ad2: 6879 ldr r1, [r7, #4]
8012ad4: 4815 ldr r0, [pc, #84] ; (8012b2c <tcp_close_shutdown+0x1b8>)
8012ad6: f001 f89f bl 8013c18 <tcp_pcb_remove>
tcp_free_listen(pcb);
8012ada: 6878 ldr r0, [r7, #4]
8012adc: f7ff feb4 bl 8012848 <tcp_free_listen>
break;
8012ae0: e00f b.n 8012b02 <tcp_close_shutdown+0x18e>
case SYN_SENT:
TCP_PCB_REMOVE_ACTIVE(pcb);
8012ae2: 6879 ldr r1, [r7, #4]
8012ae4: 480d ldr r0, [pc, #52] ; (8012b1c <tcp_close_shutdown+0x1a8>)
8012ae6: f001 f897 bl 8013c18 <tcp_pcb_remove>
8012aea: 4b0d ldr r3, [pc, #52] ; (8012b20 <tcp_close_shutdown+0x1ac>)
8012aec: 2201 movs r2, #1
8012aee: 701a strb r2, [r3, #0]
tcp_free(pcb);
8012af0: 6878 ldr r0, [r7, #4]
8012af2: f7ff fe8d bl 8012810 <tcp_free>
MIB2_STATS_INC(mib2.tcpattemptfails);
break;
8012af6: e004 b.n 8012b02 <tcp_close_shutdown+0x18e>
default:
return tcp_close_shutdown_fin(pcb);
8012af8: 6878 ldr r0, [r7, #4]
8012afa: f000 f819 bl 8012b30 <tcp_close_shutdown_fin>
8012afe: 4603 mov r3, r0
8012b00: e000 b.n 8012b04 <tcp_close_shutdown+0x190>
}
return ERR_OK;
8012b02: 2300 movs r3, #0
}
8012b04: 4618 mov r0, r3
8012b06: 3710 adds r7, #16
8012b08: 46bd mov sp, r7
8012b0a: bdb0 pop {r4, r5, r7, pc}
8012b0c: 0801eb88 .word 0x0801eb88
8012b10: 0801ec5c .word 0x0801ec5c
8012b14: 0801ebcc .word 0x0801ebcc
8012b18: 0801ec7c .word 0x0801ec7c
8012b1c: 2000f7fc .word 0x2000f7fc
8012b20: 2000f7f8 .word 0x2000f7f8
8012b24: 2000f810 .word 0x2000f810
8012b28: 2000f808 .word 0x2000f808
8012b2c: 2000f804 .word 0x2000f804
08012b30 <tcp_close_shutdown_fin>:
static err_t
tcp_close_shutdown_fin(struct tcp_pcb *pcb)
{
8012b30: b580 push {r7, lr}
8012b32: b084 sub sp, #16
8012b34: af00 add r7, sp, #0
8012b36: 6078 str r0, [r7, #4]
err_t err;
LWIP_ASSERT("pcb != NULL", pcb != NULL);
8012b38: 687b ldr r3, [r7, #4]
8012b3a: 2b00 cmp r3, #0
8012b3c: d106 bne.n 8012b4c <tcp_close_shutdown_fin+0x1c>
8012b3e: 4b2c ldr r3, [pc, #176] ; (8012bf0 <tcp_close_shutdown_fin+0xc0>)
8012b40: f44f 72ce mov.w r2, #412 ; 0x19c
8012b44: 492b ldr r1, [pc, #172] ; (8012bf4 <tcp_close_shutdown_fin+0xc4>)
8012b46: 482c ldr r0, [pc, #176] ; (8012bf8 <tcp_close_shutdown_fin+0xc8>)
8012b48: f00a f8d6 bl 801ccf8 <iprintf>
switch (pcb->state) {
8012b4c: 687b ldr r3, [r7, #4]
8012b4e: 7d1b ldrb r3, [r3, #20]
8012b50: 2b04 cmp r3, #4
8012b52: d010 beq.n 8012b76 <tcp_close_shutdown_fin+0x46>
8012b54: 2b07 cmp r3, #7
8012b56: d01b beq.n 8012b90 <tcp_close_shutdown_fin+0x60>
8012b58: 2b03 cmp r3, #3
8012b5a: d126 bne.n 8012baa <tcp_close_shutdown_fin+0x7a>
case SYN_RCVD:
err = tcp_send_fin(pcb);
8012b5c: 6878 ldr r0, [r7, #4]
8012b5e: f003 fedb bl 8016918 <tcp_send_fin>
8012b62: 4603 mov r3, r0
8012b64: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8012b66: f997 300f ldrsb.w r3, [r7, #15]
8012b6a: 2b00 cmp r3, #0
8012b6c: d11f bne.n 8012bae <tcp_close_shutdown_fin+0x7e>
tcp_backlog_accepted(pcb);
MIB2_STATS_INC(mib2.tcpattemptfails);
pcb->state = FIN_WAIT_1;
8012b6e: 687b ldr r3, [r7, #4]
8012b70: 2205 movs r2, #5
8012b72: 751a strb r2, [r3, #20]
}
break;
8012b74: e01b b.n 8012bae <tcp_close_shutdown_fin+0x7e>
case ESTABLISHED:
err = tcp_send_fin(pcb);
8012b76: 6878 ldr r0, [r7, #4]
8012b78: f003 fece bl 8016918 <tcp_send_fin>
8012b7c: 4603 mov r3, r0
8012b7e: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8012b80: f997 300f ldrsb.w r3, [r7, #15]
8012b84: 2b00 cmp r3, #0
8012b86: d114 bne.n 8012bb2 <tcp_close_shutdown_fin+0x82>
MIB2_STATS_INC(mib2.tcpestabresets);
pcb->state = FIN_WAIT_1;
8012b88: 687b ldr r3, [r7, #4]
8012b8a: 2205 movs r2, #5
8012b8c: 751a strb r2, [r3, #20]
}
break;
8012b8e: e010 b.n 8012bb2 <tcp_close_shutdown_fin+0x82>
case CLOSE_WAIT:
err = tcp_send_fin(pcb);
8012b90: 6878 ldr r0, [r7, #4]
8012b92: f003 fec1 bl 8016918 <tcp_send_fin>
8012b96: 4603 mov r3, r0
8012b98: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8012b9a: f997 300f ldrsb.w r3, [r7, #15]
8012b9e: 2b00 cmp r3, #0
8012ba0: d109 bne.n 8012bb6 <tcp_close_shutdown_fin+0x86>
MIB2_STATS_INC(mib2.tcpestabresets);
pcb->state = LAST_ACK;
8012ba2: 687b ldr r3, [r7, #4]
8012ba4: 2209 movs r2, #9
8012ba6: 751a strb r2, [r3, #20]
}
break;
8012ba8: e005 b.n 8012bb6 <tcp_close_shutdown_fin+0x86>
default:
/* Has already been closed, do nothing. */
return ERR_OK;
8012baa: 2300 movs r3, #0
8012bac: e01c b.n 8012be8 <tcp_close_shutdown_fin+0xb8>
break;
8012bae: bf00 nop
8012bb0: e002 b.n 8012bb8 <tcp_close_shutdown_fin+0x88>
break;
8012bb2: bf00 nop
8012bb4: e000 b.n 8012bb8 <tcp_close_shutdown_fin+0x88>
break;
8012bb6: bf00 nop
}
if (err == ERR_OK) {
8012bb8: f997 300f ldrsb.w r3, [r7, #15]
8012bbc: 2b00 cmp r3, #0
8012bbe: d103 bne.n 8012bc8 <tcp_close_shutdown_fin+0x98>
/* To ensure all data has been sent when tcp_close returns, we have
to make sure tcp_output doesn't fail.
Since we don't really have to ensure all data has been sent when tcp_close
returns (unsent data is sent from tcp timer functions, also), we don't care
for the return value of tcp_output for now. */
tcp_output(pcb);
8012bc0: 6878 ldr r0, [r7, #4]
8012bc2: f003 ffe7 bl 8016b94 <tcp_output>
8012bc6: e00d b.n 8012be4 <tcp_close_shutdown_fin+0xb4>
} else if (err == ERR_MEM) {
8012bc8: f997 300f ldrsb.w r3, [r7, #15]
8012bcc: f1b3 3fff cmp.w r3, #4294967295
8012bd0: d108 bne.n 8012be4 <tcp_close_shutdown_fin+0xb4>
/* Mark this pcb for closing. Closing is retried from tcp_tmr. */
tcp_set_flags(pcb, TF_CLOSEPEND);
8012bd2: 687b ldr r3, [r7, #4]
8012bd4: 8b5b ldrh r3, [r3, #26]
8012bd6: f043 0308 orr.w r3, r3, #8
8012bda: b29a uxth r2, r3
8012bdc: 687b ldr r3, [r7, #4]
8012bde: 835a strh r2, [r3, #26]
/* We have to return ERR_OK from here to indicate to the callers that this
pcb should not be used any more as it will be freed soon via tcp_tmr.
This is OK here since sending FIN does not guarantee a time frime for
actually freeing the pcb, either (it is left in closure states for
remote ACK or timeout) */
return ERR_OK;
8012be0: 2300 movs r3, #0
8012be2: e001 b.n 8012be8 <tcp_close_shutdown_fin+0xb8>
}
return err;
8012be4: f997 300f ldrsb.w r3, [r7, #15]
}
8012be8: 4618 mov r0, r3
8012bea: 3710 adds r7, #16
8012bec: 46bd mov sp, r7
8012bee: bd80 pop {r7, pc}
8012bf0: 0801eb88 .word 0x0801eb88
8012bf4: 0801ec38 .word 0x0801ec38
8012bf8: 0801ebcc .word 0x0801ebcc
08012bfc <tcp_close>:
* @return ERR_OK if connection has been closed
* another err_t if closing failed and pcb is not freed
*/
err_t
tcp_close(struct tcp_pcb *pcb)
{
8012bfc: b580 push {r7, lr}
8012bfe: b082 sub sp, #8
8012c00: af00 add r7, sp, #0
8012c02: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
8012c04: 687b ldr r3, [r7, #4]
8012c06: 2b00 cmp r3, #0
8012c08: d109 bne.n 8012c1e <tcp_close+0x22>
8012c0a: 4b0f ldr r3, [pc, #60] ; (8012c48 <tcp_close+0x4c>)
8012c0c: f44f 72f4 mov.w r2, #488 ; 0x1e8
8012c10: 490e ldr r1, [pc, #56] ; (8012c4c <tcp_close+0x50>)
8012c12: 480f ldr r0, [pc, #60] ; (8012c50 <tcp_close+0x54>)
8012c14: f00a f870 bl 801ccf8 <iprintf>
8012c18: f06f 030f mvn.w r3, #15
8012c1c: e00f b.n 8012c3e <tcp_close+0x42>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in "));
tcp_debug_print_state(pcb->state);
if (pcb->state != LISTEN) {
8012c1e: 687b ldr r3, [r7, #4]
8012c20: 7d1b ldrb r3, [r3, #20]
8012c22: 2b01 cmp r3, #1
8012c24: d006 beq.n 8012c34 <tcp_close+0x38>
/* Set a flag not to receive any more data... */
tcp_set_flags(pcb, TF_RXCLOSED);
8012c26: 687b ldr r3, [r7, #4]
8012c28: 8b5b ldrh r3, [r3, #26]
8012c2a: f043 0310 orr.w r3, r3, #16
8012c2e: b29a uxth r2, r3
8012c30: 687b ldr r3, [r7, #4]
8012c32: 835a strh r2, [r3, #26]
}
/* ... and close */
return tcp_close_shutdown(pcb, 1);
8012c34: 2101 movs r1, #1
8012c36: 6878 ldr r0, [r7, #4]
8012c38: f7ff fe9c bl 8012974 <tcp_close_shutdown>
8012c3c: 4603 mov r3, r0
}
8012c3e: 4618 mov r0, r3
8012c40: 3708 adds r7, #8
8012c42: 46bd mov sp, r7
8012c44: bd80 pop {r7, pc}
8012c46: bf00 nop
8012c48: 0801eb88 .word 0x0801eb88
8012c4c: 0801ec98 .word 0x0801ec98
8012c50: 0801ebcc .word 0x0801ebcc
08012c54 <tcp_abandon>:
* @param pcb the tcp_pcb to abort
* @param reset boolean to indicate whether a reset should be sent
*/
void
tcp_abandon(struct tcp_pcb *pcb, int reset)
{
8012c54: b580 push {r7, lr}
8012c56: b08e sub sp, #56 ; 0x38
8012c58: af04 add r7, sp, #16
8012c5a: 6078 str r0, [r7, #4]
8012c5c: 6039 str r1, [r7, #0]
#endif /* LWIP_CALLBACK_API */
void *errf_arg;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return);
8012c5e: 687b ldr r3, [r7, #4]
8012c60: 2b00 cmp r3, #0
8012c62: d107 bne.n 8012c74 <tcp_abandon+0x20>
8012c64: 4b52 ldr r3, [pc, #328] ; (8012db0 <tcp_abandon+0x15c>)
8012c66: f240 223d movw r2, #573 ; 0x23d
8012c6a: 4952 ldr r1, [pc, #328] ; (8012db4 <tcp_abandon+0x160>)
8012c6c: 4852 ldr r0, [pc, #328] ; (8012db8 <tcp_abandon+0x164>)
8012c6e: f00a f843 bl 801ccf8 <iprintf>
8012c72: e099 b.n 8012da8 <tcp_abandon+0x154>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
8012c74: 687b ldr r3, [r7, #4]
8012c76: 7d1b ldrb r3, [r3, #20]
8012c78: 2b01 cmp r3, #1
8012c7a: d106 bne.n 8012c8a <tcp_abandon+0x36>
8012c7c: 4b4c ldr r3, [pc, #304] ; (8012db0 <tcp_abandon+0x15c>)
8012c7e: f240 2241 movw r2, #577 ; 0x241
8012c82: 494e ldr r1, [pc, #312] ; (8012dbc <tcp_abandon+0x168>)
8012c84: 484c ldr r0, [pc, #304] ; (8012db8 <tcp_abandon+0x164>)
8012c86: f00a f837 bl 801ccf8 <iprintf>
pcb->state != LISTEN);
/* Figure out on which TCP PCB list we are, and remove us. If we
are in an active state, call the receive function associated with
the PCB with a NULL argument, and send an RST to the remote end. */
if (pcb->state == TIME_WAIT) {
8012c8a: 687b ldr r3, [r7, #4]
8012c8c: 7d1b ldrb r3, [r3, #20]
8012c8e: 2b0a cmp r3, #10
8012c90: d107 bne.n 8012ca2 <tcp_abandon+0x4e>
tcp_pcb_remove(&tcp_tw_pcbs, pcb);
8012c92: 6879 ldr r1, [r7, #4]
8012c94: 484a ldr r0, [pc, #296] ; (8012dc0 <tcp_abandon+0x16c>)
8012c96: f000 ffbf bl 8013c18 <tcp_pcb_remove>
tcp_free(pcb);
8012c9a: 6878 ldr r0, [r7, #4]
8012c9c: f7ff fdb8 bl 8012810 <tcp_free>
8012ca0: e082 b.n 8012da8 <tcp_abandon+0x154>
} else {
int send_rst = 0;
8012ca2: 2300 movs r3, #0
8012ca4: 627b str r3, [r7, #36] ; 0x24
u16_t local_port = 0;
8012ca6: 2300 movs r3, #0
8012ca8: 847b strh r3, [r7, #34] ; 0x22
enum tcp_state last_state;
seqno = pcb->snd_nxt;
8012caa: 687b ldr r3, [r7, #4]
8012cac: 6d1b ldr r3, [r3, #80] ; 0x50
8012cae: 61bb str r3, [r7, #24]
ackno = pcb->rcv_nxt;
8012cb0: 687b ldr r3, [r7, #4]
8012cb2: 6a5b ldr r3, [r3, #36] ; 0x24
8012cb4: 617b str r3, [r7, #20]
#if LWIP_CALLBACK_API
errf = pcb->errf;
8012cb6: 687b ldr r3, [r7, #4]
8012cb8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8012cbc: 613b str r3, [r7, #16]
#endif /* LWIP_CALLBACK_API */
errf_arg = pcb->callback_arg;
8012cbe: 687b ldr r3, [r7, #4]
8012cc0: 691b ldr r3, [r3, #16]
8012cc2: 60fb str r3, [r7, #12]
if (pcb->state == CLOSED) {
8012cc4: 687b ldr r3, [r7, #4]
8012cc6: 7d1b ldrb r3, [r3, #20]
8012cc8: 2b00 cmp r3, #0
8012cca: d126 bne.n 8012d1a <tcp_abandon+0xc6>
if (pcb->local_port != 0) {
8012ccc: 687b ldr r3, [r7, #4]
8012cce: 8adb ldrh r3, [r3, #22]
8012cd0: 2b00 cmp r3, #0
8012cd2: d02e beq.n 8012d32 <tcp_abandon+0xde>
/* bound, not yet opened */
TCP_RMV(&tcp_bound_pcbs, pcb);
8012cd4: 4b3b ldr r3, [pc, #236] ; (8012dc4 <tcp_abandon+0x170>)
8012cd6: 681b ldr r3, [r3, #0]
8012cd8: 687a ldr r2, [r7, #4]
8012cda: 429a cmp r2, r3
8012cdc: d105 bne.n 8012cea <tcp_abandon+0x96>
8012cde: 4b39 ldr r3, [pc, #228] ; (8012dc4 <tcp_abandon+0x170>)
8012ce0: 681b ldr r3, [r3, #0]
8012ce2: 68db ldr r3, [r3, #12]
8012ce4: 4a37 ldr r2, [pc, #220] ; (8012dc4 <tcp_abandon+0x170>)
8012ce6: 6013 str r3, [r2, #0]
8012ce8: e013 b.n 8012d12 <tcp_abandon+0xbe>
8012cea: 4b36 ldr r3, [pc, #216] ; (8012dc4 <tcp_abandon+0x170>)
8012cec: 681b ldr r3, [r3, #0]
8012cee: 61fb str r3, [r7, #28]
8012cf0: e00c b.n 8012d0c <tcp_abandon+0xb8>
8012cf2: 69fb ldr r3, [r7, #28]
8012cf4: 68db ldr r3, [r3, #12]
8012cf6: 687a ldr r2, [r7, #4]
8012cf8: 429a cmp r2, r3
8012cfa: d104 bne.n 8012d06 <tcp_abandon+0xb2>
8012cfc: 687b ldr r3, [r7, #4]
8012cfe: 68da ldr r2, [r3, #12]
8012d00: 69fb ldr r3, [r7, #28]
8012d02: 60da str r2, [r3, #12]
8012d04: e005 b.n 8012d12 <tcp_abandon+0xbe>
8012d06: 69fb ldr r3, [r7, #28]
8012d08: 68db ldr r3, [r3, #12]
8012d0a: 61fb str r3, [r7, #28]
8012d0c: 69fb ldr r3, [r7, #28]
8012d0e: 2b00 cmp r3, #0
8012d10: d1ef bne.n 8012cf2 <tcp_abandon+0x9e>
8012d12: 687b ldr r3, [r7, #4]
8012d14: 2200 movs r2, #0
8012d16: 60da str r2, [r3, #12]
8012d18: e00b b.n 8012d32 <tcp_abandon+0xde>
}
} else {
send_rst = reset;
8012d1a: 683b ldr r3, [r7, #0]
8012d1c: 627b str r3, [r7, #36] ; 0x24
local_port = pcb->local_port;
8012d1e: 687b ldr r3, [r7, #4]
8012d20: 8adb ldrh r3, [r3, #22]
8012d22: 847b strh r3, [r7, #34] ; 0x22
TCP_PCB_REMOVE_ACTIVE(pcb);
8012d24: 6879 ldr r1, [r7, #4]
8012d26: 4828 ldr r0, [pc, #160] ; (8012dc8 <tcp_abandon+0x174>)
8012d28: f000 ff76 bl 8013c18 <tcp_pcb_remove>
8012d2c: 4b27 ldr r3, [pc, #156] ; (8012dcc <tcp_abandon+0x178>)
8012d2e: 2201 movs r2, #1
8012d30: 701a strb r2, [r3, #0]
}
if (pcb->unacked != NULL) {
8012d32: 687b ldr r3, [r7, #4]
8012d34: 6f1b ldr r3, [r3, #112] ; 0x70
8012d36: 2b00 cmp r3, #0
8012d38: d004 beq.n 8012d44 <tcp_abandon+0xf0>
tcp_segs_free(pcb->unacked);
8012d3a: 687b ldr r3, [r7, #4]
8012d3c: 6f1b ldr r3, [r3, #112] ; 0x70
8012d3e: 4618 mov r0, r3
8012d40: f000 fd1a bl 8013778 <tcp_segs_free>
}
if (pcb->unsent != NULL) {
8012d44: 687b ldr r3, [r7, #4]
8012d46: 6edb ldr r3, [r3, #108] ; 0x6c
8012d48: 2b00 cmp r3, #0
8012d4a: d004 beq.n 8012d56 <tcp_abandon+0x102>
tcp_segs_free(pcb->unsent);
8012d4c: 687b ldr r3, [r7, #4]
8012d4e: 6edb ldr r3, [r3, #108] ; 0x6c
8012d50: 4618 mov r0, r3
8012d52: f000 fd11 bl 8013778 <tcp_segs_free>
}
#if TCP_QUEUE_OOSEQ
if (pcb->ooseq != NULL) {
8012d56: 687b ldr r3, [r7, #4]
8012d58: 6f5b ldr r3, [r3, #116] ; 0x74
8012d5a: 2b00 cmp r3, #0
8012d5c: d004 beq.n 8012d68 <tcp_abandon+0x114>
tcp_segs_free(pcb->ooseq);
8012d5e: 687b ldr r3, [r7, #4]
8012d60: 6f5b ldr r3, [r3, #116] ; 0x74
8012d62: 4618 mov r0, r3
8012d64: f000 fd08 bl 8013778 <tcp_segs_free>
}
#endif /* TCP_QUEUE_OOSEQ */
tcp_backlog_accepted(pcb);
if (send_rst) {
8012d68: 6a7b ldr r3, [r7, #36] ; 0x24
8012d6a: 2b00 cmp r3, #0
8012d6c: d00e beq.n 8012d8c <tcp_abandon+0x138>
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_abandon: sending RST\n"));
tcp_rst(pcb, seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port);
8012d6e: 6879 ldr r1, [r7, #4]
8012d70: 687b ldr r3, [r7, #4]
8012d72: 3304 adds r3, #4
8012d74: 687a ldr r2, [r7, #4]
8012d76: 8b12 ldrh r2, [r2, #24]
8012d78: 9202 str r2, [sp, #8]
8012d7a: 8c7a ldrh r2, [r7, #34] ; 0x22
8012d7c: 9201 str r2, [sp, #4]
8012d7e: 9300 str r3, [sp, #0]
8012d80: 460b mov r3, r1
8012d82: 697a ldr r2, [r7, #20]
8012d84: 69b9 ldr r1, [r7, #24]
8012d86: 6878 ldr r0, [r7, #4]
8012d88: f004 fcca bl 8017720 <tcp_rst>
}
last_state = pcb->state;
8012d8c: 687b ldr r3, [r7, #4]
8012d8e: 7d1b ldrb r3, [r3, #20]
8012d90: 72fb strb r3, [r7, #11]
tcp_free(pcb);
8012d92: 6878 ldr r0, [r7, #4]
8012d94: f7ff fd3c bl 8012810 <tcp_free>
TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT);
8012d98: 693b ldr r3, [r7, #16]
8012d9a: 2b00 cmp r3, #0
8012d9c: d004 beq.n 8012da8 <tcp_abandon+0x154>
8012d9e: 693b ldr r3, [r7, #16]
8012da0: f06f 010c mvn.w r1, #12
8012da4: 68f8 ldr r0, [r7, #12]
8012da6: 4798 blx r3
}
}
8012da8: 3728 adds r7, #40 ; 0x28
8012daa: 46bd mov sp, r7
8012dac: bd80 pop {r7, pc}
8012dae: bf00 nop
8012db0: 0801eb88 .word 0x0801eb88
8012db4: 0801eccc .word 0x0801eccc
8012db8: 0801ebcc .word 0x0801ebcc
8012dbc: 0801ece8 .word 0x0801ece8
8012dc0: 2000f80c .word 0x2000f80c
8012dc4: 2000f808 .word 0x2000f808
8012dc8: 2000f7fc .word 0x2000f7fc
8012dcc: 2000f7f8 .word 0x2000f7f8
08012dd0 <tcp_abort>:
*
* @param pcb the tcp pcb to abort
*/
void
tcp_abort(struct tcp_pcb *pcb)
{
8012dd0: b580 push {r7, lr}
8012dd2: b082 sub sp, #8
8012dd4: af00 add r7, sp, #0
8012dd6: 6078 str r0, [r7, #4]
tcp_abandon(pcb, 1);
8012dd8: 2101 movs r1, #1
8012dda: 6878 ldr r0, [r7, #4]
8012ddc: f7ff ff3a bl 8012c54 <tcp_abandon>
}
8012de0: bf00 nop
8012de2: 3708 adds r7, #8
8012de4: 46bd mov sp, r7
8012de6: bd80 pop {r7, pc}
08012de8 <tcp_update_rcv_ann_wnd>:
* Returns how much extra window would be advertised if we sent an
* update now.
*/
u32_t
tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb)
{
8012de8: b580 push {r7, lr}
8012dea: b084 sub sp, #16
8012dec: af00 add r7, sp, #0
8012dee: 6078 str r0, [r7, #4]
u32_t new_right_edge;
LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
8012df0: 687b ldr r3, [r7, #4]
8012df2: 2b00 cmp r3, #0
8012df4: d106 bne.n 8012e04 <tcp_update_rcv_ann_wnd+0x1c>
8012df6: 4b25 ldr r3, [pc, #148] ; (8012e8c <tcp_update_rcv_ann_wnd+0xa4>)
8012df8: f240 32a6 movw r2, #934 ; 0x3a6
8012dfc: 4924 ldr r1, [pc, #144] ; (8012e90 <tcp_update_rcv_ann_wnd+0xa8>)
8012dfe: 4825 ldr r0, [pc, #148] ; (8012e94 <tcp_update_rcv_ann_wnd+0xac>)
8012e00: f009 ff7a bl 801ccf8 <iprintf>
new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;
8012e04: 687b ldr r3, [r7, #4]
8012e06: 6a5b ldr r3, [r3, #36] ; 0x24
8012e08: 687a ldr r2, [r7, #4]
8012e0a: 8d12 ldrh r2, [r2, #40] ; 0x28
8012e0c: 4413 add r3, r2
8012e0e: 60fb str r3, [r7, #12]
if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) {
8012e10: 687b ldr r3, [r7, #4]
8012e12: 6adb ldr r3, [r3, #44] ; 0x2c
8012e14: 687a ldr r2, [r7, #4]
8012e16: 8e52 ldrh r2, [r2, #50] ; 0x32
8012e18: f5b2 6f86 cmp.w r2, #1072 ; 0x430
8012e1c: bf28 it cs
8012e1e: f44f 6286 movcs.w r2, #1072 ; 0x430
8012e22: b292 uxth r2, r2
8012e24: 4413 add r3, r2
8012e26: 68fa ldr r2, [r7, #12]
8012e28: 1ad3 subs r3, r2, r3
8012e2a: 2b00 cmp r3, #0
8012e2c: db08 blt.n 8012e40 <tcp_update_rcv_ann_wnd+0x58>
/* we can advertise more window */
pcb->rcv_ann_wnd = pcb->rcv_wnd;
8012e2e: 687b ldr r3, [r7, #4]
8012e30: 8d1a ldrh r2, [r3, #40] ; 0x28
8012e32: 687b ldr r3, [r7, #4]
8012e34: 855a strh r2, [r3, #42] ; 0x2a
return new_right_edge - pcb->rcv_ann_right_edge;
8012e36: 687b ldr r3, [r7, #4]
8012e38: 6adb ldr r3, [r3, #44] ; 0x2c
8012e3a: 68fa ldr r2, [r7, #12]
8012e3c: 1ad3 subs r3, r2, r3
8012e3e: e020 b.n 8012e82 <tcp_update_rcv_ann_wnd+0x9a>
} else {
if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
8012e40: 687b ldr r3, [r7, #4]
8012e42: 6a5a ldr r2, [r3, #36] ; 0x24
8012e44: 687b ldr r3, [r7, #4]
8012e46: 6adb ldr r3, [r3, #44] ; 0x2c
8012e48: 1ad3 subs r3, r2, r3
8012e4a: 2b00 cmp r3, #0
8012e4c: dd03 ble.n 8012e56 <tcp_update_rcv_ann_wnd+0x6e>
/* Can happen due to other end sending out of advertised window,
* but within actual available (but not yet advertised) window */
pcb->rcv_ann_wnd = 0;
8012e4e: 687b ldr r3, [r7, #4]
8012e50: 2200 movs r2, #0
8012e52: 855a strh r2, [r3, #42] ; 0x2a
8012e54: e014 b.n 8012e80 <tcp_update_rcv_ann_wnd+0x98>
} else {
/* keep the right edge of window constant */
u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt;
8012e56: 687b ldr r3, [r7, #4]
8012e58: 6ada ldr r2, [r3, #44] ; 0x2c
8012e5a: 687b ldr r3, [r7, #4]
8012e5c: 6a5b ldr r3, [r3, #36] ; 0x24
8012e5e: 1ad3 subs r3, r2, r3
8012e60: 60bb str r3, [r7, #8]
#if !LWIP_WND_SCALE
LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
8012e62: 68bb ldr r3, [r7, #8]
8012e64: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8012e68: d306 bcc.n 8012e78 <tcp_update_rcv_ann_wnd+0x90>
8012e6a: 4b08 ldr r3, [pc, #32] ; (8012e8c <tcp_update_rcv_ann_wnd+0xa4>)
8012e6c: f240 32b6 movw r2, #950 ; 0x3b6
8012e70: 4909 ldr r1, [pc, #36] ; (8012e98 <tcp_update_rcv_ann_wnd+0xb0>)
8012e72: 4808 ldr r0, [pc, #32] ; (8012e94 <tcp_update_rcv_ann_wnd+0xac>)
8012e74: f009 ff40 bl 801ccf8 <iprintf>
#endif
pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd;
8012e78: 68bb ldr r3, [r7, #8]
8012e7a: b29a uxth r2, r3
8012e7c: 687b ldr r3, [r7, #4]
8012e7e: 855a strh r2, [r3, #42] ; 0x2a
}
return 0;
8012e80: 2300 movs r3, #0
}
}
8012e82: 4618 mov r0, r3
8012e84: 3710 adds r7, #16
8012e86: 46bd mov sp, r7
8012e88: bd80 pop {r7, pc}
8012e8a: bf00 nop
8012e8c: 0801eb88 .word 0x0801eb88
8012e90: 0801ede4 .word 0x0801ede4
8012e94: 0801ebcc .word 0x0801ebcc
8012e98: 0801ee08 .word 0x0801ee08
08012e9c <tcp_recved>:
* @param pcb the tcp_pcb for which data is read
* @param len the amount of bytes that have been read by the application
*/
void
tcp_recved(struct tcp_pcb *pcb, u16_t len)
{
8012e9c: b580 push {r7, lr}
8012e9e: b084 sub sp, #16
8012ea0: af00 add r7, sp, #0
8012ea2: 6078 str r0, [r7, #4]
8012ea4: 460b mov r3, r1
8012ea6: 807b strh r3, [r7, #2]
u32_t wnd_inflation;
tcpwnd_size_t rcv_wnd;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return);
8012ea8: 687b ldr r3, [r7, #4]
8012eaa: 2b00 cmp r3, #0
8012eac: d107 bne.n 8012ebe <tcp_recved+0x22>
8012eae: 4b1f ldr r3, [pc, #124] ; (8012f2c <tcp_recved+0x90>)
8012eb0: f240 32cf movw r2, #975 ; 0x3cf
8012eb4: 491e ldr r1, [pc, #120] ; (8012f30 <tcp_recved+0x94>)
8012eb6: 481f ldr r0, [pc, #124] ; (8012f34 <tcp_recved+0x98>)
8012eb8: f009 ff1e bl 801ccf8 <iprintf>
8012ebc: e032 b.n 8012f24 <tcp_recved+0x88>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
8012ebe: 687b ldr r3, [r7, #4]
8012ec0: 7d1b ldrb r3, [r3, #20]
8012ec2: 2b01 cmp r3, #1
8012ec4: d106 bne.n 8012ed4 <tcp_recved+0x38>
8012ec6: 4b19 ldr r3, [pc, #100] ; (8012f2c <tcp_recved+0x90>)
8012ec8: f240 32d3 movw r2, #979 ; 0x3d3
8012ecc: 491a ldr r1, [pc, #104] ; (8012f38 <tcp_recved+0x9c>)
8012ece: 4819 ldr r0, [pc, #100] ; (8012f34 <tcp_recved+0x98>)
8012ed0: f009 ff12 bl 801ccf8 <iprintf>
pcb->state != LISTEN);
rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len);
8012ed4: 687b ldr r3, [r7, #4]
8012ed6: 8d1a ldrh r2, [r3, #40] ; 0x28
8012ed8: 887b ldrh r3, [r7, #2]
8012eda: 4413 add r3, r2
8012edc: 81fb strh r3, [r7, #14]
if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) {
8012ede: 89fb ldrh r3, [r7, #14]
8012ee0: f5b3 6f06 cmp.w r3, #2144 ; 0x860
8012ee4: d804 bhi.n 8012ef0 <tcp_recved+0x54>
8012ee6: 687b ldr r3, [r7, #4]
8012ee8: 8d1b ldrh r3, [r3, #40] ; 0x28
8012eea: 89fa ldrh r2, [r7, #14]
8012eec: 429a cmp r2, r3
8012eee: d204 bcs.n 8012efa <tcp_recved+0x5e>
/* window got too big or tcpwnd_size_t overflow */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: window got too big or tcpwnd_size_t overflow\n"));
pcb->rcv_wnd = TCP_WND_MAX(pcb);
8012ef0: 687b ldr r3, [r7, #4]
8012ef2: f44f 6206 mov.w r2, #2144 ; 0x860
8012ef6: 851a strh r2, [r3, #40] ; 0x28
8012ef8: e002 b.n 8012f00 <tcp_recved+0x64>
} else {
pcb->rcv_wnd = rcv_wnd;
8012efa: 687b ldr r3, [r7, #4]
8012efc: 89fa ldrh r2, [r7, #14]
8012efe: 851a strh r2, [r3, #40] ; 0x28
}
wnd_inflation = tcp_update_rcv_ann_wnd(pcb);
8012f00: 6878 ldr r0, [r7, #4]
8012f02: f7ff ff71 bl 8012de8 <tcp_update_rcv_ann_wnd>
8012f06: 60b8 str r0, [r7, #8]
/* If the change in the right edge of window is significant (default
* watermark is TCP_WND/4), then send an explicit update now.
* Otherwise wait for a packet to be sent in the normal course of
* events (or more window to be available later) */
if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) {
8012f08: 68bb ldr r3, [r7, #8]
8012f0a: f5b3 7f06 cmp.w r3, #536 ; 0x218
8012f0e: d309 bcc.n 8012f24 <tcp_recved+0x88>
tcp_ack_now(pcb);
8012f10: 687b ldr r3, [r7, #4]
8012f12: 8b5b ldrh r3, [r3, #26]
8012f14: f043 0302 orr.w r3, r3, #2
8012f18: b29a uxth r2, r3
8012f1a: 687b ldr r3, [r7, #4]
8012f1c: 835a strh r2, [r3, #26]
tcp_output(pcb);
8012f1e: 6878 ldr r0, [r7, #4]
8012f20: f003 fe38 bl 8016b94 <tcp_output>
}
LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n",
len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd)));
}
8012f24: 3710 adds r7, #16
8012f26: 46bd mov sp, r7
8012f28: bd80 pop {r7, pc}
8012f2a: bf00 nop
8012f2c: 0801eb88 .word 0x0801eb88
8012f30: 0801ee24 .word 0x0801ee24
8012f34: 0801ebcc .word 0x0801ebcc
8012f38: 0801ee3c .word 0x0801ee3c
08012f3c <tcp_slowtmr>:
*
* Automatically called from tcp_tmr().
*/
void
tcp_slowtmr(void)
{
8012f3c: b5b0 push {r4, r5, r7, lr}
8012f3e: b090 sub sp, #64 ; 0x40
8012f40: af04 add r7, sp, #16
tcpwnd_size_t eff_wnd;
u8_t pcb_remove; /* flag if a PCB should be removed */
u8_t pcb_reset; /* flag if a RST should be sent when removing */
err_t err;
err = ERR_OK;
8012f42: 2300 movs r3, #0
8012f44: f887 3025 strb.w r3, [r7, #37] ; 0x25
++tcp_ticks;
8012f48: 4b94 ldr r3, [pc, #592] ; (801319c <tcp_slowtmr+0x260>)
8012f4a: 681b ldr r3, [r3, #0]
8012f4c: 3301 adds r3, #1
8012f4e: 4a93 ldr r2, [pc, #588] ; (801319c <tcp_slowtmr+0x260>)
8012f50: 6013 str r3, [r2, #0]
++tcp_timer_ctr;
8012f52: 4b93 ldr r3, [pc, #588] ; (80131a0 <tcp_slowtmr+0x264>)
8012f54: 781b ldrb r3, [r3, #0]
8012f56: 3301 adds r3, #1
8012f58: b2da uxtb r2, r3
8012f5a: 4b91 ldr r3, [pc, #580] ; (80131a0 <tcp_slowtmr+0x264>)
8012f5c: 701a strb r2, [r3, #0]
tcp_slowtmr_start:
/* Steps through all of the active PCBs. */
prev = NULL;
8012f5e: 2300 movs r3, #0
8012f60: 62bb str r3, [r7, #40] ; 0x28
pcb = tcp_active_pcbs;
8012f62: 4b90 ldr r3, [pc, #576] ; (80131a4 <tcp_slowtmr+0x268>)
8012f64: 681b ldr r3, [r3, #0]
8012f66: 62fb str r3, [r7, #44] ; 0x2c
if (pcb == NULL) {
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n"));
}
while (pcb != NULL) {
8012f68: e29d b.n 80134a6 <tcp_slowtmr+0x56a>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n"));
LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED);
8012f6a: 6afb ldr r3, [r7, #44] ; 0x2c
8012f6c: 7d1b ldrb r3, [r3, #20]
8012f6e: 2b00 cmp r3, #0
8012f70: d106 bne.n 8012f80 <tcp_slowtmr+0x44>
8012f72: 4b8d ldr r3, [pc, #564] ; (80131a8 <tcp_slowtmr+0x26c>)
8012f74: f240 42be movw r2, #1214 ; 0x4be
8012f78: 498c ldr r1, [pc, #560] ; (80131ac <tcp_slowtmr+0x270>)
8012f7a: 488d ldr r0, [pc, #564] ; (80131b0 <tcp_slowtmr+0x274>)
8012f7c: f009 febc bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
8012f80: 6afb ldr r3, [r7, #44] ; 0x2c
8012f82: 7d1b ldrb r3, [r3, #20]
8012f84: 2b01 cmp r3, #1
8012f86: d106 bne.n 8012f96 <tcp_slowtmr+0x5a>
8012f88: 4b87 ldr r3, [pc, #540] ; (80131a8 <tcp_slowtmr+0x26c>)
8012f8a: f240 42bf movw r2, #1215 ; 0x4bf
8012f8e: 4989 ldr r1, [pc, #548] ; (80131b4 <tcp_slowtmr+0x278>)
8012f90: 4887 ldr r0, [pc, #540] ; (80131b0 <tcp_slowtmr+0x274>)
8012f92: f009 feb1 bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
8012f96: 6afb ldr r3, [r7, #44] ; 0x2c
8012f98: 7d1b ldrb r3, [r3, #20]
8012f9a: 2b0a cmp r3, #10
8012f9c: d106 bne.n 8012fac <tcp_slowtmr+0x70>
8012f9e: 4b82 ldr r3, [pc, #520] ; (80131a8 <tcp_slowtmr+0x26c>)
8012fa0: f44f 6298 mov.w r2, #1216 ; 0x4c0
8012fa4: 4984 ldr r1, [pc, #528] ; (80131b8 <tcp_slowtmr+0x27c>)
8012fa6: 4882 ldr r0, [pc, #520] ; (80131b0 <tcp_slowtmr+0x274>)
8012fa8: f009 fea6 bl 801ccf8 <iprintf>
if (pcb->last_timer == tcp_timer_ctr) {
8012fac: 6afb ldr r3, [r7, #44] ; 0x2c
8012fae: 7f9a ldrb r2, [r3, #30]
8012fb0: 4b7b ldr r3, [pc, #492] ; (80131a0 <tcp_slowtmr+0x264>)
8012fb2: 781b ldrb r3, [r3, #0]
8012fb4: 429a cmp r2, r3
8012fb6: d105 bne.n 8012fc4 <tcp_slowtmr+0x88>
/* skip this pcb, we have already processed it */
prev = pcb;
8012fb8: 6afb ldr r3, [r7, #44] ; 0x2c
8012fba: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
8012fbc: 6afb ldr r3, [r7, #44] ; 0x2c
8012fbe: 68db ldr r3, [r3, #12]
8012fc0: 62fb str r3, [r7, #44] ; 0x2c
continue;
8012fc2: e270 b.n 80134a6 <tcp_slowtmr+0x56a>
}
pcb->last_timer = tcp_timer_ctr;
8012fc4: 4b76 ldr r3, [pc, #472] ; (80131a0 <tcp_slowtmr+0x264>)
8012fc6: 781a ldrb r2, [r3, #0]
8012fc8: 6afb ldr r3, [r7, #44] ; 0x2c
8012fca: 779a strb r2, [r3, #30]
pcb_remove = 0;
8012fcc: 2300 movs r3, #0
8012fce: f887 3027 strb.w r3, [r7, #39] ; 0x27
pcb_reset = 0;
8012fd2: 2300 movs r3, #0
8012fd4: f887 3026 strb.w r3, [r7, #38] ; 0x26
if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
8012fd8: 6afb ldr r3, [r7, #44] ; 0x2c
8012fda: 7d1b ldrb r3, [r3, #20]
8012fdc: 2b02 cmp r3, #2
8012fde: d10a bne.n 8012ff6 <tcp_slowtmr+0xba>
8012fe0: 6afb ldr r3, [r7, #44] ; 0x2c
8012fe2: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8012fe6: 2b05 cmp r3, #5
8012fe8: d905 bls.n 8012ff6 <tcp_slowtmr+0xba>
++pcb_remove;
8012fea: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012fee: 3301 adds r3, #1
8012ff0: f887 3027 strb.w r3, [r7, #39] ; 0x27
8012ff4: e11e b.n 8013234 <tcp_slowtmr+0x2f8>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n"));
} else if (pcb->nrtx >= TCP_MAXRTX) {
8012ff6: 6afb ldr r3, [r7, #44] ; 0x2c
8012ff8: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8012ffc: 2b0b cmp r3, #11
8012ffe: d905 bls.n 801300c <tcp_slowtmr+0xd0>
++pcb_remove;
8013000: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8013004: 3301 adds r3, #1
8013006: f887 3027 strb.w r3, [r7, #39] ; 0x27
801300a: e113 b.n 8013234 <tcp_slowtmr+0x2f8>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n"));
} else {
if (pcb->persist_backoff > 0) {
801300c: 6afb ldr r3, [r7, #44] ; 0x2c
801300e: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
8013012: 2b00 cmp r3, #0
8013014: d075 beq.n 8013102 <tcp_slowtmr+0x1c6>
LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL);
8013016: 6afb ldr r3, [r7, #44] ; 0x2c
8013018: 6f1b ldr r3, [r3, #112] ; 0x70
801301a: 2b00 cmp r3, #0
801301c: d006 beq.n 801302c <tcp_slowtmr+0xf0>
801301e: 4b62 ldr r3, [pc, #392] ; (80131a8 <tcp_slowtmr+0x26c>)
8013020: f240 42d4 movw r2, #1236 ; 0x4d4
8013024: 4965 ldr r1, [pc, #404] ; (80131bc <tcp_slowtmr+0x280>)
8013026: 4862 ldr r0, [pc, #392] ; (80131b0 <tcp_slowtmr+0x274>)
8013028: f009 fe66 bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
801302c: 6afb ldr r3, [r7, #44] ; 0x2c
801302e: 6edb ldr r3, [r3, #108] ; 0x6c
8013030: 2b00 cmp r3, #0
8013032: d106 bne.n 8013042 <tcp_slowtmr+0x106>
8013034: 4b5c ldr r3, [pc, #368] ; (80131a8 <tcp_slowtmr+0x26c>)
8013036: f240 42d5 movw r2, #1237 ; 0x4d5
801303a: 4961 ldr r1, [pc, #388] ; (80131c0 <tcp_slowtmr+0x284>)
801303c: 485c ldr r0, [pc, #368] ; (80131b0 <tcp_slowtmr+0x274>)
801303e: f009 fe5b bl 801ccf8 <iprintf>
if (pcb->persist_probe >= TCP_MAXRTX) {
8013042: 6afb ldr r3, [r7, #44] ; 0x2c
8013044: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
8013048: 2b0b cmp r3, #11
801304a: d905 bls.n 8013058 <tcp_slowtmr+0x11c>
++pcb_remove; /* max probes reached */
801304c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8013050: 3301 adds r3, #1
8013052: f887 3027 strb.w r3, [r7, #39] ; 0x27
8013056: e0ed b.n 8013234 <tcp_slowtmr+0x2f8>
} else {
u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1];
8013058: 6afb ldr r3, [r7, #44] ; 0x2c
801305a: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
801305e: 3b01 subs r3, #1
8013060: 4a58 ldr r2, [pc, #352] ; (80131c4 <tcp_slowtmr+0x288>)
8013062: 5cd3 ldrb r3, [r2, r3]
8013064: 747b strb r3, [r7, #17]
if (pcb->persist_cnt < backoff_cnt) {
8013066: 6afb ldr r3, [r7, #44] ; 0x2c
8013068: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
801306c: 7c7a ldrb r2, [r7, #17]
801306e: 429a cmp r2, r3
8013070: d907 bls.n 8013082 <tcp_slowtmr+0x146>
pcb->persist_cnt++;
8013072: 6afb ldr r3, [r7, #44] ; 0x2c
8013074: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
8013078: 3301 adds r3, #1
801307a: b2da uxtb r2, r3
801307c: 6afb ldr r3, [r7, #44] ; 0x2c
801307e: f883 2098 strb.w r2, [r3, #152] ; 0x98
}
if (pcb->persist_cnt >= backoff_cnt) {
8013082: 6afb ldr r3, [r7, #44] ; 0x2c
8013084: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
8013088: 7c7a ldrb r2, [r7, #17]
801308a: 429a cmp r2, r3
801308c: f200 80d2 bhi.w 8013234 <tcp_slowtmr+0x2f8>
int next_slot = 1; /* increment timer to next slot */
8013090: 2301 movs r3, #1
8013092: 623b str r3, [r7, #32]
/* If snd_wnd is zero, send 1 byte probes */
if (pcb->snd_wnd == 0) {
8013094: 6afb ldr r3, [r7, #44] ; 0x2c
8013096: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
801309a: 2b00 cmp r3, #0
801309c: d108 bne.n 80130b0 <tcp_slowtmr+0x174>
if (tcp_zero_window_probe(pcb) != ERR_OK) {
801309e: 6af8 ldr r0, [r7, #44] ; 0x2c
80130a0: f004 fc32 bl 8017908 <tcp_zero_window_probe>
80130a4: 4603 mov r3, r0
80130a6: 2b00 cmp r3, #0
80130a8: d014 beq.n 80130d4 <tcp_slowtmr+0x198>
next_slot = 0; /* try probe again with current slot */
80130aa: 2300 movs r3, #0
80130ac: 623b str r3, [r7, #32]
80130ae: e011 b.n 80130d4 <tcp_slowtmr+0x198>
}
/* snd_wnd not fully closed, split unsent head and fill window */
} else {
if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) {
80130b0: 6afb ldr r3, [r7, #44] ; 0x2c
80130b2: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
80130b6: 4619 mov r1, r3
80130b8: 6af8 ldr r0, [r7, #44] ; 0x2c
80130ba: f003 fae5 bl 8016688 <tcp_split_unsent_seg>
80130be: 4603 mov r3, r0
80130c0: 2b00 cmp r3, #0
80130c2: d107 bne.n 80130d4 <tcp_slowtmr+0x198>
if (tcp_output(pcb) == ERR_OK) {
80130c4: 6af8 ldr r0, [r7, #44] ; 0x2c
80130c6: f003 fd65 bl 8016b94 <tcp_output>
80130ca: 4603 mov r3, r0
80130cc: 2b00 cmp r3, #0
80130ce: d101 bne.n 80130d4 <tcp_slowtmr+0x198>
/* sending will cancel persist timer, else retry with current slot */
next_slot = 0;
80130d0: 2300 movs r3, #0
80130d2: 623b str r3, [r7, #32]
}
}
}
if (next_slot) {
80130d4: 6a3b ldr r3, [r7, #32]
80130d6: 2b00 cmp r3, #0
80130d8: f000 80ac beq.w 8013234 <tcp_slowtmr+0x2f8>
pcb->persist_cnt = 0;
80130dc: 6afb ldr r3, [r7, #44] ; 0x2c
80130de: 2200 movs r2, #0
80130e0: f883 2098 strb.w r2, [r3, #152] ; 0x98
if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) {
80130e4: 6afb ldr r3, [r7, #44] ; 0x2c
80130e6: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80130ea: 2b06 cmp r3, #6
80130ec: f200 80a2 bhi.w 8013234 <tcp_slowtmr+0x2f8>
pcb->persist_backoff++;
80130f0: 6afb ldr r3, [r7, #44] ; 0x2c
80130f2: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80130f6: 3301 adds r3, #1
80130f8: b2da uxtb r2, r3
80130fa: 6afb ldr r3, [r7, #44] ; 0x2c
80130fc: f883 2099 strb.w r2, [r3, #153] ; 0x99
8013100: e098 b.n 8013234 <tcp_slowtmr+0x2f8>
}
}
}
} else {
/* Increase the retransmission timer if it is running */
if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) {
8013102: 6afb ldr r3, [r7, #44] ; 0x2c
8013104: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8013108: 2b00 cmp r3, #0
801310a: db0f blt.n 801312c <tcp_slowtmr+0x1f0>
801310c: 6afb ldr r3, [r7, #44] ; 0x2c
801310e: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8013112: f647 72ff movw r2, #32767 ; 0x7fff
8013116: 4293 cmp r3, r2
8013118: d008 beq.n 801312c <tcp_slowtmr+0x1f0>
++pcb->rtime;
801311a: 6afb ldr r3, [r7, #44] ; 0x2c
801311c: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8013120: b29b uxth r3, r3
8013122: 3301 adds r3, #1
8013124: b29b uxth r3, r3
8013126: b21a sxth r2, r3
8013128: 6afb ldr r3, [r7, #44] ; 0x2c
801312a: 861a strh r2, [r3, #48] ; 0x30
}
if (pcb->rtime >= pcb->rto) {
801312c: 6afb ldr r3, [r7, #44] ; 0x2c
801312e: f9b3 2030 ldrsh.w r2, [r3, #48] ; 0x30
8013132: 6afb ldr r3, [r7, #44] ; 0x2c
8013134: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
8013138: 429a cmp r2, r3
801313a: db7b blt.n 8013234 <tcp_slowtmr+0x2f8>
" pcb->rto %"S16_F"\n",
pcb->rtime, pcb->rto));
/* If prepare phase fails but we have unsent data but no unacked data,
still execute the backoff calculations below, as this means we somehow
failed to send segment. */
if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) {
801313c: 6af8 ldr r0, [r7, #44] ; 0x2c
801313e: f004 f821 bl 8017184 <tcp_rexmit_rto_prepare>
8013142: 4603 mov r3, r0
8013144: 2b00 cmp r3, #0
8013146: d007 beq.n 8013158 <tcp_slowtmr+0x21c>
8013148: 6afb ldr r3, [r7, #44] ; 0x2c
801314a: 6f1b ldr r3, [r3, #112] ; 0x70
801314c: 2b00 cmp r3, #0
801314e: d171 bne.n 8013234 <tcp_slowtmr+0x2f8>
8013150: 6afb ldr r3, [r7, #44] ; 0x2c
8013152: 6edb ldr r3, [r3, #108] ; 0x6c
8013154: 2b00 cmp r3, #0
8013156: d06d beq.n 8013234 <tcp_slowtmr+0x2f8>
/* Double retransmission time-out unless we are trying to
* connect to somebody (i.e., we are in SYN_SENT). */
if (pcb->state != SYN_SENT) {
8013158: 6afb ldr r3, [r7, #44] ; 0x2c
801315a: 7d1b ldrb r3, [r3, #20]
801315c: 2b02 cmp r3, #2
801315e: d03a beq.n 80131d6 <tcp_slowtmr+0x29a>
u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1);
8013160: 6afb ldr r3, [r7, #44] ; 0x2c
8013162: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8013166: 2b0c cmp r3, #12
8013168: bf28 it cs
801316a: 230c movcs r3, #12
801316c: 76fb strb r3, [r7, #27]
int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx];
801316e: 6afb ldr r3, [r7, #44] ; 0x2c
8013170: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8013174: 10db asrs r3, r3, #3
8013176: b21b sxth r3, r3
8013178: 461a mov r2, r3
801317a: 6afb ldr r3, [r7, #44] ; 0x2c
801317c: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8013180: 4413 add r3, r2
8013182: 7efa ldrb r2, [r7, #27]
8013184: 4910 ldr r1, [pc, #64] ; (80131c8 <tcp_slowtmr+0x28c>)
8013186: 5c8a ldrb r2, [r1, r2]
8013188: 4093 lsls r3, r2
801318a: 617b str r3, [r7, #20]
pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
801318c: 697b ldr r3, [r7, #20]
801318e: f647 72fe movw r2, #32766 ; 0x7ffe
8013192: 4293 cmp r3, r2
8013194: dc1a bgt.n 80131cc <tcp_slowtmr+0x290>
8013196: 697b ldr r3, [r7, #20]
8013198: b21a sxth r2, r3
801319a: e019 b.n 80131d0 <tcp_slowtmr+0x294>
801319c: 2000f800 .word 0x2000f800
80131a0: 2000872a .word 0x2000872a
80131a4: 2000f7fc .word 0x2000f7fc
80131a8: 0801eb88 .word 0x0801eb88
80131ac: 0801eecc .word 0x0801eecc
80131b0: 0801ebcc .word 0x0801ebcc
80131b4: 0801eef8 .word 0x0801eef8
80131b8: 0801ef24 .word 0x0801ef24
80131bc: 0801ef54 .word 0x0801ef54
80131c0: 0801ef88 .word 0x0801ef88
80131c4: 08022e68 .word 0x08022e68
80131c8: 08022e58 .word 0x08022e58
80131cc: f647 72ff movw r2, #32767 ; 0x7fff
80131d0: 6afb ldr r3, [r7, #44] ; 0x2c
80131d2: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
}
/* Reset the retransmission timer. */
pcb->rtime = 0;
80131d6: 6afb ldr r3, [r7, #44] ; 0x2c
80131d8: 2200 movs r2, #0
80131da: 861a strh r2, [r3, #48] ; 0x30
/* Reduce congestion window and ssthresh. */
eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
80131dc: 6afb ldr r3, [r7, #44] ; 0x2c
80131de: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
80131e2: 6afb ldr r3, [r7, #44] ; 0x2c
80131e4: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
80131e8: 4293 cmp r3, r2
80131ea: bf28 it cs
80131ec: 4613 movcs r3, r2
80131ee: 827b strh r3, [r7, #18]
pcb->ssthresh = eff_wnd >> 1;
80131f0: 8a7b ldrh r3, [r7, #18]
80131f2: 085b lsrs r3, r3, #1
80131f4: b29a uxth r2, r3
80131f6: 6afb ldr r3, [r7, #44] ; 0x2c
80131f8: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) {
80131fc: 6afb ldr r3, [r7, #44] ; 0x2c
80131fe: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
8013202: 6afb ldr r3, [r7, #44] ; 0x2c
8013204: 8e5b ldrh r3, [r3, #50] ; 0x32
8013206: 005b lsls r3, r3, #1
8013208: b29b uxth r3, r3
801320a: 429a cmp r2, r3
801320c: d206 bcs.n 801321c <tcp_slowtmr+0x2e0>
pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1);
801320e: 6afb ldr r3, [r7, #44] ; 0x2c
8013210: 8e5b ldrh r3, [r3, #50] ; 0x32
8013212: 005b lsls r3, r3, #1
8013214: b29a uxth r2, r3
8013216: 6afb ldr r3, [r7, #44] ; 0x2c
8013218: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
}
pcb->cwnd = pcb->mss;
801321c: 6afb ldr r3, [r7, #44] ; 0x2c
801321e: 8e5a ldrh r2, [r3, #50] ; 0x32
8013220: 6afb ldr r3, [r7, #44] ; 0x2c
8013222: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: cwnd %"TCPWNDSIZE_F
" ssthresh %"TCPWNDSIZE_F"\n",
pcb->cwnd, pcb->ssthresh));
pcb->bytes_acked = 0;
8013226: 6afb ldr r3, [r7, #44] ; 0x2c
8013228: 2200 movs r2, #0
801322a: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
/* The following needs to be called AFTER cwnd is set to one
mss - STJ */
tcp_rexmit_rto_commit(pcb);
801322e: 6af8 ldr r0, [r7, #44] ; 0x2c
8013230: f004 f818 bl 8017264 <tcp_rexmit_rto_commit>
}
}
}
}
/* Check if this PCB has stayed too long in FIN-WAIT-2 */
if (pcb->state == FIN_WAIT_2) {
8013234: 6afb ldr r3, [r7, #44] ; 0x2c
8013236: 7d1b ldrb r3, [r3, #20]
8013238: 2b06 cmp r3, #6
801323a: d111 bne.n 8013260 <tcp_slowtmr+0x324>
/* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */
if (pcb->flags & TF_RXCLOSED) {
801323c: 6afb ldr r3, [r7, #44] ; 0x2c
801323e: 8b5b ldrh r3, [r3, #26]
8013240: f003 0310 and.w r3, r3, #16
8013244: 2b00 cmp r3, #0
8013246: d00b beq.n 8013260 <tcp_slowtmr+0x324>
/* PCB was fully closed (either through close() or SHUT_RDWR):
normal FIN-WAIT timeout handling. */
if ((u32_t)(tcp_ticks - pcb->tmr) >
8013248: 4b9c ldr r3, [pc, #624] ; (80134bc <tcp_slowtmr+0x580>)
801324a: 681a ldr r2, [r3, #0]
801324c: 6afb ldr r3, [r7, #44] ; 0x2c
801324e: 6a1b ldr r3, [r3, #32]
8013250: 1ad3 subs r3, r2, r3
8013252: 2b28 cmp r3, #40 ; 0x28
8013254: d904 bls.n 8013260 <tcp_slowtmr+0x324>
TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
8013256: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801325a: 3301 adds r3, #1
801325c: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
}
}
/* Check if KEEPALIVE should be sent */
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
8013260: 6afb ldr r3, [r7, #44] ; 0x2c
8013262: 7a5b ldrb r3, [r3, #9]
8013264: f003 0308 and.w r3, r3, #8
8013268: 2b00 cmp r3, #0
801326a: d04a beq.n 8013302 <tcp_slowtmr+0x3c6>
((pcb->state == ESTABLISHED) ||
801326c: 6afb ldr r3, [r7, #44] ; 0x2c
801326e: 7d1b ldrb r3, [r3, #20]
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
8013270: 2b04 cmp r3, #4
8013272: d003 beq.n 801327c <tcp_slowtmr+0x340>
(pcb->state == CLOSE_WAIT))) {
8013274: 6afb ldr r3, [r7, #44] ; 0x2c
8013276: 7d1b ldrb r3, [r3, #20]
((pcb->state == ESTABLISHED) ||
8013278: 2b07 cmp r3, #7
801327a: d142 bne.n 8013302 <tcp_slowtmr+0x3c6>
if ((u32_t)(tcp_ticks - pcb->tmr) >
801327c: 4b8f ldr r3, [pc, #572] ; (80134bc <tcp_slowtmr+0x580>)
801327e: 681a ldr r2, [r3, #0]
8013280: 6afb ldr r3, [r7, #44] ; 0x2c
8013282: 6a1b ldr r3, [r3, #32]
8013284: 1ad2 subs r2, r2, r3
(pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) {
8013286: 6afb ldr r3, [r7, #44] ; 0x2c
8013288: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94
801328c: 4b8c ldr r3, [pc, #560] ; (80134c0 <tcp_slowtmr+0x584>)
801328e: 440b add r3, r1
8013290: 498c ldr r1, [pc, #560] ; (80134c4 <tcp_slowtmr+0x588>)
8013292: fba1 1303 umull r1, r3, r1, r3
8013296: 095b lsrs r3, r3, #5
if ((u32_t)(tcp_ticks - pcb->tmr) >
8013298: 429a cmp r2, r3
801329a: d90a bls.n 80132b2 <tcp_slowtmr+0x376>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to "));
ip_addr_debug_print_val(TCP_DEBUG, pcb->remote_ip);
LWIP_DEBUGF(TCP_DEBUG, ("\n"));
++pcb_remove;
801329c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80132a0: 3301 adds r3, #1
80132a2: f887 3027 strb.w r3, [r7, #39] ; 0x27
++pcb_reset;
80132a6: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
80132aa: 3301 adds r3, #1
80132ac: f887 3026 strb.w r3, [r7, #38] ; 0x26
80132b0: e027 b.n 8013302 <tcp_slowtmr+0x3c6>
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
80132b2: 4b82 ldr r3, [pc, #520] ; (80134bc <tcp_slowtmr+0x580>)
80132b4: 681a ldr r2, [r3, #0]
80132b6: 6afb ldr r3, [r7, #44] ; 0x2c
80132b8: 6a1b ldr r3, [r3, #32]
80132ba: 1ad2 subs r2, r2, r3
(pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb))
80132bc: 6afb ldr r3, [r7, #44] ; 0x2c
80132be: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94
80132c2: 6afb ldr r3, [r7, #44] ; 0x2c
80132c4: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
80132c8: 4618 mov r0, r3
80132ca: 4b7f ldr r3, [pc, #508] ; (80134c8 <tcp_slowtmr+0x58c>)
80132cc: fb03 f300 mul.w r3, r3, r0
80132d0: 440b add r3, r1
/ TCP_SLOW_INTERVAL) {
80132d2: 497c ldr r1, [pc, #496] ; (80134c4 <tcp_slowtmr+0x588>)
80132d4: fba1 1303 umull r1, r3, r1, r3
80132d8: 095b lsrs r3, r3, #5
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
80132da: 429a cmp r2, r3
80132dc: d911 bls.n 8013302 <tcp_slowtmr+0x3c6>
err = tcp_keepalive(pcb);
80132de: 6af8 ldr r0, [r7, #44] ; 0x2c
80132e0: f004 fad2 bl 8017888 <tcp_keepalive>
80132e4: 4603 mov r3, r0
80132e6: f887 3025 strb.w r3, [r7, #37] ; 0x25
if (err == ERR_OK) {
80132ea: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
80132ee: 2b00 cmp r3, #0
80132f0: d107 bne.n 8013302 <tcp_slowtmr+0x3c6>
pcb->keep_cnt_sent++;
80132f2: 6afb ldr r3, [r7, #44] ; 0x2c
80132f4: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
80132f8: 3301 adds r3, #1
80132fa: b2da uxtb r2, r3
80132fc: 6afb ldr r3, [r7, #44] ; 0x2c
80132fe: f883 209b strb.w r2, [r3, #155] ; 0x9b
/* If this PCB has queued out of sequence data, but has been
inactive for too long, will drop the data (it will eventually
be retransmitted). */
#if TCP_QUEUE_OOSEQ
if (pcb->ooseq != NULL &&
8013302: 6afb ldr r3, [r7, #44] ; 0x2c
8013304: 6f5b ldr r3, [r3, #116] ; 0x74
8013306: 2b00 cmp r3, #0
8013308: d011 beq.n 801332e <tcp_slowtmr+0x3f2>
(tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) {
801330a: 4b6c ldr r3, [pc, #432] ; (80134bc <tcp_slowtmr+0x580>)
801330c: 681a ldr r2, [r3, #0]
801330e: 6afb ldr r3, [r7, #44] ; 0x2c
8013310: 6a1b ldr r3, [r3, #32]
8013312: 1ad2 subs r2, r2, r3
8013314: 6afb ldr r3, [r7, #44] ; 0x2c
8013316: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
801331a: 4619 mov r1, r3
801331c: 460b mov r3, r1
801331e: 005b lsls r3, r3, #1
8013320: 440b add r3, r1
8013322: 005b lsls r3, r3, #1
if (pcb->ooseq != NULL &&
8013324: 429a cmp r2, r3
8013326: d302 bcc.n 801332e <tcp_slowtmr+0x3f2>
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n"));
tcp_free_ooseq(pcb);
8013328: 6af8 ldr r0, [r7, #44] ; 0x2c
801332a: f000 fdd9 bl 8013ee0 <tcp_free_ooseq>
}
#endif /* TCP_QUEUE_OOSEQ */
/* Check if this PCB has stayed too long in SYN-RCVD */
if (pcb->state == SYN_RCVD) {
801332e: 6afb ldr r3, [r7, #44] ; 0x2c
8013330: 7d1b ldrb r3, [r3, #20]
8013332: 2b03 cmp r3, #3
8013334: d10b bne.n 801334e <tcp_slowtmr+0x412>
if ((u32_t)(tcp_ticks - pcb->tmr) >
8013336: 4b61 ldr r3, [pc, #388] ; (80134bc <tcp_slowtmr+0x580>)
8013338: 681a ldr r2, [r3, #0]
801333a: 6afb ldr r3, [r7, #44] ; 0x2c
801333c: 6a1b ldr r3, [r3, #32]
801333e: 1ad3 subs r3, r2, r3
8013340: 2b28 cmp r3, #40 ; 0x28
8013342: d904 bls.n 801334e <tcp_slowtmr+0x412>
TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
8013344: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8013348: 3301 adds r3, #1
801334a: f887 3027 strb.w r3, [r7, #39] ; 0x27
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n"));
}
}
/* Check if this PCB has stayed too long in LAST-ACK */
if (pcb->state == LAST_ACK) {
801334e: 6afb ldr r3, [r7, #44] ; 0x2c
8013350: 7d1b ldrb r3, [r3, #20]
8013352: 2b09 cmp r3, #9
8013354: d10b bne.n 801336e <tcp_slowtmr+0x432>
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
8013356: 4b59 ldr r3, [pc, #356] ; (80134bc <tcp_slowtmr+0x580>)
8013358: 681a ldr r2, [r3, #0]
801335a: 6afb ldr r3, [r7, #44] ; 0x2c
801335c: 6a1b ldr r3, [r3, #32]
801335e: 1ad3 subs r3, r2, r3
8013360: 2bf0 cmp r3, #240 ; 0xf0
8013362: d904 bls.n 801336e <tcp_slowtmr+0x432>
++pcb_remove;
8013364: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8013368: 3301 adds r3, #1
801336a: f887 3027 strb.w r3, [r7, #39] ; 0x27
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n"));
}
}
/* If the PCB should be removed, do it. */
if (pcb_remove) {
801336e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8013372: 2b00 cmp r3, #0
8013374: d060 beq.n 8013438 <tcp_slowtmr+0x4fc>
struct tcp_pcb *pcb2;
#if LWIP_CALLBACK_API
tcp_err_fn err_fn = pcb->errf;
8013376: 6afb ldr r3, [r7, #44] ; 0x2c
8013378: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
801337c: 60fb str r3, [r7, #12]
#endif /* LWIP_CALLBACK_API */
void *err_arg;
enum tcp_state last_state;
tcp_pcb_purge(pcb);
801337e: 6af8 ldr r0, [r7, #44] ; 0x2c
8013380: f000 fbfa bl 8013b78 <tcp_pcb_purge>
/* Remove PCB from tcp_active_pcbs list. */
if (prev != NULL) {
8013384: 6abb ldr r3, [r7, #40] ; 0x28
8013386: 2b00 cmp r3, #0
8013388: d010 beq.n 80133ac <tcp_slowtmr+0x470>
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
801338a: 4b50 ldr r3, [pc, #320] ; (80134cc <tcp_slowtmr+0x590>)
801338c: 681b ldr r3, [r3, #0]
801338e: 6afa ldr r2, [r7, #44] ; 0x2c
8013390: 429a cmp r2, r3
8013392: d106 bne.n 80133a2 <tcp_slowtmr+0x466>
8013394: 4b4e ldr r3, [pc, #312] ; (80134d0 <tcp_slowtmr+0x594>)
8013396: f240 526d movw r2, #1389 ; 0x56d
801339a: 494e ldr r1, [pc, #312] ; (80134d4 <tcp_slowtmr+0x598>)
801339c: 484e ldr r0, [pc, #312] ; (80134d8 <tcp_slowtmr+0x59c>)
801339e: f009 fcab bl 801ccf8 <iprintf>
prev->next = pcb->next;
80133a2: 6afb ldr r3, [r7, #44] ; 0x2c
80133a4: 68da ldr r2, [r3, #12]
80133a6: 6abb ldr r3, [r7, #40] ; 0x28
80133a8: 60da str r2, [r3, #12]
80133aa: e00f b.n 80133cc <tcp_slowtmr+0x490>
} else {
/* This PCB was the first. */
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb);
80133ac: 4b47 ldr r3, [pc, #284] ; (80134cc <tcp_slowtmr+0x590>)
80133ae: 681b ldr r3, [r3, #0]
80133b0: 6afa ldr r2, [r7, #44] ; 0x2c
80133b2: 429a cmp r2, r3
80133b4: d006 beq.n 80133c4 <tcp_slowtmr+0x488>
80133b6: 4b46 ldr r3, [pc, #280] ; (80134d0 <tcp_slowtmr+0x594>)
80133b8: f240 5271 movw r2, #1393 ; 0x571
80133bc: 4947 ldr r1, [pc, #284] ; (80134dc <tcp_slowtmr+0x5a0>)
80133be: 4846 ldr r0, [pc, #280] ; (80134d8 <tcp_slowtmr+0x59c>)
80133c0: f009 fc9a bl 801ccf8 <iprintf>
tcp_active_pcbs = pcb->next;
80133c4: 6afb ldr r3, [r7, #44] ; 0x2c
80133c6: 68db ldr r3, [r3, #12]
80133c8: 4a40 ldr r2, [pc, #256] ; (80134cc <tcp_slowtmr+0x590>)
80133ca: 6013 str r3, [r2, #0]
}
if (pcb_reset) {
80133cc: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
80133d0: 2b00 cmp r3, #0
80133d2: d013 beq.n 80133fc <tcp_slowtmr+0x4c0>
tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
80133d4: 6afb ldr r3, [r7, #44] ; 0x2c
80133d6: 6d18 ldr r0, [r3, #80] ; 0x50
80133d8: 6afb ldr r3, [r7, #44] ; 0x2c
80133da: 6a5c ldr r4, [r3, #36] ; 0x24
80133dc: 6afd ldr r5, [r7, #44] ; 0x2c
80133de: 6afb ldr r3, [r7, #44] ; 0x2c
80133e0: 3304 adds r3, #4
80133e2: 6afa ldr r2, [r7, #44] ; 0x2c
80133e4: 8ad2 ldrh r2, [r2, #22]
80133e6: 6af9 ldr r1, [r7, #44] ; 0x2c
80133e8: 8b09 ldrh r1, [r1, #24]
80133ea: 9102 str r1, [sp, #8]
80133ec: 9201 str r2, [sp, #4]
80133ee: 9300 str r3, [sp, #0]
80133f0: 462b mov r3, r5
80133f2: 4622 mov r2, r4
80133f4: 4601 mov r1, r0
80133f6: 6af8 ldr r0, [r7, #44] ; 0x2c
80133f8: f004 f992 bl 8017720 <tcp_rst>
pcb->local_port, pcb->remote_port);
}
err_arg = pcb->callback_arg;
80133fc: 6afb ldr r3, [r7, #44] ; 0x2c
80133fe: 691b ldr r3, [r3, #16]
8013400: 60bb str r3, [r7, #8]
last_state = pcb->state;
8013402: 6afb ldr r3, [r7, #44] ; 0x2c
8013404: 7d1b ldrb r3, [r3, #20]
8013406: 71fb strb r3, [r7, #7]
pcb2 = pcb;
8013408: 6afb ldr r3, [r7, #44] ; 0x2c
801340a: 603b str r3, [r7, #0]
pcb = pcb->next;
801340c: 6afb ldr r3, [r7, #44] ; 0x2c
801340e: 68db ldr r3, [r3, #12]
8013410: 62fb str r3, [r7, #44] ; 0x2c
tcp_free(pcb2);
8013412: 6838 ldr r0, [r7, #0]
8013414: f7ff f9fc bl 8012810 <tcp_free>
tcp_active_pcbs_changed = 0;
8013418: 4b31 ldr r3, [pc, #196] ; (80134e0 <tcp_slowtmr+0x5a4>)
801341a: 2200 movs r2, #0
801341c: 701a strb r2, [r3, #0]
TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT);
801341e: 68fb ldr r3, [r7, #12]
8013420: 2b00 cmp r3, #0
8013422: d004 beq.n 801342e <tcp_slowtmr+0x4f2>
8013424: 68fb ldr r3, [r7, #12]
8013426: f06f 010c mvn.w r1, #12
801342a: 68b8 ldr r0, [r7, #8]
801342c: 4798 blx r3
if (tcp_active_pcbs_changed) {
801342e: 4b2c ldr r3, [pc, #176] ; (80134e0 <tcp_slowtmr+0x5a4>)
8013430: 781b ldrb r3, [r3, #0]
8013432: 2b00 cmp r3, #0
8013434: d037 beq.n 80134a6 <tcp_slowtmr+0x56a>
goto tcp_slowtmr_start;
8013436: e592 b.n 8012f5e <tcp_slowtmr+0x22>
}
} else {
/* get the 'next' element now and work with 'prev' below (in case of abort) */
prev = pcb;
8013438: 6afb ldr r3, [r7, #44] ; 0x2c
801343a: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
801343c: 6afb ldr r3, [r7, #44] ; 0x2c
801343e: 68db ldr r3, [r3, #12]
8013440: 62fb str r3, [r7, #44] ; 0x2c
/* We check if we should poll the connection. */
++prev->polltmr;
8013442: 6abb ldr r3, [r7, #40] ; 0x28
8013444: 7f1b ldrb r3, [r3, #28]
8013446: 3301 adds r3, #1
8013448: b2da uxtb r2, r3
801344a: 6abb ldr r3, [r7, #40] ; 0x28
801344c: 771a strb r2, [r3, #28]
if (prev->polltmr >= prev->pollinterval) {
801344e: 6abb ldr r3, [r7, #40] ; 0x28
8013450: 7f1a ldrb r2, [r3, #28]
8013452: 6abb ldr r3, [r7, #40] ; 0x28
8013454: 7f5b ldrb r3, [r3, #29]
8013456: 429a cmp r2, r3
8013458: d325 bcc.n 80134a6 <tcp_slowtmr+0x56a>
prev->polltmr = 0;
801345a: 6abb ldr r3, [r7, #40] ; 0x28
801345c: 2200 movs r2, #0
801345e: 771a strb r2, [r3, #28]
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n"));
tcp_active_pcbs_changed = 0;
8013460: 4b1f ldr r3, [pc, #124] ; (80134e0 <tcp_slowtmr+0x5a4>)
8013462: 2200 movs r2, #0
8013464: 701a strb r2, [r3, #0]
TCP_EVENT_POLL(prev, err);
8013466: 6abb ldr r3, [r7, #40] ; 0x28
8013468: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
801346c: 2b00 cmp r3, #0
801346e: d00b beq.n 8013488 <tcp_slowtmr+0x54c>
8013470: 6abb ldr r3, [r7, #40] ; 0x28
8013472: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8013476: 6aba ldr r2, [r7, #40] ; 0x28
8013478: 6912 ldr r2, [r2, #16]
801347a: 6ab9 ldr r1, [r7, #40] ; 0x28
801347c: 4610 mov r0, r2
801347e: 4798 blx r3
8013480: 4603 mov r3, r0
8013482: f887 3025 strb.w r3, [r7, #37] ; 0x25
8013486: e002 b.n 801348e <tcp_slowtmr+0x552>
8013488: 2300 movs r3, #0
801348a: f887 3025 strb.w r3, [r7, #37] ; 0x25
if (tcp_active_pcbs_changed) {
801348e: 4b14 ldr r3, [pc, #80] ; (80134e0 <tcp_slowtmr+0x5a4>)
8013490: 781b ldrb r3, [r3, #0]
8013492: 2b00 cmp r3, #0
8013494: d000 beq.n 8013498 <tcp_slowtmr+0x55c>
goto tcp_slowtmr_start;
8013496: e562 b.n 8012f5e <tcp_slowtmr+0x22>
}
/* if err == ERR_ABRT, 'prev' is already deallocated */
if (err == ERR_OK) {
8013498: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
801349c: 2b00 cmp r3, #0
801349e: d102 bne.n 80134a6 <tcp_slowtmr+0x56a>
tcp_output(prev);
80134a0: 6ab8 ldr r0, [r7, #40] ; 0x28
80134a2: f003 fb77 bl 8016b94 <tcp_output>
while (pcb != NULL) {
80134a6: 6afb ldr r3, [r7, #44] ; 0x2c
80134a8: 2b00 cmp r3, #0
80134aa: f47f ad5e bne.w 8012f6a <tcp_slowtmr+0x2e>
}
}
/* Steps through all of the TIME-WAIT PCBs. */
prev = NULL;
80134ae: 2300 movs r3, #0
80134b0: 62bb str r3, [r7, #40] ; 0x28
pcb = tcp_tw_pcbs;
80134b2: 4b0c ldr r3, [pc, #48] ; (80134e4 <tcp_slowtmr+0x5a8>)
80134b4: 681b ldr r3, [r3, #0]
80134b6: 62fb str r3, [r7, #44] ; 0x2c
while (pcb != NULL) {
80134b8: e069 b.n 801358e <tcp_slowtmr+0x652>
80134ba: bf00 nop
80134bc: 2000f800 .word 0x2000f800
80134c0: 000a4cb8 .word 0x000a4cb8
80134c4: 10624dd3 .word 0x10624dd3
80134c8: 000124f8 .word 0x000124f8
80134cc: 2000f7fc .word 0x2000f7fc
80134d0: 0801eb88 .word 0x0801eb88
80134d4: 0801efc0 .word 0x0801efc0
80134d8: 0801ebcc .word 0x0801ebcc
80134dc: 0801efec .word 0x0801efec
80134e0: 2000f7f8 .word 0x2000f7f8
80134e4: 2000f80c .word 0x2000f80c
LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
80134e8: 6afb ldr r3, [r7, #44] ; 0x2c
80134ea: 7d1b ldrb r3, [r3, #20]
80134ec: 2b0a cmp r3, #10
80134ee: d006 beq.n 80134fe <tcp_slowtmr+0x5c2>
80134f0: 4b2a ldr r3, [pc, #168] ; (801359c <tcp_slowtmr+0x660>)
80134f2: f240 52a1 movw r2, #1441 ; 0x5a1
80134f6: 492a ldr r1, [pc, #168] ; (80135a0 <tcp_slowtmr+0x664>)
80134f8: 482a ldr r0, [pc, #168] ; (80135a4 <tcp_slowtmr+0x668>)
80134fa: f009 fbfd bl 801ccf8 <iprintf>
pcb_remove = 0;
80134fe: 2300 movs r3, #0
8013500: f887 3027 strb.w r3, [r7, #39] ; 0x27
/* Check if this PCB has stayed long enough in TIME-WAIT */
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
8013504: 4b28 ldr r3, [pc, #160] ; (80135a8 <tcp_slowtmr+0x66c>)
8013506: 681a ldr r2, [r3, #0]
8013508: 6afb ldr r3, [r7, #44] ; 0x2c
801350a: 6a1b ldr r3, [r3, #32]
801350c: 1ad3 subs r3, r2, r3
801350e: 2bf0 cmp r3, #240 ; 0xf0
8013510: d904 bls.n 801351c <tcp_slowtmr+0x5e0>
++pcb_remove;
8013512: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8013516: 3301 adds r3, #1
8013518: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
/* If the PCB should be removed, do it. */
if (pcb_remove) {
801351c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8013520: 2b00 cmp r3, #0
8013522: d02f beq.n 8013584 <tcp_slowtmr+0x648>
struct tcp_pcb *pcb2;
tcp_pcb_purge(pcb);
8013524: 6af8 ldr r0, [r7, #44] ; 0x2c
8013526: f000 fb27 bl 8013b78 <tcp_pcb_purge>
/* Remove PCB from tcp_tw_pcbs list. */
if (prev != NULL) {
801352a: 6abb ldr r3, [r7, #40] ; 0x28
801352c: 2b00 cmp r3, #0
801352e: d010 beq.n 8013552 <tcp_slowtmr+0x616>
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
8013530: 4b1e ldr r3, [pc, #120] ; (80135ac <tcp_slowtmr+0x670>)
8013532: 681b ldr r3, [r3, #0]
8013534: 6afa ldr r2, [r7, #44] ; 0x2c
8013536: 429a cmp r2, r3
8013538: d106 bne.n 8013548 <tcp_slowtmr+0x60c>
801353a: 4b18 ldr r3, [pc, #96] ; (801359c <tcp_slowtmr+0x660>)
801353c: f240 52af movw r2, #1455 ; 0x5af
8013540: 491b ldr r1, [pc, #108] ; (80135b0 <tcp_slowtmr+0x674>)
8013542: 4818 ldr r0, [pc, #96] ; (80135a4 <tcp_slowtmr+0x668>)
8013544: f009 fbd8 bl 801ccf8 <iprintf>
prev->next = pcb->next;
8013548: 6afb ldr r3, [r7, #44] ; 0x2c
801354a: 68da ldr r2, [r3, #12]
801354c: 6abb ldr r3, [r7, #40] ; 0x28
801354e: 60da str r2, [r3, #12]
8013550: e00f b.n 8013572 <tcp_slowtmr+0x636>
} else {
/* This PCB was the first. */
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb);
8013552: 4b16 ldr r3, [pc, #88] ; (80135ac <tcp_slowtmr+0x670>)
8013554: 681b ldr r3, [r3, #0]
8013556: 6afa ldr r2, [r7, #44] ; 0x2c
8013558: 429a cmp r2, r3
801355a: d006 beq.n 801356a <tcp_slowtmr+0x62e>
801355c: 4b0f ldr r3, [pc, #60] ; (801359c <tcp_slowtmr+0x660>)
801355e: f240 52b3 movw r2, #1459 ; 0x5b3
8013562: 4914 ldr r1, [pc, #80] ; (80135b4 <tcp_slowtmr+0x678>)
8013564: 480f ldr r0, [pc, #60] ; (80135a4 <tcp_slowtmr+0x668>)
8013566: f009 fbc7 bl 801ccf8 <iprintf>
tcp_tw_pcbs = pcb->next;
801356a: 6afb ldr r3, [r7, #44] ; 0x2c
801356c: 68db ldr r3, [r3, #12]
801356e: 4a0f ldr r2, [pc, #60] ; (80135ac <tcp_slowtmr+0x670>)
8013570: 6013 str r3, [r2, #0]
}
pcb2 = pcb;
8013572: 6afb ldr r3, [r7, #44] ; 0x2c
8013574: 61fb str r3, [r7, #28]
pcb = pcb->next;
8013576: 6afb ldr r3, [r7, #44] ; 0x2c
8013578: 68db ldr r3, [r3, #12]
801357a: 62fb str r3, [r7, #44] ; 0x2c
tcp_free(pcb2);
801357c: 69f8 ldr r0, [r7, #28]
801357e: f7ff f947 bl 8012810 <tcp_free>
8013582: e004 b.n 801358e <tcp_slowtmr+0x652>
} else {
prev = pcb;
8013584: 6afb ldr r3, [r7, #44] ; 0x2c
8013586: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
8013588: 6afb ldr r3, [r7, #44] ; 0x2c
801358a: 68db ldr r3, [r3, #12]
801358c: 62fb str r3, [r7, #44] ; 0x2c
while (pcb != NULL) {
801358e: 6afb ldr r3, [r7, #44] ; 0x2c
8013590: 2b00 cmp r3, #0
8013592: d1a9 bne.n 80134e8 <tcp_slowtmr+0x5ac>
}
}
}
8013594: bf00 nop
8013596: 3730 adds r7, #48 ; 0x30
8013598: 46bd mov sp, r7
801359a: bdb0 pop {r4, r5, r7, pc}
801359c: 0801eb88 .word 0x0801eb88
80135a0: 0801f018 .word 0x0801f018
80135a4: 0801ebcc .word 0x0801ebcc
80135a8: 2000f800 .word 0x2000f800
80135ac: 2000f80c .word 0x2000f80c
80135b0: 0801f048 .word 0x0801f048
80135b4: 0801f070 .word 0x0801f070
080135b8 <tcp_fasttmr>:
*
* Automatically called from tcp_tmr().
*/
void
tcp_fasttmr(void)
{
80135b8: b580 push {r7, lr}
80135ba: b082 sub sp, #8
80135bc: af00 add r7, sp, #0
struct tcp_pcb *pcb;
++tcp_timer_ctr;
80135be: 4b2d ldr r3, [pc, #180] ; (8013674 <tcp_fasttmr+0xbc>)
80135c0: 781b ldrb r3, [r3, #0]
80135c2: 3301 adds r3, #1
80135c4: b2da uxtb r2, r3
80135c6: 4b2b ldr r3, [pc, #172] ; (8013674 <tcp_fasttmr+0xbc>)
80135c8: 701a strb r2, [r3, #0]
tcp_fasttmr_start:
pcb = tcp_active_pcbs;
80135ca: 4b2b ldr r3, [pc, #172] ; (8013678 <tcp_fasttmr+0xc0>)
80135cc: 681b ldr r3, [r3, #0]
80135ce: 607b str r3, [r7, #4]
while (pcb != NULL) {
80135d0: e048 b.n 8013664 <tcp_fasttmr+0xac>
if (pcb->last_timer != tcp_timer_ctr) {
80135d2: 687b ldr r3, [r7, #4]
80135d4: 7f9a ldrb r2, [r3, #30]
80135d6: 4b27 ldr r3, [pc, #156] ; (8013674 <tcp_fasttmr+0xbc>)
80135d8: 781b ldrb r3, [r3, #0]
80135da: 429a cmp r2, r3
80135dc: d03f beq.n 801365e <tcp_fasttmr+0xa6>
struct tcp_pcb *next;
pcb->last_timer = tcp_timer_ctr;
80135de: 4b25 ldr r3, [pc, #148] ; (8013674 <tcp_fasttmr+0xbc>)
80135e0: 781a ldrb r2, [r3, #0]
80135e2: 687b ldr r3, [r7, #4]
80135e4: 779a strb r2, [r3, #30]
/* send delayed ACKs */
if (pcb->flags & TF_ACK_DELAY) {
80135e6: 687b ldr r3, [r7, #4]
80135e8: 8b5b ldrh r3, [r3, #26]
80135ea: f003 0301 and.w r3, r3, #1
80135ee: 2b00 cmp r3, #0
80135f0: d010 beq.n 8013614 <tcp_fasttmr+0x5c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n"));
tcp_ack_now(pcb);
80135f2: 687b ldr r3, [r7, #4]
80135f4: 8b5b ldrh r3, [r3, #26]
80135f6: f043 0302 orr.w r3, r3, #2
80135fa: b29a uxth r2, r3
80135fc: 687b ldr r3, [r7, #4]
80135fe: 835a strh r2, [r3, #26]
tcp_output(pcb);
8013600: 6878 ldr r0, [r7, #4]
8013602: f003 fac7 bl 8016b94 <tcp_output>
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8013606: 687b ldr r3, [r7, #4]
8013608: 8b5b ldrh r3, [r3, #26]
801360a: f023 0303 bic.w r3, r3, #3
801360e: b29a uxth r2, r3
8013610: 687b ldr r3, [r7, #4]
8013612: 835a strh r2, [r3, #26]
}
/* send pending FIN */
if (pcb->flags & TF_CLOSEPEND) {
8013614: 687b ldr r3, [r7, #4]
8013616: 8b5b ldrh r3, [r3, #26]
8013618: f003 0308 and.w r3, r3, #8
801361c: 2b00 cmp r3, #0
801361e: d009 beq.n 8013634 <tcp_fasttmr+0x7c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n"));
tcp_clear_flags(pcb, TF_CLOSEPEND);
8013620: 687b ldr r3, [r7, #4]
8013622: 8b5b ldrh r3, [r3, #26]
8013624: f023 0308 bic.w r3, r3, #8
8013628: b29a uxth r2, r3
801362a: 687b ldr r3, [r7, #4]
801362c: 835a strh r2, [r3, #26]
tcp_close_shutdown_fin(pcb);
801362e: 6878 ldr r0, [r7, #4]
8013630: f7ff fa7e bl 8012b30 <tcp_close_shutdown_fin>
}
next = pcb->next;
8013634: 687b ldr r3, [r7, #4]
8013636: 68db ldr r3, [r3, #12]
8013638: 603b str r3, [r7, #0]
/* If there is data which was previously "refused" by upper layer */
if (pcb->refused_data != NULL) {
801363a: 687b ldr r3, [r7, #4]
801363c: 6f9b ldr r3, [r3, #120] ; 0x78
801363e: 2b00 cmp r3, #0
8013640: d00a beq.n 8013658 <tcp_fasttmr+0xa0>
tcp_active_pcbs_changed = 0;
8013642: 4b0e ldr r3, [pc, #56] ; (801367c <tcp_fasttmr+0xc4>)
8013644: 2200 movs r2, #0
8013646: 701a strb r2, [r3, #0]
tcp_process_refused_data(pcb);
8013648: 6878 ldr r0, [r7, #4]
801364a: f000 f819 bl 8013680 <tcp_process_refused_data>
if (tcp_active_pcbs_changed) {
801364e: 4b0b ldr r3, [pc, #44] ; (801367c <tcp_fasttmr+0xc4>)
8013650: 781b ldrb r3, [r3, #0]
8013652: 2b00 cmp r3, #0
8013654: d000 beq.n 8013658 <tcp_fasttmr+0xa0>
/* application callback has changed the pcb list: restart the loop */
goto tcp_fasttmr_start;
8013656: e7b8 b.n 80135ca <tcp_fasttmr+0x12>
}
}
pcb = next;
8013658: 683b ldr r3, [r7, #0]
801365a: 607b str r3, [r7, #4]
801365c: e002 b.n 8013664 <tcp_fasttmr+0xac>
} else {
pcb = pcb->next;
801365e: 687b ldr r3, [r7, #4]
8013660: 68db ldr r3, [r3, #12]
8013662: 607b str r3, [r7, #4]
while (pcb != NULL) {
8013664: 687b ldr r3, [r7, #4]
8013666: 2b00 cmp r3, #0
8013668: d1b3 bne.n 80135d2 <tcp_fasttmr+0x1a>
}
}
}
801366a: bf00 nop
801366c: 3708 adds r7, #8
801366e: 46bd mov sp, r7
8013670: bd80 pop {r7, pc}
8013672: bf00 nop
8013674: 2000872a .word 0x2000872a
8013678: 2000f7fc .word 0x2000f7fc
801367c: 2000f7f8 .word 0x2000f7f8
08013680 <tcp_process_refused_data>:
}
/** Pass pcb->refused_data to the recv callback */
err_t
tcp_process_refused_data(struct tcp_pcb *pcb)
{
8013680: b590 push {r4, r7, lr}
8013682: b085 sub sp, #20
8013684: af00 add r7, sp, #0
8013686: 6078 str r0, [r7, #4]
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
struct pbuf *rest;
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG);
8013688: 687b ldr r3, [r7, #4]
801368a: 2b00 cmp r3, #0
801368c: d109 bne.n 80136a2 <tcp_process_refused_data+0x22>
801368e: 4b37 ldr r3, [pc, #220] ; (801376c <tcp_process_refused_data+0xec>)
8013690: f240 6209 movw r2, #1545 ; 0x609
8013694: 4936 ldr r1, [pc, #216] ; (8013770 <tcp_process_refused_data+0xf0>)
8013696: 4837 ldr r0, [pc, #220] ; (8013774 <tcp_process_refused_data+0xf4>)
8013698: f009 fb2e bl 801ccf8 <iprintf>
801369c: f06f 030f mvn.w r3, #15
80136a0: e060 b.n 8013764 <tcp_process_refused_data+0xe4>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
while (pcb->refused_data != NULL)
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
{
err_t err;
u8_t refused_flags = pcb->refused_data->flags;
80136a2: 687b ldr r3, [r7, #4]
80136a4: 6f9b ldr r3, [r3, #120] ; 0x78
80136a6: 7b5b ldrb r3, [r3, #13]
80136a8: 73bb strb r3, [r7, #14]
/* set pcb->refused_data to NULL in case the callback frees it and then
closes the pcb */
struct pbuf *refused_data = pcb->refused_data;
80136aa: 687b ldr r3, [r7, #4]
80136ac: 6f9b ldr r3, [r3, #120] ; 0x78
80136ae: 60bb str r3, [r7, #8]
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
pbuf_split_64k(refused_data, &rest);
pcb->refused_data = rest;
#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
pcb->refused_data = NULL;
80136b0: 687b ldr r3, [r7, #4]
80136b2: 2200 movs r2, #0
80136b4: 679a str r2, [r3, #120] ; 0x78
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
/* Notify again application with data previously received. */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n"));
TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err);
80136b6: 687b ldr r3, [r7, #4]
80136b8: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
80136bc: 2b00 cmp r3, #0
80136be: d00b beq.n 80136d8 <tcp_process_refused_data+0x58>
80136c0: 687b ldr r3, [r7, #4]
80136c2: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
80136c6: 687b ldr r3, [r7, #4]
80136c8: 6918 ldr r0, [r3, #16]
80136ca: 2300 movs r3, #0
80136cc: 68ba ldr r2, [r7, #8]
80136ce: 6879 ldr r1, [r7, #4]
80136d0: 47a0 blx r4
80136d2: 4603 mov r3, r0
80136d4: 73fb strb r3, [r7, #15]
80136d6: e007 b.n 80136e8 <tcp_process_refused_data+0x68>
80136d8: 2300 movs r3, #0
80136da: 68ba ldr r2, [r7, #8]
80136dc: 6879 ldr r1, [r7, #4]
80136de: 2000 movs r0, #0
80136e0: f000 f8a2 bl 8013828 <tcp_recv_null>
80136e4: 4603 mov r3, r0
80136e6: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
80136e8: f997 300f ldrsb.w r3, [r7, #15]
80136ec: 2b00 cmp r3, #0
80136ee: d12a bne.n 8013746 <tcp_process_refused_data+0xc6>
/* did refused_data include a FIN? */
if ((refused_flags & PBUF_FLAG_TCP_FIN)
80136f0: 7bbb ldrb r3, [r7, #14]
80136f2: f003 0320 and.w r3, r3, #32
80136f6: 2b00 cmp r3, #0
80136f8: d033 beq.n 8013762 <tcp_process_refused_data+0xe2>
&& (rest == NULL)
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
) {
/* correct rcv_wnd as the application won't call tcp_recved()
for the FIN's seqno */
if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) {
80136fa: 687b ldr r3, [r7, #4]
80136fc: 8d1b ldrh r3, [r3, #40] ; 0x28
80136fe: f5b3 6f06 cmp.w r3, #2144 ; 0x860
8013702: d005 beq.n 8013710 <tcp_process_refused_data+0x90>
pcb->rcv_wnd++;
8013704: 687b ldr r3, [r7, #4]
8013706: 8d1b ldrh r3, [r3, #40] ; 0x28
8013708: 3301 adds r3, #1
801370a: b29a uxth r2, r3
801370c: 687b ldr r3, [r7, #4]
801370e: 851a strh r2, [r3, #40] ; 0x28
}
TCP_EVENT_CLOSED(pcb, err);
8013710: 687b ldr r3, [r7, #4]
8013712: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8013716: 2b00 cmp r3, #0
8013718: d00b beq.n 8013732 <tcp_process_refused_data+0xb2>
801371a: 687b ldr r3, [r7, #4]
801371c: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8013720: 687b ldr r3, [r7, #4]
8013722: 6918 ldr r0, [r3, #16]
8013724: 2300 movs r3, #0
8013726: 2200 movs r2, #0
8013728: 6879 ldr r1, [r7, #4]
801372a: 47a0 blx r4
801372c: 4603 mov r3, r0
801372e: 73fb strb r3, [r7, #15]
8013730: e001 b.n 8013736 <tcp_process_refused_data+0xb6>
8013732: 2300 movs r3, #0
8013734: 73fb strb r3, [r7, #15]
if (err == ERR_ABRT) {
8013736: f997 300f ldrsb.w r3, [r7, #15]
801373a: f113 0f0d cmn.w r3, #13
801373e: d110 bne.n 8013762 <tcp_process_refused_data+0xe2>
return ERR_ABRT;
8013740: f06f 030c mvn.w r3, #12
8013744: e00e b.n 8013764 <tcp_process_refused_data+0xe4>
}
}
} else if (err == ERR_ABRT) {
8013746: f997 300f ldrsb.w r3, [r7, #15]
801374a: f113 0f0d cmn.w r3, #13
801374e: d102 bne.n 8013756 <tcp_process_refused_data+0xd6>
/* if err == ERR_ABRT, 'pcb' is already deallocated */
/* Drop incoming packets because pcb is "full" (only if the incoming
segment contains data). */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: drop incoming packets, because pcb is \"full\"\n"));
return ERR_ABRT;
8013750: f06f 030c mvn.w r3, #12
8013754: e006 b.n 8013764 <tcp_process_refused_data+0xe4>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
if (rest != NULL) {
pbuf_cat(refused_data, rest);
}
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
pcb->refused_data = refused_data;
8013756: 687b ldr r3, [r7, #4]
8013758: 68ba ldr r2, [r7, #8]
801375a: 679a str r2, [r3, #120] ; 0x78
return ERR_INPROGRESS;
801375c: f06f 0304 mvn.w r3, #4
8013760: e000 b.n 8013764 <tcp_process_refused_data+0xe4>
}
}
return ERR_OK;
8013762: 2300 movs r3, #0
}
8013764: 4618 mov r0, r3
8013766: 3714 adds r7, #20
8013768: 46bd mov sp, r7
801376a: bd90 pop {r4, r7, pc}
801376c: 0801eb88 .word 0x0801eb88
8013770: 0801f098 .word 0x0801f098
8013774: 0801ebcc .word 0x0801ebcc
08013778 <tcp_segs_free>:
*
* @param seg tcp_seg list of TCP segments to free
*/
void
tcp_segs_free(struct tcp_seg *seg)
{
8013778: b580 push {r7, lr}
801377a: b084 sub sp, #16
801377c: af00 add r7, sp, #0
801377e: 6078 str r0, [r7, #4]
while (seg != NULL) {
8013780: e007 b.n 8013792 <tcp_segs_free+0x1a>
struct tcp_seg *next = seg->next;
8013782: 687b ldr r3, [r7, #4]
8013784: 681b ldr r3, [r3, #0]
8013786: 60fb str r3, [r7, #12]
tcp_seg_free(seg);
8013788: 6878 ldr r0, [r7, #4]
801378a: f000 f809 bl 80137a0 <tcp_seg_free>
seg = next;
801378e: 68fb ldr r3, [r7, #12]
8013790: 607b str r3, [r7, #4]
while (seg != NULL) {
8013792: 687b ldr r3, [r7, #4]
8013794: 2b00 cmp r3, #0
8013796: d1f4 bne.n 8013782 <tcp_segs_free+0xa>
}
}
8013798: bf00 nop
801379a: 3710 adds r7, #16
801379c: 46bd mov sp, r7
801379e: bd80 pop {r7, pc}
080137a0 <tcp_seg_free>:
*
* @param seg single tcp_seg to free
*/
void
tcp_seg_free(struct tcp_seg *seg)
{
80137a0: b580 push {r7, lr}
80137a2: b082 sub sp, #8
80137a4: af00 add r7, sp, #0
80137a6: 6078 str r0, [r7, #4]
if (seg != NULL) {
80137a8: 687b ldr r3, [r7, #4]
80137aa: 2b00 cmp r3, #0
80137ac: d00c beq.n 80137c8 <tcp_seg_free+0x28>
if (seg->p != NULL) {
80137ae: 687b ldr r3, [r7, #4]
80137b0: 685b ldr r3, [r3, #4]
80137b2: 2b00 cmp r3, #0
80137b4: d004 beq.n 80137c0 <tcp_seg_free+0x20>
pbuf_free(seg->p);
80137b6: 687b ldr r3, [r7, #4]
80137b8: 685b ldr r3, [r3, #4]
80137ba: 4618 mov r0, r3
80137bc: f7fe fd6c bl 8012298 <pbuf_free>
#if TCP_DEBUG
seg->p = NULL;
#endif /* TCP_DEBUG */
}
memp_free(MEMP_TCP_SEG, seg);
80137c0: 6879 ldr r1, [r7, #4]
80137c2: 2003 movs r0, #3
80137c4: f7fd febc bl 8011540 <memp_free>
}
}
80137c8: bf00 nop
80137ca: 3708 adds r7, #8
80137cc: 46bd mov sp, r7
80137ce: bd80 pop {r7, pc}
080137d0 <tcp_seg_copy>:
* @param seg the old tcp_seg
* @return a copy of seg
*/
struct tcp_seg *
tcp_seg_copy(struct tcp_seg *seg)
{
80137d0: b580 push {r7, lr}
80137d2: b084 sub sp, #16
80137d4: af00 add r7, sp, #0
80137d6: 6078 str r0, [r7, #4]
struct tcp_seg *cseg;
LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
80137d8: 687b ldr r3, [r7, #4]
80137da: 2b00 cmp r3, #0
80137dc: d106 bne.n 80137ec <tcp_seg_copy+0x1c>
80137de: 4b0f ldr r3, [pc, #60] ; (801381c <tcp_seg_copy+0x4c>)
80137e0: f240 6282 movw r2, #1666 ; 0x682
80137e4: 490e ldr r1, [pc, #56] ; (8013820 <tcp_seg_copy+0x50>)
80137e6: 480f ldr r0, [pc, #60] ; (8013824 <tcp_seg_copy+0x54>)
80137e8: f009 fa86 bl 801ccf8 <iprintf>
cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG);
80137ec: 2003 movs r0, #3
80137ee: f7fd fe55 bl 801149c <memp_malloc>
80137f2: 60f8 str r0, [r7, #12]
if (cseg == NULL) {
80137f4: 68fb ldr r3, [r7, #12]
80137f6: 2b00 cmp r3, #0
80137f8: d101 bne.n 80137fe <tcp_seg_copy+0x2e>
return NULL;
80137fa: 2300 movs r3, #0
80137fc: e00a b.n 8013814 <tcp_seg_copy+0x44>
}
SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg));
80137fe: 2210 movs r2, #16
8013800: 6879 ldr r1, [r7, #4]
8013802: 68f8 ldr r0, [r7, #12]
8013804: f009 fa4b bl 801cc9e <memcpy>
pbuf_ref(cseg->p);
8013808: 68fb ldr r3, [r7, #12]
801380a: 685b ldr r3, [r3, #4]
801380c: 4618 mov r0, r3
801380e: f7fe fde9 bl 80123e4 <pbuf_ref>
return cseg;
8013812: 68fb ldr r3, [r7, #12]
}
8013814: 4618 mov r0, r3
8013816: 3710 adds r7, #16
8013818: 46bd mov sp, r7
801381a: bd80 pop {r7, pc}
801381c: 0801eb88 .word 0x0801eb88
8013820: 0801f0dc .word 0x0801f0dc
8013824: 0801ebcc .word 0x0801ebcc
08013828 <tcp_recv_null>:
* Default receive callback that is called if the user didn't register
* a recv callback for the pcb.
*/
err_t
tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
{
8013828: b580 push {r7, lr}
801382a: b084 sub sp, #16
801382c: af00 add r7, sp, #0
801382e: 60f8 str r0, [r7, #12]
8013830: 60b9 str r1, [r7, #8]
8013832: 607a str r2, [r7, #4]
8013834: 70fb strb r3, [r7, #3]
LWIP_UNUSED_ARG(arg);
LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
8013836: 68bb ldr r3, [r7, #8]
8013838: 2b00 cmp r3, #0
801383a: d109 bne.n 8013850 <tcp_recv_null+0x28>
801383c: 4b12 ldr r3, [pc, #72] ; (8013888 <tcp_recv_null+0x60>)
801383e: f44f 62d3 mov.w r2, #1688 ; 0x698
8013842: 4912 ldr r1, [pc, #72] ; (801388c <tcp_recv_null+0x64>)
8013844: 4812 ldr r0, [pc, #72] ; (8013890 <tcp_recv_null+0x68>)
8013846: f009 fa57 bl 801ccf8 <iprintf>
801384a: f06f 030f mvn.w r3, #15
801384e: e016 b.n 801387e <tcp_recv_null+0x56>
if (p != NULL) {
8013850: 687b ldr r3, [r7, #4]
8013852: 2b00 cmp r3, #0
8013854: d009 beq.n 801386a <tcp_recv_null+0x42>
tcp_recved(pcb, p->tot_len);
8013856: 687b ldr r3, [r7, #4]
8013858: 891b ldrh r3, [r3, #8]
801385a: 4619 mov r1, r3
801385c: 68b8 ldr r0, [r7, #8]
801385e: f7ff fb1d bl 8012e9c <tcp_recved>
pbuf_free(p);
8013862: 6878 ldr r0, [r7, #4]
8013864: f7fe fd18 bl 8012298 <pbuf_free>
8013868: e008 b.n 801387c <tcp_recv_null+0x54>
} else if (err == ERR_OK) {
801386a: f997 3003 ldrsb.w r3, [r7, #3]
801386e: 2b00 cmp r3, #0
8013870: d104 bne.n 801387c <tcp_recv_null+0x54>
return tcp_close(pcb);
8013872: 68b8 ldr r0, [r7, #8]
8013874: f7ff f9c2 bl 8012bfc <tcp_close>
8013878: 4603 mov r3, r0
801387a: e000 b.n 801387e <tcp_recv_null+0x56>
}
return ERR_OK;
801387c: 2300 movs r3, #0
}
801387e: 4618 mov r0, r3
8013880: 3710 adds r7, #16
8013882: 46bd mov sp, r7
8013884: bd80 pop {r7, pc}
8013886: bf00 nop
8013888: 0801eb88 .word 0x0801eb88
801388c: 0801f0f8 .word 0x0801f0f8
8013890: 0801ebcc .word 0x0801ebcc
08013894 <tcp_kill_prio>:
*
* @param prio minimum priority
*/
static void
tcp_kill_prio(u8_t prio)
{
8013894: b580 push {r7, lr}
8013896: b086 sub sp, #24
8013898: af00 add r7, sp, #0
801389a: 4603 mov r3, r0
801389c: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
u8_t mprio;
mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
801389e: f997 3007 ldrsb.w r3, [r7, #7]
80138a2: 2b00 cmp r3, #0
80138a4: db01 blt.n 80138aa <tcp_kill_prio+0x16>
80138a6: 79fb ldrb r3, [r7, #7]
80138a8: e000 b.n 80138ac <tcp_kill_prio+0x18>
80138aa: 237f movs r3, #127 ; 0x7f
80138ac: 72fb strb r3, [r7, #11]
/* We want to kill connections with a lower prio, so bail out if
* supplied prio is 0 - there can never be a lower prio
*/
if (mprio == 0) {
80138ae: 7afb ldrb r3, [r7, #11]
80138b0: 2b00 cmp r3, #0
80138b2: d034 beq.n 801391e <tcp_kill_prio+0x8a>
/* We only want kill connections with a lower prio, so decrement prio by one
* and start searching for oldest connection with same or lower priority than mprio.
* We want to find the connections with the lowest possible prio, and among
* these the one with the longest inactivity time.
*/
mprio--;
80138b4: 7afb ldrb r3, [r7, #11]
80138b6: 3b01 subs r3, #1
80138b8: 72fb strb r3, [r7, #11]
inactivity = 0;
80138ba: 2300 movs r3, #0
80138bc: 60fb str r3, [r7, #12]
inactive = NULL;
80138be: 2300 movs r3, #0
80138c0: 613b str r3, [r7, #16]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
80138c2: 4b19 ldr r3, [pc, #100] ; (8013928 <tcp_kill_prio+0x94>)
80138c4: 681b ldr r3, [r3, #0]
80138c6: 617b str r3, [r7, #20]
80138c8: e01f b.n 801390a <tcp_kill_prio+0x76>
/* lower prio is always a kill candidate */
if ((pcb->prio < mprio) ||
80138ca: 697b ldr r3, [r7, #20]
80138cc: 7d5b ldrb r3, [r3, #21]
80138ce: 7afa ldrb r2, [r7, #11]
80138d0: 429a cmp r2, r3
80138d2: d80c bhi.n 80138ee <tcp_kill_prio+0x5a>
/* longer inactivity is also a kill candidate */
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
80138d4: 697b ldr r3, [r7, #20]
80138d6: 7d5b ldrb r3, [r3, #21]
if ((pcb->prio < mprio) ||
80138d8: 7afa ldrb r2, [r7, #11]
80138da: 429a cmp r2, r3
80138dc: d112 bne.n 8013904 <tcp_kill_prio+0x70>
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
80138de: 4b13 ldr r3, [pc, #76] ; (801392c <tcp_kill_prio+0x98>)
80138e0: 681a ldr r2, [r3, #0]
80138e2: 697b ldr r3, [r7, #20]
80138e4: 6a1b ldr r3, [r3, #32]
80138e6: 1ad3 subs r3, r2, r3
80138e8: 68fa ldr r2, [r7, #12]
80138ea: 429a cmp r2, r3
80138ec: d80a bhi.n 8013904 <tcp_kill_prio+0x70>
inactivity = tcp_ticks - pcb->tmr;
80138ee: 4b0f ldr r3, [pc, #60] ; (801392c <tcp_kill_prio+0x98>)
80138f0: 681a ldr r2, [r3, #0]
80138f2: 697b ldr r3, [r7, #20]
80138f4: 6a1b ldr r3, [r3, #32]
80138f6: 1ad3 subs r3, r2, r3
80138f8: 60fb str r3, [r7, #12]
inactive = pcb;
80138fa: 697b ldr r3, [r7, #20]
80138fc: 613b str r3, [r7, #16]
mprio = pcb->prio;
80138fe: 697b ldr r3, [r7, #20]
8013900: 7d5b ldrb r3, [r3, #21]
8013902: 72fb strb r3, [r7, #11]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8013904: 697b ldr r3, [r7, #20]
8013906: 68db ldr r3, [r3, #12]
8013908: 617b str r3, [r7, #20]
801390a: 697b ldr r3, [r7, #20]
801390c: 2b00 cmp r3, #0
801390e: d1dc bne.n 80138ca <tcp_kill_prio+0x36>
}
}
if (inactive != NULL) {
8013910: 693b ldr r3, [r7, #16]
8013912: 2b00 cmp r3, #0
8013914: d004 beq.n 8013920 <tcp_kill_prio+0x8c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n",
(void *)inactive, inactivity));
tcp_abort(inactive);
8013916: 6938 ldr r0, [r7, #16]
8013918: f7ff fa5a bl 8012dd0 <tcp_abort>
801391c: e000 b.n 8013920 <tcp_kill_prio+0x8c>
return;
801391e: bf00 nop
}
}
8013920: 3718 adds r7, #24
8013922: 46bd mov sp, r7
8013924: bd80 pop {r7, pc}
8013926: bf00 nop
8013928: 2000f7fc .word 0x2000f7fc
801392c: 2000f800 .word 0x2000f800
08013930 <tcp_kill_state>:
* Kills the oldest connection that is in specific state.
* Called from tcp_alloc() for LAST_ACK and CLOSING if no more connections are available.
*/
static void
tcp_kill_state(enum tcp_state state)
{
8013930: b580 push {r7, lr}
8013932: b086 sub sp, #24
8013934: af00 add r7, sp, #0
8013936: 4603 mov r3, r0
8013938: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
801393a: 79fb ldrb r3, [r7, #7]
801393c: 2b08 cmp r3, #8
801393e: d009 beq.n 8013954 <tcp_kill_state+0x24>
8013940: 79fb ldrb r3, [r7, #7]
8013942: 2b09 cmp r3, #9
8013944: d006 beq.n 8013954 <tcp_kill_state+0x24>
8013946: 4b1a ldr r3, [pc, #104] ; (80139b0 <tcp_kill_state+0x80>)
8013948: f240 62dd movw r2, #1757 ; 0x6dd
801394c: 4919 ldr r1, [pc, #100] ; (80139b4 <tcp_kill_state+0x84>)
801394e: 481a ldr r0, [pc, #104] ; (80139b8 <tcp_kill_state+0x88>)
8013950: f009 f9d2 bl 801ccf8 <iprintf>
inactivity = 0;
8013954: 2300 movs r3, #0
8013956: 60fb str r3, [r7, #12]
inactive = NULL;
8013958: 2300 movs r3, #0
801395a: 613b str r3, [r7, #16]
/* Go through the list of active pcbs and get the oldest pcb that is in state
CLOSING/LAST_ACK. */
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
801395c: 4b17 ldr r3, [pc, #92] ; (80139bc <tcp_kill_state+0x8c>)
801395e: 681b ldr r3, [r3, #0]
8013960: 617b str r3, [r7, #20]
8013962: e017 b.n 8013994 <tcp_kill_state+0x64>
if (pcb->state == state) {
8013964: 697b ldr r3, [r7, #20]
8013966: 7d1b ldrb r3, [r3, #20]
8013968: 79fa ldrb r2, [r7, #7]
801396a: 429a cmp r2, r3
801396c: d10f bne.n 801398e <tcp_kill_state+0x5e>
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
801396e: 4b14 ldr r3, [pc, #80] ; (80139c0 <tcp_kill_state+0x90>)
8013970: 681a ldr r2, [r3, #0]
8013972: 697b ldr r3, [r7, #20]
8013974: 6a1b ldr r3, [r3, #32]
8013976: 1ad3 subs r3, r2, r3
8013978: 68fa ldr r2, [r7, #12]
801397a: 429a cmp r2, r3
801397c: d807 bhi.n 801398e <tcp_kill_state+0x5e>
inactivity = tcp_ticks - pcb->tmr;
801397e: 4b10 ldr r3, [pc, #64] ; (80139c0 <tcp_kill_state+0x90>)
8013980: 681a ldr r2, [r3, #0]
8013982: 697b ldr r3, [r7, #20]
8013984: 6a1b ldr r3, [r3, #32]
8013986: 1ad3 subs r3, r2, r3
8013988: 60fb str r3, [r7, #12]
inactive = pcb;
801398a: 697b ldr r3, [r7, #20]
801398c: 613b str r3, [r7, #16]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
801398e: 697b ldr r3, [r7, #20]
8013990: 68db ldr r3, [r3, #12]
8013992: 617b str r3, [r7, #20]
8013994: 697b ldr r3, [r7, #20]
8013996: 2b00 cmp r3, #0
8013998: d1e4 bne.n 8013964 <tcp_kill_state+0x34>
}
}
}
if (inactive != NULL) {
801399a: 693b ldr r3, [r7, #16]
801399c: 2b00 cmp r3, #0
801399e: d003 beq.n 80139a8 <tcp_kill_state+0x78>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_closing: killing oldest %s PCB %p (%"S32_F")\n",
tcp_state_str[state], (void *)inactive, inactivity));
/* Don't send a RST, since no data is lost. */
tcp_abandon(inactive, 0);
80139a0: 2100 movs r1, #0
80139a2: 6938 ldr r0, [r7, #16]
80139a4: f7ff f956 bl 8012c54 <tcp_abandon>
}
}
80139a8: bf00 nop
80139aa: 3718 adds r7, #24
80139ac: 46bd mov sp, r7
80139ae: bd80 pop {r7, pc}
80139b0: 0801eb88 .word 0x0801eb88
80139b4: 0801f114 .word 0x0801f114
80139b8: 0801ebcc .word 0x0801ebcc
80139bc: 2000f7fc .word 0x2000f7fc
80139c0: 2000f800 .word 0x2000f800
080139c4 <tcp_kill_timewait>:
* Kills the oldest connection that is in TIME_WAIT state.
* Called from tcp_alloc() if no more connections are available.
*/
static void
tcp_kill_timewait(void)
{
80139c4: b580 push {r7, lr}
80139c6: b084 sub sp, #16
80139c8: af00 add r7, sp, #0
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
inactivity = 0;
80139ca: 2300 movs r3, #0
80139cc: 607b str r3, [r7, #4]
inactive = NULL;
80139ce: 2300 movs r3, #0
80139d0: 60bb str r3, [r7, #8]
/* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
80139d2: 4b12 ldr r3, [pc, #72] ; (8013a1c <tcp_kill_timewait+0x58>)
80139d4: 681b ldr r3, [r3, #0]
80139d6: 60fb str r3, [r7, #12]
80139d8: e012 b.n 8013a00 <tcp_kill_timewait+0x3c>
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
80139da: 4b11 ldr r3, [pc, #68] ; (8013a20 <tcp_kill_timewait+0x5c>)
80139dc: 681a ldr r2, [r3, #0]
80139de: 68fb ldr r3, [r7, #12]
80139e0: 6a1b ldr r3, [r3, #32]
80139e2: 1ad3 subs r3, r2, r3
80139e4: 687a ldr r2, [r7, #4]
80139e6: 429a cmp r2, r3
80139e8: d807 bhi.n 80139fa <tcp_kill_timewait+0x36>
inactivity = tcp_ticks - pcb->tmr;
80139ea: 4b0d ldr r3, [pc, #52] ; (8013a20 <tcp_kill_timewait+0x5c>)
80139ec: 681a ldr r2, [r3, #0]
80139ee: 68fb ldr r3, [r7, #12]
80139f0: 6a1b ldr r3, [r3, #32]
80139f2: 1ad3 subs r3, r2, r3
80139f4: 607b str r3, [r7, #4]
inactive = pcb;
80139f6: 68fb ldr r3, [r7, #12]
80139f8: 60bb str r3, [r7, #8]
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
80139fa: 68fb ldr r3, [r7, #12]
80139fc: 68db ldr r3, [r3, #12]
80139fe: 60fb str r3, [r7, #12]
8013a00: 68fb ldr r3, [r7, #12]
8013a02: 2b00 cmp r3, #0
8013a04: d1e9 bne.n 80139da <tcp_kill_timewait+0x16>
}
}
if (inactive != NULL) {
8013a06: 68bb ldr r3, [r7, #8]
8013a08: 2b00 cmp r3, #0
8013a0a: d002 beq.n 8013a12 <tcp_kill_timewait+0x4e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n",
(void *)inactive, inactivity));
tcp_abort(inactive);
8013a0c: 68b8 ldr r0, [r7, #8]
8013a0e: f7ff f9df bl 8012dd0 <tcp_abort>
}
}
8013a12: bf00 nop
8013a14: 3710 adds r7, #16
8013a16: 46bd mov sp, r7
8013a18: bd80 pop {r7, pc}
8013a1a: bf00 nop
8013a1c: 2000f80c .word 0x2000f80c
8013a20: 2000f800 .word 0x2000f800
08013a24 <tcp_handle_closepend>:
* now send the FIN (which failed before), the pcb might be in a state that is
* OK for us to now free it.
*/
static void
tcp_handle_closepend(void)
{
8013a24: b580 push {r7, lr}
8013a26: b082 sub sp, #8
8013a28: af00 add r7, sp, #0
struct tcp_pcb *pcb = tcp_active_pcbs;
8013a2a: 4b10 ldr r3, [pc, #64] ; (8013a6c <tcp_handle_closepend+0x48>)
8013a2c: 681b ldr r3, [r3, #0]
8013a2e: 607b str r3, [r7, #4]
while (pcb != NULL) {
8013a30: e014 b.n 8013a5c <tcp_handle_closepend+0x38>
struct tcp_pcb *next = pcb->next;
8013a32: 687b ldr r3, [r7, #4]
8013a34: 68db ldr r3, [r3, #12]
8013a36: 603b str r3, [r7, #0]
/* send pending FIN */
if (pcb->flags & TF_CLOSEPEND) {
8013a38: 687b ldr r3, [r7, #4]
8013a3a: 8b5b ldrh r3, [r3, #26]
8013a3c: f003 0308 and.w r3, r3, #8
8013a40: 2b00 cmp r3, #0
8013a42: d009 beq.n 8013a58 <tcp_handle_closepend+0x34>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n"));
tcp_clear_flags(pcb, TF_CLOSEPEND);
8013a44: 687b ldr r3, [r7, #4]
8013a46: 8b5b ldrh r3, [r3, #26]
8013a48: f023 0308 bic.w r3, r3, #8
8013a4c: b29a uxth r2, r3
8013a4e: 687b ldr r3, [r7, #4]
8013a50: 835a strh r2, [r3, #26]
tcp_close_shutdown_fin(pcb);
8013a52: 6878 ldr r0, [r7, #4]
8013a54: f7ff f86c bl 8012b30 <tcp_close_shutdown_fin>
}
pcb = next;
8013a58: 683b ldr r3, [r7, #0]
8013a5a: 607b str r3, [r7, #4]
while (pcb != NULL) {
8013a5c: 687b ldr r3, [r7, #4]
8013a5e: 2b00 cmp r3, #0
8013a60: d1e7 bne.n 8013a32 <tcp_handle_closepend+0xe>
}
}
8013a62: bf00 nop
8013a64: 3708 adds r7, #8
8013a66: 46bd mov sp, r7
8013a68: bd80 pop {r7, pc}
8013a6a: bf00 nop
8013a6c: 2000f7fc .word 0x2000f7fc
08013a70 <tcp_alloc>:
* @param prio priority for the new pcb
* @return a new tcp_pcb that initially is in state CLOSED
*/
struct tcp_pcb *
tcp_alloc(u8_t prio)
{
8013a70: b580 push {r7, lr}
8013a72: b084 sub sp, #16
8013a74: af00 add r7, sp, #0
8013a76: 4603 mov r3, r0
8013a78: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb;
LWIP_ASSERT_CORE_LOCKED();
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8013a7a: 2001 movs r0, #1
8013a7c: f7fd fd0e bl 801149c <memp_malloc>
8013a80: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8013a82: 68fb ldr r3, [r7, #12]
8013a84: 2b00 cmp r3, #0
8013a86: d126 bne.n 8013ad6 <tcp_alloc+0x66>
/* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */
tcp_handle_closepend();
8013a88: f7ff ffcc bl 8013a24 <tcp_handle_closepend>
/* Try killing oldest connection in TIME-WAIT. */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n"));
tcp_kill_timewait();
8013a8c: f7ff ff9a bl 80139c4 <tcp_kill_timewait>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8013a90: 2001 movs r0, #1
8013a92: f7fd fd03 bl 801149c <memp_malloc>
8013a96: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8013a98: 68fb ldr r3, [r7, #12]
8013a9a: 2b00 cmp r3, #0
8013a9c: d11b bne.n 8013ad6 <tcp_alloc+0x66>
/* Try killing oldest connection in LAST-ACK (these wouldn't go to TIME-WAIT). */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest LAST-ACK connection\n"));
tcp_kill_state(LAST_ACK);
8013a9e: 2009 movs r0, #9
8013aa0: f7ff ff46 bl 8013930 <tcp_kill_state>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8013aa4: 2001 movs r0, #1
8013aa6: f7fd fcf9 bl 801149c <memp_malloc>
8013aaa: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8013aac: 68fb ldr r3, [r7, #12]
8013aae: 2b00 cmp r3, #0
8013ab0: d111 bne.n 8013ad6 <tcp_alloc+0x66>
/* Try killing oldest connection in CLOSING. */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n"));
tcp_kill_state(CLOSING);
8013ab2: 2008 movs r0, #8
8013ab4: f7ff ff3c bl 8013930 <tcp_kill_state>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8013ab8: 2001 movs r0, #1
8013aba: f7fd fcef bl 801149c <memp_malloc>
8013abe: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8013ac0: 68fb ldr r3, [r7, #12]
8013ac2: 2b00 cmp r3, #0
8013ac4: d107 bne.n 8013ad6 <tcp_alloc+0x66>
/* Try killing oldest active connection with lower priority than the new one. */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing oldest connection with prio lower than %d\n", prio));
tcp_kill_prio(prio);
8013ac6: 79fb ldrb r3, [r7, #7]
8013ac8: 4618 mov r0, r3
8013aca: f7ff fee3 bl 8013894 <tcp_kill_prio>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8013ace: 2001 movs r0, #1
8013ad0: f7fd fce4 bl 801149c <memp_malloc>
8013ad4: 60f8 str r0, [r7, #12]
if (pcb != NULL) {
/* adjust err stats: memp_malloc failed above */
MEMP_STATS_DEC(err, MEMP_TCP_PCB);
}
}
if (pcb != NULL) {
8013ad6: 68fb ldr r3, [r7, #12]
8013ad8: 2b00 cmp r3, #0
8013ada: d03f beq.n 8013b5c <tcp_alloc+0xec>
/* zero out the whole pcb, so there is no need to initialize members to zero */
memset(pcb, 0, sizeof(struct tcp_pcb));
8013adc: 229c movs r2, #156 ; 0x9c
8013ade: 2100 movs r1, #0
8013ae0: 68f8 ldr r0, [r7, #12]
8013ae2: f009 f900 bl 801cce6 <memset>
pcb->prio = prio;
8013ae6: 68fb ldr r3, [r7, #12]
8013ae8: 79fa ldrb r2, [r7, #7]
8013aea: 755a strb r2, [r3, #21]
pcb->snd_buf = TCP_SND_BUF;
8013aec: 68fb ldr r3, [r7, #12]
8013aee: f44f 6286 mov.w r2, #1072 ; 0x430
8013af2: f8a3 2064 strh.w r2, [r3, #100] ; 0x64
/* Start with a window that does not need scaling. When window scaling is
enabled and used, the window is enlarged when both sides agree on scaling. */
pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND);
8013af6: 68fb ldr r3, [r7, #12]
8013af8: f44f 6206 mov.w r2, #2144 ; 0x860
8013afc: 855a strh r2, [r3, #42] ; 0x2a
8013afe: 68fb ldr r3, [r7, #12]
8013b00: 8d5a ldrh r2, [r3, #42] ; 0x2a
8013b02: 68fb ldr r3, [r7, #12]
8013b04: 851a strh r2, [r3, #40] ; 0x28
pcb->ttl = TCP_TTL;
8013b06: 68fb ldr r3, [r7, #12]
8013b08: 22ff movs r2, #255 ; 0xff
8013b0a: 72da strb r2, [r3, #11]
/* As initial send MSS, we use TCP_MSS but limit it to 536.
The send MSS is updated when an MSS option is received. */
pcb->mss = INITIAL_MSS;
8013b0c: 68fb ldr r3, [r7, #12]
8013b0e: f44f 7206 mov.w r2, #536 ; 0x218
8013b12: 865a strh r2, [r3, #50] ; 0x32
pcb->rto = 3000 / TCP_SLOW_INTERVAL;
8013b14: 68fb ldr r3, [r7, #12]
8013b16: 2206 movs r2, #6
8013b18: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
pcb->sv = 3000 / TCP_SLOW_INTERVAL;
8013b1c: 68fb ldr r3, [r7, #12]
8013b1e: 2206 movs r2, #6
8013b20: 87da strh r2, [r3, #62] ; 0x3e
pcb->rtime = -1;
8013b22: 68fb ldr r3, [r7, #12]
8013b24: f64f 72ff movw r2, #65535 ; 0xffff
8013b28: 861a strh r2, [r3, #48] ; 0x30
pcb->cwnd = 1;
8013b2a: 68fb ldr r3, [r7, #12]
8013b2c: 2201 movs r2, #1
8013b2e: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->tmr = tcp_ticks;
8013b32: 4b0d ldr r3, [pc, #52] ; (8013b68 <tcp_alloc+0xf8>)
8013b34: 681a ldr r2, [r3, #0]
8013b36: 68fb ldr r3, [r7, #12]
8013b38: 621a str r2, [r3, #32]
pcb->last_timer = tcp_timer_ctr;
8013b3a: 4b0c ldr r3, [pc, #48] ; (8013b6c <tcp_alloc+0xfc>)
8013b3c: 781a ldrb r2, [r3, #0]
8013b3e: 68fb ldr r3, [r7, #12]
8013b40: 779a strb r2, [r3, #30]
of using the largest advertised receive window. We've seen complications with
receiving TCPs that use window scaling and/or window auto-tuning where the
initial advertised window is very small and then grows rapidly once the
connection is established. To avoid these complications, we set ssthresh to the
largest effective cwnd (amount of in-flight data) that the sender can have. */
pcb->ssthresh = TCP_SND_BUF;
8013b42: 68fb ldr r3, [r7, #12]
8013b44: f44f 6286 mov.w r2, #1072 ; 0x430
8013b48: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
#if LWIP_CALLBACK_API
pcb->recv = tcp_recv_null;
8013b4c: 68fb ldr r3, [r7, #12]
8013b4e: 4a08 ldr r2, [pc, #32] ; (8013b70 <tcp_alloc+0x100>)
8013b50: f8c3 2084 str.w r2, [r3, #132] ; 0x84
#endif /* LWIP_CALLBACK_API */
/* Init KEEPALIVE timer */
pcb->keep_idle = TCP_KEEPIDLE_DEFAULT;
8013b54: 68fb ldr r3, [r7, #12]
8013b56: 4a07 ldr r2, [pc, #28] ; (8013b74 <tcp_alloc+0x104>)
8013b58: f8c3 2094 str.w r2, [r3, #148] ; 0x94
#if LWIP_TCP_KEEPALIVE
pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT;
pcb->keep_cnt = TCP_KEEPCNT_DEFAULT;
#endif /* LWIP_TCP_KEEPALIVE */
}
return pcb;
8013b5c: 68fb ldr r3, [r7, #12]
}
8013b5e: 4618 mov r0, r3
8013b60: 3710 adds r7, #16
8013b62: 46bd mov sp, r7
8013b64: bd80 pop {r7, pc}
8013b66: bf00 nop
8013b68: 2000f800 .word 0x2000f800
8013b6c: 2000872a .word 0x2000872a
8013b70: 08013829 .word 0x08013829
8013b74: 006ddd00 .word 0x006ddd00
08013b78 <tcp_pcb_purge>:
*
* @param pcb tcp_pcb to purge. The pcb itself is not deallocated!
*/
void
tcp_pcb_purge(struct tcp_pcb *pcb)
{
8013b78: b580 push {r7, lr}
8013b7a: b082 sub sp, #8
8013b7c: af00 add r7, sp, #0
8013b7e: 6078 str r0, [r7, #4]
LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
8013b80: 687b ldr r3, [r7, #4]
8013b82: 2b00 cmp r3, #0
8013b84: d107 bne.n 8013b96 <tcp_pcb_purge+0x1e>
8013b86: 4b21 ldr r3, [pc, #132] ; (8013c0c <tcp_pcb_purge+0x94>)
8013b88: f640 0251 movw r2, #2129 ; 0x851
8013b8c: 4920 ldr r1, [pc, #128] ; (8013c10 <tcp_pcb_purge+0x98>)
8013b8e: 4821 ldr r0, [pc, #132] ; (8013c14 <tcp_pcb_purge+0x9c>)
8013b90: f009 f8b2 bl 801ccf8 <iprintf>
8013b94: e037 b.n 8013c06 <tcp_pcb_purge+0x8e>
if (pcb->state != CLOSED &&
8013b96: 687b ldr r3, [r7, #4]
8013b98: 7d1b ldrb r3, [r3, #20]
8013b9a: 2b00 cmp r3, #0
8013b9c: d033 beq.n 8013c06 <tcp_pcb_purge+0x8e>
pcb->state != TIME_WAIT &&
8013b9e: 687b ldr r3, [r7, #4]
8013ba0: 7d1b ldrb r3, [r3, #20]
if (pcb->state != CLOSED &&
8013ba2: 2b0a cmp r3, #10
8013ba4: d02f beq.n 8013c06 <tcp_pcb_purge+0x8e>
pcb->state != LISTEN) {
8013ba6: 687b ldr r3, [r7, #4]
8013ba8: 7d1b ldrb r3, [r3, #20]
pcb->state != TIME_WAIT &&
8013baa: 2b01 cmp r3, #1
8013bac: d02b beq.n 8013c06 <tcp_pcb_purge+0x8e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n"));
tcp_backlog_accepted(pcb);
if (pcb->refused_data != NULL) {
8013bae: 687b ldr r3, [r7, #4]
8013bb0: 6f9b ldr r3, [r3, #120] ; 0x78
8013bb2: 2b00 cmp r3, #0
8013bb4: d007 beq.n 8013bc6 <tcp_pcb_purge+0x4e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n"));
pbuf_free(pcb->refused_data);
8013bb6: 687b ldr r3, [r7, #4]
8013bb8: 6f9b ldr r3, [r3, #120] ; 0x78
8013bba: 4618 mov r0, r3
8013bbc: f7fe fb6c bl 8012298 <pbuf_free>
pcb->refused_data = NULL;
8013bc0: 687b ldr r3, [r7, #4]
8013bc2: 2200 movs r2, #0
8013bc4: 679a str r2, [r3, #120] ; 0x78
}
if (pcb->unacked != NULL) {
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->unacked\n"));
}
#if TCP_QUEUE_OOSEQ
if (pcb->ooseq != NULL) {
8013bc6: 687b ldr r3, [r7, #4]
8013bc8: 6f5b ldr r3, [r3, #116] ; 0x74
8013bca: 2b00 cmp r3, #0
8013bcc: d002 beq.n 8013bd4 <tcp_pcb_purge+0x5c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n"));
tcp_free_ooseq(pcb);
8013bce: 6878 ldr r0, [r7, #4]
8013bd0: f000 f986 bl 8013ee0 <tcp_free_ooseq>
}
#endif /* TCP_QUEUE_OOSEQ */
/* Stop the retransmission timer as it will expect data on unacked
queue if it fires */
pcb->rtime = -1;
8013bd4: 687b ldr r3, [r7, #4]
8013bd6: f64f 72ff movw r2, #65535 ; 0xffff
8013bda: 861a strh r2, [r3, #48] ; 0x30
tcp_segs_free(pcb->unsent);
8013bdc: 687b ldr r3, [r7, #4]
8013bde: 6edb ldr r3, [r3, #108] ; 0x6c
8013be0: 4618 mov r0, r3
8013be2: f7ff fdc9 bl 8013778 <tcp_segs_free>
tcp_segs_free(pcb->unacked);
8013be6: 687b ldr r3, [r7, #4]
8013be8: 6f1b ldr r3, [r3, #112] ; 0x70
8013bea: 4618 mov r0, r3
8013bec: f7ff fdc4 bl 8013778 <tcp_segs_free>
pcb->unacked = pcb->unsent = NULL;
8013bf0: 687b ldr r3, [r7, #4]
8013bf2: 2200 movs r2, #0
8013bf4: 66da str r2, [r3, #108] ; 0x6c
8013bf6: 687b ldr r3, [r7, #4]
8013bf8: 6eda ldr r2, [r3, #108] ; 0x6c
8013bfa: 687b ldr r3, [r7, #4]
8013bfc: 671a str r2, [r3, #112] ; 0x70
#if TCP_OVERSIZE
pcb->unsent_oversize = 0;
8013bfe: 687b ldr r3, [r7, #4]
8013c00: 2200 movs r2, #0
8013c02: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
#endif /* TCP_OVERSIZE */
}
}
8013c06: 3708 adds r7, #8
8013c08: 46bd mov sp, r7
8013c0a: bd80 pop {r7, pc}
8013c0c: 0801eb88 .word 0x0801eb88
8013c10: 0801f1d4 .word 0x0801f1d4
8013c14: 0801ebcc .word 0x0801ebcc
08013c18 <tcp_pcb_remove>:
* @param pcblist PCB list to purge.
* @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated!
*/
void
tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb)
{
8013c18: b580 push {r7, lr}
8013c1a: b084 sub sp, #16
8013c1c: af00 add r7, sp, #0
8013c1e: 6078 str r0, [r7, #4]
8013c20: 6039 str r1, [r7, #0]
LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
8013c22: 683b ldr r3, [r7, #0]
8013c24: 2b00 cmp r3, #0
8013c26: d106 bne.n 8013c36 <tcp_pcb_remove+0x1e>
8013c28: 4b3e ldr r3, [pc, #248] ; (8013d24 <tcp_pcb_remove+0x10c>)
8013c2a: f640 0283 movw r2, #2179 ; 0x883
8013c2e: 493e ldr r1, [pc, #248] ; (8013d28 <tcp_pcb_remove+0x110>)
8013c30: 483e ldr r0, [pc, #248] ; (8013d2c <tcp_pcb_remove+0x114>)
8013c32: f009 f861 bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
8013c36: 687b ldr r3, [r7, #4]
8013c38: 2b00 cmp r3, #0
8013c3a: d106 bne.n 8013c4a <tcp_pcb_remove+0x32>
8013c3c: 4b39 ldr r3, [pc, #228] ; (8013d24 <tcp_pcb_remove+0x10c>)
8013c3e: f640 0284 movw r2, #2180 ; 0x884
8013c42: 493b ldr r1, [pc, #236] ; (8013d30 <tcp_pcb_remove+0x118>)
8013c44: 4839 ldr r0, [pc, #228] ; (8013d2c <tcp_pcb_remove+0x114>)
8013c46: f009 f857 bl 801ccf8 <iprintf>
TCP_RMV(pcblist, pcb);
8013c4a: 687b ldr r3, [r7, #4]
8013c4c: 681b ldr r3, [r3, #0]
8013c4e: 683a ldr r2, [r7, #0]
8013c50: 429a cmp r2, r3
8013c52: d105 bne.n 8013c60 <tcp_pcb_remove+0x48>
8013c54: 687b ldr r3, [r7, #4]
8013c56: 681b ldr r3, [r3, #0]
8013c58: 68da ldr r2, [r3, #12]
8013c5a: 687b ldr r3, [r7, #4]
8013c5c: 601a str r2, [r3, #0]
8013c5e: e013 b.n 8013c88 <tcp_pcb_remove+0x70>
8013c60: 687b ldr r3, [r7, #4]
8013c62: 681b ldr r3, [r3, #0]
8013c64: 60fb str r3, [r7, #12]
8013c66: e00c b.n 8013c82 <tcp_pcb_remove+0x6a>
8013c68: 68fb ldr r3, [r7, #12]
8013c6a: 68db ldr r3, [r3, #12]
8013c6c: 683a ldr r2, [r7, #0]
8013c6e: 429a cmp r2, r3
8013c70: d104 bne.n 8013c7c <tcp_pcb_remove+0x64>
8013c72: 683b ldr r3, [r7, #0]
8013c74: 68da ldr r2, [r3, #12]
8013c76: 68fb ldr r3, [r7, #12]
8013c78: 60da str r2, [r3, #12]
8013c7a: e005 b.n 8013c88 <tcp_pcb_remove+0x70>
8013c7c: 68fb ldr r3, [r7, #12]
8013c7e: 68db ldr r3, [r3, #12]
8013c80: 60fb str r3, [r7, #12]
8013c82: 68fb ldr r3, [r7, #12]
8013c84: 2b00 cmp r3, #0
8013c86: d1ef bne.n 8013c68 <tcp_pcb_remove+0x50>
8013c88: 683b ldr r3, [r7, #0]
8013c8a: 2200 movs r2, #0
8013c8c: 60da str r2, [r3, #12]
tcp_pcb_purge(pcb);
8013c8e: 6838 ldr r0, [r7, #0]
8013c90: f7ff ff72 bl 8013b78 <tcp_pcb_purge>
/* if there is an outstanding delayed ACKs, send it */
if ((pcb->state != TIME_WAIT) &&
8013c94: 683b ldr r3, [r7, #0]
8013c96: 7d1b ldrb r3, [r3, #20]
8013c98: 2b0a cmp r3, #10
8013c9a: d013 beq.n 8013cc4 <tcp_pcb_remove+0xac>
(pcb->state != LISTEN) &&
8013c9c: 683b ldr r3, [r7, #0]
8013c9e: 7d1b ldrb r3, [r3, #20]
if ((pcb->state != TIME_WAIT) &&
8013ca0: 2b01 cmp r3, #1
8013ca2: d00f beq.n 8013cc4 <tcp_pcb_remove+0xac>
(pcb->flags & TF_ACK_DELAY)) {
8013ca4: 683b ldr r3, [r7, #0]
8013ca6: 8b5b ldrh r3, [r3, #26]
8013ca8: f003 0301 and.w r3, r3, #1
(pcb->state != LISTEN) &&
8013cac: 2b00 cmp r3, #0
8013cae: d009 beq.n 8013cc4 <tcp_pcb_remove+0xac>
tcp_ack_now(pcb);
8013cb0: 683b ldr r3, [r7, #0]
8013cb2: 8b5b ldrh r3, [r3, #26]
8013cb4: f043 0302 orr.w r3, r3, #2
8013cb8: b29a uxth r2, r3
8013cba: 683b ldr r3, [r7, #0]
8013cbc: 835a strh r2, [r3, #26]
tcp_output(pcb);
8013cbe: 6838 ldr r0, [r7, #0]
8013cc0: f002 ff68 bl 8016b94 <tcp_output>
}
if (pcb->state != LISTEN) {
8013cc4: 683b ldr r3, [r7, #0]
8013cc6: 7d1b ldrb r3, [r3, #20]
8013cc8: 2b01 cmp r3, #1
8013cca: d020 beq.n 8013d0e <tcp_pcb_remove+0xf6>
LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL);
8013ccc: 683b ldr r3, [r7, #0]
8013cce: 6edb ldr r3, [r3, #108] ; 0x6c
8013cd0: 2b00 cmp r3, #0
8013cd2: d006 beq.n 8013ce2 <tcp_pcb_remove+0xca>
8013cd4: 4b13 ldr r3, [pc, #76] ; (8013d24 <tcp_pcb_remove+0x10c>)
8013cd6: f640 0293 movw r2, #2195 ; 0x893
8013cda: 4916 ldr r1, [pc, #88] ; (8013d34 <tcp_pcb_remove+0x11c>)
8013cdc: 4813 ldr r0, [pc, #76] ; (8013d2c <tcp_pcb_remove+0x114>)
8013cde: f009 f80b bl 801ccf8 <iprintf>
LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL);
8013ce2: 683b ldr r3, [r7, #0]
8013ce4: 6f1b ldr r3, [r3, #112] ; 0x70
8013ce6: 2b00 cmp r3, #0
8013ce8: d006 beq.n 8013cf8 <tcp_pcb_remove+0xe0>
8013cea: 4b0e ldr r3, [pc, #56] ; (8013d24 <tcp_pcb_remove+0x10c>)
8013cec: f640 0294 movw r2, #2196 ; 0x894
8013cf0: 4911 ldr r1, [pc, #68] ; (8013d38 <tcp_pcb_remove+0x120>)
8013cf2: 480e ldr r0, [pc, #56] ; (8013d2c <tcp_pcb_remove+0x114>)
8013cf4: f009 f800 bl 801ccf8 <iprintf>
#if TCP_QUEUE_OOSEQ
LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL);
8013cf8: 683b ldr r3, [r7, #0]
8013cfa: 6f5b ldr r3, [r3, #116] ; 0x74
8013cfc: 2b00 cmp r3, #0
8013cfe: d006 beq.n 8013d0e <tcp_pcb_remove+0xf6>
8013d00: 4b08 ldr r3, [pc, #32] ; (8013d24 <tcp_pcb_remove+0x10c>)
8013d02: f640 0296 movw r2, #2198 ; 0x896
8013d06: 490d ldr r1, [pc, #52] ; (8013d3c <tcp_pcb_remove+0x124>)
8013d08: 4808 ldr r0, [pc, #32] ; (8013d2c <tcp_pcb_remove+0x114>)
8013d0a: f008 fff5 bl 801ccf8 <iprintf>
#endif /* TCP_QUEUE_OOSEQ */
}
pcb->state = CLOSED;
8013d0e: 683b ldr r3, [r7, #0]
8013d10: 2200 movs r2, #0
8013d12: 751a strb r2, [r3, #20]
/* reset the local port to prevent the pcb from being 'bound' */
pcb->local_port = 0;
8013d14: 683b ldr r3, [r7, #0]
8013d16: 2200 movs r2, #0
8013d18: 82da strh r2, [r3, #22]
LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane());
}
8013d1a: bf00 nop
8013d1c: 3710 adds r7, #16
8013d1e: 46bd mov sp, r7
8013d20: bd80 pop {r7, pc}
8013d22: bf00 nop
8013d24: 0801eb88 .word 0x0801eb88
8013d28: 0801f1f0 .word 0x0801f1f0
8013d2c: 0801ebcc .word 0x0801ebcc
8013d30: 0801f20c .word 0x0801f20c
8013d34: 0801f22c .word 0x0801f22c
8013d38: 0801f244 .word 0x0801f244
8013d3c: 0801f260 .word 0x0801f260
08013d40 <tcp_next_iss>:
*
* @return u32_t pseudo random sequence number
*/
u32_t
tcp_next_iss(struct tcp_pcb *pcb)
{
8013d40: b580 push {r7, lr}
8013d42: b082 sub sp, #8
8013d44: af00 add r7, sp, #0
8013d46: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
return LWIP_HOOK_TCP_ISN(&pcb->local_ip, pcb->local_port, &pcb->remote_ip, pcb->remote_port);
#else /* LWIP_HOOK_TCP_ISN */
static u32_t iss = 6510;
LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
8013d48: 687b ldr r3, [r7, #4]
8013d4a: 2b00 cmp r3, #0
8013d4c: d106 bne.n 8013d5c <tcp_next_iss+0x1c>
8013d4e: 4b0a ldr r3, [pc, #40] ; (8013d78 <tcp_next_iss+0x38>)
8013d50: f640 02af movw r2, #2223 ; 0x8af
8013d54: 4909 ldr r1, [pc, #36] ; (8013d7c <tcp_next_iss+0x3c>)
8013d56: 480a ldr r0, [pc, #40] ; (8013d80 <tcp_next_iss+0x40>)
8013d58: f008 ffce bl 801ccf8 <iprintf>
LWIP_UNUSED_ARG(pcb);
iss += tcp_ticks; /* XXX */
8013d5c: 4b09 ldr r3, [pc, #36] ; (8013d84 <tcp_next_iss+0x44>)
8013d5e: 681a ldr r2, [r3, #0]
8013d60: 4b09 ldr r3, [pc, #36] ; (8013d88 <tcp_next_iss+0x48>)
8013d62: 681b ldr r3, [r3, #0]
8013d64: 4413 add r3, r2
8013d66: 4a07 ldr r2, [pc, #28] ; (8013d84 <tcp_next_iss+0x44>)
8013d68: 6013 str r3, [r2, #0]
return iss;
8013d6a: 4b06 ldr r3, [pc, #24] ; (8013d84 <tcp_next_iss+0x44>)
8013d6c: 681b ldr r3, [r3, #0]
#endif /* LWIP_HOOK_TCP_ISN */
}
8013d6e: 4618 mov r0, r3
8013d70: 3708 adds r7, #8
8013d72: 46bd mov sp, r7
8013d74: bd80 pop {r7, pc}
8013d76: bf00 nop
8013d78: 0801eb88 .word 0x0801eb88
8013d7c: 0801f278 .word 0x0801f278
8013d80: 0801ebcc .word 0x0801ebcc
8013d84: 20000078 .word 0x20000078
8013d88: 2000f800 .word 0x2000f800
08013d8c <tcp_eff_send_mss_netif>:
* by calculating the minimum of TCP_MSS and the mtu (if set) of the target
* netif (if not NULL).
*/
u16_t
tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest)
{
8013d8c: b580 push {r7, lr}
8013d8e: b086 sub sp, #24
8013d90: af00 add r7, sp, #0
8013d92: 4603 mov r3, r0
8013d94: 60b9 str r1, [r7, #8]
8013d96: 607a str r2, [r7, #4]
8013d98: 81fb strh r3, [r7, #14]
u16_t mss_s;
u16_t mtu;
LWIP_UNUSED_ARG(dest); /* in case IPv6 is disabled */
LWIP_ASSERT("tcp_eff_send_mss_netif: invalid dst_ip", dest != NULL);
8013d9a: 687b ldr r3, [r7, #4]
8013d9c: 2b00 cmp r3, #0
8013d9e: d106 bne.n 8013dae <tcp_eff_send_mss_netif+0x22>
8013da0: 4b14 ldr r3, [pc, #80] ; (8013df4 <tcp_eff_send_mss_netif+0x68>)
8013da2: f640 02c5 movw r2, #2245 ; 0x8c5
8013da6: 4914 ldr r1, [pc, #80] ; (8013df8 <tcp_eff_send_mss_netif+0x6c>)
8013da8: 4814 ldr r0, [pc, #80] ; (8013dfc <tcp_eff_send_mss_netif+0x70>)
8013daa: f008 ffa5 bl 801ccf8 <iprintf>
else
#endif /* LWIP_IPV4 */
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
{
if (outif == NULL) {
8013dae: 68bb ldr r3, [r7, #8]
8013db0: 2b00 cmp r3, #0
8013db2: d101 bne.n 8013db8 <tcp_eff_send_mss_netif+0x2c>
return sendmss;
8013db4: 89fb ldrh r3, [r7, #14]
8013db6: e019 b.n 8013dec <tcp_eff_send_mss_netif+0x60>
}
mtu = outif->mtu;
8013db8: 68bb ldr r3, [r7, #8]
8013dba: 8d1b ldrh r3, [r3, #40] ; 0x28
8013dbc: 82fb strh r3, [r7, #22]
}
#endif /* LWIP_IPV4 */
if (mtu != 0) {
8013dbe: 8afb ldrh r3, [r7, #22]
8013dc0: 2b00 cmp r3, #0
8013dc2: d012 beq.n 8013dea <tcp_eff_send_mss_netif+0x5e>
else
#endif /* LWIP_IPV4 */
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
{
offset = IP_HLEN + TCP_HLEN;
8013dc4: 2328 movs r3, #40 ; 0x28
8013dc6: 82bb strh r3, [r7, #20]
}
#endif /* LWIP_IPV4 */
mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
8013dc8: 8afa ldrh r2, [r7, #22]
8013dca: 8abb ldrh r3, [r7, #20]
8013dcc: 429a cmp r2, r3
8013dce: d904 bls.n 8013dda <tcp_eff_send_mss_netif+0x4e>
8013dd0: 8afa ldrh r2, [r7, #22]
8013dd2: 8abb ldrh r3, [r7, #20]
8013dd4: 1ad3 subs r3, r2, r3
8013dd6: b29b uxth r3, r3
8013dd8: e000 b.n 8013ddc <tcp_eff_send_mss_netif+0x50>
8013dda: 2300 movs r3, #0
8013ddc: 827b strh r3, [r7, #18]
/* RFC 1122, chap 4.2.2.6:
* Eff.snd.MSS = min(SendMSS+20, MMS_S) - TCPhdrsize - IPoptionsize
* We correct for TCP options in tcp_write(), and don't support IP options.
*/
sendmss = LWIP_MIN(sendmss, mss_s);
8013dde: 8a7a ldrh r2, [r7, #18]
8013de0: 89fb ldrh r3, [r7, #14]
8013de2: 4293 cmp r3, r2
8013de4: bf28 it cs
8013de6: 4613 movcs r3, r2
8013de8: 81fb strh r3, [r7, #14]
}
return sendmss;
8013dea: 89fb ldrh r3, [r7, #14]
}
8013dec: 4618 mov r0, r3
8013dee: 3718 adds r7, #24
8013df0: 46bd mov sp, r7
8013df2: bd80 pop {r7, pc}
8013df4: 0801eb88 .word 0x0801eb88
8013df8: 0801f294 .word 0x0801f294
8013dfc: 0801ebcc .word 0x0801ebcc
08013e00 <tcp_netif_ip_addr_changed_pcblist>:
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
/** Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list */
static void
tcp_netif_ip_addr_changed_pcblist(const ip_addr_t *old_addr, struct tcp_pcb *pcb_list)
{
8013e00: b580 push {r7, lr}
8013e02: b084 sub sp, #16
8013e04: af00 add r7, sp, #0
8013e06: 6078 str r0, [r7, #4]
8013e08: 6039 str r1, [r7, #0]
struct tcp_pcb *pcb;
pcb = pcb_list;
8013e0a: 683b ldr r3, [r7, #0]
8013e0c: 60fb str r3, [r7, #12]
LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL);
8013e0e: 687b ldr r3, [r7, #4]
8013e10: 2b00 cmp r3, #0
8013e12: d119 bne.n 8013e48 <tcp_netif_ip_addr_changed_pcblist+0x48>
8013e14: 4b10 ldr r3, [pc, #64] ; (8013e58 <tcp_netif_ip_addr_changed_pcblist+0x58>)
8013e16: f44f 6210 mov.w r2, #2304 ; 0x900
8013e1a: 4910 ldr r1, [pc, #64] ; (8013e5c <tcp_netif_ip_addr_changed_pcblist+0x5c>)
8013e1c: 4810 ldr r0, [pc, #64] ; (8013e60 <tcp_netif_ip_addr_changed_pcblist+0x60>)
8013e1e: f008 ff6b bl 801ccf8 <iprintf>
while (pcb != NULL) {
8013e22: e011 b.n 8013e48 <tcp_netif_ip_addr_changed_pcblist+0x48>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&pcb->local_ip, old_addr)
8013e24: 68fb ldr r3, [r7, #12]
8013e26: 681a ldr r2, [r3, #0]
8013e28: 687b ldr r3, [r7, #4]
8013e2a: 681b ldr r3, [r3, #0]
8013e2c: 429a cmp r2, r3
8013e2e: d108 bne.n 8013e42 <tcp_netif_ip_addr_changed_pcblist+0x42>
/* connections to link-local addresses must persist (RFC3927 ch. 1.9) */
&& (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip)))
#endif /* LWIP_AUTOIP */
) {
/* this connection must be aborted */
struct tcp_pcb *next = pcb->next;
8013e30: 68fb ldr r3, [r7, #12]
8013e32: 68db ldr r3, [r3, #12]
8013e34: 60bb str r3, [r7, #8]
LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb));
tcp_abort(pcb);
8013e36: 68f8 ldr r0, [r7, #12]
8013e38: f7fe ffca bl 8012dd0 <tcp_abort>
pcb = next;
8013e3c: 68bb ldr r3, [r7, #8]
8013e3e: 60fb str r3, [r7, #12]
8013e40: e002 b.n 8013e48 <tcp_netif_ip_addr_changed_pcblist+0x48>
} else {
pcb = pcb->next;
8013e42: 68fb ldr r3, [r7, #12]
8013e44: 68db ldr r3, [r3, #12]
8013e46: 60fb str r3, [r7, #12]
while (pcb != NULL) {
8013e48: 68fb ldr r3, [r7, #12]
8013e4a: 2b00 cmp r3, #0
8013e4c: d1ea bne.n 8013e24 <tcp_netif_ip_addr_changed_pcblist+0x24>
}
}
}
8013e4e: bf00 nop
8013e50: 3710 adds r7, #16
8013e52: 46bd mov sp, r7
8013e54: bd80 pop {r7, pc}
8013e56: bf00 nop
8013e58: 0801eb88 .word 0x0801eb88
8013e5c: 0801f2bc .word 0x0801f2bc
8013e60: 0801ebcc .word 0x0801ebcc
08013e64 <tcp_netif_ip_addr_changed>:
* @param old_addr IP address of the netif before change
* @param new_addr IP address of the netif after change or NULL if netif has been removed
*/
void
tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
{
8013e64: b580 push {r7, lr}
8013e66: b084 sub sp, #16
8013e68: af00 add r7, sp, #0
8013e6a: 6078 str r0, [r7, #4]
8013e6c: 6039 str r1, [r7, #0]
struct tcp_pcb_listen *lpcb;
if (!ip_addr_isany(old_addr)) {
8013e6e: 687b ldr r3, [r7, #4]
8013e70: 2b00 cmp r3, #0
8013e72: d02a beq.n 8013eca <tcp_netif_ip_addr_changed+0x66>
8013e74: 687b ldr r3, [r7, #4]
8013e76: 681b ldr r3, [r3, #0]
8013e78: 2b00 cmp r3, #0
8013e7a: d026 beq.n 8013eca <tcp_netif_ip_addr_changed+0x66>
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs);
8013e7c: 4b15 ldr r3, [pc, #84] ; (8013ed4 <tcp_netif_ip_addr_changed+0x70>)
8013e7e: 681b ldr r3, [r3, #0]
8013e80: 4619 mov r1, r3
8013e82: 6878 ldr r0, [r7, #4]
8013e84: f7ff ffbc bl 8013e00 <tcp_netif_ip_addr_changed_pcblist>
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs);
8013e88: 4b13 ldr r3, [pc, #76] ; (8013ed8 <tcp_netif_ip_addr_changed+0x74>)
8013e8a: 681b ldr r3, [r3, #0]
8013e8c: 4619 mov r1, r3
8013e8e: 6878 ldr r0, [r7, #4]
8013e90: f7ff ffb6 bl 8013e00 <tcp_netif_ip_addr_changed_pcblist>
if (!ip_addr_isany(new_addr)) {
8013e94: 683b ldr r3, [r7, #0]
8013e96: 2b00 cmp r3, #0
8013e98: d017 beq.n 8013eca <tcp_netif_ip_addr_changed+0x66>
8013e9a: 683b ldr r3, [r7, #0]
8013e9c: 681b ldr r3, [r3, #0]
8013e9e: 2b00 cmp r3, #0
8013ea0: d013 beq.n 8013eca <tcp_netif_ip_addr_changed+0x66>
/* PCB bound to current local interface address? */
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
8013ea2: 4b0e ldr r3, [pc, #56] ; (8013edc <tcp_netif_ip_addr_changed+0x78>)
8013ea4: 681b ldr r3, [r3, #0]
8013ea6: 60fb str r3, [r7, #12]
8013ea8: e00c b.n 8013ec4 <tcp_netif_ip_addr_changed+0x60>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&lpcb->local_ip, old_addr)) {
8013eaa: 68fb ldr r3, [r7, #12]
8013eac: 681a ldr r2, [r3, #0]
8013eae: 687b ldr r3, [r7, #4]
8013eb0: 681b ldr r3, [r3, #0]
8013eb2: 429a cmp r2, r3
8013eb4: d103 bne.n 8013ebe <tcp_netif_ip_addr_changed+0x5a>
/* The PCB is listening to the old ipaddr and
* is set to listen to the new one instead */
ip_addr_copy(lpcb->local_ip, *new_addr);
8013eb6: 683b ldr r3, [r7, #0]
8013eb8: 681a ldr r2, [r3, #0]
8013eba: 68fb ldr r3, [r7, #12]
8013ebc: 601a str r2, [r3, #0]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
8013ebe: 68fb ldr r3, [r7, #12]
8013ec0: 68db ldr r3, [r3, #12]
8013ec2: 60fb str r3, [r7, #12]
8013ec4: 68fb ldr r3, [r7, #12]
8013ec6: 2b00 cmp r3, #0
8013ec8: d1ef bne.n 8013eaa <tcp_netif_ip_addr_changed+0x46>
}
}
}
}
}
8013eca: bf00 nop
8013ecc: 3710 adds r7, #16
8013ece: 46bd mov sp, r7
8013ed0: bd80 pop {r7, pc}
8013ed2: bf00 nop
8013ed4: 2000f7fc .word 0x2000f7fc
8013ed8: 2000f808 .word 0x2000f808
8013edc: 2000f804 .word 0x2000f804
08013ee0 <tcp_free_ooseq>:
#if TCP_QUEUE_OOSEQ
/* Free all ooseq pbufs (and possibly reset SACK state) */
void
tcp_free_ooseq(struct tcp_pcb *pcb)
{
8013ee0: b580 push {r7, lr}
8013ee2: b082 sub sp, #8
8013ee4: af00 add r7, sp, #0
8013ee6: 6078 str r0, [r7, #4]
if (pcb->ooseq) {
8013ee8: 687b ldr r3, [r7, #4]
8013eea: 6f5b ldr r3, [r3, #116] ; 0x74
8013eec: 2b00 cmp r3, #0
8013eee: d007 beq.n 8013f00 <tcp_free_ooseq+0x20>
tcp_segs_free(pcb->ooseq);
8013ef0: 687b ldr r3, [r7, #4]
8013ef2: 6f5b ldr r3, [r3, #116] ; 0x74
8013ef4: 4618 mov r0, r3
8013ef6: f7ff fc3f bl 8013778 <tcp_segs_free>
pcb->ooseq = NULL;
8013efa: 687b ldr r3, [r7, #4]
8013efc: 2200 movs r2, #0
8013efe: 675a str r2, [r3, #116] ; 0x74
#if LWIP_TCP_SACK_OUT
memset(pcb->rcv_sacks, 0, sizeof(pcb->rcv_sacks));
#endif /* LWIP_TCP_SACK_OUT */
}
}
8013f00: bf00 nop
8013f02: 3708 adds r7, #8
8013f04: 46bd mov sp, r7
8013f06: bd80 pop {r7, pc}
08013f08 <tcp_input>:
* @param p received TCP segment to process (p->payload pointing to the TCP header)
* @param inp network interface on which this segment was received
*/
void
tcp_input(struct pbuf *p, struct netif *inp)
{
8013f08: b590 push {r4, r7, lr}
8013f0a: b08d sub sp, #52 ; 0x34
8013f0c: af04 add r7, sp, #16
8013f0e: 6078 str r0, [r7, #4]
8013f10: 6039 str r1, [r7, #0]
u8_t hdrlen_bytes;
err_t err;
LWIP_UNUSED_ARG(inp);
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL);
8013f12: 687b ldr r3, [r7, #4]
8013f14: 2b00 cmp r3, #0
8013f16: d105 bne.n 8013f24 <tcp_input+0x1c>
8013f18: 4b9b ldr r3, [pc, #620] ; (8014188 <tcp_input+0x280>)
8013f1a: 2283 movs r2, #131 ; 0x83
8013f1c: 499b ldr r1, [pc, #620] ; (801418c <tcp_input+0x284>)
8013f1e: 489c ldr r0, [pc, #624] ; (8014190 <tcp_input+0x288>)
8013f20: f008 feea bl 801ccf8 <iprintf>
PERF_START;
TCP_STATS_INC(tcp.recv);
MIB2_STATS_INC(mib2.tcpinsegs);
tcphdr = (struct tcp_hdr *)p->payload;
8013f24: 687b ldr r3, [r7, #4]
8013f26: 685b ldr r3, [r3, #4]
8013f28: 4a9a ldr r2, [pc, #616] ; (8014194 <tcp_input+0x28c>)
8013f2a: 6013 str r3, [r2, #0]
#if TCP_INPUT_DEBUG
tcp_debug_print(tcphdr);
#endif
/* Check that TCP header fits in payload */
if (p->len < TCP_HLEN) {
8013f2c: 687b ldr r3, [r7, #4]
8013f2e: 895b ldrh r3, [r3, #10]
8013f30: 2b13 cmp r3, #19
8013f32: f240 83c4 bls.w 80146be <tcp_input+0x7b6>
TCP_STATS_INC(tcp.lenerr);
goto dropped;
}
/* Don't even process incoming broadcasts/multicasts. */
if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
8013f36: 4b98 ldr r3, [pc, #608] ; (8014198 <tcp_input+0x290>)
8013f38: 695a ldr r2, [r3, #20]
8013f3a: 4b97 ldr r3, [pc, #604] ; (8014198 <tcp_input+0x290>)
8013f3c: 681b ldr r3, [r3, #0]
8013f3e: 4619 mov r1, r3
8013f40: 4610 mov r0, r2
8013f42: f007 fe17 bl 801bb74 <ip4_addr_isbroadcast_u32>
8013f46: 4603 mov r3, r0
8013f48: 2b00 cmp r3, #0
8013f4a: f040 83ba bne.w 80146c2 <tcp_input+0x7ba>
ip_addr_ismulticast(ip_current_dest_addr())) {
8013f4e: 4b92 ldr r3, [pc, #584] ; (8014198 <tcp_input+0x290>)
8013f50: 695b ldr r3, [r3, #20]
8013f52: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
8013f56: 2be0 cmp r3, #224 ; 0xe0
8013f58: f000 83b3 beq.w 80146c2 <tcp_input+0x7ba>
}
}
#endif /* CHECKSUM_CHECK_TCP */
/* sanity-check header length */
hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr);
8013f5c: 4b8d ldr r3, [pc, #564] ; (8014194 <tcp_input+0x28c>)
8013f5e: 681b ldr r3, [r3, #0]
8013f60: 899b ldrh r3, [r3, #12]
8013f62: b29b uxth r3, r3
8013f64: 4618 mov r0, r3
8013f66: f7fc fde3 bl 8010b30 <lwip_htons>
8013f6a: 4603 mov r3, r0
8013f6c: 0b1b lsrs r3, r3, #12
8013f6e: b29b uxth r3, r3
8013f70: b2db uxtb r3, r3
8013f72: 009b lsls r3, r3, #2
8013f74: 74bb strb r3, [r7, #18]
if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
8013f76: 7cbb ldrb r3, [r7, #18]
8013f78: 2b13 cmp r3, #19
8013f7a: f240 83a2 bls.w 80146c2 <tcp_input+0x7ba>
8013f7e: 7cbb ldrb r3, [r7, #18]
8013f80: b29a uxth r2, r3
8013f82: 687b ldr r3, [r7, #4]
8013f84: 891b ldrh r3, [r3, #8]
8013f86: 429a cmp r2, r3
8013f88: f200 839b bhi.w 80146c2 <tcp_input+0x7ba>
goto dropped;
}
/* Move the payload pointer in the pbuf so that it points to the
TCP data instead of the TCP header. */
tcphdr_optlen = (u16_t)(hdrlen_bytes - TCP_HLEN);
8013f8c: 7cbb ldrb r3, [r7, #18]
8013f8e: b29b uxth r3, r3
8013f90: 3b14 subs r3, #20
8013f92: b29a uxth r2, r3
8013f94: 4b81 ldr r3, [pc, #516] ; (801419c <tcp_input+0x294>)
8013f96: 801a strh r2, [r3, #0]
tcphdr_opt2 = NULL;
8013f98: 4b81 ldr r3, [pc, #516] ; (80141a0 <tcp_input+0x298>)
8013f9a: 2200 movs r2, #0
8013f9c: 601a str r2, [r3, #0]
if (p->len >= hdrlen_bytes) {
8013f9e: 687b ldr r3, [r7, #4]
8013fa0: 895a ldrh r2, [r3, #10]
8013fa2: 7cbb ldrb r3, [r7, #18]
8013fa4: b29b uxth r3, r3
8013fa6: 429a cmp r2, r3
8013fa8: d309 bcc.n 8013fbe <tcp_input+0xb6>
/* all options are in the first pbuf */
tcphdr_opt1len = tcphdr_optlen;
8013faa: 4b7c ldr r3, [pc, #496] ; (801419c <tcp_input+0x294>)
8013fac: 881a ldrh r2, [r3, #0]
8013fae: 4b7d ldr r3, [pc, #500] ; (80141a4 <tcp_input+0x29c>)
8013fb0: 801a strh r2, [r3, #0]
pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */
8013fb2: 7cbb ldrb r3, [r7, #18]
8013fb4: 4619 mov r1, r3
8013fb6: 6878 ldr r0, [r7, #4]
8013fb8: f7fe f8e8 bl 801218c <pbuf_remove_header>
8013fbc: e04e b.n 801405c <tcp_input+0x154>
} else {
u16_t opt2len;
/* TCP header fits into first pbuf, options don't - data is in the next pbuf */
/* there must be a next pbuf, due to hdrlen_bytes sanity check above */
LWIP_ASSERT("p->next != NULL", p->next != NULL);
8013fbe: 687b ldr r3, [r7, #4]
8013fc0: 681b ldr r3, [r3, #0]
8013fc2: 2b00 cmp r3, #0
8013fc4: d105 bne.n 8013fd2 <tcp_input+0xca>
8013fc6: 4b70 ldr r3, [pc, #448] ; (8014188 <tcp_input+0x280>)
8013fc8: 22c2 movs r2, #194 ; 0xc2
8013fca: 4977 ldr r1, [pc, #476] ; (80141a8 <tcp_input+0x2a0>)
8013fcc: 4870 ldr r0, [pc, #448] ; (8014190 <tcp_input+0x288>)
8013fce: f008 fe93 bl 801ccf8 <iprintf>
/* advance over the TCP header (cannot fail) */
pbuf_remove_header(p, TCP_HLEN);
8013fd2: 2114 movs r1, #20
8013fd4: 6878 ldr r0, [r7, #4]
8013fd6: f7fe f8d9 bl 801218c <pbuf_remove_header>
/* determine how long the first and second parts of the options are */
tcphdr_opt1len = p->len;
8013fda: 687b ldr r3, [r7, #4]
8013fdc: 895a ldrh r2, [r3, #10]
8013fde: 4b71 ldr r3, [pc, #452] ; (80141a4 <tcp_input+0x29c>)
8013fe0: 801a strh r2, [r3, #0]
opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len);
8013fe2: 4b6e ldr r3, [pc, #440] ; (801419c <tcp_input+0x294>)
8013fe4: 881a ldrh r2, [r3, #0]
8013fe6: 4b6f ldr r3, [pc, #444] ; (80141a4 <tcp_input+0x29c>)
8013fe8: 881b ldrh r3, [r3, #0]
8013fea: 1ad3 subs r3, r2, r3
8013fec: 823b strh r3, [r7, #16]
/* options continue in the next pbuf: set p to zero length and hide the
options in the next pbuf (adjusting p->tot_len) */
pbuf_remove_header(p, tcphdr_opt1len);
8013fee: 4b6d ldr r3, [pc, #436] ; (80141a4 <tcp_input+0x29c>)
8013ff0: 881b ldrh r3, [r3, #0]
8013ff2: 4619 mov r1, r3
8013ff4: 6878 ldr r0, [r7, #4]
8013ff6: f7fe f8c9 bl 801218c <pbuf_remove_header>
/* check that the options fit in the second pbuf */
if (opt2len > p->next->len) {
8013ffa: 687b ldr r3, [r7, #4]
8013ffc: 681b ldr r3, [r3, #0]
8013ffe: 895b ldrh r3, [r3, #10]
8014000: 8a3a ldrh r2, [r7, #16]
8014002: 429a cmp r2, r3
8014004: f200 835f bhi.w 80146c6 <tcp_input+0x7be>
TCP_STATS_INC(tcp.lenerr);
goto dropped;
}
/* remember the pointer to the second part of the options */
tcphdr_opt2 = (u8_t *)p->next->payload;
8014008: 687b ldr r3, [r7, #4]
801400a: 681b ldr r3, [r3, #0]
801400c: 685b ldr r3, [r3, #4]
801400e: 4a64 ldr r2, [pc, #400] ; (80141a0 <tcp_input+0x298>)
8014010: 6013 str r3, [r2, #0]
/* advance p->next to point after the options, and manually
adjust p->tot_len to keep it consistent with the changed p->next */
pbuf_remove_header(p->next, opt2len);
8014012: 687b ldr r3, [r7, #4]
8014014: 681b ldr r3, [r3, #0]
8014016: 8a3a ldrh r2, [r7, #16]
8014018: 4611 mov r1, r2
801401a: 4618 mov r0, r3
801401c: f7fe f8b6 bl 801218c <pbuf_remove_header>
p->tot_len = (u16_t)(p->tot_len - opt2len);
8014020: 687b ldr r3, [r7, #4]
8014022: 891a ldrh r2, [r3, #8]
8014024: 8a3b ldrh r3, [r7, #16]
8014026: 1ad3 subs r3, r2, r3
8014028: b29a uxth r2, r3
801402a: 687b ldr r3, [r7, #4]
801402c: 811a strh r2, [r3, #8]
LWIP_ASSERT("p->len == 0", p->len == 0);
801402e: 687b ldr r3, [r7, #4]
8014030: 895b ldrh r3, [r3, #10]
8014032: 2b00 cmp r3, #0
8014034: d005 beq.n 8014042 <tcp_input+0x13a>
8014036: 4b54 ldr r3, [pc, #336] ; (8014188 <tcp_input+0x280>)
8014038: 22df movs r2, #223 ; 0xdf
801403a: 495c ldr r1, [pc, #368] ; (80141ac <tcp_input+0x2a4>)
801403c: 4854 ldr r0, [pc, #336] ; (8014190 <tcp_input+0x288>)
801403e: f008 fe5b bl 801ccf8 <iprintf>
LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
8014042: 687b ldr r3, [r7, #4]
8014044: 891a ldrh r2, [r3, #8]
8014046: 687b ldr r3, [r7, #4]
8014048: 681b ldr r3, [r3, #0]
801404a: 891b ldrh r3, [r3, #8]
801404c: 429a cmp r2, r3
801404e: d005 beq.n 801405c <tcp_input+0x154>
8014050: 4b4d ldr r3, [pc, #308] ; (8014188 <tcp_input+0x280>)
8014052: 22e0 movs r2, #224 ; 0xe0
8014054: 4956 ldr r1, [pc, #344] ; (80141b0 <tcp_input+0x2a8>)
8014056: 484e ldr r0, [pc, #312] ; (8014190 <tcp_input+0x288>)
8014058: f008 fe4e bl 801ccf8 <iprintf>
}
/* Convert fields in TCP header to host byte order. */
tcphdr->src = lwip_ntohs(tcphdr->src);
801405c: 4b4d ldr r3, [pc, #308] ; (8014194 <tcp_input+0x28c>)
801405e: 681b ldr r3, [r3, #0]
8014060: 881b ldrh r3, [r3, #0]
8014062: b29a uxth r2, r3
8014064: 4b4b ldr r3, [pc, #300] ; (8014194 <tcp_input+0x28c>)
8014066: 681c ldr r4, [r3, #0]
8014068: 4610 mov r0, r2
801406a: f7fc fd61 bl 8010b30 <lwip_htons>
801406e: 4603 mov r3, r0
8014070: 8023 strh r3, [r4, #0]
tcphdr->dest = lwip_ntohs(tcphdr->dest);
8014072: 4b48 ldr r3, [pc, #288] ; (8014194 <tcp_input+0x28c>)
8014074: 681b ldr r3, [r3, #0]
8014076: 885b ldrh r3, [r3, #2]
8014078: b29a uxth r2, r3
801407a: 4b46 ldr r3, [pc, #280] ; (8014194 <tcp_input+0x28c>)
801407c: 681c ldr r4, [r3, #0]
801407e: 4610 mov r0, r2
8014080: f7fc fd56 bl 8010b30 <lwip_htons>
8014084: 4603 mov r3, r0
8014086: 8063 strh r3, [r4, #2]
seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno);
8014088: 4b42 ldr r3, [pc, #264] ; (8014194 <tcp_input+0x28c>)
801408a: 681b ldr r3, [r3, #0]
801408c: 685a ldr r2, [r3, #4]
801408e: 4b41 ldr r3, [pc, #260] ; (8014194 <tcp_input+0x28c>)
8014090: 681c ldr r4, [r3, #0]
8014092: 4610 mov r0, r2
8014094: f7fc fd61 bl 8010b5a <lwip_htonl>
8014098: 4603 mov r3, r0
801409a: 6063 str r3, [r4, #4]
801409c: 6863 ldr r3, [r4, #4]
801409e: 4a45 ldr r2, [pc, #276] ; (80141b4 <tcp_input+0x2ac>)
80140a0: 6013 str r3, [r2, #0]
ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno);
80140a2: 4b3c ldr r3, [pc, #240] ; (8014194 <tcp_input+0x28c>)
80140a4: 681b ldr r3, [r3, #0]
80140a6: 689a ldr r2, [r3, #8]
80140a8: 4b3a ldr r3, [pc, #232] ; (8014194 <tcp_input+0x28c>)
80140aa: 681c ldr r4, [r3, #0]
80140ac: 4610 mov r0, r2
80140ae: f7fc fd54 bl 8010b5a <lwip_htonl>
80140b2: 4603 mov r3, r0
80140b4: 60a3 str r3, [r4, #8]
80140b6: 68a3 ldr r3, [r4, #8]
80140b8: 4a3f ldr r2, [pc, #252] ; (80141b8 <tcp_input+0x2b0>)
80140ba: 6013 str r3, [r2, #0]
tcphdr->wnd = lwip_ntohs(tcphdr->wnd);
80140bc: 4b35 ldr r3, [pc, #212] ; (8014194 <tcp_input+0x28c>)
80140be: 681b ldr r3, [r3, #0]
80140c0: 89db ldrh r3, [r3, #14]
80140c2: b29a uxth r2, r3
80140c4: 4b33 ldr r3, [pc, #204] ; (8014194 <tcp_input+0x28c>)
80140c6: 681c ldr r4, [r3, #0]
80140c8: 4610 mov r0, r2
80140ca: f7fc fd31 bl 8010b30 <lwip_htons>
80140ce: 4603 mov r3, r0
80140d0: 81e3 strh r3, [r4, #14]
flags = TCPH_FLAGS(tcphdr);
80140d2: 4b30 ldr r3, [pc, #192] ; (8014194 <tcp_input+0x28c>)
80140d4: 681b ldr r3, [r3, #0]
80140d6: 899b ldrh r3, [r3, #12]
80140d8: b29b uxth r3, r3
80140da: 4618 mov r0, r3
80140dc: f7fc fd28 bl 8010b30 <lwip_htons>
80140e0: 4603 mov r3, r0
80140e2: b2db uxtb r3, r3
80140e4: f003 033f and.w r3, r3, #63 ; 0x3f
80140e8: b2da uxtb r2, r3
80140ea: 4b34 ldr r3, [pc, #208] ; (80141bc <tcp_input+0x2b4>)
80140ec: 701a strb r2, [r3, #0]
tcplen = p->tot_len;
80140ee: 687b ldr r3, [r7, #4]
80140f0: 891a ldrh r2, [r3, #8]
80140f2: 4b33 ldr r3, [pc, #204] ; (80141c0 <tcp_input+0x2b8>)
80140f4: 801a strh r2, [r3, #0]
if (flags & (TCP_FIN | TCP_SYN)) {
80140f6: 4b31 ldr r3, [pc, #196] ; (80141bc <tcp_input+0x2b4>)
80140f8: 781b ldrb r3, [r3, #0]
80140fa: f003 0303 and.w r3, r3, #3
80140fe: 2b00 cmp r3, #0
8014100: d00c beq.n 801411c <tcp_input+0x214>
tcplen++;
8014102: 4b2f ldr r3, [pc, #188] ; (80141c0 <tcp_input+0x2b8>)
8014104: 881b ldrh r3, [r3, #0]
8014106: 3301 adds r3, #1
8014108: b29a uxth r2, r3
801410a: 4b2d ldr r3, [pc, #180] ; (80141c0 <tcp_input+0x2b8>)
801410c: 801a strh r2, [r3, #0]
if (tcplen < p->tot_len) {
801410e: 687b ldr r3, [r7, #4]
8014110: 891a ldrh r2, [r3, #8]
8014112: 4b2b ldr r3, [pc, #172] ; (80141c0 <tcp_input+0x2b8>)
8014114: 881b ldrh r3, [r3, #0]
8014116: 429a cmp r2, r3
8014118: f200 82d7 bhi.w 80146ca <tcp_input+0x7c2>
}
}
/* Demultiplex an incoming segment. First, we check if it is destined
for an active connection. */
prev = NULL;
801411c: 2300 movs r3, #0
801411e: 61bb str r3, [r7, #24]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8014120: 4b28 ldr r3, [pc, #160] ; (80141c4 <tcp_input+0x2bc>)
8014122: 681b ldr r3, [r3, #0]
8014124: 61fb str r3, [r7, #28]
8014126: e09d b.n 8014264 <tcp_input+0x35c>
LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
8014128: 69fb ldr r3, [r7, #28]
801412a: 7d1b ldrb r3, [r3, #20]
801412c: 2b00 cmp r3, #0
801412e: d105 bne.n 801413c <tcp_input+0x234>
8014130: 4b15 ldr r3, [pc, #84] ; (8014188 <tcp_input+0x280>)
8014132: 22fb movs r2, #251 ; 0xfb
8014134: 4924 ldr r1, [pc, #144] ; (80141c8 <tcp_input+0x2c0>)
8014136: 4816 ldr r0, [pc, #88] ; (8014190 <tcp_input+0x288>)
8014138: f008 fdde bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
801413c: 69fb ldr r3, [r7, #28]
801413e: 7d1b ldrb r3, [r3, #20]
8014140: 2b0a cmp r3, #10
8014142: d105 bne.n 8014150 <tcp_input+0x248>
8014144: 4b10 ldr r3, [pc, #64] ; (8014188 <tcp_input+0x280>)
8014146: 22fc movs r2, #252 ; 0xfc
8014148: 4920 ldr r1, [pc, #128] ; (80141cc <tcp_input+0x2c4>)
801414a: 4811 ldr r0, [pc, #68] ; (8014190 <tcp_input+0x288>)
801414c: f008 fdd4 bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
8014150: 69fb ldr r3, [r7, #28]
8014152: 7d1b ldrb r3, [r3, #20]
8014154: 2b01 cmp r3, #1
8014156: d105 bne.n 8014164 <tcp_input+0x25c>
8014158: 4b0b ldr r3, [pc, #44] ; (8014188 <tcp_input+0x280>)
801415a: 22fd movs r2, #253 ; 0xfd
801415c: 491c ldr r1, [pc, #112] ; (80141d0 <tcp_input+0x2c8>)
801415e: 480c ldr r0, [pc, #48] ; (8014190 <tcp_input+0x288>)
8014160: f008 fdca bl 801ccf8 <iprintf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8014164: 69fb ldr r3, [r7, #28]
8014166: 7a1b ldrb r3, [r3, #8]
8014168: 2b00 cmp r3, #0
801416a: d033 beq.n 80141d4 <tcp_input+0x2cc>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
801416c: 69fb ldr r3, [r7, #28]
801416e: 7a1a ldrb r2, [r3, #8]
8014170: 4b09 ldr r3, [pc, #36] ; (8014198 <tcp_input+0x290>)
8014172: 685b ldr r3, [r3, #4]
8014174: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8014178: 3301 adds r3, #1
801417a: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
801417c: 429a cmp r2, r3
801417e: d029 beq.n 80141d4 <tcp_input+0x2cc>
prev = pcb;
8014180: 69fb ldr r3, [r7, #28]
8014182: 61bb str r3, [r7, #24]
continue;
8014184: e06b b.n 801425e <tcp_input+0x356>
8014186: bf00 nop
8014188: 0801f2f0 .word 0x0801f2f0
801418c: 0801f324 .word 0x0801f324
8014190: 0801f33c .word 0x0801f33c
8014194: 2000873c .word 0x2000873c
8014198: 2000c0c8 .word 0x2000c0c8
801419c: 20008740 .word 0x20008740
80141a0: 20008744 .word 0x20008744
80141a4: 20008742 .word 0x20008742
80141a8: 0801f364 .word 0x0801f364
80141ac: 0801f374 .word 0x0801f374
80141b0: 0801f380 .word 0x0801f380
80141b4: 2000874c .word 0x2000874c
80141b8: 20008750 .word 0x20008750
80141bc: 20008758 .word 0x20008758
80141c0: 20008756 .word 0x20008756
80141c4: 2000f7fc .word 0x2000f7fc
80141c8: 0801f3a0 .word 0x0801f3a0
80141cc: 0801f3c8 .word 0x0801f3c8
80141d0: 0801f3f4 .word 0x0801f3f4
}
if (pcb->remote_port == tcphdr->src &&
80141d4: 69fb ldr r3, [r7, #28]
80141d6: 8b1a ldrh r2, [r3, #24]
80141d8: 4b94 ldr r3, [pc, #592] ; (801442c <tcp_input+0x524>)
80141da: 681b ldr r3, [r3, #0]
80141dc: 881b ldrh r3, [r3, #0]
80141de: b29b uxth r3, r3
80141e0: 429a cmp r2, r3
80141e2: d13a bne.n 801425a <tcp_input+0x352>
pcb->local_port == tcphdr->dest &&
80141e4: 69fb ldr r3, [r7, #28]
80141e6: 8ada ldrh r2, [r3, #22]
80141e8: 4b90 ldr r3, [pc, #576] ; (801442c <tcp_input+0x524>)
80141ea: 681b ldr r3, [r3, #0]
80141ec: 885b ldrh r3, [r3, #2]
80141ee: b29b uxth r3, r3
if (pcb->remote_port == tcphdr->src &&
80141f0: 429a cmp r2, r3
80141f2: d132 bne.n 801425a <tcp_input+0x352>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80141f4: 69fb ldr r3, [r7, #28]
80141f6: 685a ldr r2, [r3, #4]
80141f8: 4b8d ldr r3, [pc, #564] ; (8014430 <tcp_input+0x528>)
80141fa: 691b ldr r3, [r3, #16]
pcb->local_port == tcphdr->dest &&
80141fc: 429a cmp r2, r3
80141fe: d12c bne.n 801425a <tcp_input+0x352>
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
8014200: 69fb ldr r3, [r7, #28]
8014202: 681a ldr r2, [r3, #0]
8014204: 4b8a ldr r3, [pc, #552] ; (8014430 <tcp_input+0x528>)
8014206: 695b ldr r3, [r3, #20]
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
8014208: 429a cmp r2, r3
801420a: d126 bne.n 801425a <tcp_input+0x352>
/* Move this PCB to the front of the list so that subsequent
lookups will be faster (we exploit locality in TCP segment
arrivals). */
LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb);
801420c: 69fb ldr r3, [r7, #28]
801420e: 68db ldr r3, [r3, #12]
8014210: 69fa ldr r2, [r7, #28]
8014212: 429a cmp r2, r3
8014214: d106 bne.n 8014224 <tcp_input+0x31c>
8014216: 4b87 ldr r3, [pc, #540] ; (8014434 <tcp_input+0x52c>)
8014218: f240 120d movw r2, #269 ; 0x10d
801421c: 4986 ldr r1, [pc, #536] ; (8014438 <tcp_input+0x530>)
801421e: 4887 ldr r0, [pc, #540] ; (801443c <tcp_input+0x534>)
8014220: f008 fd6a bl 801ccf8 <iprintf>
if (prev != NULL) {
8014224: 69bb ldr r3, [r7, #24]
8014226: 2b00 cmp r3, #0
8014228: d00a beq.n 8014240 <tcp_input+0x338>
prev->next = pcb->next;
801422a: 69fb ldr r3, [r7, #28]
801422c: 68da ldr r2, [r3, #12]
801422e: 69bb ldr r3, [r7, #24]
8014230: 60da str r2, [r3, #12]
pcb->next = tcp_active_pcbs;
8014232: 4b83 ldr r3, [pc, #524] ; (8014440 <tcp_input+0x538>)
8014234: 681a ldr r2, [r3, #0]
8014236: 69fb ldr r3, [r7, #28]
8014238: 60da str r2, [r3, #12]
tcp_active_pcbs = pcb;
801423a: 4a81 ldr r2, [pc, #516] ; (8014440 <tcp_input+0x538>)
801423c: 69fb ldr r3, [r7, #28]
801423e: 6013 str r3, [r2, #0]
} else {
TCP_STATS_INC(tcp.cachehit);
}
LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
8014240: 69fb ldr r3, [r7, #28]
8014242: 68db ldr r3, [r3, #12]
8014244: 69fa ldr r2, [r7, #28]
8014246: 429a cmp r2, r3
8014248: d111 bne.n 801426e <tcp_input+0x366>
801424a: 4b7a ldr r3, [pc, #488] ; (8014434 <tcp_input+0x52c>)
801424c: f240 1215 movw r2, #277 ; 0x115
8014250: 497c ldr r1, [pc, #496] ; (8014444 <tcp_input+0x53c>)
8014252: 487a ldr r0, [pc, #488] ; (801443c <tcp_input+0x534>)
8014254: f008 fd50 bl 801ccf8 <iprintf>
break;
8014258: e009 b.n 801426e <tcp_input+0x366>
}
prev = pcb;
801425a: 69fb ldr r3, [r7, #28]
801425c: 61bb str r3, [r7, #24]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
801425e: 69fb ldr r3, [r7, #28]
8014260: 68db ldr r3, [r3, #12]
8014262: 61fb str r3, [r7, #28]
8014264: 69fb ldr r3, [r7, #28]
8014266: 2b00 cmp r3, #0
8014268: f47f af5e bne.w 8014128 <tcp_input+0x220>
801426c: e000 b.n 8014270 <tcp_input+0x368>
break;
801426e: bf00 nop
}
if (pcb == NULL) {
8014270: 69fb ldr r3, [r7, #28]
8014272: 2b00 cmp r3, #0
8014274: f040 8095 bne.w 80143a2 <tcp_input+0x49a>
/* If it did not go to an active connection, we check the connections
in the TIME-WAIT state. */
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
8014278: 4b73 ldr r3, [pc, #460] ; (8014448 <tcp_input+0x540>)
801427a: 681b ldr r3, [r3, #0]
801427c: 61fb str r3, [r7, #28]
801427e: e03f b.n 8014300 <tcp_input+0x3f8>
LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
8014280: 69fb ldr r3, [r7, #28]
8014282: 7d1b ldrb r3, [r3, #20]
8014284: 2b0a cmp r3, #10
8014286: d006 beq.n 8014296 <tcp_input+0x38e>
8014288: 4b6a ldr r3, [pc, #424] ; (8014434 <tcp_input+0x52c>)
801428a: f240 121f movw r2, #287 ; 0x11f
801428e: 496f ldr r1, [pc, #444] ; (801444c <tcp_input+0x544>)
8014290: 486a ldr r0, [pc, #424] ; (801443c <tcp_input+0x534>)
8014292: f008 fd31 bl 801ccf8 <iprintf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8014296: 69fb ldr r3, [r7, #28]
8014298: 7a1b ldrb r3, [r3, #8]
801429a: 2b00 cmp r3, #0
801429c: d009 beq.n 80142b2 <tcp_input+0x3aa>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
801429e: 69fb ldr r3, [r7, #28]
80142a0: 7a1a ldrb r2, [r3, #8]
80142a2: 4b63 ldr r3, [pc, #396] ; (8014430 <tcp_input+0x528>)
80142a4: 685b ldr r3, [r3, #4]
80142a6: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80142aa: 3301 adds r3, #1
80142ac: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
80142ae: 429a cmp r2, r3
80142b0: d122 bne.n 80142f8 <tcp_input+0x3f0>
continue;
}
if (pcb->remote_port == tcphdr->src &&
80142b2: 69fb ldr r3, [r7, #28]
80142b4: 8b1a ldrh r2, [r3, #24]
80142b6: 4b5d ldr r3, [pc, #372] ; (801442c <tcp_input+0x524>)
80142b8: 681b ldr r3, [r3, #0]
80142ba: 881b ldrh r3, [r3, #0]
80142bc: b29b uxth r3, r3
80142be: 429a cmp r2, r3
80142c0: d11b bne.n 80142fa <tcp_input+0x3f2>
pcb->local_port == tcphdr->dest &&
80142c2: 69fb ldr r3, [r7, #28]
80142c4: 8ada ldrh r2, [r3, #22]
80142c6: 4b59 ldr r3, [pc, #356] ; (801442c <tcp_input+0x524>)
80142c8: 681b ldr r3, [r3, #0]
80142ca: 885b ldrh r3, [r3, #2]
80142cc: b29b uxth r3, r3
if (pcb->remote_port == tcphdr->src &&
80142ce: 429a cmp r2, r3
80142d0: d113 bne.n 80142fa <tcp_input+0x3f2>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80142d2: 69fb ldr r3, [r7, #28]
80142d4: 685a ldr r2, [r3, #4]
80142d6: 4b56 ldr r3, [pc, #344] ; (8014430 <tcp_input+0x528>)
80142d8: 691b ldr r3, [r3, #16]
pcb->local_port == tcphdr->dest &&
80142da: 429a cmp r2, r3
80142dc: d10d bne.n 80142fa <tcp_input+0x3f2>
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
80142de: 69fb ldr r3, [r7, #28]
80142e0: 681a ldr r2, [r3, #0]
80142e2: 4b53 ldr r3, [pc, #332] ; (8014430 <tcp_input+0x528>)
80142e4: 695b ldr r3, [r3, #20]
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
80142e6: 429a cmp r2, r3
80142e8: d107 bne.n 80142fa <tcp_input+0x3f2>
#ifdef LWIP_HOOK_TCP_INPACKET_PCB
if (LWIP_HOOK_TCP_INPACKET_PCB(pcb, tcphdr, tcphdr_optlen, tcphdr_opt1len,
tcphdr_opt2, p) == ERR_OK)
#endif
{
tcp_timewait_input(pcb);
80142ea: 69f8 ldr r0, [r7, #28]
80142ec: f000 fb52 bl 8014994 <tcp_timewait_input>
}
pbuf_free(p);
80142f0: 6878 ldr r0, [r7, #4]
80142f2: f7fd ffd1 bl 8012298 <pbuf_free>
return;
80142f6: e1ee b.n 80146d6 <tcp_input+0x7ce>
continue;
80142f8: bf00 nop
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
80142fa: 69fb ldr r3, [r7, #28]
80142fc: 68db ldr r3, [r3, #12]
80142fe: 61fb str r3, [r7, #28]
8014300: 69fb ldr r3, [r7, #28]
8014302: 2b00 cmp r3, #0
8014304: d1bc bne.n 8014280 <tcp_input+0x378>
}
}
/* Finally, if we still did not get a match, we check all PCBs that
are LISTENing for incoming connections. */
prev = NULL;
8014306: 2300 movs r3, #0
8014308: 61bb str r3, [r7, #24]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
801430a: 4b51 ldr r3, [pc, #324] ; (8014450 <tcp_input+0x548>)
801430c: 681b ldr r3, [r3, #0]
801430e: 617b str r3, [r7, #20]
8014310: e02a b.n 8014368 <tcp_input+0x460>
/* check if PCB is bound to specific netif */
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
8014312: 697b ldr r3, [r7, #20]
8014314: 7a1b ldrb r3, [r3, #8]
8014316: 2b00 cmp r3, #0
8014318: d00c beq.n 8014334 <tcp_input+0x42c>
(lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
801431a: 697b ldr r3, [r7, #20]
801431c: 7a1a ldrb r2, [r3, #8]
801431e: 4b44 ldr r3, [pc, #272] ; (8014430 <tcp_input+0x528>)
8014320: 685b ldr r3, [r3, #4]
8014322: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8014326: 3301 adds r3, #1
8014328: b2db uxtb r3, r3
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
801432a: 429a cmp r2, r3
801432c: d002 beq.n 8014334 <tcp_input+0x42c>
prev = (struct tcp_pcb *)lpcb;
801432e: 697b ldr r3, [r7, #20]
8014330: 61bb str r3, [r7, #24]
continue;
8014332: e016 b.n 8014362 <tcp_input+0x45a>
}
if (lpcb->local_port == tcphdr->dest) {
8014334: 697b ldr r3, [r7, #20]
8014336: 8ada ldrh r2, [r3, #22]
8014338: 4b3c ldr r3, [pc, #240] ; (801442c <tcp_input+0x524>)
801433a: 681b ldr r3, [r3, #0]
801433c: 885b ldrh r3, [r3, #2]
801433e: b29b uxth r3, r3
8014340: 429a cmp r2, r3
8014342: d10c bne.n 801435e <tcp_input+0x456>
lpcb_prev = prev;
#else /* SO_REUSE */
break;
#endif /* SO_REUSE */
} else if (IP_ADDR_PCB_VERSION_MATCH_EXACT(lpcb, ip_current_dest_addr())) {
if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) {
8014344: 697b ldr r3, [r7, #20]
8014346: 681a ldr r2, [r3, #0]
8014348: 4b39 ldr r3, [pc, #228] ; (8014430 <tcp_input+0x528>)
801434a: 695b ldr r3, [r3, #20]
801434c: 429a cmp r2, r3
801434e: d00f beq.n 8014370 <tcp_input+0x468>
/* found an exact match */
break;
} else if (ip_addr_isany(&lpcb->local_ip)) {
8014350: 697b ldr r3, [r7, #20]
8014352: 2b00 cmp r3, #0
8014354: d00d beq.n 8014372 <tcp_input+0x46a>
8014356: 697b ldr r3, [r7, #20]
8014358: 681b ldr r3, [r3, #0]
801435a: 2b00 cmp r3, #0
801435c: d009 beq.n 8014372 <tcp_input+0x46a>
break;
#endif /* SO_REUSE */
}
}
}
prev = (struct tcp_pcb *)lpcb;
801435e: 697b ldr r3, [r7, #20]
8014360: 61bb str r3, [r7, #24]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
8014362: 697b ldr r3, [r7, #20]
8014364: 68db ldr r3, [r3, #12]
8014366: 617b str r3, [r7, #20]
8014368: 697b ldr r3, [r7, #20]
801436a: 2b00 cmp r3, #0
801436c: d1d1 bne.n 8014312 <tcp_input+0x40a>
801436e: e000 b.n 8014372 <tcp_input+0x46a>
break;
8014370: bf00 nop
/* only pass to ANY if no specific local IP has been found */
lpcb = lpcb_any;
prev = lpcb_prev;
}
#endif /* SO_REUSE */
if (lpcb != NULL) {
8014372: 697b ldr r3, [r7, #20]
8014374: 2b00 cmp r3, #0
8014376: d014 beq.n 80143a2 <tcp_input+0x49a>
/* Move this PCB to the front of the list so that subsequent
lookups will be faster (we exploit locality in TCP segment
arrivals). */
if (prev != NULL) {
8014378: 69bb ldr r3, [r7, #24]
801437a: 2b00 cmp r3, #0
801437c: d00a beq.n 8014394 <tcp_input+0x48c>
((struct tcp_pcb_listen *)prev)->next = lpcb->next;
801437e: 697b ldr r3, [r7, #20]
8014380: 68da ldr r2, [r3, #12]
8014382: 69bb ldr r3, [r7, #24]
8014384: 60da str r2, [r3, #12]
/* our successor is the remainder of the listening list */
lpcb->next = tcp_listen_pcbs.listen_pcbs;
8014386: 4b32 ldr r3, [pc, #200] ; (8014450 <tcp_input+0x548>)
8014388: 681a ldr r2, [r3, #0]
801438a: 697b ldr r3, [r7, #20]
801438c: 60da str r2, [r3, #12]
/* put this listening pcb at the head of the listening list */
tcp_listen_pcbs.listen_pcbs = lpcb;
801438e: 4a30 ldr r2, [pc, #192] ; (8014450 <tcp_input+0x548>)
8014390: 697b ldr r3, [r7, #20]
8014392: 6013 str r3, [r2, #0]
#ifdef LWIP_HOOK_TCP_INPACKET_PCB
if (LWIP_HOOK_TCP_INPACKET_PCB((struct tcp_pcb *)lpcb, tcphdr, tcphdr_optlen,
tcphdr_opt1len, tcphdr_opt2, p) == ERR_OK)
#endif
{
tcp_listen_input(lpcb);
8014394: 6978 ldr r0, [r7, #20]
8014396: f000 f9ff bl 8014798 <tcp_listen_input>
}
pbuf_free(p);
801439a: 6878 ldr r0, [r7, #4]
801439c: f7fd ff7c bl 8012298 <pbuf_free>
return;
80143a0: e199 b.n 80146d6 <tcp_input+0x7ce>
tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) {
pbuf_free(p);
return;
}
#endif
if (pcb != NULL) {
80143a2: 69fb ldr r3, [r7, #28]
80143a4: 2b00 cmp r3, #0
80143a6: f000 8160 beq.w 801466a <tcp_input+0x762>
#if TCP_INPUT_DEBUG
tcp_debug_print_state(pcb->state);
#endif /* TCP_INPUT_DEBUG */
/* Set up a tcp_seg structure. */
inseg.next = NULL;
80143aa: 4b2a ldr r3, [pc, #168] ; (8014454 <tcp_input+0x54c>)
80143ac: 2200 movs r2, #0
80143ae: 601a str r2, [r3, #0]
inseg.len = p->tot_len;
80143b0: 687b ldr r3, [r7, #4]
80143b2: 891a ldrh r2, [r3, #8]
80143b4: 4b27 ldr r3, [pc, #156] ; (8014454 <tcp_input+0x54c>)
80143b6: 811a strh r2, [r3, #8]
inseg.p = p;
80143b8: 4a26 ldr r2, [pc, #152] ; (8014454 <tcp_input+0x54c>)
80143ba: 687b ldr r3, [r7, #4]
80143bc: 6053 str r3, [r2, #4]
inseg.tcphdr = tcphdr;
80143be: 4b1b ldr r3, [pc, #108] ; (801442c <tcp_input+0x524>)
80143c0: 681b ldr r3, [r3, #0]
80143c2: 4a24 ldr r2, [pc, #144] ; (8014454 <tcp_input+0x54c>)
80143c4: 60d3 str r3, [r2, #12]
recv_data = NULL;
80143c6: 4b24 ldr r3, [pc, #144] ; (8014458 <tcp_input+0x550>)
80143c8: 2200 movs r2, #0
80143ca: 601a str r2, [r3, #0]
recv_flags = 0;
80143cc: 4b23 ldr r3, [pc, #140] ; (801445c <tcp_input+0x554>)
80143ce: 2200 movs r2, #0
80143d0: 701a strb r2, [r3, #0]
recv_acked = 0;
80143d2: 4b23 ldr r3, [pc, #140] ; (8014460 <tcp_input+0x558>)
80143d4: 2200 movs r2, #0
80143d6: 801a strh r2, [r3, #0]
if (flags & TCP_PSH) {
80143d8: 4b22 ldr r3, [pc, #136] ; (8014464 <tcp_input+0x55c>)
80143da: 781b ldrb r3, [r3, #0]
80143dc: f003 0308 and.w r3, r3, #8
80143e0: 2b00 cmp r3, #0
80143e2: d006 beq.n 80143f2 <tcp_input+0x4ea>
p->flags |= PBUF_FLAG_PUSH;
80143e4: 687b ldr r3, [r7, #4]
80143e6: 7b5b ldrb r3, [r3, #13]
80143e8: f043 0301 orr.w r3, r3, #1
80143ec: b2da uxtb r2, r3
80143ee: 687b ldr r3, [r7, #4]
80143f0: 735a strb r2, [r3, #13]
}
/* If there is data which was previously "refused" by upper layer */
if (pcb->refused_data != NULL) {
80143f2: 69fb ldr r3, [r7, #28]
80143f4: 6f9b ldr r3, [r3, #120] ; 0x78
80143f6: 2b00 cmp r3, #0
80143f8: d038 beq.n 801446c <tcp_input+0x564>
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
80143fa: 69f8 ldr r0, [r7, #28]
80143fc: f7ff f940 bl 8013680 <tcp_process_refused_data>
8014400: 4603 mov r3, r0
8014402: f113 0f0d cmn.w r3, #13
8014406: d007 beq.n 8014418 <tcp_input+0x510>
((pcb->refused_data != NULL) && (tcplen > 0))) {
8014408: 69fb ldr r3, [r7, #28]
801440a: 6f9b ldr r3, [r3, #120] ; 0x78
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
801440c: 2b00 cmp r3, #0
801440e: d02d beq.n 801446c <tcp_input+0x564>
((pcb->refused_data != NULL) && (tcplen > 0))) {
8014410: 4b15 ldr r3, [pc, #84] ; (8014468 <tcp_input+0x560>)
8014412: 881b ldrh r3, [r3, #0]
8014414: 2b00 cmp r3, #0
8014416: d029 beq.n 801446c <tcp_input+0x564>
/* pcb has been aborted or refused data is still refused and the new
segment contains data */
if (pcb->rcv_ann_wnd == 0) {
8014418: 69fb ldr r3, [r7, #28]
801441a: 8d5b ldrh r3, [r3, #42] ; 0x2a
801441c: 2b00 cmp r3, #0
801441e: f040 8104 bne.w 801462a <tcp_input+0x722>
/* this is a zero-window probe, we respond to it with current RCV.NXT
and drop the data segment */
tcp_send_empty_ack(pcb);
8014422: 69f8 ldr r0, [r7, #28]
8014424: f003 f9ce bl 80177c4 <tcp_send_empty_ack>
}
TCP_STATS_INC(tcp.drop);
MIB2_STATS_INC(mib2.tcpinerrs);
goto aborted;
8014428: e0ff b.n 801462a <tcp_input+0x722>
801442a: bf00 nop
801442c: 2000873c .word 0x2000873c
8014430: 2000c0c8 .word 0x2000c0c8
8014434: 0801f2f0 .word 0x0801f2f0
8014438: 0801f41c .word 0x0801f41c
801443c: 0801f33c .word 0x0801f33c
8014440: 2000f7fc .word 0x2000f7fc
8014444: 0801f448 .word 0x0801f448
8014448: 2000f80c .word 0x2000f80c
801444c: 0801f474 .word 0x0801f474
8014450: 2000f804 .word 0x2000f804
8014454: 2000872c .word 0x2000872c
8014458: 2000875c .word 0x2000875c
801445c: 20008759 .word 0x20008759
8014460: 20008754 .word 0x20008754
8014464: 20008758 .word 0x20008758
8014468: 20008756 .word 0x20008756
}
}
tcp_input_pcb = pcb;
801446c: 4a9b ldr r2, [pc, #620] ; (80146dc <tcp_input+0x7d4>)
801446e: 69fb ldr r3, [r7, #28]
8014470: 6013 str r3, [r2, #0]
err = tcp_process(pcb);
8014472: 69f8 ldr r0, [r7, #28]
8014474: f000 fb0a bl 8014a8c <tcp_process>
8014478: 4603 mov r3, r0
801447a: 74fb strb r3, [r7, #19]
/* A return value of ERR_ABRT means that tcp_abort() was called
and that the pcb has been freed. If so, we don't do anything. */
if (err != ERR_ABRT) {
801447c: f997 3013 ldrsb.w r3, [r7, #19]
8014480: f113 0f0d cmn.w r3, #13
8014484: f000 80d3 beq.w 801462e <tcp_input+0x726>
if (recv_flags & TF_RESET) {
8014488: 4b95 ldr r3, [pc, #596] ; (80146e0 <tcp_input+0x7d8>)
801448a: 781b ldrb r3, [r3, #0]
801448c: f003 0308 and.w r3, r3, #8
8014490: 2b00 cmp r3, #0
8014492: d015 beq.n 80144c0 <tcp_input+0x5b8>
/* TF_RESET means that the connection was reset by the other
end. We then call the error callback to inform the
application that the connection is dead before we
deallocate the PCB. */
TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST);
8014494: 69fb ldr r3, [r7, #28]
8014496: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
801449a: 2b00 cmp r3, #0
801449c: d008 beq.n 80144b0 <tcp_input+0x5a8>
801449e: 69fb ldr r3, [r7, #28]
80144a0: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
80144a4: 69fa ldr r2, [r7, #28]
80144a6: 6912 ldr r2, [r2, #16]
80144a8: f06f 010d mvn.w r1, #13
80144ac: 4610 mov r0, r2
80144ae: 4798 blx r3
tcp_pcb_remove(&tcp_active_pcbs, pcb);
80144b0: 69f9 ldr r1, [r7, #28]
80144b2: 488c ldr r0, [pc, #560] ; (80146e4 <tcp_input+0x7dc>)
80144b4: f7ff fbb0 bl 8013c18 <tcp_pcb_remove>
tcp_free(pcb);
80144b8: 69f8 ldr r0, [r7, #28]
80144ba: f7fe f9a9 bl 8012810 <tcp_free>
80144be: e0c1 b.n 8014644 <tcp_input+0x73c>
} else {
err = ERR_OK;
80144c0: 2300 movs r3, #0
80144c2: 74fb strb r3, [r7, #19]
/* If the application has registered a "sent" function to be
called when new send buffer space is available, we call it
now. */
if (recv_acked > 0) {
80144c4: 4b88 ldr r3, [pc, #544] ; (80146e8 <tcp_input+0x7e0>)
80144c6: 881b ldrh r3, [r3, #0]
80144c8: 2b00 cmp r3, #0
80144ca: d01d beq.n 8014508 <tcp_input+0x600>
while (acked > 0) {
acked16 = (u16_t)LWIP_MIN(acked, 0xffffu);
acked -= acked16;
#else
{
acked16 = recv_acked;
80144cc: 4b86 ldr r3, [pc, #536] ; (80146e8 <tcp_input+0x7e0>)
80144ce: 881b ldrh r3, [r3, #0]
80144d0: 81fb strh r3, [r7, #14]
#endif
TCP_EVENT_SENT(pcb, (u16_t)acked16, err);
80144d2: 69fb ldr r3, [r7, #28]
80144d4: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
80144d8: 2b00 cmp r3, #0
80144da: d00a beq.n 80144f2 <tcp_input+0x5ea>
80144dc: 69fb ldr r3, [r7, #28]
80144de: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
80144e2: 69fa ldr r2, [r7, #28]
80144e4: 6910 ldr r0, [r2, #16]
80144e6: 89fa ldrh r2, [r7, #14]
80144e8: 69f9 ldr r1, [r7, #28]
80144ea: 4798 blx r3
80144ec: 4603 mov r3, r0
80144ee: 74fb strb r3, [r7, #19]
80144f0: e001 b.n 80144f6 <tcp_input+0x5ee>
80144f2: 2300 movs r3, #0
80144f4: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
80144f6: f997 3013 ldrsb.w r3, [r7, #19]
80144fa: f113 0f0d cmn.w r3, #13
80144fe: f000 8098 beq.w 8014632 <tcp_input+0x72a>
goto aborted;
}
}
recv_acked = 0;
8014502: 4b79 ldr r3, [pc, #484] ; (80146e8 <tcp_input+0x7e0>)
8014504: 2200 movs r2, #0
8014506: 801a strh r2, [r3, #0]
}
if (tcp_input_delayed_close(pcb)) {
8014508: 69f8 ldr r0, [r7, #28]
801450a: f000 f905 bl 8014718 <tcp_input_delayed_close>
801450e: 4603 mov r3, r0
8014510: 2b00 cmp r3, #0
8014512: f040 8090 bne.w 8014636 <tcp_input+0x72e>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
while (recv_data != NULL) {
struct pbuf *rest = NULL;
pbuf_split_64k(recv_data, &rest);
#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
if (recv_data != NULL) {
8014516: 4b75 ldr r3, [pc, #468] ; (80146ec <tcp_input+0x7e4>)
8014518: 681b ldr r3, [r3, #0]
801451a: 2b00 cmp r3, #0
801451c: d041 beq.n 80145a2 <tcp_input+0x69a>
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL);
801451e: 69fb ldr r3, [r7, #28]
8014520: 6f9b ldr r3, [r3, #120] ; 0x78
8014522: 2b00 cmp r3, #0
8014524: d006 beq.n 8014534 <tcp_input+0x62c>
8014526: 4b72 ldr r3, [pc, #456] ; (80146f0 <tcp_input+0x7e8>)
8014528: f44f 72f3 mov.w r2, #486 ; 0x1e6
801452c: 4971 ldr r1, [pc, #452] ; (80146f4 <tcp_input+0x7ec>)
801452e: 4872 ldr r0, [pc, #456] ; (80146f8 <tcp_input+0x7f0>)
8014530: f008 fbe2 bl 801ccf8 <iprintf>
if (pcb->flags & TF_RXCLOSED) {
8014534: 69fb ldr r3, [r7, #28]
8014536: 8b5b ldrh r3, [r3, #26]
8014538: f003 0310 and.w r3, r3, #16
801453c: 2b00 cmp r3, #0
801453e: d008 beq.n 8014552 <tcp_input+0x64a>
/* received data although already closed -> abort (send RST) to
notify the remote host that not all data has been processed */
pbuf_free(recv_data);
8014540: 4b6a ldr r3, [pc, #424] ; (80146ec <tcp_input+0x7e4>)
8014542: 681b ldr r3, [r3, #0]
8014544: 4618 mov r0, r3
8014546: f7fd fea7 bl 8012298 <pbuf_free>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
if (rest != NULL) {
pbuf_free(rest);
}
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
tcp_abort(pcb);
801454a: 69f8 ldr r0, [r7, #28]
801454c: f7fe fc40 bl 8012dd0 <tcp_abort>
goto aborted;
8014550: e078 b.n 8014644 <tcp_input+0x73c>
}
/* Notify application that data has been received. */
TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
8014552: 69fb ldr r3, [r7, #28]
8014554: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8014558: 2b00 cmp r3, #0
801455a: d00c beq.n 8014576 <tcp_input+0x66e>
801455c: 69fb ldr r3, [r7, #28]
801455e: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8014562: 69fb ldr r3, [r7, #28]
8014564: 6918 ldr r0, [r3, #16]
8014566: 4b61 ldr r3, [pc, #388] ; (80146ec <tcp_input+0x7e4>)
8014568: 681a ldr r2, [r3, #0]
801456a: 2300 movs r3, #0
801456c: 69f9 ldr r1, [r7, #28]
801456e: 47a0 blx r4
8014570: 4603 mov r3, r0
8014572: 74fb strb r3, [r7, #19]
8014574: e008 b.n 8014588 <tcp_input+0x680>
8014576: 4b5d ldr r3, [pc, #372] ; (80146ec <tcp_input+0x7e4>)
8014578: 681a ldr r2, [r3, #0]
801457a: 2300 movs r3, #0
801457c: 69f9 ldr r1, [r7, #28]
801457e: 2000 movs r0, #0
8014580: f7ff f952 bl 8013828 <tcp_recv_null>
8014584: 4603 mov r3, r0
8014586: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8014588: f997 3013 ldrsb.w r3, [r7, #19]
801458c: f113 0f0d cmn.w r3, #13
8014590: d053 beq.n 801463a <tcp_input+0x732>
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
goto aborted;
}
/* If the upper layer can't receive this data, store it */
if (err != ERR_OK) {
8014592: f997 3013 ldrsb.w r3, [r7, #19]
8014596: 2b00 cmp r3, #0
8014598: d003 beq.n 80145a2 <tcp_input+0x69a>
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
if (rest != NULL) {
pbuf_cat(recv_data, rest);
}
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
pcb->refused_data = recv_data;
801459a: 4b54 ldr r3, [pc, #336] ; (80146ec <tcp_input+0x7e4>)
801459c: 681a ldr r2, [r3, #0]
801459e: 69fb ldr r3, [r7, #28]
80145a0: 679a str r2, [r3, #120] ; 0x78
}
}
/* If a FIN segment was received, we call the callback
function with a NULL buffer to indicate EOF. */
if (recv_flags & TF_GOT_FIN) {
80145a2: 4b4f ldr r3, [pc, #316] ; (80146e0 <tcp_input+0x7d8>)
80145a4: 781b ldrb r3, [r3, #0]
80145a6: f003 0320 and.w r3, r3, #32
80145aa: 2b00 cmp r3, #0
80145ac: d030 beq.n 8014610 <tcp_input+0x708>
if (pcb->refused_data != NULL) {
80145ae: 69fb ldr r3, [r7, #28]
80145b0: 6f9b ldr r3, [r3, #120] ; 0x78
80145b2: 2b00 cmp r3, #0
80145b4: d009 beq.n 80145ca <tcp_input+0x6c2>
/* Delay this if we have refused data. */
pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN;
80145b6: 69fb ldr r3, [r7, #28]
80145b8: 6f9b ldr r3, [r3, #120] ; 0x78
80145ba: 7b5a ldrb r2, [r3, #13]
80145bc: 69fb ldr r3, [r7, #28]
80145be: 6f9b ldr r3, [r3, #120] ; 0x78
80145c0: f042 0220 orr.w r2, r2, #32
80145c4: b2d2 uxtb r2, r2
80145c6: 735a strb r2, [r3, #13]
80145c8: e022 b.n 8014610 <tcp_input+0x708>
} else {
/* correct rcv_wnd as the application won't call tcp_recved()
for the FIN's seqno */
if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) {
80145ca: 69fb ldr r3, [r7, #28]
80145cc: 8d1b ldrh r3, [r3, #40] ; 0x28
80145ce: f5b3 6f06 cmp.w r3, #2144 ; 0x860
80145d2: d005 beq.n 80145e0 <tcp_input+0x6d8>
pcb->rcv_wnd++;
80145d4: 69fb ldr r3, [r7, #28]
80145d6: 8d1b ldrh r3, [r3, #40] ; 0x28
80145d8: 3301 adds r3, #1
80145da: b29a uxth r2, r3
80145dc: 69fb ldr r3, [r7, #28]
80145de: 851a strh r2, [r3, #40] ; 0x28
}
TCP_EVENT_CLOSED(pcb, err);
80145e0: 69fb ldr r3, [r7, #28]
80145e2: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
80145e6: 2b00 cmp r3, #0
80145e8: d00b beq.n 8014602 <tcp_input+0x6fa>
80145ea: 69fb ldr r3, [r7, #28]
80145ec: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
80145f0: 69fb ldr r3, [r7, #28]
80145f2: 6918 ldr r0, [r3, #16]
80145f4: 2300 movs r3, #0
80145f6: 2200 movs r2, #0
80145f8: 69f9 ldr r1, [r7, #28]
80145fa: 47a0 blx r4
80145fc: 4603 mov r3, r0
80145fe: 74fb strb r3, [r7, #19]
8014600: e001 b.n 8014606 <tcp_input+0x6fe>
8014602: 2300 movs r3, #0
8014604: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8014606: f997 3013 ldrsb.w r3, [r7, #19]
801460a: f113 0f0d cmn.w r3, #13
801460e: d016 beq.n 801463e <tcp_input+0x736>
goto aborted;
}
}
}
tcp_input_pcb = NULL;
8014610: 4b32 ldr r3, [pc, #200] ; (80146dc <tcp_input+0x7d4>)
8014612: 2200 movs r2, #0
8014614: 601a str r2, [r3, #0]
if (tcp_input_delayed_close(pcb)) {
8014616: 69f8 ldr r0, [r7, #28]
8014618: f000 f87e bl 8014718 <tcp_input_delayed_close>
801461c: 4603 mov r3, r0
801461e: 2b00 cmp r3, #0
8014620: d10f bne.n 8014642 <tcp_input+0x73a>
goto aborted;
}
/* Try to send something out. */
tcp_output(pcb);
8014622: 69f8 ldr r0, [r7, #28]
8014624: f002 fab6 bl 8016b94 <tcp_output>
8014628: e00c b.n 8014644 <tcp_input+0x73c>
goto aborted;
801462a: bf00 nop
801462c: e00a b.n 8014644 <tcp_input+0x73c>
#endif /* TCP_INPUT_DEBUG */
}
}
/* Jump target if pcb has been aborted in a callback (by calling tcp_abort()).
Below this line, 'pcb' may not be dereferenced! */
aborted:
801462e: bf00 nop
8014630: e008 b.n 8014644 <tcp_input+0x73c>
goto aborted;
8014632: bf00 nop
8014634: e006 b.n 8014644 <tcp_input+0x73c>
goto aborted;
8014636: bf00 nop
8014638: e004 b.n 8014644 <tcp_input+0x73c>
goto aborted;
801463a: bf00 nop
801463c: e002 b.n 8014644 <tcp_input+0x73c>
goto aborted;
801463e: bf00 nop
8014640: e000 b.n 8014644 <tcp_input+0x73c>
goto aborted;
8014642: bf00 nop
tcp_input_pcb = NULL;
8014644: 4b25 ldr r3, [pc, #148] ; (80146dc <tcp_input+0x7d4>)
8014646: 2200 movs r2, #0
8014648: 601a str r2, [r3, #0]
recv_data = NULL;
801464a: 4b28 ldr r3, [pc, #160] ; (80146ec <tcp_input+0x7e4>)
801464c: 2200 movs r2, #0
801464e: 601a str r2, [r3, #0]
/* give up our reference to inseg.p */
if (inseg.p != NULL) {
8014650: 4b2a ldr r3, [pc, #168] ; (80146fc <tcp_input+0x7f4>)
8014652: 685b ldr r3, [r3, #4]
8014654: 2b00 cmp r3, #0
8014656: d03d beq.n 80146d4 <tcp_input+0x7cc>
pbuf_free(inseg.p);
8014658: 4b28 ldr r3, [pc, #160] ; (80146fc <tcp_input+0x7f4>)
801465a: 685b ldr r3, [r3, #4]
801465c: 4618 mov r0, r3
801465e: f7fd fe1b bl 8012298 <pbuf_free>
inseg.p = NULL;
8014662: 4b26 ldr r3, [pc, #152] ; (80146fc <tcp_input+0x7f4>)
8014664: 2200 movs r2, #0
8014666: 605a str r2, [r3, #4]
pbuf_free(p);
}
LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane());
PERF_STOP("tcp_input");
return;
8014668: e034 b.n 80146d4 <tcp_input+0x7cc>
if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) {
801466a: 4b25 ldr r3, [pc, #148] ; (8014700 <tcp_input+0x7f8>)
801466c: 681b ldr r3, [r3, #0]
801466e: 899b ldrh r3, [r3, #12]
8014670: b29b uxth r3, r3
8014672: 4618 mov r0, r3
8014674: f7fc fa5c bl 8010b30 <lwip_htons>
8014678: 4603 mov r3, r0
801467a: b2db uxtb r3, r3
801467c: f003 0304 and.w r3, r3, #4
8014680: 2b00 cmp r3, #0
8014682: d118 bne.n 80146b6 <tcp_input+0x7ae>
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8014684: 4b1f ldr r3, [pc, #124] ; (8014704 <tcp_input+0x7fc>)
8014686: 6819 ldr r1, [r3, #0]
8014688: 4b1f ldr r3, [pc, #124] ; (8014708 <tcp_input+0x800>)
801468a: 881b ldrh r3, [r3, #0]
801468c: 461a mov r2, r3
801468e: 4b1f ldr r3, [pc, #124] ; (801470c <tcp_input+0x804>)
8014690: 681b ldr r3, [r3, #0]
8014692: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014694: 4b1a ldr r3, [pc, #104] ; (8014700 <tcp_input+0x7f8>)
8014696: 681b ldr r3, [r3, #0]
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8014698: 885b ldrh r3, [r3, #2]
801469a: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
801469c: 4a18 ldr r2, [pc, #96] ; (8014700 <tcp_input+0x7f8>)
801469e: 6812 ldr r2, [r2, #0]
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
80146a0: 8812 ldrh r2, [r2, #0]
80146a2: b292 uxth r2, r2
80146a4: 9202 str r2, [sp, #8]
80146a6: 9301 str r3, [sp, #4]
80146a8: 4b19 ldr r3, [pc, #100] ; (8014710 <tcp_input+0x808>)
80146aa: 9300 str r3, [sp, #0]
80146ac: 4b19 ldr r3, [pc, #100] ; (8014714 <tcp_input+0x80c>)
80146ae: 4602 mov r2, r0
80146b0: 2000 movs r0, #0
80146b2: f003 f835 bl 8017720 <tcp_rst>
pbuf_free(p);
80146b6: 6878 ldr r0, [r7, #4]
80146b8: f7fd fdee bl 8012298 <pbuf_free>
return;
80146bc: e00a b.n 80146d4 <tcp_input+0x7cc>
goto dropped;
80146be: bf00 nop
80146c0: e004 b.n 80146cc <tcp_input+0x7c4>
dropped:
80146c2: bf00 nop
80146c4: e002 b.n 80146cc <tcp_input+0x7c4>
goto dropped;
80146c6: bf00 nop
80146c8: e000 b.n 80146cc <tcp_input+0x7c4>
goto dropped;
80146ca: bf00 nop
TCP_STATS_INC(tcp.drop);
MIB2_STATS_INC(mib2.tcpinerrs);
pbuf_free(p);
80146cc: 6878 ldr r0, [r7, #4]
80146ce: f7fd fde3 bl 8012298 <pbuf_free>
80146d2: e000 b.n 80146d6 <tcp_input+0x7ce>
return;
80146d4: bf00 nop
}
80146d6: 3724 adds r7, #36 ; 0x24
80146d8: 46bd mov sp, r7
80146da: bd90 pop {r4, r7, pc}
80146dc: 2000f810 .word 0x2000f810
80146e0: 20008759 .word 0x20008759
80146e4: 2000f7fc .word 0x2000f7fc
80146e8: 20008754 .word 0x20008754
80146ec: 2000875c .word 0x2000875c
80146f0: 0801f2f0 .word 0x0801f2f0
80146f4: 0801f4a4 .word 0x0801f4a4
80146f8: 0801f33c .word 0x0801f33c
80146fc: 2000872c .word 0x2000872c
8014700: 2000873c .word 0x2000873c
8014704: 20008750 .word 0x20008750
8014708: 20008756 .word 0x20008756
801470c: 2000874c .word 0x2000874c
8014710: 2000c0d8 .word 0x2000c0d8
8014714: 2000c0dc .word 0x2000c0dc
08014718 <tcp_input_delayed_close>:
* any more.
* @returns 1 if the pcb has been closed and deallocated, 0 otherwise
*/
static int
tcp_input_delayed_close(struct tcp_pcb *pcb)
{
8014718: b580 push {r7, lr}
801471a: b082 sub sp, #8
801471c: af00 add r7, sp, #0
801471e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
8014720: 687b ldr r3, [r7, #4]
8014722: 2b00 cmp r3, #0
8014724: d106 bne.n 8014734 <tcp_input_delayed_close+0x1c>
8014726: 4b17 ldr r3, [pc, #92] ; (8014784 <tcp_input_delayed_close+0x6c>)
8014728: f240 225a movw r2, #602 ; 0x25a
801472c: 4916 ldr r1, [pc, #88] ; (8014788 <tcp_input_delayed_close+0x70>)
801472e: 4817 ldr r0, [pc, #92] ; (801478c <tcp_input_delayed_close+0x74>)
8014730: f008 fae2 bl 801ccf8 <iprintf>
if (recv_flags & TF_CLOSED) {
8014734: 4b16 ldr r3, [pc, #88] ; (8014790 <tcp_input_delayed_close+0x78>)
8014736: 781b ldrb r3, [r3, #0]
8014738: f003 0310 and.w r3, r3, #16
801473c: 2b00 cmp r3, #0
801473e: d01c beq.n 801477a <tcp_input_delayed_close+0x62>
/* The connection has been closed and we will deallocate the
PCB. */
if (!(pcb->flags & TF_RXCLOSED)) {
8014740: 687b ldr r3, [r7, #4]
8014742: 8b5b ldrh r3, [r3, #26]
8014744: f003 0310 and.w r3, r3, #16
8014748: 2b00 cmp r3, #0
801474a: d10d bne.n 8014768 <tcp_input_delayed_close+0x50>
/* Connection closed although the application has only shut down the
tx side: call the PCB's err callback and indicate the closure to
ensure the application doesn't continue using the PCB. */
TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD);
801474c: 687b ldr r3, [r7, #4]
801474e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8014752: 2b00 cmp r3, #0
8014754: d008 beq.n 8014768 <tcp_input_delayed_close+0x50>
8014756: 687b ldr r3, [r7, #4]
8014758: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
801475c: 687a ldr r2, [r7, #4]
801475e: 6912 ldr r2, [r2, #16]
8014760: f06f 010e mvn.w r1, #14
8014764: 4610 mov r0, r2
8014766: 4798 blx r3
}
tcp_pcb_remove(&tcp_active_pcbs, pcb);
8014768: 6879 ldr r1, [r7, #4]
801476a: 480a ldr r0, [pc, #40] ; (8014794 <tcp_input_delayed_close+0x7c>)
801476c: f7ff fa54 bl 8013c18 <tcp_pcb_remove>
tcp_free(pcb);
8014770: 6878 ldr r0, [r7, #4]
8014772: f7fe f84d bl 8012810 <tcp_free>
return 1;
8014776: 2301 movs r3, #1
8014778: e000 b.n 801477c <tcp_input_delayed_close+0x64>
}
return 0;
801477a: 2300 movs r3, #0
}
801477c: 4618 mov r0, r3
801477e: 3708 adds r7, #8
8014780: 46bd mov sp, r7
8014782: bd80 pop {r7, pc}
8014784: 0801f2f0 .word 0x0801f2f0
8014788: 0801f4c0 .word 0x0801f4c0
801478c: 0801f33c .word 0x0801f33c
8014790: 20008759 .word 0x20008759
8014794: 2000f7fc .word 0x2000f7fc
08014798 <tcp_listen_input>:
* @note the segment which arrived is saved in global variables, therefore only the pcb
* involved is passed as a parameter to this function
*/
static void
tcp_listen_input(struct tcp_pcb_listen *pcb)
{
8014798: b590 push {r4, r7, lr}
801479a: b08b sub sp, #44 ; 0x2c
801479c: af04 add r7, sp, #16
801479e: 6078 str r0, [r7, #4]
struct tcp_pcb *npcb;
u32_t iss;
err_t rc;
if (flags & TCP_RST) {
80147a0: 4b6f ldr r3, [pc, #444] ; (8014960 <tcp_listen_input+0x1c8>)
80147a2: 781b ldrb r3, [r3, #0]
80147a4: f003 0304 and.w r3, r3, #4
80147a8: 2b00 cmp r3, #0
80147aa: f040 80d3 bne.w 8014954 <tcp_listen_input+0x1bc>
/* An incoming RST should be ignored. Return. */
return;
}
LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
80147ae: 687b ldr r3, [r7, #4]
80147b0: 2b00 cmp r3, #0
80147b2: d106 bne.n 80147c2 <tcp_listen_input+0x2a>
80147b4: 4b6b ldr r3, [pc, #428] ; (8014964 <tcp_listen_input+0x1cc>)
80147b6: f240 2281 movw r2, #641 ; 0x281
80147ba: 496b ldr r1, [pc, #428] ; (8014968 <tcp_listen_input+0x1d0>)
80147bc: 486b ldr r0, [pc, #428] ; (801496c <tcp_listen_input+0x1d4>)
80147be: f008 fa9b bl 801ccf8 <iprintf>
/* In the LISTEN state, we check for incoming SYN segments,
creates a new PCB, and responds with a SYN|ACK. */
if (flags & TCP_ACK) {
80147c2: 4b67 ldr r3, [pc, #412] ; (8014960 <tcp_listen_input+0x1c8>)
80147c4: 781b ldrb r3, [r3, #0]
80147c6: f003 0310 and.w r3, r3, #16
80147ca: 2b00 cmp r3, #0
80147cc: d019 beq.n 8014802 <tcp_listen_input+0x6a>
/* For incoming segments with the ACK flag set, respond with a
RST. */
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n"));
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80147ce: 4b68 ldr r3, [pc, #416] ; (8014970 <tcp_listen_input+0x1d8>)
80147d0: 6819 ldr r1, [r3, #0]
80147d2: 4b68 ldr r3, [pc, #416] ; (8014974 <tcp_listen_input+0x1dc>)
80147d4: 881b ldrh r3, [r3, #0]
80147d6: 461a mov r2, r3
80147d8: 4b67 ldr r3, [pc, #412] ; (8014978 <tcp_listen_input+0x1e0>)
80147da: 681b ldr r3, [r3, #0]
80147dc: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
80147de: 4b67 ldr r3, [pc, #412] ; (801497c <tcp_listen_input+0x1e4>)
80147e0: 681b ldr r3, [r3, #0]
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80147e2: 885b ldrh r3, [r3, #2]
80147e4: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
80147e6: 4a65 ldr r2, [pc, #404] ; (801497c <tcp_listen_input+0x1e4>)
80147e8: 6812 ldr r2, [r2, #0]
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80147ea: 8812 ldrh r2, [r2, #0]
80147ec: b292 uxth r2, r2
80147ee: 9202 str r2, [sp, #8]
80147f0: 9301 str r3, [sp, #4]
80147f2: 4b63 ldr r3, [pc, #396] ; (8014980 <tcp_listen_input+0x1e8>)
80147f4: 9300 str r3, [sp, #0]
80147f6: 4b63 ldr r3, [pc, #396] ; (8014984 <tcp_listen_input+0x1ec>)
80147f8: 4602 mov r2, r0
80147fa: 6878 ldr r0, [r7, #4]
80147fc: f002 ff90 bl 8017720 <tcp_rst>
tcp_abandon(npcb, 0);
return;
}
tcp_output(npcb);
}
return;
8014800: e0aa b.n 8014958 <tcp_listen_input+0x1c0>
} else if (flags & TCP_SYN) {
8014802: 4b57 ldr r3, [pc, #348] ; (8014960 <tcp_listen_input+0x1c8>)
8014804: 781b ldrb r3, [r3, #0]
8014806: f003 0302 and.w r3, r3, #2
801480a: 2b00 cmp r3, #0
801480c: f000 80a4 beq.w 8014958 <tcp_listen_input+0x1c0>
npcb = tcp_alloc(pcb->prio);
8014810: 687b ldr r3, [r7, #4]
8014812: 7d5b ldrb r3, [r3, #21]
8014814: 4618 mov r0, r3
8014816: f7ff f92b bl 8013a70 <tcp_alloc>
801481a: 6178 str r0, [r7, #20]
if (npcb == NULL) {
801481c: 697b ldr r3, [r7, #20]
801481e: 2b00 cmp r3, #0
8014820: d111 bne.n 8014846 <tcp_listen_input+0xae>
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
8014822: 687b ldr r3, [r7, #4]
8014824: 699b ldr r3, [r3, #24]
8014826: 2b00 cmp r3, #0
8014828: d00a beq.n 8014840 <tcp_listen_input+0xa8>
801482a: 687b ldr r3, [r7, #4]
801482c: 699b ldr r3, [r3, #24]
801482e: 687a ldr r2, [r7, #4]
8014830: 6910 ldr r0, [r2, #16]
8014832: f04f 32ff mov.w r2, #4294967295
8014836: 2100 movs r1, #0
8014838: 4798 blx r3
801483a: 4603 mov r3, r0
801483c: 73bb strb r3, [r7, #14]
return;
801483e: e08c b.n 801495a <tcp_listen_input+0x1c2>
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
8014840: 23f0 movs r3, #240 ; 0xf0
8014842: 73bb strb r3, [r7, #14]
return;
8014844: e089 b.n 801495a <tcp_listen_input+0x1c2>
ip_addr_copy(npcb->local_ip, *ip_current_dest_addr());
8014846: 4b50 ldr r3, [pc, #320] ; (8014988 <tcp_listen_input+0x1f0>)
8014848: 695a ldr r2, [r3, #20]
801484a: 697b ldr r3, [r7, #20]
801484c: 601a str r2, [r3, #0]
ip_addr_copy(npcb->remote_ip, *ip_current_src_addr());
801484e: 4b4e ldr r3, [pc, #312] ; (8014988 <tcp_listen_input+0x1f0>)
8014850: 691a ldr r2, [r3, #16]
8014852: 697b ldr r3, [r7, #20]
8014854: 605a str r2, [r3, #4]
npcb->local_port = pcb->local_port;
8014856: 687b ldr r3, [r7, #4]
8014858: 8ada ldrh r2, [r3, #22]
801485a: 697b ldr r3, [r7, #20]
801485c: 82da strh r2, [r3, #22]
npcb->remote_port = tcphdr->src;
801485e: 4b47 ldr r3, [pc, #284] ; (801497c <tcp_listen_input+0x1e4>)
8014860: 681b ldr r3, [r3, #0]
8014862: 881b ldrh r3, [r3, #0]
8014864: b29a uxth r2, r3
8014866: 697b ldr r3, [r7, #20]
8014868: 831a strh r2, [r3, #24]
npcb->state = SYN_RCVD;
801486a: 697b ldr r3, [r7, #20]
801486c: 2203 movs r2, #3
801486e: 751a strb r2, [r3, #20]
npcb->rcv_nxt = seqno + 1;
8014870: 4b41 ldr r3, [pc, #260] ; (8014978 <tcp_listen_input+0x1e0>)
8014872: 681b ldr r3, [r3, #0]
8014874: 1c5a adds r2, r3, #1
8014876: 697b ldr r3, [r7, #20]
8014878: 625a str r2, [r3, #36] ; 0x24
npcb->rcv_ann_right_edge = npcb->rcv_nxt;
801487a: 697b ldr r3, [r7, #20]
801487c: 6a5a ldr r2, [r3, #36] ; 0x24
801487e: 697b ldr r3, [r7, #20]
8014880: 62da str r2, [r3, #44] ; 0x2c
iss = tcp_next_iss(npcb);
8014882: 6978 ldr r0, [r7, #20]
8014884: f7ff fa5c bl 8013d40 <tcp_next_iss>
8014888: 6138 str r0, [r7, #16]
npcb->snd_wl2 = iss;
801488a: 697b ldr r3, [r7, #20]
801488c: 693a ldr r2, [r7, #16]
801488e: 659a str r2, [r3, #88] ; 0x58
npcb->snd_nxt = iss;
8014890: 697b ldr r3, [r7, #20]
8014892: 693a ldr r2, [r7, #16]
8014894: 651a str r2, [r3, #80] ; 0x50
npcb->lastack = iss;
8014896: 697b ldr r3, [r7, #20]
8014898: 693a ldr r2, [r7, #16]
801489a: 645a str r2, [r3, #68] ; 0x44
npcb->snd_lbb = iss;
801489c: 697b ldr r3, [r7, #20]
801489e: 693a ldr r2, [r7, #16]
80148a0: 65da str r2, [r3, #92] ; 0x5c
npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */
80148a2: 4b35 ldr r3, [pc, #212] ; (8014978 <tcp_listen_input+0x1e0>)
80148a4: 681b ldr r3, [r3, #0]
80148a6: 1e5a subs r2, r3, #1
80148a8: 697b ldr r3, [r7, #20]
80148aa: 655a str r2, [r3, #84] ; 0x54
npcb->callback_arg = pcb->callback_arg;
80148ac: 687b ldr r3, [r7, #4]
80148ae: 691a ldr r2, [r3, #16]
80148b0: 697b ldr r3, [r7, #20]
80148b2: 611a str r2, [r3, #16]
npcb->listener = pcb;
80148b4: 697b ldr r3, [r7, #20]
80148b6: 687a ldr r2, [r7, #4]
80148b8: 67da str r2, [r3, #124] ; 0x7c
npcb->so_options = pcb->so_options & SOF_INHERITED;
80148ba: 687b ldr r3, [r7, #4]
80148bc: 7a5b ldrb r3, [r3, #9]
80148be: f003 030c and.w r3, r3, #12
80148c2: b2da uxtb r2, r3
80148c4: 697b ldr r3, [r7, #20]
80148c6: 725a strb r2, [r3, #9]
npcb->netif_idx = pcb->netif_idx;
80148c8: 687b ldr r3, [r7, #4]
80148ca: 7a1a ldrb r2, [r3, #8]
80148cc: 697b ldr r3, [r7, #20]
80148ce: 721a strb r2, [r3, #8]
TCP_REG_ACTIVE(npcb);
80148d0: 4b2e ldr r3, [pc, #184] ; (801498c <tcp_listen_input+0x1f4>)
80148d2: 681a ldr r2, [r3, #0]
80148d4: 697b ldr r3, [r7, #20]
80148d6: 60da str r2, [r3, #12]
80148d8: 4a2c ldr r2, [pc, #176] ; (801498c <tcp_listen_input+0x1f4>)
80148da: 697b ldr r3, [r7, #20]
80148dc: 6013 str r3, [r2, #0]
80148de: f003 f8e1 bl 8017aa4 <tcp_timer_needed>
80148e2: 4b2b ldr r3, [pc, #172] ; (8014990 <tcp_listen_input+0x1f8>)
80148e4: 2201 movs r2, #1
80148e6: 701a strb r2, [r3, #0]
tcp_parseopt(npcb);
80148e8: 6978 ldr r0, [r7, #20]
80148ea: f001 fd8f bl 801640c <tcp_parseopt>
npcb->snd_wnd = tcphdr->wnd;
80148ee: 4b23 ldr r3, [pc, #140] ; (801497c <tcp_listen_input+0x1e4>)
80148f0: 681b ldr r3, [r3, #0]
80148f2: 89db ldrh r3, [r3, #14]
80148f4: b29a uxth r2, r3
80148f6: 697b ldr r3, [r7, #20]
80148f8: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
npcb->snd_wnd_max = npcb->snd_wnd;
80148fc: 697b ldr r3, [r7, #20]
80148fe: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8014902: 697b ldr r3, [r7, #20]
8014904: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip);
8014908: 697b ldr r3, [r7, #20]
801490a: 8e5c ldrh r4, [r3, #50] ; 0x32
801490c: 697b ldr r3, [r7, #20]
801490e: 3304 adds r3, #4
8014910: 4618 mov r0, r3
8014912: f006 fe7d bl 801b610 <ip4_route>
8014916: 4601 mov r1, r0
8014918: 697b ldr r3, [r7, #20]
801491a: 3304 adds r3, #4
801491c: 461a mov r2, r3
801491e: 4620 mov r0, r4
8014920: f7ff fa34 bl 8013d8c <tcp_eff_send_mss_netif>
8014924: 4603 mov r3, r0
8014926: 461a mov r2, r3
8014928: 697b ldr r3, [r7, #20]
801492a: 865a strh r2, [r3, #50] ; 0x32
rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK);
801492c: 2112 movs r1, #18
801492e: 6978 ldr r0, [r7, #20]
8014930: f002 f842 bl 80169b8 <tcp_enqueue_flags>
8014934: 4603 mov r3, r0
8014936: 73fb strb r3, [r7, #15]
if (rc != ERR_OK) {
8014938: f997 300f ldrsb.w r3, [r7, #15]
801493c: 2b00 cmp r3, #0
801493e: d004 beq.n 801494a <tcp_listen_input+0x1b2>
tcp_abandon(npcb, 0);
8014940: 2100 movs r1, #0
8014942: 6978 ldr r0, [r7, #20]
8014944: f7fe f986 bl 8012c54 <tcp_abandon>
return;
8014948: e007 b.n 801495a <tcp_listen_input+0x1c2>
tcp_output(npcb);
801494a: 6978 ldr r0, [r7, #20]
801494c: f002 f922 bl 8016b94 <tcp_output>
return;
8014950: bf00 nop
8014952: e001 b.n 8014958 <tcp_listen_input+0x1c0>
return;
8014954: bf00 nop
8014956: e000 b.n 801495a <tcp_listen_input+0x1c2>
return;
8014958: bf00 nop
}
801495a: 371c adds r7, #28
801495c: 46bd mov sp, r7
801495e: bd90 pop {r4, r7, pc}
8014960: 20008758 .word 0x20008758
8014964: 0801f2f0 .word 0x0801f2f0
8014968: 0801f4e8 .word 0x0801f4e8
801496c: 0801f33c .word 0x0801f33c
8014970: 20008750 .word 0x20008750
8014974: 20008756 .word 0x20008756
8014978: 2000874c .word 0x2000874c
801497c: 2000873c .word 0x2000873c
8014980: 2000c0d8 .word 0x2000c0d8
8014984: 2000c0dc .word 0x2000c0dc
8014988: 2000c0c8 .word 0x2000c0c8
801498c: 2000f7fc .word 0x2000f7fc
8014990: 2000f7f8 .word 0x2000f7f8
08014994 <tcp_timewait_input>:
* @note the segment which arrived is saved in global variables, therefore only the pcb
* involved is passed as a parameter to this function
*/
static void
tcp_timewait_input(struct tcp_pcb *pcb)
{
8014994: b580 push {r7, lr}
8014996: b086 sub sp, #24
8014998: af04 add r7, sp, #16
801499a: 6078 str r0, [r7, #4]
/* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */
/* RFC 793 3.9 Event Processing - Segment Arrives:
* - first check sequence number - we skip that one in TIME_WAIT (always
* acceptable since we only send ACKs)
* - second check the RST bit (... return) */
if (flags & TCP_RST) {
801499c: 4b30 ldr r3, [pc, #192] ; (8014a60 <tcp_timewait_input+0xcc>)
801499e: 781b ldrb r3, [r3, #0]
80149a0: f003 0304 and.w r3, r3, #4
80149a4: 2b00 cmp r3, #0
80149a6: d154 bne.n 8014a52 <tcp_timewait_input+0xbe>
return;
}
LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
80149a8: 687b ldr r3, [r7, #4]
80149aa: 2b00 cmp r3, #0
80149ac: d106 bne.n 80149bc <tcp_timewait_input+0x28>
80149ae: 4b2d ldr r3, [pc, #180] ; (8014a64 <tcp_timewait_input+0xd0>)
80149b0: f240 22ee movw r2, #750 ; 0x2ee
80149b4: 492c ldr r1, [pc, #176] ; (8014a68 <tcp_timewait_input+0xd4>)
80149b6: 482d ldr r0, [pc, #180] ; (8014a6c <tcp_timewait_input+0xd8>)
80149b8: f008 f99e bl 801ccf8 <iprintf>
/* - fourth, check the SYN bit, */
if (flags & TCP_SYN) {
80149bc: 4b28 ldr r3, [pc, #160] ; (8014a60 <tcp_timewait_input+0xcc>)
80149be: 781b ldrb r3, [r3, #0]
80149c0: f003 0302 and.w r3, r3, #2
80149c4: 2b00 cmp r3, #0
80149c6: d02a beq.n 8014a1e <tcp_timewait_input+0x8a>
/* If an incoming segment is not acceptable, an acknowledgment
should be sent in reply */
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) {
80149c8: 4b29 ldr r3, [pc, #164] ; (8014a70 <tcp_timewait_input+0xdc>)
80149ca: 681a ldr r2, [r3, #0]
80149cc: 687b ldr r3, [r7, #4]
80149ce: 6a5b ldr r3, [r3, #36] ; 0x24
80149d0: 1ad3 subs r3, r2, r3
80149d2: 2b00 cmp r3, #0
80149d4: db2d blt.n 8014a32 <tcp_timewait_input+0x9e>
80149d6: 4b26 ldr r3, [pc, #152] ; (8014a70 <tcp_timewait_input+0xdc>)
80149d8: 681a ldr r2, [r3, #0]
80149da: 687b ldr r3, [r7, #4]
80149dc: 6a5b ldr r3, [r3, #36] ; 0x24
80149de: 6879 ldr r1, [r7, #4]
80149e0: 8d09 ldrh r1, [r1, #40] ; 0x28
80149e2: 440b add r3, r1
80149e4: 1ad3 subs r3, r2, r3
80149e6: 2b00 cmp r3, #0
80149e8: dc23 bgt.n 8014a32 <tcp_timewait_input+0x9e>
/* If the SYN is in the window it is an error, send a reset */
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80149ea: 4b22 ldr r3, [pc, #136] ; (8014a74 <tcp_timewait_input+0xe0>)
80149ec: 6819 ldr r1, [r3, #0]
80149ee: 4b22 ldr r3, [pc, #136] ; (8014a78 <tcp_timewait_input+0xe4>)
80149f0: 881b ldrh r3, [r3, #0]
80149f2: 461a mov r2, r3
80149f4: 4b1e ldr r3, [pc, #120] ; (8014a70 <tcp_timewait_input+0xdc>)
80149f6: 681b ldr r3, [r3, #0]
80149f8: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
80149fa: 4b20 ldr r3, [pc, #128] ; (8014a7c <tcp_timewait_input+0xe8>)
80149fc: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
80149fe: 885b ldrh r3, [r3, #2]
8014a00: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014a02: 4a1e ldr r2, [pc, #120] ; (8014a7c <tcp_timewait_input+0xe8>)
8014a04: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014a06: 8812 ldrh r2, [r2, #0]
8014a08: b292 uxth r2, r2
8014a0a: 9202 str r2, [sp, #8]
8014a0c: 9301 str r3, [sp, #4]
8014a0e: 4b1c ldr r3, [pc, #112] ; (8014a80 <tcp_timewait_input+0xec>)
8014a10: 9300 str r3, [sp, #0]
8014a12: 4b1c ldr r3, [pc, #112] ; (8014a84 <tcp_timewait_input+0xf0>)
8014a14: 4602 mov r2, r0
8014a16: 6878 ldr r0, [r7, #4]
8014a18: f002 fe82 bl 8017720 <tcp_rst>
return;
8014a1c: e01c b.n 8014a58 <tcp_timewait_input+0xc4>
}
} else if (flags & TCP_FIN) {
8014a1e: 4b10 ldr r3, [pc, #64] ; (8014a60 <tcp_timewait_input+0xcc>)
8014a20: 781b ldrb r3, [r3, #0]
8014a22: f003 0301 and.w r3, r3, #1
8014a26: 2b00 cmp r3, #0
8014a28: d003 beq.n 8014a32 <tcp_timewait_input+0x9e>
/* - eighth, check the FIN bit: Remain in the TIME-WAIT state.
Restart the 2 MSL time-wait timeout.*/
pcb->tmr = tcp_ticks;
8014a2a: 4b17 ldr r3, [pc, #92] ; (8014a88 <tcp_timewait_input+0xf4>)
8014a2c: 681a ldr r2, [r3, #0]
8014a2e: 687b ldr r3, [r7, #4]
8014a30: 621a str r2, [r3, #32]
}
if ((tcplen > 0)) {
8014a32: 4b11 ldr r3, [pc, #68] ; (8014a78 <tcp_timewait_input+0xe4>)
8014a34: 881b ldrh r3, [r3, #0]
8014a36: 2b00 cmp r3, #0
8014a38: d00d beq.n 8014a56 <tcp_timewait_input+0xc2>
/* Acknowledge data, FIN or out-of-window SYN */
tcp_ack_now(pcb);
8014a3a: 687b ldr r3, [r7, #4]
8014a3c: 8b5b ldrh r3, [r3, #26]
8014a3e: f043 0302 orr.w r3, r3, #2
8014a42: b29a uxth r2, r3
8014a44: 687b ldr r3, [r7, #4]
8014a46: 835a strh r2, [r3, #26]
tcp_output(pcb);
8014a48: 6878 ldr r0, [r7, #4]
8014a4a: f002 f8a3 bl 8016b94 <tcp_output>
}
return;
8014a4e: bf00 nop
8014a50: e001 b.n 8014a56 <tcp_timewait_input+0xc2>
return;
8014a52: bf00 nop
8014a54: e000 b.n 8014a58 <tcp_timewait_input+0xc4>
return;
8014a56: bf00 nop
}
8014a58: 3708 adds r7, #8
8014a5a: 46bd mov sp, r7
8014a5c: bd80 pop {r7, pc}
8014a5e: bf00 nop
8014a60: 20008758 .word 0x20008758
8014a64: 0801f2f0 .word 0x0801f2f0
8014a68: 0801f508 .word 0x0801f508
8014a6c: 0801f33c .word 0x0801f33c
8014a70: 2000874c .word 0x2000874c
8014a74: 20008750 .word 0x20008750
8014a78: 20008756 .word 0x20008756
8014a7c: 2000873c .word 0x2000873c
8014a80: 2000c0d8 .word 0x2000c0d8
8014a84: 2000c0dc .word 0x2000c0dc
8014a88: 2000f800 .word 0x2000f800
08014a8c <tcp_process>:
* @note the segment which arrived is saved in global variables, therefore only the pcb
* involved is passed as a parameter to this function
*/
static err_t
tcp_process(struct tcp_pcb *pcb)
{
8014a8c: b590 push {r4, r7, lr}
8014a8e: b08d sub sp, #52 ; 0x34
8014a90: af04 add r7, sp, #16
8014a92: 6078 str r0, [r7, #4]
struct tcp_seg *rseg;
u8_t acceptable = 0;
8014a94: 2300 movs r3, #0
8014a96: 76fb strb r3, [r7, #27]
err_t err;
err = ERR_OK;
8014a98: 2300 movs r3, #0
8014a9a: 76bb strb r3, [r7, #26]
LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
8014a9c: 687b ldr r3, [r7, #4]
8014a9e: 2b00 cmp r3, #0
8014aa0: d106 bne.n 8014ab0 <tcp_process+0x24>
8014aa2: 4ba5 ldr r3, [pc, #660] ; (8014d38 <tcp_process+0x2ac>)
8014aa4: f44f 7247 mov.w r2, #796 ; 0x31c
8014aa8: 49a4 ldr r1, [pc, #656] ; (8014d3c <tcp_process+0x2b0>)
8014aaa: 48a5 ldr r0, [pc, #660] ; (8014d40 <tcp_process+0x2b4>)
8014aac: f008 f924 bl 801ccf8 <iprintf>
/* Process incoming RST segments. */
if (flags & TCP_RST) {
8014ab0: 4ba4 ldr r3, [pc, #656] ; (8014d44 <tcp_process+0x2b8>)
8014ab2: 781b ldrb r3, [r3, #0]
8014ab4: f003 0304 and.w r3, r3, #4
8014ab8: 2b00 cmp r3, #0
8014aba: d04e beq.n 8014b5a <tcp_process+0xce>
/* First, determine if the reset is acceptable. */
if (pcb->state == SYN_SENT) {
8014abc: 687b ldr r3, [r7, #4]
8014abe: 7d1b ldrb r3, [r3, #20]
8014ac0: 2b02 cmp r3, #2
8014ac2: d108 bne.n 8014ad6 <tcp_process+0x4a>
/* "In the SYN-SENT state (a RST received in response to an initial SYN),
the RST is acceptable if the ACK field acknowledges the SYN." */
if (ackno == pcb->snd_nxt) {
8014ac4: 687b ldr r3, [r7, #4]
8014ac6: 6d1a ldr r2, [r3, #80] ; 0x50
8014ac8: 4b9f ldr r3, [pc, #636] ; (8014d48 <tcp_process+0x2bc>)
8014aca: 681b ldr r3, [r3, #0]
8014acc: 429a cmp r2, r3
8014ace: d123 bne.n 8014b18 <tcp_process+0x8c>
acceptable = 1;
8014ad0: 2301 movs r3, #1
8014ad2: 76fb strb r3, [r7, #27]
8014ad4: e020 b.n 8014b18 <tcp_process+0x8c>
}
} else {
/* "In all states except SYN-SENT, all reset (RST) segments are validated
by checking their SEQ-fields." */
if (seqno == pcb->rcv_nxt) {
8014ad6: 687b ldr r3, [r7, #4]
8014ad8: 6a5a ldr r2, [r3, #36] ; 0x24
8014ada: 4b9c ldr r3, [pc, #624] ; (8014d4c <tcp_process+0x2c0>)
8014adc: 681b ldr r3, [r3, #0]
8014ade: 429a cmp r2, r3
8014ae0: d102 bne.n 8014ae8 <tcp_process+0x5c>
acceptable = 1;
8014ae2: 2301 movs r3, #1
8014ae4: 76fb strb r3, [r7, #27]
8014ae6: e017 b.n 8014b18 <tcp_process+0x8c>
} else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8014ae8: 4b98 ldr r3, [pc, #608] ; (8014d4c <tcp_process+0x2c0>)
8014aea: 681a ldr r2, [r3, #0]
8014aec: 687b ldr r3, [r7, #4]
8014aee: 6a5b ldr r3, [r3, #36] ; 0x24
8014af0: 1ad3 subs r3, r2, r3
8014af2: 2b00 cmp r3, #0
8014af4: db10 blt.n 8014b18 <tcp_process+0x8c>
8014af6: 4b95 ldr r3, [pc, #596] ; (8014d4c <tcp_process+0x2c0>)
8014af8: 681a ldr r2, [r3, #0]
8014afa: 687b ldr r3, [r7, #4]
8014afc: 6a5b ldr r3, [r3, #36] ; 0x24
8014afe: 6879 ldr r1, [r7, #4]
8014b00: 8d09 ldrh r1, [r1, #40] ; 0x28
8014b02: 440b add r3, r1
8014b04: 1ad3 subs r3, r2, r3
8014b06: 2b00 cmp r3, #0
8014b08: dc06 bgt.n 8014b18 <tcp_process+0x8c>
pcb->rcv_nxt + pcb->rcv_wnd)) {
/* If the sequence number is inside the window, we send a challenge ACK
and wait for a re-send with matching sequence number.
This follows RFC 5961 section 3.2 and addresses CVE-2004-0230
(RST spoofing attack), which is present in RFC 793 RST handling. */
tcp_ack_now(pcb);
8014b0a: 687b ldr r3, [r7, #4]
8014b0c: 8b5b ldrh r3, [r3, #26]
8014b0e: f043 0302 orr.w r3, r3, #2
8014b12: b29a uxth r2, r3
8014b14: 687b ldr r3, [r7, #4]
8014b16: 835a strh r2, [r3, #26]
}
}
if (acceptable) {
8014b18: 7efb ldrb r3, [r7, #27]
8014b1a: 2b00 cmp r3, #0
8014b1c: d01b beq.n 8014b56 <tcp_process+0xca>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n"));
LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
8014b1e: 687b ldr r3, [r7, #4]
8014b20: 7d1b ldrb r3, [r3, #20]
8014b22: 2b00 cmp r3, #0
8014b24: d106 bne.n 8014b34 <tcp_process+0xa8>
8014b26: 4b84 ldr r3, [pc, #528] ; (8014d38 <tcp_process+0x2ac>)
8014b28: f44f 724e mov.w r2, #824 ; 0x338
8014b2c: 4988 ldr r1, [pc, #544] ; (8014d50 <tcp_process+0x2c4>)
8014b2e: 4884 ldr r0, [pc, #528] ; (8014d40 <tcp_process+0x2b4>)
8014b30: f008 f8e2 bl 801ccf8 <iprintf>
recv_flags |= TF_RESET;
8014b34: 4b87 ldr r3, [pc, #540] ; (8014d54 <tcp_process+0x2c8>)
8014b36: 781b ldrb r3, [r3, #0]
8014b38: f043 0308 orr.w r3, r3, #8
8014b3c: b2da uxtb r2, r3
8014b3e: 4b85 ldr r3, [pc, #532] ; (8014d54 <tcp_process+0x2c8>)
8014b40: 701a strb r2, [r3, #0]
tcp_clear_flags(pcb, TF_ACK_DELAY);
8014b42: 687b ldr r3, [r7, #4]
8014b44: 8b5b ldrh r3, [r3, #26]
8014b46: f023 0301 bic.w r3, r3, #1
8014b4a: b29a uxth r2, r3
8014b4c: 687b ldr r3, [r7, #4]
8014b4e: 835a strh r2, [r3, #26]
return ERR_RST;
8014b50: f06f 030d mvn.w r3, #13
8014b54: e37a b.n 801524c <tcp_process+0x7c0>
} else {
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n",
seqno, pcb->rcv_nxt));
LWIP_DEBUGF(TCP_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n",
seqno, pcb->rcv_nxt));
return ERR_OK;
8014b56: 2300 movs r3, #0
8014b58: e378 b.n 801524c <tcp_process+0x7c0>
}
}
if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) {
8014b5a: 4b7a ldr r3, [pc, #488] ; (8014d44 <tcp_process+0x2b8>)
8014b5c: 781b ldrb r3, [r3, #0]
8014b5e: f003 0302 and.w r3, r3, #2
8014b62: 2b00 cmp r3, #0
8014b64: d010 beq.n 8014b88 <tcp_process+0xfc>
8014b66: 687b ldr r3, [r7, #4]
8014b68: 7d1b ldrb r3, [r3, #20]
8014b6a: 2b02 cmp r3, #2
8014b6c: d00c beq.n 8014b88 <tcp_process+0xfc>
8014b6e: 687b ldr r3, [r7, #4]
8014b70: 7d1b ldrb r3, [r3, #20]
8014b72: 2b03 cmp r3, #3
8014b74: d008 beq.n 8014b88 <tcp_process+0xfc>
/* Cope with new connection attempt after remote end crashed */
tcp_ack_now(pcb);
8014b76: 687b ldr r3, [r7, #4]
8014b78: 8b5b ldrh r3, [r3, #26]
8014b7a: f043 0302 orr.w r3, r3, #2
8014b7e: b29a uxth r2, r3
8014b80: 687b ldr r3, [r7, #4]
8014b82: 835a strh r2, [r3, #26]
return ERR_OK;
8014b84: 2300 movs r3, #0
8014b86: e361 b.n 801524c <tcp_process+0x7c0>
}
if ((pcb->flags & TF_RXCLOSED) == 0) {
8014b88: 687b ldr r3, [r7, #4]
8014b8a: 8b5b ldrh r3, [r3, #26]
8014b8c: f003 0310 and.w r3, r3, #16
8014b90: 2b00 cmp r3, #0
8014b92: d103 bne.n 8014b9c <tcp_process+0x110>
/* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */
pcb->tmr = tcp_ticks;
8014b94: 4b70 ldr r3, [pc, #448] ; (8014d58 <tcp_process+0x2cc>)
8014b96: 681a ldr r2, [r3, #0]
8014b98: 687b ldr r3, [r7, #4]
8014b9a: 621a str r2, [r3, #32]
}
pcb->keep_cnt_sent = 0;
8014b9c: 687b ldr r3, [r7, #4]
8014b9e: 2200 movs r2, #0
8014ba0: f883 209b strb.w r2, [r3, #155] ; 0x9b
pcb->persist_probe = 0;
8014ba4: 687b ldr r3, [r7, #4]
8014ba6: 2200 movs r2, #0
8014ba8: f883 209a strb.w r2, [r3, #154] ; 0x9a
tcp_parseopt(pcb);
8014bac: 6878 ldr r0, [r7, #4]
8014bae: f001 fc2d bl 801640c <tcp_parseopt>
/* Do different things depending on the TCP state. */
switch (pcb->state) {
8014bb2: 687b ldr r3, [r7, #4]
8014bb4: 7d1b ldrb r3, [r3, #20]
8014bb6: 3b02 subs r3, #2
8014bb8: 2b07 cmp r3, #7
8014bba: f200 8337 bhi.w 801522c <tcp_process+0x7a0>
8014bbe: a201 add r2, pc, #4 ; (adr r2, 8014bc4 <tcp_process+0x138>)
8014bc0: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8014bc4: 08014be5 .word 0x08014be5
8014bc8: 08014e15 .word 0x08014e15
8014bcc: 08014f8d .word 0x08014f8d
8014bd0: 08014fb7 .word 0x08014fb7
8014bd4: 080150db .word 0x080150db
8014bd8: 08014f8d .word 0x08014f8d
8014bdc: 08015167 .word 0x08015167
8014be0: 080151f7 .word 0x080151f7
case SYN_SENT:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno,
pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno)));
/* received SYN ACK with expected sequence number? */
if ((flags & TCP_ACK) && (flags & TCP_SYN)
8014be4: 4b57 ldr r3, [pc, #348] ; (8014d44 <tcp_process+0x2b8>)
8014be6: 781b ldrb r3, [r3, #0]
8014be8: f003 0310 and.w r3, r3, #16
8014bec: 2b00 cmp r3, #0
8014bee: f000 80e4 beq.w 8014dba <tcp_process+0x32e>
8014bf2: 4b54 ldr r3, [pc, #336] ; (8014d44 <tcp_process+0x2b8>)
8014bf4: 781b ldrb r3, [r3, #0]
8014bf6: f003 0302 and.w r3, r3, #2
8014bfa: 2b00 cmp r3, #0
8014bfc: f000 80dd beq.w 8014dba <tcp_process+0x32e>
&& (ackno == pcb->lastack + 1)) {
8014c00: 687b ldr r3, [r7, #4]
8014c02: 6c5b ldr r3, [r3, #68] ; 0x44
8014c04: 1c5a adds r2, r3, #1
8014c06: 4b50 ldr r3, [pc, #320] ; (8014d48 <tcp_process+0x2bc>)
8014c08: 681b ldr r3, [r3, #0]
8014c0a: 429a cmp r2, r3
8014c0c: f040 80d5 bne.w 8014dba <tcp_process+0x32e>
pcb->rcv_nxt = seqno + 1;
8014c10: 4b4e ldr r3, [pc, #312] ; (8014d4c <tcp_process+0x2c0>)
8014c12: 681b ldr r3, [r3, #0]
8014c14: 1c5a adds r2, r3, #1
8014c16: 687b ldr r3, [r7, #4]
8014c18: 625a str r2, [r3, #36] ; 0x24
pcb->rcv_ann_right_edge = pcb->rcv_nxt;
8014c1a: 687b ldr r3, [r7, #4]
8014c1c: 6a5a ldr r2, [r3, #36] ; 0x24
8014c1e: 687b ldr r3, [r7, #4]
8014c20: 62da str r2, [r3, #44] ; 0x2c
pcb->lastack = ackno;
8014c22: 4b49 ldr r3, [pc, #292] ; (8014d48 <tcp_process+0x2bc>)
8014c24: 681a ldr r2, [r3, #0]
8014c26: 687b ldr r3, [r7, #4]
8014c28: 645a str r2, [r3, #68] ; 0x44
pcb->snd_wnd = tcphdr->wnd;
8014c2a: 4b4c ldr r3, [pc, #304] ; (8014d5c <tcp_process+0x2d0>)
8014c2c: 681b ldr r3, [r3, #0]
8014c2e: 89db ldrh r3, [r3, #14]
8014c30: b29a uxth r2, r3
8014c32: 687b ldr r3, [r7, #4]
8014c34: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
pcb->snd_wnd_max = pcb->snd_wnd;
8014c38: 687b ldr r3, [r7, #4]
8014c3a: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8014c3e: 687b ldr r3, [r7, #4]
8014c40: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
8014c44: 4b41 ldr r3, [pc, #260] ; (8014d4c <tcp_process+0x2c0>)
8014c46: 681b ldr r3, [r3, #0]
8014c48: 1e5a subs r2, r3, #1
8014c4a: 687b ldr r3, [r7, #4]
8014c4c: 655a str r2, [r3, #84] ; 0x54
pcb->state = ESTABLISHED;
8014c4e: 687b ldr r3, [r7, #4]
8014c50: 2204 movs r2, #4
8014c52: 751a strb r2, [r3, #20]
#if TCP_CALCULATE_EFF_SEND_MSS
pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip);
8014c54: 687b ldr r3, [r7, #4]
8014c56: 8e5c ldrh r4, [r3, #50] ; 0x32
8014c58: 687b ldr r3, [r7, #4]
8014c5a: 3304 adds r3, #4
8014c5c: 4618 mov r0, r3
8014c5e: f006 fcd7 bl 801b610 <ip4_route>
8014c62: 4601 mov r1, r0
8014c64: 687b ldr r3, [r7, #4]
8014c66: 3304 adds r3, #4
8014c68: 461a mov r2, r3
8014c6a: 4620 mov r0, r4
8014c6c: f7ff f88e bl 8013d8c <tcp_eff_send_mss_netif>
8014c70: 4603 mov r3, r0
8014c72: 461a mov r2, r3
8014c74: 687b ldr r3, [r7, #4]
8014c76: 865a strh r2, [r3, #50] ; 0x32
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
8014c78: 687b ldr r3, [r7, #4]
8014c7a: 8e5b ldrh r3, [r3, #50] ; 0x32
8014c7c: 009a lsls r2, r3, #2
8014c7e: 687b ldr r3, [r7, #4]
8014c80: 8e5b ldrh r3, [r3, #50] ; 0x32
8014c82: 005b lsls r3, r3, #1
8014c84: f241 111c movw r1, #4380 ; 0x111c
8014c88: 428b cmp r3, r1
8014c8a: bf38 it cc
8014c8c: 460b movcc r3, r1
8014c8e: 429a cmp r2, r3
8014c90: d204 bcs.n 8014c9c <tcp_process+0x210>
8014c92: 687b ldr r3, [r7, #4]
8014c94: 8e5b ldrh r3, [r3, #50] ; 0x32
8014c96: 009b lsls r3, r3, #2
8014c98: b29b uxth r3, r3
8014c9a: e00d b.n 8014cb8 <tcp_process+0x22c>
8014c9c: 687b ldr r3, [r7, #4]
8014c9e: 8e5b ldrh r3, [r3, #50] ; 0x32
8014ca0: 005b lsls r3, r3, #1
8014ca2: f241 121c movw r2, #4380 ; 0x111c
8014ca6: 4293 cmp r3, r2
8014ca8: d904 bls.n 8014cb4 <tcp_process+0x228>
8014caa: 687b ldr r3, [r7, #4]
8014cac: 8e5b ldrh r3, [r3, #50] ; 0x32
8014cae: 005b lsls r3, r3, #1
8014cb0: b29b uxth r3, r3
8014cb2: e001 b.n 8014cb8 <tcp_process+0x22c>
8014cb4: f241 131c movw r3, #4380 ; 0x111c
8014cb8: 687a ldr r2, [r7, #4]
8014cba: f8a2 3048 strh.w r3, [r2, #72] ; 0x48
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F
" ssthresh %"TCPWNDSIZE_F"\n",
pcb->cwnd, pcb->ssthresh));
LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0));
8014cbe: 687b ldr r3, [r7, #4]
8014cc0: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8014cc4: 2b00 cmp r3, #0
8014cc6: d106 bne.n 8014cd6 <tcp_process+0x24a>
8014cc8: 4b1b ldr r3, [pc, #108] ; (8014d38 <tcp_process+0x2ac>)
8014cca: f44f 725b mov.w r2, #876 ; 0x36c
8014cce: 4924 ldr r1, [pc, #144] ; (8014d60 <tcp_process+0x2d4>)
8014cd0: 481b ldr r0, [pc, #108] ; (8014d40 <tcp_process+0x2b4>)
8014cd2: f008 f811 bl 801ccf8 <iprintf>
--pcb->snd_queuelen;
8014cd6: 687b ldr r3, [r7, #4]
8014cd8: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8014cdc: 3b01 subs r3, #1
8014cde: b29a uxth r2, r3
8014ce0: 687b ldr r3, [r7, #4]
8014ce2: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen));
rseg = pcb->unacked;
8014ce6: 687b ldr r3, [r7, #4]
8014ce8: 6f1b ldr r3, [r3, #112] ; 0x70
8014cea: 61fb str r3, [r7, #28]
if (rseg == NULL) {
8014cec: 69fb ldr r3, [r7, #28]
8014cee: 2b00 cmp r3, #0
8014cf0: d111 bne.n 8014d16 <tcp_process+0x28a>
/* might happen if tcp_output fails in tcp_rexmit_rto()
in which case the segment is on the unsent list */
rseg = pcb->unsent;
8014cf2: 687b ldr r3, [r7, #4]
8014cf4: 6edb ldr r3, [r3, #108] ; 0x6c
8014cf6: 61fb str r3, [r7, #28]
LWIP_ASSERT("no segment to free", rseg != NULL);
8014cf8: 69fb ldr r3, [r7, #28]
8014cfa: 2b00 cmp r3, #0
8014cfc: d106 bne.n 8014d0c <tcp_process+0x280>
8014cfe: 4b0e ldr r3, [pc, #56] ; (8014d38 <tcp_process+0x2ac>)
8014d00: f44f 725d mov.w r2, #884 ; 0x374
8014d04: 4917 ldr r1, [pc, #92] ; (8014d64 <tcp_process+0x2d8>)
8014d06: 480e ldr r0, [pc, #56] ; (8014d40 <tcp_process+0x2b4>)
8014d08: f007 fff6 bl 801ccf8 <iprintf>
pcb->unsent = rseg->next;
8014d0c: 69fb ldr r3, [r7, #28]
8014d0e: 681a ldr r2, [r3, #0]
8014d10: 687b ldr r3, [r7, #4]
8014d12: 66da str r2, [r3, #108] ; 0x6c
8014d14: e003 b.n 8014d1e <tcp_process+0x292>
} else {
pcb->unacked = rseg->next;
8014d16: 69fb ldr r3, [r7, #28]
8014d18: 681a ldr r2, [r3, #0]
8014d1a: 687b ldr r3, [r7, #4]
8014d1c: 671a str r2, [r3, #112] ; 0x70
}
tcp_seg_free(rseg);
8014d1e: 69f8 ldr r0, [r7, #28]
8014d20: f7fe fd3e bl 80137a0 <tcp_seg_free>
/* If there's nothing left to acknowledge, stop the retransmit
timer, otherwise reset it to start again */
if (pcb->unacked == NULL) {
8014d24: 687b ldr r3, [r7, #4]
8014d26: 6f1b ldr r3, [r3, #112] ; 0x70
8014d28: 2b00 cmp r3, #0
8014d2a: d11d bne.n 8014d68 <tcp_process+0x2dc>
pcb->rtime = -1;
8014d2c: 687b ldr r3, [r7, #4]
8014d2e: f64f 72ff movw r2, #65535 ; 0xffff
8014d32: 861a strh r2, [r3, #48] ; 0x30
8014d34: e01f b.n 8014d76 <tcp_process+0x2ea>
8014d36: bf00 nop
8014d38: 0801f2f0 .word 0x0801f2f0
8014d3c: 0801f528 .word 0x0801f528
8014d40: 0801f33c .word 0x0801f33c
8014d44: 20008758 .word 0x20008758
8014d48: 20008750 .word 0x20008750
8014d4c: 2000874c .word 0x2000874c
8014d50: 0801f544 .word 0x0801f544
8014d54: 20008759 .word 0x20008759
8014d58: 2000f800 .word 0x2000f800
8014d5c: 2000873c .word 0x2000873c
8014d60: 0801f564 .word 0x0801f564
8014d64: 0801f57c .word 0x0801f57c
} else {
pcb->rtime = 0;
8014d68: 687b ldr r3, [r7, #4]
8014d6a: 2200 movs r2, #0
8014d6c: 861a strh r2, [r3, #48] ; 0x30
pcb->nrtx = 0;
8014d6e: 687b ldr r3, [r7, #4]
8014d70: 2200 movs r2, #0
8014d72: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Call the user specified function to call when successfully
* connected. */
TCP_EVENT_CONNECTED(pcb, ERR_OK, err);
8014d76: 687b ldr r3, [r7, #4]
8014d78: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8014d7c: 2b00 cmp r3, #0
8014d7e: d00a beq.n 8014d96 <tcp_process+0x30a>
8014d80: 687b ldr r3, [r7, #4]
8014d82: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8014d86: 687a ldr r2, [r7, #4]
8014d88: 6910 ldr r0, [r2, #16]
8014d8a: 2200 movs r2, #0
8014d8c: 6879 ldr r1, [r7, #4]
8014d8e: 4798 blx r3
8014d90: 4603 mov r3, r0
8014d92: 76bb strb r3, [r7, #26]
8014d94: e001 b.n 8014d9a <tcp_process+0x30e>
8014d96: 2300 movs r3, #0
8014d98: 76bb strb r3, [r7, #26]
if (err == ERR_ABRT) {
8014d9a: f997 301a ldrsb.w r3, [r7, #26]
8014d9e: f113 0f0d cmn.w r3, #13
8014da2: d102 bne.n 8014daa <tcp_process+0x31e>
return ERR_ABRT;
8014da4: f06f 030c mvn.w r3, #12
8014da8: e250 b.n 801524c <tcp_process+0x7c0>
}
tcp_ack_now(pcb);
8014daa: 687b ldr r3, [r7, #4]
8014dac: 8b5b ldrh r3, [r3, #26]
8014dae: f043 0302 orr.w r3, r3, #2
8014db2: b29a uxth r2, r3
8014db4: 687b ldr r3, [r7, #4]
8014db6: 835a strh r2, [r3, #26]
if (pcb->nrtx < TCP_SYNMAXRTX) {
pcb->rtime = 0;
tcp_rexmit_rto(pcb);
}
}
break;
8014db8: e23a b.n 8015230 <tcp_process+0x7a4>
else if (flags & TCP_ACK) {
8014dba: 4b9d ldr r3, [pc, #628] ; (8015030 <tcp_process+0x5a4>)
8014dbc: 781b ldrb r3, [r3, #0]
8014dbe: f003 0310 and.w r3, r3, #16
8014dc2: 2b00 cmp r3, #0
8014dc4: f000 8234 beq.w 8015230 <tcp_process+0x7a4>
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014dc8: 4b9a ldr r3, [pc, #616] ; (8015034 <tcp_process+0x5a8>)
8014dca: 6819 ldr r1, [r3, #0]
8014dcc: 4b9a ldr r3, [pc, #616] ; (8015038 <tcp_process+0x5ac>)
8014dce: 881b ldrh r3, [r3, #0]
8014dd0: 461a mov r2, r3
8014dd2: 4b9a ldr r3, [pc, #616] ; (801503c <tcp_process+0x5b0>)
8014dd4: 681b ldr r3, [r3, #0]
8014dd6: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014dd8: 4b99 ldr r3, [pc, #612] ; (8015040 <tcp_process+0x5b4>)
8014dda: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014ddc: 885b ldrh r3, [r3, #2]
8014dde: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014de0: 4a97 ldr r2, [pc, #604] ; (8015040 <tcp_process+0x5b4>)
8014de2: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014de4: 8812 ldrh r2, [r2, #0]
8014de6: b292 uxth r2, r2
8014de8: 9202 str r2, [sp, #8]
8014dea: 9301 str r3, [sp, #4]
8014dec: 4b95 ldr r3, [pc, #596] ; (8015044 <tcp_process+0x5b8>)
8014dee: 9300 str r3, [sp, #0]
8014df0: 4b95 ldr r3, [pc, #596] ; (8015048 <tcp_process+0x5bc>)
8014df2: 4602 mov r2, r0
8014df4: 6878 ldr r0, [r7, #4]
8014df6: f002 fc93 bl 8017720 <tcp_rst>
if (pcb->nrtx < TCP_SYNMAXRTX) {
8014dfa: 687b ldr r3, [r7, #4]
8014dfc: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8014e00: 2b05 cmp r3, #5
8014e02: f200 8215 bhi.w 8015230 <tcp_process+0x7a4>
pcb->rtime = 0;
8014e06: 687b ldr r3, [r7, #4]
8014e08: 2200 movs r2, #0
8014e0a: 861a strh r2, [r3, #48] ; 0x30
tcp_rexmit_rto(pcb);
8014e0c: 6878 ldr r0, [r7, #4]
8014e0e: f002 fa51 bl 80172b4 <tcp_rexmit_rto>
break;
8014e12: e20d b.n 8015230 <tcp_process+0x7a4>
case SYN_RCVD:
if (flags & TCP_ACK) {
8014e14: 4b86 ldr r3, [pc, #536] ; (8015030 <tcp_process+0x5a4>)
8014e16: 781b ldrb r3, [r3, #0]
8014e18: f003 0310 and.w r3, r3, #16
8014e1c: 2b00 cmp r3, #0
8014e1e: f000 80a1 beq.w 8014f64 <tcp_process+0x4d8>
/* expected ACK number? */
if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8014e22: 4b84 ldr r3, [pc, #528] ; (8015034 <tcp_process+0x5a8>)
8014e24: 681a ldr r2, [r3, #0]
8014e26: 687b ldr r3, [r7, #4]
8014e28: 6c5b ldr r3, [r3, #68] ; 0x44
8014e2a: 1ad3 subs r3, r2, r3
8014e2c: 3b01 subs r3, #1
8014e2e: 2b00 cmp r3, #0
8014e30: db7e blt.n 8014f30 <tcp_process+0x4a4>
8014e32: 4b80 ldr r3, [pc, #512] ; (8015034 <tcp_process+0x5a8>)
8014e34: 681a ldr r2, [r3, #0]
8014e36: 687b ldr r3, [r7, #4]
8014e38: 6d1b ldr r3, [r3, #80] ; 0x50
8014e3a: 1ad3 subs r3, r2, r3
8014e3c: 2b00 cmp r3, #0
8014e3e: dc77 bgt.n 8014f30 <tcp_process+0x4a4>
pcb->state = ESTABLISHED;
8014e40: 687b ldr r3, [r7, #4]
8014e42: 2204 movs r2, #4
8014e44: 751a strb r2, [r3, #20]
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
if (pcb->listener == NULL) {
8014e46: 687b ldr r3, [r7, #4]
8014e48: 6fdb ldr r3, [r3, #124] ; 0x7c
8014e4a: 2b00 cmp r3, #0
8014e4c: d102 bne.n 8014e54 <tcp_process+0x3c8>
/* listen pcb might be closed by now */
err = ERR_VAL;
8014e4e: 23fa movs r3, #250 ; 0xfa
8014e50: 76bb strb r3, [r7, #26]
8014e52: e01d b.n 8014e90 <tcp_process+0x404>
} else
#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */
{
#if LWIP_CALLBACK_API
LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL);
8014e54: 687b ldr r3, [r7, #4]
8014e56: 6fdb ldr r3, [r3, #124] ; 0x7c
8014e58: 699b ldr r3, [r3, #24]
8014e5a: 2b00 cmp r3, #0
8014e5c: d106 bne.n 8014e6c <tcp_process+0x3e0>
8014e5e: 4b7b ldr r3, [pc, #492] ; (801504c <tcp_process+0x5c0>)
8014e60: f44f 726a mov.w r2, #936 ; 0x3a8
8014e64: 497a ldr r1, [pc, #488] ; (8015050 <tcp_process+0x5c4>)
8014e66: 487b ldr r0, [pc, #492] ; (8015054 <tcp_process+0x5c8>)
8014e68: f007 ff46 bl 801ccf8 <iprintf>
#endif
tcp_backlog_accepted(pcb);
/* Call the accept function. */
TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
8014e6c: 687b ldr r3, [r7, #4]
8014e6e: 6fdb ldr r3, [r3, #124] ; 0x7c
8014e70: 699b ldr r3, [r3, #24]
8014e72: 2b00 cmp r3, #0
8014e74: d00a beq.n 8014e8c <tcp_process+0x400>
8014e76: 687b ldr r3, [r7, #4]
8014e78: 6fdb ldr r3, [r3, #124] ; 0x7c
8014e7a: 699b ldr r3, [r3, #24]
8014e7c: 687a ldr r2, [r7, #4]
8014e7e: 6910 ldr r0, [r2, #16]
8014e80: 2200 movs r2, #0
8014e82: 6879 ldr r1, [r7, #4]
8014e84: 4798 blx r3
8014e86: 4603 mov r3, r0
8014e88: 76bb strb r3, [r7, #26]
8014e8a: e001 b.n 8014e90 <tcp_process+0x404>
8014e8c: 23f0 movs r3, #240 ; 0xf0
8014e8e: 76bb strb r3, [r7, #26]
}
if (err != ERR_OK) {
8014e90: f997 301a ldrsb.w r3, [r7, #26]
8014e94: 2b00 cmp r3, #0
8014e96: d00a beq.n 8014eae <tcp_process+0x422>
/* If the accept function returns with an error, we abort
* the connection. */
/* Already aborted? */
if (err != ERR_ABRT) {
8014e98: f997 301a ldrsb.w r3, [r7, #26]
8014e9c: f113 0f0d cmn.w r3, #13
8014ea0: d002 beq.n 8014ea8 <tcp_process+0x41c>
tcp_abort(pcb);
8014ea2: 6878 ldr r0, [r7, #4]
8014ea4: f7fd ff94 bl 8012dd0 <tcp_abort>
}
return ERR_ABRT;
8014ea8: f06f 030c mvn.w r3, #12
8014eac: e1ce b.n 801524c <tcp_process+0x7c0>
}
/* If there was any data contained within this ACK,
* we'd better pass it on to the application as well. */
tcp_receive(pcb);
8014eae: 6878 ldr r0, [r7, #4]
8014eb0: f000 fae0 bl 8015474 <tcp_receive>
/* Prevent ACK for SYN to generate a sent event */
if (recv_acked != 0) {
8014eb4: 4b68 ldr r3, [pc, #416] ; (8015058 <tcp_process+0x5cc>)
8014eb6: 881b ldrh r3, [r3, #0]
8014eb8: 2b00 cmp r3, #0
8014eba: d005 beq.n 8014ec8 <tcp_process+0x43c>
recv_acked--;
8014ebc: 4b66 ldr r3, [pc, #408] ; (8015058 <tcp_process+0x5cc>)
8014ebe: 881b ldrh r3, [r3, #0]
8014ec0: 3b01 subs r3, #1
8014ec2: b29a uxth r2, r3
8014ec4: 4b64 ldr r3, [pc, #400] ; (8015058 <tcp_process+0x5cc>)
8014ec6: 801a strh r2, [r3, #0]
}
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
8014ec8: 687b ldr r3, [r7, #4]
8014eca: 8e5b ldrh r3, [r3, #50] ; 0x32
8014ecc: 009a lsls r2, r3, #2
8014ece: 687b ldr r3, [r7, #4]
8014ed0: 8e5b ldrh r3, [r3, #50] ; 0x32
8014ed2: 005b lsls r3, r3, #1
8014ed4: f241 111c movw r1, #4380 ; 0x111c
8014ed8: 428b cmp r3, r1
8014eda: bf38 it cc
8014edc: 460b movcc r3, r1
8014ede: 429a cmp r2, r3
8014ee0: d204 bcs.n 8014eec <tcp_process+0x460>
8014ee2: 687b ldr r3, [r7, #4]
8014ee4: 8e5b ldrh r3, [r3, #50] ; 0x32
8014ee6: 009b lsls r3, r3, #2
8014ee8: b29b uxth r3, r3
8014eea: e00d b.n 8014f08 <tcp_process+0x47c>
8014eec: 687b ldr r3, [r7, #4]
8014eee: 8e5b ldrh r3, [r3, #50] ; 0x32
8014ef0: 005b lsls r3, r3, #1
8014ef2: f241 121c movw r2, #4380 ; 0x111c
8014ef6: 4293 cmp r3, r2
8014ef8: d904 bls.n 8014f04 <tcp_process+0x478>
8014efa: 687b ldr r3, [r7, #4]
8014efc: 8e5b ldrh r3, [r3, #50] ; 0x32
8014efe: 005b lsls r3, r3, #1
8014f00: b29b uxth r3, r3
8014f02: e001 b.n 8014f08 <tcp_process+0x47c>
8014f04: f241 131c movw r3, #4380 ; 0x111c
8014f08: 687a ldr r2, [r7, #4]
8014f0a: f8a2 3048 strh.w r3, [r2, #72] ; 0x48
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F
" ssthresh %"TCPWNDSIZE_F"\n",
pcb->cwnd, pcb->ssthresh));
if (recv_flags & TF_GOT_FIN) {
8014f0e: 4b53 ldr r3, [pc, #332] ; (801505c <tcp_process+0x5d0>)
8014f10: 781b ldrb r3, [r3, #0]
8014f12: f003 0320 and.w r3, r3, #32
8014f16: 2b00 cmp r3, #0
8014f18: d037 beq.n 8014f8a <tcp_process+0x4fe>
tcp_ack_now(pcb);
8014f1a: 687b ldr r3, [r7, #4]
8014f1c: 8b5b ldrh r3, [r3, #26]
8014f1e: f043 0302 orr.w r3, r3, #2
8014f22: b29a uxth r2, r3
8014f24: 687b ldr r3, [r7, #4]
8014f26: 835a strh r2, [r3, #26]
pcb->state = CLOSE_WAIT;
8014f28: 687b ldr r3, [r7, #4]
8014f2a: 2207 movs r2, #7
8014f2c: 751a strb r2, [r3, #20]
if (recv_flags & TF_GOT_FIN) {
8014f2e: e02c b.n 8014f8a <tcp_process+0x4fe>
}
} else {
/* incorrect ACK number, send RST */
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014f30: 4b40 ldr r3, [pc, #256] ; (8015034 <tcp_process+0x5a8>)
8014f32: 6819 ldr r1, [r3, #0]
8014f34: 4b40 ldr r3, [pc, #256] ; (8015038 <tcp_process+0x5ac>)
8014f36: 881b ldrh r3, [r3, #0]
8014f38: 461a mov r2, r3
8014f3a: 4b40 ldr r3, [pc, #256] ; (801503c <tcp_process+0x5b0>)
8014f3c: 681b ldr r3, [r3, #0]
8014f3e: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014f40: 4b3f ldr r3, [pc, #252] ; (8015040 <tcp_process+0x5b4>)
8014f42: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014f44: 885b ldrh r3, [r3, #2]
8014f46: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014f48: 4a3d ldr r2, [pc, #244] ; (8015040 <tcp_process+0x5b4>)
8014f4a: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014f4c: 8812 ldrh r2, [r2, #0]
8014f4e: b292 uxth r2, r2
8014f50: 9202 str r2, [sp, #8]
8014f52: 9301 str r3, [sp, #4]
8014f54: 4b3b ldr r3, [pc, #236] ; (8015044 <tcp_process+0x5b8>)
8014f56: 9300 str r3, [sp, #0]
8014f58: 4b3b ldr r3, [pc, #236] ; (8015048 <tcp_process+0x5bc>)
8014f5a: 4602 mov r2, r0
8014f5c: 6878 ldr r0, [r7, #4]
8014f5e: f002 fbdf bl 8017720 <tcp_rst>
}
} else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
/* Looks like another copy of the SYN - retransmit our SYN-ACK */
tcp_rexmit(pcb);
}
break;
8014f62: e167 b.n 8015234 <tcp_process+0x7a8>
} else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
8014f64: 4b32 ldr r3, [pc, #200] ; (8015030 <tcp_process+0x5a4>)
8014f66: 781b ldrb r3, [r3, #0]
8014f68: f003 0302 and.w r3, r3, #2
8014f6c: 2b00 cmp r3, #0
8014f6e: f000 8161 beq.w 8015234 <tcp_process+0x7a8>
8014f72: 687b ldr r3, [r7, #4]
8014f74: 6a5b ldr r3, [r3, #36] ; 0x24
8014f76: 1e5a subs r2, r3, #1
8014f78: 4b30 ldr r3, [pc, #192] ; (801503c <tcp_process+0x5b0>)
8014f7a: 681b ldr r3, [r3, #0]
8014f7c: 429a cmp r2, r3
8014f7e: f040 8159 bne.w 8015234 <tcp_process+0x7a8>
tcp_rexmit(pcb);
8014f82: 6878 ldr r0, [r7, #4]
8014f84: f002 f9b8 bl 80172f8 <tcp_rexmit>
break;
8014f88: e154 b.n 8015234 <tcp_process+0x7a8>
8014f8a: e153 b.n 8015234 <tcp_process+0x7a8>
case CLOSE_WAIT:
/* FALLTHROUGH */
case ESTABLISHED:
tcp_receive(pcb);
8014f8c: 6878 ldr r0, [r7, #4]
8014f8e: f000 fa71 bl 8015474 <tcp_receive>
if (recv_flags & TF_GOT_FIN) { /* passive close */
8014f92: 4b32 ldr r3, [pc, #200] ; (801505c <tcp_process+0x5d0>)
8014f94: 781b ldrb r3, [r3, #0]
8014f96: f003 0320 and.w r3, r3, #32
8014f9a: 2b00 cmp r3, #0
8014f9c: f000 814c beq.w 8015238 <tcp_process+0x7ac>
tcp_ack_now(pcb);
8014fa0: 687b ldr r3, [r7, #4]
8014fa2: 8b5b ldrh r3, [r3, #26]
8014fa4: f043 0302 orr.w r3, r3, #2
8014fa8: b29a uxth r2, r3
8014faa: 687b ldr r3, [r7, #4]
8014fac: 835a strh r2, [r3, #26]
pcb->state = CLOSE_WAIT;
8014fae: 687b ldr r3, [r7, #4]
8014fb0: 2207 movs r2, #7
8014fb2: 751a strb r2, [r3, #20]
}
break;
8014fb4: e140 b.n 8015238 <tcp_process+0x7ac>
case FIN_WAIT_1:
tcp_receive(pcb);
8014fb6: 6878 ldr r0, [r7, #4]
8014fb8: f000 fa5c bl 8015474 <tcp_receive>
if (recv_flags & TF_GOT_FIN) {
8014fbc: 4b27 ldr r3, [pc, #156] ; (801505c <tcp_process+0x5d0>)
8014fbe: 781b ldrb r3, [r3, #0]
8014fc0: f003 0320 and.w r3, r3, #32
8014fc4: 2b00 cmp r3, #0
8014fc6: d071 beq.n 80150ac <tcp_process+0x620>
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
8014fc8: 4b19 ldr r3, [pc, #100] ; (8015030 <tcp_process+0x5a4>)
8014fca: 781b ldrb r3, [r3, #0]
8014fcc: f003 0310 and.w r3, r3, #16
8014fd0: 2b00 cmp r3, #0
8014fd2: d060 beq.n 8015096 <tcp_process+0x60a>
8014fd4: 687b ldr r3, [r7, #4]
8014fd6: 6d1a ldr r2, [r3, #80] ; 0x50
8014fd8: 4b16 ldr r3, [pc, #88] ; (8015034 <tcp_process+0x5a8>)
8014fda: 681b ldr r3, [r3, #0]
8014fdc: 429a cmp r2, r3
8014fde: d15a bne.n 8015096 <tcp_process+0x60a>
pcb->unsent == NULL) {
8014fe0: 687b ldr r3, [r7, #4]
8014fe2: 6edb ldr r3, [r3, #108] ; 0x6c
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
8014fe4: 2b00 cmp r3, #0
8014fe6: d156 bne.n 8015096 <tcp_process+0x60a>
LWIP_DEBUGF(TCP_DEBUG,
("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
tcp_ack_now(pcb);
8014fe8: 687b ldr r3, [r7, #4]
8014fea: 8b5b ldrh r3, [r3, #26]
8014fec: f043 0302 orr.w r3, r3, #2
8014ff0: b29a uxth r2, r3
8014ff2: 687b ldr r3, [r7, #4]
8014ff4: 835a strh r2, [r3, #26]
tcp_pcb_purge(pcb);
8014ff6: 6878 ldr r0, [r7, #4]
8014ff8: f7fe fdbe bl 8013b78 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8014ffc: 4b18 ldr r3, [pc, #96] ; (8015060 <tcp_process+0x5d4>)
8014ffe: 681b ldr r3, [r3, #0]
8015000: 687a ldr r2, [r7, #4]
8015002: 429a cmp r2, r3
8015004: d105 bne.n 8015012 <tcp_process+0x586>
8015006: 4b16 ldr r3, [pc, #88] ; (8015060 <tcp_process+0x5d4>)
8015008: 681b ldr r3, [r3, #0]
801500a: 68db ldr r3, [r3, #12]
801500c: 4a14 ldr r2, [pc, #80] ; (8015060 <tcp_process+0x5d4>)
801500e: 6013 str r3, [r2, #0]
8015010: e02e b.n 8015070 <tcp_process+0x5e4>
8015012: 4b13 ldr r3, [pc, #76] ; (8015060 <tcp_process+0x5d4>)
8015014: 681b ldr r3, [r3, #0]
8015016: 617b str r3, [r7, #20]
8015018: e027 b.n 801506a <tcp_process+0x5de>
801501a: 697b ldr r3, [r7, #20]
801501c: 68db ldr r3, [r3, #12]
801501e: 687a ldr r2, [r7, #4]
8015020: 429a cmp r2, r3
8015022: d11f bne.n 8015064 <tcp_process+0x5d8>
8015024: 687b ldr r3, [r7, #4]
8015026: 68da ldr r2, [r3, #12]
8015028: 697b ldr r3, [r7, #20]
801502a: 60da str r2, [r3, #12]
801502c: e020 b.n 8015070 <tcp_process+0x5e4>
801502e: bf00 nop
8015030: 20008758 .word 0x20008758
8015034: 20008750 .word 0x20008750
8015038: 20008756 .word 0x20008756
801503c: 2000874c .word 0x2000874c
8015040: 2000873c .word 0x2000873c
8015044: 2000c0d8 .word 0x2000c0d8
8015048: 2000c0dc .word 0x2000c0dc
801504c: 0801f2f0 .word 0x0801f2f0
8015050: 0801f590 .word 0x0801f590
8015054: 0801f33c .word 0x0801f33c
8015058: 20008754 .word 0x20008754
801505c: 20008759 .word 0x20008759
8015060: 2000f7fc .word 0x2000f7fc
8015064: 697b ldr r3, [r7, #20]
8015066: 68db ldr r3, [r3, #12]
8015068: 617b str r3, [r7, #20]
801506a: 697b ldr r3, [r7, #20]
801506c: 2b00 cmp r3, #0
801506e: d1d4 bne.n 801501a <tcp_process+0x58e>
8015070: 687b ldr r3, [r7, #4]
8015072: 2200 movs r2, #0
8015074: 60da str r2, [r3, #12]
8015076: 4b77 ldr r3, [pc, #476] ; (8015254 <tcp_process+0x7c8>)
8015078: 2201 movs r2, #1
801507a: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
801507c: 687b ldr r3, [r7, #4]
801507e: 220a movs r2, #10
8015080: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
8015082: 4b75 ldr r3, [pc, #468] ; (8015258 <tcp_process+0x7cc>)
8015084: 681a ldr r2, [r3, #0]
8015086: 687b ldr r3, [r7, #4]
8015088: 60da str r2, [r3, #12]
801508a: 4a73 ldr r2, [pc, #460] ; (8015258 <tcp_process+0x7cc>)
801508c: 687b ldr r3, [r7, #4]
801508e: 6013 str r3, [r2, #0]
8015090: f002 fd08 bl 8017aa4 <tcp_timer_needed>
}
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
pcb->unsent == NULL) {
pcb->state = FIN_WAIT_2;
}
break;
8015094: e0d2 b.n 801523c <tcp_process+0x7b0>
tcp_ack_now(pcb);
8015096: 687b ldr r3, [r7, #4]
8015098: 8b5b ldrh r3, [r3, #26]
801509a: f043 0302 orr.w r3, r3, #2
801509e: b29a uxth r2, r3
80150a0: 687b ldr r3, [r7, #4]
80150a2: 835a strh r2, [r3, #26]
pcb->state = CLOSING;
80150a4: 687b ldr r3, [r7, #4]
80150a6: 2208 movs r2, #8
80150a8: 751a strb r2, [r3, #20]
break;
80150aa: e0c7 b.n 801523c <tcp_process+0x7b0>
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80150ac: 4b6b ldr r3, [pc, #428] ; (801525c <tcp_process+0x7d0>)
80150ae: 781b ldrb r3, [r3, #0]
80150b0: f003 0310 and.w r3, r3, #16
80150b4: 2b00 cmp r3, #0
80150b6: f000 80c1 beq.w 801523c <tcp_process+0x7b0>
80150ba: 687b ldr r3, [r7, #4]
80150bc: 6d1a ldr r2, [r3, #80] ; 0x50
80150be: 4b68 ldr r3, [pc, #416] ; (8015260 <tcp_process+0x7d4>)
80150c0: 681b ldr r3, [r3, #0]
80150c2: 429a cmp r2, r3
80150c4: f040 80ba bne.w 801523c <tcp_process+0x7b0>
pcb->unsent == NULL) {
80150c8: 687b ldr r3, [r7, #4]
80150ca: 6edb ldr r3, [r3, #108] ; 0x6c
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80150cc: 2b00 cmp r3, #0
80150ce: f040 80b5 bne.w 801523c <tcp_process+0x7b0>
pcb->state = FIN_WAIT_2;
80150d2: 687b ldr r3, [r7, #4]
80150d4: 2206 movs r2, #6
80150d6: 751a strb r2, [r3, #20]
break;
80150d8: e0b0 b.n 801523c <tcp_process+0x7b0>
case FIN_WAIT_2:
tcp_receive(pcb);
80150da: 6878 ldr r0, [r7, #4]
80150dc: f000 f9ca bl 8015474 <tcp_receive>
if (recv_flags & TF_GOT_FIN) {
80150e0: 4b60 ldr r3, [pc, #384] ; (8015264 <tcp_process+0x7d8>)
80150e2: 781b ldrb r3, [r3, #0]
80150e4: f003 0320 and.w r3, r3, #32
80150e8: 2b00 cmp r3, #0
80150ea: f000 80a9 beq.w 8015240 <tcp_process+0x7b4>
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
tcp_ack_now(pcb);
80150ee: 687b ldr r3, [r7, #4]
80150f0: 8b5b ldrh r3, [r3, #26]
80150f2: f043 0302 orr.w r3, r3, #2
80150f6: b29a uxth r2, r3
80150f8: 687b ldr r3, [r7, #4]
80150fa: 835a strh r2, [r3, #26]
tcp_pcb_purge(pcb);
80150fc: 6878 ldr r0, [r7, #4]
80150fe: f7fe fd3b bl 8013b78 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8015102: 4b59 ldr r3, [pc, #356] ; (8015268 <tcp_process+0x7dc>)
8015104: 681b ldr r3, [r3, #0]
8015106: 687a ldr r2, [r7, #4]
8015108: 429a cmp r2, r3
801510a: d105 bne.n 8015118 <tcp_process+0x68c>
801510c: 4b56 ldr r3, [pc, #344] ; (8015268 <tcp_process+0x7dc>)
801510e: 681b ldr r3, [r3, #0]
8015110: 68db ldr r3, [r3, #12]
8015112: 4a55 ldr r2, [pc, #340] ; (8015268 <tcp_process+0x7dc>)
8015114: 6013 str r3, [r2, #0]
8015116: e013 b.n 8015140 <tcp_process+0x6b4>
8015118: 4b53 ldr r3, [pc, #332] ; (8015268 <tcp_process+0x7dc>)
801511a: 681b ldr r3, [r3, #0]
801511c: 613b str r3, [r7, #16]
801511e: e00c b.n 801513a <tcp_process+0x6ae>
8015120: 693b ldr r3, [r7, #16]
8015122: 68db ldr r3, [r3, #12]
8015124: 687a ldr r2, [r7, #4]
8015126: 429a cmp r2, r3
8015128: d104 bne.n 8015134 <tcp_process+0x6a8>
801512a: 687b ldr r3, [r7, #4]
801512c: 68da ldr r2, [r3, #12]
801512e: 693b ldr r3, [r7, #16]
8015130: 60da str r2, [r3, #12]
8015132: e005 b.n 8015140 <tcp_process+0x6b4>
8015134: 693b ldr r3, [r7, #16]
8015136: 68db ldr r3, [r3, #12]
8015138: 613b str r3, [r7, #16]
801513a: 693b ldr r3, [r7, #16]
801513c: 2b00 cmp r3, #0
801513e: d1ef bne.n 8015120 <tcp_process+0x694>
8015140: 687b ldr r3, [r7, #4]
8015142: 2200 movs r2, #0
8015144: 60da str r2, [r3, #12]
8015146: 4b43 ldr r3, [pc, #268] ; (8015254 <tcp_process+0x7c8>)
8015148: 2201 movs r2, #1
801514a: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
801514c: 687b ldr r3, [r7, #4]
801514e: 220a movs r2, #10
8015150: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
8015152: 4b41 ldr r3, [pc, #260] ; (8015258 <tcp_process+0x7cc>)
8015154: 681a ldr r2, [r3, #0]
8015156: 687b ldr r3, [r7, #4]
8015158: 60da str r2, [r3, #12]
801515a: 4a3f ldr r2, [pc, #252] ; (8015258 <tcp_process+0x7cc>)
801515c: 687b ldr r3, [r7, #4]
801515e: 6013 str r3, [r2, #0]
8015160: f002 fca0 bl 8017aa4 <tcp_timer_needed>
}
break;
8015164: e06c b.n 8015240 <tcp_process+0x7b4>
case CLOSING:
tcp_receive(pcb);
8015166: 6878 ldr r0, [r7, #4]
8015168: f000 f984 bl 8015474 <tcp_receive>
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
801516c: 4b3b ldr r3, [pc, #236] ; (801525c <tcp_process+0x7d0>)
801516e: 781b ldrb r3, [r3, #0]
8015170: f003 0310 and.w r3, r3, #16
8015174: 2b00 cmp r3, #0
8015176: d065 beq.n 8015244 <tcp_process+0x7b8>
8015178: 687b ldr r3, [r7, #4]
801517a: 6d1a ldr r2, [r3, #80] ; 0x50
801517c: 4b38 ldr r3, [pc, #224] ; (8015260 <tcp_process+0x7d4>)
801517e: 681b ldr r3, [r3, #0]
8015180: 429a cmp r2, r3
8015182: d15f bne.n 8015244 <tcp_process+0x7b8>
8015184: 687b ldr r3, [r7, #4]
8015186: 6edb ldr r3, [r3, #108] ; 0x6c
8015188: 2b00 cmp r3, #0
801518a: d15b bne.n 8015244 <tcp_process+0x7b8>
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
tcp_pcb_purge(pcb);
801518c: 6878 ldr r0, [r7, #4]
801518e: f7fe fcf3 bl 8013b78 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8015192: 4b35 ldr r3, [pc, #212] ; (8015268 <tcp_process+0x7dc>)
8015194: 681b ldr r3, [r3, #0]
8015196: 687a ldr r2, [r7, #4]
8015198: 429a cmp r2, r3
801519a: d105 bne.n 80151a8 <tcp_process+0x71c>
801519c: 4b32 ldr r3, [pc, #200] ; (8015268 <tcp_process+0x7dc>)
801519e: 681b ldr r3, [r3, #0]
80151a0: 68db ldr r3, [r3, #12]
80151a2: 4a31 ldr r2, [pc, #196] ; (8015268 <tcp_process+0x7dc>)
80151a4: 6013 str r3, [r2, #0]
80151a6: e013 b.n 80151d0 <tcp_process+0x744>
80151a8: 4b2f ldr r3, [pc, #188] ; (8015268 <tcp_process+0x7dc>)
80151aa: 681b ldr r3, [r3, #0]
80151ac: 60fb str r3, [r7, #12]
80151ae: e00c b.n 80151ca <tcp_process+0x73e>
80151b0: 68fb ldr r3, [r7, #12]
80151b2: 68db ldr r3, [r3, #12]
80151b4: 687a ldr r2, [r7, #4]
80151b6: 429a cmp r2, r3
80151b8: d104 bne.n 80151c4 <tcp_process+0x738>
80151ba: 687b ldr r3, [r7, #4]
80151bc: 68da ldr r2, [r3, #12]
80151be: 68fb ldr r3, [r7, #12]
80151c0: 60da str r2, [r3, #12]
80151c2: e005 b.n 80151d0 <tcp_process+0x744>
80151c4: 68fb ldr r3, [r7, #12]
80151c6: 68db ldr r3, [r3, #12]
80151c8: 60fb str r3, [r7, #12]
80151ca: 68fb ldr r3, [r7, #12]
80151cc: 2b00 cmp r3, #0
80151ce: d1ef bne.n 80151b0 <tcp_process+0x724>
80151d0: 687b ldr r3, [r7, #4]
80151d2: 2200 movs r2, #0
80151d4: 60da str r2, [r3, #12]
80151d6: 4b1f ldr r3, [pc, #124] ; (8015254 <tcp_process+0x7c8>)
80151d8: 2201 movs r2, #1
80151da: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
80151dc: 687b ldr r3, [r7, #4]
80151de: 220a movs r2, #10
80151e0: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
80151e2: 4b1d ldr r3, [pc, #116] ; (8015258 <tcp_process+0x7cc>)
80151e4: 681a ldr r2, [r3, #0]
80151e6: 687b ldr r3, [r7, #4]
80151e8: 60da str r2, [r3, #12]
80151ea: 4a1b ldr r2, [pc, #108] ; (8015258 <tcp_process+0x7cc>)
80151ec: 687b ldr r3, [r7, #4]
80151ee: 6013 str r3, [r2, #0]
80151f0: f002 fc58 bl 8017aa4 <tcp_timer_needed>
}
break;
80151f4: e026 b.n 8015244 <tcp_process+0x7b8>
case LAST_ACK:
tcp_receive(pcb);
80151f6: 6878 ldr r0, [r7, #4]
80151f8: f000 f93c bl 8015474 <tcp_receive>
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
80151fc: 4b17 ldr r3, [pc, #92] ; (801525c <tcp_process+0x7d0>)
80151fe: 781b ldrb r3, [r3, #0]
8015200: f003 0310 and.w r3, r3, #16
8015204: 2b00 cmp r3, #0
8015206: d01f beq.n 8015248 <tcp_process+0x7bc>
8015208: 687b ldr r3, [r7, #4]
801520a: 6d1a ldr r2, [r3, #80] ; 0x50
801520c: 4b14 ldr r3, [pc, #80] ; (8015260 <tcp_process+0x7d4>)
801520e: 681b ldr r3, [r3, #0]
8015210: 429a cmp r2, r3
8015212: d119 bne.n 8015248 <tcp_process+0x7bc>
8015214: 687b ldr r3, [r7, #4]
8015216: 6edb ldr r3, [r3, #108] ; 0x6c
8015218: 2b00 cmp r3, #0
801521a: d115 bne.n 8015248 <tcp_process+0x7bc>
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
/* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */
recv_flags |= TF_CLOSED;
801521c: 4b11 ldr r3, [pc, #68] ; (8015264 <tcp_process+0x7d8>)
801521e: 781b ldrb r3, [r3, #0]
8015220: f043 0310 orr.w r3, r3, #16
8015224: b2da uxtb r2, r3
8015226: 4b0f ldr r3, [pc, #60] ; (8015264 <tcp_process+0x7d8>)
8015228: 701a strb r2, [r3, #0]
}
break;
801522a: e00d b.n 8015248 <tcp_process+0x7bc>
default:
break;
801522c: bf00 nop
801522e: e00c b.n 801524a <tcp_process+0x7be>
break;
8015230: bf00 nop
8015232: e00a b.n 801524a <tcp_process+0x7be>
break;
8015234: bf00 nop
8015236: e008 b.n 801524a <tcp_process+0x7be>
break;
8015238: bf00 nop
801523a: e006 b.n 801524a <tcp_process+0x7be>
break;
801523c: bf00 nop
801523e: e004 b.n 801524a <tcp_process+0x7be>
break;
8015240: bf00 nop
8015242: e002 b.n 801524a <tcp_process+0x7be>
break;
8015244: bf00 nop
8015246: e000 b.n 801524a <tcp_process+0x7be>
break;
8015248: bf00 nop
}
return ERR_OK;
801524a: 2300 movs r3, #0
}
801524c: 4618 mov r0, r3
801524e: 3724 adds r7, #36 ; 0x24
8015250: 46bd mov sp, r7
8015252: bd90 pop {r4, r7, pc}
8015254: 2000f7f8 .word 0x2000f7f8
8015258: 2000f80c .word 0x2000f80c
801525c: 20008758 .word 0x20008758
8015260: 20008750 .word 0x20008750
8015264: 20008759 .word 0x20008759
8015268: 2000f7fc .word 0x2000f7fc
0801526c <tcp_oos_insert_segment>:
*
* Called from tcp_receive()
*/
static void
tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next)
{
801526c: b590 push {r4, r7, lr}
801526e: b085 sub sp, #20
8015270: af00 add r7, sp, #0
8015272: 6078 str r0, [r7, #4]
8015274: 6039 str r1, [r7, #0]
struct tcp_seg *old_seg;
LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
8015276: 687b ldr r3, [r7, #4]
8015278: 2b00 cmp r3, #0
801527a: d106 bne.n 801528a <tcp_oos_insert_segment+0x1e>
801527c: 4b3b ldr r3, [pc, #236] ; (801536c <tcp_oos_insert_segment+0x100>)
801527e: f240 421f movw r2, #1055 ; 0x41f
8015282: 493b ldr r1, [pc, #236] ; (8015370 <tcp_oos_insert_segment+0x104>)
8015284: 483b ldr r0, [pc, #236] ; (8015374 <tcp_oos_insert_segment+0x108>)
8015286: f007 fd37 bl 801ccf8 <iprintf>
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
801528a: 687b ldr r3, [r7, #4]
801528c: 68db ldr r3, [r3, #12]
801528e: 899b ldrh r3, [r3, #12]
8015290: b29b uxth r3, r3
8015292: 4618 mov r0, r3
8015294: f7fb fc4c bl 8010b30 <lwip_htons>
8015298: 4603 mov r3, r0
801529a: b2db uxtb r3, r3
801529c: f003 0301 and.w r3, r3, #1
80152a0: 2b00 cmp r3, #0
80152a2: d028 beq.n 80152f6 <tcp_oos_insert_segment+0x8a>
/* received segment overlaps all following segments */
tcp_segs_free(next);
80152a4: 6838 ldr r0, [r7, #0]
80152a6: f7fe fa67 bl 8013778 <tcp_segs_free>
next = NULL;
80152aa: 2300 movs r3, #0
80152ac: 603b str r3, [r7, #0]
80152ae: e056 b.n 801535e <tcp_oos_insert_segment+0xf2>
oos queue may have segments with FIN flag */
while (next &&
TCP_SEQ_GEQ((seqno + cseg->len),
(next->tcphdr->seqno + next->len))) {
/* cseg with FIN already processed */
if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
80152b0: 683b ldr r3, [r7, #0]
80152b2: 68db ldr r3, [r3, #12]
80152b4: 899b ldrh r3, [r3, #12]
80152b6: b29b uxth r3, r3
80152b8: 4618 mov r0, r3
80152ba: f7fb fc39 bl 8010b30 <lwip_htons>
80152be: 4603 mov r3, r0
80152c0: b2db uxtb r3, r3
80152c2: f003 0301 and.w r3, r3, #1
80152c6: 2b00 cmp r3, #0
80152c8: d00d beq.n 80152e6 <tcp_oos_insert_segment+0x7a>
TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN);
80152ca: 687b ldr r3, [r7, #4]
80152cc: 68db ldr r3, [r3, #12]
80152ce: 899b ldrh r3, [r3, #12]
80152d0: b29c uxth r4, r3
80152d2: 2001 movs r0, #1
80152d4: f7fb fc2c bl 8010b30 <lwip_htons>
80152d8: 4603 mov r3, r0
80152da: 461a mov r2, r3
80152dc: 687b ldr r3, [r7, #4]
80152de: 68db ldr r3, [r3, #12]
80152e0: 4322 orrs r2, r4
80152e2: b292 uxth r2, r2
80152e4: 819a strh r2, [r3, #12]
}
old_seg = next;
80152e6: 683b ldr r3, [r7, #0]
80152e8: 60fb str r3, [r7, #12]
next = next->next;
80152ea: 683b ldr r3, [r7, #0]
80152ec: 681b ldr r3, [r3, #0]
80152ee: 603b str r3, [r7, #0]
tcp_seg_free(old_seg);
80152f0: 68f8 ldr r0, [r7, #12]
80152f2: f7fe fa55 bl 80137a0 <tcp_seg_free>
while (next &&
80152f6: 683b ldr r3, [r7, #0]
80152f8: 2b00 cmp r3, #0
80152fa: d00e beq.n 801531a <tcp_oos_insert_segment+0xae>
TCP_SEQ_GEQ((seqno + cseg->len),
80152fc: 687b ldr r3, [r7, #4]
80152fe: 891b ldrh r3, [r3, #8]
8015300: 461a mov r2, r3
8015302: 4b1d ldr r3, [pc, #116] ; (8015378 <tcp_oos_insert_segment+0x10c>)
8015304: 681b ldr r3, [r3, #0]
8015306: 441a add r2, r3
8015308: 683b ldr r3, [r7, #0]
801530a: 68db ldr r3, [r3, #12]
801530c: 685b ldr r3, [r3, #4]
801530e: 6839 ldr r1, [r7, #0]
8015310: 8909 ldrh r1, [r1, #8]
8015312: 440b add r3, r1
8015314: 1ad3 subs r3, r2, r3
while (next &&
8015316: 2b00 cmp r3, #0
8015318: daca bge.n 80152b0 <tcp_oos_insert_segment+0x44>
}
if (next &&
801531a: 683b ldr r3, [r7, #0]
801531c: 2b00 cmp r3, #0
801531e: d01e beq.n 801535e <tcp_oos_insert_segment+0xf2>
TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
8015320: 687b ldr r3, [r7, #4]
8015322: 891b ldrh r3, [r3, #8]
8015324: 461a mov r2, r3
8015326: 4b14 ldr r3, [pc, #80] ; (8015378 <tcp_oos_insert_segment+0x10c>)
8015328: 681b ldr r3, [r3, #0]
801532a: 441a add r2, r3
801532c: 683b ldr r3, [r7, #0]
801532e: 68db ldr r3, [r3, #12]
8015330: 685b ldr r3, [r3, #4]
8015332: 1ad3 subs r3, r2, r3
if (next &&
8015334: 2b00 cmp r3, #0
8015336: dd12 ble.n 801535e <tcp_oos_insert_segment+0xf2>
/* We need to trim the incoming segment. */
cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
8015338: 683b ldr r3, [r7, #0]
801533a: 68db ldr r3, [r3, #12]
801533c: 685b ldr r3, [r3, #4]
801533e: b29a uxth r2, r3
8015340: 4b0d ldr r3, [pc, #52] ; (8015378 <tcp_oos_insert_segment+0x10c>)
8015342: 681b ldr r3, [r3, #0]
8015344: b29b uxth r3, r3
8015346: 1ad3 subs r3, r2, r3
8015348: b29a uxth r2, r3
801534a: 687b ldr r3, [r7, #4]
801534c: 811a strh r2, [r3, #8]
pbuf_realloc(cseg->p, cseg->len);
801534e: 687b ldr r3, [r7, #4]
8015350: 685a ldr r2, [r3, #4]
8015352: 687b ldr r3, [r7, #4]
8015354: 891b ldrh r3, [r3, #8]
8015356: 4619 mov r1, r3
8015358: 4610 mov r0, r2
801535a: f7fc fe17 bl 8011f8c <pbuf_realloc>
}
}
cseg->next = next;
801535e: 687b ldr r3, [r7, #4]
8015360: 683a ldr r2, [r7, #0]
8015362: 601a str r2, [r3, #0]
}
8015364: bf00 nop
8015366: 3714 adds r7, #20
8015368: 46bd mov sp, r7
801536a: bd90 pop {r4, r7, pc}
801536c: 0801f2f0 .word 0x0801f2f0
8015370: 0801f5b0 .word 0x0801f5b0
8015374: 0801f33c .word 0x0801f33c
8015378: 2000874c .word 0x2000874c
0801537c <tcp_free_acked_segments>:
/** Remove segments from a list if the incoming ACK acknowledges them */
static struct tcp_seg *
tcp_free_acked_segments(struct tcp_pcb *pcb, struct tcp_seg *seg_list, const char *dbg_list_name,
struct tcp_seg *dbg_other_seg_list)
{
801537c: b5b0 push {r4, r5, r7, lr}
801537e: b086 sub sp, #24
8015380: af00 add r7, sp, #0
8015382: 60f8 str r0, [r7, #12]
8015384: 60b9 str r1, [r7, #8]
8015386: 607a str r2, [r7, #4]
8015388: 603b str r3, [r7, #0]
u16_t clen;
LWIP_UNUSED_ARG(dbg_list_name);
LWIP_UNUSED_ARG(dbg_other_seg_list);
while (seg_list != NULL &&
801538a: e03e b.n 801540a <tcp_free_acked_segments+0x8e>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->%s\n",
lwip_ntohl(seg_list->tcphdr->seqno),
lwip_ntohl(seg_list->tcphdr->seqno) + TCP_TCPLEN(seg_list),
dbg_list_name));
next = seg_list;
801538c: 68bb ldr r3, [r7, #8]
801538e: 617b str r3, [r7, #20]
seg_list = seg_list->next;
8015390: 68bb ldr r3, [r7, #8]
8015392: 681b ldr r3, [r3, #0]
8015394: 60bb str r3, [r7, #8]
clen = pbuf_clen(next->p);
8015396: 697b ldr r3, [r7, #20]
8015398: 685b ldr r3, [r3, #4]
801539a: 4618 mov r0, r3
801539c: f7fd f80a bl 80123b4 <pbuf_clen>
80153a0: 4603 mov r3, r0
80153a2: 827b strh r3, [r7, #18]
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ",
(tcpwnd_size_t)pcb->snd_queuelen));
LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen));
80153a4: 68fb ldr r3, [r7, #12]
80153a6: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
80153aa: 8a7a ldrh r2, [r7, #18]
80153ac: 429a cmp r2, r3
80153ae: d906 bls.n 80153be <tcp_free_acked_segments+0x42>
80153b0: 4b2a ldr r3, [pc, #168] ; (801545c <tcp_free_acked_segments+0xe0>)
80153b2: f240 4257 movw r2, #1111 ; 0x457
80153b6: 492a ldr r1, [pc, #168] ; (8015460 <tcp_free_acked_segments+0xe4>)
80153b8: 482a ldr r0, [pc, #168] ; (8015464 <tcp_free_acked_segments+0xe8>)
80153ba: f007 fc9d bl 801ccf8 <iprintf>
pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen);
80153be: 68fb ldr r3, [r7, #12]
80153c0: f8b3 2066 ldrh.w r2, [r3, #102] ; 0x66
80153c4: 8a7b ldrh r3, [r7, #18]
80153c6: 1ad3 subs r3, r2, r3
80153c8: b29a uxth r2, r3
80153ca: 68fb ldr r3, [r7, #12]
80153cc: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
recv_acked = (tcpwnd_size_t)(recv_acked + next->len);
80153d0: 697b ldr r3, [r7, #20]
80153d2: 891a ldrh r2, [r3, #8]
80153d4: 4b24 ldr r3, [pc, #144] ; (8015468 <tcp_free_acked_segments+0xec>)
80153d6: 881b ldrh r3, [r3, #0]
80153d8: 4413 add r3, r2
80153da: b29a uxth r2, r3
80153dc: 4b22 ldr r3, [pc, #136] ; (8015468 <tcp_free_acked_segments+0xec>)
80153de: 801a strh r2, [r3, #0]
tcp_seg_free(next);
80153e0: 6978 ldr r0, [r7, #20]
80153e2: f7fe f9dd bl 80137a0 <tcp_seg_free>
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing %s)\n",
(tcpwnd_size_t)pcb->snd_queuelen,
dbg_list_name));
if (pcb->snd_queuelen != 0) {
80153e6: 68fb ldr r3, [r7, #12]
80153e8: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
80153ec: 2b00 cmp r3, #0
80153ee: d00c beq.n 801540a <tcp_free_acked_segments+0x8e>
LWIP_ASSERT("tcp_receive: valid queue length",
80153f0: 68bb ldr r3, [r7, #8]
80153f2: 2b00 cmp r3, #0
80153f4: d109 bne.n 801540a <tcp_free_acked_segments+0x8e>
80153f6: 683b ldr r3, [r7, #0]
80153f8: 2b00 cmp r3, #0
80153fa: d106 bne.n 801540a <tcp_free_acked_segments+0x8e>
80153fc: 4b17 ldr r3, [pc, #92] ; (801545c <tcp_free_acked_segments+0xe0>)
80153fe: f240 4262 movw r2, #1122 ; 0x462
8015402: 491a ldr r1, [pc, #104] ; (801546c <tcp_free_acked_segments+0xf0>)
8015404: 4817 ldr r0, [pc, #92] ; (8015464 <tcp_free_acked_segments+0xe8>)
8015406: f007 fc77 bl 801ccf8 <iprintf>
while (seg_list != NULL &&
801540a: 68bb ldr r3, [r7, #8]
801540c: 2b00 cmp r3, #0
801540e: d020 beq.n 8015452 <tcp_free_acked_segments+0xd6>
TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
8015410: 68bb ldr r3, [r7, #8]
8015412: 68db ldr r3, [r3, #12]
8015414: 685b ldr r3, [r3, #4]
8015416: 4618 mov r0, r3
8015418: f7fb fb9f bl 8010b5a <lwip_htonl>
801541c: 4604 mov r4, r0
801541e: 68bb ldr r3, [r7, #8]
8015420: 891b ldrh r3, [r3, #8]
8015422: 461d mov r5, r3
8015424: 68bb ldr r3, [r7, #8]
8015426: 68db ldr r3, [r3, #12]
8015428: 899b ldrh r3, [r3, #12]
801542a: b29b uxth r3, r3
801542c: 4618 mov r0, r3
801542e: f7fb fb7f bl 8010b30 <lwip_htons>
8015432: 4603 mov r3, r0
8015434: b2db uxtb r3, r3
8015436: f003 0303 and.w r3, r3, #3
801543a: 2b00 cmp r3, #0
801543c: d001 beq.n 8015442 <tcp_free_acked_segments+0xc6>
801543e: 2301 movs r3, #1
8015440: e000 b.n 8015444 <tcp_free_acked_segments+0xc8>
8015442: 2300 movs r3, #0
8015444: 442b add r3, r5
8015446: 18e2 adds r2, r4, r3
8015448: 4b09 ldr r3, [pc, #36] ; (8015470 <tcp_free_acked_segments+0xf4>)
801544a: 681b ldr r3, [r3, #0]
801544c: 1ad3 subs r3, r2, r3
while (seg_list != NULL &&
801544e: 2b00 cmp r3, #0
8015450: dd9c ble.n 801538c <tcp_free_acked_segments+0x10>
seg_list != NULL || dbg_other_seg_list != NULL);
}
}
return seg_list;
8015452: 68bb ldr r3, [r7, #8]
}
8015454: 4618 mov r0, r3
8015456: 3718 adds r7, #24
8015458: 46bd mov sp, r7
801545a: bdb0 pop {r4, r5, r7, pc}
801545c: 0801f2f0 .word 0x0801f2f0
8015460: 0801f5d8 .word 0x0801f5d8
8015464: 0801f33c .word 0x0801f33c
8015468: 20008754 .word 0x20008754
801546c: 0801f600 .word 0x0801f600
8015470: 20008750 .word 0x20008750
08015474 <tcp_receive>:
*
* Called from tcp_process().
*/
static void
tcp_receive(struct tcp_pcb *pcb)
{
8015474: b5b0 push {r4, r5, r7, lr}
8015476: b094 sub sp, #80 ; 0x50
8015478: af00 add r7, sp, #0
801547a: 6078 str r0, [r7, #4]
s16_t m;
u32_t right_wnd_edge;
int found_dupack = 0;
801547c: 2300 movs r3, #0
801547e: 64bb str r3, [r7, #72] ; 0x48
LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
8015480: 687b ldr r3, [r7, #4]
8015482: 2b00 cmp r3, #0
8015484: d106 bne.n 8015494 <tcp_receive+0x20>
8015486: 4ba6 ldr r3, [pc, #664] ; (8015720 <tcp_receive+0x2ac>)
8015488: f240 427b movw r2, #1147 ; 0x47b
801548c: 49a5 ldr r1, [pc, #660] ; (8015724 <tcp_receive+0x2b0>)
801548e: 48a6 ldr r0, [pc, #664] ; (8015728 <tcp_receive+0x2b4>)
8015490: f007 fc32 bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
8015494: 687b ldr r3, [r7, #4]
8015496: 7d1b ldrb r3, [r3, #20]
8015498: 2b03 cmp r3, #3
801549a: d806 bhi.n 80154aa <tcp_receive+0x36>
801549c: 4ba0 ldr r3, [pc, #640] ; (8015720 <tcp_receive+0x2ac>)
801549e: f240 427c movw r2, #1148 ; 0x47c
80154a2: 49a2 ldr r1, [pc, #648] ; (801572c <tcp_receive+0x2b8>)
80154a4: 48a0 ldr r0, [pc, #640] ; (8015728 <tcp_receive+0x2b4>)
80154a6: f007 fc27 bl 801ccf8 <iprintf>
if (flags & TCP_ACK) {
80154aa: 4ba1 ldr r3, [pc, #644] ; (8015730 <tcp_receive+0x2bc>)
80154ac: 781b ldrb r3, [r3, #0]
80154ae: f003 0310 and.w r3, r3, #16
80154b2: 2b00 cmp r3, #0
80154b4: f000 8263 beq.w 801597e <tcp_receive+0x50a>
right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2;
80154b8: 687b ldr r3, [r7, #4]
80154ba: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
80154be: 461a mov r2, r3
80154c0: 687b ldr r3, [r7, #4]
80154c2: 6d9b ldr r3, [r3, #88] ; 0x58
80154c4: 4413 add r3, r2
80154c6: 633b str r3, [r7, #48] ; 0x30
/* Update window. */
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
80154c8: 687b ldr r3, [r7, #4]
80154ca: 6d5a ldr r2, [r3, #84] ; 0x54
80154cc: 4b99 ldr r3, [pc, #612] ; (8015734 <tcp_receive+0x2c0>)
80154ce: 681b ldr r3, [r3, #0]
80154d0: 1ad3 subs r3, r2, r3
80154d2: 2b00 cmp r3, #0
80154d4: db1b blt.n 801550e <tcp_receive+0x9a>
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
80154d6: 687b ldr r3, [r7, #4]
80154d8: 6d5a ldr r2, [r3, #84] ; 0x54
80154da: 4b96 ldr r3, [pc, #600] ; (8015734 <tcp_receive+0x2c0>)
80154dc: 681b ldr r3, [r3, #0]
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
80154de: 429a cmp r2, r3
80154e0: d106 bne.n 80154f0 <tcp_receive+0x7c>
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
80154e2: 687b ldr r3, [r7, #4]
80154e4: 6d9a ldr r2, [r3, #88] ; 0x58
80154e6: 4b94 ldr r3, [pc, #592] ; (8015738 <tcp_receive+0x2c4>)
80154e8: 681b ldr r3, [r3, #0]
80154ea: 1ad3 subs r3, r2, r3
80154ec: 2b00 cmp r3, #0
80154ee: db0e blt.n 801550e <tcp_receive+0x9a>
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
80154f0: 687b ldr r3, [r7, #4]
80154f2: 6d9a ldr r2, [r3, #88] ; 0x58
80154f4: 4b90 ldr r3, [pc, #576] ; (8015738 <tcp_receive+0x2c4>)
80154f6: 681b ldr r3, [r3, #0]
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
80154f8: 429a cmp r2, r3
80154fa: d125 bne.n 8015548 <tcp_receive+0xd4>
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
80154fc: 4b8f ldr r3, [pc, #572] ; (801573c <tcp_receive+0x2c8>)
80154fe: 681b ldr r3, [r3, #0]
8015500: 89db ldrh r3, [r3, #14]
8015502: b29a uxth r2, r3
8015504: 687b ldr r3, [r7, #4]
8015506: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
801550a: 429a cmp r2, r3
801550c: d91c bls.n 8015548 <tcp_receive+0xd4>
pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd);
801550e: 4b8b ldr r3, [pc, #556] ; (801573c <tcp_receive+0x2c8>)
8015510: 681b ldr r3, [r3, #0]
8015512: 89db ldrh r3, [r3, #14]
8015514: b29a uxth r2, r3
8015516: 687b ldr r3, [r7, #4]
8015518: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
/* keep track of the biggest window announced by the remote host to calculate
the maximum segment size */
if (pcb->snd_wnd_max < pcb->snd_wnd) {
801551c: 687b ldr r3, [r7, #4]
801551e: f8b3 2062 ldrh.w r2, [r3, #98] ; 0x62
8015522: 687b ldr r3, [r7, #4]
8015524: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8015528: 429a cmp r2, r3
801552a: d205 bcs.n 8015538 <tcp_receive+0xc4>
pcb->snd_wnd_max = pcb->snd_wnd;
801552c: 687b ldr r3, [r7, #4]
801552e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8015532: 687b ldr r3, [r7, #4]
8015534: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
}
pcb->snd_wl1 = seqno;
8015538: 4b7e ldr r3, [pc, #504] ; (8015734 <tcp_receive+0x2c0>)
801553a: 681a ldr r2, [r3, #0]
801553c: 687b ldr r3, [r7, #4]
801553e: 655a str r2, [r3, #84] ; 0x54
pcb->snd_wl2 = ackno;
8015540: 4b7d ldr r3, [pc, #500] ; (8015738 <tcp_receive+0x2c4>)
8015542: 681a ldr r2, [r3, #0]
8015544: 687b ldr r3, [r7, #4]
8015546: 659a str r2, [r3, #88] ; 0x58
* If it only passes 1, should reset dupack counter
*
*/
/* Clause 1 */
if (TCP_SEQ_LEQ(ackno, pcb->lastack)) {
8015548: 4b7b ldr r3, [pc, #492] ; (8015738 <tcp_receive+0x2c4>)
801554a: 681a ldr r2, [r3, #0]
801554c: 687b ldr r3, [r7, #4]
801554e: 6c5b ldr r3, [r3, #68] ; 0x44
8015550: 1ad3 subs r3, r2, r3
8015552: 2b00 cmp r3, #0
8015554: dc58 bgt.n 8015608 <tcp_receive+0x194>
/* Clause 2 */
if (tcplen == 0) {
8015556: 4b7a ldr r3, [pc, #488] ; (8015740 <tcp_receive+0x2cc>)
8015558: 881b ldrh r3, [r3, #0]
801555a: 2b00 cmp r3, #0
801555c: d14b bne.n 80155f6 <tcp_receive+0x182>
/* Clause 3 */
if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) {
801555e: 687b ldr r3, [r7, #4]
8015560: 6d9b ldr r3, [r3, #88] ; 0x58
8015562: 687a ldr r2, [r7, #4]
8015564: f8b2 2060 ldrh.w r2, [r2, #96] ; 0x60
8015568: 4413 add r3, r2
801556a: 6b3a ldr r2, [r7, #48] ; 0x30
801556c: 429a cmp r2, r3
801556e: d142 bne.n 80155f6 <tcp_receive+0x182>
/* Clause 4 */
if (pcb->rtime >= 0) {
8015570: 687b ldr r3, [r7, #4]
8015572: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8015576: 2b00 cmp r3, #0
8015578: db3d blt.n 80155f6 <tcp_receive+0x182>
/* Clause 5 */
if (pcb->lastack == ackno) {
801557a: 687b ldr r3, [r7, #4]
801557c: 6c5a ldr r2, [r3, #68] ; 0x44
801557e: 4b6e ldr r3, [pc, #440] ; (8015738 <tcp_receive+0x2c4>)
8015580: 681b ldr r3, [r3, #0]
8015582: 429a cmp r2, r3
8015584: d137 bne.n 80155f6 <tcp_receive+0x182>
found_dupack = 1;
8015586: 2301 movs r3, #1
8015588: 64bb str r3, [r7, #72] ; 0x48
if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) {
801558a: 687b ldr r3, [r7, #4]
801558c: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8015590: 2bff cmp r3, #255 ; 0xff
8015592: d007 beq.n 80155a4 <tcp_receive+0x130>
++pcb->dupacks;
8015594: 687b ldr r3, [r7, #4]
8015596: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
801559a: 3301 adds r3, #1
801559c: b2da uxtb r2, r3
801559e: 687b ldr r3, [r7, #4]
80155a0: f883 2043 strb.w r2, [r3, #67] ; 0x43
}
if (pcb->dupacks > 3) {
80155a4: 687b ldr r3, [r7, #4]
80155a6: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
80155aa: 2b03 cmp r3, #3
80155ac: d91b bls.n 80155e6 <tcp_receive+0x172>
/* Inflate the congestion window */
TCP_WND_INC(pcb->cwnd, pcb->mss);
80155ae: 687b ldr r3, [r7, #4]
80155b0: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80155b4: 687b ldr r3, [r7, #4]
80155b6: 8e5b ldrh r3, [r3, #50] ; 0x32
80155b8: 4413 add r3, r2
80155ba: b29a uxth r2, r3
80155bc: 687b ldr r3, [r7, #4]
80155be: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
80155c2: 429a cmp r2, r3
80155c4: d30a bcc.n 80155dc <tcp_receive+0x168>
80155c6: 687b ldr r3, [r7, #4]
80155c8: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80155cc: 687b ldr r3, [r7, #4]
80155ce: 8e5b ldrh r3, [r3, #50] ; 0x32
80155d0: 4413 add r3, r2
80155d2: b29a uxth r2, r3
80155d4: 687b ldr r3, [r7, #4]
80155d6: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
80155da: e004 b.n 80155e6 <tcp_receive+0x172>
80155dc: 687b ldr r3, [r7, #4]
80155de: f64f 72ff movw r2, #65535 ; 0xffff
80155e2: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
}
if (pcb->dupacks >= 3) {
80155e6: 687b ldr r3, [r7, #4]
80155e8: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
80155ec: 2b02 cmp r3, #2
80155ee: d902 bls.n 80155f6 <tcp_receive+0x182>
/* Do fast retransmit (checked via TF_INFR, not via dupacks count) */
tcp_rexmit_fast(pcb);
80155f0: 6878 ldr r0, [r7, #4]
80155f2: f001 feed bl 80173d0 <tcp_rexmit_fast>
}
}
}
/* If Clause (1) or more is true, but not a duplicate ack, reset
* count of consecutive duplicate acks */
if (!found_dupack) {
80155f6: 6cbb ldr r3, [r7, #72] ; 0x48
80155f8: 2b00 cmp r3, #0
80155fa: f040 8160 bne.w 80158be <tcp_receive+0x44a>
pcb->dupacks = 0;
80155fe: 687b ldr r3, [r7, #4]
8015600: 2200 movs r2, #0
8015602: f883 2043 strb.w r2, [r3, #67] ; 0x43
8015606: e15a b.n 80158be <tcp_receive+0x44a>
}
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8015608: 4b4b ldr r3, [pc, #300] ; (8015738 <tcp_receive+0x2c4>)
801560a: 681a ldr r2, [r3, #0]
801560c: 687b ldr r3, [r7, #4]
801560e: 6c5b ldr r3, [r3, #68] ; 0x44
8015610: 1ad3 subs r3, r2, r3
8015612: 3b01 subs r3, #1
8015614: 2b00 cmp r3, #0
8015616: f2c0 814d blt.w 80158b4 <tcp_receive+0x440>
801561a: 4b47 ldr r3, [pc, #284] ; (8015738 <tcp_receive+0x2c4>)
801561c: 681a ldr r2, [r3, #0]
801561e: 687b ldr r3, [r7, #4]
8015620: 6d1b ldr r3, [r3, #80] ; 0x50
8015622: 1ad3 subs r3, r2, r3
8015624: 2b00 cmp r3, #0
8015626: f300 8145 bgt.w 80158b4 <tcp_receive+0x440>
tcpwnd_size_t acked;
/* Reset the "IN Fast Retransmit" flag, since we are no longer
in fast retransmit. Also reset the congestion window to the
slow start threshold. */
if (pcb->flags & TF_INFR) {
801562a: 687b ldr r3, [r7, #4]
801562c: 8b5b ldrh r3, [r3, #26]
801562e: f003 0304 and.w r3, r3, #4
8015632: 2b00 cmp r3, #0
8015634: d010 beq.n 8015658 <tcp_receive+0x1e4>
tcp_clear_flags(pcb, TF_INFR);
8015636: 687b ldr r3, [r7, #4]
8015638: 8b5b ldrh r3, [r3, #26]
801563a: f023 0304 bic.w r3, r3, #4
801563e: b29a uxth r2, r3
8015640: 687b ldr r3, [r7, #4]
8015642: 835a strh r2, [r3, #26]
pcb->cwnd = pcb->ssthresh;
8015644: 687b ldr r3, [r7, #4]
8015646: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
801564a: 687b ldr r3, [r7, #4]
801564c: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->bytes_acked = 0;
8015650: 687b ldr r3, [r7, #4]
8015652: 2200 movs r2, #0
8015654: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
}
/* Reset the number of retransmissions. */
pcb->nrtx = 0;
8015658: 687b ldr r3, [r7, #4]
801565a: 2200 movs r2, #0
801565c: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Reset the retransmission time-out. */
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
8015660: 687b ldr r3, [r7, #4]
8015662: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8015666: 10db asrs r3, r3, #3
8015668: b21b sxth r3, r3
801566a: b29a uxth r2, r3
801566c: 687b ldr r3, [r7, #4]
801566e: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8015672: b29b uxth r3, r3
8015674: 4413 add r3, r2
8015676: b29b uxth r3, r3
8015678: b21a sxth r2, r3
801567a: 687b ldr r3, [r7, #4]
801567c: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* Record how much data this ACK acks */
acked = (tcpwnd_size_t)(ackno - pcb->lastack);
8015680: 4b2d ldr r3, [pc, #180] ; (8015738 <tcp_receive+0x2c4>)
8015682: 681b ldr r3, [r3, #0]
8015684: b29a uxth r2, r3
8015686: 687b ldr r3, [r7, #4]
8015688: 6c5b ldr r3, [r3, #68] ; 0x44
801568a: b29b uxth r3, r3
801568c: 1ad3 subs r3, r2, r3
801568e: 85fb strh r3, [r7, #46] ; 0x2e
/* Reset the fast retransmit variables. */
pcb->dupacks = 0;
8015690: 687b ldr r3, [r7, #4]
8015692: 2200 movs r2, #0
8015694: f883 2043 strb.w r2, [r3, #67] ; 0x43
pcb->lastack = ackno;
8015698: 4b27 ldr r3, [pc, #156] ; (8015738 <tcp_receive+0x2c4>)
801569a: 681a ldr r2, [r3, #0]
801569c: 687b ldr r3, [r7, #4]
801569e: 645a str r2, [r3, #68] ; 0x44
/* Update the congestion control variables (cwnd and
ssthresh). */
if (pcb->state >= ESTABLISHED) {
80156a0: 687b ldr r3, [r7, #4]
80156a2: 7d1b ldrb r3, [r3, #20]
80156a4: 2b03 cmp r3, #3
80156a6: f240 8096 bls.w 80157d6 <tcp_receive+0x362>
if (pcb->cwnd < pcb->ssthresh) {
80156aa: 687b ldr r3, [r7, #4]
80156ac: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80156b0: 687b ldr r3, [r7, #4]
80156b2: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
80156b6: 429a cmp r2, r3
80156b8: d244 bcs.n 8015744 <tcp_receive+0x2d0>
tcpwnd_size_t increase;
/* limit to 1 SMSS segment during period following RTO */
u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2;
80156ba: 687b ldr r3, [r7, #4]
80156bc: 8b5b ldrh r3, [r3, #26]
80156be: f403 6300 and.w r3, r3, #2048 ; 0x800
80156c2: 2b00 cmp r3, #0
80156c4: d001 beq.n 80156ca <tcp_receive+0x256>
80156c6: 2301 movs r3, #1
80156c8: e000 b.n 80156cc <tcp_receive+0x258>
80156ca: 2302 movs r3, #2
80156cc: f887 302d strb.w r3, [r7, #45] ; 0x2d
/* RFC 3465, section 2.2 Slow Start */
increase = LWIP_MIN(acked, (tcpwnd_size_t)(num_seg * pcb->mss));
80156d0: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
80156d4: b29a uxth r2, r3
80156d6: 687b ldr r3, [r7, #4]
80156d8: 8e5b ldrh r3, [r3, #50] ; 0x32
80156da: fb12 f303 smulbb r3, r2, r3
80156de: b29b uxth r3, r3
80156e0: 8dfa ldrh r2, [r7, #46] ; 0x2e
80156e2: 4293 cmp r3, r2
80156e4: bf28 it cs
80156e6: 4613 movcs r3, r2
80156e8: 857b strh r3, [r7, #42] ; 0x2a
TCP_WND_INC(pcb->cwnd, increase);
80156ea: 687b ldr r3, [r7, #4]
80156ec: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80156f0: 8d7b ldrh r3, [r7, #42] ; 0x2a
80156f2: 4413 add r3, r2
80156f4: b29a uxth r2, r3
80156f6: 687b ldr r3, [r7, #4]
80156f8: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
80156fc: 429a cmp r2, r3
80156fe: d309 bcc.n 8015714 <tcp_receive+0x2a0>
8015700: 687b ldr r3, [r7, #4]
8015702: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8015706: 8d7b ldrh r3, [r7, #42] ; 0x2a
8015708: 4413 add r3, r2
801570a: b29a uxth r2, r3
801570c: 687b ldr r3, [r7, #4]
801570e: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8015712: e060 b.n 80157d6 <tcp_receive+0x362>
8015714: 687b ldr r3, [r7, #4]
8015716: f64f 72ff movw r2, #65535 ; 0xffff
801571a: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
801571e: e05a b.n 80157d6 <tcp_receive+0x362>
8015720: 0801f2f0 .word 0x0801f2f0
8015724: 0801f620 .word 0x0801f620
8015728: 0801f33c .word 0x0801f33c
801572c: 0801f63c .word 0x0801f63c
8015730: 20008758 .word 0x20008758
8015734: 2000874c .word 0x2000874c
8015738: 20008750 .word 0x20008750
801573c: 2000873c .word 0x2000873c
8015740: 20008756 .word 0x20008756
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd));
} else {
/* RFC 3465, section 2.1 Congestion Avoidance */
TCP_WND_INC(pcb->bytes_acked, acked);
8015744: 687b ldr r3, [r7, #4]
8015746: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
801574a: 8dfb ldrh r3, [r7, #46] ; 0x2e
801574c: 4413 add r3, r2
801574e: b29a uxth r2, r3
8015750: 687b ldr r3, [r7, #4]
8015752: f8b3 306a ldrh.w r3, [r3, #106] ; 0x6a
8015756: 429a cmp r2, r3
8015758: d309 bcc.n 801576e <tcp_receive+0x2fa>
801575a: 687b ldr r3, [r7, #4]
801575c: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8015760: 8dfb ldrh r3, [r7, #46] ; 0x2e
8015762: 4413 add r3, r2
8015764: b29a uxth r2, r3
8015766: 687b ldr r3, [r7, #4]
8015768: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
801576c: e004 b.n 8015778 <tcp_receive+0x304>
801576e: 687b ldr r3, [r7, #4]
8015770: f64f 72ff movw r2, #65535 ; 0xffff
8015774: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
if (pcb->bytes_acked >= pcb->cwnd) {
8015778: 687b ldr r3, [r7, #4]
801577a: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
801577e: 687b ldr r3, [r7, #4]
8015780: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8015784: 429a cmp r2, r3
8015786: d326 bcc.n 80157d6 <tcp_receive+0x362>
pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd);
8015788: 687b ldr r3, [r7, #4]
801578a: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
801578e: 687b ldr r3, [r7, #4]
8015790: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8015794: 1ad3 subs r3, r2, r3
8015796: b29a uxth r2, r3
8015798: 687b ldr r3, [r7, #4]
801579a: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
TCP_WND_INC(pcb->cwnd, pcb->mss);
801579e: 687b ldr r3, [r7, #4]
80157a0: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80157a4: 687b ldr r3, [r7, #4]
80157a6: 8e5b ldrh r3, [r3, #50] ; 0x32
80157a8: 4413 add r3, r2
80157aa: b29a uxth r2, r3
80157ac: 687b ldr r3, [r7, #4]
80157ae: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
80157b2: 429a cmp r2, r3
80157b4: d30a bcc.n 80157cc <tcp_receive+0x358>
80157b6: 687b ldr r3, [r7, #4]
80157b8: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
80157bc: 687b ldr r3, [r7, #4]
80157be: 8e5b ldrh r3, [r3, #50] ; 0x32
80157c0: 4413 add r3, r2
80157c2: b29a uxth r2, r3
80157c4: 687b ldr r3, [r7, #4]
80157c6: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
80157ca: e004 b.n 80157d6 <tcp_receive+0x362>
80157cc: 687b ldr r3, [r7, #4]
80157ce: f64f 72ff movw r2, #65535 ; 0xffff
80157d2: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->unacked != NULL ?
lwip_ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked) : 0));
/* Remove segment from the unacknowledged list if the incoming
ACK acknowledges them. */
pcb->unacked = tcp_free_acked_segments(pcb, pcb->unacked, "unacked", pcb->unsent);
80157d6: 687b ldr r3, [r7, #4]
80157d8: 6f19 ldr r1, [r3, #112] ; 0x70
80157da: 687b ldr r3, [r7, #4]
80157dc: 6edb ldr r3, [r3, #108] ; 0x6c
80157de: 4a98 ldr r2, [pc, #608] ; (8015a40 <tcp_receive+0x5cc>)
80157e0: 6878 ldr r0, [r7, #4]
80157e2: f7ff fdcb bl 801537c <tcp_free_acked_segments>
80157e6: 4602 mov r2, r0
80157e8: 687b ldr r3, [r7, #4]
80157ea: 671a str r2, [r3, #112] ; 0x70
on the list are acknowledged by the ACK. This may seem
strange since an "unsent" segment shouldn't be acked. The
rationale is that lwIP puts all outstanding segments on the
->unsent list after a retransmission, so these segments may
in fact have been sent once. */
pcb->unsent = tcp_free_acked_segments(pcb, pcb->unsent, "unsent", pcb->unacked);
80157ec: 687b ldr r3, [r7, #4]
80157ee: 6ed9 ldr r1, [r3, #108] ; 0x6c
80157f0: 687b ldr r3, [r7, #4]
80157f2: 6f1b ldr r3, [r3, #112] ; 0x70
80157f4: 4a93 ldr r2, [pc, #588] ; (8015a44 <tcp_receive+0x5d0>)
80157f6: 6878 ldr r0, [r7, #4]
80157f8: f7ff fdc0 bl 801537c <tcp_free_acked_segments>
80157fc: 4602 mov r2, r0
80157fe: 687b ldr r3, [r7, #4]
8015800: 66da str r2, [r3, #108] ; 0x6c
/* If there's nothing left to acknowledge, stop the retransmit
timer, otherwise reset it to start again */
if (pcb->unacked == NULL) {
8015802: 687b ldr r3, [r7, #4]
8015804: 6f1b ldr r3, [r3, #112] ; 0x70
8015806: 2b00 cmp r3, #0
8015808: d104 bne.n 8015814 <tcp_receive+0x3a0>
pcb->rtime = -1;
801580a: 687b ldr r3, [r7, #4]
801580c: f64f 72ff movw r2, #65535 ; 0xffff
8015810: 861a strh r2, [r3, #48] ; 0x30
8015812: e002 b.n 801581a <tcp_receive+0x3a6>
} else {
pcb->rtime = 0;
8015814: 687b ldr r3, [r7, #4]
8015816: 2200 movs r2, #0
8015818: 861a strh r2, [r3, #48] ; 0x30
}
pcb->polltmr = 0;
801581a: 687b ldr r3, [r7, #4]
801581c: 2200 movs r2, #0
801581e: 771a strb r2, [r3, #28]
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
8015820: 687b ldr r3, [r7, #4]
8015822: 6edb ldr r3, [r3, #108] ; 0x6c
8015824: 2b00 cmp r3, #0
8015826: d103 bne.n 8015830 <tcp_receive+0x3bc>
pcb->unsent_oversize = 0;
8015828: 687b ldr r3, [r7, #4]
801582a: 2200 movs r2, #0
801582c: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
/* Inform neighbor reachability of forward progress. */
nd6_reachability_hint(ip6_current_src_addr());
}
#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/
pcb->snd_buf = (tcpwnd_size_t)(pcb->snd_buf + recv_acked);
8015830: 687b ldr r3, [r7, #4]
8015832: f8b3 2064 ldrh.w r2, [r3, #100] ; 0x64
8015836: 4b84 ldr r3, [pc, #528] ; (8015a48 <tcp_receive+0x5d4>)
8015838: 881b ldrh r3, [r3, #0]
801583a: 4413 add r3, r2
801583c: b29a uxth r2, r3
801583e: 687b ldr r3, [r7, #4]
8015840: f8a3 2064 strh.w r2, [r3, #100] ; 0x64
/* check if this ACK ends our retransmission of in-flight data */
if (pcb->flags & TF_RTO) {
8015844: 687b ldr r3, [r7, #4]
8015846: 8b5b ldrh r3, [r3, #26]
8015848: f403 6300 and.w r3, r3, #2048 ; 0x800
801584c: 2b00 cmp r3, #0
801584e: d035 beq.n 80158bc <tcp_receive+0x448>
/* RTO is done if
1) both queues are empty or
2) unacked is empty and unsent head contains data not part of RTO or
3) unacked head contains data not part of RTO */
if (pcb->unacked == NULL) {
8015850: 687b ldr r3, [r7, #4]
8015852: 6f1b ldr r3, [r3, #112] ; 0x70
8015854: 2b00 cmp r3, #0
8015856: d118 bne.n 801588a <tcp_receive+0x416>
if ((pcb->unsent == NULL) ||
8015858: 687b ldr r3, [r7, #4]
801585a: 6edb ldr r3, [r3, #108] ; 0x6c
801585c: 2b00 cmp r3, #0
801585e: d00c beq.n 801587a <tcp_receive+0x406>
(TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) {
8015860: 687b ldr r3, [r7, #4]
8015862: 6cdc ldr r4, [r3, #76] ; 0x4c
8015864: 687b ldr r3, [r7, #4]
8015866: 6edb ldr r3, [r3, #108] ; 0x6c
8015868: 68db ldr r3, [r3, #12]
801586a: 685b ldr r3, [r3, #4]
801586c: 4618 mov r0, r3
801586e: f7fb f974 bl 8010b5a <lwip_htonl>
8015872: 4603 mov r3, r0
8015874: 1ae3 subs r3, r4, r3
if ((pcb->unsent == NULL) ||
8015876: 2b00 cmp r3, #0
8015878: dc20 bgt.n 80158bc <tcp_receive+0x448>
tcp_clear_flags(pcb, TF_RTO);
801587a: 687b ldr r3, [r7, #4]
801587c: 8b5b ldrh r3, [r3, #26]
801587e: f423 6300 bic.w r3, r3, #2048 ; 0x800
8015882: b29a uxth r2, r3
8015884: 687b ldr r3, [r7, #4]
8015886: 835a strh r2, [r3, #26]
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8015888: e018 b.n 80158bc <tcp_receive+0x448>
}
} else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) {
801588a: 687b ldr r3, [r7, #4]
801588c: 6cdc ldr r4, [r3, #76] ; 0x4c
801588e: 687b ldr r3, [r7, #4]
8015890: 6f1b ldr r3, [r3, #112] ; 0x70
8015892: 68db ldr r3, [r3, #12]
8015894: 685b ldr r3, [r3, #4]
8015896: 4618 mov r0, r3
8015898: f7fb f95f bl 8010b5a <lwip_htonl>
801589c: 4603 mov r3, r0
801589e: 1ae3 subs r3, r4, r3
80158a0: 2b00 cmp r3, #0
80158a2: dc0b bgt.n 80158bc <tcp_receive+0x448>
tcp_clear_flags(pcb, TF_RTO);
80158a4: 687b ldr r3, [r7, #4]
80158a6: 8b5b ldrh r3, [r3, #26]
80158a8: f423 6300 bic.w r3, r3, #2048 ; 0x800
80158ac: b29a uxth r2, r3
80158ae: 687b ldr r3, [r7, #4]
80158b0: 835a strh r2, [r3, #26]
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
80158b2: e003 b.n 80158bc <tcp_receive+0x448>
}
}
/* End of ACK for new data processing. */
} else {
/* Out of sequence ACK, didn't really ack anything */
tcp_send_empty_ack(pcb);
80158b4: 6878 ldr r0, [r7, #4]
80158b6: f001 ff85 bl 80177c4 <tcp_send_empty_ack>
80158ba: e000 b.n 80158be <tcp_receive+0x44a>
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
80158bc: bf00 nop
pcb->rttest, pcb->rtseq, ackno));
/* RTT estimation calculations. This is done by checking if the
incoming segment acknowledges the segment we use to take a
round-trip time measurement. */
if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) {
80158be: 687b ldr r3, [r7, #4]
80158c0: 6b5b ldr r3, [r3, #52] ; 0x34
80158c2: 2b00 cmp r3, #0
80158c4: d05b beq.n 801597e <tcp_receive+0x50a>
80158c6: 687b ldr r3, [r7, #4]
80158c8: 6b9a ldr r2, [r3, #56] ; 0x38
80158ca: 4b60 ldr r3, [pc, #384] ; (8015a4c <tcp_receive+0x5d8>)
80158cc: 681b ldr r3, [r3, #0]
80158ce: 1ad3 subs r3, r2, r3
80158d0: 2b00 cmp r3, #0
80158d2: da54 bge.n 801597e <tcp_receive+0x50a>
/* diff between this shouldn't exceed 32K since this are tcp timer ticks
and a round-trip shouldn't be that long... */
m = (s16_t)(tcp_ticks - pcb->rttest);
80158d4: 4b5e ldr r3, [pc, #376] ; (8015a50 <tcp_receive+0x5dc>)
80158d6: 681b ldr r3, [r3, #0]
80158d8: b29a uxth r2, r3
80158da: 687b ldr r3, [r7, #4]
80158dc: 6b5b ldr r3, [r3, #52] ; 0x34
80158de: b29b uxth r3, r3
80158e0: 1ad3 subs r3, r2, r3
80158e2: b29b uxth r3, r3
80158e4: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n",
m, (u16_t)(m * TCP_SLOW_INTERVAL)));
/* This is taken directly from VJs original code in his paper */
m = (s16_t)(m - (pcb->sa >> 3));
80158e8: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
80158ec: 687b ldr r3, [r7, #4]
80158ee: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
80158f2: 10db asrs r3, r3, #3
80158f4: b21b sxth r3, r3
80158f6: b29b uxth r3, r3
80158f8: 1ad3 subs r3, r2, r3
80158fa: b29b uxth r3, r3
80158fc: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
pcb->sa = (s16_t)(pcb->sa + m);
8015900: 687b ldr r3, [r7, #4]
8015902: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8015906: b29a uxth r2, r3
8015908: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
801590c: 4413 add r3, r2
801590e: b29b uxth r3, r3
8015910: b21a sxth r2, r3
8015912: 687b ldr r3, [r7, #4]
8015914: 879a strh r2, [r3, #60] ; 0x3c
if (m < 0) {
8015916: f9b7 304e ldrsh.w r3, [r7, #78] ; 0x4e
801591a: 2b00 cmp r3, #0
801591c: da05 bge.n 801592a <tcp_receive+0x4b6>
m = (s16_t) - m;
801591e: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
8015922: 425b negs r3, r3
8015924: b29b uxth r3, r3
8015926: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
}
m = (s16_t)(m - (pcb->sv >> 2));
801592a: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
801592e: 687b ldr r3, [r7, #4]
8015930: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8015934: 109b asrs r3, r3, #2
8015936: b21b sxth r3, r3
8015938: b29b uxth r3, r3
801593a: 1ad3 subs r3, r2, r3
801593c: b29b uxth r3, r3
801593e: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
pcb->sv = (s16_t)(pcb->sv + m);
8015942: 687b ldr r3, [r7, #4]
8015944: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8015948: b29a uxth r2, r3
801594a: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
801594e: 4413 add r3, r2
8015950: b29b uxth r3, r3
8015952: b21a sxth r2, r3
8015954: 687b ldr r3, [r7, #4]
8015956: 87da strh r2, [r3, #62] ; 0x3e
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
8015958: 687b ldr r3, [r7, #4]
801595a: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
801595e: 10db asrs r3, r3, #3
8015960: b21b sxth r3, r3
8015962: b29a uxth r2, r3
8015964: 687b ldr r3, [r7, #4]
8015966: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
801596a: b29b uxth r3, r3
801596c: 4413 add r3, r2
801596e: b29b uxth r3, r3
8015970: b21a sxth r2, r3
8015972: 687b ldr r3, [r7, #4]
8015974: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n",
pcb->rto, (u16_t)(pcb->rto * TCP_SLOW_INTERVAL)));
pcb->rttest = 0;
8015978: 687b ldr r3, [r7, #4]
801597a: 2200 movs r2, #0
801597c: 635a str r2, [r3, #52] ; 0x34
/* If the incoming segment contains data, we must process it
further unless the pcb already received a FIN.
(RFC 793, chapter 3.9, "SEGMENT ARRIVES" in states CLOSE-WAIT, CLOSING,
LAST-ACK and TIME-WAIT: "Ignore the segment text.") */
if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) {
801597e: 4b35 ldr r3, [pc, #212] ; (8015a54 <tcp_receive+0x5e0>)
8015980: 881b ldrh r3, [r3, #0]
8015982: 2b00 cmp r3, #0
8015984: f000 84e1 beq.w 801634a <tcp_receive+0xed6>
8015988: 687b ldr r3, [r7, #4]
801598a: 7d1b ldrb r3, [r3, #20]
801598c: 2b06 cmp r3, #6
801598e: f200 84dc bhi.w 801634a <tcp_receive+0xed6>
this if the sequence number of the incoming segment is less
than rcv_nxt, and the sequence number plus the length of the
segment is larger than rcv_nxt. */
/* if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
if (TCP_SEQ_LT(pcb->rcv_nxt, seqno + tcplen)) {*/
if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
8015992: 687b ldr r3, [r7, #4]
8015994: 6a5a ldr r2, [r3, #36] ; 0x24
8015996: 4b30 ldr r3, [pc, #192] ; (8015a58 <tcp_receive+0x5e4>)
8015998: 681b ldr r3, [r3, #0]
801599a: 1ad3 subs r3, r2, r3
801599c: 3b01 subs r3, #1
801599e: 2b00 cmp r3, #0
80159a0: f2c0 808e blt.w 8015ac0 <tcp_receive+0x64c>
80159a4: 687b ldr r3, [r7, #4]
80159a6: 6a5a ldr r2, [r3, #36] ; 0x24
80159a8: 4b2a ldr r3, [pc, #168] ; (8015a54 <tcp_receive+0x5e0>)
80159aa: 881b ldrh r3, [r3, #0]
80159ac: 4619 mov r1, r3
80159ae: 4b2a ldr r3, [pc, #168] ; (8015a58 <tcp_receive+0x5e4>)
80159b0: 681b ldr r3, [r3, #0]
80159b2: 440b add r3, r1
80159b4: 1ad3 subs r3, r2, r3
80159b6: 3301 adds r3, #1
80159b8: 2b00 cmp r3, #0
80159ba: f300 8081 bgt.w 8015ac0 <tcp_receive+0x64c>
After we are done with adjusting the pbuf pointers we must
adjust the ->data pointer in the seg and the segment
length.*/
struct pbuf *p = inseg.p;
80159be: 4b27 ldr r3, [pc, #156] ; (8015a5c <tcp_receive+0x5e8>)
80159c0: 685b ldr r3, [r3, #4]
80159c2: 647b str r3, [r7, #68] ; 0x44
u32_t off32 = pcb->rcv_nxt - seqno;
80159c4: 687b ldr r3, [r7, #4]
80159c6: 6a5a ldr r2, [r3, #36] ; 0x24
80159c8: 4b23 ldr r3, [pc, #140] ; (8015a58 <tcp_receive+0x5e4>)
80159ca: 681b ldr r3, [r3, #0]
80159cc: 1ad3 subs r3, r2, r3
80159ce: 627b str r3, [r7, #36] ; 0x24
u16_t new_tot_len, off;
LWIP_ASSERT("inseg.p != NULL", inseg.p);
80159d0: 4b22 ldr r3, [pc, #136] ; (8015a5c <tcp_receive+0x5e8>)
80159d2: 685b ldr r3, [r3, #4]
80159d4: 2b00 cmp r3, #0
80159d6: d106 bne.n 80159e6 <tcp_receive+0x572>
80159d8: 4b21 ldr r3, [pc, #132] ; (8015a60 <tcp_receive+0x5ec>)
80159da: f240 5294 movw r2, #1428 ; 0x594
80159de: 4921 ldr r1, [pc, #132] ; (8015a64 <tcp_receive+0x5f0>)
80159e0: 4821 ldr r0, [pc, #132] ; (8015a68 <tcp_receive+0x5f4>)
80159e2: f007 f989 bl 801ccf8 <iprintf>
LWIP_ASSERT("insane offset!", (off32 < 0xffff));
80159e6: 6a7b ldr r3, [r7, #36] ; 0x24
80159e8: f64f 72fe movw r2, #65534 ; 0xfffe
80159ec: 4293 cmp r3, r2
80159ee: d906 bls.n 80159fe <tcp_receive+0x58a>
80159f0: 4b1b ldr r3, [pc, #108] ; (8015a60 <tcp_receive+0x5ec>)
80159f2: f240 5295 movw r2, #1429 ; 0x595
80159f6: 491d ldr r1, [pc, #116] ; (8015a6c <tcp_receive+0x5f8>)
80159f8: 481b ldr r0, [pc, #108] ; (8015a68 <tcp_receive+0x5f4>)
80159fa: f007 f97d bl 801ccf8 <iprintf>
off = (u16_t)off32;
80159fe: 6a7b ldr r3, [r7, #36] ; 0x24
8015a00: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
8015a04: 4b15 ldr r3, [pc, #84] ; (8015a5c <tcp_receive+0x5e8>)
8015a06: 685b ldr r3, [r3, #4]
8015a08: 891b ldrh r3, [r3, #8]
8015a0a: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8015a0e: 429a cmp r2, r3
8015a10: d906 bls.n 8015a20 <tcp_receive+0x5ac>
8015a12: 4b13 ldr r3, [pc, #76] ; (8015a60 <tcp_receive+0x5ec>)
8015a14: f240 5297 movw r2, #1431 ; 0x597
8015a18: 4915 ldr r1, [pc, #84] ; (8015a70 <tcp_receive+0x5fc>)
8015a1a: 4813 ldr r0, [pc, #76] ; (8015a68 <tcp_receive+0x5f4>)
8015a1c: f007 f96c bl 801ccf8 <iprintf>
inseg.len -= off;
8015a20: 4b0e ldr r3, [pc, #56] ; (8015a5c <tcp_receive+0x5e8>)
8015a22: 891a ldrh r2, [r3, #8]
8015a24: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8015a28: 1ad3 subs r3, r2, r3
8015a2a: b29a uxth r2, r3
8015a2c: 4b0b ldr r3, [pc, #44] ; (8015a5c <tcp_receive+0x5e8>)
8015a2e: 811a strh r2, [r3, #8]
new_tot_len = (u16_t)(inseg.p->tot_len - off);
8015a30: 4b0a ldr r3, [pc, #40] ; (8015a5c <tcp_receive+0x5e8>)
8015a32: 685b ldr r3, [r3, #4]
8015a34: 891a ldrh r2, [r3, #8]
8015a36: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8015a3a: 1ad3 subs r3, r2, r3
8015a3c: 847b strh r3, [r7, #34] ; 0x22
while (p->len < off) {
8015a3e: e029 b.n 8015a94 <tcp_receive+0x620>
8015a40: 0801f658 .word 0x0801f658
8015a44: 0801f660 .word 0x0801f660
8015a48: 20008754 .word 0x20008754
8015a4c: 20008750 .word 0x20008750
8015a50: 2000f800 .word 0x2000f800
8015a54: 20008756 .word 0x20008756
8015a58: 2000874c .word 0x2000874c
8015a5c: 2000872c .word 0x2000872c
8015a60: 0801f2f0 .word 0x0801f2f0
8015a64: 0801f668 .word 0x0801f668
8015a68: 0801f33c .word 0x0801f33c
8015a6c: 0801f678 .word 0x0801f678
8015a70: 0801f688 .word 0x0801f688
off -= p->len;
8015a74: 6c7b ldr r3, [r7, #68] ; 0x44
8015a76: 895b ldrh r3, [r3, #10]
8015a78: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8015a7c: 1ad3 subs r3, r2, r3
8015a7e: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
/* all pbufs up to and including this one have len==0, so tot_len is equal */
p->tot_len = new_tot_len;
8015a82: 6c7b ldr r3, [r7, #68] ; 0x44
8015a84: 8c7a ldrh r2, [r7, #34] ; 0x22
8015a86: 811a strh r2, [r3, #8]
p->len = 0;
8015a88: 6c7b ldr r3, [r7, #68] ; 0x44
8015a8a: 2200 movs r2, #0
8015a8c: 815a strh r2, [r3, #10]
p = p->next;
8015a8e: 6c7b ldr r3, [r7, #68] ; 0x44
8015a90: 681b ldr r3, [r3, #0]
8015a92: 647b str r3, [r7, #68] ; 0x44
while (p->len < off) {
8015a94: 6c7b ldr r3, [r7, #68] ; 0x44
8015a96: 895b ldrh r3, [r3, #10]
8015a98: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
8015a9c: 429a cmp r2, r3
8015a9e: d8e9 bhi.n 8015a74 <tcp_receive+0x600>
}
/* cannot fail... */
pbuf_remove_header(p, off);
8015aa0: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8015aa4: 4619 mov r1, r3
8015aa6: 6c78 ldr r0, [r7, #68] ; 0x44
8015aa8: f7fc fb70 bl 801218c <pbuf_remove_header>
inseg.tcphdr->seqno = seqno = pcb->rcv_nxt;
8015aac: 687b ldr r3, [r7, #4]
8015aae: 6a5b ldr r3, [r3, #36] ; 0x24
8015ab0: 4a91 ldr r2, [pc, #580] ; (8015cf8 <tcp_receive+0x884>)
8015ab2: 6013 str r3, [r2, #0]
8015ab4: 4b91 ldr r3, [pc, #580] ; (8015cfc <tcp_receive+0x888>)
8015ab6: 68db ldr r3, [r3, #12]
8015ab8: 4a8f ldr r2, [pc, #572] ; (8015cf8 <tcp_receive+0x884>)
8015aba: 6812 ldr r2, [r2, #0]
8015abc: 605a str r2, [r3, #4]
if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
8015abe: e00d b.n 8015adc <tcp_receive+0x668>
} else {
if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
8015ac0: 4b8d ldr r3, [pc, #564] ; (8015cf8 <tcp_receive+0x884>)
8015ac2: 681a ldr r2, [r3, #0]
8015ac4: 687b ldr r3, [r7, #4]
8015ac6: 6a5b ldr r3, [r3, #36] ; 0x24
8015ac8: 1ad3 subs r3, r2, r3
8015aca: 2b00 cmp r3, #0
8015acc: da06 bge.n 8015adc <tcp_receive+0x668>
/* the whole segment is < rcv_nxt */
/* must be a duplicate of a packet that has already been correctly handled */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: duplicate seqno %"U32_F"\n", seqno));
tcp_ack_now(pcb);
8015ace: 687b ldr r3, [r7, #4]
8015ad0: 8b5b ldrh r3, [r3, #26]
8015ad2: f043 0302 orr.w r3, r3, #2
8015ad6: b29a uxth r2, r3
8015ad8: 687b ldr r3, [r7, #4]
8015ada: 835a strh r2, [r3, #26]
}
/* The sequence number must be within the window (above rcv_nxt
and below rcv_nxt + rcv_wnd) in order to be further
processed. */
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8015adc: 4b86 ldr r3, [pc, #536] ; (8015cf8 <tcp_receive+0x884>)
8015ade: 681a ldr r2, [r3, #0]
8015ae0: 687b ldr r3, [r7, #4]
8015ae2: 6a5b ldr r3, [r3, #36] ; 0x24
8015ae4: 1ad3 subs r3, r2, r3
8015ae6: 2b00 cmp r3, #0
8015ae8: f2c0 842a blt.w 8016340 <tcp_receive+0xecc>
8015aec: 4b82 ldr r3, [pc, #520] ; (8015cf8 <tcp_receive+0x884>)
8015aee: 681a ldr r2, [r3, #0]
8015af0: 687b ldr r3, [r7, #4]
8015af2: 6a5b ldr r3, [r3, #36] ; 0x24
8015af4: 6879 ldr r1, [r7, #4]
8015af6: 8d09 ldrh r1, [r1, #40] ; 0x28
8015af8: 440b add r3, r1
8015afa: 1ad3 subs r3, r2, r3
8015afc: 3301 adds r3, #1
8015afe: 2b00 cmp r3, #0
8015b00: f300 841e bgt.w 8016340 <tcp_receive+0xecc>
pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
if (pcb->rcv_nxt == seqno) {
8015b04: 687b ldr r3, [r7, #4]
8015b06: 6a5a ldr r2, [r3, #36] ; 0x24
8015b08: 4b7b ldr r3, [pc, #492] ; (8015cf8 <tcp_receive+0x884>)
8015b0a: 681b ldr r3, [r3, #0]
8015b0c: 429a cmp r2, r3
8015b0e: f040 829a bne.w 8016046 <tcp_receive+0xbd2>
/* The incoming segment is the next in sequence. We check if
we have to trim the end of the segment and update rcv_nxt
and pass the data to the application. */
tcplen = TCP_TCPLEN(&inseg);
8015b12: 4b7a ldr r3, [pc, #488] ; (8015cfc <tcp_receive+0x888>)
8015b14: 891c ldrh r4, [r3, #8]
8015b16: 4b79 ldr r3, [pc, #484] ; (8015cfc <tcp_receive+0x888>)
8015b18: 68db ldr r3, [r3, #12]
8015b1a: 899b ldrh r3, [r3, #12]
8015b1c: b29b uxth r3, r3
8015b1e: 4618 mov r0, r3
8015b20: f7fb f806 bl 8010b30 <lwip_htons>
8015b24: 4603 mov r3, r0
8015b26: b2db uxtb r3, r3
8015b28: f003 0303 and.w r3, r3, #3
8015b2c: 2b00 cmp r3, #0
8015b2e: d001 beq.n 8015b34 <tcp_receive+0x6c0>
8015b30: 2301 movs r3, #1
8015b32: e000 b.n 8015b36 <tcp_receive+0x6c2>
8015b34: 2300 movs r3, #0
8015b36: 4423 add r3, r4
8015b38: b29a uxth r2, r3
8015b3a: 4b71 ldr r3, [pc, #452] ; (8015d00 <tcp_receive+0x88c>)
8015b3c: 801a strh r2, [r3, #0]
if (tcplen > pcb->rcv_wnd) {
8015b3e: 687b ldr r3, [r7, #4]
8015b40: 8d1a ldrh r2, [r3, #40] ; 0x28
8015b42: 4b6f ldr r3, [pc, #444] ; (8015d00 <tcp_receive+0x88c>)
8015b44: 881b ldrh r3, [r3, #0]
8015b46: 429a cmp r2, r3
8015b48: d275 bcs.n 8015c36 <tcp_receive+0x7c2>
LWIP_DEBUGF(TCP_INPUT_DEBUG,
("tcp_receive: other end overran receive window"
"seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n",
seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd));
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
8015b4a: 4b6c ldr r3, [pc, #432] ; (8015cfc <tcp_receive+0x888>)
8015b4c: 68db ldr r3, [r3, #12]
8015b4e: 899b ldrh r3, [r3, #12]
8015b50: b29b uxth r3, r3
8015b52: 4618 mov r0, r3
8015b54: f7fa ffec bl 8010b30 <lwip_htons>
8015b58: 4603 mov r3, r0
8015b5a: b2db uxtb r3, r3
8015b5c: f003 0301 and.w r3, r3, #1
8015b60: 2b00 cmp r3, #0
8015b62: d01f beq.n 8015ba4 <tcp_receive+0x730>
/* Must remove the FIN from the header as we're trimming
* that byte of sequence-space from the packet */
TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN);
8015b64: 4b65 ldr r3, [pc, #404] ; (8015cfc <tcp_receive+0x888>)
8015b66: 68db ldr r3, [r3, #12]
8015b68: 899b ldrh r3, [r3, #12]
8015b6a: b29b uxth r3, r3
8015b6c: b21b sxth r3, r3
8015b6e: f423 537c bic.w r3, r3, #16128 ; 0x3f00
8015b72: b21c sxth r4, r3
8015b74: 4b61 ldr r3, [pc, #388] ; (8015cfc <tcp_receive+0x888>)
8015b76: 68db ldr r3, [r3, #12]
8015b78: 899b ldrh r3, [r3, #12]
8015b7a: b29b uxth r3, r3
8015b7c: 4618 mov r0, r3
8015b7e: f7fa ffd7 bl 8010b30 <lwip_htons>
8015b82: 4603 mov r3, r0
8015b84: b2db uxtb r3, r3
8015b86: b29b uxth r3, r3
8015b88: f003 033e and.w r3, r3, #62 ; 0x3e
8015b8c: b29b uxth r3, r3
8015b8e: 4618 mov r0, r3
8015b90: f7fa ffce bl 8010b30 <lwip_htons>
8015b94: 4603 mov r3, r0
8015b96: b21b sxth r3, r3
8015b98: 4323 orrs r3, r4
8015b9a: b21a sxth r2, r3
8015b9c: 4b57 ldr r3, [pc, #348] ; (8015cfc <tcp_receive+0x888>)
8015b9e: 68db ldr r3, [r3, #12]
8015ba0: b292 uxth r2, r2
8015ba2: 819a strh r2, [r3, #12]
}
/* Adjust length of segment to fit in the window. */
TCPWND_CHECK16(pcb->rcv_wnd);
inseg.len = (u16_t)pcb->rcv_wnd;
8015ba4: 687b ldr r3, [r7, #4]
8015ba6: 8d1a ldrh r2, [r3, #40] ; 0x28
8015ba8: 4b54 ldr r3, [pc, #336] ; (8015cfc <tcp_receive+0x888>)
8015baa: 811a strh r2, [r3, #8]
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
8015bac: 4b53 ldr r3, [pc, #332] ; (8015cfc <tcp_receive+0x888>)
8015bae: 68db ldr r3, [r3, #12]
8015bb0: 899b ldrh r3, [r3, #12]
8015bb2: b29b uxth r3, r3
8015bb4: 4618 mov r0, r3
8015bb6: f7fa ffbb bl 8010b30 <lwip_htons>
8015bba: 4603 mov r3, r0
8015bbc: b2db uxtb r3, r3
8015bbe: f003 0302 and.w r3, r3, #2
8015bc2: 2b00 cmp r3, #0
8015bc4: d005 beq.n 8015bd2 <tcp_receive+0x75e>
inseg.len -= 1;
8015bc6: 4b4d ldr r3, [pc, #308] ; (8015cfc <tcp_receive+0x888>)
8015bc8: 891b ldrh r3, [r3, #8]
8015bca: 3b01 subs r3, #1
8015bcc: b29a uxth r2, r3
8015bce: 4b4b ldr r3, [pc, #300] ; (8015cfc <tcp_receive+0x888>)
8015bd0: 811a strh r2, [r3, #8]
}
pbuf_realloc(inseg.p, inseg.len);
8015bd2: 4b4a ldr r3, [pc, #296] ; (8015cfc <tcp_receive+0x888>)
8015bd4: 685a ldr r2, [r3, #4]
8015bd6: 4b49 ldr r3, [pc, #292] ; (8015cfc <tcp_receive+0x888>)
8015bd8: 891b ldrh r3, [r3, #8]
8015bda: 4619 mov r1, r3
8015bdc: 4610 mov r0, r2
8015bde: f7fc f9d5 bl 8011f8c <pbuf_realloc>
tcplen = TCP_TCPLEN(&inseg);
8015be2: 4b46 ldr r3, [pc, #280] ; (8015cfc <tcp_receive+0x888>)
8015be4: 891c ldrh r4, [r3, #8]
8015be6: 4b45 ldr r3, [pc, #276] ; (8015cfc <tcp_receive+0x888>)
8015be8: 68db ldr r3, [r3, #12]
8015bea: 899b ldrh r3, [r3, #12]
8015bec: b29b uxth r3, r3
8015bee: 4618 mov r0, r3
8015bf0: f7fa ff9e bl 8010b30 <lwip_htons>
8015bf4: 4603 mov r3, r0
8015bf6: b2db uxtb r3, r3
8015bf8: f003 0303 and.w r3, r3, #3
8015bfc: 2b00 cmp r3, #0
8015bfe: d001 beq.n 8015c04 <tcp_receive+0x790>
8015c00: 2301 movs r3, #1
8015c02: e000 b.n 8015c06 <tcp_receive+0x792>
8015c04: 2300 movs r3, #0
8015c06: 4423 add r3, r4
8015c08: b29a uxth r2, r3
8015c0a: 4b3d ldr r3, [pc, #244] ; (8015d00 <tcp_receive+0x88c>)
8015c0c: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
8015c0e: 4b3c ldr r3, [pc, #240] ; (8015d00 <tcp_receive+0x88c>)
8015c10: 881b ldrh r3, [r3, #0]
8015c12: 461a mov r2, r3
8015c14: 4b38 ldr r3, [pc, #224] ; (8015cf8 <tcp_receive+0x884>)
8015c16: 681b ldr r3, [r3, #0]
8015c18: 441a add r2, r3
8015c1a: 687b ldr r3, [r7, #4]
8015c1c: 6a5b ldr r3, [r3, #36] ; 0x24
8015c1e: 6879 ldr r1, [r7, #4]
8015c20: 8d09 ldrh r1, [r1, #40] ; 0x28
8015c22: 440b add r3, r1
8015c24: 429a cmp r2, r3
8015c26: d006 beq.n 8015c36 <tcp_receive+0x7c2>
8015c28: 4b36 ldr r3, [pc, #216] ; (8015d04 <tcp_receive+0x890>)
8015c2a: f240 52cc movw r2, #1484 ; 0x5cc
8015c2e: 4936 ldr r1, [pc, #216] ; (8015d08 <tcp_receive+0x894>)
8015c30: 4836 ldr r0, [pc, #216] ; (8015d0c <tcp_receive+0x898>)
8015c32: f007 f861 bl 801ccf8 <iprintf>
}
#if TCP_QUEUE_OOSEQ
/* Received in-sequence data, adjust ooseq data if:
- FIN has been received or
- inseq overlaps with ooseq */
if (pcb->ooseq != NULL) {
8015c36: 687b ldr r3, [r7, #4]
8015c38: 6f5b ldr r3, [r3, #116] ; 0x74
8015c3a: 2b00 cmp r3, #0
8015c3c: f000 80e7 beq.w 8015e0e <tcp_receive+0x99a>
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
8015c40: 4b2e ldr r3, [pc, #184] ; (8015cfc <tcp_receive+0x888>)
8015c42: 68db ldr r3, [r3, #12]
8015c44: 899b ldrh r3, [r3, #12]
8015c46: b29b uxth r3, r3
8015c48: 4618 mov r0, r3
8015c4a: f7fa ff71 bl 8010b30 <lwip_htons>
8015c4e: 4603 mov r3, r0
8015c50: b2db uxtb r3, r3
8015c52: f003 0301 and.w r3, r3, #1
8015c56: 2b00 cmp r3, #0
8015c58: d010 beq.n 8015c7c <tcp_receive+0x808>
LWIP_DEBUGF(TCP_INPUT_DEBUG,
("tcp_receive: received in-order FIN, binning ooseq queue\n"));
/* Received in-order FIN means anything that was received
* out of order must now have been received in-order, so
* bin the ooseq queue */
while (pcb->ooseq != NULL) {
8015c5a: e00a b.n 8015c72 <tcp_receive+0x7fe>
struct tcp_seg *old_ooseq = pcb->ooseq;
8015c5c: 687b ldr r3, [r7, #4]
8015c5e: 6f5b ldr r3, [r3, #116] ; 0x74
8015c60: 60fb str r3, [r7, #12]
pcb->ooseq = pcb->ooseq->next;
8015c62: 687b ldr r3, [r7, #4]
8015c64: 6f5b ldr r3, [r3, #116] ; 0x74
8015c66: 681a ldr r2, [r3, #0]
8015c68: 687b ldr r3, [r7, #4]
8015c6a: 675a str r2, [r3, #116] ; 0x74
tcp_seg_free(old_ooseq);
8015c6c: 68f8 ldr r0, [r7, #12]
8015c6e: f7fd fd97 bl 80137a0 <tcp_seg_free>
while (pcb->ooseq != NULL) {
8015c72: 687b ldr r3, [r7, #4]
8015c74: 6f5b ldr r3, [r3, #116] ; 0x74
8015c76: 2b00 cmp r3, #0
8015c78: d1f0 bne.n 8015c5c <tcp_receive+0x7e8>
8015c7a: e0c8 b.n 8015e0e <tcp_receive+0x99a>
}
} else {
struct tcp_seg *next = pcb->ooseq;
8015c7c: 687b ldr r3, [r7, #4]
8015c7e: 6f5b ldr r3, [r3, #116] ; 0x74
8015c80: 63fb str r3, [r7, #60] ; 0x3c
/* Remove all segments on ooseq that are covered by inseg already.
* FIN is copied from ooseq to inseg if present. */
while (next &&
8015c82: e052 b.n 8015d2a <tcp_receive+0x8b6>
TCP_SEQ_GEQ(seqno + tcplen,
next->tcphdr->seqno + next->len)) {
struct tcp_seg *tmp;
/* inseg cannot have FIN here (already processed above) */
if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
8015c84: 6bfb ldr r3, [r7, #60] ; 0x3c
8015c86: 68db ldr r3, [r3, #12]
8015c88: 899b ldrh r3, [r3, #12]
8015c8a: b29b uxth r3, r3
8015c8c: 4618 mov r0, r3
8015c8e: f7fa ff4f bl 8010b30 <lwip_htons>
8015c92: 4603 mov r3, r0
8015c94: b2db uxtb r3, r3
8015c96: f003 0301 and.w r3, r3, #1
8015c9a: 2b00 cmp r3, #0
8015c9c: d03d beq.n 8015d1a <tcp_receive+0x8a6>
(TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) {
8015c9e: 4b17 ldr r3, [pc, #92] ; (8015cfc <tcp_receive+0x888>)
8015ca0: 68db ldr r3, [r3, #12]
8015ca2: 899b ldrh r3, [r3, #12]
8015ca4: b29b uxth r3, r3
8015ca6: 4618 mov r0, r3
8015ca8: f7fa ff42 bl 8010b30 <lwip_htons>
8015cac: 4603 mov r3, r0
8015cae: b2db uxtb r3, r3
8015cb0: f003 0302 and.w r3, r3, #2
if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
8015cb4: 2b00 cmp r3, #0
8015cb6: d130 bne.n 8015d1a <tcp_receive+0x8a6>
TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN);
8015cb8: 4b10 ldr r3, [pc, #64] ; (8015cfc <tcp_receive+0x888>)
8015cba: 68db ldr r3, [r3, #12]
8015cbc: 899b ldrh r3, [r3, #12]
8015cbe: b29c uxth r4, r3
8015cc0: 2001 movs r0, #1
8015cc2: f7fa ff35 bl 8010b30 <lwip_htons>
8015cc6: 4603 mov r3, r0
8015cc8: 461a mov r2, r3
8015cca: 4b0c ldr r3, [pc, #48] ; (8015cfc <tcp_receive+0x888>)
8015ccc: 68db ldr r3, [r3, #12]
8015cce: 4322 orrs r2, r4
8015cd0: b292 uxth r2, r2
8015cd2: 819a strh r2, [r3, #12]
tcplen = TCP_TCPLEN(&inseg);
8015cd4: 4b09 ldr r3, [pc, #36] ; (8015cfc <tcp_receive+0x888>)
8015cd6: 891c ldrh r4, [r3, #8]
8015cd8: 4b08 ldr r3, [pc, #32] ; (8015cfc <tcp_receive+0x888>)
8015cda: 68db ldr r3, [r3, #12]
8015cdc: 899b ldrh r3, [r3, #12]
8015cde: b29b uxth r3, r3
8015ce0: 4618 mov r0, r3
8015ce2: f7fa ff25 bl 8010b30 <lwip_htons>
8015ce6: 4603 mov r3, r0
8015ce8: b2db uxtb r3, r3
8015cea: f003 0303 and.w r3, r3, #3
8015cee: 2b00 cmp r3, #0
8015cf0: d00e beq.n 8015d10 <tcp_receive+0x89c>
8015cf2: 2301 movs r3, #1
8015cf4: e00d b.n 8015d12 <tcp_receive+0x89e>
8015cf6: bf00 nop
8015cf8: 2000874c .word 0x2000874c
8015cfc: 2000872c .word 0x2000872c
8015d00: 20008756 .word 0x20008756
8015d04: 0801f2f0 .word 0x0801f2f0
8015d08: 0801f698 .word 0x0801f698
8015d0c: 0801f33c .word 0x0801f33c
8015d10: 2300 movs r3, #0
8015d12: 4423 add r3, r4
8015d14: b29a uxth r2, r3
8015d16: 4b98 ldr r3, [pc, #608] ; (8015f78 <tcp_receive+0xb04>)
8015d18: 801a strh r2, [r3, #0]
}
tmp = next;
8015d1a: 6bfb ldr r3, [r7, #60] ; 0x3c
8015d1c: 613b str r3, [r7, #16]
next = next->next;
8015d1e: 6bfb ldr r3, [r7, #60] ; 0x3c
8015d20: 681b ldr r3, [r3, #0]
8015d22: 63fb str r3, [r7, #60] ; 0x3c
tcp_seg_free(tmp);
8015d24: 6938 ldr r0, [r7, #16]
8015d26: f7fd fd3b bl 80137a0 <tcp_seg_free>
while (next &&
8015d2a: 6bfb ldr r3, [r7, #60] ; 0x3c
8015d2c: 2b00 cmp r3, #0
8015d2e: d00e beq.n 8015d4e <tcp_receive+0x8da>
TCP_SEQ_GEQ(seqno + tcplen,
8015d30: 4b91 ldr r3, [pc, #580] ; (8015f78 <tcp_receive+0xb04>)
8015d32: 881b ldrh r3, [r3, #0]
8015d34: 461a mov r2, r3
8015d36: 4b91 ldr r3, [pc, #580] ; (8015f7c <tcp_receive+0xb08>)
8015d38: 681b ldr r3, [r3, #0]
8015d3a: 441a add r2, r3
8015d3c: 6bfb ldr r3, [r7, #60] ; 0x3c
8015d3e: 68db ldr r3, [r3, #12]
8015d40: 685b ldr r3, [r3, #4]
8015d42: 6bf9 ldr r1, [r7, #60] ; 0x3c
8015d44: 8909 ldrh r1, [r1, #8]
8015d46: 440b add r3, r1
8015d48: 1ad3 subs r3, r2, r3
while (next &&
8015d4a: 2b00 cmp r3, #0
8015d4c: da9a bge.n 8015c84 <tcp_receive+0x810>
}
/* Now trim right side of inseg if it overlaps with the first
* segment on ooseq */
if (next &&
8015d4e: 6bfb ldr r3, [r7, #60] ; 0x3c
8015d50: 2b00 cmp r3, #0
8015d52: d059 beq.n 8015e08 <tcp_receive+0x994>
TCP_SEQ_GT(seqno + tcplen,
8015d54: 4b88 ldr r3, [pc, #544] ; (8015f78 <tcp_receive+0xb04>)
8015d56: 881b ldrh r3, [r3, #0]
8015d58: 461a mov r2, r3
8015d5a: 4b88 ldr r3, [pc, #544] ; (8015f7c <tcp_receive+0xb08>)
8015d5c: 681b ldr r3, [r3, #0]
8015d5e: 441a add r2, r3
8015d60: 6bfb ldr r3, [r7, #60] ; 0x3c
8015d62: 68db ldr r3, [r3, #12]
8015d64: 685b ldr r3, [r3, #4]
8015d66: 1ad3 subs r3, r2, r3
if (next &&
8015d68: 2b00 cmp r3, #0
8015d6a: dd4d ble.n 8015e08 <tcp_receive+0x994>
next->tcphdr->seqno)) {
/* inseg cannot have FIN here (already processed above) */
inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
8015d6c: 6bfb ldr r3, [r7, #60] ; 0x3c
8015d6e: 68db ldr r3, [r3, #12]
8015d70: 685b ldr r3, [r3, #4]
8015d72: b29a uxth r2, r3
8015d74: 4b81 ldr r3, [pc, #516] ; (8015f7c <tcp_receive+0xb08>)
8015d76: 681b ldr r3, [r3, #0]
8015d78: b29b uxth r3, r3
8015d7a: 1ad3 subs r3, r2, r3
8015d7c: b29a uxth r2, r3
8015d7e: 4b80 ldr r3, [pc, #512] ; (8015f80 <tcp_receive+0xb0c>)
8015d80: 811a strh r2, [r3, #8]
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
8015d82: 4b7f ldr r3, [pc, #508] ; (8015f80 <tcp_receive+0xb0c>)
8015d84: 68db ldr r3, [r3, #12]
8015d86: 899b ldrh r3, [r3, #12]
8015d88: b29b uxth r3, r3
8015d8a: 4618 mov r0, r3
8015d8c: f7fa fed0 bl 8010b30 <lwip_htons>
8015d90: 4603 mov r3, r0
8015d92: b2db uxtb r3, r3
8015d94: f003 0302 and.w r3, r3, #2
8015d98: 2b00 cmp r3, #0
8015d9a: d005 beq.n 8015da8 <tcp_receive+0x934>
inseg.len -= 1;
8015d9c: 4b78 ldr r3, [pc, #480] ; (8015f80 <tcp_receive+0xb0c>)
8015d9e: 891b ldrh r3, [r3, #8]
8015da0: 3b01 subs r3, #1
8015da2: b29a uxth r2, r3
8015da4: 4b76 ldr r3, [pc, #472] ; (8015f80 <tcp_receive+0xb0c>)
8015da6: 811a strh r2, [r3, #8]
}
pbuf_realloc(inseg.p, inseg.len);
8015da8: 4b75 ldr r3, [pc, #468] ; (8015f80 <tcp_receive+0xb0c>)
8015daa: 685a ldr r2, [r3, #4]
8015dac: 4b74 ldr r3, [pc, #464] ; (8015f80 <tcp_receive+0xb0c>)
8015dae: 891b ldrh r3, [r3, #8]
8015db0: 4619 mov r1, r3
8015db2: 4610 mov r0, r2
8015db4: f7fc f8ea bl 8011f8c <pbuf_realloc>
tcplen = TCP_TCPLEN(&inseg);
8015db8: 4b71 ldr r3, [pc, #452] ; (8015f80 <tcp_receive+0xb0c>)
8015dba: 891c ldrh r4, [r3, #8]
8015dbc: 4b70 ldr r3, [pc, #448] ; (8015f80 <tcp_receive+0xb0c>)
8015dbe: 68db ldr r3, [r3, #12]
8015dc0: 899b ldrh r3, [r3, #12]
8015dc2: b29b uxth r3, r3
8015dc4: 4618 mov r0, r3
8015dc6: f7fa feb3 bl 8010b30 <lwip_htons>
8015dca: 4603 mov r3, r0
8015dcc: b2db uxtb r3, r3
8015dce: f003 0303 and.w r3, r3, #3
8015dd2: 2b00 cmp r3, #0
8015dd4: d001 beq.n 8015dda <tcp_receive+0x966>
8015dd6: 2301 movs r3, #1
8015dd8: e000 b.n 8015ddc <tcp_receive+0x968>
8015dda: 2300 movs r3, #0
8015ddc: 4423 add r3, r4
8015dde: b29a uxth r2, r3
8015de0: 4b65 ldr r3, [pc, #404] ; (8015f78 <tcp_receive+0xb04>)
8015de2: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n",
8015de4: 4b64 ldr r3, [pc, #400] ; (8015f78 <tcp_receive+0xb04>)
8015de6: 881b ldrh r3, [r3, #0]
8015de8: 461a mov r2, r3
8015dea: 4b64 ldr r3, [pc, #400] ; (8015f7c <tcp_receive+0xb08>)
8015dec: 681b ldr r3, [r3, #0]
8015dee: 441a add r2, r3
8015df0: 6bfb ldr r3, [r7, #60] ; 0x3c
8015df2: 68db ldr r3, [r3, #12]
8015df4: 685b ldr r3, [r3, #4]
8015df6: 429a cmp r2, r3
8015df8: d006 beq.n 8015e08 <tcp_receive+0x994>
8015dfa: 4b62 ldr r3, [pc, #392] ; (8015f84 <tcp_receive+0xb10>)
8015dfc: f240 52fd movw r2, #1533 ; 0x5fd
8015e00: 4961 ldr r1, [pc, #388] ; (8015f88 <tcp_receive+0xb14>)
8015e02: 4862 ldr r0, [pc, #392] ; (8015f8c <tcp_receive+0xb18>)
8015e04: f006 ff78 bl 801ccf8 <iprintf>
(seqno + tcplen) == next->tcphdr->seqno);
}
pcb->ooseq = next;
8015e08: 687b ldr r3, [r7, #4]
8015e0a: 6bfa ldr r2, [r7, #60] ; 0x3c
8015e0c: 675a str r2, [r3, #116] ; 0x74
}
}
#endif /* TCP_QUEUE_OOSEQ */
pcb->rcv_nxt = seqno + tcplen;
8015e0e: 4b5a ldr r3, [pc, #360] ; (8015f78 <tcp_receive+0xb04>)
8015e10: 881b ldrh r3, [r3, #0]
8015e12: 461a mov r2, r3
8015e14: 4b59 ldr r3, [pc, #356] ; (8015f7c <tcp_receive+0xb08>)
8015e16: 681b ldr r3, [r3, #0]
8015e18: 441a add r2, r3
8015e1a: 687b ldr r3, [r7, #4]
8015e1c: 625a str r2, [r3, #36] ; 0x24
/* Update the receiver's (our) window. */
LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
8015e1e: 687b ldr r3, [r7, #4]
8015e20: 8d1a ldrh r2, [r3, #40] ; 0x28
8015e22: 4b55 ldr r3, [pc, #340] ; (8015f78 <tcp_receive+0xb04>)
8015e24: 881b ldrh r3, [r3, #0]
8015e26: 429a cmp r2, r3
8015e28: d206 bcs.n 8015e38 <tcp_receive+0x9c4>
8015e2a: 4b56 ldr r3, [pc, #344] ; (8015f84 <tcp_receive+0xb10>)
8015e2c: f240 6207 movw r2, #1543 ; 0x607
8015e30: 4957 ldr r1, [pc, #348] ; (8015f90 <tcp_receive+0xb1c>)
8015e32: 4856 ldr r0, [pc, #344] ; (8015f8c <tcp_receive+0xb18>)
8015e34: f006 ff60 bl 801ccf8 <iprintf>
pcb->rcv_wnd -= tcplen;
8015e38: 687b ldr r3, [r7, #4]
8015e3a: 8d1a ldrh r2, [r3, #40] ; 0x28
8015e3c: 4b4e ldr r3, [pc, #312] ; (8015f78 <tcp_receive+0xb04>)
8015e3e: 881b ldrh r3, [r3, #0]
8015e40: 1ad3 subs r3, r2, r3
8015e42: b29a uxth r2, r3
8015e44: 687b ldr r3, [r7, #4]
8015e46: 851a strh r2, [r3, #40] ; 0x28
tcp_update_rcv_ann_wnd(pcb);
8015e48: 6878 ldr r0, [r7, #4]
8015e4a: f7fc ffcd bl 8012de8 <tcp_update_rcv_ann_wnd>
chains its data on this pbuf as well.
If the segment was a FIN, we set the TF_GOT_FIN flag that will
be used to indicate to the application that the remote side has
closed its end of the connection. */
if (inseg.p->tot_len > 0) {
8015e4e: 4b4c ldr r3, [pc, #304] ; (8015f80 <tcp_receive+0xb0c>)
8015e50: 685b ldr r3, [r3, #4]
8015e52: 891b ldrh r3, [r3, #8]
8015e54: 2b00 cmp r3, #0
8015e56: d006 beq.n 8015e66 <tcp_receive+0x9f2>
recv_data = inseg.p;
8015e58: 4b49 ldr r3, [pc, #292] ; (8015f80 <tcp_receive+0xb0c>)
8015e5a: 685b ldr r3, [r3, #4]
8015e5c: 4a4d ldr r2, [pc, #308] ; (8015f94 <tcp_receive+0xb20>)
8015e5e: 6013 str r3, [r2, #0]
/* Since this pbuf now is the responsibility of the
application, we delete our reference to it so that we won't
(mistakingly) deallocate it. */
inseg.p = NULL;
8015e60: 4b47 ldr r3, [pc, #284] ; (8015f80 <tcp_receive+0xb0c>)
8015e62: 2200 movs r2, #0
8015e64: 605a str r2, [r3, #4]
}
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
8015e66: 4b46 ldr r3, [pc, #280] ; (8015f80 <tcp_receive+0xb0c>)
8015e68: 68db ldr r3, [r3, #12]
8015e6a: 899b ldrh r3, [r3, #12]
8015e6c: b29b uxth r3, r3
8015e6e: 4618 mov r0, r3
8015e70: f7fa fe5e bl 8010b30 <lwip_htons>
8015e74: 4603 mov r3, r0
8015e76: b2db uxtb r3, r3
8015e78: f003 0301 and.w r3, r3, #1
8015e7c: 2b00 cmp r3, #0
8015e7e: f000 80b8 beq.w 8015ff2 <tcp_receive+0xb7e>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n"));
recv_flags |= TF_GOT_FIN;
8015e82: 4b45 ldr r3, [pc, #276] ; (8015f98 <tcp_receive+0xb24>)
8015e84: 781b ldrb r3, [r3, #0]
8015e86: f043 0320 orr.w r3, r3, #32
8015e8a: b2da uxtb r2, r3
8015e8c: 4b42 ldr r3, [pc, #264] ; (8015f98 <tcp_receive+0xb24>)
8015e8e: 701a strb r2, [r3, #0]
}
#if TCP_QUEUE_OOSEQ
/* We now check if we have segments on the ->ooseq queue that
are now in sequence. */
while (pcb->ooseq != NULL &&
8015e90: e0af b.n 8015ff2 <tcp_receive+0xb7e>
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
struct tcp_seg *cseg = pcb->ooseq;
8015e92: 687b ldr r3, [r7, #4]
8015e94: 6f5b ldr r3, [r3, #116] ; 0x74
8015e96: 60bb str r3, [r7, #8]
seqno = pcb->ooseq->tcphdr->seqno;
8015e98: 687b ldr r3, [r7, #4]
8015e9a: 6f5b ldr r3, [r3, #116] ; 0x74
8015e9c: 68db ldr r3, [r3, #12]
8015e9e: 685b ldr r3, [r3, #4]
8015ea0: 4a36 ldr r2, [pc, #216] ; (8015f7c <tcp_receive+0xb08>)
8015ea2: 6013 str r3, [r2, #0]
pcb->rcv_nxt += TCP_TCPLEN(cseg);
8015ea4: 68bb ldr r3, [r7, #8]
8015ea6: 891b ldrh r3, [r3, #8]
8015ea8: 461c mov r4, r3
8015eaa: 68bb ldr r3, [r7, #8]
8015eac: 68db ldr r3, [r3, #12]
8015eae: 899b ldrh r3, [r3, #12]
8015eb0: b29b uxth r3, r3
8015eb2: 4618 mov r0, r3
8015eb4: f7fa fe3c bl 8010b30 <lwip_htons>
8015eb8: 4603 mov r3, r0
8015eba: b2db uxtb r3, r3
8015ebc: f003 0303 and.w r3, r3, #3
8015ec0: 2b00 cmp r3, #0
8015ec2: d001 beq.n 8015ec8 <tcp_receive+0xa54>
8015ec4: 2301 movs r3, #1
8015ec6: e000 b.n 8015eca <tcp_receive+0xa56>
8015ec8: 2300 movs r3, #0
8015eca: 191a adds r2, r3, r4
8015ecc: 687b ldr r3, [r7, #4]
8015ece: 6a5b ldr r3, [r3, #36] ; 0x24
8015ed0: 441a add r2, r3
8015ed2: 687b ldr r3, [r7, #4]
8015ed4: 625a str r2, [r3, #36] ; 0x24
LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
8015ed6: 687b ldr r3, [r7, #4]
8015ed8: 8d1b ldrh r3, [r3, #40] ; 0x28
8015eda: 461c mov r4, r3
8015edc: 68bb ldr r3, [r7, #8]
8015ede: 891b ldrh r3, [r3, #8]
8015ee0: 461d mov r5, r3
8015ee2: 68bb ldr r3, [r7, #8]
8015ee4: 68db ldr r3, [r3, #12]
8015ee6: 899b ldrh r3, [r3, #12]
8015ee8: b29b uxth r3, r3
8015eea: 4618 mov r0, r3
8015eec: f7fa fe20 bl 8010b30 <lwip_htons>
8015ef0: 4603 mov r3, r0
8015ef2: b2db uxtb r3, r3
8015ef4: f003 0303 and.w r3, r3, #3
8015ef8: 2b00 cmp r3, #0
8015efa: d001 beq.n 8015f00 <tcp_receive+0xa8c>
8015efc: 2301 movs r3, #1
8015efe: e000 b.n 8015f02 <tcp_receive+0xa8e>
8015f00: 2300 movs r3, #0
8015f02: 442b add r3, r5
8015f04: 429c cmp r4, r3
8015f06: d206 bcs.n 8015f16 <tcp_receive+0xaa2>
8015f08: 4b1e ldr r3, [pc, #120] ; (8015f84 <tcp_receive+0xb10>)
8015f0a: f240 622c movw r2, #1580 ; 0x62c
8015f0e: 4923 ldr r1, [pc, #140] ; (8015f9c <tcp_receive+0xb28>)
8015f10: 481e ldr r0, [pc, #120] ; (8015f8c <tcp_receive+0xb18>)
8015f12: f006 fef1 bl 801ccf8 <iprintf>
pcb->rcv_wnd >= TCP_TCPLEN(cseg));
pcb->rcv_wnd -= TCP_TCPLEN(cseg);
8015f16: 68bb ldr r3, [r7, #8]
8015f18: 891b ldrh r3, [r3, #8]
8015f1a: 461c mov r4, r3
8015f1c: 68bb ldr r3, [r7, #8]
8015f1e: 68db ldr r3, [r3, #12]
8015f20: 899b ldrh r3, [r3, #12]
8015f22: b29b uxth r3, r3
8015f24: 4618 mov r0, r3
8015f26: f7fa fe03 bl 8010b30 <lwip_htons>
8015f2a: 4603 mov r3, r0
8015f2c: b2db uxtb r3, r3
8015f2e: f003 0303 and.w r3, r3, #3
8015f32: 2b00 cmp r3, #0
8015f34: d001 beq.n 8015f3a <tcp_receive+0xac6>
8015f36: 2301 movs r3, #1
8015f38: e000 b.n 8015f3c <tcp_receive+0xac8>
8015f3a: 2300 movs r3, #0
8015f3c: 1919 adds r1, r3, r4
8015f3e: 687b ldr r3, [r7, #4]
8015f40: 8d1a ldrh r2, [r3, #40] ; 0x28
8015f42: b28b uxth r3, r1
8015f44: 1ad3 subs r3, r2, r3
8015f46: b29a uxth r2, r3
8015f48: 687b ldr r3, [r7, #4]
8015f4a: 851a strh r2, [r3, #40] ; 0x28
tcp_update_rcv_ann_wnd(pcb);
8015f4c: 6878 ldr r0, [r7, #4]
8015f4e: f7fc ff4b bl 8012de8 <tcp_update_rcv_ann_wnd>
if (cseg->p->tot_len > 0) {
8015f52: 68bb ldr r3, [r7, #8]
8015f54: 685b ldr r3, [r3, #4]
8015f56: 891b ldrh r3, [r3, #8]
8015f58: 2b00 cmp r3, #0
8015f5a: d028 beq.n 8015fae <tcp_receive+0xb3a>
/* Chain this pbuf onto the pbuf that we will pass to
the application. */
/* With window scaling, this can overflow recv_data->tot_len, but
that's not a problem since we explicitly fix that before passing
recv_data to the application. */
if (recv_data) {
8015f5c: 4b0d ldr r3, [pc, #52] ; (8015f94 <tcp_receive+0xb20>)
8015f5e: 681b ldr r3, [r3, #0]
8015f60: 2b00 cmp r3, #0
8015f62: d01d beq.n 8015fa0 <tcp_receive+0xb2c>
pbuf_cat(recv_data, cseg->p);
8015f64: 4b0b ldr r3, [pc, #44] ; (8015f94 <tcp_receive+0xb20>)
8015f66: 681a ldr r2, [r3, #0]
8015f68: 68bb ldr r3, [r7, #8]
8015f6a: 685b ldr r3, [r3, #4]
8015f6c: 4619 mov r1, r3
8015f6e: 4610 mov r0, r2
8015f70: f7fc fa60 bl 8012434 <pbuf_cat>
8015f74: e018 b.n 8015fa8 <tcp_receive+0xb34>
8015f76: bf00 nop
8015f78: 20008756 .word 0x20008756
8015f7c: 2000874c .word 0x2000874c
8015f80: 2000872c .word 0x2000872c
8015f84: 0801f2f0 .word 0x0801f2f0
8015f88: 0801f6d0 .word 0x0801f6d0
8015f8c: 0801f33c .word 0x0801f33c
8015f90: 0801f70c .word 0x0801f70c
8015f94: 2000875c .word 0x2000875c
8015f98: 20008759 .word 0x20008759
8015f9c: 0801f72c .word 0x0801f72c
} else {
recv_data = cseg->p;
8015fa0: 68bb ldr r3, [r7, #8]
8015fa2: 685b ldr r3, [r3, #4]
8015fa4: 4a70 ldr r2, [pc, #448] ; (8016168 <tcp_receive+0xcf4>)
8015fa6: 6013 str r3, [r2, #0]
}
cseg->p = NULL;
8015fa8: 68bb ldr r3, [r7, #8]
8015faa: 2200 movs r2, #0
8015fac: 605a str r2, [r3, #4]
}
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
8015fae: 68bb ldr r3, [r7, #8]
8015fb0: 68db ldr r3, [r3, #12]
8015fb2: 899b ldrh r3, [r3, #12]
8015fb4: b29b uxth r3, r3
8015fb6: 4618 mov r0, r3
8015fb8: f7fa fdba bl 8010b30 <lwip_htons>
8015fbc: 4603 mov r3, r0
8015fbe: b2db uxtb r3, r3
8015fc0: f003 0301 and.w r3, r3, #1
8015fc4: 2b00 cmp r3, #0
8015fc6: d00d beq.n 8015fe4 <tcp_receive+0xb70>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n"));
recv_flags |= TF_GOT_FIN;
8015fc8: 4b68 ldr r3, [pc, #416] ; (801616c <tcp_receive+0xcf8>)
8015fca: 781b ldrb r3, [r3, #0]
8015fcc: f043 0320 orr.w r3, r3, #32
8015fd0: b2da uxtb r2, r3
8015fd2: 4b66 ldr r3, [pc, #408] ; (801616c <tcp_receive+0xcf8>)
8015fd4: 701a strb r2, [r3, #0]
if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */
8015fd6: 687b ldr r3, [r7, #4]
8015fd8: 7d1b ldrb r3, [r3, #20]
8015fda: 2b04 cmp r3, #4
8015fdc: d102 bne.n 8015fe4 <tcp_receive+0xb70>
pcb->state = CLOSE_WAIT;
8015fde: 687b ldr r3, [r7, #4]
8015fe0: 2207 movs r2, #7
8015fe2: 751a strb r2, [r3, #20]
}
}
pcb->ooseq = cseg->next;
8015fe4: 68bb ldr r3, [r7, #8]
8015fe6: 681a ldr r2, [r3, #0]
8015fe8: 687b ldr r3, [r7, #4]
8015fea: 675a str r2, [r3, #116] ; 0x74
tcp_seg_free(cseg);
8015fec: 68b8 ldr r0, [r7, #8]
8015fee: f7fd fbd7 bl 80137a0 <tcp_seg_free>
while (pcb->ooseq != NULL &&
8015ff2: 687b ldr r3, [r7, #4]
8015ff4: 6f5b ldr r3, [r3, #116] ; 0x74
8015ff6: 2b00 cmp r3, #0
8015ff8: d008 beq.n 801600c <tcp_receive+0xb98>
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
8015ffa: 687b ldr r3, [r7, #4]
8015ffc: 6f5b ldr r3, [r3, #116] ; 0x74
8015ffe: 68db ldr r3, [r3, #12]
8016000: 685a ldr r2, [r3, #4]
8016002: 687b ldr r3, [r7, #4]
8016004: 6a5b ldr r3, [r3, #36] ; 0x24
while (pcb->ooseq != NULL &&
8016006: 429a cmp r2, r3
8016008: f43f af43 beq.w 8015e92 <tcp_receive+0xa1e>
#endif /* LWIP_TCP_SACK_OUT */
#endif /* TCP_QUEUE_OOSEQ */
/* Acknowledge the segment(s). */
tcp_ack(pcb);
801600c: 687b ldr r3, [r7, #4]
801600e: 8b5b ldrh r3, [r3, #26]
8016010: f003 0301 and.w r3, r3, #1
8016014: 2b00 cmp r3, #0
8016016: d00e beq.n 8016036 <tcp_receive+0xbc2>
8016018: 687b ldr r3, [r7, #4]
801601a: 8b5b ldrh r3, [r3, #26]
801601c: f023 0301 bic.w r3, r3, #1
8016020: b29a uxth r2, r3
8016022: 687b ldr r3, [r7, #4]
8016024: 835a strh r2, [r3, #26]
8016026: 687b ldr r3, [r7, #4]
8016028: 8b5b ldrh r3, [r3, #26]
801602a: f043 0302 orr.w r3, r3, #2
801602e: b29a uxth r2, r3
8016030: 687b ldr r3, [r7, #4]
8016032: 835a strh r2, [r3, #26]
if (pcb->rcv_nxt == seqno) {
8016034: e188 b.n 8016348 <tcp_receive+0xed4>
tcp_ack(pcb);
8016036: 687b ldr r3, [r7, #4]
8016038: 8b5b ldrh r3, [r3, #26]
801603a: f043 0301 orr.w r3, r3, #1
801603e: b29a uxth r2, r3
8016040: 687b ldr r3, [r7, #4]
8016042: 835a strh r2, [r3, #26]
if (pcb->rcv_nxt == seqno) {
8016044: e180 b.n 8016348 <tcp_receive+0xed4>
} else {
/* We get here if the incoming segment is out-of-sequence. */
#if TCP_QUEUE_OOSEQ
/* We queue the segment on the ->ooseq queue. */
if (pcb->ooseq == NULL) {
8016046: 687b ldr r3, [r7, #4]
8016048: 6f5b ldr r3, [r3, #116] ; 0x74
801604a: 2b00 cmp r3, #0
801604c: d106 bne.n 801605c <tcp_receive+0xbe8>
pcb->ooseq = tcp_seg_copy(&inseg);
801604e: 4848 ldr r0, [pc, #288] ; (8016170 <tcp_receive+0xcfc>)
8016050: f7fd fbbe bl 80137d0 <tcp_seg_copy>
8016054: 4602 mov r2, r0
8016056: 687b ldr r3, [r7, #4]
8016058: 675a str r2, [r3, #116] ; 0x74
801605a: e16d b.n 8016338 <tcp_receive+0xec4>
#if LWIP_TCP_SACK_OUT
/* This is the left edge of the lowest possible SACK range.
It may start before the newly received segment (possibly adjusted below). */
u32_t sackbeg = TCP_SEQ_LT(seqno, pcb->ooseq->tcphdr->seqno) ? seqno : pcb->ooseq->tcphdr->seqno;
#endif /* LWIP_TCP_SACK_OUT */
struct tcp_seg *next, *prev = NULL;
801605c: 2300 movs r3, #0
801605e: 637b str r3, [r7, #52] ; 0x34
for (next = pcb->ooseq; next != NULL; next = next->next) {
8016060: 687b ldr r3, [r7, #4]
8016062: 6f5b ldr r3, [r3, #116] ; 0x74
8016064: 63bb str r3, [r7, #56] ; 0x38
8016066: e157 b.n 8016318 <tcp_receive+0xea4>
if (seqno == next->tcphdr->seqno) {
8016068: 6bbb ldr r3, [r7, #56] ; 0x38
801606a: 68db ldr r3, [r3, #12]
801606c: 685a ldr r2, [r3, #4]
801606e: 4b41 ldr r3, [pc, #260] ; (8016174 <tcp_receive+0xd00>)
8016070: 681b ldr r3, [r3, #0]
8016072: 429a cmp r2, r3
8016074: d11d bne.n 80160b2 <tcp_receive+0xc3e>
/* The sequence number of the incoming segment is the
same as the sequence number of the segment on
->ooseq. We check the lengths to see which one to
discard. */
if (inseg.len > next->len) {
8016076: 4b3e ldr r3, [pc, #248] ; (8016170 <tcp_receive+0xcfc>)
8016078: 891a ldrh r2, [r3, #8]
801607a: 6bbb ldr r3, [r7, #56] ; 0x38
801607c: 891b ldrh r3, [r3, #8]
801607e: 429a cmp r2, r3
8016080: f240 814f bls.w 8016322 <tcp_receive+0xeae>
/* The incoming segment is larger than the old
segment. We replace some segments with the new
one. */
struct tcp_seg *cseg = tcp_seg_copy(&inseg);
8016084: 483a ldr r0, [pc, #232] ; (8016170 <tcp_receive+0xcfc>)
8016086: f7fd fba3 bl 80137d0 <tcp_seg_copy>
801608a: 6178 str r0, [r7, #20]
if (cseg != NULL) {
801608c: 697b ldr r3, [r7, #20]
801608e: 2b00 cmp r3, #0
8016090: f000 8149 beq.w 8016326 <tcp_receive+0xeb2>
if (prev != NULL) {
8016094: 6b7b ldr r3, [r7, #52] ; 0x34
8016096: 2b00 cmp r3, #0
8016098: d003 beq.n 80160a2 <tcp_receive+0xc2e>
prev->next = cseg;
801609a: 6b7b ldr r3, [r7, #52] ; 0x34
801609c: 697a ldr r2, [r7, #20]
801609e: 601a str r2, [r3, #0]
80160a0: e002 b.n 80160a8 <tcp_receive+0xc34>
} else {
pcb->ooseq = cseg;
80160a2: 687b ldr r3, [r7, #4]
80160a4: 697a ldr r2, [r7, #20]
80160a6: 675a str r2, [r3, #116] ; 0x74
}
tcp_oos_insert_segment(cseg, next);
80160a8: 6bb9 ldr r1, [r7, #56] ; 0x38
80160aa: 6978 ldr r0, [r7, #20]
80160ac: f7ff f8de bl 801526c <tcp_oos_insert_segment>
}
break;
80160b0: e139 b.n 8016326 <tcp_receive+0xeb2>
segment was smaller than the old one; in either
case, we ditch the incoming segment. */
break;
}
} else {
if (prev == NULL) {
80160b2: 6b7b ldr r3, [r7, #52] ; 0x34
80160b4: 2b00 cmp r3, #0
80160b6: d117 bne.n 80160e8 <tcp_receive+0xc74>
if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {
80160b8: 4b2e ldr r3, [pc, #184] ; (8016174 <tcp_receive+0xd00>)
80160ba: 681a ldr r2, [r3, #0]
80160bc: 6bbb ldr r3, [r7, #56] ; 0x38
80160be: 68db ldr r3, [r3, #12]
80160c0: 685b ldr r3, [r3, #4]
80160c2: 1ad3 subs r3, r2, r3
80160c4: 2b00 cmp r3, #0
80160c6: da57 bge.n 8016178 <tcp_receive+0xd04>
/* The sequence number of the incoming segment is lower
than the sequence number of the first segment on the
queue. We put the incoming segment first on the
queue. */
struct tcp_seg *cseg = tcp_seg_copy(&inseg);
80160c8: 4829 ldr r0, [pc, #164] ; (8016170 <tcp_receive+0xcfc>)
80160ca: f7fd fb81 bl 80137d0 <tcp_seg_copy>
80160ce: 61b8 str r0, [r7, #24]
if (cseg != NULL) {
80160d0: 69bb ldr r3, [r7, #24]
80160d2: 2b00 cmp r3, #0
80160d4: f000 8129 beq.w 801632a <tcp_receive+0xeb6>
pcb->ooseq = cseg;
80160d8: 687b ldr r3, [r7, #4]
80160da: 69ba ldr r2, [r7, #24]
80160dc: 675a str r2, [r3, #116] ; 0x74
tcp_oos_insert_segment(cseg, next);
80160de: 6bb9 ldr r1, [r7, #56] ; 0x38
80160e0: 69b8 ldr r0, [r7, #24]
80160e2: f7ff f8c3 bl 801526c <tcp_oos_insert_segment>
}
break;
80160e6: e120 b.n 801632a <tcp_receive+0xeb6>
}
} else {
/*if (TCP_SEQ_LT(prev->tcphdr->seqno, seqno) &&
TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {*/
if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno + 1, next->tcphdr->seqno - 1)) {
80160e8: 4b22 ldr r3, [pc, #136] ; (8016174 <tcp_receive+0xd00>)
80160ea: 681a ldr r2, [r3, #0]
80160ec: 6b7b ldr r3, [r7, #52] ; 0x34
80160ee: 68db ldr r3, [r3, #12]
80160f0: 685b ldr r3, [r3, #4]
80160f2: 1ad3 subs r3, r2, r3
80160f4: 3b01 subs r3, #1
80160f6: 2b00 cmp r3, #0
80160f8: db3e blt.n 8016178 <tcp_receive+0xd04>
80160fa: 4b1e ldr r3, [pc, #120] ; (8016174 <tcp_receive+0xd00>)
80160fc: 681a ldr r2, [r3, #0]
80160fe: 6bbb ldr r3, [r7, #56] ; 0x38
8016100: 68db ldr r3, [r3, #12]
8016102: 685b ldr r3, [r3, #4]
8016104: 1ad3 subs r3, r2, r3
8016106: 3301 adds r3, #1
8016108: 2b00 cmp r3, #0
801610a: dc35 bgt.n 8016178 <tcp_receive+0xd04>
/* The sequence number of the incoming segment is in
between the sequence numbers of the previous and
the next segment on ->ooseq. We trim trim the previous
segment, delete next segments that included in received segment
and trim received, if needed. */
struct tcp_seg *cseg = tcp_seg_copy(&inseg);
801610c: 4818 ldr r0, [pc, #96] ; (8016170 <tcp_receive+0xcfc>)
801610e: f7fd fb5f bl 80137d0 <tcp_seg_copy>
8016112: 61f8 str r0, [r7, #28]
if (cseg != NULL) {
8016114: 69fb ldr r3, [r7, #28]
8016116: 2b00 cmp r3, #0
8016118: f000 8109 beq.w 801632e <tcp_receive+0xeba>
if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) {
801611c: 6b7b ldr r3, [r7, #52] ; 0x34
801611e: 68db ldr r3, [r3, #12]
8016120: 685b ldr r3, [r3, #4]
8016122: 6b7a ldr r2, [r7, #52] ; 0x34
8016124: 8912 ldrh r2, [r2, #8]
8016126: 441a add r2, r3
8016128: 4b12 ldr r3, [pc, #72] ; (8016174 <tcp_receive+0xd00>)
801612a: 681b ldr r3, [r3, #0]
801612c: 1ad3 subs r3, r2, r3
801612e: 2b00 cmp r3, #0
8016130: dd12 ble.n 8016158 <tcp_receive+0xce4>
/* We need to trim the prev segment. */
prev->len = (u16_t)(seqno - prev->tcphdr->seqno);
8016132: 4b10 ldr r3, [pc, #64] ; (8016174 <tcp_receive+0xd00>)
8016134: 681b ldr r3, [r3, #0]
8016136: b29a uxth r2, r3
8016138: 6b7b ldr r3, [r7, #52] ; 0x34
801613a: 68db ldr r3, [r3, #12]
801613c: 685b ldr r3, [r3, #4]
801613e: b29b uxth r3, r3
8016140: 1ad3 subs r3, r2, r3
8016142: b29a uxth r2, r3
8016144: 6b7b ldr r3, [r7, #52] ; 0x34
8016146: 811a strh r2, [r3, #8]
pbuf_realloc(prev->p, prev->len);
8016148: 6b7b ldr r3, [r7, #52] ; 0x34
801614a: 685a ldr r2, [r3, #4]
801614c: 6b7b ldr r3, [r7, #52] ; 0x34
801614e: 891b ldrh r3, [r3, #8]
8016150: 4619 mov r1, r3
8016152: 4610 mov r0, r2
8016154: f7fb ff1a bl 8011f8c <pbuf_realloc>
}
prev->next = cseg;
8016158: 6b7b ldr r3, [r7, #52] ; 0x34
801615a: 69fa ldr r2, [r7, #28]
801615c: 601a str r2, [r3, #0]
tcp_oos_insert_segment(cseg, next);
801615e: 6bb9 ldr r1, [r7, #56] ; 0x38
8016160: 69f8 ldr r0, [r7, #28]
8016162: f7ff f883 bl 801526c <tcp_oos_insert_segment>
}
break;
8016166: e0e2 b.n 801632e <tcp_receive+0xeba>
8016168: 2000875c .word 0x2000875c
801616c: 20008759 .word 0x20008759
8016170: 2000872c .word 0x2000872c
8016174: 2000874c .word 0x2000874c
#endif /* LWIP_TCP_SACK_OUT */
/* We don't use 'prev' below, so let's set it to current 'next'.
This way even if we break the loop below, 'prev' will be pointing
at the segment right in front of the newly added one. */
prev = next;
8016178: 6bbb ldr r3, [r7, #56] ; 0x38
801617a: 637b str r3, [r7, #52] ; 0x34
/* If the "next" segment is the last segment on the
ooseq queue, we add the incoming segment to the end
of the list. */
if (next->next == NULL &&
801617c: 6bbb ldr r3, [r7, #56] ; 0x38
801617e: 681b ldr r3, [r3, #0]
8016180: 2b00 cmp r3, #0
8016182: f040 80c6 bne.w 8016312 <tcp_receive+0xe9e>
TCP_SEQ_GT(seqno, next->tcphdr->seqno)) {
8016186: 4b80 ldr r3, [pc, #512] ; (8016388 <tcp_receive+0xf14>)
8016188: 681a ldr r2, [r3, #0]
801618a: 6bbb ldr r3, [r7, #56] ; 0x38
801618c: 68db ldr r3, [r3, #12]
801618e: 685b ldr r3, [r3, #4]
8016190: 1ad3 subs r3, r2, r3
if (next->next == NULL &&
8016192: 2b00 cmp r3, #0
8016194: f340 80bd ble.w 8016312 <tcp_receive+0xe9e>
if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
8016198: 6bbb ldr r3, [r7, #56] ; 0x38
801619a: 68db ldr r3, [r3, #12]
801619c: 899b ldrh r3, [r3, #12]
801619e: b29b uxth r3, r3
80161a0: 4618 mov r0, r3
80161a2: f7fa fcc5 bl 8010b30 <lwip_htons>
80161a6: 4603 mov r3, r0
80161a8: b2db uxtb r3, r3
80161aa: f003 0301 and.w r3, r3, #1
80161ae: 2b00 cmp r3, #0
80161b0: f040 80bf bne.w 8016332 <tcp_receive+0xebe>
/* segment "next" already contains all data */
break;
}
next->next = tcp_seg_copy(&inseg);
80161b4: 4875 ldr r0, [pc, #468] ; (801638c <tcp_receive+0xf18>)
80161b6: f7fd fb0b bl 80137d0 <tcp_seg_copy>
80161ba: 4602 mov r2, r0
80161bc: 6bbb ldr r3, [r7, #56] ; 0x38
80161be: 601a str r2, [r3, #0]
if (next->next != NULL) {
80161c0: 6bbb ldr r3, [r7, #56] ; 0x38
80161c2: 681b ldr r3, [r3, #0]
80161c4: 2b00 cmp r3, #0
80161c6: f000 80b6 beq.w 8016336 <tcp_receive+0xec2>
if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) {
80161ca: 6bbb ldr r3, [r7, #56] ; 0x38
80161cc: 68db ldr r3, [r3, #12]
80161ce: 685b ldr r3, [r3, #4]
80161d0: 6bba ldr r2, [r7, #56] ; 0x38
80161d2: 8912 ldrh r2, [r2, #8]
80161d4: 441a add r2, r3
80161d6: 4b6c ldr r3, [pc, #432] ; (8016388 <tcp_receive+0xf14>)
80161d8: 681b ldr r3, [r3, #0]
80161da: 1ad3 subs r3, r2, r3
80161dc: 2b00 cmp r3, #0
80161de: dd12 ble.n 8016206 <tcp_receive+0xd92>
/* We need to trim the last segment. */
next->len = (u16_t)(seqno - next->tcphdr->seqno);
80161e0: 4b69 ldr r3, [pc, #420] ; (8016388 <tcp_receive+0xf14>)
80161e2: 681b ldr r3, [r3, #0]
80161e4: b29a uxth r2, r3
80161e6: 6bbb ldr r3, [r7, #56] ; 0x38
80161e8: 68db ldr r3, [r3, #12]
80161ea: 685b ldr r3, [r3, #4]
80161ec: b29b uxth r3, r3
80161ee: 1ad3 subs r3, r2, r3
80161f0: b29a uxth r2, r3
80161f2: 6bbb ldr r3, [r7, #56] ; 0x38
80161f4: 811a strh r2, [r3, #8]
pbuf_realloc(next->p, next->len);
80161f6: 6bbb ldr r3, [r7, #56] ; 0x38
80161f8: 685a ldr r2, [r3, #4]
80161fa: 6bbb ldr r3, [r7, #56] ; 0x38
80161fc: 891b ldrh r3, [r3, #8]
80161fe: 4619 mov r1, r3
8016200: 4610 mov r0, r2
8016202: f7fb fec3 bl 8011f8c <pbuf_realloc>
}
/* check if the remote side overruns our receive window */
if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) {
8016206: 4b62 ldr r3, [pc, #392] ; (8016390 <tcp_receive+0xf1c>)
8016208: 881b ldrh r3, [r3, #0]
801620a: 461a mov r2, r3
801620c: 4b5e ldr r3, [pc, #376] ; (8016388 <tcp_receive+0xf14>)
801620e: 681b ldr r3, [r3, #0]
8016210: 441a add r2, r3
8016212: 687b ldr r3, [r7, #4]
8016214: 6a5b ldr r3, [r3, #36] ; 0x24
8016216: 6879 ldr r1, [r7, #4]
8016218: 8d09 ldrh r1, [r1, #40] ; 0x28
801621a: 440b add r3, r1
801621c: 1ad3 subs r3, r2, r3
801621e: 2b00 cmp r3, #0
8016220: f340 8089 ble.w 8016336 <tcp_receive+0xec2>
LWIP_DEBUGF(TCP_INPUT_DEBUG,
("tcp_receive: other end overran receive window"
"seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n",
seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd));
if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) {
8016224: 6bbb ldr r3, [r7, #56] ; 0x38
8016226: 681b ldr r3, [r3, #0]
8016228: 68db ldr r3, [r3, #12]
801622a: 899b ldrh r3, [r3, #12]
801622c: b29b uxth r3, r3
801622e: 4618 mov r0, r3
8016230: f7fa fc7e bl 8010b30 <lwip_htons>
8016234: 4603 mov r3, r0
8016236: b2db uxtb r3, r3
8016238: f003 0301 and.w r3, r3, #1
801623c: 2b00 cmp r3, #0
801623e: d022 beq.n 8016286 <tcp_receive+0xe12>
/* Must remove the FIN from the header as we're trimming
* that byte of sequence-space from the packet */
TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN);
8016240: 6bbb ldr r3, [r7, #56] ; 0x38
8016242: 681b ldr r3, [r3, #0]
8016244: 68db ldr r3, [r3, #12]
8016246: 899b ldrh r3, [r3, #12]
8016248: b29b uxth r3, r3
801624a: b21b sxth r3, r3
801624c: f423 537c bic.w r3, r3, #16128 ; 0x3f00
8016250: b21c sxth r4, r3
8016252: 6bbb ldr r3, [r7, #56] ; 0x38
8016254: 681b ldr r3, [r3, #0]
8016256: 68db ldr r3, [r3, #12]
8016258: 899b ldrh r3, [r3, #12]
801625a: b29b uxth r3, r3
801625c: 4618 mov r0, r3
801625e: f7fa fc67 bl 8010b30 <lwip_htons>
8016262: 4603 mov r3, r0
8016264: b2db uxtb r3, r3
8016266: b29b uxth r3, r3
8016268: f003 033e and.w r3, r3, #62 ; 0x3e
801626c: b29b uxth r3, r3
801626e: 4618 mov r0, r3
8016270: f7fa fc5e bl 8010b30 <lwip_htons>
8016274: 4603 mov r3, r0
8016276: b21b sxth r3, r3
8016278: 4323 orrs r3, r4
801627a: b21a sxth r2, r3
801627c: 6bbb ldr r3, [r7, #56] ; 0x38
801627e: 681b ldr r3, [r3, #0]
8016280: 68db ldr r3, [r3, #12]
8016282: b292 uxth r2, r2
8016284: 819a strh r2, [r3, #12]
}
/* Adjust length of segment to fit in the window. */
next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno);
8016286: 687b ldr r3, [r7, #4]
8016288: 6a5b ldr r3, [r3, #36] ; 0x24
801628a: b29a uxth r2, r3
801628c: 687b ldr r3, [r7, #4]
801628e: 8d1b ldrh r3, [r3, #40] ; 0x28
8016290: 4413 add r3, r2
8016292: b299 uxth r1, r3
8016294: 4b3c ldr r3, [pc, #240] ; (8016388 <tcp_receive+0xf14>)
8016296: 681b ldr r3, [r3, #0]
8016298: b29a uxth r2, r3
801629a: 6bbb ldr r3, [r7, #56] ; 0x38
801629c: 681b ldr r3, [r3, #0]
801629e: 1a8a subs r2, r1, r2
80162a0: b292 uxth r2, r2
80162a2: 811a strh r2, [r3, #8]
pbuf_realloc(next->next->p, next->next->len);
80162a4: 6bbb ldr r3, [r7, #56] ; 0x38
80162a6: 681b ldr r3, [r3, #0]
80162a8: 685a ldr r2, [r3, #4]
80162aa: 6bbb ldr r3, [r7, #56] ; 0x38
80162ac: 681b ldr r3, [r3, #0]
80162ae: 891b ldrh r3, [r3, #8]
80162b0: 4619 mov r1, r3
80162b2: 4610 mov r0, r2
80162b4: f7fb fe6a bl 8011f8c <pbuf_realloc>
tcplen = TCP_TCPLEN(next->next);
80162b8: 6bbb ldr r3, [r7, #56] ; 0x38
80162ba: 681b ldr r3, [r3, #0]
80162bc: 891c ldrh r4, [r3, #8]
80162be: 6bbb ldr r3, [r7, #56] ; 0x38
80162c0: 681b ldr r3, [r3, #0]
80162c2: 68db ldr r3, [r3, #12]
80162c4: 899b ldrh r3, [r3, #12]
80162c6: b29b uxth r3, r3
80162c8: 4618 mov r0, r3
80162ca: f7fa fc31 bl 8010b30 <lwip_htons>
80162ce: 4603 mov r3, r0
80162d0: b2db uxtb r3, r3
80162d2: f003 0303 and.w r3, r3, #3
80162d6: 2b00 cmp r3, #0
80162d8: d001 beq.n 80162de <tcp_receive+0xe6a>
80162da: 2301 movs r3, #1
80162dc: e000 b.n 80162e0 <tcp_receive+0xe6c>
80162de: 2300 movs r3, #0
80162e0: 4423 add r3, r4
80162e2: b29a uxth r2, r3
80162e4: 4b2a ldr r3, [pc, #168] ; (8016390 <tcp_receive+0xf1c>)
80162e6: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
80162e8: 4b29 ldr r3, [pc, #164] ; (8016390 <tcp_receive+0xf1c>)
80162ea: 881b ldrh r3, [r3, #0]
80162ec: 461a mov r2, r3
80162ee: 4b26 ldr r3, [pc, #152] ; (8016388 <tcp_receive+0xf14>)
80162f0: 681b ldr r3, [r3, #0]
80162f2: 441a add r2, r3
80162f4: 687b ldr r3, [r7, #4]
80162f6: 6a5b ldr r3, [r3, #36] ; 0x24
80162f8: 6879 ldr r1, [r7, #4]
80162fa: 8d09 ldrh r1, [r1, #40] ; 0x28
80162fc: 440b add r3, r1
80162fe: 429a cmp r2, r3
8016300: d019 beq.n 8016336 <tcp_receive+0xec2>
8016302: 4b24 ldr r3, [pc, #144] ; (8016394 <tcp_receive+0xf20>)
8016304: f240 62f9 movw r2, #1785 ; 0x6f9
8016308: 4923 ldr r1, [pc, #140] ; (8016398 <tcp_receive+0xf24>)
801630a: 4824 ldr r0, [pc, #144] ; (801639c <tcp_receive+0xf28>)
801630c: f006 fcf4 bl 801ccf8 <iprintf>
(seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd));
}
}
break;
8016310: e011 b.n 8016336 <tcp_receive+0xec2>
for (next = pcb->ooseq; next != NULL; next = next->next) {
8016312: 6bbb ldr r3, [r7, #56] ; 0x38
8016314: 681b ldr r3, [r3, #0]
8016316: 63bb str r3, [r7, #56] ; 0x38
8016318: 6bbb ldr r3, [r7, #56] ; 0x38
801631a: 2b00 cmp r3, #0
801631c: f47f aea4 bne.w 8016068 <tcp_receive+0xbf4>
8016320: e00a b.n 8016338 <tcp_receive+0xec4>
break;
8016322: bf00 nop
8016324: e008 b.n 8016338 <tcp_receive+0xec4>
break;
8016326: bf00 nop
8016328: e006 b.n 8016338 <tcp_receive+0xec4>
break;
801632a: bf00 nop
801632c: e004 b.n 8016338 <tcp_receive+0xec4>
break;
801632e: bf00 nop
8016330: e002 b.n 8016338 <tcp_receive+0xec4>
break;
8016332: bf00 nop
8016334: e000 b.n 8016338 <tcp_receive+0xec4>
break;
8016336: bf00 nop
#endif /* TCP_OOSEQ_BYTES_LIMIT || TCP_OOSEQ_PBUFS_LIMIT */
#endif /* TCP_QUEUE_OOSEQ */
/* We send the ACK packet after we've (potentially) dealt with SACKs,
so they can be included in the acknowledgment. */
tcp_send_empty_ack(pcb);
8016338: 6878 ldr r0, [r7, #4]
801633a: f001 fa43 bl 80177c4 <tcp_send_empty_ack>
if (pcb->rcv_nxt == seqno) {
801633e: e003 b.n 8016348 <tcp_receive+0xed4>
}
} else {
/* The incoming segment is not within the window. */
tcp_send_empty_ack(pcb);
8016340: 6878 ldr r0, [r7, #4]
8016342: f001 fa3f bl 80177c4 <tcp_send_empty_ack>
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8016346: e01a b.n 801637e <tcp_receive+0xf0a>
8016348: e019 b.n 801637e <tcp_receive+0xf0a>
}
} else {
/* Segments with length 0 is taken care of here. Segments that
fall out of the window are ACKed. */
if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
801634a: 4b0f ldr r3, [pc, #60] ; (8016388 <tcp_receive+0xf14>)
801634c: 681a ldr r2, [r3, #0]
801634e: 687b ldr r3, [r7, #4]
8016350: 6a5b ldr r3, [r3, #36] ; 0x24
8016352: 1ad3 subs r3, r2, r3
8016354: 2b00 cmp r3, #0
8016356: db0a blt.n 801636e <tcp_receive+0xefa>
8016358: 4b0b ldr r3, [pc, #44] ; (8016388 <tcp_receive+0xf14>)
801635a: 681a ldr r2, [r3, #0]
801635c: 687b ldr r3, [r7, #4]
801635e: 6a5b ldr r3, [r3, #36] ; 0x24
8016360: 6879 ldr r1, [r7, #4]
8016362: 8d09 ldrh r1, [r1, #40] ; 0x28
8016364: 440b add r3, r1
8016366: 1ad3 subs r3, r2, r3
8016368: 3301 adds r3, #1
801636a: 2b00 cmp r3, #0
801636c: dd07 ble.n 801637e <tcp_receive+0xf0a>
tcp_ack_now(pcb);
801636e: 687b ldr r3, [r7, #4]
8016370: 8b5b ldrh r3, [r3, #26]
8016372: f043 0302 orr.w r3, r3, #2
8016376: b29a uxth r2, r3
8016378: 687b ldr r3, [r7, #4]
801637a: 835a strh r2, [r3, #26]
}
}
}
801637c: e7ff b.n 801637e <tcp_receive+0xf0a>
801637e: bf00 nop
8016380: 3750 adds r7, #80 ; 0x50
8016382: 46bd mov sp, r7
8016384: bdb0 pop {r4, r5, r7, pc}
8016386: bf00 nop
8016388: 2000874c .word 0x2000874c
801638c: 2000872c .word 0x2000872c
8016390: 20008756 .word 0x20008756
8016394: 0801f2f0 .word 0x0801f2f0
8016398: 0801f698 .word 0x0801f698
801639c: 0801f33c .word 0x0801f33c
080163a0 <tcp_get_next_optbyte>:
static u8_t
tcp_get_next_optbyte(void)
{
80163a0: b480 push {r7}
80163a2: b083 sub sp, #12
80163a4: af00 add r7, sp, #0
u16_t optidx = tcp_optidx++;
80163a6: 4b15 ldr r3, [pc, #84] ; (80163fc <tcp_get_next_optbyte+0x5c>)
80163a8: 881b ldrh r3, [r3, #0]
80163aa: 1c5a adds r2, r3, #1
80163ac: b291 uxth r1, r2
80163ae: 4a13 ldr r2, [pc, #76] ; (80163fc <tcp_get_next_optbyte+0x5c>)
80163b0: 8011 strh r1, [r2, #0]
80163b2: 80fb strh r3, [r7, #6]
if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) {
80163b4: 4b12 ldr r3, [pc, #72] ; (8016400 <tcp_get_next_optbyte+0x60>)
80163b6: 681b ldr r3, [r3, #0]
80163b8: 2b00 cmp r3, #0
80163ba: d004 beq.n 80163c6 <tcp_get_next_optbyte+0x26>
80163bc: 4b11 ldr r3, [pc, #68] ; (8016404 <tcp_get_next_optbyte+0x64>)
80163be: 881b ldrh r3, [r3, #0]
80163c0: 88fa ldrh r2, [r7, #6]
80163c2: 429a cmp r2, r3
80163c4: d208 bcs.n 80163d8 <tcp_get_next_optbyte+0x38>
u8_t *opts = (u8_t *)tcphdr + TCP_HLEN;
80163c6: 4b10 ldr r3, [pc, #64] ; (8016408 <tcp_get_next_optbyte+0x68>)
80163c8: 681b ldr r3, [r3, #0]
80163ca: 3314 adds r3, #20
80163cc: 603b str r3, [r7, #0]
return opts[optidx];
80163ce: 88fb ldrh r3, [r7, #6]
80163d0: 683a ldr r2, [r7, #0]
80163d2: 4413 add r3, r2
80163d4: 781b ldrb r3, [r3, #0]
80163d6: e00b b.n 80163f0 <tcp_get_next_optbyte+0x50>
} else {
u8_t idx = (u8_t)(optidx - tcphdr_opt1len);
80163d8: 88fb ldrh r3, [r7, #6]
80163da: b2da uxtb r2, r3
80163dc: 4b09 ldr r3, [pc, #36] ; (8016404 <tcp_get_next_optbyte+0x64>)
80163de: 881b ldrh r3, [r3, #0]
80163e0: b2db uxtb r3, r3
80163e2: 1ad3 subs r3, r2, r3
80163e4: 717b strb r3, [r7, #5]
return tcphdr_opt2[idx];
80163e6: 4b06 ldr r3, [pc, #24] ; (8016400 <tcp_get_next_optbyte+0x60>)
80163e8: 681a ldr r2, [r3, #0]
80163ea: 797b ldrb r3, [r7, #5]
80163ec: 4413 add r3, r2
80163ee: 781b ldrb r3, [r3, #0]
}
}
80163f0: 4618 mov r0, r3
80163f2: 370c adds r7, #12
80163f4: 46bd mov sp, r7
80163f6: f85d 7b04 ldr.w r7, [sp], #4
80163fa: 4770 bx lr
80163fc: 20008748 .word 0x20008748
8016400: 20008744 .word 0x20008744
8016404: 20008742 .word 0x20008742
8016408: 2000873c .word 0x2000873c
0801640c <tcp_parseopt>:
*
* @param pcb the tcp_pcb for which a segment arrived
*/
static void
tcp_parseopt(struct tcp_pcb *pcb)
{
801640c: b580 push {r7, lr}
801640e: b084 sub sp, #16
8016410: af00 add r7, sp, #0
8016412: 6078 str r0, [r7, #4]
u16_t mss;
#if LWIP_TCP_TIMESTAMPS
u32_t tsval;
#endif
LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
8016414: 687b ldr r3, [r7, #4]
8016416: 2b00 cmp r3, #0
8016418: d106 bne.n 8016428 <tcp_parseopt+0x1c>
801641a: 4b31 ldr r3, [pc, #196] ; (80164e0 <tcp_parseopt+0xd4>)
801641c: f240 727d movw r2, #1917 ; 0x77d
8016420: 4930 ldr r1, [pc, #192] ; (80164e4 <tcp_parseopt+0xd8>)
8016422: 4831 ldr r0, [pc, #196] ; (80164e8 <tcp_parseopt+0xdc>)
8016424: f006 fc68 bl 801ccf8 <iprintf>
/* Parse the TCP MSS option, if present. */
if (tcphdr_optlen != 0) {
8016428: 4b30 ldr r3, [pc, #192] ; (80164ec <tcp_parseopt+0xe0>)
801642a: 881b ldrh r3, [r3, #0]
801642c: 2b00 cmp r3, #0
801642e: d053 beq.n 80164d8 <tcp_parseopt+0xcc>
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
8016430: 4b2f ldr r3, [pc, #188] ; (80164f0 <tcp_parseopt+0xe4>)
8016432: 2200 movs r2, #0
8016434: 801a strh r2, [r3, #0]
8016436: e043 b.n 80164c0 <tcp_parseopt+0xb4>
u8_t opt = tcp_get_next_optbyte();
8016438: f7ff ffb2 bl 80163a0 <tcp_get_next_optbyte>
801643c: 4603 mov r3, r0
801643e: 73fb strb r3, [r7, #15]
switch (opt) {
8016440: 7bfb ldrb r3, [r7, #15]
8016442: 2b01 cmp r3, #1
8016444: d03c beq.n 80164c0 <tcp_parseopt+0xb4>
8016446: 2b02 cmp r3, #2
8016448: d002 beq.n 8016450 <tcp_parseopt+0x44>
801644a: 2b00 cmp r3, #0
801644c: d03f beq.n 80164ce <tcp_parseopt+0xc2>
801644e: e026 b.n 801649e <tcp_parseopt+0x92>
/* NOP option. */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n"));
break;
case LWIP_TCP_OPT_MSS:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n"));
if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) {
8016450: f7ff ffa6 bl 80163a0 <tcp_get_next_optbyte>
8016454: 4603 mov r3, r0
8016456: 2b04 cmp r3, #4
8016458: d13b bne.n 80164d2 <tcp_parseopt+0xc6>
801645a: 4b25 ldr r3, [pc, #148] ; (80164f0 <tcp_parseopt+0xe4>)
801645c: 881b ldrh r3, [r3, #0]
801645e: 3302 adds r3, #2
8016460: 4a22 ldr r2, [pc, #136] ; (80164ec <tcp_parseopt+0xe0>)
8016462: 8812 ldrh r2, [r2, #0]
8016464: 4293 cmp r3, r2
8016466: dc34 bgt.n 80164d2 <tcp_parseopt+0xc6>
/* Bad length */
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n"));
return;
}
/* An MSS option with the right option length. */
mss = (u16_t)(tcp_get_next_optbyte() << 8);
8016468: f7ff ff9a bl 80163a0 <tcp_get_next_optbyte>
801646c: 4603 mov r3, r0
801646e: b29b uxth r3, r3
8016470: 021b lsls r3, r3, #8
8016472: 81bb strh r3, [r7, #12]
mss |= tcp_get_next_optbyte();
8016474: f7ff ff94 bl 80163a0 <tcp_get_next_optbyte>
8016478: 4603 mov r3, r0
801647a: b29a uxth r2, r3
801647c: 89bb ldrh r3, [r7, #12]
801647e: 4313 orrs r3, r2
8016480: 81bb strh r3, [r7, #12]
/* Limit the mss to the configured TCP_MSS and prevent division by zero */
pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss;
8016482: 89bb ldrh r3, [r7, #12]
8016484: f5b3 7f06 cmp.w r3, #536 ; 0x218
8016488: d804 bhi.n 8016494 <tcp_parseopt+0x88>
801648a: 89bb ldrh r3, [r7, #12]
801648c: 2b00 cmp r3, #0
801648e: d001 beq.n 8016494 <tcp_parseopt+0x88>
8016490: 89ba ldrh r2, [r7, #12]
8016492: e001 b.n 8016498 <tcp_parseopt+0x8c>
8016494: f44f 7206 mov.w r2, #536 ; 0x218
8016498: 687b ldr r3, [r7, #4]
801649a: 865a strh r2, [r3, #50] ; 0x32
break;
801649c: e010 b.n 80164c0 <tcp_parseopt+0xb4>
}
break;
#endif /* LWIP_TCP_SACK_OUT */
default:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n"));
data = tcp_get_next_optbyte();
801649e: f7ff ff7f bl 80163a0 <tcp_get_next_optbyte>
80164a2: 4603 mov r3, r0
80164a4: 72fb strb r3, [r7, #11]
if (data < 2) {
80164a6: 7afb ldrb r3, [r7, #11]
80164a8: 2b01 cmp r3, #1
80164aa: d914 bls.n 80164d6 <tcp_parseopt+0xca>
and we don't process them further. */
return;
}
/* All other options have a length field, so that we easily
can skip past them. */
tcp_optidx += data - 2;
80164ac: 7afb ldrb r3, [r7, #11]
80164ae: b29a uxth r2, r3
80164b0: 4b0f ldr r3, [pc, #60] ; (80164f0 <tcp_parseopt+0xe4>)
80164b2: 881b ldrh r3, [r3, #0]
80164b4: 4413 add r3, r2
80164b6: b29b uxth r3, r3
80164b8: 3b02 subs r3, #2
80164ba: b29a uxth r2, r3
80164bc: 4b0c ldr r3, [pc, #48] ; (80164f0 <tcp_parseopt+0xe4>)
80164be: 801a strh r2, [r3, #0]
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
80164c0: 4b0b ldr r3, [pc, #44] ; (80164f0 <tcp_parseopt+0xe4>)
80164c2: 881a ldrh r2, [r3, #0]
80164c4: 4b09 ldr r3, [pc, #36] ; (80164ec <tcp_parseopt+0xe0>)
80164c6: 881b ldrh r3, [r3, #0]
80164c8: 429a cmp r2, r3
80164ca: d3b5 bcc.n 8016438 <tcp_parseopt+0x2c>
80164cc: e004 b.n 80164d8 <tcp_parseopt+0xcc>
return;
80164ce: bf00 nop
80164d0: e002 b.n 80164d8 <tcp_parseopt+0xcc>
return;
80164d2: bf00 nop
80164d4: e000 b.n 80164d8 <tcp_parseopt+0xcc>
return;
80164d6: bf00 nop
}
}
}
}
80164d8: 3710 adds r7, #16
80164da: 46bd mov sp, r7
80164dc: bd80 pop {r7, pc}
80164de: bf00 nop
80164e0: 0801f2f0 .word 0x0801f2f0
80164e4: 0801f754 .word 0x0801f754
80164e8: 0801f33c .word 0x0801f33c
80164ec: 20008740 .word 0x20008740
80164f0: 20008748 .word 0x20008748
080164f4 <tcp_trigger_input_pcb_close>:
void
tcp_trigger_input_pcb_close(void)
{
80164f4: b480 push {r7}
80164f6: af00 add r7, sp, #0
recv_flags |= TF_CLOSED;
80164f8: 4b05 ldr r3, [pc, #20] ; (8016510 <tcp_trigger_input_pcb_close+0x1c>)
80164fa: 781b ldrb r3, [r3, #0]
80164fc: f043 0310 orr.w r3, r3, #16
8016500: b2da uxtb r2, r3
8016502: 4b03 ldr r3, [pc, #12] ; (8016510 <tcp_trigger_input_pcb_close+0x1c>)
8016504: 701a strb r2, [r3, #0]
}
8016506: bf00 nop
8016508: 46bd mov sp, r7
801650a: f85d 7b04 ldr.w r7, [sp], #4
801650e: 4770 bx lr
8016510: 20008759 .word 0x20008759
08016514 <tcp_route>:
static err_t tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif);
/* tcp_route: common code that returns a fixed bound netif or calls ip_route */
static struct netif *
tcp_route(const struct tcp_pcb *pcb, const ip_addr_t *src, const ip_addr_t *dst)
{
8016514: b580 push {r7, lr}
8016516: b084 sub sp, #16
8016518: af00 add r7, sp, #0
801651a: 60f8 str r0, [r7, #12]
801651c: 60b9 str r1, [r7, #8]
801651e: 607a str r2, [r7, #4]
LWIP_UNUSED_ARG(src); /* in case IPv4-only and source-based routing is disabled */
if ((pcb != NULL) && (pcb->netif_idx != NETIF_NO_INDEX)) {
8016520: 68fb ldr r3, [r7, #12]
8016522: 2b00 cmp r3, #0
8016524: d00a beq.n 801653c <tcp_route+0x28>
8016526: 68fb ldr r3, [r7, #12]
8016528: 7a1b ldrb r3, [r3, #8]
801652a: 2b00 cmp r3, #0
801652c: d006 beq.n 801653c <tcp_route+0x28>
return netif_get_by_index(pcb->netif_idx);
801652e: 68fb ldr r3, [r7, #12]
8016530: 7a1b ldrb r3, [r3, #8]
8016532: 4618 mov r0, r3
8016534: f7fb fb26 bl 8011b84 <netif_get_by_index>
8016538: 4603 mov r3, r0
801653a: e003 b.n 8016544 <tcp_route+0x30>
} else {
return ip_route(src, dst);
801653c: 6878 ldr r0, [r7, #4]
801653e: f005 f867 bl 801b610 <ip4_route>
8016542: 4603 mov r3, r0
}
}
8016544: 4618 mov r0, r3
8016546: 3710 adds r7, #16
8016548: 46bd mov sp, r7
801654a: bd80 pop {r7, pc}
0801654c <tcp_create_segment>:
* The TCP header is filled in except ackno and wnd.
* p is freed on failure.
*/
static struct tcp_seg *
tcp_create_segment(const struct tcp_pcb *pcb, struct pbuf *p, u8_t hdrflags, u32_t seqno, u8_t optflags)
{
801654c: b590 push {r4, r7, lr}
801654e: b087 sub sp, #28
8016550: af00 add r7, sp, #0
8016552: 60f8 str r0, [r7, #12]
8016554: 60b9 str r1, [r7, #8]
8016556: 603b str r3, [r7, #0]
8016558: 4613 mov r3, r2
801655a: 71fb strb r3, [r7, #7]
struct tcp_seg *seg;
u8_t optlen;
LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
801655c: 68fb ldr r3, [r7, #12]
801655e: 2b00 cmp r3, #0
8016560: d105 bne.n 801656e <tcp_create_segment+0x22>
8016562: 4b44 ldr r3, [pc, #272] ; (8016674 <tcp_create_segment+0x128>)
8016564: 22a3 movs r2, #163 ; 0xa3
8016566: 4944 ldr r1, [pc, #272] ; (8016678 <tcp_create_segment+0x12c>)
8016568: 4844 ldr r0, [pc, #272] ; (801667c <tcp_create_segment+0x130>)
801656a: f006 fbc5 bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
801656e: 68bb ldr r3, [r7, #8]
8016570: 2b00 cmp r3, #0
8016572: d105 bne.n 8016580 <tcp_create_segment+0x34>
8016574: 4b3f ldr r3, [pc, #252] ; (8016674 <tcp_create_segment+0x128>)
8016576: 22a4 movs r2, #164 ; 0xa4
8016578: 4941 ldr r1, [pc, #260] ; (8016680 <tcp_create_segment+0x134>)
801657a: 4840 ldr r0, [pc, #256] ; (801667c <tcp_create_segment+0x130>)
801657c: f006 fbbc bl 801ccf8 <iprintf>
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
8016580: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
8016584: 009b lsls r3, r3, #2
8016586: b2db uxtb r3, r3
8016588: f003 0304 and.w r3, r3, #4
801658c: 75fb strb r3, [r7, #23]
if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) {
801658e: 2003 movs r0, #3
8016590: f7fa ff84 bl 801149c <memp_malloc>
8016594: 6138 str r0, [r7, #16]
8016596: 693b ldr r3, [r7, #16]
8016598: 2b00 cmp r3, #0
801659a: d104 bne.n 80165a6 <tcp_create_segment+0x5a>
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n"));
pbuf_free(p);
801659c: 68b8 ldr r0, [r7, #8]
801659e: f7fb fe7b bl 8012298 <pbuf_free>
return NULL;
80165a2: 2300 movs r3, #0
80165a4: e061 b.n 801666a <tcp_create_segment+0x11e>
}
seg->flags = optflags;
80165a6: 693b ldr r3, [r7, #16]
80165a8: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
80165ac: 729a strb r2, [r3, #10]
seg->next = NULL;
80165ae: 693b ldr r3, [r7, #16]
80165b0: 2200 movs r2, #0
80165b2: 601a str r2, [r3, #0]
seg->p = p;
80165b4: 693b ldr r3, [r7, #16]
80165b6: 68ba ldr r2, [r7, #8]
80165b8: 605a str r2, [r3, #4]
LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
80165ba: 68bb ldr r3, [r7, #8]
80165bc: 891a ldrh r2, [r3, #8]
80165be: 7dfb ldrb r3, [r7, #23]
80165c0: b29b uxth r3, r3
80165c2: 429a cmp r2, r3
80165c4: d205 bcs.n 80165d2 <tcp_create_segment+0x86>
80165c6: 4b2b ldr r3, [pc, #172] ; (8016674 <tcp_create_segment+0x128>)
80165c8: 22b0 movs r2, #176 ; 0xb0
80165ca: 492e ldr r1, [pc, #184] ; (8016684 <tcp_create_segment+0x138>)
80165cc: 482b ldr r0, [pc, #172] ; (801667c <tcp_create_segment+0x130>)
80165ce: f006 fb93 bl 801ccf8 <iprintf>
seg->len = p->tot_len - optlen;
80165d2: 68bb ldr r3, [r7, #8]
80165d4: 891a ldrh r2, [r3, #8]
80165d6: 7dfb ldrb r3, [r7, #23]
80165d8: b29b uxth r3, r3
80165da: 1ad3 subs r3, r2, r3
80165dc: b29a uxth r2, r3
80165de: 693b ldr r3, [r7, #16]
80165e0: 811a strh r2, [r3, #8]
LWIP_ASSERT("invalid optflags passed: TF_SEG_DATA_CHECKSUMMED",
(optflags & TF_SEG_DATA_CHECKSUMMED) == 0);
#endif /* TCP_CHECKSUM_ON_COPY */
/* build TCP header */
if (pbuf_add_header(p, TCP_HLEN)) {
80165e2: 2114 movs r1, #20
80165e4: 68b8 ldr r0, [r7, #8]
80165e6: f7fb fdc1 bl 801216c <pbuf_add_header>
80165ea: 4603 mov r3, r0
80165ec: 2b00 cmp r3, #0
80165ee: d004 beq.n 80165fa <tcp_create_segment+0xae>
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no room for TCP header in pbuf.\n"));
TCP_STATS_INC(tcp.err);
tcp_seg_free(seg);
80165f0: 6938 ldr r0, [r7, #16]
80165f2: f7fd f8d5 bl 80137a0 <tcp_seg_free>
return NULL;
80165f6: 2300 movs r3, #0
80165f8: e037 b.n 801666a <tcp_create_segment+0x11e>
}
seg->tcphdr = (struct tcp_hdr *)seg->p->payload;
80165fa: 693b ldr r3, [r7, #16]
80165fc: 685b ldr r3, [r3, #4]
80165fe: 685a ldr r2, [r3, #4]
8016600: 693b ldr r3, [r7, #16]
8016602: 60da str r2, [r3, #12]
seg->tcphdr->src = lwip_htons(pcb->local_port);
8016604: 68fb ldr r3, [r7, #12]
8016606: 8ada ldrh r2, [r3, #22]
8016608: 693b ldr r3, [r7, #16]
801660a: 68dc ldr r4, [r3, #12]
801660c: 4610 mov r0, r2
801660e: f7fa fa8f bl 8010b30 <lwip_htons>
8016612: 4603 mov r3, r0
8016614: 8023 strh r3, [r4, #0]
seg->tcphdr->dest = lwip_htons(pcb->remote_port);
8016616: 68fb ldr r3, [r7, #12]
8016618: 8b1a ldrh r2, [r3, #24]
801661a: 693b ldr r3, [r7, #16]
801661c: 68dc ldr r4, [r3, #12]
801661e: 4610 mov r0, r2
8016620: f7fa fa86 bl 8010b30 <lwip_htons>
8016624: 4603 mov r3, r0
8016626: 8063 strh r3, [r4, #2]
seg->tcphdr->seqno = lwip_htonl(seqno);
8016628: 693b ldr r3, [r7, #16]
801662a: 68dc ldr r4, [r3, #12]
801662c: 6838 ldr r0, [r7, #0]
801662e: f7fa fa94 bl 8010b5a <lwip_htonl>
8016632: 4603 mov r3, r0
8016634: 6063 str r3, [r4, #4]
/* ackno is set in tcp_output */
TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags);
8016636: 7dfb ldrb r3, [r7, #23]
8016638: 089b lsrs r3, r3, #2
801663a: b2db uxtb r3, r3
801663c: b29b uxth r3, r3
801663e: 3305 adds r3, #5
8016640: b29b uxth r3, r3
8016642: 031b lsls r3, r3, #12
8016644: b29a uxth r2, r3
8016646: 79fb ldrb r3, [r7, #7]
8016648: b29b uxth r3, r3
801664a: 4313 orrs r3, r2
801664c: b29a uxth r2, r3
801664e: 693b ldr r3, [r7, #16]
8016650: 68dc ldr r4, [r3, #12]
8016652: 4610 mov r0, r2
8016654: f7fa fa6c bl 8010b30 <lwip_htons>
8016658: 4603 mov r3, r0
801665a: 81a3 strh r3, [r4, #12]
/* wnd and chksum are set in tcp_output */
seg->tcphdr->urgp = 0;
801665c: 693b ldr r3, [r7, #16]
801665e: 68db ldr r3, [r3, #12]
8016660: 2200 movs r2, #0
8016662: 749a strb r2, [r3, #18]
8016664: 2200 movs r2, #0
8016666: 74da strb r2, [r3, #19]
return seg;
8016668: 693b ldr r3, [r7, #16]
}
801666a: 4618 mov r0, r3
801666c: 371c adds r7, #28
801666e: 46bd mov sp, r7
8016670: bd90 pop {r4, r7, pc}
8016672: bf00 nop
8016674: 0801f770 .word 0x0801f770
8016678: 0801f7a4 .word 0x0801f7a4
801667c: 0801f7c4 .word 0x0801f7c4
8016680: 0801f7ec .word 0x0801f7ec
8016684: 0801f810 .word 0x0801f810
08016688 <tcp_split_unsent_seg>:
* @param pcb the tcp_pcb for which to split the unsent head
* @param split the amount of payload to remain in the head
*/
err_t
tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split)
{
8016688: b590 push {r4, r7, lr}
801668a: b08b sub sp, #44 ; 0x2c
801668c: af02 add r7, sp, #8
801668e: 6078 str r0, [r7, #4]
8016690: 460b mov r3, r1
8016692: 807b strh r3, [r7, #2]
struct tcp_seg *seg = NULL, *useg = NULL;
8016694: 2300 movs r3, #0
8016696: 61fb str r3, [r7, #28]
8016698: 2300 movs r3, #0
801669a: 617b str r3, [r7, #20]
struct pbuf *p = NULL;
801669c: 2300 movs r3, #0
801669e: 613b str r3, [r7, #16]
u16_t chksum = 0;
u8_t chksum_swapped = 0;
struct pbuf *q;
#endif /* TCP_CHECKSUM_ON_COPY */
LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL);
80166a0: 687b ldr r3, [r7, #4]
80166a2: 2b00 cmp r3, #0
80166a4: d106 bne.n 80166b4 <tcp_split_unsent_seg+0x2c>
80166a6: 4b95 ldr r3, [pc, #596] ; (80168fc <tcp_split_unsent_seg+0x274>)
80166a8: f240 324b movw r2, #843 ; 0x34b
80166ac: 4994 ldr r1, [pc, #592] ; (8016900 <tcp_split_unsent_seg+0x278>)
80166ae: 4895 ldr r0, [pc, #596] ; (8016904 <tcp_split_unsent_seg+0x27c>)
80166b0: f006 fb22 bl 801ccf8 <iprintf>
useg = pcb->unsent;
80166b4: 687b ldr r3, [r7, #4]
80166b6: 6edb ldr r3, [r3, #108] ; 0x6c
80166b8: 617b str r3, [r7, #20]
if (useg == NULL) {
80166ba: 697b ldr r3, [r7, #20]
80166bc: 2b00 cmp r3, #0
80166be: d102 bne.n 80166c6 <tcp_split_unsent_seg+0x3e>
return ERR_MEM;
80166c0: f04f 33ff mov.w r3, #4294967295
80166c4: e116 b.n 80168f4 <tcp_split_unsent_seg+0x26c>
}
if (split == 0) {
80166c6: 887b ldrh r3, [r7, #2]
80166c8: 2b00 cmp r3, #0
80166ca: d109 bne.n 80166e0 <tcp_split_unsent_seg+0x58>
LWIP_ASSERT("Can't split segment into length 0", 0);
80166cc: 4b8b ldr r3, [pc, #556] ; (80168fc <tcp_split_unsent_seg+0x274>)
80166ce: f240 3253 movw r2, #851 ; 0x353
80166d2: 498d ldr r1, [pc, #564] ; (8016908 <tcp_split_unsent_seg+0x280>)
80166d4: 488b ldr r0, [pc, #556] ; (8016904 <tcp_split_unsent_seg+0x27c>)
80166d6: f006 fb0f bl 801ccf8 <iprintf>
return ERR_VAL;
80166da: f06f 0305 mvn.w r3, #5
80166de: e109 b.n 80168f4 <tcp_split_unsent_seg+0x26c>
}
if (useg->len <= split) {
80166e0: 697b ldr r3, [r7, #20]
80166e2: 891b ldrh r3, [r3, #8]
80166e4: 887a ldrh r2, [r7, #2]
80166e6: 429a cmp r2, r3
80166e8: d301 bcc.n 80166ee <tcp_split_unsent_seg+0x66>
return ERR_OK;
80166ea: 2300 movs r3, #0
80166ec: e102 b.n 80168f4 <tcp_split_unsent_seg+0x26c>
}
LWIP_ASSERT("split <= mss", split <= pcb->mss);
80166ee: 687b ldr r3, [r7, #4]
80166f0: 8e5b ldrh r3, [r3, #50] ; 0x32
80166f2: 887a ldrh r2, [r7, #2]
80166f4: 429a cmp r2, r3
80166f6: d906 bls.n 8016706 <tcp_split_unsent_seg+0x7e>
80166f8: 4b80 ldr r3, [pc, #512] ; (80168fc <tcp_split_unsent_seg+0x274>)
80166fa: f240 325b movw r2, #859 ; 0x35b
80166fe: 4983 ldr r1, [pc, #524] ; (801690c <tcp_split_unsent_seg+0x284>)
8016700: 4880 ldr r0, [pc, #512] ; (8016904 <tcp_split_unsent_seg+0x27c>)
8016702: f006 faf9 bl 801ccf8 <iprintf>
LWIP_ASSERT("useg->len > 0", useg->len > 0);
8016706: 697b ldr r3, [r7, #20]
8016708: 891b ldrh r3, [r3, #8]
801670a: 2b00 cmp r3, #0
801670c: d106 bne.n 801671c <tcp_split_unsent_seg+0x94>
801670e: 4b7b ldr r3, [pc, #492] ; (80168fc <tcp_split_unsent_seg+0x274>)
8016710: f44f 7257 mov.w r2, #860 ; 0x35c
8016714: 497e ldr r1, [pc, #504] ; (8016910 <tcp_split_unsent_seg+0x288>)
8016716: 487b ldr r0, [pc, #492] ; (8016904 <tcp_split_unsent_seg+0x27c>)
8016718: f006 faee bl 801ccf8 <iprintf>
* to split this packet so we may actually exceed the max value by
* one!
*/
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue: split_unsent_seg: %u\n", (unsigned int)pcb->snd_queuelen));
optflags = useg->flags;
801671c: 697b ldr r3, [r7, #20]
801671e: 7a9b ldrb r3, [r3, #10]
8016720: 73fb strb r3, [r7, #15]
#if TCP_CHECKSUM_ON_COPY
/* Remove since checksum is not stored until after tcp_create_segment() */
optflags &= ~TF_SEG_DATA_CHECKSUMMED;
#endif /* TCP_CHECKSUM_ON_COPY */
optlen = LWIP_TCP_OPT_LENGTH(optflags);
8016722: 7bfb ldrb r3, [r7, #15]
8016724: 009b lsls r3, r3, #2
8016726: b2db uxtb r3, r3
8016728: f003 0304 and.w r3, r3, #4
801672c: 73bb strb r3, [r7, #14]
remainder = useg->len - split;
801672e: 697b ldr r3, [r7, #20]
8016730: 891a ldrh r2, [r3, #8]
8016732: 887b ldrh r3, [r7, #2]
8016734: 1ad3 subs r3, r2, r3
8016736: 81bb strh r3, [r7, #12]
/* Create new pbuf for the remainder of the split */
p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM);
8016738: 7bbb ldrb r3, [r7, #14]
801673a: b29a uxth r2, r3
801673c: 89bb ldrh r3, [r7, #12]
801673e: 4413 add r3, r2
8016740: b29b uxth r3, r3
8016742: f44f 7220 mov.w r2, #640 ; 0x280
8016746: 4619 mov r1, r3
8016748: 2036 movs r0, #54 ; 0x36
801674a: f7fb fac5 bl 8011cd8 <pbuf_alloc>
801674e: 6138 str r0, [r7, #16]
if (p == NULL) {
8016750: 693b ldr r3, [r7, #16]
8016752: 2b00 cmp r3, #0
8016754: f000 80b7 beq.w 80168c6 <tcp_split_unsent_seg+0x23e>
("tcp_split_unsent_seg: could not allocate memory for pbuf remainder %u\n", remainder));
goto memerr;
}
/* Offset into the original pbuf is past TCP/IP headers, options, and split amount */
offset = useg->p->tot_len - useg->len + split;
8016758: 697b ldr r3, [r7, #20]
801675a: 685b ldr r3, [r3, #4]
801675c: 891a ldrh r2, [r3, #8]
801675e: 697b ldr r3, [r7, #20]
8016760: 891b ldrh r3, [r3, #8]
8016762: 1ad3 subs r3, r2, r3
8016764: b29a uxth r2, r3
8016766: 887b ldrh r3, [r7, #2]
8016768: 4413 add r3, r2
801676a: 817b strh r3, [r7, #10]
/* Copy remainder into new pbuf, headers and options will not be filled out */
if (pbuf_copy_partial(useg->p, (u8_t *)p->payload + optlen, remainder, offset ) != remainder) {
801676c: 697b ldr r3, [r7, #20]
801676e: 6858 ldr r0, [r3, #4]
8016770: 693b ldr r3, [r7, #16]
8016772: 685a ldr r2, [r3, #4]
8016774: 7bbb ldrb r3, [r7, #14]
8016776: 18d1 adds r1, r2, r3
8016778: 897b ldrh r3, [r7, #10]
801677a: 89ba ldrh r2, [r7, #12]
801677c: f7fb ff92 bl 80126a4 <pbuf_copy_partial>
8016780: 4603 mov r3, r0
8016782: 461a mov r2, r3
8016784: 89bb ldrh r3, [r7, #12]
8016786: 4293 cmp r3, r2
8016788: f040 809f bne.w 80168ca <tcp_split_unsent_seg+0x242>
#endif /* TCP_CHECKSUM_ON_COPY */
/* Options are created when calling tcp_output() */
/* Migrate flags from original segment */
split_flags = TCPH_FLAGS(useg->tcphdr);
801678c: 697b ldr r3, [r7, #20]
801678e: 68db ldr r3, [r3, #12]
8016790: 899b ldrh r3, [r3, #12]
8016792: b29b uxth r3, r3
8016794: 4618 mov r0, r3
8016796: f7fa f9cb bl 8010b30 <lwip_htons>
801679a: 4603 mov r3, r0
801679c: b2db uxtb r3, r3
801679e: f003 033f and.w r3, r3, #63 ; 0x3f
80167a2: 76fb strb r3, [r7, #27]
remainder_flags = 0; /* ACK added in tcp_output() */
80167a4: 2300 movs r3, #0
80167a6: 76bb strb r3, [r7, #26]
if (split_flags & TCP_PSH) {
80167a8: 7efb ldrb r3, [r7, #27]
80167aa: f003 0308 and.w r3, r3, #8
80167ae: 2b00 cmp r3, #0
80167b0: d007 beq.n 80167c2 <tcp_split_unsent_seg+0x13a>
split_flags &= ~TCP_PSH;
80167b2: 7efb ldrb r3, [r7, #27]
80167b4: f023 0308 bic.w r3, r3, #8
80167b8: 76fb strb r3, [r7, #27]
remainder_flags |= TCP_PSH;
80167ba: 7ebb ldrb r3, [r7, #26]
80167bc: f043 0308 orr.w r3, r3, #8
80167c0: 76bb strb r3, [r7, #26]
}
if (split_flags & TCP_FIN) {
80167c2: 7efb ldrb r3, [r7, #27]
80167c4: f003 0301 and.w r3, r3, #1
80167c8: 2b00 cmp r3, #0
80167ca: d007 beq.n 80167dc <tcp_split_unsent_seg+0x154>
split_flags &= ~TCP_FIN;
80167cc: 7efb ldrb r3, [r7, #27]
80167ce: f023 0301 bic.w r3, r3, #1
80167d2: 76fb strb r3, [r7, #27]
remainder_flags |= TCP_FIN;
80167d4: 7ebb ldrb r3, [r7, #26]
80167d6: f043 0301 orr.w r3, r3, #1
80167da: 76bb strb r3, [r7, #26]
}
/* SYN should be left on split, RST should not be present with data */
seg = tcp_create_segment(pcb, p, remainder_flags, lwip_ntohl(useg->tcphdr->seqno) + split, optflags);
80167dc: 697b ldr r3, [r7, #20]
80167de: 68db ldr r3, [r3, #12]
80167e0: 685b ldr r3, [r3, #4]
80167e2: 4618 mov r0, r3
80167e4: f7fa f9b9 bl 8010b5a <lwip_htonl>
80167e8: 4602 mov r2, r0
80167ea: 887b ldrh r3, [r7, #2]
80167ec: 18d1 adds r1, r2, r3
80167ee: 7eba ldrb r2, [r7, #26]
80167f0: 7bfb ldrb r3, [r7, #15]
80167f2: 9300 str r3, [sp, #0]
80167f4: 460b mov r3, r1
80167f6: 6939 ldr r1, [r7, #16]
80167f8: 6878 ldr r0, [r7, #4]
80167fa: f7ff fea7 bl 801654c <tcp_create_segment>
80167fe: 61f8 str r0, [r7, #28]
if (seg == NULL) {
8016800: 69fb ldr r3, [r7, #28]
8016802: 2b00 cmp r3, #0
8016804: d063 beq.n 80168ce <tcp_split_unsent_seg+0x246>
seg->chksum_swapped = chksum_swapped;
seg->flags |= TF_SEG_DATA_CHECKSUMMED;
#endif /* TCP_CHECKSUM_ON_COPY */
/* Remove this segment from the queue since trimming it may free pbufs */
pcb->snd_queuelen -= pbuf_clen(useg->p);
8016806: 697b ldr r3, [r7, #20]
8016808: 685b ldr r3, [r3, #4]
801680a: 4618 mov r0, r3
801680c: f7fb fdd2 bl 80123b4 <pbuf_clen>
8016810: 4603 mov r3, r0
8016812: 461a mov r2, r3
8016814: 687b ldr r3, [r7, #4]
8016816: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
801681a: 1a9b subs r3, r3, r2
801681c: b29a uxth r2, r3
801681e: 687b ldr r3, [r7, #4]
8016820: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
/* Trim the original pbuf into our split size. At this point our remainder segment must be setup
successfully because we are modifying the original segment */
pbuf_realloc(useg->p, useg->p->tot_len - remainder);
8016824: 697b ldr r3, [r7, #20]
8016826: 6858 ldr r0, [r3, #4]
8016828: 697b ldr r3, [r7, #20]
801682a: 685b ldr r3, [r3, #4]
801682c: 891a ldrh r2, [r3, #8]
801682e: 89bb ldrh r3, [r7, #12]
8016830: 1ad3 subs r3, r2, r3
8016832: b29b uxth r3, r3
8016834: 4619 mov r1, r3
8016836: f7fb fba9 bl 8011f8c <pbuf_realloc>
useg->len -= remainder;
801683a: 697b ldr r3, [r7, #20]
801683c: 891a ldrh r2, [r3, #8]
801683e: 89bb ldrh r3, [r7, #12]
8016840: 1ad3 subs r3, r2, r3
8016842: b29a uxth r2, r3
8016844: 697b ldr r3, [r7, #20]
8016846: 811a strh r2, [r3, #8]
TCPH_SET_FLAG(useg->tcphdr, split_flags);
8016848: 697b ldr r3, [r7, #20]
801684a: 68db ldr r3, [r3, #12]
801684c: 899b ldrh r3, [r3, #12]
801684e: b29c uxth r4, r3
8016850: 7efb ldrb r3, [r7, #27]
8016852: b29b uxth r3, r3
8016854: 4618 mov r0, r3
8016856: f7fa f96b bl 8010b30 <lwip_htons>
801685a: 4603 mov r3, r0
801685c: 461a mov r2, r3
801685e: 697b ldr r3, [r7, #20]
8016860: 68db ldr r3, [r3, #12]
8016862: 4322 orrs r2, r4
8016864: b292 uxth r2, r2
8016866: 819a strh r2, [r3, #12]
/* By trimming, realloc may have actually shrunk the pbuf, so clear oversize_left */
useg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
/* Add back to the queue with new trimmed pbuf */
pcb->snd_queuelen += pbuf_clen(useg->p);
8016868: 697b ldr r3, [r7, #20]
801686a: 685b ldr r3, [r3, #4]
801686c: 4618 mov r0, r3
801686e: f7fb fda1 bl 80123b4 <pbuf_clen>
8016872: 4603 mov r3, r0
8016874: 461a mov r2, r3
8016876: 687b ldr r3, [r7, #4]
8016878: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
801687c: 4413 add r3, r2
801687e: b29a uxth r2, r3
8016880: 687b ldr r3, [r7, #4]
8016882: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
#endif /* TCP_CHECKSUM_ON_COPY */
/* Update number of segments on the queues. Note that length now may
* exceed TCP_SND_QUEUELEN! We don't have to touch pcb->snd_buf
* because the total amount of data is constant when packet is split */
pcb->snd_queuelen += pbuf_clen(seg->p);
8016886: 69fb ldr r3, [r7, #28]
8016888: 685b ldr r3, [r3, #4]
801688a: 4618 mov r0, r3
801688c: f7fb fd92 bl 80123b4 <pbuf_clen>
8016890: 4603 mov r3, r0
8016892: 461a mov r2, r3
8016894: 687b ldr r3, [r7, #4]
8016896: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
801689a: 4413 add r3, r2
801689c: b29a uxth r2, r3
801689e: 687b ldr r3, [r7, #4]
80168a0: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
/* Finally insert remainder into queue after split (which stays head) */
seg->next = useg->next;
80168a4: 697b ldr r3, [r7, #20]
80168a6: 681a ldr r2, [r3, #0]
80168a8: 69fb ldr r3, [r7, #28]
80168aa: 601a str r2, [r3, #0]
useg->next = seg;
80168ac: 697b ldr r3, [r7, #20]
80168ae: 69fa ldr r2, [r7, #28]
80168b0: 601a str r2, [r3, #0]
#if TCP_OVERSIZE
/* If remainder is last segment on the unsent, ensure we clear the oversize amount
* because the remainder is always sized to the exact remaining amount */
if (seg->next == NULL) {
80168b2: 69fb ldr r3, [r7, #28]
80168b4: 681b ldr r3, [r3, #0]
80168b6: 2b00 cmp r3, #0
80168b8: d103 bne.n 80168c2 <tcp_split_unsent_seg+0x23a>
pcb->unsent_oversize = 0;
80168ba: 687b ldr r3, [r7, #4]
80168bc: 2200 movs r2, #0
80168be: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
}
#endif /* TCP_OVERSIZE */
return ERR_OK;
80168c2: 2300 movs r3, #0
80168c4: e016 b.n 80168f4 <tcp_split_unsent_seg+0x26c>
goto memerr;
80168c6: bf00 nop
80168c8: e002 b.n 80168d0 <tcp_split_unsent_seg+0x248>
goto memerr;
80168ca: bf00 nop
80168cc: e000 b.n 80168d0 <tcp_split_unsent_seg+0x248>
goto memerr;
80168ce: bf00 nop
memerr:
TCP_STATS_INC(tcp.memerr);
LWIP_ASSERT("seg == NULL", seg == NULL);
80168d0: 69fb ldr r3, [r7, #28]
80168d2: 2b00 cmp r3, #0
80168d4: d006 beq.n 80168e4 <tcp_split_unsent_seg+0x25c>
80168d6: 4b09 ldr r3, [pc, #36] ; (80168fc <tcp_split_unsent_seg+0x274>)
80168d8: f44f 7276 mov.w r2, #984 ; 0x3d8
80168dc: 490d ldr r1, [pc, #52] ; (8016914 <tcp_split_unsent_seg+0x28c>)
80168de: 4809 ldr r0, [pc, #36] ; (8016904 <tcp_split_unsent_seg+0x27c>)
80168e0: f006 fa0a bl 801ccf8 <iprintf>
if (p != NULL) {
80168e4: 693b ldr r3, [r7, #16]
80168e6: 2b00 cmp r3, #0
80168e8: d002 beq.n 80168f0 <tcp_split_unsent_seg+0x268>
pbuf_free(p);
80168ea: 6938 ldr r0, [r7, #16]
80168ec: f7fb fcd4 bl 8012298 <pbuf_free>
}
return ERR_MEM;
80168f0: f04f 33ff mov.w r3, #4294967295
}
80168f4: 4618 mov r0, r3
80168f6: 3724 adds r7, #36 ; 0x24
80168f8: 46bd mov sp, r7
80168fa: bd90 pop {r4, r7, pc}
80168fc: 0801f770 .word 0x0801f770
8016900: 0801fb04 .word 0x0801fb04
8016904: 0801f7c4 .word 0x0801f7c4
8016908: 0801fb28 .word 0x0801fb28
801690c: 0801fb4c .word 0x0801fb4c
8016910: 0801fb5c .word 0x0801fb5c
8016914: 0801fb6c .word 0x0801fb6c
08016918 <tcp_send_fin>:
* @param pcb the tcp_pcb over which to send a segment
* @return ERR_OK if sent, another err_t otherwise
*/
err_t
tcp_send_fin(struct tcp_pcb *pcb)
{
8016918: b590 push {r4, r7, lr}
801691a: b085 sub sp, #20
801691c: af00 add r7, sp, #0
801691e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
8016920: 687b ldr r3, [r7, #4]
8016922: 2b00 cmp r3, #0
8016924: d106 bne.n 8016934 <tcp_send_fin+0x1c>
8016926: 4b21 ldr r3, [pc, #132] ; (80169ac <tcp_send_fin+0x94>)
8016928: f240 32eb movw r2, #1003 ; 0x3eb
801692c: 4920 ldr r1, [pc, #128] ; (80169b0 <tcp_send_fin+0x98>)
801692e: 4821 ldr r0, [pc, #132] ; (80169b4 <tcp_send_fin+0x9c>)
8016930: f006 f9e2 bl 801ccf8 <iprintf>
/* first, try to add the fin to the last unsent segment */
if (pcb->unsent != NULL) {
8016934: 687b ldr r3, [r7, #4]
8016936: 6edb ldr r3, [r3, #108] ; 0x6c
8016938: 2b00 cmp r3, #0
801693a: d02e beq.n 801699a <tcp_send_fin+0x82>
struct tcp_seg *last_unsent;
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
801693c: 687b ldr r3, [r7, #4]
801693e: 6edb ldr r3, [r3, #108] ; 0x6c
8016940: 60fb str r3, [r7, #12]
8016942: e002 b.n 801694a <tcp_send_fin+0x32>
last_unsent = last_unsent->next);
8016944: 68fb ldr r3, [r7, #12]
8016946: 681b ldr r3, [r3, #0]
8016948: 60fb str r3, [r7, #12]
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
801694a: 68fb ldr r3, [r7, #12]
801694c: 681b ldr r3, [r3, #0]
801694e: 2b00 cmp r3, #0
8016950: d1f8 bne.n 8016944 <tcp_send_fin+0x2c>
if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) {
8016952: 68fb ldr r3, [r7, #12]
8016954: 68db ldr r3, [r3, #12]
8016956: 899b ldrh r3, [r3, #12]
8016958: b29b uxth r3, r3
801695a: 4618 mov r0, r3
801695c: f7fa f8e8 bl 8010b30 <lwip_htons>
8016960: 4603 mov r3, r0
8016962: b2db uxtb r3, r3
8016964: f003 0307 and.w r3, r3, #7
8016968: 2b00 cmp r3, #0
801696a: d116 bne.n 801699a <tcp_send_fin+0x82>
/* no SYN/FIN/RST flag in the header, we can add the FIN flag */
TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN);
801696c: 68fb ldr r3, [r7, #12]
801696e: 68db ldr r3, [r3, #12]
8016970: 899b ldrh r3, [r3, #12]
8016972: b29c uxth r4, r3
8016974: 2001 movs r0, #1
8016976: f7fa f8db bl 8010b30 <lwip_htons>
801697a: 4603 mov r3, r0
801697c: 461a mov r2, r3
801697e: 68fb ldr r3, [r7, #12]
8016980: 68db ldr r3, [r3, #12]
8016982: 4322 orrs r2, r4
8016984: b292 uxth r2, r2
8016986: 819a strh r2, [r3, #12]
tcp_set_flags(pcb, TF_FIN);
8016988: 687b ldr r3, [r7, #4]
801698a: 8b5b ldrh r3, [r3, #26]
801698c: f043 0320 orr.w r3, r3, #32
8016990: b29a uxth r2, r3
8016992: 687b ldr r3, [r7, #4]
8016994: 835a strh r2, [r3, #26]
return ERR_OK;
8016996: 2300 movs r3, #0
8016998: e004 b.n 80169a4 <tcp_send_fin+0x8c>
}
}
/* no data, no length, flags, copy=1, no optdata */
return tcp_enqueue_flags(pcb, TCP_FIN);
801699a: 2101 movs r1, #1
801699c: 6878 ldr r0, [r7, #4]
801699e: f000 f80b bl 80169b8 <tcp_enqueue_flags>
80169a2: 4603 mov r3, r0
}
80169a4: 4618 mov r0, r3
80169a6: 3714 adds r7, #20
80169a8: 46bd mov sp, r7
80169aa: bd90 pop {r4, r7, pc}
80169ac: 0801f770 .word 0x0801f770
80169b0: 0801fb78 .word 0x0801fb78
80169b4: 0801f7c4 .word 0x0801f7c4
080169b8 <tcp_enqueue_flags>:
* @param pcb Protocol control block for the TCP connection.
* @param flags TCP header flags to set in the outgoing segment.
*/
err_t
tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags)
{
80169b8: b580 push {r7, lr}
80169ba: b08a sub sp, #40 ; 0x28
80169bc: af02 add r7, sp, #8
80169be: 6078 str r0, [r7, #4]
80169c0: 460b mov r3, r1
80169c2: 70fb strb r3, [r7, #3]
struct pbuf *p;
struct tcp_seg *seg;
u8_t optflags = 0;
80169c4: 2300 movs r3, #0
80169c6: 77fb strb r3, [r7, #31]
u8_t optlen = 0;
80169c8: 2300 movs r3, #0
80169ca: 75fb strb r3, [r7, #23]
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: queuelen: %"U16_F"\n", (u16_t)pcb->snd_queuelen));
LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)",
80169cc: 78fb ldrb r3, [r7, #3]
80169ce: f003 0303 and.w r3, r3, #3
80169d2: 2b00 cmp r3, #0
80169d4: d106 bne.n 80169e4 <tcp_enqueue_flags+0x2c>
80169d6: 4b67 ldr r3, [pc, #412] ; (8016b74 <tcp_enqueue_flags+0x1bc>)
80169d8: f240 4212 movw r2, #1042 ; 0x412
80169dc: 4966 ldr r1, [pc, #408] ; (8016b78 <tcp_enqueue_flags+0x1c0>)
80169de: 4867 ldr r0, [pc, #412] ; (8016b7c <tcp_enqueue_flags+0x1c4>)
80169e0: f006 f98a bl 801ccf8 <iprintf>
(flags & (TCP_SYN | TCP_FIN)) != 0);
LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
80169e4: 687b ldr r3, [r7, #4]
80169e6: 2b00 cmp r3, #0
80169e8: d106 bne.n 80169f8 <tcp_enqueue_flags+0x40>
80169ea: 4b62 ldr r3, [pc, #392] ; (8016b74 <tcp_enqueue_flags+0x1bc>)
80169ec: f240 4213 movw r2, #1043 ; 0x413
80169f0: 4963 ldr r1, [pc, #396] ; (8016b80 <tcp_enqueue_flags+0x1c8>)
80169f2: 4862 ldr r0, [pc, #392] ; (8016b7c <tcp_enqueue_flags+0x1c4>)
80169f4: f006 f980 bl 801ccf8 <iprintf>
/* No need to check pcb->snd_queuelen if only SYN or FIN are allowed! */
/* Get options for this segment. This is a special case since this is the
only place where a SYN can be sent. */
if (flags & TCP_SYN) {
80169f8: 78fb ldrb r3, [r7, #3]
80169fa: f003 0302 and.w r3, r3, #2
80169fe: 2b00 cmp r3, #0
8016a00: d001 beq.n 8016a06 <tcp_enqueue_flags+0x4e>
optflags = TF_SEG_OPTS_MSS;
8016a02: 2301 movs r3, #1
8016a04: 77fb strb r3, [r7, #31]
/* Make sure the timestamp option is only included in data segments if we
agreed about it with the remote host (and in active open SYN segments). */
optflags |= TF_SEG_OPTS_TS;
}
#endif /* LWIP_TCP_TIMESTAMPS */
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
8016a06: 7ffb ldrb r3, [r7, #31]
8016a08: 009b lsls r3, r3, #2
8016a0a: b2db uxtb r3, r3
8016a0c: f003 0304 and.w r3, r3, #4
8016a10: 75fb strb r3, [r7, #23]
/* Allocate pbuf with room for TCP header + options */
if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
8016a12: 7dfb ldrb r3, [r7, #23]
8016a14: b29b uxth r3, r3
8016a16: f44f 7220 mov.w r2, #640 ; 0x280
8016a1a: 4619 mov r1, r3
8016a1c: 2036 movs r0, #54 ; 0x36
8016a1e: f7fb f95b bl 8011cd8 <pbuf_alloc>
8016a22: 6138 str r0, [r7, #16]
8016a24: 693b ldr r3, [r7, #16]
8016a26: 2b00 cmp r3, #0
8016a28: d109 bne.n 8016a3e <tcp_enqueue_flags+0x86>
tcp_set_flags(pcb, TF_NAGLEMEMERR);
8016a2a: 687b ldr r3, [r7, #4]
8016a2c: 8b5b ldrh r3, [r3, #26]
8016a2e: f043 0380 orr.w r3, r3, #128 ; 0x80
8016a32: b29a uxth r2, r3
8016a34: 687b ldr r3, [r7, #4]
8016a36: 835a strh r2, [r3, #26]
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
8016a38: f04f 33ff mov.w r3, #4294967295
8016a3c: e095 b.n 8016b6a <tcp_enqueue_flags+0x1b2>
}
LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
8016a3e: 693b ldr r3, [r7, #16]
8016a40: 895a ldrh r2, [r3, #10]
8016a42: 7dfb ldrb r3, [r7, #23]
8016a44: b29b uxth r3, r3
8016a46: 429a cmp r2, r3
8016a48: d206 bcs.n 8016a58 <tcp_enqueue_flags+0xa0>
8016a4a: 4b4a ldr r3, [pc, #296] ; (8016b74 <tcp_enqueue_flags+0x1bc>)
8016a4c: f240 423a movw r2, #1082 ; 0x43a
8016a50: 494c ldr r1, [pc, #304] ; (8016b84 <tcp_enqueue_flags+0x1cc>)
8016a52: 484a ldr r0, [pc, #296] ; (8016b7c <tcp_enqueue_flags+0x1c4>)
8016a54: f006 f950 bl 801ccf8 <iprintf>
(p->len >= optlen));
/* Allocate memory for tcp_seg, and fill in fields. */
if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) {
8016a58: 687b ldr r3, [r7, #4]
8016a5a: 6dd9 ldr r1, [r3, #92] ; 0x5c
8016a5c: 78fa ldrb r2, [r7, #3]
8016a5e: 7ffb ldrb r3, [r7, #31]
8016a60: 9300 str r3, [sp, #0]
8016a62: 460b mov r3, r1
8016a64: 6939 ldr r1, [r7, #16]
8016a66: 6878 ldr r0, [r7, #4]
8016a68: f7ff fd70 bl 801654c <tcp_create_segment>
8016a6c: 60f8 str r0, [r7, #12]
8016a6e: 68fb ldr r3, [r7, #12]
8016a70: 2b00 cmp r3, #0
8016a72: d109 bne.n 8016a88 <tcp_enqueue_flags+0xd0>
tcp_set_flags(pcb, TF_NAGLEMEMERR);
8016a74: 687b ldr r3, [r7, #4]
8016a76: 8b5b ldrh r3, [r3, #26]
8016a78: f043 0380 orr.w r3, r3, #128 ; 0x80
8016a7c: b29a uxth r2, r3
8016a7e: 687b ldr r3, [r7, #4]
8016a80: 835a strh r2, [r3, #26]
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
8016a82: f04f 33ff mov.w r3, #4294967295
8016a86: e070 b.n 8016b6a <tcp_enqueue_flags+0x1b2>
}
LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
8016a88: 68fb ldr r3, [r7, #12]
8016a8a: 68db ldr r3, [r3, #12]
8016a8c: f003 0303 and.w r3, r3, #3
8016a90: 2b00 cmp r3, #0
8016a92: d006 beq.n 8016aa2 <tcp_enqueue_flags+0xea>
8016a94: 4b37 ldr r3, [pc, #220] ; (8016b74 <tcp_enqueue_flags+0x1bc>)
8016a96: f240 4242 movw r2, #1090 ; 0x442
8016a9a: 493b ldr r1, [pc, #236] ; (8016b88 <tcp_enqueue_flags+0x1d0>)
8016a9c: 4837 ldr r0, [pc, #220] ; (8016b7c <tcp_enqueue_flags+0x1c4>)
8016a9e: f006 f92b bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
8016aa2: 68fb ldr r3, [r7, #12]
8016aa4: 891b ldrh r3, [r3, #8]
8016aa6: 2b00 cmp r3, #0
8016aa8: d006 beq.n 8016ab8 <tcp_enqueue_flags+0x100>
8016aaa: 4b32 ldr r3, [pc, #200] ; (8016b74 <tcp_enqueue_flags+0x1bc>)
8016aac: f240 4243 movw r2, #1091 ; 0x443
8016ab0: 4936 ldr r1, [pc, #216] ; (8016b8c <tcp_enqueue_flags+0x1d4>)
8016ab2: 4832 ldr r0, [pc, #200] ; (8016b7c <tcp_enqueue_flags+0x1c4>)
8016ab4: f006 f920 bl 801ccf8 <iprintf>
lwip_ntohl(seg->tcphdr->seqno),
lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg),
(u16_t)flags));
/* Now append seg to pcb->unsent queue */
if (pcb->unsent == NULL) {
8016ab8: 687b ldr r3, [r7, #4]
8016aba: 6edb ldr r3, [r3, #108] ; 0x6c
8016abc: 2b00 cmp r3, #0
8016abe: d103 bne.n 8016ac8 <tcp_enqueue_flags+0x110>
pcb->unsent = seg;
8016ac0: 687b ldr r3, [r7, #4]
8016ac2: 68fa ldr r2, [r7, #12]
8016ac4: 66da str r2, [r3, #108] ; 0x6c
8016ac6: e00d b.n 8016ae4 <tcp_enqueue_flags+0x12c>
} else {
struct tcp_seg *useg;
for (useg = pcb->unsent; useg->next != NULL; useg = useg->next);
8016ac8: 687b ldr r3, [r7, #4]
8016aca: 6edb ldr r3, [r3, #108] ; 0x6c
8016acc: 61bb str r3, [r7, #24]
8016ace: e002 b.n 8016ad6 <tcp_enqueue_flags+0x11e>
8016ad0: 69bb ldr r3, [r7, #24]
8016ad2: 681b ldr r3, [r3, #0]
8016ad4: 61bb str r3, [r7, #24]
8016ad6: 69bb ldr r3, [r7, #24]
8016ad8: 681b ldr r3, [r3, #0]
8016ada: 2b00 cmp r3, #0
8016adc: d1f8 bne.n 8016ad0 <tcp_enqueue_flags+0x118>
useg->next = seg;
8016ade: 69bb ldr r3, [r7, #24]
8016ae0: 68fa ldr r2, [r7, #12]
8016ae2: 601a str r2, [r3, #0]
}
#if TCP_OVERSIZE
/* The new unsent tail has no space */
pcb->unsent_oversize = 0;
8016ae4: 687b ldr r3, [r7, #4]
8016ae6: 2200 movs r2, #0
8016ae8: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
#endif /* TCP_OVERSIZE */
/* SYN and FIN bump the sequence number */
if ((flags & TCP_SYN) || (flags & TCP_FIN)) {
8016aec: 78fb ldrb r3, [r7, #3]
8016aee: f003 0302 and.w r3, r3, #2
8016af2: 2b00 cmp r3, #0
8016af4: d104 bne.n 8016b00 <tcp_enqueue_flags+0x148>
8016af6: 78fb ldrb r3, [r7, #3]
8016af8: f003 0301 and.w r3, r3, #1
8016afc: 2b00 cmp r3, #0
8016afe: d004 beq.n 8016b0a <tcp_enqueue_flags+0x152>
pcb->snd_lbb++;
8016b00: 687b ldr r3, [r7, #4]
8016b02: 6ddb ldr r3, [r3, #92] ; 0x5c
8016b04: 1c5a adds r2, r3, #1
8016b06: 687b ldr r3, [r7, #4]
8016b08: 65da str r2, [r3, #92] ; 0x5c
/* optlen does not influence snd_buf */
}
if (flags & TCP_FIN) {
8016b0a: 78fb ldrb r3, [r7, #3]
8016b0c: f003 0301 and.w r3, r3, #1
8016b10: 2b00 cmp r3, #0
8016b12: d006 beq.n 8016b22 <tcp_enqueue_flags+0x16a>
tcp_set_flags(pcb, TF_FIN);
8016b14: 687b ldr r3, [r7, #4]
8016b16: 8b5b ldrh r3, [r3, #26]
8016b18: f043 0320 orr.w r3, r3, #32
8016b1c: b29a uxth r2, r3
8016b1e: 687b ldr r3, [r7, #4]
8016b20: 835a strh r2, [r3, #26]
}
/* update number of segments on the queues */
pcb->snd_queuelen += pbuf_clen(seg->p);
8016b22: 68fb ldr r3, [r7, #12]
8016b24: 685b ldr r3, [r3, #4]
8016b26: 4618 mov r0, r3
8016b28: f7fb fc44 bl 80123b4 <pbuf_clen>
8016b2c: 4603 mov r3, r0
8016b2e: 461a mov r2, r3
8016b30: 687b ldr r3, [r7, #4]
8016b32: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8016b36: 4413 add r3, r2
8016b38: b29a uxth r2, r3
8016b3a: 687b ldr r3, [r7, #4]
8016b3c: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: %"S16_F" (after enqueued)\n", pcb->snd_queuelen));
if (pcb->snd_queuelen != 0) {
8016b40: 687b ldr r3, [r7, #4]
8016b42: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8016b46: 2b00 cmp r3, #0
8016b48: d00e beq.n 8016b68 <tcp_enqueue_flags+0x1b0>
LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
8016b4a: 687b ldr r3, [r7, #4]
8016b4c: 6f1b ldr r3, [r3, #112] ; 0x70
8016b4e: 2b00 cmp r3, #0
8016b50: d10a bne.n 8016b68 <tcp_enqueue_flags+0x1b0>
8016b52: 687b ldr r3, [r7, #4]
8016b54: 6edb ldr r3, [r3, #108] ; 0x6c
8016b56: 2b00 cmp r3, #0
8016b58: d106 bne.n 8016b68 <tcp_enqueue_flags+0x1b0>
8016b5a: 4b06 ldr r3, [pc, #24] ; (8016b74 <tcp_enqueue_flags+0x1bc>)
8016b5c: f240 4266 movw r2, #1126 ; 0x466
8016b60: 490b ldr r1, [pc, #44] ; (8016b90 <tcp_enqueue_flags+0x1d8>)
8016b62: 4806 ldr r0, [pc, #24] ; (8016b7c <tcp_enqueue_flags+0x1c4>)
8016b64: f006 f8c8 bl 801ccf8 <iprintf>
pcb->unacked != NULL || pcb->unsent != NULL);
}
return ERR_OK;
8016b68: 2300 movs r3, #0
}
8016b6a: 4618 mov r0, r3
8016b6c: 3720 adds r7, #32
8016b6e: 46bd mov sp, r7
8016b70: bd80 pop {r7, pc}
8016b72: bf00 nop
8016b74: 0801f770 .word 0x0801f770
8016b78: 0801fb94 .word 0x0801fb94
8016b7c: 0801f7c4 .word 0x0801f7c4
8016b80: 0801fbec .word 0x0801fbec
8016b84: 0801fc0c .word 0x0801fc0c
8016b88: 0801fc48 .word 0x0801fc48
8016b8c: 0801fc60 .word 0x0801fc60
8016b90: 0801fc8c .word 0x0801fc8c
08016b94 <tcp_output>:
* @return ERR_OK if data has been sent or nothing to send
* another err_t on error
*/
err_t
tcp_output(struct tcp_pcb *pcb)
{
8016b94: b5b0 push {r4, r5, r7, lr}
8016b96: b08a sub sp, #40 ; 0x28
8016b98: af00 add r7, sp, #0
8016b9a: 6078 str r0, [r7, #4]
s16_t i = 0;
#endif /* TCP_CWND_DEBUG */
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL);
8016b9c: 687b ldr r3, [r7, #4]
8016b9e: 2b00 cmp r3, #0
8016ba0: d106 bne.n 8016bb0 <tcp_output+0x1c>
8016ba2: 4ba0 ldr r3, [pc, #640] ; (8016e24 <tcp_output+0x290>)
8016ba4: f240 42e1 movw r2, #1249 ; 0x4e1
8016ba8: 499f ldr r1, [pc, #636] ; (8016e28 <tcp_output+0x294>)
8016baa: 48a0 ldr r0, [pc, #640] ; (8016e2c <tcp_output+0x298>)
8016bac: f006 f8a4 bl 801ccf8 <iprintf>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_output for listen-pcbs",
8016bb0: 687b ldr r3, [r7, #4]
8016bb2: 7d1b ldrb r3, [r3, #20]
8016bb4: 2b01 cmp r3, #1
8016bb6: d106 bne.n 8016bc6 <tcp_output+0x32>
8016bb8: 4b9a ldr r3, [pc, #616] ; (8016e24 <tcp_output+0x290>)
8016bba: f240 42e4 movw r2, #1252 ; 0x4e4
8016bbe: 499c ldr r1, [pc, #624] ; (8016e30 <tcp_output+0x29c>)
8016bc0: 489a ldr r0, [pc, #616] ; (8016e2c <tcp_output+0x298>)
8016bc2: f006 f899 bl 801ccf8 <iprintf>
/* First, check if we are invoked by the TCP input processing
code. If so, we do not output anything. Instead, we rely on the
input processing code to call us when input processing is done
with. */
if (tcp_input_pcb == pcb) {
8016bc6: 4b9b ldr r3, [pc, #620] ; (8016e34 <tcp_output+0x2a0>)
8016bc8: 681b ldr r3, [r3, #0]
8016bca: 687a ldr r2, [r7, #4]
8016bcc: 429a cmp r2, r3
8016bce: d101 bne.n 8016bd4 <tcp_output+0x40>
return ERR_OK;
8016bd0: 2300 movs r3, #0
8016bd2: e1d2 b.n 8016f7a <tcp_output+0x3e6>
}
wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
8016bd4: 687b ldr r3, [r7, #4]
8016bd6: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8016bda: 687b ldr r3, [r7, #4]
8016bdc: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8016be0: 429a cmp r2, r3
8016be2: d203 bcs.n 8016bec <tcp_output+0x58>
8016be4: 687b ldr r3, [r7, #4]
8016be6: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8016bea: e002 b.n 8016bf2 <tcp_output+0x5e>
8016bec: 687b ldr r3, [r7, #4]
8016bee: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8016bf2: 61bb str r3, [r7, #24]
seg = pcb->unsent;
8016bf4: 687b ldr r3, [r7, #4]
8016bf6: 6edb ldr r3, [r3, #108] ; 0x6c
8016bf8: 627b str r3, [r7, #36] ; 0x24
if (seg == NULL) {
8016bfa: 6a7b ldr r3, [r7, #36] ; 0x24
8016bfc: 2b00 cmp r3, #0
8016bfe: d10b bne.n 8016c18 <tcp_output+0x84>
", seg == NULL, ack %"U32_F"\n",
pcb->snd_wnd, pcb->cwnd, wnd, pcb->lastack));
/* If the TF_ACK_NOW flag is set and the ->unsent queue is empty, construct
* an empty ACK segment and send it. */
if (pcb->flags & TF_ACK_NOW) {
8016c00: 687b ldr r3, [r7, #4]
8016c02: 8b5b ldrh r3, [r3, #26]
8016c04: f003 0302 and.w r3, r3, #2
8016c08: 2b00 cmp r3, #0
8016c0a: f000 81a9 beq.w 8016f60 <tcp_output+0x3cc>
return tcp_send_empty_ack(pcb);
8016c0e: 6878 ldr r0, [r7, #4]
8016c10: f000 fdd8 bl 80177c4 <tcp_send_empty_ack>
8016c14: 4603 mov r3, r0
8016c16: e1b0 b.n 8016f7a <tcp_output+0x3e6>
pcb->snd_wnd, pcb->cwnd, wnd,
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len,
lwip_ntohl(seg->tcphdr->seqno), pcb->lastack));
}
netif = tcp_route(pcb, &pcb->local_ip, &pcb->remote_ip);
8016c18: 6879 ldr r1, [r7, #4]
8016c1a: 687b ldr r3, [r7, #4]
8016c1c: 3304 adds r3, #4
8016c1e: 461a mov r2, r3
8016c20: 6878 ldr r0, [r7, #4]
8016c22: f7ff fc77 bl 8016514 <tcp_route>
8016c26: 6178 str r0, [r7, #20]
if (netif == NULL) {
8016c28: 697b ldr r3, [r7, #20]
8016c2a: 2b00 cmp r3, #0
8016c2c: d102 bne.n 8016c34 <tcp_output+0xa0>
return ERR_RTE;
8016c2e: f06f 0303 mvn.w r3, #3
8016c32: e1a2 b.n 8016f7a <tcp_output+0x3e6>
}
/* If we don't have a local IP address, we get one from netif */
if (ip_addr_isany(&pcb->local_ip)) {
8016c34: 687b ldr r3, [r7, #4]
8016c36: 2b00 cmp r3, #0
8016c38: d003 beq.n 8016c42 <tcp_output+0xae>
8016c3a: 687b ldr r3, [r7, #4]
8016c3c: 681b ldr r3, [r3, #0]
8016c3e: 2b00 cmp r3, #0
8016c40: d111 bne.n 8016c66 <tcp_output+0xd2>
const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip);
8016c42: 697b ldr r3, [r7, #20]
8016c44: 2b00 cmp r3, #0
8016c46: d002 beq.n 8016c4e <tcp_output+0xba>
8016c48: 697b ldr r3, [r7, #20]
8016c4a: 3304 adds r3, #4
8016c4c: e000 b.n 8016c50 <tcp_output+0xbc>
8016c4e: 2300 movs r3, #0
8016c50: 613b str r3, [r7, #16]
if (local_ip == NULL) {
8016c52: 693b ldr r3, [r7, #16]
8016c54: 2b00 cmp r3, #0
8016c56: d102 bne.n 8016c5e <tcp_output+0xca>
return ERR_RTE;
8016c58: f06f 0303 mvn.w r3, #3
8016c5c: e18d b.n 8016f7a <tcp_output+0x3e6>
}
ip_addr_copy(pcb->local_ip, *local_ip);
8016c5e: 693b ldr r3, [r7, #16]
8016c60: 681a ldr r2, [r3, #0]
8016c62: 687b ldr r3, [r7, #4]
8016c64: 601a str r2, [r3, #0]
}
/* Handle the current segment not fitting within the window */
if (lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd) {
8016c66: 6a7b ldr r3, [r7, #36] ; 0x24
8016c68: 68db ldr r3, [r3, #12]
8016c6a: 685b ldr r3, [r3, #4]
8016c6c: 4618 mov r0, r3
8016c6e: f7f9 ff74 bl 8010b5a <lwip_htonl>
8016c72: 4602 mov r2, r0
8016c74: 687b ldr r3, [r7, #4]
8016c76: 6c5b ldr r3, [r3, #68] ; 0x44
8016c78: 1ad3 subs r3, r2, r3
8016c7a: 6a7a ldr r2, [r7, #36] ; 0x24
8016c7c: 8912 ldrh r2, [r2, #8]
8016c7e: 4413 add r3, r2
8016c80: 69ba ldr r2, [r7, #24]
8016c82: 429a cmp r2, r3
8016c84: d227 bcs.n 8016cd6 <tcp_output+0x142>
* within the remaining (could be 0) send window and RTO timer is not running (we
* have no in-flight data). If window is still too small after persist timer fires,
* then we split the segment. We don't consider the congestion window since a cwnd
* smaller than 1 SMSS implies in-flight data
*/
if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) {
8016c86: 687b ldr r3, [r7, #4]
8016c88: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8016c8c: 461a mov r2, r3
8016c8e: 69bb ldr r3, [r7, #24]
8016c90: 4293 cmp r3, r2
8016c92: d114 bne.n 8016cbe <tcp_output+0x12a>
8016c94: 687b ldr r3, [r7, #4]
8016c96: 6f1b ldr r3, [r3, #112] ; 0x70
8016c98: 2b00 cmp r3, #0
8016c9a: d110 bne.n 8016cbe <tcp_output+0x12a>
8016c9c: 687b ldr r3, [r7, #4]
8016c9e: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
8016ca2: 2b00 cmp r3, #0
8016ca4: d10b bne.n 8016cbe <tcp_output+0x12a>
pcb->persist_cnt = 0;
8016ca6: 687b ldr r3, [r7, #4]
8016ca8: 2200 movs r2, #0
8016caa: f883 2098 strb.w r2, [r3, #152] ; 0x98
pcb->persist_backoff = 1;
8016cae: 687b ldr r3, [r7, #4]
8016cb0: 2201 movs r2, #1
8016cb2: f883 2099 strb.w r2, [r3, #153] ; 0x99
pcb->persist_probe = 0;
8016cb6: 687b ldr r3, [r7, #4]
8016cb8: 2200 movs r2, #0
8016cba: f883 209a strb.w r2, [r3, #154] ; 0x9a
}
/* We need an ACK, but can't send data now, so send an empty ACK */
if (pcb->flags & TF_ACK_NOW) {
8016cbe: 687b ldr r3, [r7, #4]
8016cc0: 8b5b ldrh r3, [r3, #26]
8016cc2: f003 0302 and.w r3, r3, #2
8016cc6: 2b00 cmp r3, #0
8016cc8: f000 814c beq.w 8016f64 <tcp_output+0x3d0>
return tcp_send_empty_ack(pcb);
8016ccc: 6878 ldr r0, [r7, #4]
8016cce: f000 fd79 bl 80177c4 <tcp_send_empty_ack>
8016cd2: 4603 mov r3, r0
8016cd4: e151 b.n 8016f7a <tcp_output+0x3e6>
}
goto output_done;
}
/* Stop persist timer, above conditions are not active */
pcb->persist_backoff = 0;
8016cd6: 687b ldr r3, [r7, #4]
8016cd8: 2200 movs r2, #0
8016cda: f883 2099 strb.w r2, [r3, #153] ; 0x99
/* useg should point to last segment on unacked queue */
useg = pcb->unacked;
8016cde: 687b ldr r3, [r7, #4]
8016ce0: 6f1b ldr r3, [r3, #112] ; 0x70
8016ce2: 623b str r3, [r7, #32]
if (useg != NULL) {
8016ce4: 6a3b ldr r3, [r7, #32]
8016ce6: 2b00 cmp r3, #0
8016ce8: f000 811b beq.w 8016f22 <tcp_output+0x38e>
for (; useg->next != NULL; useg = useg->next);
8016cec: e002 b.n 8016cf4 <tcp_output+0x160>
8016cee: 6a3b ldr r3, [r7, #32]
8016cf0: 681b ldr r3, [r3, #0]
8016cf2: 623b str r3, [r7, #32]
8016cf4: 6a3b ldr r3, [r7, #32]
8016cf6: 681b ldr r3, [r3, #0]
8016cf8: 2b00 cmp r3, #0
8016cfa: d1f8 bne.n 8016cee <tcp_output+0x15a>
}
/* data available and window allows it to be sent? */
while (seg != NULL &&
8016cfc: e111 b.n 8016f22 <tcp_output+0x38e>
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
LWIP_ASSERT("RST not expected here!",
8016cfe: 6a7b ldr r3, [r7, #36] ; 0x24
8016d00: 68db ldr r3, [r3, #12]
8016d02: 899b ldrh r3, [r3, #12]
8016d04: b29b uxth r3, r3
8016d06: 4618 mov r0, r3
8016d08: f7f9 ff12 bl 8010b30 <lwip_htons>
8016d0c: 4603 mov r3, r0
8016d0e: b2db uxtb r3, r3
8016d10: f003 0304 and.w r3, r3, #4
8016d14: 2b00 cmp r3, #0
8016d16: d006 beq.n 8016d26 <tcp_output+0x192>
8016d18: 4b42 ldr r3, [pc, #264] ; (8016e24 <tcp_output+0x290>)
8016d1a: f240 5237 movw r2, #1335 ; 0x537
8016d1e: 4946 ldr r1, [pc, #280] ; (8016e38 <tcp_output+0x2a4>)
8016d20: 4842 ldr r0, [pc, #264] ; (8016e2c <tcp_output+0x298>)
8016d22: f005 ffe9 bl 801ccf8 <iprintf>
* - if tcp_write had a memory error before (prevent delayed ACK timeout) or
* - if FIN was already enqueued for this PCB (SYN is always alone in a segment -
* either seg->next != NULL or pcb->unacked == NULL;
* RST is no sent using tcp_write/tcp_output.
*/
if ((tcp_do_output_nagle(pcb) == 0) &&
8016d26: 687b ldr r3, [r7, #4]
8016d28: 6f1b ldr r3, [r3, #112] ; 0x70
8016d2a: 2b00 cmp r3, #0
8016d2c: d01f beq.n 8016d6e <tcp_output+0x1da>
8016d2e: 687b ldr r3, [r7, #4]
8016d30: 8b5b ldrh r3, [r3, #26]
8016d32: f003 0344 and.w r3, r3, #68 ; 0x44
8016d36: 2b00 cmp r3, #0
8016d38: d119 bne.n 8016d6e <tcp_output+0x1da>
8016d3a: 687b ldr r3, [r7, #4]
8016d3c: 6edb ldr r3, [r3, #108] ; 0x6c
8016d3e: 2b00 cmp r3, #0
8016d40: d00b beq.n 8016d5a <tcp_output+0x1c6>
8016d42: 687b ldr r3, [r7, #4]
8016d44: 6edb ldr r3, [r3, #108] ; 0x6c
8016d46: 681b ldr r3, [r3, #0]
8016d48: 2b00 cmp r3, #0
8016d4a: d110 bne.n 8016d6e <tcp_output+0x1da>
8016d4c: 687b ldr r3, [r7, #4]
8016d4e: 6edb ldr r3, [r3, #108] ; 0x6c
8016d50: 891a ldrh r2, [r3, #8]
8016d52: 687b ldr r3, [r7, #4]
8016d54: 8e5b ldrh r3, [r3, #50] ; 0x32
8016d56: 429a cmp r2, r3
8016d58: d209 bcs.n 8016d6e <tcp_output+0x1da>
8016d5a: 687b ldr r3, [r7, #4]
8016d5c: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64
8016d60: 2b00 cmp r3, #0
8016d62: d004 beq.n 8016d6e <tcp_output+0x1da>
8016d64: 687b ldr r3, [r7, #4]
8016d66: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8016d6a: 2b08 cmp r3, #8
8016d6c: d901 bls.n 8016d72 <tcp_output+0x1de>
8016d6e: 2301 movs r3, #1
8016d70: e000 b.n 8016d74 <tcp_output+0x1e0>
8016d72: 2300 movs r3, #0
8016d74: 2b00 cmp r3, #0
8016d76: d106 bne.n 8016d86 <tcp_output+0x1f2>
((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) {
8016d78: 687b ldr r3, [r7, #4]
8016d7a: 8b5b ldrh r3, [r3, #26]
8016d7c: f003 03a0 and.w r3, r3, #160 ; 0xa0
if ((tcp_do_output_nagle(pcb) == 0) &&
8016d80: 2b00 cmp r3, #0
8016d82: f000 80e3 beq.w 8016f4c <tcp_output+0x3b8>
pcb->lastack,
lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i));
++i;
#endif /* TCP_CWND_DEBUG */
if (pcb->state != SYN_SENT) {
8016d86: 687b ldr r3, [r7, #4]
8016d88: 7d1b ldrb r3, [r3, #20]
8016d8a: 2b02 cmp r3, #2
8016d8c: d00d beq.n 8016daa <tcp_output+0x216>
TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
8016d8e: 6a7b ldr r3, [r7, #36] ; 0x24
8016d90: 68db ldr r3, [r3, #12]
8016d92: 899b ldrh r3, [r3, #12]
8016d94: b29c uxth r4, r3
8016d96: 2010 movs r0, #16
8016d98: f7f9 feca bl 8010b30 <lwip_htons>
8016d9c: 4603 mov r3, r0
8016d9e: 461a mov r2, r3
8016da0: 6a7b ldr r3, [r7, #36] ; 0x24
8016da2: 68db ldr r3, [r3, #12]
8016da4: 4322 orrs r2, r4
8016da6: b292 uxth r2, r2
8016da8: 819a strh r2, [r3, #12]
}
err = tcp_output_segment(seg, pcb, netif);
8016daa: 697a ldr r2, [r7, #20]
8016dac: 6879 ldr r1, [r7, #4]
8016dae: 6a78 ldr r0, [r7, #36] ; 0x24
8016db0: f000 f908 bl 8016fc4 <tcp_output_segment>
8016db4: 4603 mov r3, r0
8016db6: 73fb strb r3, [r7, #15]
if (err != ERR_OK) {
8016db8: f997 300f ldrsb.w r3, [r7, #15]
8016dbc: 2b00 cmp r3, #0
8016dbe: d009 beq.n 8016dd4 <tcp_output+0x240>
/* segment could not be sent, for whatever reason */
tcp_set_flags(pcb, TF_NAGLEMEMERR);
8016dc0: 687b ldr r3, [r7, #4]
8016dc2: 8b5b ldrh r3, [r3, #26]
8016dc4: f043 0380 orr.w r3, r3, #128 ; 0x80
8016dc8: b29a uxth r2, r3
8016dca: 687b ldr r3, [r7, #4]
8016dcc: 835a strh r2, [r3, #26]
return err;
8016dce: f997 300f ldrsb.w r3, [r7, #15]
8016dd2: e0d2 b.n 8016f7a <tcp_output+0x3e6>
}
#if TCP_OVERSIZE_DBGCHECK
seg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
pcb->unsent = seg->next;
8016dd4: 6a7b ldr r3, [r7, #36] ; 0x24
8016dd6: 681a ldr r2, [r3, #0]
8016dd8: 687b ldr r3, [r7, #4]
8016dda: 66da str r2, [r3, #108] ; 0x6c
if (pcb->state != SYN_SENT) {
8016ddc: 687b ldr r3, [r7, #4]
8016dde: 7d1b ldrb r3, [r3, #20]
8016de0: 2b02 cmp r3, #2
8016de2: d006 beq.n 8016df2 <tcp_output+0x25e>
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8016de4: 687b ldr r3, [r7, #4]
8016de6: 8b5b ldrh r3, [r3, #26]
8016de8: f023 0303 bic.w r3, r3, #3
8016dec: b29a uxth r2, r3
8016dee: 687b ldr r3, [r7, #4]
8016df0: 835a strh r2, [r3, #26]
}
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
8016df2: 6a7b ldr r3, [r7, #36] ; 0x24
8016df4: 68db ldr r3, [r3, #12]
8016df6: 685b ldr r3, [r3, #4]
8016df8: 4618 mov r0, r3
8016dfa: f7f9 feae bl 8010b5a <lwip_htonl>
8016dfe: 4604 mov r4, r0
8016e00: 6a7b ldr r3, [r7, #36] ; 0x24
8016e02: 891b ldrh r3, [r3, #8]
8016e04: 461d mov r5, r3
8016e06: 6a7b ldr r3, [r7, #36] ; 0x24
8016e08: 68db ldr r3, [r3, #12]
8016e0a: 899b ldrh r3, [r3, #12]
8016e0c: b29b uxth r3, r3
8016e0e: 4618 mov r0, r3
8016e10: f7f9 fe8e bl 8010b30 <lwip_htons>
8016e14: 4603 mov r3, r0
8016e16: b2db uxtb r3, r3
8016e18: f003 0303 and.w r3, r3, #3
8016e1c: 2b00 cmp r3, #0
8016e1e: d00d beq.n 8016e3c <tcp_output+0x2a8>
8016e20: 2301 movs r3, #1
8016e22: e00c b.n 8016e3e <tcp_output+0x2aa>
8016e24: 0801f770 .word 0x0801f770
8016e28: 0801fcb4 .word 0x0801fcb4
8016e2c: 0801f7c4 .word 0x0801f7c4
8016e30: 0801fccc .word 0x0801fccc
8016e34: 2000f810 .word 0x2000f810
8016e38: 0801fcf4 .word 0x0801fcf4
8016e3c: 2300 movs r3, #0
8016e3e: 442b add r3, r5
8016e40: 4423 add r3, r4
8016e42: 60bb str r3, [r7, #8]
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
8016e44: 687b ldr r3, [r7, #4]
8016e46: 6d1a ldr r2, [r3, #80] ; 0x50
8016e48: 68bb ldr r3, [r7, #8]
8016e4a: 1ad3 subs r3, r2, r3
8016e4c: 2b00 cmp r3, #0
8016e4e: da02 bge.n 8016e56 <tcp_output+0x2c2>
pcb->snd_nxt = snd_nxt;
8016e50: 687b ldr r3, [r7, #4]
8016e52: 68ba ldr r2, [r7, #8]
8016e54: 651a str r2, [r3, #80] ; 0x50
}
/* put segment on unacknowledged list if length > 0 */
if (TCP_TCPLEN(seg) > 0) {
8016e56: 6a7b ldr r3, [r7, #36] ; 0x24
8016e58: 891b ldrh r3, [r3, #8]
8016e5a: 461c mov r4, r3
8016e5c: 6a7b ldr r3, [r7, #36] ; 0x24
8016e5e: 68db ldr r3, [r3, #12]
8016e60: 899b ldrh r3, [r3, #12]
8016e62: b29b uxth r3, r3
8016e64: 4618 mov r0, r3
8016e66: f7f9 fe63 bl 8010b30 <lwip_htons>
8016e6a: 4603 mov r3, r0
8016e6c: b2db uxtb r3, r3
8016e6e: f003 0303 and.w r3, r3, #3
8016e72: 2b00 cmp r3, #0
8016e74: d001 beq.n 8016e7a <tcp_output+0x2e6>
8016e76: 2301 movs r3, #1
8016e78: e000 b.n 8016e7c <tcp_output+0x2e8>
8016e7a: 2300 movs r3, #0
8016e7c: 4423 add r3, r4
8016e7e: 2b00 cmp r3, #0
8016e80: d049 beq.n 8016f16 <tcp_output+0x382>
seg->next = NULL;
8016e82: 6a7b ldr r3, [r7, #36] ; 0x24
8016e84: 2200 movs r2, #0
8016e86: 601a str r2, [r3, #0]
/* unacked list is empty? */
if (pcb->unacked == NULL) {
8016e88: 687b ldr r3, [r7, #4]
8016e8a: 6f1b ldr r3, [r3, #112] ; 0x70
8016e8c: 2b00 cmp r3, #0
8016e8e: d105 bne.n 8016e9c <tcp_output+0x308>
pcb->unacked = seg;
8016e90: 687b ldr r3, [r7, #4]
8016e92: 6a7a ldr r2, [r7, #36] ; 0x24
8016e94: 671a str r2, [r3, #112] ; 0x70
useg = seg;
8016e96: 6a7b ldr r3, [r7, #36] ; 0x24
8016e98: 623b str r3, [r7, #32]
8016e9a: e03f b.n 8016f1c <tcp_output+0x388>
/* unacked list is not empty? */
} else {
/* In the case of fast retransmit, the packet should not go to the tail
* of the unacked queue, but rather somewhere before it. We need to check for
* this case. -STJ Jul 27, 2004 */
if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) {
8016e9c: 6a7b ldr r3, [r7, #36] ; 0x24
8016e9e: 68db ldr r3, [r3, #12]
8016ea0: 685b ldr r3, [r3, #4]
8016ea2: 4618 mov r0, r3
8016ea4: f7f9 fe59 bl 8010b5a <lwip_htonl>
8016ea8: 4604 mov r4, r0
8016eaa: 6a3b ldr r3, [r7, #32]
8016eac: 68db ldr r3, [r3, #12]
8016eae: 685b ldr r3, [r3, #4]
8016eb0: 4618 mov r0, r3
8016eb2: f7f9 fe52 bl 8010b5a <lwip_htonl>
8016eb6: 4603 mov r3, r0
8016eb8: 1ae3 subs r3, r4, r3
8016eba: 2b00 cmp r3, #0
8016ebc: da24 bge.n 8016f08 <tcp_output+0x374>
/* add segment to before tail of unacked list, keeping the list sorted */
struct tcp_seg **cur_seg = &(pcb->unacked);
8016ebe: 687b ldr r3, [r7, #4]
8016ec0: 3370 adds r3, #112 ; 0x70
8016ec2: 61fb str r3, [r7, #28]
while (*cur_seg &&
8016ec4: e002 b.n 8016ecc <tcp_output+0x338>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
cur_seg = &((*cur_seg)->next );
8016ec6: 69fb ldr r3, [r7, #28]
8016ec8: 681b ldr r3, [r3, #0]
8016eca: 61fb str r3, [r7, #28]
while (*cur_seg &&
8016ecc: 69fb ldr r3, [r7, #28]
8016ece: 681b ldr r3, [r3, #0]
8016ed0: 2b00 cmp r3, #0
8016ed2: d011 beq.n 8016ef8 <tcp_output+0x364>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
8016ed4: 69fb ldr r3, [r7, #28]
8016ed6: 681b ldr r3, [r3, #0]
8016ed8: 68db ldr r3, [r3, #12]
8016eda: 685b ldr r3, [r3, #4]
8016edc: 4618 mov r0, r3
8016ede: f7f9 fe3c bl 8010b5a <lwip_htonl>
8016ee2: 4604 mov r4, r0
8016ee4: 6a7b ldr r3, [r7, #36] ; 0x24
8016ee6: 68db ldr r3, [r3, #12]
8016ee8: 685b ldr r3, [r3, #4]
8016eea: 4618 mov r0, r3
8016eec: f7f9 fe35 bl 8010b5a <lwip_htonl>
8016ef0: 4603 mov r3, r0
8016ef2: 1ae3 subs r3, r4, r3
while (*cur_seg &&
8016ef4: 2b00 cmp r3, #0
8016ef6: dbe6 blt.n 8016ec6 <tcp_output+0x332>
}
seg->next = (*cur_seg);
8016ef8: 69fb ldr r3, [r7, #28]
8016efa: 681a ldr r2, [r3, #0]
8016efc: 6a7b ldr r3, [r7, #36] ; 0x24
8016efe: 601a str r2, [r3, #0]
(*cur_seg) = seg;
8016f00: 69fb ldr r3, [r7, #28]
8016f02: 6a7a ldr r2, [r7, #36] ; 0x24
8016f04: 601a str r2, [r3, #0]
8016f06: e009 b.n 8016f1c <tcp_output+0x388>
} else {
/* add segment to tail of unacked list */
useg->next = seg;
8016f08: 6a3b ldr r3, [r7, #32]
8016f0a: 6a7a ldr r2, [r7, #36] ; 0x24
8016f0c: 601a str r2, [r3, #0]
useg = useg->next;
8016f0e: 6a3b ldr r3, [r7, #32]
8016f10: 681b ldr r3, [r3, #0]
8016f12: 623b str r3, [r7, #32]
8016f14: e002 b.n 8016f1c <tcp_output+0x388>
}
}
/* do not queue empty segments on the unacked list */
} else {
tcp_seg_free(seg);
8016f16: 6a78 ldr r0, [r7, #36] ; 0x24
8016f18: f7fc fc42 bl 80137a0 <tcp_seg_free>
}
seg = pcb->unsent;
8016f1c: 687b ldr r3, [r7, #4]
8016f1e: 6edb ldr r3, [r3, #108] ; 0x6c
8016f20: 627b str r3, [r7, #36] ; 0x24
while (seg != NULL &&
8016f22: 6a7b ldr r3, [r7, #36] ; 0x24
8016f24: 2b00 cmp r3, #0
8016f26: d012 beq.n 8016f4e <tcp_output+0x3ba>
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
8016f28: 6a7b ldr r3, [r7, #36] ; 0x24
8016f2a: 68db ldr r3, [r3, #12]
8016f2c: 685b ldr r3, [r3, #4]
8016f2e: 4618 mov r0, r3
8016f30: f7f9 fe13 bl 8010b5a <lwip_htonl>
8016f34: 4602 mov r2, r0
8016f36: 687b ldr r3, [r7, #4]
8016f38: 6c5b ldr r3, [r3, #68] ; 0x44
8016f3a: 1ad3 subs r3, r2, r3
8016f3c: 6a7a ldr r2, [r7, #36] ; 0x24
8016f3e: 8912 ldrh r2, [r2, #8]
8016f40: 4413 add r3, r2
while (seg != NULL &&
8016f42: 69ba ldr r2, [r7, #24]
8016f44: 429a cmp r2, r3
8016f46: f4bf aeda bcs.w 8016cfe <tcp_output+0x16a>
8016f4a: e000 b.n 8016f4e <tcp_output+0x3ba>
break;
8016f4c: bf00 nop
}
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
8016f4e: 687b ldr r3, [r7, #4]
8016f50: 6edb ldr r3, [r3, #108] ; 0x6c
8016f52: 2b00 cmp r3, #0
8016f54: d108 bne.n 8016f68 <tcp_output+0x3d4>
/* last unsent has been removed, reset unsent_oversize */
pcb->unsent_oversize = 0;
8016f56: 687b ldr r3, [r7, #4]
8016f58: 2200 movs r2, #0
8016f5a: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
8016f5e: e004 b.n 8016f6a <tcp_output+0x3d6>
goto output_done;
8016f60: bf00 nop
8016f62: e002 b.n 8016f6a <tcp_output+0x3d6>
goto output_done;
8016f64: bf00 nop
8016f66: e000 b.n 8016f6a <tcp_output+0x3d6>
}
#endif /* TCP_OVERSIZE */
output_done:
8016f68: bf00 nop
tcp_clear_flags(pcb, TF_NAGLEMEMERR);
8016f6a: 687b ldr r3, [r7, #4]
8016f6c: 8b5b ldrh r3, [r3, #26]
8016f6e: f023 0380 bic.w r3, r3, #128 ; 0x80
8016f72: b29a uxth r2, r3
8016f74: 687b ldr r3, [r7, #4]
8016f76: 835a strh r2, [r3, #26]
return ERR_OK;
8016f78: 2300 movs r3, #0
}
8016f7a: 4618 mov r0, r3
8016f7c: 3728 adds r7, #40 ; 0x28
8016f7e: 46bd mov sp, r7
8016f80: bdb0 pop {r4, r5, r7, pc}
8016f82: bf00 nop
08016f84 <tcp_output_segment_busy>:
* @arg seg the tcp segment to check
* @return 1 if ref != 1, 0 if ref == 1
*/
static int
tcp_output_segment_busy(const struct tcp_seg *seg)
{
8016f84: b580 push {r7, lr}
8016f86: b082 sub sp, #8
8016f88: af00 add r7, sp, #0
8016f8a: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
8016f8c: 687b ldr r3, [r7, #4]
8016f8e: 2b00 cmp r3, #0
8016f90: d106 bne.n 8016fa0 <tcp_output_segment_busy+0x1c>
8016f92: 4b09 ldr r3, [pc, #36] ; (8016fb8 <tcp_output_segment_busy+0x34>)
8016f94: f240 529a movw r2, #1434 ; 0x59a
8016f98: 4908 ldr r1, [pc, #32] ; (8016fbc <tcp_output_segment_busy+0x38>)
8016f9a: 4809 ldr r0, [pc, #36] ; (8016fc0 <tcp_output_segment_busy+0x3c>)
8016f9c: f005 feac bl 801ccf8 <iprintf>
/* We only need to check the first pbuf here:
If a pbuf is queued for transmission, a driver calls pbuf_ref(),
which only changes the ref count of the first pbuf */
if (seg->p->ref != 1) {
8016fa0: 687b ldr r3, [r7, #4]
8016fa2: 685b ldr r3, [r3, #4]
8016fa4: 7b9b ldrb r3, [r3, #14]
8016fa6: 2b01 cmp r3, #1
8016fa8: d001 beq.n 8016fae <tcp_output_segment_busy+0x2a>
/* other reference found */
return 1;
8016faa: 2301 movs r3, #1
8016fac: e000 b.n 8016fb0 <tcp_output_segment_busy+0x2c>
}
/* no other references found */
return 0;
8016fae: 2300 movs r3, #0
}
8016fb0: 4618 mov r0, r3
8016fb2: 3708 adds r7, #8
8016fb4: 46bd mov sp, r7
8016fb6: bd80 pop {r7, pc}
8016fb8: 0801f770 .word 0x0801f770
8016fbc: 0801fd0c .word 0x0801fd0c
8016fc0: 0801f7c4 .word 0x0801f7c4
08016fc4 <tcp_output_segment>:
* @param pcb the tcp_pcb for the TCP connection used to send the segment
* @param netif the netif used to send the segment
*/
static err_t
tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif)
{
8016fc4: b5b0 push {r4, r5, r7, lr}
8016fc6: b08c sub sp, #48 ; 0x30
8016fc8: af04 add r7, sp, #16
8016fca: 60f8 str r0, [r7, #12]
8016fcc: 60b9 str r1, [r7, #8]
8016fce: 607a str r2, [r7, #4]
u32_t *opts;
#if TCP_CHECKSUM_ON_COPY
int seg_chksum_was_swapped = 0;
#endif
LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL);
8016fd0: 68fb ldr r3, [r7, #12]
8016fd2: 2b00 cmp r3, #0
8016fd4: d106 bne.n 8016fe4 <tcp_output_segment+0x20>
8016fd6: 4b64 ldr r3, [pc, #400] ; (8017168 <tcp_output_segment+0x1a4>)
8016fd8: f44f 62b7 mov.w r2, #1464 ; 0x5b8
8016fdc: 4963 ldr r1, [pc, #396] ; (801716c <tcp_output_segment+0x1a8>)
8016fde: 4864 ldr r0, [pc, #400] ; (8017170 <tcp_output_segment+0x1ac>)
8016fe0: f005 fe8a bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
8016fe4: 68bb ldr r3, [r7, #8]
8016fe6: 2b00 cmp r3, #0
8016fe8: d106 bne.n 8016ff8 <tcp_output_segment+0x34>
8016fea: 4b5f ldr r3, [pc, #380] ; (8017168 <tcp_output_segment+0x1a4>)
8016fec: f240 52b9 movw r2, #1465 ; 0x5b9
8016ff0: 4960 ldr r1, [pc, #384] ; (8017174 <tcp_output_segment+0x1b0>)
8016ff2: 485f ldr r0, [pc, #380] ; (8017170 <tcp_output_segment+0x1ac>)
8016ff4: f005 fe80 bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
8016ff8: 687b ldr r3, [r7, #4]
8016ffa: 2b00 cmp r3, #0
8016ffc: d106 bne.n 801700c <tcp_output_segment+0x48>
8016ffe: 4b5a ldr r3, [pc, #360] ; (8017168 <tcp_output_segment+0x1a4>)
8017000: f240 52ba movw r2, #1466 ; 0x5ba
8017004: 495c ldr r1, [pc, #368] ; (8017178 <tcp_output_segment+0x1b4>)
8017006: 485a ldr r0, [pc, #360] ; (8017170 <tcp_output_segment+0x1ac>)
8017008: f005 fe76 bl 801ccf8 <iprintf>
if (tcp_output_segment_busy(seg)) {
801700c: 68f8 ldr r0, [r7, #12]
801700e: f7ff ffb9 bl 8016f84 <tcp_output_segment_busy>
8017012: 4603 mov r3, r0
8017014: 2b00 cmp r3, #0
8017016: d001 beq.n 801701c <tcp_output_segment+0x58>
/* This should not happen: rexmit functions should have checked this.
However, since this function modifies p->len, we must not continue in this case. */
LWIP_DEBUGF(TCP_RTO_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_output_segment: segment busy\n"));
return ERR_OK;
8017018: 2300 movs r3, #0
801701a: e0a0 b.n 801715e <tcp_output_segment+0x19a>
}
/* The TCP header has already been constructed, but the ackno and
wnd fields remain. */
seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt);
801701c: 68bb ldr r3, [r7, #8]
801701e: 6a5a ldr r2, [r3, #36] ; 0x24
8017020: 68fb ldr r3, [r7, #12]
8017022: 68dc ldr r4, [r3, #12]
8017024: 4610 mov r0, r2
8017026: f7f9 fd98 bl 8010b5a <lwip_htonl>
801702a: 4603 mov r3, r0
801702c: 60a3 str r3, [r4, #8]
the window scale option) is never scaled. */
seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(pcb->rcv_ann_wnd));
} else
#endif /* LWIP_WND_SCALE */
{
seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd)));
801702e: 68bb ldr r3, [r7, #8]
8017030: 8d5a ldrh r2, [r3, #42] ; 0x2a
8017032: 68fb ldr r3, [r7, #12]
8017034: 68dc ldr r4, [r3, #12]
8017036: 4610 mov r0, r2
8017038: f7f9 fd7a bl 8010b30 <lwip_htons>
801703c: 4603 mov r3, r0
801703e: 81e3 strh r3, [r4, #14]
}
pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
8017040: 68bb ldr r3, [r7, #8]
8017042: 6a5b ldr r3, [r3, #36] ; 0x24
8017044: 68ba ldr r2, [r7, #8]
8017046: 8d52 ldrh r2, [r2, #42] ; 0x2a
8017048: 441a add r2, r3
801704a: 68bb ldr r3, [r7, #8]
801704c: 62da str r2, [r3, #44] ; 0x2c
/* Add any requested options. NB MSS option is only set on SYN
packets, so ignore it here */
/* cast through void* to get rid of alignment warnings */
opts = (u32_t *)(void *)(seg->tcphdr + 1);
801704e: 68fb ldr r3, [r7, #12]
8017050: 68db ldr r3, [r3, #12]
8017052: 3314 adds r3, #20
8017054: 61fb str r3, [r7, #28]
if (seg->flags & TF_SEG_OPTS_MSS) {
8017056: 68fb ldr r3, [r7, #12]
8017058: 7a9b ldrb r3, [r3, #10]
801705a: f003 0301 and.w r3, r3, #1
801705e: 2b00 cmp r3, #0
8017060: d015 beq.n 801708e <tcp_output_segment+0xca>
u16_t mss;
#if TCP_CALCULATE_EFF_SEND_MSS
mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip);
8017062: 68bb ldr r3, [r7, #8]
8017064: 3304 adds r3, #4
8017066: 461a mov r2, r3
8017068: 6879 ldr r1, [r7, #4]
801706a: f44f 7006 mov.w r0, #536 ; 0x218
801706e: f7fc fe8d bl 8013d8c <tcp_eff_send_mss_netif>
8017072: 4603 mov r3, r0
8017074: 837b strh r3, [r7, #26]
#else /* TCP_CALCULATE_EFF_SEND_MSS */
mss = TCP_MSS;
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
*opts = TCP_BUILD_MSS_OPTION(mss);
8017076: 8b7b ldrh r3, [r7, #26]
8017078: f043 7301 orr.w r3, r3, #33816576 ; 0x2040000
801707c: 4618 mov r0, r3
801707e: f7f9 fd6c bl 8010b5a <lwip_htonl>
8017082: 4602 mov r2, r0
8017084: 69fb ldr r3, [r7, #28]
8017086: 601a str r2, [r3, #0]
opts += 1;
8017088: 69fb ldr r3, [r7, #28]
801708a: 3304 adds r3, #4
801708c: 61fb str r3, [r7, #28]
}
#endif
/* Set retransmission timer running if it is not currently enabled
This must be set before checking the route. */
if (pcb->rtime < 0) {
801708e: 68bb ldr r3, [r7, #8]
8017090: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8017094: 2b00 cmp r3, #0
8017096: da02 bge.n 801709e <tcp_output_segment+0xda>
pcb->rtime = 0;
8017098: 68bb ldr r3, [r7, #8]
801709a: 2200 movs r2, #0
801709c: 861a strh r2, [r3, #48] ; 0x30
}
if (pcb->rttest == 0) {
801709e: 68bb ldr r3, [r7, #8]
80170a0: 6b5b ldr r3, [r3, #52] ; 0x34
80170a2: 2b00 cmp r3, #0
80170a4: d10c bne.n 80170c0 <tcp_output_segment+0xfc>
pcb->rttest = tcp_ticks;
80170a6: 4b35 ldr r3, [pc, #212] ; (801717c <tcp_output_segment+0x1b8>)
80170a8: 681a ldr r2, [r3, #0]
80170aa: 68bb ldr r3, [r7, #8]
80170ac: 635a str r2, [r3, #52] ; 0x34
pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno);
80170ae: 68fb ldr r3, [r7, #12]
80170b0: 68db ldr r3, [r3, #12]
80170b2: 685b ldr r3, [r3, #4]
80170b4: 4618 mov r0, r3
80170b6: f7f9 fd50 bl 8010b5a <lwip_htonl>
80170ba: 4602 mov r2, r0
80170bc: 68bb ldr r3, [r7, #8]
80170be: 639a str r2, [r3, #56] ; 0x38
}
LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n",
lwip_htonl(seg->tcphdr->seqno), lwip_htonl(seg->tcphdr->seqno) +
seg->len));
len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload);
80170c0: 68fb ldr r3, [r7, #12]
80170c2: 68db ldr r3, [r3, #12]
80170c4: 461a mov r2, r3
80170c6: 68fb ldr r3, [r7, #12]
80170c8: 685b ldr r3, [r3, #4]
80170ca: 685b ldr r3, [r3, #4]
80170cc: 1ad3 subs r3, r2, r3
80170ce: 833b strh r3, [r7, #24]
if (len == 0) {
/** Exclude retransmitted segments from this count. */
MIB2_STATS_INC(mib2.tcpoutsegs);
}
seg->p->len -= len;
80170d0: 68fb ldr r3, [r7, #12]
80170d2: 685b ldr r3, [r3, #4]
80170d4: 8959 ldrh r1, [r3, #10]
80170d6: 68fb ldr r3, [r7, #12]
80170d8: 685b ldr r3, [r3, #4]
80170da: 8b3a ldrh r2, [r7, #24]
80170dc: 1a8a subs r2, r1, r2
80170de: b292 uxth r2, r2
80170e0: 815a strh r2, [r3, #10]
seg->p->tot_len -= len;
80170e2: 68fb ldr r3, [r7, #12]
80170e4: 685b ldr r3, [r3, #4]
80170e6: 8919 ldrh r1, [r3, #8]
80170e8: 68fb ldr r3, [r7, #12]
80170ea: 685b ldr r3, [r3, #4]
80170ec: 8b3a ldrh r2, [r7, #24]
80170ee: 1a8a subs r2, r1, r2
80170f0: b292 uxth r2, r2
80170f2: 811a strh r2, [r3, #8]
seg->p->payload = seg->tcphdr;
80170f4: 68fb ldr r3, [r7, #12]
80170f6: 685b ldr r3, [r3, #4]
80170f8: 68fa ldr r2, [r7, #12]
80170fa: 68d2 ldr r2, [r2, #12]
80170fc: 605a str r2, [r3, #4]
seg->tcphdr->chksum = 0;
80170fe: 68fb ldr r3, [r7, #12]
8017100: 68db ldr r3, [r3, #12]
8017102: 2200 movs r2, #0
8017104: 741a strb r2, [r3, #16]
8017106: 2200 movs r2, #0
8017108: 745a strb r2, [r3, #17]
#ifdef LWIP_HOOK_TCP_OUT_ADD_TCPOPTS
opts = LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(seg->p, seg->tcphdr, pcb, opts);
#endif
LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb));
801710a: 68fb ldr r3, [r7, #12]
801710c: 68db ldr r3, [r3, #12]
801710e: f103 0214 add.w r2, r3, #20
8017112: 68fb ldr r3, [r7, #12]
8017114: 7a9b ldrb r3, [r3, #10]
8017116: 009b lsls r3, r3, #2
8017118: f003 0304 and.w r3, r3, #4
801711c: 4413 add r3, r2
801711e: 69fa ldr r2, [r7, #28]
8017120: 429a cmp r2, r3
8017122: d006 beq.n 8017132 <tcp_output_segment+0x16e>
8017124: 4b10 ldr r3, [pc, #64] ; (8017168 <tcp_output_segment+0x1a4>)
8017126: f240 621c movw r2, #1564 ; 0x61c
801712a: 4915 ldr r1, [pc, #84] ; (8017180 <tcp_output_segment+0x1bc>)
801712c: 4810 ldr r0, [pc, #64] ; (8017170 <tcp_output_segment+0x1ac>)
801712e: f005 fde3 bl 801ccf8 <iprintf>
}
#endif /* CHECKSUM_GEN_TCP */
TCP_STATS_INC(tcp.xmit);
NETIF_SET_HINTS(netif, &(pcb->netif_hints));
err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl,
8017132: 68fb ldr r3, [r7, #12]
8017134: 6858 ldr r0, [r3, #4]
8017136: 68b9 ldr r1, [r7, #8]
8017138: 68bb ldr r3, [r7, #8]
801713a: 1d1c adds r4, r3, #4
801713c: 68bb ldr r3, [r7, #8]
801713e: 7add ldrb r5, [r3, #11]
8017140: 68bb ldr r3, [r7, #8]
8017142: 7a9b ldrb r3, [r3, #10]
8017144: 687a ldr r2, [r7, #4]
8017146: 9202 str r2, [sp, #8]
8017148: 2206 movs r2, #6
801714a: 9201 str r2, [sp, #4]
801714c: 9300 str r3, [sp, #0]
801714e: 462b mov r3, r5
8017150: 4622 mov r2, r4
8017152: f004 fc37 bl 801b9c4 <ip4_output_if>
8017156: 4603 mov r3, r0
8017158: 75fb strb r3, [r7, #23]
seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum);
seg->chksum_swapped = 1;
}
#endif
return err;
801715a: f997 3017 ldrsb.w r3, [r7, #23]
}
801715e: 4618 mov r0, r3
8017160: 3720 adds r7, #32
8017162: 46bd mov sp, r7
8017164: bdb0 pop {r4, r5, r7, pc}
8017166: bf00 nop
8017168: 0801f770 .word 0x0801f770
801716c: 0801fd34 .word 0x0801fd34
8017170: 0801f7c4 .word 0x0801f7c4
8017174: 0801fd54 .word 0x0801fd54
8017178: 0801fd74 .word 0x0801fd74
801717c: 2000f800 .word 0x2000f800
8017180: 0801fd98 .word 0x0801fd98
08017184 <tcp_rexmit_rto_prepare>:
*
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
*/
err_t
tcp_rexmit_rto_prepare(struct tcp_pcb *pcb)
{
8017184: b5b0 push {r4, r5, r7, lr}
8017186: b084 sub sp, #16
8017188: af00 add r7, sp, #0
801718a: 6078 str r0, [r7, #4]
struct tcp_seg *seg;
LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
801718c: 687b ldr r3, [r7, #4]
801718e: 2b00 cmp r3, #0
8017190: d106 bne.n 80171a0 <tcp_rexmit_rto_prepare+0x1c>
8017192: 4b31 ldr r3, [pc, #196] ; (8017258 <tcp_rexmit_rto_prepare+0xd4>)
8017194: f240 6263 movw r2, #1635 ; 0x663
8017198: 4930 ldr r1, [pc, #192] ; (801725c <tcp_rexmit_rto_prepare+0xd8>)
801719a: 4831 ldr r0, [pc, #196] ; (8017260 <tcp_rexmit_rto_prepare+0xdc>)
801719c: f005 fdac bl 801ccf8 <iprintf>
if (pcb->unacked == NULL) {
80171a0: 687b ldr r3, [r7, #4]
80171a2: 6f1b ldr r3, [r3, #112] ; 0x70
80171a4: 2b00 cmp r3, #0
80171a6: d102 bne.n 80171ae <tcp_rexmit_rto_prepare+0x2a>
return ERR_VAL;
80171a8: f06f 0305 mvn.w r3, #5
80171ac: e050 b.n 8017250 <tcp_rexmit_rto_prepare+0xcc>
/* Move all unacked segments to the head of the unsent queue.
However, give up if any of the unsent pbufs are still referenced by the
netif driver due to deferred transmission. No point loading the link further
if it is struggling to flush its buffered writes. */
for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
80171ae: 687b ldr r3, [r7, #4]
80171b0: 6f1b ldr r3, [r3, #112] ; 0x70
80171b2: 60fb str r3, [r7, #12]
80171b4: e00b b.n 80171ce <tcp_rexmit_rto_prepare+0x4a>
if (tcp_output_segment_busy(seg)) {
80171b6: 68f8 ldr r0, [r7, #12]
80171b8: f7ff fee4 bl 8016f84 <tcp_output_segment_busy>
80171bc: 4603 mov r3, r0
80171be: 2b00 cmp r3, #0
80171c0: d002 beq.n 80171c8 <tcp_rexmit_rto_prepare+0x44>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
return ERR_VAL;
80171c2: f06f 0305 mvn.w r3, #5
80171c6: e043 b.n 8017250 <tcp_rexmit_rto_prepare+0xcc>
for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
80171c8: 68fb ldr r3, [r7, #12]
80171ca: 681b ldr r3, [r3, #0]
80171cc: 60fb str r3, [r7, #12]
80171ce: 68fb ldr r3, [r7, #12]
80171d0: 681b ldr r3, [r3, #0]
80171d2: 2b00 cmp r3, #0
80171d4: d1ef bne.n 80171b6 <tcp_rexmit_rto_prepare+0x32>
}
}
if (tcp_output_segment_busy(seg)) {
80171d6: 68f8 ldr r0, [r7, #12]
80171d8: f7ff fed4 bl 8016f84 <tcp_output_segment_busy>
80171dc: 4603 mov r3, r0
80171de: 2b00 cmp r3, #0
80171e0: d002 beq.n 80171e8 <tcp_rexmit_rto_prepare+0x64>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
return ERR_VAL;
80171e2: f06f 0305 mvn.w r3, #5
80171e6: e033 b.n 8017250 <tcp_rexmit_rto_prepare+0xcc>
}
/* concatenate unsent queue after unacked queue */
seg->next = pcb->unsent;
80171e8: 687b ldr r3, [r7, #4]
80171ea: 6eda ldr r2, [r3, #108] ; 0x6c
80171ec: 68fb ldr r3, [r7, #12]
80171ee: 601a str r2, [r3, #0]
if (pcb->unsent == NULL) {
pcb->unsent_oversize = seg->oversize_left;
}
#endif /* TCP_OVERSIZE_DBGCHECK */
/* unsent queue is the concatenated queue (of unacked, unsent) */
pcb->unsent = pcb->unacked;
80171f0: 687b ldr r3, [r7, #4]
80171f2: 6f1a ldr r2, [r3, #112] ; 0x70
80171f4: 687b ldr r3, [r7, #4]
80171f6: 66da str r2, [r3, #108] ; 0x6c
/* unacked queue is now empty */
pcb->unacked = NULL;
80171f8: 687b ldr r3, [r7, #4]
80171fa: 2200 movs r2, #0
80171fc: 671a str r2, [r3, #112] ; 0x70
/* Mark RTO in-progress */
tcp_set_flags(pcb, TF_RTO);
80171fe: 687b ldr r3, [r7, #4]
8017200: 8b5b ldrh r3, [r3, #26]
8017202: f443 6300 orr.w r3, r3, #2048 ; 0x800
8017206: b29a uxth r2, r3
8017208: 687b ldr r3, [r7, #4]
801720a: 835a strh r2, [r3, #26]
/* Record the next byte following retransmit */
pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
801720c: 68fb ldr r3, [r7, #12]
801720e: 68db ldr r3, [r3, #12]
8017210: 685b ldr r3, [r3, #4]
8017212: 4618 mov r0, r3
8017214: f7f9 fca1 bl 8010b5a <lwip_htonl>
8017218: 4604 mov r4, r0
801721a: 68fb ldr r3, [r7, #12]
801721c: 891b ldrh r3, [r3, #8]
801721e: 461d mov r5, r3
8017220: 68fb ldr r3, [r7, #12]
8017222: 68db ldr r3, [r3, #12]
8017224: 899b ldrh r3, [r3, #12]
8017226: b29b uxth r3, r3
8017228: 4618 mov r0, r3
801722a: f7f9 fc81 bl 8010b30 <lwip_htons>
801722e: 4603 mov r3, r0
8017230: b2db uxtb r3, r3
8017232: f003 0303 and.w r3, r3, #3
8017236: 2b00 cmp r3, #0
8017238: d001 beq.n 801723e <tcp_rexmit_rto_prepare+0xba>
801723a: 2301 movs r3, #1
801723c: e000 b.n 8017240 <tcp_rexmit_rto_prepare+0xbc>
801723e: 2300 movs r3, #0
8017240: 442b add r3, r5
8017242: 18e2 adds r2, r4, r3
8017244: 687b ldr r3, [r7, #4]
8017246: 64da str r2, [r3, #76] ; 0x4c
/* Don't take any RTT measurements after retransmitting. */
pcb->rttest = 0;
8017248: 687b ldr r3, [r7, #4]
801724a: 2200 movs r2, #0
801724c: 635a str r2, [r3, #52] ; 0x34
return ERR_OK;
801724e: 2300 movs r3, #0
}
8017250: 4618 mov r0, r3
8017252: 3710 adds r7, #16
8017254: 46bd mov sp, r7
8017256: bdb0 pop {r4, r5, r7, pc}
8017258: 0801f770 .word 0x0801f770
801725c: 0801fdac .word 0x0801fdac
8017260: 0801f7c4 .word 0x0801f7c4
08017264 <tcp_rexmit_rto_commit>:
*
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
*/
void
tcp_rexmit_rto_commit(struct tcp_pcb *pcb)
{
8017264: b580 push {r7, lr}
8017266: b082 sub sp, #8
8017268: af00 add r7, sp, #0
801726a: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
801726c: 687b ldr r3, [r7, #4]
801726e: 2b00 cmp r3, #0
8017270: d106 bne.n 8017280 <tcp_rexmit_rto_commit+0x1c>
8017272: 4b0d ldr r3, [pc, #52] ; (80172a8 <tcp_rexmit_rto_commit+0x44>)
8017274: f44f 62d3 mov.w r2, #1688 ; 0x698
8017278: 490c ldr r1, [pc, #48] ; (80172ac <tcp_rexmit_rto_commit+0x48>)
801727a: 480d ldr r0, [pc, #52] ; (80172b0 <tcp_rexmit_rto_commit+0x4c>)
801727c: f005 fd3c bl 801ccf8 <iprintf>
/* increment number of retransmissions */
if (pcb->nrtx < 0xFF) {
8017280: 687b ldr r3, [r7, #4]
8017282: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8017286: 2bff cmp r3, #255 ; 0xff
8017288: d007 beq.n 801729a <tcp_rexmit_rto_commit+0x36>
++pcb->nrtx;
801728a: 687b ldr r3, [r7, #4]
801728c: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8017290: 3301 adds r3, #1
8017292: b2da uxtb r2, r3
8017294: 687b ldr r3, [r7, #4]
8017296: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Do the actual retransmission */
tcp_output(pcb);
801729a: 6878 ldr r0, [r7, #4]
801729c: f7ff fc7a bl 8016b94 <tcp_output>
}
80172a0: bf00 nop
80172a2: 3708 adds r7, #8
80172a4: 46bd mov sp, r7
80172a6: bd80 pop {r7, pc}
80172a8: 0801f770 .word 0x0801f770
80172ac: 0801fdd0 .word 0x0801fdd0
80172b0: 0801f7c4 .word 0x0801f7c4
080172b4 <tcp_rexmit_rto>:
*
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
*/
void
tcp_rexmit_rto(struct tcp_pcb *pcb)
{
80172b4: b580 push {r7, lr}
80172b6: b082 sub sp, #8
80172b8: af00 add r7, sp, #0
80172ba: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
80172bc: 687b ldr r3, [r7, #4]
80172be: 2b00 cmp r3, #0
80172c0: d106 bne.n 80172d0 <tcp_rexmit_rto+0x1c>
80172c2: 4b0a ldr r3, [pc, #40] ; (80172ec <tcp_rexmit_rto+0x38>)
80172c4: f240 62ad movw r2, #1709 ; 0x6ad
80172c8: 4909 ldr r1, [pc, #36] ; (80172f0 <tcp_rexmit_rto+0x3c>)
80172ca: 480a ldr r0, [pc, #40] ; (80172f4 <tcp_rexmit_rto+0x40>)
80172cc: f005 fd14 bl 801ccf8 <iprintf>
if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) {
80172d0: 6878 ldr r0, [r7, #4]
80172d2: f7ff ff57 bl 8017184 <tcp_rexmit_rto_prepare>
80172d6: 4603 mov r3, r0
80172d8: 2b00 cmp r3, #0
80172da: d102 bne.n 80172e2 <tcp_rexmit_rto+0x2e>
tcp_rexmit_rto_commit(pcb);
80172dc: 6878 ldr r0, [r7, #4]
80172de: f7ff ffc1 bl 8017264 <tcp_rexmit_rto_commit>
}
}
80172e2: bf00 nop
80172e4: 3708 adds r7, #8
80172e6: 46bd mov sp, r7
80172e8: bd80 pop {r7, pc}
80172ea: bf00 nop
80172ec: 0801f770 .word 0x0801f770
80172f0: 0801fdf4 .word 0x0801fdf4
80172f4: 0801f7c4 .word 0x0801f7c4
080172f8 <tcp_rexmit>:
*
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
*/
err_t
tcp_rexmit(struct tcp_pcb *pcb)
{
80172f8: b590 push {r4, r7, lr}
80172fa: b085 sub sp, #20
80172fc: af00 add r7, sp, #0
80172fe: 6078 str r0, [r7, #4]
struct tcp_seg *seg;
struct tcp_seg **cur_seg;
LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
8017300: 687b ldr r3, [r7, #4]
8017302: 2b00 cmp r3, #0
8017304: d106 bne.n 8017314 <tcp_rexmit+0x1c>
8017306: 4b2f ldr r3, [pc, #188] ; (80173c4 <tcp_rexmit+0xcc>)
8017308: f240 62c1 movw r2, #1729 ; 0x6c1
801730c: 492e ldr r1, [pc, #184] ; (80173c8 <tcp_rexmit+0xd0>)
801730e: 482f ldr r0, [pc, #188] ; (80173cc <tcp_rexmit+0xd4>)
8017310: f005 fcf2 bl 801ccf8 <iprintf>
if (pcb->unacked == NULL) {
8017314: 687b ldr r3, [r7, #4]
8017316: 6f1b ldr r3, [r3, #112] ; 0x70
8017318: 2b00 cmp r3, #0
801731a: d102 bne.n 8017322 <tcp_rexmit+0x2a>
return ERR_VAL;
801731c: f06f 0305 mvn.w r3, #5
8017320: e04c b.n 80173bc <tcp_rexmit+0xc4>
}
seg = pcb->unacked;
8017322: 687b ldr r3, [r7, #4]
8017324: 6f1b ldr r3, [r3, #112] ; 0x70
8017326: 60bb str r3, [r7, #8]
/* Give up if the segment is still referenced by the netif driver
due to deferred transmission. */
if (tcp_output_segment_busy(seg)) {
8017328: 68b8 ldr r0, [r7, #8]
801732a: f7ff fe2b bl 8016f84 <tcp_output_segment_busy>
801732e: 4603 mov r3, r0
8017330: 2b00 cmp r3, #0
8017332: d002 beq.n 801733a <tcp_rexmit+0x42>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n"));
return ERR_VAL;
8017334: f06f 0305 mvn.w r3, #5
8017338: e040 b.n 80173bc <tcp_rexmit+0xc4>
}
/* Move the first unacked segment to the unsent queue */
/* Keep the unsent queue sorted. */
pcb->unacked = seg->next;
801733a: 68bb ldr r3, [r7, #8]
801733c: 681a ldr r2, [r3, #0]
801733e: 687b ldr r3, [r7, #4]
8017340: 671a str r2, [r3, #112] ; 0x70
cur_seg = &(pcb->unsent);
8017342: 687b ldr r3, [r7, #4]
8017344: 336c adds r3, #108 ; 0x6c
8017346: 60fb str r3, [r7, #12]
while (*cur_seg &&
8017348: e002 b.n 8017350 <tcp_rexmit+0x58>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
cur_seg = &((*cur_seg)->next );
801734a: 68fb ldr r3, [r7, #12]
801734c: 681b ldr r3, [r3, #0]
801734e: 60fb str r3, [r7, #12]
while (*cur_seg &&
8017350: 68fb ldr r3, [r7, #12]
8017352: 681b ldr r3, [r3, #0]
8017354: 2b00 cmp r3, #0
8017356: d011 beq.n 801737c <tcp_rexmit+0x84>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
8017358: 68fb ldr r3, [r7, #12]
801735a: 681b ldr r3, [r3, #0]
801735c: 68db ldr r3, [r3, #12]
801735e: 685b ldr r3, [r3, #4]
8017360: 4618 mov r0, r3
8017362: f7f9 fbfa bl 8010b5a <lwip_htonl>
8017366: 4604 mov r4, r0
8017368: 68bb ldr r3, [r7, #8]
801736a: 68db ldr r3, [r3, #12]
801736c: 685b ldr r3, [r3, #4]
801736e: 4618 mov r0, r3
8017370: f7f9 fbf3 bl 8010b5a <lwip_htonl>
8017374: 4603 mov r3, r0
8017376: 1ae3 subs r3, r4, r3
while (*cur_seg &&
8017378: 2b00 cmp r3, #0
801737a: dbe6 blt.n 801734a <tcp_rexmit+0x52>
}
seg->next = *cur_seg;
801737c: 68fb ldr r3, [r7, #12]
801737e: 681a ldr r2, [r3, #0]
8017380: 68bb ldr r3, [r7, #8]
8017382: 601a str r2, [r3, #0]
*cur_seg = seg;
8017384: 68fb ldr r3, [r7, #12]
8017386: 68ba ldr r2, [r7, #8]
8017388: 601a str r2, [r3, #0]
#if TCP_OVERSIZE
if (seg->next == NULL) {
801738a: 68bb ldr r3, [r7, #8]
801738c: 681b ldr r3, [r3, #0]
801738e: 2b00 cmp r3, #0
8017390: d103 bne.n 801739a <tcp_rexmit+0xa2>
/* the retransmitted segment is last in unsent, so reset unsent_oversize */
pcb->unsent_oversize = 0;
8017392: 687b ldr r3, [r7, #4]
8017394: 2200 movs r2, #0
8017396: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
}
#endif /* TCP_OVERSIZE */
if (pcb->nrtx < 0xFF) {
801739a: 687b ldr r3, [r7, #4]
801739c: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
80173a0: 2bff cmp r3, #255 ; 0xff
80173a2: d007 beq.n 80173b4 <tcp_rexmit+0xbc>
++pcb->nrtx;
80173a4: 687b ldr r3, [r7, #4]
80173a6: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
80173aa: 3301 adds r3, #1
80173ac: b2da uxtb r2, r3
80173ae: 687b ldr r3, [r7, #4]
80173b0: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Don't take any rtt measurements after retransmitting. */
pcb->rttest = 0;
80173b4: 687b ldr r3, [r7, #4]
80173b6: 2200 movs r2, #0
80173b8: 635a str r2, [r3, #52] ; 0x34
/* Do the actual retransmission. */
MIB2_STATS_INC(mib2.tcpretranssegs);
/* No need to call tcp_output: we are always called from tcp_input()
and thus tcp_output directly returns. */
return ERR_OK;
80173ba: 2300 movs r3, #0
}
80173bc: 4618 mov r0, r3
80173be: 3714 adds r7, #20
80173c0: 46bd mov sp, r7
80173c2: bd90 pop {r4, r7, pc}
80173c4: 0801f770 .word 0x0801f770
80173c8: 0801fe10 .word 0x0801fe10
80173cc: 0801f7c4 .word 0x0801f7c4
080173d0 <tcp_rexmit_fast>:
*
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
*/
void
tcp_rexmit_fast(struct tcp_pcb *pcb)
{
80173d0: b580 push {r7, lr}
80173d2: b082 sub sp, #8
80173d4: af00 add r7, sp, #0
80173d6: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
80173d8: 687b ldr r3, [r7, #4]
80173da: 2b00 cmp r3, #0
80173dc: d106 bne.n 80173ec <tcp_rexmit_fast+0x1c>
80173de: 4b2f ldr r3, [pc, #188] ; (801749c <tcp_rexmit_fast+0xcc>)
80173e0: f240 62f9 movw r2, #1785 ; 0x6f9
80173e4: 492e ldr r1, [pc, #184] ; (80174a0 <tcp_rexmit_fast+0xd0>)
80173e6: 482f ldr r0, [pc, #188] ; (80174a4 <tcp_rexmit_fast+0xd4>)
80173e8: f005 fc86 bl 801ccf8 <iprintf>
if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) {
80173ec: 687b ldr r3, [r7, #4]
80173ee: 6f1b ldr r3, [r3, #112] ; 0x70
80173f0: 2b00 cmp r3, #0
80173f2: d04f beq.n 8017494 <tcp_rexmit_fast+0xc4>
80173f4: 687b ldr r3, [r7, #4]
80173f6: 8b5b ldrh r3, [r3, #26]
80173f8: f003 0304 and.w r3, r3, #4
80173fc: 2b00 cmp r3, #0
80173fe: d149 bne.n 8017494 <tcp_rexmit_fast+0xc4>
LWIP_DEBUGF(TCP_FR_DEBUG,
("tcp_receive: dupacks %"U16_F" (%"U32_F
"), fast retransmit %"U32_F"\n",
(u16_t)pcb->dupacks, pcb->lastack,
lwip_ntohl(pcb->unacked->tcphdr->seqno)));
if (tcp_rexmit(pcb) == ERR_OK) {
8017400: 6878 ldr r0, [r7, #4]
8017402: f7ff ff79 bl 80172f8 <tcp_rexmit>
8017406: 4603 mov r3, r0
8017408: 2b00 cmp r3, #0
801740a: d143 bne.n 8017494 <tcp_rexmit_fast+0xc4>
/* Set ssthresh to half of the minimum of the current
* cwnd and the advertised window */
pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2;
801740c: 687b ldr r3, [r7, #4]
801740e: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8017412: 687b ldr r3, [r7, #4]
8017414: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8017418: 429a cmp r2, r3
801741a: d208 bcs.n 801742e <tcp_rexmit_fast+0x5e>
801741c: 687b ldr r3, [r7, #4]
801741e: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8017422: 2b00 cmp r3, #0
8017424: da00 bge.n 8017428 <tcp_rexmit_fast+0x58>
8017426: 3301 adds r3, #1
8017428: 105b asrs r3, r3, #1
801742a: b29b uxth r3, r3
801742c: e007 b.n 801743e <tcp_rexmit_fast+0x6e>
801742e: 687b ldr r3, [r7, #4]
8017430: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8017434: 2b00 cmp r3, #0
8017436: da00 bge.n 801743a <tcp_rexmit_fast+0x6a>
8017438: 3301 adds r3, #1
801743a: 105b asrs r3, r3, #1
801743c: b29b uxth r3, r3
801743e: 687a ldr r2, [r7, #4]
8017440: f8a2 304a strh.w r3, [r2, #74] ; 0x4a
/* The minimum value for ssthresh should be 2 MSS */
if (pcb->ssthresh < (2U * pcb->mss)) {
8017444: 687b ldr r3, [r7, #4]
8017446: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
801744a: 461a mov r2, r3
801744c: 687b ldr r3, [r7, #4]
801744e: 8e5b ldrh r3, [r3, #50] ; 0x32
8017450: 005b lsls r3, r3, #1
8017452: 429a cmp r2, r3
8017454: d206 bcs.n 8017464 <tcp_rexmit_fast+0x94>
LWIP_DEBUGF(TCP_FR_DEBUG,
("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F
" should be min 2 mss %"U16_F"...\n",
pcb->ssthresh, (u16_t)(2 * pcb->mss)));
pcb->ssthresh = 2 * pcb->mss;
8017456: 687b ldr r3, [r7, #4]
8017458: 8e5b ldrh r3, [r3, #50] ; 0x32
801745a: 005b lsls r3, r3, #1
801745c: b29a uxth r2, r3
801745e: 687b ldr r3, [r7, #4]
8017460: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
}
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
8017464: 687b ldr r3, [r7, #4]
8017466: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
801746a: 687b ldr r3, [r7, #4]
801746c: 8e5b ldrh r3, [r3, #50] ; 0x32
801746e: 4619 mov r1, r3
8017470: 0049 lsls r1, r1, #1
8017472: 440b add r3, r1
8017474: b29b uxth r3, r3
8017476: 4413 add r3, r2
8017478: b29a uxth r2, r3
801747a: 687b ldr r3, [r7, #4]
801747c: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
tcp_set_flags(pcb, TF_INFR);
8017480: 687b ldr r3, [r7, #4]
8017482: 8b5b ldrh r3, [r3, #26]
8017484: f043 0304 orr.w r3, r3, #4
8017488: b29a uxth r2, r3
801748a: 687b ldr r3, [r7, #4]
801748c: 835a strh r2, [r3, #26]
/* Reset the retransmission timer to prevent immediate rto retransmissions */
pcb->rtime = 0;
801748e: 687b ldr r3, [r7, #4]
8017490: 2200 movs r2, #0
8017492: 861a strh r2, [r3, #48] ; 0x30
}
}
}
8017494: bf00 nop
8017496: 3708 adds r7, #8
8017498: 46bd mov sp, r7
801749a: bd80 pop {r7, pc}
801749c: 0801f770 .word 0x0801f770
80174a0: 0801fe28 .word 0x0801fe28
80174a4: 0801f7c4 .word 0x0801f7c4
080174a8 <tcp_output_alloc_header_common>:
static struct pbuf *
tcp_output_alloc_header_common(u32_t ackno, u16_t optlen, u16_t datalen,
u32_t seqno_be /* already in network byte order */,
u16_t src_port, u16_t dst_port, u8_t flags, u16_t wnd)
{
80174a8: b580 push {r7, lr}
80174aa: b086 sub sp, #24
80174ac: af00 add r7, sp, #0
80174ae: 60f8 str r0, [r7, #12]
80174b0: 607b str r3, [r7, #4]
80174b2: 460b mov r3, r1
80174b4: 817b strh r3, [r7, #10]
80174b6: 4613 mov r3, r2
80174b8: 813b strh r3, [r7, #8]
struct tcp_hdr *tcphdr;
struct pbuf *p;
p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM);
80174ba: 897a ldrh r2, [r7, #10]
80174bc: 893b ldrh r3, [r7, #8]
80174be: 4413 add r3, r2
80174c0: b29b uxth r3, r3
80174c2: 3314 adds r3, #20
80174c4: b29b uxth r3, r3
80174c6: f44f 7220 mov.w r2, #640 ; 0x280
80174ca: 4619 mov r1, r3
80174cc: 2022 movs r0, #34 ; 0x22
80174ce: f7fa fc03 bl 8011cd8 <pbuf_alloc>
80174d2: 6178 str r0, [r7, #20]
if (p != NULL) {
80174d4: 697b ldr r3, [r7, #20]
80174d6: 2b00 cmp r3, #0
80174d8: d04e beq.n 8017578 <tcp_output_alloc_header_common+0xd0>
LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
80174da: 697b ldr r3, [r7, #20]
80174dc: 895b ldrh r3, [r3, #10]
80174de: 461a mov r2, r3
80174e0: 897b ldrh r3, [r7, #10]
80174e2: 3314 adds r3, #20
80174e4: 429a cmp r2, r3
80174e6: da06 bge.n 80174f6 <tcp_output_alloc_header_common+0x4e>
80174e8: 4b26 ldr r3, [pc, #152] ; (8017584 <tcp_output_alloc_header_common+0xdc>)
80174ea: f240 7224 movw r2, #1828 ; 0x724
80174ee: 4926 ldr r1, [pc, #152] ; (8017588 <tcp_output_alloc_header_common+0xe0>)
80174f0: 4826 ldr r0, [pc, #152] ; (801758c <tcp_output_alloc_header_common+0xe4>)
80174f2: f005 fc01 bl 801ccf8 <iprintf>
(p->len >= TCP_HLEN + optlen));
tcphdr = (struct tcp_hdr *)p->payload;
80174f6: 697b ldr r3, [r7, #20]
80174f8: 685b ldr r3, [r3, #4]
80174fa: 613b str r3, [r7, #16]
tcphdr->src = lwip_htons(src_port);
80174fc: 8c3b ldrh r3, [r7, #32]
80174fe: 4618 mov r0, r3
8017500: f7f9 fb16 bl 8010b30 <lwip_htons>
8017504: 4603 mov r3, r0
8017506: 461a mov r2, r3
8017508: 693b ldr r3, [r7, #16]
801750a: 801a strh r2, [r3, #0]
tcphdr->dest = lwip_htons(dst_port);
801750c: 8cbb ldrh r3, [r7, #36] ; 0x24
801750e: 4618 mov r0, r3
8017510: f7f9 fb0e bl 8010b30 <lwip_htons>
8017514: 4603 mov r3, r0
8017516: 461a mov r2, r3
8017518: 693b ldr r3, [r7, #16]
801751a: 805a strh r2, [r3, #2]
tcphdr->seqno = seqno_be;
801751c: 693b ldr r3, [r7, #16]
801751e: 687a ldr r2, [r7, #4]
8017520: 605a str r2, [r3, #4]
tcphdr->ackno = lwip_htonl(ackno);
8017522: 68f8 ldr r0, [r7, #12]
8017524: f7f9 fb19 bl 8010b5a <lwip_htonl>
8017528: 4602 mov r2, r0
801752a: 693b ldr r3, [r7, #16]
801752c: 609a str r2, [r3, #8]
TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags);
801752e: 897b ldrh r3, [r7, #10]
8017530: 089b lsrs r3, r3, #2
8017532: b29b uxth r3, r3
8017534: 3305 adds r3, #5
8017536: b29b uxth r3, r3
8017538: 031b lsls r3, r3, #12
801753a: b29a uxth r2, r3
801753c: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
8017540: b29b uxth r3, r3
8017542: 4313 orrs r3, r2
8017544: b29b uxth r3, r3
8017546: 4618 mov r0, r3
8017548: f7f9 faf2 bl 8010b30 <lwip_htons>
801754c: 4603 mov r3, r0
801754e: 461a mov r2, r3
8017550: 693b ldr r3, [r7, #16]
8017552: 819a strh r2, [r3, #12]
tcphdr->wnd = lwip_htons(wnd);
8017554: 8dbb ldrh r3, [r7, #44] ; 0x2c
8017556: 4618 mov r0, r3
8017558: f7f9 faea bl 8010b30 <lwip_htons>
801755c: 4603 mov r3, r0
801755e: 461a mov r2, r3
8017560: 693b ldr r3, [r7, #16]
8017562: 81da strh r2, [r3, #14]
tcphdr->chksum = 0;
8017564: 693b ldr r3, [r7, #16]
8017566: 2200 movs r2, #0
8017568: 741a strb r2, [r3, #16]
801756a: 2200 movs r2, #0
801756c: 745a strb r2, [r3, #17]
tcphdr->urgp = 0;
801756e: 693b ldr r3, [r7, #16]
8017570: 2200 movs r2, #0
8017572: 749a strb r2, [r3, #18]
8017574: 2200 movs r2, #0
8017576: 74da strb r2, [r3, #19]
}
return p;
8017578: 697b ldr r3, [r7, #20]
}
801757a: 4618 mov r0, r3
801757c: 3718 adds r7, #24
801757e: 46bd mov sp, r7
8017580: bd80 pop {r7, pc}
8017582: bf00 nop
8017584: 0801f770 .word 0x0801f770
8017588: 0801fe48 .word 0x0801fe48
801758c: 0801f7c4 .word 0x0801f7c4
08017590 <tcp_output_alloc_header>:
* @return pbuf with p->payload being the tcp_hdr
*/
static struct pbuf *
tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen,
u32_t seqno_be /* already in network byte order */)
{
8017590: b5b0 push {r4, r5, r7, lr}
8017592: b08a sub sp, #40 ; 0x28
8017594: af04 add r7, sp, #16
8017596: 60f8 str r0, [r7, #12]
8017598: 607b str r3, [r7, #4]
801759a: 460b mov r3, r1
801759c: 817b strh r3, [r7, #10]
801759e: 4613 mov r3, r2
80175a0: 813b strh r3, [r7, #8]
struct pbuf *p;
LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
80175a2: 68fb ldr r3, [r7, #12]
80175a4: 2b00 cmp r3, #0
80175a6: d106 bne.n 80175b6 <tcp_output_alloc_header+0x26>
80175a8: 4b15 ldr r3, [pc, #84] ; (8017600 <tcp_output_alloc_header+0x70>)
80175aa: f240 7242 movw r2, #1858 ; 0x742
80175ae: 4915 ldr r1, [pc, #84] ; (8017604 <tcp_output_alloc_header+0x74>)
80175b0: 4815 ldr r0, [pc, #84] ; (8017608 <tcp_output_alloc_header+0x78>)
80175b2: f005 fba1 bl 801ccf8 <iprintf>
p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen,
80175b6: 68fb ldr r3, [r7, #12]
80175b8: 6a58 ldr r0, [r3, #36] ; 0x24
80175ba: 68fb ldr r3, [r7, #12]
80175bc: 8adb ldrh r3, [r3, #22]
80175be: 68fa ldr r2, [r7, #12]
80175c0: 8b12 ldrh r2, [r2, #24]
80175c2: 68f9 ldr r1, [r7, #12]
80175c4: 8d49 ldrh r1, [r1, #42] ; 0x2a
80175c6: 893d ldrh r5, [r7, #8]
80175c8: 897c ldrh r4, [r7, #10]
80175ca: 9103 str r1, [sp, #12]
80175cc: 2110 movs r1, #16
80175ce: 9102 str r1, [sp, #8]
80175d0: 9201 str r2, [sp, #4]
80175d2: 9300 str r3, [sp, #0]
80175d4: 687b ldr r3, [r7, #4]
80175d6: 462a mov r2, r5
80175d8: 4621 mov r1, r4
80175da: f7ff ff65 bl 80174a8 <tcp_output_alloc_header_common>
80175de: 6178 str r0, [r7, #20]
seqno_be, pcb->local_port, pcb->remote_port, TCP_ACK,
TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd)));
if (p != NULL) {
80175e0: 697b ldr r3, [r7, #20]
80175e2: 2b00 cmp r3, #0
80175e4: d006 beq.n 80175f4 <tcp_output_alloc_header+0x64>
/* If we're sending a packet, update the announced right window edge */
pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
80175e6: 68fb ldr r3, [r7, #12]
80175e8: 6a5b ldr r3, [r3, #36] ; 0x24
80175ea: 68fa ldr r2, [r7, #12]
80175ec: 8d52 ldrh r2, [r2, #42] ; 0x2a
80175ee: 441a add r2, r3
80175f0: 68fb ldr r3, [r7, #12]
80175f2: 62da str r2, [r3, #44] ; 0x2c
}
return p;
80175f4: 697b ldr r3, [r7, #20]
}
80175f6: 4618 mov r0, r3
80175f8: 3718 adds r7, #24
80175fa: 46bd mov sp, r7
80175fc: bdb0 pop {r4, r5, r7, pc}
80175fe: bf00 nop
8017600: 0801f770 .word 0x0801f770
8017604: 0801fe78 .word 0x0801fe78
8017608: 0801f7c4 .word 0x0801f7c4
0801760c <tcp_output_fill_options>:
/* Fill in options for control segments */
static void
tcp_output_fill_options(const struct tcp_pcb *pcb, struct pbuf *p, u8_t optflags, u8_t num_sacks)
{
801760c: b580 push {r7, lr}
801760e: b088 sub sp, #32
8017610: af00 add r7, sp, #0
8017612: 60f8 str r0, [r7, #12]
8017614: 60b9 str r1, [r7, #8]
8017616: 4611 mov r1, r2
8017618: 461a mov r2, r3
801761a: 460b mov r3, r1
801761c: 71fb strb r3, [r7, #7]
801761e: 4613 mov r3, r2
8017620: 71bb strb r3, [r7, #6]
struct tcp_hdr *tcphdr;
u32_t *opts;
u16_t sacks_len = 0;
8017622: 2300 movs r3, #0
8017624: 83fb strh r3, [r7, #30]
LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
8017626: 68bb ldr r3, [r7, #8]
8017628: 2b00 cmp r3, #0
801762a: d106 bne.n 801763a <tcp_output_fill_options+0x2e>
801762c: 4b13 ldr r3, [pc, #76] ; (801767c <tcp_output_fill_options+0x70>)
801762e: f240 7256 movw r2, #1878 ; 0x756
8017632: 4913 ldr r1, [pc, #76] ; (8017680 <tcp_output_fill_options+0x74>)
8017634: 4813 ldr r0, [pc, #76] ; (8017684 <tcp_output_fill_options+0x78>)
8017636: f005 fb5f bl 801ccf8 <iprintf>
tcphdr = (struct tcp_hdr *)p->payload;
801763a: 68bb ldr r3, [r7, #8]
801763c: 685b ldr r3, [r3, #4]
801763e: 61bb str r3, [r7, #24]
opts = (u32_t *)(void *)(tcphdr + 1);
8017640: 69bb ldr r3, [r7, #24]
8017642: 3314 adds r3, #20
8017644: 617b str r3, [r7, #20]
opts = LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(p, tcphdr, pcb, opts);
#endif
LWIP_UNUSED_ARG(pcb);
LWIP_UNUSED_ARG(sacks_len);
LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(tcphdr + 1)) + sacks_len * 4 + LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb));
8017646: 69bb ldr r3, [r7, #24]
8017648: f103 0214 add.w r2, r3, #20
801764c: 8bfb ldrh r3, [r7, #30]
801764e: 009b lsls r3, r3, #2
8017650: 4619 mov r1, r3
8017652: 79fb ldrb r3, [r7, #7]
8017654: 009b lsls r3, r3, #2
8017656: f003 0304 and.w r3, r3, #4
801765a: 440b add r3, r1
801765c: 4413 add r3, r2
801765e: 697a ldr r2, [r7, #20]
8017660: 429a cmp r2, r3
8017662: d006 beq.n 8017672 <tcp_output_fill_options+0x66>
8017664: 4b05 ldr r3, [pc, #20] ; (801767c <tcp_output_fill_options+0x70>)
8017666: f240 7275 movw r2, #1909 ; 0x775
801766a: 4907 ldr r1, [pc, #28] ; (8017688 <tcp_output_fill_options+0x7c>)
801766c: 4805 ldr r0, [pc, #20] ; (8017684 <tcp_output_fill_options+0x78>)
801766e: f005 fb43 bl 801ccf8 <iprintf>
LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */
LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */
}
8017672: bf00 nop
8017674: 3720 adds r7, #32
8017676: 46bd mov sp, r7
8017678: bd80 pop {r7, pc}
801767a: bf00 nop
801767c: 0801f770 .word 0x0801f770
8017680: 0801fea0 .word 0x0801fea0
8017684: 0801f7c4 .word 0x0801f7c4
8017688: 0801fd98 .word 0x0801fd98
0801768c <tcp_output_control_segment>:
* header checksum and calling ip_output_if while handling netif hints and stats.
*/
static err_t
tcp_output_control_segment(const struct tcp_pcb *pcb, struct pbuf *p,
const ip_addr_t *src, const ip_addr_t *dst)
{
801768c: b580 push {r7, lr}
801768e: b08a sub sp, #40 ; 0x28
8017690: af04 add r7, sp, #16
8017692: 60f8 str r0, [r7, #12]
8017694: 60b9 str r1, [r7, #8]
8017696: 607a str r2, [r7, #4]
8017698: 603b str r3, [r7, #0]
err_t err;
struct netif *netif;
LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
801769a: 68bb ldr r3, [r7, #8]
801769c: 2b00 cmp r3, #0
801769e: d106 bne.n 80176ae <tcp_output_control_segment+0x22>
80176a0: 4b1c ldr r3, [pc, #112] ; (8017714 <tcp_output_control_segment+0x88>)
80176a2: f240 7287 movw r2, #1927 ; 0x787
80176a6: 491c ldr r1, [pc, #112] ; (8017718 <tcp_output_control_segment+0x8c>)
80176a8: 481c ldr r0, [pc, #112] ; (801771c <tcp_output_control_segment+0x90>)
80176aa: f005 fb25 bl 801ccf8 <iprintf>
netif = tcp_route(pcb, src, dst);
80176ae: 683a ldr r2, [r7, #0]
80176b0: 6879 ldr r1, [r7, #4]
80176b2: 68f8 ldr r0, [r7, #12]
80176b4: f7fe ff2e bl 8016514 <tcp_route>
80176b8: 6138 str r0, [r7, #16]
if (netif == NULL) {
80176ba: 693b ldr r3, [r7, #16]
80176bc: 2b00 cmp r3, #0
80176be: d102 bne.n 80176c6 <tcp_output_control_segment+0x3a>
err = ERR_RTE;
80176c0: 23fc movs r3, #252 ; 0xfc
80176c2: 75fb strb r3, [r7, #23]
80176c4: e01c b.n 8017700 <tcp_output_control_segment+0x74>
struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload;
tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len,
src, dst);
}
#endif
if (pcb != NULL) {
80176c6: 68fb ldr r3, [r7, #12]
80176c8: 2b00 cmp r3, #0
80176ca: d006 beq.n 80176da <tcp_output_control_segment+0x4e>
NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints)));
ttl = pcb->ttl;
80176cc: 68fb ldr r3, [r7, #12]
80176ce: 7adb ldrb r3, [r3, #11]
80176d0: 75bb strb r3, [r7, #22]
tos = pcb->tos;
80176d2: 68fb ldr r3, [r7, #12]
80176d4: 7a9b ldrb r3, [r3, #10]
80176d6: 757b strb r3, [r7, #21]
80176d8: e003 b.n 80176e2 <tcp_output_control_segment+0x56>
} else {
/* Send output with hardcoded TTL/HL since we have no access to the pcb */
ttl = TCP_TTL;
80176da: 23ff movs r3, #255 ; 0xff
80176dc: 75bb strb r3, [r7, #22]
tos = 0;
80176de: 2300 movs r3, #0
80176e0: 757b strb r3, [r7, #21]
}
TCP_STATS_INC(tcp.xmit);
err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif);
80176e2: 7dba ldrb r2, [r7, #22]
80176e4: 693b ldr r3, [r7, #16]
80176e6: 9302 str r3, [sp, #8]
80176e8: 2306 movs r3, #6
80176ea: 9301 str r3, [sp, #4]
80176ec: 7d7b ldrb r3, [r7, #21]
80176ee: 9300 str r3, [sp, #0]
80176f0: 4613 mov r3, r2
80176f2: 683a ldr r2, [r7, #0]
80176f4: 6879 ldr r1, [r7, #4]
80176f6: 68b8 ldr r0, [r7, #8]
80176f8: f004 f964 bl 801b9c4 <ip4_output_if>
80176fc: 4603 mov r3, r0
80176fe: 75fb strb r3, [r7, #23]
NETIF_RESET_HINTS(netif);
}
pbuf_free(p);
8017700: 68b8 ldr r0, [r7, #8]
8017702: f7fa fdc9 bl 8012298 <pbuf_free>
return err;
8017706: f997 3017 ldrsb.w r3, [r7, #23]
}
801770a: 4618 mov r0, r3
801770c: 3718 adds r7, #24
801770e: 46bd mov sp, r7
8017710: bd80 pop {r7, pc}
8017712: bf00 nop
8017714: 0801f770 .word 0x0801f770
8017718: 0801fec8 .word 0x0801fec8
801771c: 0801f7c4 .word 0x0801f7c4
08017720 <tcp_rst>:
*/
void
tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno,
const ip_addr_t *local_ip, const ip_addr_t *remote_ip,
u16_t local_port, u16_t remote_port)
{
8017720: b590 push {r4, r7, lr}
8017722: b08b sub sp, #44 ; 0x2c
8017724: af04 add r7, sp, #16
8017726: 60f8 str r0, [r7, #12]
8017728: 60b9 str r1, [r7, #8]
801772a: 607a str r2, [r7, #4]
801772c: 603b str r3, [r7, #0]
struct pbuf *p;
u16_t wnd;
u8_t optlen;
LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
801772e: 683b ldr r3, [r7, #0]
8017730: 2b00 cmp r3, #0
8017732: d106 bne.n 8017742 <tcp_rst+0x22>
8017734: 4b1f ldr r3, [pc, #124] ; (80177b4 <tcp_rst+0x94>)
8017736: f240 72c4 movw r2, #1988 ; 0x7c4
801773a: 491f ldr r1, [pc, #124] ; (80177b8 <tcp_rst+0x98>)
801773c: 481f ldr r0, [pc, #124] ; (80177bc <tcp_rst+0x9c>)
801773e: f005 fadb bl 801ccf8 <iprintf>
LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
8017742: 6abb ldr r3, [r7, #40] ; 0x28
8017744: 2b00 cmp r3, #0
8017746: d106 bne.n 8017756 <tcp_rst+0x36>
8017748: 4b1a ldr r3, [pc, #104] ; (80177b4 <tcp_rst+0x94>)
801774a: f240 72c5 movw r2, #1989 ; 0x7c5
801774e: 491c ldr r1, [pc, #112] ; (80177c0 <tcp_rst+0xa0>)
8017750: 481a ldr r0, [pc, #104] ; (80177bc <tcp_rst+0x9c>)
8017752: f005 fad1 bl 801ccf8 <iprintf>
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
8017756: 2300 movs r3, #0
8017758: 75fb strb r3, [r7, #23]
#if LWIP_WND_SCALE
wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF));
#else
wnd = PP_HTONS(TCP_WND);
801775a: f246 0308 movw r3, #24584 ; 0x6008
801775e: 82bb strh r3, [r7, #20]
#endif
p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port,
8017760: 7dfb ldrb r3, [r7, #23]
8017762: b29c uxth r4, r3
8017764: 68b8 ldr r0, [r7, #8]
8017766: f7f9 f9f8 bl 8010b5a <lwip_htonl>
801776a: 4602 mov r2, r0
801776c: 8abb ldrh r3, [r7, #20]
801776e: 9303 str r3, [sp, #12]
8017770: 2314 movs r3, #20
8017772: 9302 str r3, [sp, #8]
8017774: 8e3b ldrh r3, [r7, #48] ; 0x30
8017776: 9301 str r3, [sp, #4]
8017778: 8dbb ldrh r3, [r7, #44] ; 0x2c
801777a: 9300 str r3, [sp, #0]
801777c: 4613 mov r3, r2
801777e: 2200 movs r2, #0
8017780: 4621 mov r1, r4
8017782: 6878 ldr r0, [r7, #4]
8017784: f7ff fe90 bl 80174a8 <tcp_output_alloc_header_common>
8017788: 6138 str r0, [r7, #16]
remote_port, TCP_RST | TCP_ACK, wnd);
if (p == NULL) {
801778a: 693b ldr r3, [r7, #16]
801778c: 2b00 cmp r3, #0
801778e: d00c beq.n 80177aa <tcp_rst+0x8a>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n"));
return;
}
tcp_output_fill_options(pcb, p, 0, optlen);
8017790: 7dfb ldrb r3, [r7, #23]
8017792: 2200 movs r2, #0
8017794: 6939 ldr r1, [r7, #16]
8017796: 68f8 ldr r0, [r7, #12]
8017798: f7ff ff38 bl 801760c <tcp_output_fill_options>
MIB2_STATS_INC(mib2.tcpoutrsts);
tcp_output_control_segment(pcb, p, local_ip, remote_ip);
801779c: 6abb ldr r3, [r7, #40] ; 0x28
801779e: 683a ldr r2, [r7, #0]
80177a0: 6939 ldr r1, [r7, #16]
80177a2: 68f8 ldr r0, [r7, #12]
80177a4: f7ff ff72 bl 801768c <tcp_output_control_segment>
80177a8: e000 b.n 80177ac <tcp_rst+0x8c>
return;
80177aa: bf00 nop
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno));
}
80177ac: 371c adds r7, #28
80177ae: 46bd mov sp, r7
80177b0: bd90 pop {r4, r7, pc}
80177b2: bf00 nop
80177b4: 0801f770 .word 0x0801f770
80177b8: 0801fef4 .word 0x0801fef4
80177bc: 0801f7c4 .word 0x0801f7c4
80177c0: 0801ff10 .word 0x0801ff10
080177c4 <tcp_send_empty_ack>:
*
* @param pcb Protocol control block for the TCP connection to send the ACK
*/
err_t
tcp_send_empty_ack(struct tcp_pcb *pcb)
{
80177c4: b590 push {r4, r7, lr}
80177c6: b087 sub sp, #28
80177c8: af00 add r7, sp, #0
80177ca: 6078 str r0, [r7, #4]
err_t err;
struct pbuf *p;
u8_t optlen, optflags = 0;
80177cc: 2300 movs r3, #0
80177ce: 75fb strb r3, [r7, #23]
u8_t num_sacks = 0;
80177d0: 2300 movs r3, #0
80177d2: 75bb strb r3, [r7, #22]
LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
80177d4: 687b ldr r3, [r7, #4]
80177d6: 2b00 cmp r3, #0
80177d8: d106 bne.n 80177e8 <tcp_send_empty_ack+0x24>
80177da: 4b28 ldr r3, [pc, #160] ; (801787c <tcp_send_empty_ack+0xb8>)
80177dc: f240 72ea movw r2, #2026 ; 0x7ea
80177e0: 4927 ldr r1, [pc, #156] ; (8017880 <tcp_send_empty_ack+0xbc>)
80177e2: 4828 ldr r0, [pc, #160] ; (8017884 <tcp_send_empty_ack+0xc0>)
80177e4: f005 fa88 bl 801ccf8 <iprintf>
#if LWIP_TCP_TIMESTAMPS
if (pcb->flags & TF_TIMESTAMP) {
optflags = TF_SEG_OPTS_TS;
}
#endif
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
80177e8: 7dfb ldrb r3, [r7, #23]
80177ea: 009b lsls r3, r3, #2
80177ec: b2db uxtb r3, r3
80177ee: f003 0304 and.w r3, r3, #4
80177f2: 757b strb r3, [r7, #21]
if ((num_sacks = tcp_get_num_sacks(pcb, optlen)) > 0) {
optlen += 4 + num_sacks * 8; /* 4 bytes for header (including 2*NOP), plus 8B for each SACK */
}
#endif
p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt));
80177f4: 7d7b ldrb r3, [r7, #21]
80177f6: b29c uxth r4, r3
80177f8: 687b ldr r3, [r7, #4]
80177fa: 6d1b ldr r3, [r3, #80] ; 0x50
80177fc: 4618 mov r0, r3
80177fe: f7f9 f9ac bl 8010b5a <lwip_htonl>
8017802: 4603 mov r3, r0
8017804: 2200 movs r2, #0
8017806: 4621 mov r1, r4
8017808: 6878 ldr r0, [r7, #4]
801780a: f7ff fec1 bl 8017590 <tcp_output_alloc_header>
801780e: 6138 str r0, [r7, #16]
if (p == NULL) {
8017810: 693b ldr r3, [r7, #16]
8017812: 2b00 cmp r3, #0
8017814: d109 bne.n 801782a <tcp_send_empty_ack+0x66>
/* let tcp_fasttmr retry sending this ACK */
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8017816: 687b ldr r3, [r7, #4]
8017818: 8b5b ldrh r3, [r3, #26]
801781a: f043 0303 orr.w r3, r3, #3
801781e: b29a uxth r2, r3
8017820: 687b ldr r3, [r7, #4]
8017822: 835a strh r2, [r3, #26]
LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n"));
return ERR_BUF;
8017824: f06f 0301 mvn.w r3, #1
8017828: e023 b.n 8017872 <tcp_send_empty_ack+0xae>
}
tcp_output_fill_options(pcb, p, optflags, num_sacks);
801782a: 7dbb ldrb r3, [r7, #22]
801782c: 7dfa ldrb r2, [r7, #23]
801782e: 6939 ldr r1, [r7, #16]
8017830: 6878 ldr r0, [r7, #4]
8017832: f7ff feeb bl 801760c <tcp_output_fill_options>
pcb->ts_lastacksent = pcb->rcv_nxt;
#endif
LWIP_DEBUGF(TCP_OUTPUT_DEBUG,
("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt));
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
8017836: 687a ldr r2, [r7, #4]
8017838: 687b ldr r3, [r7, #4]
801783a: 3304 adds r3, #4
801783c: 6939 ldr r1, [r7, #16]
801783e: 6878 ldr r0, [r7, #4]
8017840: f7ff ff24 bl 801768c <tcp_output_control_segment>
8017844: 4603 mov r3, r0
8017846: 73fb strb r3, [r7, #15]
if (err != ERR_OK) {
8017848: f997 300f ldrsb.w r3, [r7, #15]
801784c: 2b00 cmp r3, #0
801784e: d007 beq.n 8017860 <tcp_send_empty_ack+0x9c>
/* let tcp_fasttmr retry sending this ACK */
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8017850: 687b ldr r3, [r7, #4]
8017852: 8b5b ldrh r3, [r3, #26]
8017854: f043 0303 orr.w r3, r3, #3
8017858: b29a uxth r2, r3
801785a: 687b ldr r3, [r7, #4]
801785c: 835a strh r2, [r3, #26]
801785e: e006 b.n 801786e <tcp_send_empty_ack+0xaa>
} else {
/* remove ACK flags from the PCB, as we sent an empty ACK now */
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8017860: 687b ldr r3, [r7, #4]
8017862: 8b5b ldrh r3, [r3, #26]
8017864: f023 0303 bic.w r3, r3, #3
8017868: b29a uxth r2, r3
801786a: 687b ldr r3, [r7, #4]
801786c: 835a strh r2, [r3, #26]
}
return err;
801786e: f997 300f ldrsb.w r3, [r7, #15]
}
8017872: 4618 mov r0, r3
8017874: 371c adds r7, #28
8017876: 46bd mov sp, r7
8017878: bd90 pop {r4, r7, pc}
801787a: bf00 nop
801787c: 0801f770 .word 0x0801f770
8017880: 0801ff2c .word 0x0801ff2c
8017884: 0801f7c4 .word 0x0801f7c4
08017888 <tcp_keepalive>:
*
* @param pcb the tcp_pcb for which to send a keepalive packet
*/
err_t
tcp_keepalive(struct tcp_pcb *pcb)
{
8017888: b590 push {r4, r7, lr}
801788a: b087 sub sp, #28
801788c: af00 add r7, sp, #0
801788e: 6078 str r0, [r7, #4]
err_t err;
struct pbuf *p;
u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
8017890: 2300 movs r3, #0
8017892: 75fb strb r3, [r7, #23]
LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
8017894: 687b ldr r3, [r7, #4]
8017896: 2b00 cmp r3, #0
8017898: d106 bne.n 80178a8 <tcp_keepalive+0x20>
801789a: 4b18 ldr r3, [pc, #96] ; (80178fc <tcp_keepalive+0x74>)
801789c: f640 0224 movw r2, #2084 ; 0x824
80178a0: 4917 ldr r1, [pc, #92] ; (8017900 <tcp_keepalive+0x78>)
80178a2: 4818 ldr r0, [pc, #96] ; (8017904 <tcp_keepalive+0x7c>)
80178a4: f005 fa28 bl 801ccf8 <iprintf>
LWIP_DEBUGF(TCP_DEBUG, ("\n"));
LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent));
p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt - 1));
80178a8: 7dfb ldrb r3, [r7, #23]
80178aa: b29c uxth r4, r3
80178ac: 687b ldr r3, [r7, #4]
80178ae: 6d1b ldr r3, [r3, #80] ; 0x50
80178b0: 3b01 subs r3, #1
80178b2: 4618 mov r0, r3
80178b4: f7f9 f951 bl 8010b5a <lwip_htonl>
80178b8: 4603 mov r3, r0
80178ba: 2200 movs r2, #0
80178bc: 4621 mov r1, r4
80178be: 6878 ldr r0, [r7, #4]
80178c0: f7ff fe66 bl 8017590 <tcp_output_alloc_header>
80178c4: 6138 str r0, [r7, #16]
if (p == NULL) {
80178c6: 693b ldr r3, [r7, #16]
80178c8: 2b00 cmp r3, #0
80178ca: d102 bne.n 80178d2 <tcp_keepalive+0x4a>
LWIP_DEBUGF(TCP_DEBUG,
("tcp_keepalive: could not allocate memory for pbuf\n"));
return ERR_MEM;
80178cc: f04f 33ff mov.w r3, #4294967295
80178d0: e010 b.n 80178f4 <tcp_keepalive+0x6c>
}
tcp_output_fill_options(pcb, p, 0, optlen);
80178d2: 7dfb ldrb r3, [r7, #23]
80178d4: 2200 movs r2, #0
80178d6: 6939 ldr r1, [r7, #16]
80178d8: 6878 ldr r0, [r7, #4]
80178da: f7ff fe97 bl 801760c <tcp_output_fill_options>
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
80178de: 687a ldr r2, [r7, #4]
80178e0: 687b ldr r3, [r7, #4]
80178e2: 3304 adds r3, #4
80178e4: 6939 ldr r1, [r7, #16]
80178e6: 6878 ldr r0, [r7, #4]
80178e8: f7ff fed0 bl 801768c <tcp_output_control_segment>
80178ec: 4603 mov r3, r0
80178ee: 73fb strb r3, [r7, #15]
LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F" err %d.\n",
pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err));
return err;
80178f0: f997 300f ldrsb.w r3, [r7, #15]
}
80178f4: 4618 mov r0, r3
80178f6: 371c adds r7, #28
80178f8: 46bd mov sp, r7
80178fa: bd90 pop {r4, r7, pc}
80178fc: 0801f770 .word 0x0801f770
8017900: 0801ff4c .word 0x0801ff4c
8017904: 0801f7c4 .word 0x0801f7c4
08017908 <tcp_zero_window_probe>:
*
* @param pcb the tcp_pcb for which to send a zero-window probe packet
*/
err_t
tcp_zero_window_probe(struct tcp_pcb *pcb)
{
8017908: b590 push {r4, r7, lr}
801790a: b08b sub sp, #44 ; 0x2c
801790c: af00 add r7, sp, #0
801790e: 6078 str r0, [r7, #4]
struct tcp_hdr *tcphdr;
struct tcp_seg *seg;
u16_t len;
u8_t is_fin;
u32_t snd_nxt;
u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
8017910: 2300 movs r3, #0
8017912: f887 3027 strb.w r3, [r7, #39] ; 0x27
LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
8017916: 687b ldr r3, [r7, #4]
8017918: 2b00 cmp r3, #0
801791a: d106 bne.n 801792a <tcp_zero_window_probe+0x22>
801791c: 4b4c ldr r3, [pc, #304] ; (8017a50 <tcp_zero_window_probe+0x148>)
801791e: f640 024f movw r2, #2127 ; 0x84f
8017922: 494c ldr r1, [pc, #304] ; (8017a54 <tcp_zero_window_probe+0x14c>)
8017924: 484c ldr r0, [pc, #304] ; (8017a58 <tcp_zero_window_probe+0x150>)
8017926: f005 f9e7 bl 801ccf8 <iprintf>
("tcp_zero_window_probe: tcp_ticks %"U32_F
" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent));
/* Only consider unsent, persist timer should be off when there is data in-flight */
seg = pcb->unsent;
801792a: 687b ldr r3, [r7, #4]
801792c: 6edb ldr r3, [r3, #108] ; 0x6c
801792e: 623b str r3, [r7, #32]
if (seg == NULL) {
8017930: 6a3b ldr r3, [r7, #32]
8017932: 2b00 cmp r3, #0
8017934: d101 bne.n 801793a <tcp_zero_window_probe+0x32>
/* Not expected, persist timer should be off when the send buffer is empty */
return ERR_OK;
8017936: 2300 movs r3, #0
8017938: e086 b.n 8017a48 <tcp_zero_window_probe+0x140>
/* increment probe count. NOTE: we record probe even if it fails
to actually transmit due to an error. This ensures memory exhaustion/
routing problem doesn't leave a zero-window pcb as an indefinite zombie.
RTO mechanism has similar behavior, see pcb->nrtx */
if (pcb->persist_probe < 0xFF) {
801793a: 687b ldr r3, [r7, #4]
801793c: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
8017940: 2bff cmp r3, #255 ; 0xff
8017942: d007 beq.n 8017954 <tcp_zero_window_probe+0x4c>
++pcb->persist_probe;
8017944: 687b ldr r3, [r7, #4]
8017946: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
801794a: 3301 adds r3, #1
801794c: b2da uxtb r2, r3
801794e: 687b ldr r3, [r7, #4]
8017950: f883 209a strb.w r2, [r3, #154] ; 0x9a
}
is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
8017954: 6a3b ldr r3, [r7, #32]
8017956: 68db ldr r3, [r3, #12]
8017958: 899b ldrh r3, [r3, #12]
801795a: b29b uxth r3, r3
801795c: 4618 mov r0, r3
801795e: f7f9 f8e7 bl 8010b30 <lwip_htons>
8017962: 4603 mov r3, r0
8017964: b2db uxtb r3, r3
8017966: f003 0301 and.w r3, r3, #1
801796a: 2b00 cmp r3, #0
801796c: d005 beq.n 801797a <tcp_zero_window_probe+0x72>
801796e: 6a3b ldr r3, [r7, #32]
8017970: 891b ldrh r3, [r3, #8]
8017972: 2b00 cmp r3, #0
8017974: d101 bne.n 801797a <tcp_zero_window_probe+0x72>
8017976: 2301 movs r3, #1
8017978: e000 b.n 801797c <tcp_zero_window_probe+0x74>
801797a: 2300 movs r3, #0
801797c: 77fb strb r3, [r7, #31]
/* we want to send one seqno: either FIN or data (no options) */
len = is_fin ? 0 : 1;
801797e: 7ffb ldrb r3, [r7, #31]
8017980: 2b00 cmp r3, #0
8017982: bf0c ite eq
8017984: 2301 moveq r3, #1
8017986: 2300 movne r3, #0
8017988: b2db uxtb r3, r3
801798a: 83bb strh r3, [r7, #28]
p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno);
801798c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8017990: b299 uxth r1, r3
8017992: 6a3b ldr r3, [r7, #32]
8017994: 68db ldr r3, [r3, #12]
8017996: 685b ldr r3, [r3, #4]
8017998: 8bba ldrh r2, [r7, #28]
801799a: 6878 ldr r0, [r7, #4]
801799c: f7ff fdf8 bl 8017590 <tcp_output_alloc_header>
80179a0: 61b8 str r0, [r7, #24]
if (p == NULL) {
80179a2: 69bb ldr r3, [r7, #24]
80179a4: 2b00 cmp r3, #0
80179a6: d102 bne.n 80179ae <tcp_zero_window_probe+0xa6>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n"));
return ERR_MEM;
80179a8: f04f 33ff mov.w r3, #4294967295
80179ac: e04c b.n 8017a48 <tcp_zero_window_probe+0x140>
}
tcphdr = (struct tcp_hdr *)p->payload;
80179ae: 69bb ldr r3, [r7, #24]
80179b0: 685b ldr r3, [r3, #4]
80179b2: 617b str r3, [r7, #20]
if (is_fin) {
80179b4: 7ffb ldrb r3, [r7, #31]
80179b6: 2b00 cmp r3, #0
80179b8: d011 beq.n 80179de <tcp_zero_window_probe+0xd6>
/* FIN segment, no data */
TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
80179ba: 697b ldr r3, [r7, #20]
80179bc: 899b ldrh r3, [r3, #12]
80179be: b29b uxth r3, r3
80179c0: b21b sxth r3, r3
80179c2: f423 537c bic.w r3, r3, #16128 ; 0x3f00
80179c6: b21c sxth r4, r3
80179c8: 2011 movs r0, #17
80179ca: f7f9 f8b1 bl 8010b30 <lwip_htons>
80179ce: 4603 mov r3, r0
80179d0: b21b sxth r3, r3
80179d2: 4323 orrs r3, r4
80179d4: b21b sxth r3, r3
80179d6: b29a uxth r2, r3
80179d8: 697b ldr r3, [r7, #20]
80179da: 819a strh r2, [r3, #12]
80179dc: e010 b.n 8017a00 <tcp_zero_window_probe+0xf8>
} else {
/* Data segment, copy in one byte from the head of the unacked queue */
char *d = ((char *)p->payload + TCP_HLEN);
80179de: 69bb ldr r3, [r7, #24]
80179e0: 685b ldr r3, [r3, #4]
80179e2: 3314 adds r3, #20
80179e4: 613b str r3, [r7, #16]
/* Depending on whether the segment has already been sent (unacked) or not
(unsent), seg->p->payload points to the IP header or TCP header.
Ensure we copy the first TCP data byte: */
pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len);
80179e6: 6a3b ldr r3, [r7, #32]
80179e8: 6858 ldr r0, [r3, #4]
80179ea: 6a3b ldr r3, [r7, #32]
80179ec: 685b ldr r3, [r3, #4]
80179ee: 891a ldrh r2, [r3, #8]
80179f0: 6a3b ldr r3, [r7, #32]
80179f2: 891b ldrh r3, [r3, #8]
80179f4: 1ad3 subs r3, r2, r3
80179f6: b29b uxth r3, r3
80179f8: 2201 movs r2, #1
80179fa: 6939 ldr r1, [r7, #16]
80179fc: f7fa fe52 bl 80126a4 <pbuf_copy_partial>
}
/* The byte may be acknowledged without the window being opened. */
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1;
8017a00: 6a3b ldr r3, [r7, #32]
8017a02: 68db ldr r3, [r3, #12]
8017a04: 685b ldr r3, [r3, #4]
8017a06: 4618 mov r0, r3
8017a08: f7f9 f8a7 bl 8010b5a <lwip_htonl>
8017a0c: 4603 mov r3, r0
8017a0e: 3301 adds r3, #1
8017a10: 60fb str r3, [r7, #12]
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
8017a12: 687b ldr r3, [r7, #4]
8017a14: 6d1a ldr r2, [r3, #80] ; 0x50
8017a16: 68fb ldr r3, [r7, #12]
8017a18: 1ad3 subs r3, r2, r3
8017a1a: 2b00 cmp r3, #0
8017a1c: da02 bge.n 8017a24 <tcp_zero_window_probe+0x11c>
pcb->snd_nxt = snd_nxt;
8017a1e: 687b ldr r3, [r7, #4]
8017a20: 68fa ldr r2, [r7, #12]
8017a22: 651a str r2, [r3, #80] ; 0x50
}
tcp_output_fill_options(pcb, p, 0, optlen);
8017a24: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8017a28: 2200 movs r2, #0
8017a2a: 69b9 ldr r1, [r7, #24]
8017a2c: 6878 ldr r0, [r7, #4]
8017a2e: f7ff fded bl 801760c <tcp_output_fill_options>
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
8017a32: 687a ldr r2, [r7, #4]
8017a34: 687b ldr r3, [r7, #4]
8017a36: 3304 adds r3, #4
8017a38: 69b9 ldr r1, [r7, #24]
8017a3a: 6878 ldr r0, [r7, #4]
8017a3c: f7ff fe26 bl 801768c <tcp_output_control_segment>
8017a40: 4603 mov r3, r0
8017a42: 72fb strb r3, [r7, #11]
LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F
" ackno %"U32_F" err %d.\n",
pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err));
return err;
8017a44: f997 300b ldrsb.w r3, [r7, #11]
}
8017a48: 4618 mov r0, r3
8017a4a: 372c adds r7, #44 ; 0x2c
8017a4c: 46bd mov sp, r7
8017a4e: bd90 pop {r4, r7, pc}
8017a50: 0801f770 .word 0x0801f770
8017a54: 0801ff68 .word 0x0801ff68
8017a58: 0801f7c4 .word 0x0801f7c4
08017a5c <tcpip_tcp_timer>:
*
* @param arg unused argument
*/
static void
tcpip_tcp_timer(void *arg)
{
8017a5c: b580 push {r7, lr}
8017a5e: b082 sub sp, #8
8017a60: af00 add r7, sp, #0
8017a62: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(arg);
/* call TCP timer handler */
tcp_tmr();
8017a64: f7fa ff0c bl 8012880 <tcp_tmr>
/* timer still needed? */
if (tcp_active_pcbs || tcp_tw_pcbs) {
8017a68: 4b0a ldr r3, [pc, #40] ; (8017a94 <tcpip_tcp_timer+0x38>)
8017a6a: 681b ldr r3, [r3, #0]
8017a6c: 2b00 cmp r3, #0
8017a6e: d103 bne.n 8017a78 <tcpip_tcp_timer+0x1c>
8017a70: 4b09 ldr r3, [pc, #36] ; (8017a98 <tcpip_tcp_timer+0x3c>)
8017a72: 681b ldr r3, [r3, #0]
8017a74: 2b00 cmp r3, #0
8017a76: d005 beq.n 8017a84 <tcpip_tcp_timer+0x28>
/* restart timer */
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
8017a78: 2200 movs r2, #0
8017a7a: 4908 ldr r1, [pc, #32] ; (8017a9c <tcpip_tcp_timer+0x40>)
8017a7c: 20fa movs r0, #250 ; 0xfa
8017a7e: f000 f8f1 bl 8017c64 <sys_timeout>
8017a82: e002 b.n 8017a8a <tcpip_tcp_timer+0x2e>
} else {
/* disable timer */
tcpip_tcp_timer_active = 0;
8017a84: 4b06 ldr r3, [pc, #24] ; (8017aa0 <tcpip_tcp_timer+0x44>)
8017a86: 2200 movs r2, #0
8017a88: 601a str r2, [r3, #0]
}
}
8017a8a: bf00 nop
8017a8c: 3708 adds r7, #8
8017a8e: 46bd mov sp, r7
8017a90: bd80 pop {r7, pc}
8017a92: bf00 nop
8017a94: 2000f7fc .word 0x2000f7fc
8017a98: 2000f80c .word 0x2000f80c
8017a9c: 08017a5d .word 0x08017a5d
8017aa0: 20008768 .word 0x20008768
08017aa4 <tcp_timer_needed>:
* the reason is to have the TCP timer only running when
* there are active (or time-wait) PCBs.
*/
void
tcp_timer_needed(void)
{
8017aa4: b580 push {r7, lr}
8017aa6: af00 add r7, sp, #0
LWIP_ASSERT_CORE_LOCKED();
/* timer is off but needed again? */
if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {
8017aa8: 4b0a ldr r3, [pc, #40] ; (8017ad4 <tcp_timer_needed+0x30>)
8017aaa: 681b ldr r3, [r3, #0]
8017aac: 2b00 cmp r3, #0
8017aae: d10f bne.n 8017ad0 <tcp_timer_needed+0x2c>
8017ab0: 4b09 ldr r3, [pc, #36] ; (8017ad8 <tcp_timer_needed+0x34>)
8017ab2: 681b ldr r3, [r3, #0]
8017ab4: 2b00 cmp r3, #0
8017ab6: d103 bne.n 8017ac0 <tcp_timer_needed+0x1c>
8017ab8: 4b08 ldr r3, [pc, #32] ; (8017adc <tcp_timer_needed+0x38>)
8017aba: 681b ldr r3, [r3, #0]
8017abc: 2b00 cmp r3, #0
8017abe: d007 beq.n 8017ad0 <tcp_timer_needed+0x2c>
/* enable and start timer */
tcpip_tcp_timer_active = 1;
8017ac0: 4b04 ldr r3, [pc, #16] ; (8017ad4 <tcp_timer_needed+0x30>)
8017ac2: 2201 movs r2, #1
8017ac4: 601a str r2, [r3, #0]
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
8017ac6: 2200 movs r2, #0
8017ac8: 4905 ldr r1, [pc, #20] ; (8017ae0 <tcp_timer_needed+0x3c>)
8017aca: 20fa movs r0, #250 ; 0xfa
8017acc: f000 f8ca bl 8017c64 <sys_timeout>
}
}
8017ad0: bf00 nop
8017ad2: bd80 pop {r7, pc}
8017ad4: 20008768 .word 0x20008768
8017ad8: 2000f7fc .word 0x2000f7fc
8017adc: 2000f80c .word 0x2000f80c
8017ae0: 08017a5d .word 0x08017a5d
08017ae4 <sys_timeout_abs>:
#if LWIP_DEBUG_TIMERNAMES
sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg, const char *handler_name)
#else /* LWIP_DEBUG_TIMERNAMES */
sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg)
#endif
{
8017ae4: b580 push {r7, lr}
8017ae6: b086 sub sp, #24
8017ae8: af00 add r7, sp, #0
8017aea: 60f8 str r0, [r7, #12]
8017aec: 60b9 str r1, [r7, #8]
8017aee: 607a str r2, [r7, #4]
struct sys_timeo *timeout, *t;
timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT);
8017af0: 200a movs r0, #10
8017af2: f7f9 fcd3 bl 801149c <memp_malloc>
8017af6: 6138 str r0, [r7, #16]
if (timeout == NULL) {
8017af8: 693b ldr r3, [r7, #16]
8017afa: 2b00 cmp r3, #0
8017afc: d109 bne.n 8017b12 <sys_timeout_abs+0x2e>
LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
8017afe: 693b ldr r3, [r7, #16]
8017b00: 2b00 cmp r3, #0
8017b02: d151 bne.n 8017ba8 <sys_timeout_abs+0xc4>
8017b04: 4b2a ldr r3, [pc, #168] ; (8017bb0 <sys_timeout_abs+0xcc>)
8017b06: 22be movs r2, #190 ; 0xbe
8017b08: 492a ldr r1, [pc, #168] ; (8017bb4 <sys_timeout_abs+0xd0>)
8017b0a: 482b ldr r0, [pc, #172] ; (8017bb8 <sys_timeout_abs+0xd4>)
8017b0c: f005 f8f4 bl 801ccf8 <iprintf>
return;
8017b10: e04a b.n 8017ba8 <sys_timeout_abs+0xc4>
}
timeout->next = NULL;
8017b12: 693b ldr r3, [r7, #16]
8017b14: 2200 movs r2, #0
8017b16: 601a str r2, [r3, #0]
timeout->h = handler;
8017b18: 693b ldr r3, [r7, #16]
8017b1a: 68ba ldr r2, [r7, #8]
8017b1c: 609a str r2, [r3, #8]
timeout->arg = arg;
8017b1e: 693b ldr r3, [r7, #16]
8017b20: 687a ldr r2, [r7, #4]
8017b22: 60da str r2, [r3, #12]
timeout->time = abs_time;
8017b24: 693b ldr r3, [r7, #16]
8017b26: 68fa ldr r2, [r7, #12]
8017b28: 605a str r2, [r3, #4]
timeout->handler_name = handler_name;
LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p abs_time=%"U32_F" handler=%s arg=%p\n",
(void *)timeout, abs_time, handler_name, (void *)arg));
#endif /* LWIP_DEBUG_TIMERNAMES */
if (next_timeout == NULL) {
8017b2a: 4b24 ldr r3, [pc, #144] ; (8017bbc <sys_timeout_abs+0xd8>)
8017b2c: 681b ldr r3, [r3, #0]
8017b2e: 2b00 cmp r3, #0
8017b30: d103 bne.n 8017b3a <sys_timeout_abs+0x56>
next_timeout = timeout;
8017b32: 4a22 ldr r2, [pc, #136] ; (8017bbc <sys_timeout_abs+0xd8>)
8017b34: 693b ldr r3, [r7, #16]
8017b36: 6013 str r3, [r2, #0]
return;
8017b38: e037 b.n 8017baa <sys_timeout_abs+0xc6>
}
if (TIME_LESS_THAN(timeout->time, next_timeout->time)) {
8017b3a: 693b ldr r3, [r7, #16]
8017b3c: 685a ldr r2, [r3, #4]
8017b3e: 4b1f ldr r3, [pc, #124] ; (8017bbc <sys_timeout_abs+0xd8>)
8017b40: 681b ldr r3, [r3, #0]
8017b42: 685b ldr r3, [r3, #4]
8017b44: 1ad3 subs r3, r2, r3
8017b46: 0fdb lsrs r3, r3, #31
8017b48: f003 0301 and.w r3, r3, #1
8017b4c: b2db uxtb r3, r3
8017b4e: 2b00 cmp r3, #0
8017b50: d007 beq.n 8017b62 <sys_timeout_abs+0x7e>
timeout->next = next_timeout;
8017b52: 4b1a ldr r3, [pc, #104] ; (8017bbc <sys_timeout_abs+0xd8>)
8017b54: 681a ldr r2, [r3, #0]
8017b56: 693b ldr r3, [r7, #16]
8017b58: 601a str r2, [r3, #0]
next_timeout = timeout;
8017b5a: 4a18 ldr r2, [pc, #96] ; (8017bbc <sys_timeout_abs+0xd8>)
8017b5c: 693b ldr r3, [r7, #16]
8017b5e: 6013 str r3, [r2, #0]
8017b60: e023 b.n 8017baa <sys_timeout_abs+0xc6>
} else {
for (t = next_timeout; t != NULL; t = t->next) {
8017b62: 4b16 ldr r3, [pc, #88] ; (8017bbc <sys_timeout_abs+0xd8>)
8017b64: 681b ldr r3, [r3, #0]
8017b66: 617b str r3, [r7, #20]
8017b68: e01a b.n 8017ba0 <sys_timeout_abs+0xbc>
if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) {
8017b6a: 697b ldr r3, [r7, #20]
8017b6c: 681b ldr r3, [r3, #0]
8017b6e: 2b00 cmp r3, #0
8017b70: d00b beq.n 8017b8a <sys_timeout_abs+0xa6>
8017b72: 693b ldr r3, [r7, #16]
8017b74: 685a ldr r2, [r3, #4]
8017b76: 697b ldr r3, [r7, #20]
8017b78: 681b ldr r3, [r3, #0]
8017b7a: 685b ldr r3, [r3, #4]
8017b7c: 1ad3 subs r3, r2, r3
8017b7e: 0fdb lsrs r3, r3, #31
8017b80: f003 0301 and.w r3, r3, #1
8017b84: b2db uxtb r3, r3
8017b86: 2b00 cmp r3, #0
8017b88: d007 beq.n 8017b9a <sys_timeout_abs+0xb6>
timeout->next = t->next;
8017b8a: 697b ldr r3, [r7, #20]
8017b8c: 681a ldr r2, [r3, #0]
8017b8e: 693b ldr r3, [r7, #16]
8017b90: 601a str r2, [r3, #0]
t->next = timeout;
8017b92: 697b ldr r3, [r7, #20]
8017b94: 693a ldr r2, [r7, #16]
8017b96: 601a str r2, [r3, #0]
break;
8017b98: e007 b.n 8017baa <sys_timeout_abs+0xc6>
for (t = next_timeout; t != NULL; t = t->next) {
8017b9a: 697b ldr r3, [r7, #20]
8017b9c: 681b ldr r3, [r3, #0]
8017b9e: 617b str r3, [r7, #20]
8017ba0: 697b ldr r3, [r7, #20]
8017ba2: 2b00 cmp r3, #0
8017ba4: d1e1 bne.n 8017b6a <sys_timeout_abs+0x86>
8017ba6: e000 b.n 8017baa <sys_timeout_abs+0xc6>
return;
8017ba8: bf00 nop
}
}
}
}
8017baa: 3718 adds r7, #24
8017bac: 46bd mov sp, r7
8017bae: bd80 pop {r7, pc}
8017bb0: 0801ff8c .word 0x0801ff8c
8017bb4: 0801ffc0 .word 0x0801ffc0
8017bb8: 08020000 .word 0x08020000
8017bbc: 20008760 .word 0x20008760
08017bc0 <lwip_cyclic_timer>:
#if !LWIP_TESTMODE
static
#endif
void
lwip_cyclic_timer(void *arg)
{
8017bc0: b580 push {r7, lr}
8017bc2: b086 sub sp, #24
8017bc4: af00 add r7, sp, #0
8017bc6: 6078 str r0, [r7, #4]
u32_t now;
u32_t next_timeout_time;
const struct lwip_cyclic_timer *cyclic = (const struct lwip_cyclic_timer *)arg;
8017bc8: 687b ldr r3, [r7, #4]
8017bca: 617b str r3, [r7, #20]
#if LWIP_DEBUG_TIMERNAMES
LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name));
#endif
cyclic->handler();
8017bcc: 697b ldr r3, [r7, #20]
8017bce: 685b ldr r3, [r3, #4]
8017bd0: 4798 blx r3
now = sys_now();
8017bd2: f7f5 fc59 bl 800d488 <sys_now>
8017bd6: 6138 str r0, [r7, #16]
next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
8017bd8: 697b ldr r3, [r7, #20]
8017bda: 681a ldr r2, [r3, #0]
8017bdc: 4b0f ldr r3, [pc, #60] ; (8017c1c <lwip_cyclic_timer+0x5c>)
8017bde: 681b ldr r3, [r3, #0]
8017be0: 4413 add r3, r2
8017be2: 60fb str r3, [r7, #12]
if (TIME_LESS_THAN(next_timeout_time, now)) {
8017be4: 68fa ldr r2, [r7, #12]
8017be6: 693b ldr r3, [r7, #16]
8017be8: 1ad3 subs r3, r2, r3
8017bea: 0fdb lsrs r3, r3, #31
8017bec: f003 0301 and.w r3, r3, #1
8017bf0: b2db uxtb r3, r3
8017bf2: 2b00 cmp r3, #0
8017bf4: d009 beq.n 8017c0a <lwip_cyclic_timer+0x4a>
/* timer would immediately expire again -> "overload" -> restart without any correction */
#if LWIP_DEBUG_TIMERNAMES
sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg, cyclic->handler_name);
#else
sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg);
8017bf6: 697b ldr r3, [r7, #20]
8017bf8: 681a ldr r2, [r3, #0]
8017bfa: 693b ldr r3, [r7, #16]
8017bfc: 4413 add r3, r2
8017bfe: 687a ldr r2, [r7, #4]
8017c00: 4907 ldr r1, [pc, #28] ; (8017c20 <lwip_cyclic_timer+0x60>)
8017c02: 4618 mov r0, r3
8017c04: f7ff ff6e bl 8017ae4 <sys_timeout_abs>
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg, cyclic->handler_name);
#else
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
#endif
}
}
8017c08: e004 b.n 8017c14 <lwip_cyclic_timer+0x54>
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
8017c0a: 687a ldr r2, [r7, #4]
8017c0c: 4904 ldr r1, [pc, #16] ; (8017c20 <lwip_cyclic_timer+0x60>)
8017c0e: 68f8 ldr r0, [r7, #12]
8017c10: f7ff ff68 bl 8017ae4 <sys_timeout_abs>
}
8017c14: bf00 nop
8017c16: 3718 adds r7, #24
8017c18: 46bd mov sp, r7
8017c1a: bd80 pop {r7, pc}
8017c1c: 20008764 .word 0x20008764
8017c20: 08017bc1 .word 0x08017bc1
08017c24 <sys_timeouts_init>:
/** Initialize this module */
void sys_timeouts_init(void)
{
8017c24: b580 push {r7, lr}
8017c26: b082 sub sp, #8
8017c28: af00 add r7, sp, #0
size_t i;
/* tcp_tmr() at index 0 is started on demand */
for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
8017c2a: 2301 movs r3, #1
8017c2c: 607b str r3, [r7, #4]
8017c2e: e00e b.n 8017c4e <sys_timeouts_init+0x2a>
/* we have to cast via size_t to get rid of const warning
(this is OK as cyclic_timer() casts back to const* */
sys_timeout(lwip_cyclic_timers[i].interval_ms, lwip_cyclic_timer, LWIP_CONST_CAST(void *, &lwip_cyclic_timers[i]));
8017c30: 4a0a ldr r2, [pc, #40] ; (8017c5c <sys_timeouts_init+0x38>)
8017c32: 687b ldr r3, [r7, #4]
8017c34: f852 0033 ldr.w r0, [r2, r3, lsl #3]
8017c38: 687b ldr r3, [r7, #4]
8017c3a: 00db lsls r3, r3, #3
8017c3c: 4a07 ldr r2, [pc, #28] ; (8017c5c <sys_timeouts_init+0x38>)
8017c3e: 4413 add r3, r2
8017c40: 461a mov r2, r3
8017c42: 4907 ldr r1, [pc, #28] ; (8017c60 <sys_timeouts_init+0x3c>)
8017c44: f000 f80e bl 8017c64 <sys_timeout>
for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
8017c48: 687b ldr r3, [r7, #4]
8017c4a: 3301 adds r3, #1
8017c4c: 607b str r3, [r7, #4]
8017c4e: 687b ldr r3, [r7, #4]
8017c50: 2b04 cmp r3, #4
8017c52: d9ed bls.n 8017c30 <sys_timeouts_init+0xc>
}
}
8017c54: bf00 nop
8017c56: 3708 adds r7, #8
8017c58: 46bd mov sp, r7
8017c5a: bd80 pop {r7, pc}
8017c5c: 08022e80 .word 0x08022e80
8017c60: 08017bc1 .word 0x08017bc1
08017c64 <sys_timeout>:
sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char *handler_name)
#else /* LWIP_DEBUG_TIMERNAMES */
void
sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg)
#endif /* LWIP_DEBUG_TIMERNAMES */
{
8017c64: b580 push {r7, lr}
8017c66: b086 sub sp, #24
8017c68: af00 add r7, sp, #0
8017c6a: 60f8 str r0, [r7, #12]
8017c6c: 60b9 str r1, [r7, #8]
8017c6e: 607a str r2, [r7, #4]
u32_t next_timeout_time;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4));
8017c70: 68fb ldr r3, [r7, #12]
8017c72: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
8017c76: d306 bcc.n 8017c86 <sys_timeout+0x22>
8017c78: 4b0a ldr r3, [pc, #40] ; (8017ca4 <sys_timeout+0x40>)
8017c7a: f240 1229 movw r2, #297 ; 0x129
8017c7e: 490a ldr r1, [pc, #40] ; (8017ca8 <sys_timeout+0x44>)
8017c80: 480a ldr r0, [pc, #40] ; (8017cac <sys_timeout+0x48>)
8017c82: f005 f839 bl 801ccf8 <iprintf>
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
8017c86: f7f5 fbff bl 800d488 <sys_now>
8017c8a: 4602 mov r2, r0
8017c8c: 68fb ldr r3, [r7, #12]
8017c8e: 4413 add r3, r2
8017c90: 617b str r3, [r7, #20]
#if LWIP_DEBUG_TIMERNAMES
sys_timeout_abs(next_timeout_time, handler, arg, handler_name);
#else
sys_timeout_abs(next_timeout_time, handler, arg);
8017c92: 687a ldr r2, [r7, #4]
8017c94: 68b9 ldr r1, [r7, #8]
8017c96: 6978 ldr r0, [r7, #20]
8017c98: f7ff ff24 bl 8017ae4 <sys_timeout_abs>
#endif
}
8017c9c: bf00 nop
8017c9e: 3718 adds r7, #24
8017ca0: 46bd mov sp, r7
8017ca2: bd80 pop {r7, pc}
8017ca4: 0801ff8c .word 0x0801ff8c
8017ca8: 08020028 .word 0x08020028
8017cac: 08020000 .word 0x08020000
08017cb0 <sys_check_timeouts>:
*
* Must be called periodically from your main loop.
*/
void
sys_check_timeouts(void)
{
8017cb0: b580 push {r7, lr}
8017cb2: b084 sub sp, #16
8017cb4: af00 add r7, sp, #0
u32_t now;
LWIP_ASSERT_CORE_LOCKED();
/* Process only timers expired at the start of the function. */
now = sys_now();
8017cb6: f7f5 fbe7 bl 800d488 <sys_now>
8017cba: 60f8 str r0, [r7, #12]
sys_timeout_handler handler;
void *arg;
PBUF_CHECK_FREE_OOSEQ();
tmptimeout = next_timeout;
8017cbc: 4b17 ldr r3, [pc, #92] ; (8017d1c <sys_check_timeouts+0x6c>)
8017cbe: 681b ldr r3, [r3, #0]
8017cc0: 60bb str r3, [r7, #8]
if (tmptimeout == NULL) {
8017cc2: 68bb ldr r3, [r7, #8]
8017cc4: 2b00 cmp r3, #0
8017cc6: d022 beq.n 8017d0e <sys_check_timeouts+0x5e>
return;
}
if (TIME_LESS_THAN(now, tmptimeout->time)) {
8017cc8: 68bb ldr r3, [r7, #8]
8017cca: 685b ldr r3, [r3, #4]
8017ccc: 68fa ldr r2, [r7, #12]
8017cce: 1ad3 subs r3, r2, r3
8017cd0: 0fdb lsrs r3, r3, #31
8017cd2: f003 0301 and.w r3, r3, #1
8017cd6: b2db uxtb r3, r3
8017cd8: 2b00 cmp r3, #0
8017cda: d11a bne.n 8017d12 <sys_check_timeouts+0x62>
return;
}
/* Timeout has expired */
next_timeout = tmptimeout->next;
8017cdc: 68bb ldr r3, [r7, #8]
8017cde: 681b ldr r3, [r3, #0]
8017ce0: 4a0e ldr r2, [pc, #56] ; (8017d1c <sys_check_timeouts+0x6c>)
8017ce2: 6013 str r3, [r2, #0]
handler = tmptimeout->h;
8017ce4: 68bb ldr r3, [r7, #8]
8017ce6: 689b ldr r3, [r3, #8]
8017ce8: 607b str r3, [r7, #4]
arg = tmptimeout->arg;
8017cea: 68bb ldr r3, [r7, #8]
8017cec: 68db ldr r3, [r3, #12]
8017cee: 603b str r3, [r7, #0]
current_timeout_due_time = tmptimeout->time;
8017cf0: 68bb ldr r3, [r7, #8]
8017cf2: 685b ldr r3, [r3, #4]
8017cf4: 4a0a ldr r2, [pc, #40] ; (8017d20 <sys_check_timeouts+0x70>)
8017cf6: 6013 str r3, [r2, #0]
if (handler != NULL) {
LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s t=%"U32_F" arg=%p\n",
tmptimeout->handler_name, sys_now() - tmptimeout->time, arg));
}
#endif /* LWIP_DEBUG_TIMERNAMES */
memp_free(MEMP_SYS_TIMEOUT, tmptimeout);
8017cf8: 68b9 ldr r1, [r7, #8]
8017cfa: 200a movs r0, #10
8017cfc: f7f9 fc20 bl 8011540 <memp_free>
if (handler != NULL) {
8017d00: 687b ldr r3, [r7, #4]
8017d02: 2b00 cmp r3, #0
8017d04: d0da beq.n 8017cbc <sys_check_timeouts+0xc>
handler(arg);
8017d06: 687b ldr r3, [r7, #4]
8017d08: 6838 ldr r0, [r7, #0]
8017d0a: 4798 blx r3
do {
8017d0c: e7d6 b.n 8017cbc <sys_check_timeouts+0xc>
return;
8017d0e: bf00 nop
8017d10: e000 b.n 8017d14 <sys_check_timeouts+0x64>
return;
8017d12: bf00 nop
}
LWIP_TCPIP_THREAD_ALIVE();
/* Repeat until all expired timers have been called */
} while (1);
}
8017d14: 3710 adds r7, #16
8017d16: 46bd mov sp, r7
8017d18: bd80 pop {r7, pc}
8017d1a: bf00 nop
8017d1c: 20008760 .word 0x20008760
8017d20: 20008764 .word 0x20008764
08017d24 <sys_timeouts_sleeptime>:
/** Return the time left before the next timeout is due. If no timeouts are
* enqueued, returns 0xffffffff
*/
u32_t
sys_timeouts_sleeptime(void)
{
8017d24: b580 push {r7, lr}
8017d26: b082 sub sp, #8
8017d28: af00 add r7, sp, #0
u32_t now;
LWIP_ASSERT_CORE_LOCKED();
if (next_timeout == NULL) {
8017d2a: 4b16 ldr r3, [pc, #88] ; (8017d84 <sys_timeouts_sleeptime+0x60>)
8017d2c: 681b ldr r3, [r3, #0]
8017d2e: 2b00 cmp r3, #0
8017d30: d102 bne.n 8017d38 <sys_timeouts_sleeptime+0x14>
return SYS_TIMEOUTS_SLEEPTIME_INFINITE;
8017d32: f04f 33ff mov.w r3, #4294967295
8017d36: e020 b.n 8017d7a <sys_timeouts_sleeptime+0x56>
}
now = sys_now();
8017d38: f7f5 fba6 bl 800d488 <sys_now>
8017d3c: 6078 str r0, [r7, #4]
if (TIME_LESS_THAN(next_timeout->time, now)) {
8017d3e: 4b11 ldr r3, [pc, #68] ; (8017d84 <sys_timeouts_sleeptime+0x60>)
8017d40: 681b ldr r3, [r3, #0]
8017d42: 685a ldr r2, [r3, #4]
8017d44: 687b ldr r3, [r7, #4]
8017d46: 1ad3 subs r3, r2, r3
8017d48: 0fdb lsrs r3, r3, #31
8017d4a: f003 0301 and.w r3, r3, #1
8017d4e: b2db uxtb r3, r3
8017d50: 2b00 cmp r3, #0
8017d52: d001 beq.n 8017d58 <sys_timeouts_sleeptime+0x34>
return 0;
8017d54: 2300 movs r3, #0
8017d56: e010 b.n 8017d7a <sys_timeouts_sleeptime+0x56>
} else {
u32_t ret = (u32_t)(next_timeout->time - now);
8017d58: 4b0a ldr r3, [pc, #40] ; (8017d84 <sys_timeouts_sleeptime+0x60>)
8017d5a: 681b ldr r3, [r3, #0]
8017d5c: 685a ldr r2, [r3, #4]
8017d5e: 687b ldr r3, [r7, #4]
8017d60: 1ad3 subs r3, r2, r3
8017d62: 603b str r3, [r7, #0]
LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT);
8017d64: 683b ldr r3, [r7, #0]
8017d66: 2b00 cmp r3, #0
8017d68: da06 bge.n 8017d78 <sys_timeouts_sleeptime+0x54>
8017d6a: 4b07 ldr r3, [pc, #28] ; (8017d88 <sys_timeouts_sleeptime+0x64>)
8017d6c: f44f 72dc mov.w r2, #440 ; 0x1b8
8017d70: 4906 ldr r1, [pc, #24] ; (8017d8c <sys_timeouts_sleeptime+0x68>)
8017d72: 4807 ldr r0, [pc, #28] ; (8017d90 <sys_timeouts_sleeptime+0x6c>)
8017d74: f004 ffc0 bl 801ccf8 <iprintf>
return ret;
8017d78: 683b ldr r3, [r7, #0]
}
}
8017d7a: 4618 mov r0, r3
8017d7c: 3708 adds r7, #8
8017d7e: 46bd mov sp, r7
8017d80: bd80 pop {r7, pc}
8017d82: bf00 nop
8017d84: 20008760 .word 0x20008760
8017d88: 0801ff8c .word 0x0801ff8c
8017d8c: 08020060 .word 0x08020060
8017d90: 08020000 .word 0x08020000
08017d94 <udp_init>:
/**
* Initialize this module.
*/
void
udp_init(void)
{
8017d94: b580 push {r7, lr}
8017d96: af00 add r7, sp, #0
#ifdef LWIP_RAND
udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
8017d98: f004 ffc6 bl 801cd28 <rand>
8017d9c: 4603 mov r3, r0
8017d9e: b29b uxth r3, r3
8017da0: f3c3 030d ubfx r3, r3, #0, #14
8017da4: b29b uxth r3, r3
8017da6: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
8017daa: b29a uxth r2, r3
8017dac: 4b01 ldr r3, [pc, #4] ; (8017db4 <udp_init+0x20>)
8017dae: 801a strh r2, [r3, #0]
#endif /* LWIP_RAND */
}
8017db0: bf00 nop
8017db2: bd80 pop {r7, pc}
8017db4: 2000007c .word 0x2000007c
08017db8 <udp_new_port>:
*
* @return a new (free) local UDP port number
*/
static u16_t
udp_new_port(void)
{
8017db8: b480 push {r7}
8017dba: b083 sub sp, #12
8017dbc: af00 add r7, sp, #0
u16_t n = 0;
8017dbe: 2300 movs r3, #0
8017dc0: 80fb strh r3, [r7, #6]
struct udp_pcb *pcb;
again:
if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) {
8017dc2: 4b17 ldr r3, [pc, #92] ; (8017e20 <udp_new_port+0x68>)
8017dc4: 881b ldrh r3, [r3, #0]
8017dc6: 1c5a adds r2, r3, #1
8017dc8: b291 uxth r1, r2
8017dca: 4a15 ldr r2, [pc, #84] ; (8017e20 <udp_new_port+0x68>)
8017dcc: 8011 strh r1, [r2, #0]
8017dce: f64f 72ff movw r2, #65535 ; 0xffff
8017dd2: 4293 cmp r3, r2
8017dd4: d103 bne.n 8017dde <udp_new_port+0x26>
udp_port = UDP_LOCAL_PORT_RANGE_START;
8017dd6: 4b12 ldr r3, [pc, #72] ; (8017e20 <udp_new_port+0x68>)
8017dd8: f44f 4240 mov.w r2, #49152 ; 0xc000
8017ddc: 801a strh r2, [r3, #0]
}
/* Check all PCBs. */
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
8017dde: 4b11 ldr r3, [pc, #68] ; (8017e24 <udp_new_port+0x6c>)
8017de0: 681b ldr r3, [r3, #0]
8017de2: 603b str r3, [r7, #0]
8017de4: e011 b.n 8017e0a <udp_new_port+0x52>
if (pcb->local_port == udp_port) {
8017de6: 683b ldr r3, [r7, #0]
8017de8: 8a5a ldrh r2, [r3, #18]
8017dea: 4b0d ldr r3, [pc, #52] ; (8017e20 <udp_new_port+0x68>)
8017dec: 881b ldrh r3, [r3, #0]
8017dee: 429a cmp r2, r3
8017df0: d108 bne.n 8017e04 <udp_new_port+0x4c>
if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) {
8017df2: 88fb ldrh r3, [r7, #6]
8017df4: 3301 adds r3, #1
8017df6: 80fb strh r3, [r7, #6]
8017df8: 88fb ldrh r3, [r7, #6]
8017dfa: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
8017dfe: d3e0 bcc.n 8017dc2 <udp_new_port+0xa>
return 0;
8017e00: 2300 movs r3, #0
8017e02: e007 b.n 8017e14 <udp_new_port+0x5c>
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
8017e04: 683b ldr r3, [r7, #0]
8017e06: 68db ldr r3, [r3, #12]
8017e08: 603b str r3, [r7, #0]
8017e0a: 683b ldr r3, [r7, #0]
8017e0c: 2b00 cmp r3, #0
8017e0e: d1ea bne.n 8017de6 <udp_new_port+0x2e>
}
goto again;
}
}
return udp_port;
8017e10: 4b03 ldr r3, [pc, #12] ; (8017e20 <udp_new_port+0x68>)
8017e12: 881b ldrh r3, [r3, #0]
}
8017e14: 4618 mov r0, r3
8017e16: 370c adds r7, #12
8017e18: 46bd mov sp, r7
8017e1a: f85d 7b04 ldr.w r7, [sp], #4
8017e1e: 4770 bx lr
8017e20: 2000007c .word 0x2000007c
8017e24: 2000f814 .word 0x2000f814
08017e28 <udp_input_local_match>:
* @param broadcast 1 if his is an IPv4 broadcast (global or subnet-only), 0 otherwise (only used for IPv4)
* @return 1 on match, 0 otherwise
*/
static u8_t
udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast)
{
8017e28: b580 push {r7, lr}
8017e2a: b084 sub sp, #16
8017e2c: af00 add r7, sp, #0
8017e2e: 60f8 str r0, [r7, #12]
8017e30: 60b9 str r1, [r7, #8]
8017e32: 4613 mov r3, r2
8017e34: 71fb strb r3, [r7, #7]
LWIP_UNUSED_ARG(inp); /* in IPv6 only case */
LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */
LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL);
8017e36: 68fb ldr r3, [r7, #12]
8017e38: 2b00 cmp r3, #0
8017e3a: d105 bne.n 8017e48 <udp_input_local_match+0x20>
8017e3c: 4b27 ldr r3, [pc, #156] ; (8017edc <udp_input_local_match+0xb4>)
8017e3e: 2287 movs r2, #135 ; 0x87
8017e40: 4927 ldr r1, [pc, #156] ; (8017ee0 <udp_input_local_match+0xb8>)
8017e42: 4828 ldr r0, [pc, #160] ; (8017ee4 <udp_input_local_match+0xbc>)
8017e44: f004 ff58 bl 801ccf8 <iprintf>
LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
8017e48: 68bb ldr r3, [r7, #8]
8017e4a: 2b00 cmp r3, #0
8017e4c: d105 bne.n 8017e5a <udp_input_local_match+0x32>
8017e4e: 4b23 ldr r3, [pc, #140] ; (8017edc <udp_input_local_match+0xb4>)
8017e50: 2288 movs r2, #136 ; 0x88
8017e52: 4925 ldr r1, [pc, #148] ; (8017ee8 <udp_input_local_match+0xc0>)
8017e54: 4823 ldr r0, [pc, #140] ; (8017ee4 <udp_input_local_match+0xbc>)
8017e56: f004 ff4f bl 801ccf8 <iprintf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8017e5a: 68fb ldr r3, [r7, #12]
8017e5c: 7a1b ldrb r3, [r3, #8]
8017e5e: 2b00 cmp r3, #0
8017e60: d00b beq.n 8017e7a <udp_input_local_match+0x52>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
8017e62: 68fb ldr r3, [r7, #12]
8017e64: 7a1a ldrb r2, [r3, #8]
8017e66: 4b21 ldr r3, [pc, #132] ; (8017eec <udp_input_local_match+0xc4>)
8017e68: 685b ldr r3, [r3, #4]
8017e6a: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8017e6e: 3301 adds r3, #1
8017e70: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8017e72: 429a cmp r2, r3
8017e74: d001 beq.n 8017e7a <udp_input_local_match+0x52>
return 0;
8017e76: 2300 movs r3, #0
8017e78: e02b b.n 8017ed2 <udp_input_local_match+0xaa>
/* Only need to check PCB if incoming IP version matches PCB IP version */
if (IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ip_current_dest_addr())) {
#if LWIP_IPV4
/* Special case: IPv4 broadcast: all or broadcasts in my subnet
* Note: broadcast variable can only be 1 if it is an IPv4 broadcast */
if (broadcast != 0) {
8017e7a: 79fb ldrb r3, [r7, #7]
8017e7c: 2b00 cmp r3, #0
8017e7e: d018 beq.n 8017eb2 <udp_input_local_match+0x8a>
#if IP_SOF_BROADCAST_RECV
if (ip_get_option(pcb, SOF_BROADCAST))
#endif /* IP_SOF_BROADCAST_RECV */
{
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
8017e80: 68fb ldr r3, [r7, #12]
8017e82: 2b00 cmp r3, #0
8017e84: d013 beq.n 8017eae <udp_input_local_match+0x86>
8017e86: 68fb ldr r3, [r7, #12]
8017e88: 681b ldr r3, [r3, #0]
8017e8a: 2b00 cmp r3, #0
8017e8c: d00f beq.n 8017eae <udp_input_local_match+0x86>
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
8017e8e: 4b17 ldr r3, [pc, #92] ; (8017eec <udp_input_local_match+0xc4>)
8017e90: 695b ldr r3, [r3, #20]
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
8017e92: f1b3 3fff cmp.w r3, #4294967295
8017e96: d00a beq.n 8017eae <udp_input_local_match+0x86>
ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) {
8017e98: 68fb ldr r3, [r7, #12]
8017e9a: 681a ldr r2, [r3, #0]
8017e9c: 4b13 ldr r3, [pc, #76] ; (8017eec <udp_input_local_match+0xc4>)
8017e9e: 695b ldr r3, [r3, #20]
8017ea0: 405a eors r2, r3
8017ea2: 68bb ldr r3, [r7, #8]
8017ea4: 3308 adds r3, #8
8017ea6: 681b ldr r3, [r3, #0]
8017ea8: 4013 ands r3, r2
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
8017eaa: 2b00 cmp r3, #0
8017eac: d110 bne.n 8017ed0 <udp_input_local_match+0xa8>
return 1;
8017eae: 2301 movs r3, #1
8017eb0: e00f b.n 8017ed2 <udp_input_local_match+0xaa>
}
}
} else
#endif /* LWIP_IPV4 */
/* Handle IPv4 and IPv6: all or exact match */
if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
8017eb2: 68fb ldr r3, [r7, #12]
8017eb4: 2b00 cmp r3, #0
8017eb6: d009 beq.n 8017ecc <udp_input_local_match+0xa4>
8017eb8: 68fb ldr r3, [r7, #12]
8017eba: 681b ldr r3, [r3, #0]
8017ebc: 2b00 cmp r3, #0
8017ebe: d005 beq.n 8017ecc <udp_input_local_match+0xa4>
8017ec0: 68fb ldr r3, [r7, #12]
8017ec2: 681a ldr r2, [r3, #0]
8017ec4: 4b09 ldr r3, [pc, #36] ; (8017eec <udp_input_local_match+0xc4>)
8017ec6: 695b ldr r3, [r3, #20]
8017ec8: 429a cmp r2, r3
8017eca: d101 bne.n 8017ed0 <udp_input_local_match+0xa8>
return 1;
8017ecc: 2301 movs r3, #1
8017ece: e000 b.n 8017ed2 <udp_input_local_match+0xaa>
}
}
return 0;
8017ed0: 2300 movs r3, #0
}
8017ed2: 4618 mov r0, r3
8017ed4: 3710 adds r7, #16
8017ed6: 46bd mov sp, r7
8017ed8: bd80 pop {r7, pc}
8017eda: bf00 nop
8017edc: 08020074 .word 0x08020074
8017ee0: 080200a4 .word 0x080200a4
8017ee4: 080200c8 .word 0x080200c8
8017ee8: 080200f0 .word 0x080200f0
8017eec: 2000c0c8 .word 0x2000c0c8
08017ef0 <udp_input>:
* @param inp network interface on which the datagram was received.
*
*/
void
udp_input(struct pbuf *p, struct netif *inp)
{
8017ef0: b590 push {r4, r7, lr}
8017ef2: b08d sub sp, #52 ; 0x34
8017ef4: af02 add r7, sp, #8
8017ef6: 6078 str r0, [r7, #4]
8017ef8: 6039 str r1, [r7, #0]
struct udp_hdr *udphdr;
struct udp_pcb *pcb, *prev;
struct udp_pcb *uncon_pcb;
u16_t src, dest;
u8_t broadcast;
u8_t for_us = 0;
8017efa: 2300 movs r3, #0
8017efc: 76fb strb r3, [r7, #27]
LWIP_UNUSED_ARG(inp);
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
8017efe: 687b ldr r3, [r7, #4]
8017f00: 2b00 cmp r3, #0
8017f02: d105 bne.n 8017f10 <udp_input+0x20>
8017f04: 4b7c ldr r3, [pc, #496] ; (80180f8 <udp_input+0x208>)
8017f06: 22cf movs r2, #207 ; 0xcf
8017f08: 497c ldr r1, [pc, #496] ; (80180fc <udp_input+0x20c>)
8017f0a: 487d ldr r0, [pc, #500] ; (8018100 <udp_input+0x210>)
8017f0c: f004 fef4 bl 801ccf8 <iprintf>
LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
8017f10: 683b ldr r3, [r7, #0]
8017f12: 2b00 cmp r3, #0
8017f14: d105 bne.n 8017f22 <udp_input+0x32>
8017f16: 4b78 ldr r3, [pc, #480] ; (80180f8 <udp_input+0x208>)
8017f18: 22d0 movs r2, #208 ; 0xd0
8017f1a: 497a ldr r1, [pc, #488] ; (8018104 <udp_input+0x214>)
8017f1c: 4878 ldr r0, [pc, #480] ; (8018100 <udp_input+0x210>)
8017f1e: f004 feeb bl 801ccf8 <iprintf>
PERF_START;
UDP_STATS_INC(udp.recv);
/* Check minimum length (UDP header) */
if (p->len < UDP_HLEN) {
8017f22: 687b ldr r3, [r7, #4]
8017f24: 895b ldrh r3, [r3, #10]
8017f26: 2b07 cmp r3, #7
8017f28: d803 bhi.n 8017f32 <udp_input+0x42>
LWIP_DEBUGF(UDP_DEBUG,
("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len));
UDP_STATS_INC(udp.lenerr);
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
8017f2a: 6878 ldr r0, [r7, #4]
8017f2c: f7fa f9b4 bl 8012298 <pbuf_free>
goto end;
8017f30: e0de b.n 80180f0 <udp_input+0x200>
}
udphdr = (struct udp_hdr *)p->payload;
8017f32: 687b ldr r3, [r7, #4]
8017f34: 685b ldr r3, [r3, #4]
8017f36: 617b str r3, [r7, #20]
/* is broadcast packet ? */
broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif());
8017f38: 4b73 ldr r3, [pc, #460] ; (8018108 <udp_input+0x218>)
8017f3a: 695a ldr r2, [r3, #20]
8017f3c: 4b72 ldr r3, [pc, #456] ; (8018108 <udp_input+0x218>)
8017f3e: 681b ldr r3, [r3, #0]
8017f40: 4619 mov r1, r3
8017f42: 4610 mov r0, r2
8017f44: f003 fe16 bl 801bb74 <ip4_addr_isbroadcast_u32>
8017f48: 4603 mov r3, r0
8017f4a: 74fb strb r3, [r7, #19]
LWIP_DEBUGF(UDP_DEBUG, ("udp_input: received datagram of length %"U16_F"\n", p->tot_len));
/* convert src and dest ports to host byte order */
src = lwip_ntohs(udphdr->src);
8017f4c: 697b ldr r3, [r7, #20]
8017f4e: 881b ldrh r3, [r3, #0]
8017f50: b29b uxth r3, r3
8017f52: 4618 mov r0, r3
8017f54: f7f8 fdec bl 8010b30 <lwip_htons>
8017f58: 4603 mov r3, r0
8017f5a: 823b strh r3, [r7, #16]
dest = lwip_ntohs(udphdr->dest);
8017f5c: 697b ldr r3, [r7, #20]
8017f5e: 885b ldrh r3, [r3, #2]
8017f60: b29b uxth r3, r3
8017f62: 4618 mov r0, r3
8017f64: f7f8 fde4 bl 8010b30 <lwip_htons>
8017f68: 4603 mov r3, r0
8017f6a: 81fb strh r3, [r7, #14]
ip_addr_debug_print_val(UDP_DEBUG, *ip_current_dest_addr());
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", lwip_ntohs(udphdr->dest)));
ip_addr_debug_print_val(UDP_DEBUG, *ip_current_src_addr());
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", lwip_ntohs(udphdr->src)));
pcb = NULL;
8017f6c: 2300 movs r3, #0
8017f6e: 627b str r3, [r7, #36] ; 0x24
prev = NULL;
8017f70: 2300 movs r3, #0
8017f72: 623b str r3, [r7, #32]
uncon_pcb = NULL;
8017f74: 2300 movs r3, #0
8017f76: 61fb str r3, [r7, #28]
/* Iterate through the UDP pcb list for a matching pcb.
* 'Perfect match' pcbs (connected to the remote port & ip address) are
* preferred. If no perfect match is found, the first unconnected pcb that
* matches the local port and ip address gets the datagram. */
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
8017f78: 4b64 ldr r3, [pc, #400] ; (801810c <udp_input+0x21c>)
8017f7a: 681b ldr r3, [r3, #0]
8017f7c: 627b str r3, [r7, #36] ; 0x24
8017f7e: e054 b.n 801802a <udp_input+0x13a>
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", pcb->local_port));
ip_addr_debug_print_val(UDP_DEBUG, pcb->remote_ip);
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port));
/* compare PCB local addr+port to UDP destination addr+port */
if ((pcb->local_port == dest) &&
8017f80: 6a7b ldr r3, [r7, #36] ; 0x24
8017f82: 8a5b ldrh r3, [r3, #18]
8017f84: 89fa ldrh r2, [r7, #14]
8017f86: 429a cmp r2, r3
8017f88: d14a bne.n 8018020 <udp_input+0x130>
(udp_input_local_match(pcb, inp, broadcast) != 0)) {
8017f8a: 7cfb ldrb r3, [r7, #19]
8017f8c: 461a mov r2, r3
8017f8e: 6839 ldr r1, [r7, #0]
8017f90: 6a78 ldr r0, [r7, #36] ; 0x24
8017f92: f7ff ff49 bl 8017e28 <udp_input_local_match>
8017f96: 4603 mov r3, r0
if ((pcb->local_port == dest) &&
8017f98: 2b00 cmp r3, #0
8017f9a: d041 beq.n 8018020 <udp_input+0x130>
if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) {
8017f9c: 6a7b ldr r3, [r7, #36] ; 0x24
8017f9e: 7c1b ldrb r3, [r3, #16]
8017fa0: f003 0304 and.w r3, r3, #4
8017fa4: 2b00 cmp r3, #0
8017fa6: d11d bne.n 8017fe4 <udp_input+0xf4>
if (uncon_pcb == NULL) {
8017fa8: 69fb ldr r3, [r7, #28]
8017faa: 2b00 cmp r3, #0
8017fac: d102 bne.n 8017fb4 <udp_input+0xc4>
/* the first unconnected matching PCB */
uncon_pcb = pcb;
8017fae: 6a7b ldr r3, [r7, #36] ; 0x24
8017fb0: 61fb str r3, [r7, #28]
8017fb2: e017 b.n 8017fe4 <udp_input+0xf4>
#if LWIP_IPV4
} else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) {
8017fb4: 7cfb ldrb r3, [r7, #19]
8017fb6: 2b00 cmp r3, #0
8017fb8: d014 beq.n 8017fe4 <udp_input+0xf4>
8017fba: 4b53 ldr r3, [pc, #332] ; (8018108 <udp_input+0x218>)
8017fbc: 695b ldr r3, [r3, #20]
8017fbe: f1b3 3fff cmp.w r3, #4294967295
8017fc2: d10f bne.n 8017fe4 <udp_input+0xf4>
/* global broadcast address (only valid for IPv4; match was checked before) */
if (!IP_IS_V4_VAL(uncon_pcb->local_ip) || !ip4_addr_cmp(ip_2_ip4(&uncon_pcb->local_ip), netif_ip4_addr(inp))) {
8017fc4: 69fb ldr r3, [r7, #28]
8017fc6: 681a ldr r2, [r3, #0]
8017fc8: 683b ldr r3, [r7, #0]
8017fca: 3304 adds r3, #4
8017fcc: 681b ldr r3, [r3, #0]
8017fce: 429a cmp r2, r3
8017fd0: d008 beq.n 8017fe4 <udp_input+0xf4>
/* uncon_pcb does not match the input netif, check this pcb */
if (IP_IS_V4_VAL(pcb->local_ip) && ip4_addr_cmp(ip_2_ip4(&pcb->local_ip), netif_ip4_addr(inp))) {
8017fd2: 6a7b ldr r3, [r7, #36] ; 0x24
8017fd4: 681a ldr r2, [r3, #0]
8017fd6: 683b ldr r3, [r7, #0]
8017fd8: 3304 adds r3, #4
8017fda: 681b ldr r3, [r3, #0]
8017fdc: 429a cmp r2, r3
8017fde: d101 bne.n 8017fe4 <udp_input+0xf4>
/* better match */
uncon_pcb = pcb;
8017fe0: 6a7b ldr r3, [r7, #36] ; 0x24
8017fe2: 61fb str r3, [r7, #28]
}
#endif /* SO_REUSE */
}
/* compare PCB remote addr+port to UDP source addr+port */
if ((pcb->remote_port == src) &&
8017fe4: 6a7b ldr r3, [r7, #36] ; 0x24
8017fe6: 8a9b ldrh r3, [r3, #20]
8017fe8: 8a3a ldrh r2, [r7, #16]
8017fea: 429a cmp r2, r3
8017fec: d118 bne.n 8018020 <udp_input+0x130>
(ip_addr_isany_val(pcb->remote_ip) ||
8017fee: 6a7b ldr r3, [r7, #36] ; 0x24
8017ff0: 685b ldr r3, [r3, #4]
if ((pcb->remote_port == src) &&
8017ff2: 2b00 cmp r3, #0
8017ff4: d005 beq.n 8018002 <udp_input+0x112>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) {
8017ff6: 6a7b ldr r3, [r7, #36] ; 0x24
8017ff8: 685a ldr r2, [r3, #4]
8017ffa: 4b43 ldr r3, [pc, #268] ; (8018108 <udp_input+0x218>)
8017ffc: 691b ldr r3, [r3, #16]
(ip_addr_isany_val(pcb->remote_ip) ||
8017ffe: 429a cmp r2, r3
8018000: d10e bne.n 8018020 <udp_input+0x130>
/* the first fully matching PCB */
if (prev != NULL) {
8018002: 6a3b ldr r3, [r7, #32]
8018004: 2b00 cmp r3, #0
8018006: d014 beq.n 8018032 <udp_input+0x142>
/* move the pcb to the front of udp_pcbs so that is
found faster next time */
prev->next = pcb->next;
8018008: 6a7b ldr r3, [r7, #36] ; 0x24
801800a: 68da ldr r2, [r3, #12]
801800c: 6a3b ldr r3, [r7, #32]
801800e: 60da str r2, [r3, #12]
pcb->next = udp_pcbs;
8018010: 4b3e ldr r3, [pc, #248] ; (801810c <udp_input+0x21c>)
8018012: 681a ldr r2, [r3, #0]
8018014: 6a7b ldr r3, [r7, #36] ; 0x24
8018016: 60da str r2, [r3, #12]
udp_pcbs = pcb;
8018018: 4a3c ldr r2, [pc, #240] ; (801810c <udp_input+0x21c>)
801801a: 6a7b ldr r3, [r7, #36] ; 0x24
801801c: 6013 str r3, [r2, #0]
} else {
UDP_STATS_INC(udp.cachehit);
}
break;
801801e: e008 b.n 8018032 <udp_input+0x142>
}
}
prev = pcb;
8018020: 6a7b ldr r3, [r7, #36] ; 0x24
8018022: 623b str r3, [r7, #32]
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
8018024: 6a7b ldr r3, [r7, #36] ; 0x24
8018026: 68db ldr r3, [r3, #12]
8018028: 627b str r3, [r7, #36] ; 0x24
801802a: 6a7b ldr r3, [r7, #36] ; 0x24
801802c: 2b00 cmp r3, #0
801802e: d1a7 bne.n 8017f80 <udp_input+0x90>
8018030: e000 b.n 8018034 <udp_input+0x144>
break;
8018032: bf00 nop
}
/* no fully matching pcb found? then look for an unconnected pcb */
if (pcb == NULL) {
8018034: 6a7b ldr r3, [r7, #36] ; 0x24
8018036: 2b00 cmp r3, #0
8018038: d101 bne.n 801803e <udp_input+0x14e>
pcb = uncon_pcb;
801803a: 69fb ldr r3, [r7, #28]
801803c: 627b str r3, [r7, #36] ; 0x24
}
/* Check checksum if this is a match or if it was directed at us. */
if (pcb != NULL) {
801803e: 6a7b ldr r3, [r7, #36] ; 0x24
8018040: 2b00 cmp r3, #0
8018042: d002 beq.n 801804a <udp_input+0x15a>
for_us = 1;
8018044: 2301 movs r3, #1
8018046: 76fb strb r3, [r7, #27]
8018048: e00a b.n 8018060 <udp_input+0x170>
for_us = netif_get_ip6_addr_match(inp, ip6_current_dest_addr()) >= 0;
}
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
if (!ip_current_is_v6()) {
for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr());
801804a: 683b ldr r3, [r7, #0]
801804c: 3304 adds r3, #4
801804e: 681a ldr r2, [r3, #0]
8018050: 4b2d ldr r3, [pc, #180] ; (8018108 <udp_input+0x218>)
8018052: 695b ldr r3, [r3, #20]
8018054: 429a cmp r2, r3
8018056: bf0c ite eq
8018058: 2301 moveq r3, #1
801805a: 2300 movne r3, #0
801805c: b2db uxtb r3, r3
801805e: 76fb strb r3, [r7, #27]
}
#endif /* LWIP_IPV4 */
}
if (for_us) {
8018060: 7efb ldrb r3, [r7, #27]
8018062: 2b00 cmp r3, #0
8018064: d041 beq.n 80180ea <udp_input+0x1fa>
}
}
}
}
#endif /* CHECKSUM_CHECK_UDP */
if (pbuf_remove_header(p, UDP_HLEN)) {
8018066: 2108 movs r1, #8
8018068: 6878 ldr r0, [r7, #4]
801806a: f7fa f88f bl 801218c <pbuf_remove_header>
801806e: 4603 mov r3, r0
8018070: 2b00 cmp r3, #0
8018072: d00a beq.n 801808a <udp_input+0x19a>
/* Can we cope with this failing? Just assert for now */
LWIP_ASSERT("pbuf_remove_header failed\n", 0);
8018074: 4b20 ldr r3, [pc, #128] ; (80180f8 <udp_input+0x208>)
8018076: f44f 72b8 mov.w r2, #368 ; 0x170
801807a: 4925 ldr r1, [pc, #148] ; (8018110 <udp_input+0x220>)
801807c: 4820 ldr r0, [pc, #128] ; (8018100 <udp_input+0x210>)
801807e: f004 fe3b bl 801ccf8 <iprintf>
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
8018082: 6878 ldr r0, [r7, #4]
8018084: f7fa f908 bl 8012298 <pbuf_free>
goto end;
8018088: e032 b.n 80180f0 <udp_input+0x200>
}
if (pcb != NULL) {
801808a: 6a7b ldr r3, [r7, #36] ; 0x24
801808c: 2b00 cmp r3, #0
801808e: d012 beq.n 80180b6 <udp_input+0x1c6>
}
}
}
#endif /* SO_REUSE && SO_REUSE_RXTOALL */
/* callback */
if (pcb->recv != NULL) {
8018090: 6a7b ldr r3, [r7, #36] ; 0x24
8018092: 699b ldr r3, [r3, #24]
8018094: 2b00 cmp r3, #0
8018096: d00a beq.n 80180ae <udp_input+0x1be>
/* now the recv function is responsible for freeing p */
pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src);
8018098: 6a7b ldr r3, [r7, #36] ; 0x24
801809a: 699c ldr r4, [r3, #24]
801809c: 6a7b ldr r3, [r7, #36] ; 0x24
801809e: 69d8 ldr r0, [r3, #28]
80180a0: 8a3b ldrh r3, [r7, #16]
80180a2: 9300 str r3, [sp, #0]
80180a4: 4b1b ldr r3, [pc, #108] ; (8018114 <udp_input+0x224>)
80180a6: 687a ldr r2, [r7, #4]
80180a8: 6a79 ldr r1, [r7, #36] ; 0x24
80180aa: 47a0 blx r4
} else {
pbuf_free(p);
}
end:
PERF_STOP("udp_input");
return;
80180ac: e021 b.n 80180f2 <udp_input+0x202>
pbuf_free(p);
80180ae: 6878 ldr r0, [r7, #4]
80180b0: f7fa f8f2 bl 8012298 <pbuf_free>
goto end;
80180b4: e01c b.n 80180f0 <udp_input+0x200>
if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) {
80180b6: 7cfb ldrb r3, [r7, #19]
80180b8: 2b00 cmp r3, #0
80180ba: d112 bne.n 80180e2 <udp_input+0x1f2>
80180bc: 4b12 ldr r3, [pc, #72] ; (8018108 <udp_input+0x218>)
80180be: 695b ldr r3, [r3, #20]
80180c0: f003 03f0 and.w r3, r3, #240 ; 0xf0
80180c4: 2be0 cmp r3, #224 ; 0xe0
80180c6: d00c beq.n 80180e2 <udp_input+0x1f2>
pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN));
80180c8: 4b0f ldr r3, [pc, #60] ; (8018108 <udp_input+0x218>)
80180ca: 899b ldrh r3, [r3, #12]
80180cc: 3308 adds r3, #8
80180ce: b29b uxth r3, r3
80180d0: b21b sxth r3, r3
80180d2: 4619 mov r1, r3
80180d4: 6878 ldr r0, [r7, #4]
80180d6: f7fa f8cc bl 8012272 <pbuf_header_force>
icmp_port_unreach(ip_current_is_v6(), p);
80180da: 2103 movs r1, #3
80180dc: 6878 ldr r0, [r7, #4]
80180de: f003 fa0d bl 801b4fc <icmp_dest_unreach>
pbuf_free(p);
80180e2: 6878 ldr r0, [r7, #4]
80180e4: f7fa f8d8 bl 8012298 <pbuf_free>
return;
80180e8: e003 b.n 80180f2 <udp_input+0x202>
pbuf_free(p);
80180ea: 6878 ldr r0, [r7, #4]
80180ec: f7fa f8d4 bl 8012298 <pbuf_free>
return;
80180f0: bf00 nop
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
PERF_STOP("udp_input");
#endif /* CHECKSUM_CHECK_UDP */
}
80180f2: 372c adds r7, #44 ; 0x2c
80180f4: 46bd mov sp, r7
80180f6: bd90 pop {r4, r7, pc}
80180f8: 08020074 .word 0x08020074
80180fc: 08020118 .word 0x08020118
8018100: 080200c8 .word 0x080200c8
8018104: 08020130 .word 0x08020130
8018108: 2000c0c8 .word 0x2000c0c8
801810c: 2000f814 .word 0x2000f814
8018110: 0802014c .word 0x0802014c
8018114: 2000c0d8 .word 0x2000c0d8
08018118 <udp_sendto_if>:
* @see udp_disconnect() udp_send()
*/
err_t
udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p,
const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif)
{
8018118: b580 push {r7, lr}
801811a: b088 sub sp, #32
801811c: af02 add r7, sp, #8
801811e: 60f8 str r0, [r7, #12]
8018120: 60b9 str r1, [r7, #8]
8018122: 607a str r2, [r7, #4]
8018124: 807b strh r3, [r7, #2]
u16_t chksum)
{
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
const ip_addr_t *src_ip;
LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG);
8018126: 68fb ldr r3, [r7, #12]
8018128: 2b00 cmp r3, #0
801812a: d109 bne.n 8018140 <udp_sendto_if+0x28>
801812c: 4b2e ldr r3, [pc, #184] ; (80181e8 <udp_sendto_if+0xd0>)
801812e: f44f 7220 mov.w r2, #640 ; 0x280
8018132: 492e ldr r1, [pc, #184] ; (80181ec <udp_sendto_if+0xd4>)
8018134: 482e ldr r0, [pc, #184] ; (80181f0 <udp_sendto_if+0xd8>)
8018136: f004 fddf bl 801ccf8 <iprintf>
801813a: f06f 030f mvn.w r3, #15
801813e: e04f b.n 80181e0 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
8018140: 68bb ldr r3, [r7, #8]
8018142: 2b00 cmp r3, #0
8018144: d109 bne.n 801815a <udp_sendto_if+0x42>
8018146: 4b28 ldr r3, [pc, #160] ; (80181e8 <udp_sendto_if+0xd0>)
8018148: f240 2281 movw r2, #641 ; 0x281
801814c: 4929 ldr r1, [pc, #164] ; (80181f4 <udp_sendto_if+0xdc>)
801814e: 4828 ldr r0, [pc, #160] ; (80181f0 <udp_sendto_if+0xd8>)
8018150: f004 fdd2 bl 801ccf8 <iprintf>
8018154: f06f 030f mvn.w r3, #15
8018158: e042 b.n 80181e0 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
801815a: 687b ldr r3, [r7, #4]
801815c: 2b00 cmp r3, #0
801815e: d109 bne.n 8018174 <udp_sendto_if+0x5c>
8018160: 4b21 ldr r3, [pc, #132] ; (80181e8 <udp_sendto_if+0xd0>)
8018162: f240 2282 movw r2, #642 ; 0x282
8018166: 4924 ldr r1, [pc, #144] ; (80181f8 <udp_sendto_if+0xe0>)
8018168: 4821 ldr r0, [pc, #132] ; (80181f0 <udp_sendto_if+0xd8>)
801816a: f004 fdc5 bl 801ccf8 <iprintf>
801816e: f06f 030f mvn.w r3, #15
8018172: e035 b.n 80181e0 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
8018174: 6a3b ldr r3, [r7, #32]
8018176: 2b00 cmp r3, #0
8018178: d109 bne.n 801818e <udp_sendto_if+0x76>
801817a: 4b1b ldr r3, [pc, #108] ; (80181e8 <udp_sendto_if+0xd0>)
801817c: f240 2283 movw r2, #643 ; 0x283
8018180: 491e ldr r1, [pc, #120] ; (80181fc <udp_sendto_if+0xe4>)
8018182: 481b ldr r0, [pc, #108] ; (80181f0 <udp_sendto_if+0xd8>)
8018184: f004 fdb8 bl 801ccf8 <iprintf>
8018188: f06f 030f mvn.w r3, #15
801818c: e028 b.n 80181e0 <udp_sendto_if+0xc8>
#endif /* LWIP_IPV6 */
#if LWIP_IPV4 && LWIP_IPV6
else
#endif /* LWIP_IPV4 && LWIP_IPV6 */
#if LWIP_IPV4
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
801818e: 68fb ldr r3, [r7, #12]
8018190: 2b00 cmp r3, #0
8018192: d009 beq.n 80181a8 <udp_sendto_if+0x90>
8018194: 68fb ldr r3, [r7, #12]
8018196: 681b ldr r3, [r3, #0]
8018198: 2b00 cmp r3, #0
801819a: d005 beq.n 80181a8 <udp_sendto_if+0x90>
ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) {
801819c: 68fb ldr r3, [r7, #12]
801819e: 681b ldr r3, [r3, #0]
80181a0: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
80181a4: 2be0 cmp r3, #224 ; 0xe0
80181a6: d103 bne.n 80181b0 <udp_sendto_if+0x98>
/* if the local_ip is any or multicast
* use the outgoing network interface IP address as source address */
src_ip = netif_ip_addr4(netif);
80181a8: 6a3b ldr r3, [r7, #32]
80181aa: 3304 adds r3, #4
80181ac: 617b str r3, [r7, #20]
80181ae: e00b b.n 80181c8 <udp_sendto_if+0xb0>
} else {
/* check if UDP PCB local IP address is correct
* this could be an old address if netif->ip_addr has changed */
if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) {
80181b0: 68fb ldr r3, [r7, #12]
80181b2: 681a ldr r2, [r3, #0]
80181b4: 6a3b ldr r3, [r7, #32]
80181b6: 3304 adds r3, #4
80181b8: 681b ldr r3, [r3, #0]
80181ba: 429a cmp r2, r3
80181bc: d002 beq.n 80181c4 <udp_sendto_if+0xac>
/* local_ip doesn't match, drop the packet */
return ERR_RTE;
80181be: f06f 0303 mvn.w r3, #3
80181c2: e00d b.n 80181e0 <udp_sendto_if+0xc8>
}
/* use UDP PCB local IP address as source address */
src_ip = &pcb->local_ip;
80181c4: 68fb ldr r3, [r7, #12]
80181c6: 617b str r3, [r7, #20]
}
#endif /* LWIP_IPV4 */
#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP
return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum, src_ip);
#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip);
80181c8: 887a ldrh r2, [r7, #2]
80181ca: 697b ldr r3, [r7, #20]
80181cc: 9301 str r3, [sp, #4]
80181ce: 6a3b ldr r3, [r7, #32]
80181d0: 9300 str r3, [sp, #0]
80181d2: 4613 mov r3, r2
80181d4: 687a ldr r2, [r7, #4]
80181d6: 68b9 ldr r1, [r7, #8]
80181d8: 68f8 ldr r0, [r7, #12]
80181da: f000 f811 bl 8018200 <udp_sendto_if_src>
80181de: 4603 mov r3, r0
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
}
80181e0: 4618 mov r0, r3
80181e2: 3718 adds r7, #24
80181e4: 46bd mov sp, r7
80181e6: bd80 pop {r7, pc}
80181e8: 08020074 .word 0x08020074
80181ec: 080201e8 .word 0x080201e8
80181f0: 080200c8 .word 0x080200c8
80181f4: 08020204 .word 0x08020204
80181f8: 08020220 .word 0x08020220
80181fc: 08020240 .word 0x08020240
08018200 <udp_sendto_if_src>:
/** @ingroup udp_raw
* Same as @ref udp_sendto_if, but with source address */
err_t
udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p,
const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip)
{
8018200: b580 push {r7, lr}
8018202: b08c sub sp, #48 ; 0x30
8018204: af04 add r7, sp, #16
8018206: 60f8 str r0, [r7, #12]
8018208: 60b9 str r1, [r7, #8]
801820a: 607a str r2, [r7, #4]
801820c: 807b strh r3, [r7, #2]
u8_t ip_proto;
u8_t ttl;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG);
801820e: 68fb ldr r3, [r7, #12]
8018210: 2b00 cmp r3, #0
8018212: d109 bne.n 8018228 <udp_sendto_if_src+0x28>
8018214: 4b65 ldr r3, [pc, #404] ; (80183ac <udp_sendto_if_src+0x1ac>)
8018216: f240 22d1 movw r2, #721 ; 0x2d1
801821a: 4965 ldr r1, [pc, #404] ; (80183b0 <udp_sendto_if_src+0x1b0>)
801821c: 4865 ldr r0, [pc, #404] ; (80183b4 <udp_sendto_if_src+0x1b4>)
801821e: f004 fd6b bl 801ccf8 <iprintf>
8018222: f06f 030f mvn.w r3, #15
8018226: e0bc b.n 80183a2 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
8018228: 68bb ldr r3, [r7, #8]
801822a: 2b00 cmp r3, #0
801822c: d109 bne.n 8018242 <udp_sendto_if_src+0x42>
801822e: 4b5f ldr r3, [pc, #380] ; (80183ac <udp_sendto_if_src+0x1ac>)
8018230: f240 22d2 movw r2, #722 ; 0x2d2
8018234: 4960 ldr r1, [pc, #384] ; (80183b8 <udp_sendto_if_src+0x1b8>)
8018236: 485f ldr r0, [pc, #380] ; (80183b4 <udp_sendto_if_src+0x1b4>)
8018238: f004 fd5e bl 801ccf8 <iprintf>
801823c: f06f 030f mvn.w r3, #15
8018240: e0af b.n 80183a2 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
8018242: 687b ldr r3, [r7, #4]
8018244: 2b00 cmp r3, #0
8018246: d109 bne.n 801825c <udp_sendto_if_src+0x5c>
8018248: 4b58 ldr r3, [pc, #352] ; (80183ac <udp_sendto_if_src+0x1ac>)
801824a: f240 22d3 movw r2, #723 ; 0x2d3
801824e: 495b ldr r1, [pc, #364] ; (80183bc <udp_sendto_if_src+0x1bc>)
8018250: 4858 ldr r0, [pc, #352] ; (80183b4 <udp_sendto_if_src+0x1b4>)
8018252: f004 fd51 bl 801ccf8 <iprintf>
8018256: f06f 030f mvn.w r3, #15
801825a: e0a2 b.n 80183a2 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
801825c: 6afb ldr r3, [r7, #44] ; 0x2c
801825e: 2b00 cmp r3, #0
8018260: d109 bne.n 8018276 <udp_sendto_if_src+0x76>
8018262: 4b52 ldr r3, [pc, #328] ; (80183ac <udp_sendto_if_src+0x1ac>)
8018264: f44f 7235 mov.w r2, #724 ; 0x2d4
8018268: 4955 ldr r1, [pc, #340] ; (80183c0 <udp_sendto_if_src+0x1c0>)
801826a: 4852 ldr r0, [pc, #328] ; (80183b4 <udp_sendto_if_src+0x1b4>)
801826c: f004 fd44 bl 801ccf8 <iprintf>
8018270: f06f 030f mvn.w r3, #15
8018274: e095 b.n 80183a2 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
8018276: 6abb ldr r3, [r7, #40] ; 0x28
8018278: 2b00 cmp r3, #0
801827a: d109 bne.n 8018290 <udp_sendto_if_src+0x90>
801827c: 4b4b ldr r3, [pc, #300] ; (80183ac <udp_sendto_if_src+0x1ac>)
801827e: f240 22d5 movw r2, #725 ; 0x2d5
8018282: 4950 ldr r1, [pc, #320] ; (80183c4 <udp_sendto_if_src+0x1c4>)
8018284: 484b ldr r0, [pc, #300] ; (80183b4 <udp_sendto_if_src+0x1b4>)
8018286: f004 fd37 bl 801ccf8 <iprintf>
801828a: f06f 030f mvn.w r3, #15
801828e: e088 b.n 80183a2 <udp_sendto_if_src+0x1a2>
return ERR_VAL;
}
#endif /* LWIP_IPV4 && IP_SOF_BROADCAST */
/* if the PCB is not yet bound to a port, bind it here */
if (pcb->local_port == 0) {
8018290: 68fb ldr r3, [r7, #12]
8018292: 8a5b ldrh r3, [r3, #18]
8018294: 2b00 cmp r3, #0
8018296: d10f bne.n 80182b8 <udp_sendto_if_src+0xb8>
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send: not yet bound to a port, binding now\n"));
err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
8018298: 68f9 ldr r1, [r7, #12]
801829a: 68fb ldr r3, [r7, #12]
801829c: 8a5b ldrh r3, [r3, #18]
801829e: 461a mov r2, r3
80182a0: 68f8 ldr r0, [r7, #12]
80182a2: f000 f893 bl 80183cc <udp_bind>
80182a6: 4603 mov r3, r0
80182a8: 76fb strb r3, [r7, #27]
if (err != ERR_OK) {
80182aa: f997 301b ldrsb.w r3, [r7, #27]
80182ae: 2b00 cmp r3, #0
80182b0: d002 beq.n 80182b8 <udp_sendto_if_src+0xb8>
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n"));
return err;
80182b2: f997 301b ldrsb.w r3, [r7, #27]
80182b6: e074 b.n 80183a2 <udp_sendto_if_src+0x1a2>
}
}
/* packet too large to add a UDP header without causing an overflow? */
if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) {
80182b8: 68bb ldr r3, [r7, #8]
80182ba: 891b ldrh r3, [r3, #8]
80182bc: f64f 72f7 movw r2, #65527 ; 0xfff7
80182c0: 4293 cmp r3, r2
80182c2: d902 bls.n 80182ca <udp_sendto_if_src+0xca>
return ERR_MEM;
80182c4: f04f 33ff mov.w r3, #4294967295
80182c8: e06b b.n 80183a2 <udp_sendto_if_src+0x1a2>
}
/* not enough space to add an UDP header to first pbuf in given p chain? */
if (pbuf_add_header(p, UDP_HLEN)) {
80182ca: 2108 movs r1, #8
80182cc: 68b8 ldr r0, [r7, #8]
80182ce: f7f9 ff4d bl 801216c <pbuf_add_header>
80182d2: 4603 mov r3, r0
80182d4: 2b00 cmp r3, #0
80182d6: d015 beq.n 8018304 <udp_sendto_if_src+0x104>
/* allocate header in a separate new pbuf */
q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
80182d8: f44f 7220 mov.w r2, #640 ; 0x280
80182dc: 2108 movs r1, #8
80182de: 2022 movs r0, #34 ; 0x22
80182e0: f7f9 fcfa bl 8011cd8 <pbuf_alloc>
80182e4: 61f8 str r0, [r7, #28]
/* new header pbuf could not be allocated? */
if (q == NULL) {
80182e6: 69fb ldr r3, [r7, #28]
80182e8: 2b00 cmp r3, #0
80182ea: d102 bne.n 80182f2 <udp_sendto_if_src+0xf2>
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n"));
return ERR_MEM;
80182ec: f04f 33ff mov.w r3, #4294967295
80182f0: e057 b.n 80183a2 <udp_sendto_if_src+0x1a2>
}
if (p->tot_len != 0) {
80182f2: 68bb ldr r3, [r7, #8]
80182f4: 891b ldrh r3, [r3, #8]
80182f6: 2b00 cmp r3, #0
80182f8: d006 beq.n 8018308 <udp_sendto_if_src+0x108>
/* chain header q in front of given pbuf p (only if p contains data) */
pbuf_chain(q, p);
80182fa: 68b9 ldr r1, [r7, #8]
80182fc: 69f8 ldr r0, [r7, #28]
80182fe: f7fa f8ef bl 80124e0 <pbuf_chain>
8018302: e001 b.n 8018308 <udp_sendto_if_src+0x108>
LWIP_DEBUGF(UDP_DEBUG,
("udp_send: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p));
} else {
/* adding space for header within p succeeded */
/* first pbuf q equals given pbuf */
q = p;
8018304: 68bb ldr r3, [r7, #8]
8018306: 61fb str r3, [r7, #28]
LWIP_DEBUGF(UDP_DEBUG, ("udp_send: added header in given pbuf %p\n", (void *)p));
}
LWIP_ASSERT("check that first pbuf can hold struct udp_hdr",
8018308: 69fb ldr r3, [r7, #28]
801830a: 895b ldrh r3, [r3, #10]
801830c: 2b07 cmp r3, #7
801830e: d806 bhi.n 801831e <udp_sendto_if_src+0x11e>
8018310: 4b26 ldr r3, [pc, #152] ; (80183ac <udp_sendto_if_src+0x1ac>)
8018312: f240 320e movw r2, #782 ; 0x30e
8018316: 492c ldr r1, [pc, #176] ; (80183c8 <udp_sendto_if_src+0x1c8>)
8018318: 4826 ldr r0, [pc, #152] ; (80183b4 <udp_sendto_if_src+0x1b4>)
801831a: f004 fced bl 801ccf8 <iprintf>
(q->len >= sizeof(struct udp_hdr)));
/* q now represents the packet to be sent */
udphdr = (struct udp_hdr *)q->payload;
801831e: 69fb ldr r3, [r7, #28]
8018320: 685b ldr r3, [r3, #4]
8018322: 617b str r3, [r7, #20]
udphdr->src = lwip_htons(pcb->local_port);
8018324: 68fb ldr r3, [r7, #12]
8018326: 8a5b ldrh r3, [r3, #18]
8018328: 4618 mov r0, r3
801832a: f7f8 fc01 bl 8010b30 <lwip_htons>
801832e: 4603 mov r3, r0
8018330: 461a mov r2, r3
8018332: 697b ldr r3, [r7, #20]
8018334: 801a strh r2, [r3, #0]
udphdr->dest = lwip_htons(dst_port);
8018336: 887b ldrh r3, [r7, #2]
8018338: 4618 mov r0, r3
801833a: f7f8 fbf9 bl 8010b30 <lwip_htons>
801833e: 4603 mov r3, r0
8018340: 461a mov r2, r3
8018342: 697b ldr r3, [r7, #20]
8018344: 805a strh r2, [r3, #2]
/* in UDP, 0 checksum means 'no checksum' */
udphdr->chksum = 0x0000;
8018346: 697b ldr r3, [r7, #20]
8018348: 2200 movs r2, #0
801834a: 719a strb r2, [r3, #6]
801834c: 2200 movs r2, #0
801834e: 71da strb r2, [r3, #7]
ip_proto = IP_PROTO_UDPLITE;
} else
#endif /* LWIP_UDPLITE */
{ /* UDP */
LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP packet length %"U16_F"\n", q->tot_len));
udphdr->len = lwip_htons(q->tot_len);
8018350: 69fb ldr r3, [r7, #28]
8018352: 891b ldrh r3, [r3, #8]
8018354: 4618 mov r0, r3
8018356: f7f8 fbeb bl 8010b30 <lwip_htons>
801835a: 4603 mov r3, r0
801835c: 461a mov r2, r3
801835e: 697b ldr r3, [r7, #20]
8018360: 809a strh r2, [r3, #4]
}
udphdr->chksum = udpchksum;
}
}
#endif /* CHECKSUM_GEN_UDP */
ip_proto = IP_PROTO_UDP;
8018362: 2311 movs r3, #17
8018364: 74fb strb r3, [r7, #19]
/* Determine TTL to use */
#if LWIP_MULTICAST_TX_OPTIONS
ttl = (ip_addr_ismulticast(dst_ip) ? udp_get_multicast_ttl(pcb) : pcb->ttl);
#else /* LWIP_MULTICAST_TX_OPTIONS */
ttl = pcb->ttl;
8018366: 68fb ldr r3, [r7, #12]
8018368: 7adb ldrb r3, [r3, #11]
801836a: 74bb strb r3, [r7, #18]
LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum));
LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,0x%02"X16_F",)\n", (u16_t)ip_proto));
/* output to IP */
NETIF_SET_HINTS(netif, &(pcb->netif_hints));
err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif);
801836c: 68fb ldr r3, [r7, #12]
801836e: 7a9b ldrb r3, [r3, #10]
8018370: 7cb9 ldrb r1, [r7, #18]
8018372: 6aba ldr r2, [r7, #40] ; 0x28
8018374: 9202 str r2, [sp, #8]
8018376: 7cfa ldrb r2, [r7, #19]
8018378: 9201 str r2, [sp, #4]
801837a: 9300 str r3, [sp, #0]
801837c: 460b mov r3, r1
801837e: 687a ldr r2, [r7, #4]
8018380: 6af9 ldr r1, [r7, #44] ; 0x2c
8018382: 69f8 ldr r0, [r7, #28]
8018384: f003 fb48 bl 801ba18 <ip4_output_if_src>
8018388: 4603 mov r3, r0
801838a: 76fb strb r3, [r7, #27]
/* @todo: must this be increased even if error occurred? */
MIB2_STATS_INC(mib2.udpoutdatagrams);
/* did we chain a separate header pbuf earlier? */
if (q != p) {
801838c: 69fa ldr r2, [r7, #28]
801838e: 68bb ldr r3, [r7, #8]
8018390: 429a cmp r2, r3
8018392: d004 beq.n 801839e <udp_sendto_if_src+0x19e>
/* free the header pbuf */
pbuf_free(q);
8018394: 69f8 ldr r0, [r7, #28]
8018396: f7f9 ff7f bl 8012298 <pbuf_free>
q = NULL;
801839a: 2300 movs r3, #0
801839c: 61fb str r3, [r7, #28]
/* p is still referenced by the caller, and will live on */
}
UDP_STATS_INC(udp.xmit);
return err;
801839e: f997 301b ldrsb.w r3, [r7, #27]
}
80183a2: 4618 mov r0, r3
80183a4: 3720 adds r7, #32
80183a6: 46bd mov sp, r7
80183a8: bd80 pop {r7, pc}
80183aa: bf00 nop
80183ac: 08020074 .word 0x08020074
80183b0: 08020260 .word 0x08020260
80183b4: 080200c8 .word 0x080200c8
80183b8: 08020280 .word 0x08020280
80183bc: 080202a0 .word 0x080202a0
80183c0: 080202c4 .word 0x080202c4
80183c4: 080202e8 .word 0x080202e8
80183c8: 0802030c .word 0x0802030c
080183cc <udp_bind>:
*
* @see udp_disconnect()
*/
err_t
udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
{
80183cc: b580 push {r7, lr}
80183ce: b086 sub sp, #24
80183d0: af00 add r7, sp, #0
80183d2: 60f8 str r0, [r7, #12]
80183d4: 60b9 str r1, [r7, #8]
80183d6: 4613 mov r3, r2
80183d8: 80fb strh r3, [r7, #6]
LWIP_ASSERT_CORE_LOCKED();
#if LWIP_IPV4
/* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
if (ipaddr == NULL) {
80183da: 68bb ldr r3, [r7, #8]
80183dc: 2b00 cmp r3, #0
80183de: d101 bne.n 80183e4 <udp_bind+0x18>
ipaddr = IP4_ADDR_ANY;
80183e0: 4b39 ldr r3, [pc, #228] ; (80184c8 <udp_bind+0xfc>)
80183e2: 60bb str r3, [r7, #8]
}
#else /* LWIP_IPV4 */
LWIP_ERROR("udp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
#endif /* LWIP_IPV4 */
LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
80183e4: 68fb ldr r3, [r7, #12]
80183e6: 2b00 cmp r3, #0
80183e8: d109 bne.n 80183fe <udp_bind+0x32>
80183ea: 4b38 ldr r3, [pc, #224] ; (80184cc <udp_bind+0x100>)
80183ec: f240 32b7 movw r2, #951 ; 0x3b7
80183f0: 4937 ldr r1, [pc, #220] ; (80184d0 <udp_bind+0x104>)
80183f2: 4838 ldr r0, [pc, #224] ; (80184d4 <udp_bind+0x108>)
80183f4: f004 fc80 bl 801ccf8 <iprintf>
80183f8: f06f 030f mvn.w r3, #15
80183fc: e060 b.n 80184c0 <udp_bind+0xf4>
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = "));
ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr);
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port));
rebind = 0;
80183fe: 2300 movs r3, #0
8018400: 74fb strb r3, [r7, #19]
/* Check for double bind and rebind of the same pcb */
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8018402: 4b35 ldr r3, [pc, #212] ; (80184d8 <udp_bind+0x10c>)
8018404: 681b ldr r3, [r3, #0]
8018406: 617b str r3, [r7, #20]
8018408: e009 b.n 801841e <udp_bind+0x52>
/* is this UDP PCB already on active list? */
if (pcb == ipcb) {
801840a: 68fa ldr r2, [r7, #12]
801840c: 697b ldr r3, [r7, #20]
801840e: 429a cmp r2, r3
8018410: d102 bne.n 8018418 <udp_bind+0x4c>
rebind = 1;
8018412: 2301 movs r3, #1
8018414: 74fb strb r3, [r7, #19]
break;
8018416: e005 b.n 8018424 <udp_bind+0x58>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8018418: 697b ldr r3, [r7, #20]
801841a: 68db ldr r3, [r3, #12]
801841c: 617b str r3, [r7, #20]
801841e: 697b ldr r3, [r7, #20]
8018420: 2b00 cmp r3, #0
8018422: d1f2 bne.n 801840a <udp_bind+0x3e>
ipaddr = &zoned_ipaddr;
}
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
/* no port specified? */
if (port == 0) {
8018424: 88fb ldrh r3, [r7, #6]
8018426: 2b00 cmp r3, #0
8018428: d109 bne.n 801843e <udp_bind+0x72>
port = udp_new_port();
801842a: f7ff fcc5 bl 8017db8 <udp_new_port>
801842e: 4603 mov r3, r0
8018430: 80fb strh r3, [r7, #6]
if (port == 0) {
8018432: 88fb ldrh r3, [r7, #6]
8018434: 2b00 cmp r3, #0
8018436: d12c bne.n 8018492 <udp_bind+0xc6>
/* no more ports available in local range */
LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n"));
return ERR_USE;
8018438: f06f 0307 mvn.w r3, #7
801843c: e040 b.n 80184c0 <udp_bind+0xf4>
}
} else {
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
801843e: 4b26 ldr r3, [pc, #152] ; (80184d8 <udp_bind+0x10c>)
8018440: 681b ldr r3, [r3, #0]
8018442: 617b str r3, [r7, #20]
8018444: e022 b.n 801848c <udp_bind+0xc0>
if (pcb != ipcb) {
8018446: 68fa ldr r2, [r7, #12]
8018448: 697b ldr r3, [r7, #20]
801844a: 429a cmp r2, r3
801844c: d01b beq.n 8018486 <udp_bind+0xba>
if (!ip_get_option(pcb, SOF_REUSEADDR) ||
!ip_get_option(ipcb, SOF_REUSEADDR))
#endif /* SO_REUSE */
{
/* port matches that of PCB in list and REUSEADDR not set -> reject */
if ((ipcb->local_port == port) &&
801844e: 697b ldr r3, [r7, #20]
8018450: 8a5b ldrh r3, [r3, #18]
8018452: 88fa ldrh r2, [r7, #6]
8018454: 429a cmp r2, r3
8018456: d116 bne.n 8018486 <udp_bind+0xba>
/* IP address matches or any IP used? */
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
8018458: 697b ldr r3, [r7, #20]
801845a: 681a ldr r2, [r3, #0]
801845c: 68bb ldr r3, [r7, #8]
801845e: 681b ldr r3, [r3, #0]
if ((ipcb->local_port == port) &&
8018460: 429a cmp r2, r3
8018462: d00d beq.n 8018480 <udp_bind+0xb4>
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
8018464: 68bb ldr r3, [r7, #8]
8018466: 2b00 cmp r3, #0
8018468: d00a beq.n 8018480 <udp_bind+0xb4>
801846a: 68bb ldr r3, [r7, #8]
801846c: 681b ldr r3, [r3, #0]
801846e: 2b00 cmp r3, #0
8018470: d006 beq.n 8018480 <udp_bind+0xb4>
ip_addr_isany(&ipcb->local_ip))) {
8018472: 697b ldr r3, [r7, #20]
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
8018474: 2b00 cmp r3, #0
8018476: d003 beq.n 8018480 <udp_bind+0xb4>
ip_addr_isany(&ipcb->local_ip))) {
8018478: 697b ldr r3, [r7, #20]
801847a: 681b ldr r3, [r3, #0]
801847c: 2b00 cmp r3, #0
801847e: d102 bne.n 8018486 <udp_bind+0xba>
/* other PCB already binds to this local IP and port */
LWIP_DEBUGF(UDP_DEBUG,
("udp_bind: local port %"U16_F" already bound by another pcb\n", port));
return ERR_USE;
8018480: f06f 0307 mvn.w r3, #7
8018484: e01c b.n 80184c0 <udp_bind+0xf4>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8018486: 697b ldr r3, [r7, #20]
8018488: 68db ldr r3, [r3, #12]
801848a: 617b str r3, [r7, #20]
801848c: 697b ldr r3, [r7, #20]
801848e: 2b00 cmp r3, #0
8018490: d1d9 bne.n 8018446 <udp_bind+0x7a>
}
}
}
}
ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
8018492: 68bb ldr r3, [r7, #8]
8018494: 2b00 cmp r3, #0
8018496: d002 beq.n 801849e <udp_bind+0xd2>
8018498: 68bb ldr r3, [r7, #8]
801849a: 681b ldr r3, [r3, #0]
801849c: e000 b.n 80184a0 <udp_bind+0xd4>
801849e: 2300 movs r3, #0
80184a0: 68fa ldr r2, [r7, #12]
80184a2: 6013 str r3, [r2, #0]
pcb->local_port = port;
80184a4: 68fb ldr r3, [r7, #12]
80184a6: 88fa ldrh r2, [r7, #6]
80184a8: 825a strh r2, [r3, #18]
mib2_udp_bind(pcb);
/* pcb not active yet? */
if (rebind == 0) {
80184aa: 7cfb ldrb r3, [r7, #19]
80184ac: 2b00 cmp r3, #0
80184ae: d106 bne.n 80184be <udp_bind+0xf2>
/* place the PCB on the active list if not already there */
pcb->next = udp_pcbs;
80184b0: 4b09 ldr r3, [pc, #36] ; (80184d8 <udp_bind+0x10c>)
80184b2: 681a ldr r2, [r3, #0]
80184b4: 68fb ldr r3, [r7, #12]
80184b6: 60da str r2, [r3, #12]
udp_pcbs = pcb;
80184b8: 4a07 ldr r2, [pc, #28] ; (80184d8 <udp_bind+0x10c>)
80184ba: 68fb ldr r3, [r7, #12]
80184bc: 6013 str r3, [r2, #0]
}
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to "));
ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, pcb->local_ip);
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->local_port));
return ERR_OK;
80184be: 2300 movs r3, #0
}
80184c0: 4618 mov r0, r3
80184c2: 3718 adds r7, #24
80184c4: 46bd mov sp, r7
80184c6: bd80 pop {r7, pc}
80184c8: 08022ea8 .word 0x08022ea8
80184cc: 08020074 .word 0x08020074
80184d0: 0802033c .word 0x0802033c
80184d4: 080200c8 .word 0x080200c8
80184d8: 2000f814 .word 0x2000f814
080184dc <udp_connect>:
*
* @see udp_disconnect()
*/
err_t
udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
{
80184dc: b580 push {r7, lr}
80184de: b086 sub sp, #24
80184e0: af00 add r7, sp, #0
80184e2: 60f8 str r0, [r7, #12]
80184e4: 60b9 str r1, [r7, #8]
80184e6: 4613 mov r3, r2
80184e8: 80fb strh r3, [r7, #6]
struct udp_pcb *ipcb;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
80184ea: 68fb ldr r3, [r7, #12]
80184ec: 2b00 cmp r3, #0
80184ee: d109 bne.n 8018504 <udp_connect+0x28>
80184f0: 4b2c ldr r3, [pc, #176] ; (80185a4 <udp_connect+0xc8>)
80184f2: f240 4235 movw r2, #1077 ; 0x435
80184f6: 492c ldr r1, [pc, #176] ; (80185a8 <udp_connect+0xcc>)
80184f8: 482c ldr r0, [pc, #176] ; (80185ac <udp_connect+0xd0>)
80184fa: f004 fbfd bl 801ccf8 <iprintf>
80184fe: f06f 030f mvn.w r3, #15
8018502: e04b b.n 801859c <udp_connect+0xc0>
LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
8018504: 68bb ldr r3, [r7, #8]
8018506: 2b00 cmp r3, #0
8018508: d109 bne.n 801851e <udp_connect+0x42>
801850a: 4b26 ldr r3, [pc, #152] ; (80185a4 <udp_connect+0xc8>)
801850c: f240 4236 movw r2, #1078 ; 0x436
8018510: 4927 ldr r1, [pc, #156] ; (80185b0 <udp_connect+0xd4>)
8018512: 4826 ldr r0, [pc, #152] ; (80185ac <udp_connect+0xd0>)
8018514: f004 fbf0 bl 801ccf8 <iprintf>
8018518: f06f 030f mvn.w r3, #15
801851c: e03e b.n 801859c <udp_connect+0xc0>
if (pcb->local_port == 0) {
801851e: 68fb ldr r3, [r7, #12]
8018520: 8a5b ldrh r3, [r3, #18]
8018522: 2b00 cmp r3, #0
8018524: d10f bne.n 8018546 <udp_connect+0x6a>
err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
8018526: 68f9 ldr r1, [r7, #12]
8018528: 68fb ldr r3, [r7, #12]
801852a: 8a5b ldrh r3, [r3, #18]
801852c: 461a mov r2, r3
801852e: 68f8 ldr r0, [r7, #12]
8018530: f7ff ff4c bl 80183cc <udp_bind>
8018534: 4603 mov r3, r0
8018536: 74fb strb r3, [r7, #19]
if (err != ERR_OK) {
8018538: f997 3013 ldrsb.w r3, [r7, #19]
801853c: 2b00 cmp r3, #0
801853e: d002 beq.n 8018546 <udp_connect+0x6a>
return err;
8018540: f997 3013 ldrsb.w r3, [r7, #19]
8018544: e02a b.n 801859c <udp_connect+0xc0>
}
}
ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr);
8018546: 68bb ldr r3, [r7, #8]
8018548: 2b00 cmp r3, #0
801854a: d002 beq.n 8018552 <udp_connect+0x76>
801854c: 68bb ldr r3, [r7, #8]
801854e: 681b ldr r3, [r3, #0]
8018550: e000 b.n 8018554 <udp_connect+0x78>
8018552: 2300 movs r3, #0
8018554: 68fa ldr r2, [r7, #12]
8018556: 6053 str r3, [r2, #4]
ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNKNOWN)) {
ip6_addr_select_zone(ip_2_ip6(&pcb->remote_ip), ip_2_ip6(&pcb->local_ip));
}
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
pcb->remote_port = port;
8018558: 68fb ldr r3, [r7, #12]
801855a: 88fa ldrh r2, [r7, #6]
801855c: 829a strh r2, [r3, #20]
pcb->flags |= UDP_FLAGS_CONNECTED;
801855e: 68fb ldr r3, [r7, #12]
8018560: 7c1b ldrb r3, [r3, #16]
8018562: f043 0304 orr.w r3, r3, #4
8018566: b2da uxtb r2, r3
8018568: 68fb ldr r3, [r7, #12]
801856a: 741a strb r2, [r3, #16]
ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
pcb->remote_ip);
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->remote_port));
/* Insert UDP PCB into the list of active UDP PCBs. */
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
801856c: 4b11 ldr r3, [pc, #68] ; (80185b4 <udp_connect+0xd8>)
801856e: 681b ldr r3, [r3, #0]
8018570: 617b str r3, [r7, #20]
8018572: e008 b.n 8018586 <udp_connect+0xaa>
if (pcb == ipcb) {
8018574: 68fa ldr r2, [r7, #12]
8018576: 697b ldr r3, [r7, #20]
8018578: 429a cmp r2, r3
801857a: d101 bne.n 8018580 <udp_connect+0xa4>
/* already on the list, just return */
return ERR_OK;
801857c: 2300 movs r3, #0
801857e: e00d b.n 801859c <udp_connect+0xc0>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8018580: 697b ldr r3, [r7, #20]
8018582: 68db ldr r3, [r3, #12]
8018584: 617b str r3, [r7, #20]
8018586: 697b ldr r3, [r7, #20]
8018588: 2b00 cmp r3, #0
801858a: d1f3 bne.n 8018574 <udp_connect+0x98>
}
}
/* PCB not yet on the list, add PCB now */
pcb->next = udp_pcbs;
801858c: 4b09 ldr r3, [pc, #36] ; (80185b4 <udp_connect+0xd8>)
801858e: 681a ldr r2, [r3, #0]
8018590: 68fb ldr r3, [r7, #12]
8018592: 60da str r2, [r3, #12]
udp_pcbs = pcb;
8018594: 4a07 ldr r2, [pc, #28] ; (80185b4 <udp_connect+0xd8>)
8018596: 68fb ldr r3, [r7, #12]
8018598: 6013 str r3, [r2, #0]
return ERR_OK;
801859a: 2300 movs r3, #0
}
801859c: 4618 mov r0, r3
801859e: 3718 adds r7, #24
80185a0: 46bd mov sp, r7
80185a2: bd80 pop {r7, pc}
80185a4: 08020074 .word 0x08020074
80185a8: 08020354 .word 0x08020354
80185ac: 080200c8 .word 0x080200c8
80185b0: 08020370 .word 0x08020370
80185b4: 2000f814 .word 0x2000f814
080185b8 <udp_recv>:
* @param recv function pointer of the callback function
* @param recv_arg additional argument to pass to the callback function
*/
void
udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg)
{
80185b8: b580 push {r7, lr}
80185ba: b084 sub sp, #16
80185bc: af00 add r7, sp, #0
80185be: 60f8 str r0, [r7, #12]
80185c0: 60b9 str r1, [r7, #8]
80185c2: 607a str r2, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
80185c4: 68fb ldr r3, [r7, #12]
80185c6: 2b00 cmp r3, #0
80185c8: d107 bne.n 80185da <udp_recv+0x22>
80185ca: 4b08 ldr r3, [pc, #32] ; (80185ec <udp_recv+0x34>)
80185cc: f240 428a movw r2, #1162 ; 0x48a
80185d0: 4907 ldr r1, [pc, #28] ; (80185f0 <udp_recv+0x38>)
80185d2: 4808 ldr r0, [pc, #32] ; (80185f4 <udp_recv+0x3c>)
80185d4: f004 fb90 bl 801ccf8 <iprintf>
80185d8: e005 b.n 80185e6 <udp_recv+0x2e>
/* remember recv() callback and user data */
pcb->recv = recv;
80185da: 68fb ldr r3, [r7, #12]
80185dc: 68ba ldr r2, [r7, #8]
80185de: 619a str r2, [r3, #24]
pcb->recv_arg = recv_arg;
80185e0: 68fb ldr r3, [r7, #12]
80185e2: 687a ldr r2, [r7, #4]
80185e4: 61da str r2, [r3, #28]
}
80185e6: 3710 adds r7, #16
80185e8: 46bd mov sp, r7
80185ea: bd80 pop {r7, pc}
80185ec: 08020074 .word 0x08020074
80185f0: 080203a8 .word 0x080203a8
80185f4: 080200c8 .word 0x080200c8
080185f8 <udp_remove>:
*
* @see udp_new()
*/
void
udp_remove(struct udp_pcb *pcb)
{
80185f8: b580 push {r7, lr}
80185fa: b084 sub sp, #16
80185fc: af00 add r7, sp, #0
80185fe: 6078 str r0, [r7, #4]
struct udp_pcb *pcb2;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
8018600: 687b ldr r3, [r7, #4]
8018602: 2b00 cmp r3, #0
8018604: d107 bne.n 8018616 <udp_remove+0x1e>
8018606: 4b19 ldr r3, [pc, #100] ; (801866c <udp_remove+0x74>)
8018608: f240 42a1 movw r2, #1185 ; 0x4a1
801860c: 4918 ldr r1, [pc, #96] ; (8018670 <udp_remove+0x78>)
801860e: 4819 ldr r0, [pc, #100] ; (8018674 <udp_remove+0x7c>)
8018610: f004 fb72 bl 801ccf8 <iprintf>
8018614: e026 b.n 8018664 <udp_remove+0x6c>
mib2_udp_unbind(pcb);
/* pcb to be removed is first in list? */
if (udp_pcbs == pcb) {
8018616: 4b18 ldr r3, [pc, #96] ; (8018678 <udp_remove+0x80>)
8018618: 681b ldr r3, [r3, #0]
801861a: 687a ldr r2, [r7, #4]
801861c: 429a cmp r2, r3
801861e: d105 bne.n 801862c <udp_remove+0x34>
/* make list start at 2nd pcb */
udp_pcbs = udp_pcbs->next;
8018620: 4b15 ldr r3, [pc, #84] ; (8018678 <udp_remove+0x80>)
8018622: 681b ldr r3, [r3, #0]
8018624: 68db ldr r3, [r3, #12]
8018626: 4a14 ldr r2, [pc, #80] ; (8018678 <udp_remove+0x80>)
8018628: 6013 str r3, [r2, #0]
801862a: e017 b.n 801865c <udp_remove+0x64>
/* pcb not 1st in list */
} else {
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
801862c: 4b12 ldr r3, [pc, #72] ; (8018678 <udp_remove+0x80>)
801862e: 681b ldr r3, [r3, #0]
8018630: 60fb str r3, [r7, #12]
8018632: e010 b.n 8018656 <udp_remove+0x5e>
/* find pcb in udp_pcbs list */
if (pcb2->next != NULL && pcb2->next == pcb) {
8018634: 68fb ldr r3, [r7, #12]
8018636: 68db ldr r3, [r3, #12]
8018638: 2b00 cmp r3, #0
801863a: d009 beq.n 8018650 <udp_remove+0x58>
801863c: 68fb ldr r3, [r7, #12]
801863e: 68db ldr r3, [r3, #12]
8018640: 687a ldr r2, [r7, #4]
8018642: 429a cmp r2, r3
8018644: d104 bne.n 8018650 <udp_remove+0x58>
/* remove pcb from list */
pcb2->next = pcb->next;
8018646: 687b ldr r3, [r7, #4]
8018648: 68da ldr r2, [r3, #12]
801864a: 68fb ldr r3, [r7, #12]
801864c: 60da str r2, [r3, #12]
break;
801864e: e005 b.n 801865c <udp_remove+0x64>
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
8018650: 68fb ldr r3, [r7, #12]
8018652: 68db ldr r3, [r3, #12]
8018654: 60fb str r3, [r7, #12]
8018656: 68fb ldr r3, [r7, #12]
8018658: 2b00 cmp r3, #0
801865a: d1eb bne.n 8018634 <udp_remove+0x3c>
}
}
}
memp_free(MEMP_UDP_PCB, pcb);
801865c: 6879 ldr r1, [r7, #4]
801865e: 2000 movs r0, #0
8018660: f7f8 ff6e bl 8011540 <memp_free>
}
8018664: 3710 adds r7, #16
8018666: 46bd mov sp, r7
8018668: bd80 pop {r7, pc}
801866a: bf00 nop
801866c: 08020074 .word 0x08020074
8018670: 080203c0 .word 0x080203c0
8018674: 080200c8 .word 0x080200c8
8018678: 2000f814 .word 0x2000f814
0801867c <udp_new>:
*
* @see udp_remove()
*/
struct udp_pcb *
udp_new(void)
{
801867c: b580 push {r7, lr}
801867e: b082 sub sp, #8
8018680: af00 add r7, sp, #0
struct udp_pcb *pcb;
LWIP_ASSERT_CORE_LOCKED();
pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB);
8018682: 2000 movs r0, #0
8018684: f7f8 ff0a bl 801149c <memp_malloc>
8018688: 6078 str r0, [r7, #4]
/* could allocate UDP PCB? */
if (pcb != NULL) {
801868a: 687b ldr r3, [r7, #4]
801868c: 2b00 cmp r3, #0
801868e: d007 beq.n 80186a0 <udp_new+0x24>
/* UDP Lite: by initializing to all zeroes, chksum_len is set to 0
* which means checksum is generated over the whole datagram per default
* (recommended as default by RFC 3828). */
/* initialize PCB to all zeroes */
memset(pcb, 0, sizeof(struct udp_pcb));
8018690: 2220 movs r2, #32
8018692: 2100 movs r1, #0
8018694: 6878 ldr r0, [r7, #4]
8018696: f004 fb26 bl 801cce6 <memset>
pcb->ttl = UDP_TTL;
801869a: 687b ldr r3, [r7, #4]
801869c: 22ff movs r2, #255 ; 0xff
801869e: 72da strb r2, [r3, #11]
#if LWIP_MULTICAST_TX_OPTIONS
udp_set_multicast_ttl(pcb, UDP_TTL);
#endif /* LWIP_MULTICAST_TX_OPTIONS */
}
return pcb;
80186a0: 687b ldr r3, [r7, #4]
}
80186a2: 4618 mov r0, r3
80186a4: 3708 adds r7, #8
80186a6: 46bd mov sp, r7
80186a8: bd80 pop {r7, pc}
...
080186ac <udp_netif_ip_addr_changed>:
*
* @param old_addr IP address of the netif before change
* @param new_addr IP address of the netif after change
*/
void udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
{
80186ac: b480 push {r7}
80186ae: b085 sub sp, #20
80186b0: af00 add r7, sp, #0
80186b2: 6078 str r0, [r7, #4]
80186b4: 6039 str r1, [r7, #0]
struct udp_pcb *upcb;
if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) {
80186b6: 687b ldr r3, [r7, #4]
80186b8: 2b00 cmp r3, #0
80186ba: d01e beq.n 80186fa <udp_netif_ip_addr_changed+0x4e>
80186bc: 687b ldr r3, [r7, #4]
80186be: 681b ldr r3, [r3, #0]
80186c0: 2b00 cmp r3, #0
80186c2: d01a beq.n 80186fa <udp_netif_ip_addr_changed+0x4e>
80186c4: 683b ldr r3, [r7, #0]
80186c6: 2b00 cmp r3, #0
80186c8: d017 beq.n 80186fa <udp_netif_ip_addr_changed+0x4e>
80186ca: 683b ldr r3, [r7, #0]
80186cc: 681b ldr r3, [r3, #0]
80186ce: 2b00 cmp r3, #0
80186d0: d013 beq.n 80186fa <udp_netif_ip_addr_changed+0x4e>
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
80186d2: 4b0d ldr r3, [pc, #52] ; (8018708 <udp_netif_ip_addr_changed+0x5c>)
80186d4: 681b ldr r3, [r3, #0]
80186d6: 60fb str r3, [r7, #12]
80186d8: e00c b.n 80186f4 <udp_netif_ip_addr_changed+0x48>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&upcb->local_ip, old_addr)) {
80186da: 68fb ldr r3, [r7, #12]
80186dc: 681a ldr r2, [r3, #0]
80186de: 687b ldr r3, [r7, #4]
80186e0: 681b ldr r3, [r3, #0]
80186e2: 429a cmp r2, r3
80186e4: d103 bne.n 80186ee <udp_netif_ip_addr_changed+0x42>
/* The PCB is bound to the old ipaddr and
* is set to bound to the new one instead */
ip_addr_copy(upcb->local_ip, *new_addr);
80186e6: 683b ldr r3, [r7, #0]
80186e8: 681a ldr r2, [r3, #0]
80186ea: 68fb ldr r3, [r7, #12]
80186ec: 601a str r2, [r3, #0]
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
80186ee: 68fb ldr r3, [r7, #12]
80186f0: 68db ldr r3, [r3, #12]
80186f2: 60fb str r3, [r7, #12]
80186f4: 68fb ldr r3, [r7, #12]
80186f6: 2b00 cmp r3, #0
80186f8: d1ef bne.n 80186da <udp_netif_ip_addr_changed+0x2e>
}
}
}
}
80186fa: bf00 nop
80186fc: 3714 adds r7, #20
80186fe: 46bd mov sp, r7
8018700: f85d 7b04 ldr.w r7, [sp], #4
8018704: 4770 bx lr
8018706: bf00 nop
8018708: 2000f814 .word 0x2000f814
0801870c <dhcp_inc_pcb_refcount>:
static void dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out);
/** Ensure DHCP PCB is allocated and bound */
static err_t
dhcp_inc_pcb_refcount(void)
{
801870c: b580 push {r7, lr}
801870e: af00 add r7, sp, #0
if (dhcp_pcb_refcount == 0) {
8018710: 4b20 ldr r3, [pc, #128] ; (8018794 <dhcp_inc_pcb_refcount+0x88>)
8018712: 781b ldrb r3, [r3, #0]
8018714: 2b00 cmp r3, #0
8018716: d133 bne.n 8018780 <dhcp_inc_pcb_refcount+0x74>
LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL);
8018718: 4b1f ldr r3, [pc, #124] ; (8018798 <dhcp_inc_pcb_refcount+0x8c>)
801871a: 681b ldr r3, [r3, #0]
801871c: 2b00 cmp r3, #0
801871e: d005 beq.n 801872c <dhcp_inc_pcb_refcount+0x20>
8018720: 4b1e ldr r3, [pc, #120] ; (801879c <dhcp_inc_pcb_refcount+0x90>)
8018722: 22e5 movs r2, #229 ; 0xe5
8018724: 491e ldr r1, [pc, #120] ; (80187a0 <dhcp_inc_pcb_refcount+0x94>)
8018726: 481f ldr r0, [pc, #124] ; (80187a4 <dhcp_inc_pcb_refcount+0x98>)
8018728: f004 fae6 bl 801ccf8 <iprintf>
/* allocate UDP PCB */
dhcp_pcb = udp_new();
801872c: f7ff ffa6 bl 801867c <udp_new>
8018730: 4602 mov r2, r0
8018732: 4b19 ldr r3, [pc, #100] ; (8018798 <dhcp_inc_pcb_refcount+0x8c>)
8018734: 601a str r2, [r3, #0]
if (dhcp_pcb == NULL) {
8018736: 4b18 ldr r3, [pc, #96] ; (8018798 <dhcp_inc_pcb_refcount+0x8c>)
8018738: 681b ldr r3, [r3, #0]
801873a: 2b00 cmp r3, #0
801873c: d102 bne.n 8018744 <dhcp_inc_pcb_refcount+0x38>
return ERR_MEM;
801873e: f04f 33ff mov.w r3, #4294967295
8018742: e024 b.n 801878e <dhcp_inc_pcb_refcount+0x82>
}
ip_set_option(dhcp_pcb, SOF_BROADCAST);
8018744: 4b14 ldr r3, [pc, #80] ; (8018798 <dhcp_inc_pcb_refcount+0x8c>)
8018746: 681b ldr r3, [r3, #0]
8018748: 7a5a ldrb r2, [r3, #9]
801874a: 4b13 ldr r3, [pc, #76] ; (8018798 <dhcp_inc_pcb_refcount+0x8c>)
801874c: 681b ldr r3, [r3, #0]
801874e: f042 0220 orr.w r2, r2, #32
8018752: b2d2 uxtb r2, r2
8018754: 725a strb r2, [r3, #9]
/* set up local and remote port for the pcb -> listen on all interfaces on all src/dest IPs */
udp_bind(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_CLIENT);
8018756: 4b10 ldr r3, [pc, #64] ; (8018798 <dhcp_inc_pcb_refcount+0x8c>)
8018758: 681b ldr r3, [r3, #0]
801875a: 2244 movs r2, #68 ; 0x44
801875c: 4912 ldr r1, [pc, #72] ; (80187a8 <dhcp_inc_pcb_refcount+0x9c>)
801875e: 4618 mov r0, r3
8018760: f7ff fe34 bl 80183cc <udp_bind>
udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER);
8018764: 4b0c ldr r3, [pc, #48] ; (8018798 <dhcp_inc_pcb_refcount+0x8c>)
8018766: 681b ldr r3, [r3, #0]
8018768: 2243 movs r2, #67 ; 0x43
801876a: 490f ldr r1, [pc, #60] ; (80187a8 <dhcp_inc_pcb_refcount+0x9c>)
801876c: 4618 mov r0, r3
801876e: f7ff feb5 bl 80184dc <udp_connect>
udp_recv(dhcp_pcb, dhcp_recv, NULL);
8018772: 4b09 ldr r3, [pc, #36] ; (8018798 <dhcp_inc_pcb_refcount+0x8c>)
8018774: 681b ldr r3, [r3, #0]
8018776: 2200 movs r2, #0
8018778: 490c ldr r1, [pc, #48] ; (80187ac <dhcp_inc_pcb_refcount+0xa0>)
801877a: 4618 mov r0, r3
801877c: f7ff ff1c bl 80185b8 <udp_recv>
}
dhcp_pcb_refcount++;
8018780: 4b04 ldr r3, [pc, #16] ; (8018794 <dhcp_inc_pcb_refcount+0x88>)
8018782: 781b ldrb r3, [r3, #0]
8018784: 3301 adds r3, #1
8018786: b2da uxtb r2, r3
8018788: 4b02 ldr r3, [pc, #8] ; (8018794 <dhcp_inc_pcb_refcount+0x88>)
801878a: 701a strb r2, [r3, #0]
return ERR_OK;
801878c: 2300 movs r3, #0
}
801878e: 4618 mov r0, r3
8018790: bd80 pop {r7, pc}
8018792: bf00 nop
8018794: 20008770 .word 0x20008770
8018798: 2000876c .word 0x2000876c
801879c: 080203d8 .word 0x080203d8
80187a0: 08020410 .word 0x08020410
80187a4: 08020438 .word 0x08020438
80187a8: 08022ea8 .word 0x08022ea8
80187ac: 0801a069 .word 0x0801a069
080187b0 <dhcp_dec_pcb_refcount>:
/** Free DHCP PCB if the last netif stops using it */
static void
dhcp_dec_pcb_refcount(void)
{
80187b0: b580 push {r7, lr}
80187b2: af00 add r7, sp, #0
LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
80187b4: 4b0e ldr r3, [pc, #56] ; (80187f0 <dhcp_dec_pcb_refcount+0x40>)
80187b6: 781b ldrb r3, [r3, #0]
80187b8: 2b00 cmp r3, #0
80187ba: d105 bne.n 80187c8 <dhcp_dec_pcb_refcount+0x18>
80187bc: 4b0d ldr r3, [pc, #52] ; (80187f4 <dhcp_dec_pcb_refcount+0x44>)
80187be: 22ff movs r2, #255 ; 0xff
80187c0: 490d ldr r1, [pc, #52] ; (80187f8 <dhcp_dec_pcb_refcount+0x48>)
80187c2: 480e ldr r0, [pc, #56] ; (80187fc <dhcp_dec_pcb_refcount+0x4c>)
80187c4: f004 fa98 bl 801ccf8 <iprintf>
dhcp_pcb_refcount--;
80187c8: 4b09 ldr r3, [pc, #36] ; (80187f0 <dhcp_dec_pcb_refcount+0x40>)
80187ca: 781b ldrb r3, [r3, #0]
80187cc: 3b01 subs r3, #1
80187ce: b2da uxtb r2, r3
80187d0: 4b07 ldr r3, [pc, #28] ; (80187f0 <dhcp_dec_pcb_refcount+0x40>)
80187d2: 701a strb r2, [r3, #0]
if (dhcp_pcb_refcount == 0) {
80187d4: 4b06 ldr r3, [pc, #24] ; (80187f0 <dhcp_dec_pcb_refcount+0x40>)
80187d6: 781b ldrb r3, [r3, #0]
80187d8: 2b00 cmp r3, #0
80187da: d107 bne.n 80187ec <dhcp_dec_pcb_refcount+0x3c>
udp_remove(dhcp_pcb);
80187dc: 4b08 ldr r3, [pc, #32] ; (8018800 <dhcp_dec_pcb_refcount+0x50>)
80187de: 681b ldr r3, [r3, #0]
80187e0: 4618 mov r0, r3
80187e2: f7ff ff09 bl 80185f8 <udp_remove>
dhcp_pcb = NULL;
80187e6: 4b06 ldr r3, [pc, #24] ; (8018800 <dhcp_dec_pcb_refcount+0x50>)
80187e8: 2200 movs r2, #0
80187ea: 601a str r2, [r3, #0]
}
}
80187ec: bf00 nop
80187ee: bd80 pop {r7, pc}
80187f0: 20008770 .word 0x20008770
80187f4: 080203d8 .word 0x080203d8
80187f8: 08020460 .word 0x08020460
80187fc: 08020438 .word 0x08020438
8018800: 2000876c .word 0x2000876c
08018804 <dhcp_handle_nak>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_nak(struct netif *netif)
{
8018804: b580 push {r7, lr}
8018806: b084 sub sp, #16
8018808: af00 add r7, sp, #0
801880a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
801880c: 687b ldr r3, [r7, #4]
801880e: 6a5b ldr r3, [r3, #36] ; 0x24
8018810: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n",
(void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
/* Change to a defined state - set this before assigning the address
to ensure the callback can use dhcp_supplied_address() */
dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF);
8018812: 210c movs r1, #12
8018814: 68f8 ldr r0, [r7, #12]
8018816: f001 f869 bl 80198ec <dhcp_set_state>
/* remove IP address from interface (must no longer be used, as per RFC2131) */
netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
801881a: 4b06 ldr r3, [pc, #24] ; (8018834 <dhcp_handle_nak+0x30>)
801881c: 4a05 ldr r2, [pc, #20] ; (8018834 <dhcp_handle_nak+0x30>)
801881e: 4905 ldr r1, [pc, #20] ; (8018834 <dhcp_handle_nak+0x30>)
8018820: 6878 ldr r0, [r7, #4]
8018822: f7f9 f82f bl 8011884 <netif_set_addr>
/* We can immediately restart discovery */
dhcp_discover(netif);
8018826: 6878 ldr r0, [r7, #4]
8018828: f000 fc5c bl 80190e4 <dhcp_discover>
}
801882c: bf00 nop
801882e: 3710 adds r7, #16
8018830: 46bd mov sp, r7
8018832: bd80 pop {r7, pc}
8018834: 08022ea8 .word 0x08022ea8
08018838 <dhcp_check>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_check(struct netif *netif)
{
8018838: b580 push {r7, lr}
801883a: b084 sub sp, #16
801883c: af00 add r7, sp, #0
801883e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018840: 687b ldr r3, [r7, #4]
8018842: 6a5b ldr r3, [r3, #36] ; 0x24
8018844: 60fb str r3, [r7, #12]
err_t result;
u16_t msecs;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0],
(s16_t)netif->name[1]));
dhcp_set_state(dhcp, DHCP_STATE_CHECKING);
8018846: 2108 movs r1, #8
8018848: 68f8 ldr r0, [r7, #12]
801884a: f001 f84f bl 80198ec <dhcp_set_state>
/* create an ARP query for the offered IP address, expecting that no host
responds, as the IP address should not be in use. */
result = etharp_query(netif, &dhcp->offered_ip_addr, NULL);
801884e: 68fb ldr r3, [r7, #12]
8018850: 331c adds r3, #28
8018852: 2200 movs r2, #0
8018854: 4619 mov r1, r3
8018856: 6878 ldr r0, [r7, #4]
8018858: f002 fb4e bl 801aef8 <etharp_query>
801885c: 4603 mov r3, r0
801885e: 72fb strb r3, [r7, #11]
if (result != ERR_OK) {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_check: could not perform ARP query\n"));
}
if (dhcp->tries < 255) {
8018860: 68fb ldr r3, [r7, #12]
8018862: 799b ldrb r3, [r3, #6]
8018864: 2bff cmp r3, #255 ; 0xff
8018866: d005 beq.n 8018874 <dhcp_check+0x3c>
dhcp->tries++;
8018868: 68fb ldr r3, [r7, #12]
801886a: 799b ldrb r3, [r3, #6]
801886c: 3301 adds r3, #1
801886e: b2da uxtb r2, r3
8018870: 68fb ldr r3, [r7, #12]
8018872: 719a strb r2, [r3, #6]
}
msecs = 500;
8018874: f44f 73fa mov.w r3, #500 ; 0x1f4
8018878: 813b strh r3, [r7, #8]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
801887a: 893b ldrh r3, [r7, #8]
801887c: f203 13f3 addw r3, r3, #499 ; 0x1f3
8018880: 4a06 ldr r2, [pc, #24] ; (801889c <dhcp_check+0x64>)
8018882: fb82 1203 smull r1, r2, r2, r3
8018886: 1152 asrs r2, r2, #5
8018888: 17db asrs r3, r3, #31
801888a: 1ad3 subs r3, r2, r3
801888c: b29a uxth r2, r3
801888e: 68fb ldr r3, [r7, #12]
8018890: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_check(): set request timeout %"U16_F" msecs\n", msecs));
}
8018892: bf00 nop
8018894: 3710 adds r7, #16
8018896: 46bd mov sp, r7
8018898: bd80 pop {r7, pc}
801889a: bf00 nop
801889c: 10624dd3 .word 0x10624dd3
080188a0 <dhcp_handle_offer>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in)
{
80188a0: b580 push {r7, lr}
80188a2: b084 sub sp, #16
80188a4: af00 add r7, sp, #0
80188a6: 6078 str r0, [r7, #4]
80188a8: 6039 str r1, [r7, #0]
struct dhcp *dhcp = netif_dhcp_data(netif);
80188aa: 687b ldr r3, [r7, #4]
80188ac: 6a5b ldr r3, [r3, #36] ; 0x24
80188ae: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n",
(void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
/* obtain the server address */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) {
80188b0: 4b0c ldr r3, [pc, #48] ; (80188e4 <dhcp_handle_offer+0x44>)
80188b2: 789b ldrb r3, [r3, #2]
80188b4: 2b00 cmp r3, #0
80188b6: d011 beq.n 80188dc <dhcp_handle_offer+0x3c>
dhcp->request_timeout = 0; /* stop timer */
80188b8: 68fb ldr r3, [r7, #12]
80188ba: 2200 movs r2, #0
80188bc: 811a strh r2, [r3, #8]
ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID)));
80188be: 4b0a ldr r3, [pc, #40] ; (80188e8 <dhcp_handle_offer+0x48>)
80188c0: 689b ldr r3, [r3, #8]
80188c2: 4618 mov r0, r3
80188c4: f7f8 f949 bl 8010b5a <lwip_htonl>
80188c8: 4602 mov r2, r0
80188ca: 68fb ldr r3, [r7, #12]
80188cc: 619a str r2, [r3, #24]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n",
ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr))));
/* remember offered address */
ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
80188ce: 683b ldr r3, [r7, #0]
80188d0: 691a ldr r2, [r3, #16]
80188d2: 68fb ldr r3, [r7, #12]
80188d4: 61da str r2, [r3, #28]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n",
ip4_addr_get_u32(&dhcp->offered_ip_addr)));
dhcp_select(netif);
80188d6: 6878 ldr r0, [r7, #4]
80188d8: f000 f808 bl 80188ec <dhcp_select>
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("dhcp_handle_offer(netif=%p) did not get server ID!\n", (void *)netif));
}
}
80188dc: bf00 nop
80188de: 3710 adds r7, #16
80188e0: 46bd mov sp, r7
80188e2: bd80 pop {r7, pc}
80188e4: 2000f818 .word 0x2000f818
80188e8: 2000f820 .word 0x2000f820
080188ec <dhcp_select>:
* @param netif the netif under DHCP control
* @return lwIP specific error (see error.h)
*/
static err_t
dhcp_select(struct netif *netif)
{
80188ec: b5b0 push {r4, r5, r7, lr}
80188ee: b08a sub sp, #40 ; 0x28
80188f0: af02 add r7, sp, #8
80188f2: 6078 str r0, [r7, #4]
u16_t msecs;
u8_t i;
struct pbuf *p_out;
u16_t options_out_len;
LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;);
80188f4: 687b ldr r3, [r7, #4]
80188f6: 2b00 cmp r3, #0
80188f8: d109 bne.n 801890e <dhcp_select+0x22>
80188fa: 4b71 ldr r3, [pc, #452] ; (8018ac0 <dhcp_select+0x1d4>)
80188fc: f240 1277 movw r2, #375 ; 0x177
8018900: 4970 ldr r1, [pc, #448] ; (8018ac4 <dhcp_select+0x1d8>)
8018902: 4871 ldr r0, [pc, #452] ; (8018ac8 <dhcp_select+0x1dc>)
8018904: f004 f9f8 bl 801ccf8 <iprintf>
8018908: f06f 030f mvn.w r3, #15
801890c: e0d3 b.n 8018ab6 <dhcp_select+0x1ca>
dhcp = netif_dhcp_data(netif);
801890e: 687b ldr r3, [r7, #4]
8018910: 6a5b ldr r3, [r3, #36] ; 0x24
8018912: 61bb str r3, [r7, #24]
LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
8018914: 69bb ldr r3, [r7, #24]
8018916: 2b00 cmp r3, #0
8018918: d109 bne.n 801892e <dhcp_select+0x42>
801891a: 4b69 ldr r3, [pc, #420] ; (8018ac0 <dhcp_select+0x1d4>)
801891c: f240 1279 movw r2, #377 ; 0x179
8018920: 496a ldr r1, [pc, #424] ; (8018acc <dhcp_select+0x1e0>)
8018922: 4869 ldr r0, [pc, #420] ; (8018ac8 <dhcp_select+0x1dc>)
8018924: f004 f9e8 bl 801ccf8 <iprintf>
8018928: f06f 0305 mvn.w r3, #5
801892c: e0c3 b.n 8018ab6 <dhcp_select+0x1ca>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
dhcp_set_state(dhcp, DHCP_STATE_REQUESTING);
801892e: 2101 movs r1, #1
8018930: 69b8 ldr r0, [r7, #24]
8018932: f000 ffdb bl 80198ec <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
8018936: f107 030c add.w r3, r7, #12
801893a: 2203 movs r2, #3
801893c: 69b9 ldr r1, [r7, #24]
801893e: 6878 ldr r0, [r7, #4]
8018940: f001 fc5e bl 801a200 <dhcp_create_msg>
8018944: 6178 str r0, [r7, #20]
if (p_out != NULL) {
8018946: 697b ldr r3, [r7, #20]
8018948: 2b00 cmp r3, #0
801894a: f000 8085 beq.w 8018a58 <dhcp_select+0x16c>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
801894e: 697b ldr r3, [r7, #20]
8018950: 685b ldr r3, [r3, #4]
8018952: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
8018954: 89b8 ldrh r0, [r7, #12]
8018956: 693b ldr r3, [r7, #16]
8018958: f103 01f0 add.w r1, r3, #240 ; 0xf0
801895c: 2302 movs r3, #2
801895e: 2239 movs r2, #57 ; 0x39
8018960: f000 ffde bl 8019920 <dhcp_option>
8018964: 4603 mov r3, r0
8018966: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
8018968: 89b8 ldrh r0, [r7, #12]
801896a: 693b ldr r3, [r7, #16]
801896c: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018970: 687b ldr r3, [r7, #4]
8018972: 8d1b ldrh r3, [r3, #40] ; 0x28
8018974: 461a mov r2, r3
8018976: f001 f82d bl 80199d4 <dhcp_option_short>
801897a: 4603 mov r3, r0
801897c: 81bb strh r3, [r7, #12]
/* MUST request the offered IP address */
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
801897e: 89b8 ldrh r0, [r7, #12]
8018980: 693b ldr r3, [r7, #16]
8018982: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018986: 2304 movs r3, #4
8018988: 2232 movs r2, #50 ; 0x32
801898a: f000 ffc9 bl 8019920 <dhcp_option>
801898e: 4603 mov r3, r0
8018990: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
8018992: 89bc ldrh r4, [r7, #12]
8018994: 693b ldr r3, [r7, #16]
8018996: f103 05f0 add.w r5, r3, #240 ; 0xf0
801899a: 69bb ldr r3, [r7, #24]
801899c: 69db ldr r3, [r3, #28]
801899e: 4618 mov r0, r3
80189a0: f7f8 f8db bl 8010b5a <lwip_htonl>
80189a4: 4603 mov r3, r0
80189a6: 461a mov r2, r3
80189a8: 4629 mov r1, r5
80189aa: 4620 mov r0, r4
80189ac: f001 f844 bl 8019a38 <dhcp_option_long>
80189b0: 4603 mov r3, r0
80189b2: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
80189b4: 89b8 ldrh r0, [r7, #12]
80189b6: 693b ldr r3, [r7, #16]
80189b8: f103 01f0 add.w r1, r3, #240 ; 0xf0
80189bc: 2304 movs r3, #4
80189be: 2236 movs r2, #54 ; 0x36
80189c0: f000 ffae bl 8019920 <dhcp_option>
80189c4: 4603 mov r3, r0
80189c6: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr))));
80189c8: 89bc ldrh r4, [r7, #12]
80189ca: 693b ldr r3, [r7, #16]
80189cc: f103 05f0 add.w r5, r3, #240 ; 0xf0
80189d0: 69bb ldr r3, [r7, #24]
80189d2: 699b ldr r3, [r3, #24]
80189d4: 4618 mov r0, r3
80189d6: f7f8 f8c0 bl 8010b5a <lwip_htonl>
80189da: 4603 mov r3, r0
80189dc: 461a mov r2, r3
80189de: 4629 mov r1, r5
80189e0: 4620 mov r0, r4
80189e2: f001 f829 bl 8019a38 <dhcp_option_long>
80189e6: 4603 mov r3, r0
80189e8: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
80189ea: 89b8 ldrh r0, [r7, #12]
80189ec: 693b ldr r3, [r7, #16]
80189ee: f103 01f0 add.w r1, r3, #240 ; 0xf0
80189f2: 2303 movs r3, #3
80189f4: 2237 movs r2, #55 ; 0x37
80189f6: f000 ff93 bl 8019920 <dhcp_option>
80189fa: 4603 mov r3, r0
80189fc: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
80189fe: 2300 movs r3, #0
8018a00: 77bb strb r3, [r7, #30]
8018a02: e00e b.n 8018a22 <dhcp_select+0x136>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
8018a04: 89b8 ldrh r0, [r7, #12]
8018a06: 693b ldr r3, [r7, #16]
8018a08: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018a0c: 7fbb ldrb r3, [r7, #30]
8018a0e: 4a30 ldr r2, [pc, #192] ; (8018ad0 <dhcp_select+0x1e4>)
8018a10: 5cd3 ldrb r3, [r2, r3]
8018a12: 461a mov r2, r3
8018a14: f000 ffb8 bl 8019988 <dhcp_option_byte>
8018a18: 4603 mov r3, r0
8018a1a: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
8018a1c: 7fbb ldrb r3, [r7, #30]
8018a1e: 3301 adds r3, #1
8018a20: 77bb strb r3, [r7, #30]
8018a22: 7fbb ldrb r3, [r7, #30]
8018a24: 2b02 cmp r3, #2
8018a26: d9ed bls.n 8018a04 <dhcp_select+0x118>
#if LWIP_NETIF_HOSTNAME
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
#endif /* LWIP_NETIF_HOSTNAME */
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REQUESTING, msg_out, DHCP_REQUEST, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
8018a28: 89b8 ldrh r0, [r7, #12]
8018a2a: 693b ldr r3, [r7, #16]
8018a2c: 33f0 adds r3, #240 ; 0xf0
8018a2e: 697a ldr r2, [r7, #20]
8018a30: 4619 mov r1, r3
8018a32: f001 fcbb bl 801a3ac <dhcp_option_trailer>
/* send broadcast to any DHCP server */
result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
8018a36: 4b27 ldr r3, [pc, #156] ; (8018ad4 <dhcp_select+0x1e8>)
8018a38: 6818 ldr r0, [r3, #0]
8018a3a: 4b27 ldr r3, [pc, #156] ; (8018ad8 <dhcp_select+0x1ec>)
8018a3c: 9301 str r3, [sp, #4]
8018a3e: 687b ldr r3, [r7, #4]
8018a40: 9300 str r3, [sp, #0]
8018a42: 2343 movs r3, #67 ; 0x43
8018a44: 4a25 ldr r2, [pc, #148] ; (8018adc <dhcp_select+0x1f0>)
8018a46: 6979 ldr r1, [r7, #20]
8018a48: f7ff fbda bl 8018200 <udp_sendto_if_src>
8018a4c: 4603 mov r3, r0
8018a4e: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
8018a50: 6978 ldr r0, [r7, #20]
8018a52: f7f9 fc21 bl 8012298 <pbuf_free>
8018a56: e001 b.n 8018a5c <dhcp_select+0x170>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n"));
result = ERR_MEM;
8018a58: 23ff movs r3, #255 ; 0xff
8018a5a: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
8018a5c: 69bb ldr r3, [r7, #24]
8018a5e: 799b ldrb r3, [r3, #6]
8018a60: 2bff cmp r3, #255 ; 0xff
8018a62: d005 beq.n 8018a70 <dhcp_select+0x184>
dhcp->tries++;
8018a64: 69bb ldr r3, [r7, #24]
8018a66: 799b ldrb r3, [r3, #6]
8018a68: 3301 adds r3, #1
8018a6a: b2da uxtb r2, r3
8018a6c: 69bb ldr r3, [r7, #24]
8018a6e: 719a strb r2, [r3, #6]
}
msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
8018a70: 69bb ldr r3, [r7, #24]
8018a72: 799b ldrb r3, [r3, #6]
8018a74: 2b05 cmp r3, #5
8018a76: d80d bhi.n 8018a94 <dhcp_select+0x1a8>
8018a78: 69bb ldr r3, [r7, #24]
8018a7a: 799b ldrb r3, [r3, #6]
8018a7c: 461a mov r2, r3
8018a7e: 2301 movs r3, #1
8018a80: 4093 lsls r3, r2
8018a82: b29b uxth r3, r3
8018a84: 461a mov r2, r3
8018a86: 0152 lsls r2, r2, #5
8018a88: 1ad2 subs r2, r2, r3
8018a8a: 0092 lsls r2, r2, #2
8018a8c: 4413 add r3, r2
8018a8e: 00db lsls r3, r3, #3
8018a90: b29b uxth r3, r3
8018a92: e001 b.n 8018a98 <dhcp_select+0x1ac>
8018a94: f64e 2360 movw r3, #60000 ; 0xea60
8018a98: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
8018a9a: 89fb ldrh r3, [r7, #14]
8018a9c: f203 13f3 addw r3, r3, #499 ; 0x1f3
8018aa0: 4a0f ldr r2, [pc, #60] ; (8018ae0 <dhcp_select+0x1f4>)
8018aa2: fb82 1203 smull r1, r2, r2, r3
8018aa6: 1152 asrs r2, r2, #5
8018aa8: 17db asrs r3, r3, #31
8018aaa: 1ad3 subs r3, r2, r3
8018aac: b29a uxth r2, r3
8018aae: 69bb ldr r3, [r7, #24]
8018ab0: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs));
return result;
8018ab2: f997 301f ldrsb.w r3, [r7, #31]
}
8018ab6: 4618 mov r0, r3
8018ab8: 3720 adds r7, #32
8018aba: 46bd mov sp, r7
8018abc: bdb0 pop {r4, r5, r7, pc}
8018abe: bf00 nop
8018ac0: 080203d8 .word 0x080203d8
8018ac4: 08020484 .word 0x08020484
8018ac8: 08020438 .word 0x08020438
8018acc: 080204a0 .word 0x080204a0
8018ad0: 20000080 .word 0x20000080
8018ad4: 2000876c .word 0x2000876c
8018ad8: 08022ea8 .word 0x08022ea8
8018adc: 08022eac .word 0x08022eac
8018ae0: 10624dd3 .word 0x10624dd3
08018ae4 <dhcp_coarse_tmr>:
* The DHCP timer that checks for lease renewal/rebind timeouts.
* Must be called once a minute (see @ref DHCP_COARSE_TIMER_SECS).
*/
void
dhcp_coarse_tmr(void)
{
8018ae4: b580 push {r7, lr}
8018ae6: b082 sub sp, #8
8018ae8: af00 add r7, sp, #0
struct netif *netif;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n"));
/* iterate through all network interfaces */
NETIF_FOREACH(netif) {
8018aea: 4b27 ldr r3, [pc, #156] ; (8018b88 <dhcp_coarse_tmr+0xa4>)
8018aec: 681b ldr r3, [r3, #0]
8018aee: 607b str r3, [r7, #4]
8018af0: e042 b.n 8018b78 <dhcp_coarse_tmr+0x94>
/* only act on DHCP configured interfaces */
struct dhcp *dhcp = netif_dhcp_data(netif);
8018af2: 687b ldr r3, [r7, #4]
8018af4: 6a5b ldr r3, [r3, #36] ; 0x24
8018af6: 603b str r3, [r7, #0]
if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) {
8018af8: 683b ldr r3, [r7, #0]
8018afa: 2b00 cmp r3, #0
8018afc: d039 beq.n 8018b72 <dhcp_coarse_tmr+0x8e>
8018afe: 683b ldr r3, [r7, #0]
8018b00: 795b ldrb r3, [r3, #5]
8018b02: 2b00 cmp r3, #0
8018b04: d035 beq.n 8018b72 <dhcp_coarse_tmr+0x8e>
/* compare lease time to expire timeout */
if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) {
8018b06: 683b ldr r3, [r7, #0]
8018b08: 8a9b ldrh r3, [r3, #20]
8018b0a: 2b00 cmp r3, #0
8018b0c: d012 beq.n 8018b34 <dhcp_coarse_tmr+0x50>
8018b0e: 683b ldr r3, [r7, #0]
8018b10: 8a5b ldrh r3, [r3, #18]
8018b12: 3301 adds r3, #1
8018b14: b29a uxth r2, r3
8018b16: 683b ldr r3, [r7, #0]
8018b18: 825a strh r2, [r3, #18]
8018b1a: 683b ldr r3, [r7, #0]
8018b1c: 8a5a ldrh r2, [r3, #18]
8018b1e: 683b ldr r3, [r7, #0]
8018b20: 8a9b ldrh r3, [r3, #20]
8018b22: 429a cmp r2, r3
8018b24: d106 bne.n 8018b34 <dhcp_coarse_tmr+0x50>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t0 timeout\n"));
/* this clients' lease time has expired */
dhcp_release_and_stop(netif);
8018b26: 6878 ldr r0, [r7, #4]
8018b28: f000 fe46 bl 80197b8 <dhcp_release_and_stop>
dhcp_start(netif);
8018b2c: 6878 ldr r0, [r7, #4]
8018b2e: f000 f96b bl 8018e08 <dhcp_start>
8018b32: e01e b.n 8018b72 <dhcp_coarse_tmr+0x8e>
/* timer is active (non zero), and triggers (zeroes) now? */
} else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) {
8018b34: 683b ldr r3, [r7, #0]
8018b36: 8a1b ldrh r3, [r3, #16]
8018b38: 2b00 cmp r3, #0
8018b3a: d00b beq.n 8018b54 <dhcp_coarse_tmr+0x70>
8018b3c: 683b ldr r3, [r7, #0]
8018b3e: 8a1b ldrh r3, [r3, #16]
8018b40: 1e5a subs r2, r3, #1
8018b42: b291 uxth r1, r2
8018b44: 683a ldr r2, [r7, #0]
8018b46: 8211 strh r1, [r2, #16]
8018b48: 2b01 cmp r3, #1
8018b4a: d103 bne.n 8018b54 <dhcp_coarse_tmr+0x70>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n"));
/* this clients' rebind timeout triggered */
dhcp_t2_timeout(netif);
8018b4c: 6878 ldr r0, [r7, #4]
8018b4e: f000 f8c7 bl 8018ce0 <dhcp_t2_timeout>
8018b52: e00e b.n 8018b72 <dhcp_coarse_tmr+0x8e>
/* timer is active (non zero), and triggers (zeroes) now */
} else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) {
8018b54: 683b ldr r3, [r7, #0]
8018b56: 89db ldrh r3, [r3, #14]
8018b58: 2b00 cmp r3, #0
8018b5a: d00a beq.n 8018b72 <dhcp_coarse_tmr+0x8e>
8018b5c: 683b ldr r3, [r7, #0]
8018b5e: 89db ldrh r3, [r3, #14]
8018b60: 1e5a subs r2, r3, #1
8018b62: b291 uxth r1, r2
8018b64: 683a ldr r2, [r7, #0]
8018b66: 81d1 strh r1, [r2, #14]
8018b68: 2b01 cmp r3, #1
8018b6a: d102 bne.n 8018b72 <dhcp_coarse_tmr+0x8e>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t1 timeout\n"));
/* this clients' renewal timeout triggered */
dhcp_t1_timeout(netif);
8018b6c: 6878 ldr r0, [r7, #4]
8018b6e: f000 f888 bl 8018c82 <dhcp_t1_timeout>
NETIF_FOREACH(netif) {
8018b72: 687b ldr r3, [r7, #4]
8018b74: 681b ldr r3, [r3, #0]
8018b76: 607b str r3, [r7, #4]
8018b78: 687b ldr r3, [r7, #4]
8018b7a: 2b00 cmp r3, #0
8018b7c: d1b9 bne.n 8018af2 <dhcp_coarse_tmr+0xe>
}
}
}
}
8018b7e: bf00 nop
8018b80: 3708 adds r7, #8
8018b82: 46bd mov sp, r7
8018b84: bd80 pop {r7, pc}
8018b86: bf00 nop
8018b88: 2000f7ec .word 0x2000f7ec
08018b8c <dhcp_fine_tmr>:
* A DHCP server is expected to respond within a short period of time.
* This timer checks whether an outstanding DHCP request is timed out.
*/
void
dhcp_fine_tmr(void)
{
8018b8c: b580 push {r7, lr}
8018b8e: b082 sub sp, #8
8018b90: af00 add r7, sp, #0
struct netif *netif;
/* loop through netif's */
NETIF_FOREACH(netif) {
8018b92: 4b16 ldr r3, [pc, #88] ; (8018bec <dhcp_fine_tmr+0x60>)
8018b94: 681b ldr r3, [r3, #0]
8018b96: 607b str r3, [r7, #4]
8018b98: e020 b.n 8018bdc <dhcp_fine_tmr+0x50>
struct dhcp *dhcp = netif_dhcp_data(netif);
8018b9a: 687b ldr r3, [r7, #4]
8018b9c: 6a5b ldr r3, [r3, #36] ; 0x24
8018b9e: 603b str r3, [r7, #0]
/* only act on DHCP configured interfaces */
if (dhcp != NULL) {
8018ba0: 683b ldr r3, [r7, #0]
8018ba2: 2b00 cmp r3, #0
8018ba4: d017 beq.n 8018bd6 <dhcp_fine_tmr+0x4a>
/* timer is active (non zero), and is about to trigger now */
if (dhcp->request_timeout > 1) {
8018ba6: 683b ldr r3, [r7, #0]
8018ba8: 891b ldrh r3, [r3, #8]
8018baa: 2b01 cmp r3, #1
8018bac: d906 bls.n 8018bbc <dhcp_fine_tmr+0x30>
dhcp->request_timeout--;
8018bae: 683b ldr r3, [r7, #0]
8018bb0: 891b ldrh r3, [r3, #8]
8018bb2: 3b01 subs r3, #1
8018bb4: b29a uxth r2, r3
8018bb6: 683b ldr r3, [r7, #0]
8018bb8: 811a strh r2, [r3, #8]
8018bba: e00c b.n 8018bd6 <dhcp_fine_tmr+0x4a>
} else if (dhcp->request_timeout == 1) {
8018bbc: 683b ldr r3, [r7, #0]
8018bbe: 891b ldrh r3, [r3, #8]
8018bc0: 2b01 cmp r3, #1
8018bc2: d108 bne.n 8018bd6 <dhcp_fine_tmr+0x4a>
dhcp->request_timeout--;
8018bc4: 683b ldr r3, [r7, #0]
8018bc6: 891b ldrh r3, [r3, #8]
8018bc8: 3b01 subs r3, #1
8018bca: b29a uxth r2, r3
8018bcc: 683b ldr r3, [r7, #0]
8018bce: 811a strh r2, [r3, #8]
/* { dhcp->request_timeout == 0 } */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_fine_tmr(): request timeout\n"));
/* this client's request timeout triggered */
dhcp_timeout(netif);
8018bd0: 6878 ldr r0, [r7, #4]
8018bd2: f000 f80d bl 8018bf0 <dhcp_timeout>
NETIF_FOREACH(netif) {
8018bd6: 687b ldr r3, [r7, #4]
8018bd8: 681b ldr r3, [r3, #0]
8018bda: 607b str r3, [r7, #4]
8018bdc: 687b ldr r3, [r7, #4]
8018bde: 2b00 cmp r3, #0
8018be0: d1db bne.n 8018b9a <dhcp_fine_tmr+0xe>
}
}
}
}
8018be2: bf00 nop
8018be4: 3708 adds r7, #8
8018be6: 46bd mov sp, r7
8018be8: bd80 pop {r7, pc}
8018bea: bf00 nop
8018bec: 2000f7ec .word 0x2000f7ec
08018bf0 <dhcp_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_timeout(struct netif *netif)
{
8018bf0: b580 push {r7, lr}
8018bf2: b084 sub sp, #16
8018bf4: af00 add r7, sp, #0
8018bf6: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018bf8: 687b ldr r3, [r7, #4]
8018bfa: 6a5b ldr r3, [r3, #36] ; 0x24
8018bfc: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n"));
/* back-off period has passed, or server selection timed out */
if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) {
8018bfe: 68fb ldr r3, [r7, #12]
8018c00: 795b ldrb r3, [r3, #5]
8018c02: 2b0c cmp r3, #12
8018c04: d003 beq.n 8018c0e <dhcp_timeout+0x1e>
8018c06: 68fb ldr r3, [r7, #12]
8018c08: 795b ldrb r3, [r3, #5]
8018c0a: 2b06 cmp r3, #6
8018c0c: d103 bne.n 8018c16 <dhcp_timeout+0x26>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n"));
dhcp_discover(netif);
8018c0e: 6878 ldr r0, [r7, #4]
8018c10: f000 fa68 bl 80190e4 <dhcp_discover>
dhcp_reboot(netif);
} else {
dhcp_discover(netif);
}
}
}
8018c14: e031 b.n 8018c7a <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_REQUESTING) {
8018c16: 68fb ldr r3, [r7, #12]
8018c18: 795b ldrb r3, [r3, #5]
8018c1a: 2b01 cmp r3, #1
8018c1c: d10e bne.n 8018c3c <dhcp_timeout+0x4c>
if (dhcp->tries <= 5) {
8018c1e: 68fb ldr r3, [r7, #12]
8018c20: 799b ldrb r3, [r3, #6]
8018c22: 2b05 cmp r3, #5
8018c24: d803 bhi.n 8018c2e <dhcp_timeout+0x3e>
dhcp_select(netif);
8018c26: 6878 ldr r0, [r7, #4]
8018c28: f7ff fe60 bl 80188ec <dhcp_select>
}
8018c2c: e025 b.n 8018c7a <dhcp_timeout+0x8a>
dhcp_release_and_stop(netif);
8018c2e: 6878 ldr r0, [r7, #4]
8018c30: f000 fdc2 bl 80197b8 <dhcp_release_and_stop>
dhcp_start(netif);
8018c34: 6878 ldr r0, [r7, #4]
8018c36: f000 f8e7 bl 8018e08 <dhcp_start>
}
8018c3a: e01e b.n 8018c7a <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_CHECKING) {
8018c3c: 68fb ldr r3, [r7, #12]
8018c3e: 795b ldrb r3, [r3, #5]
8018c40: 2b08 cmp r3, #8
8018c42: d10b bne.n 8018c5c <dhcp_timeout+0x6c>
if (dhcp->tries <= 1) {
8018c44: 68fb ldr r3, [r7, #12]
8018c46: 799b ldrb r3, [r3, #6]
8018c48: 2b01 cmp r3, #1
8018c4a: d803 bhi.n 8018c54 <dhcp_timeout+0x64>
dhcp_check(netif);
8018c4c: 6878 ldr r0, [r7, #4]
8018c4e: f7ff fdf3 bl 8018838 <dhcp_check>
}
8018c52: e012 b.n 8018c7a <dhcp_timeout+0x8a>
dhcp_bind(netif);
8018c54: 6878 ldr r0, [r7, #4]
8018c56: f000 fae7 bl 8019228 <dhcp_bind>
}
8018c5a: e00e b.n 8018c7a <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_REBOOTING) {
8018c5c: 68fb ldr r3, [r7, #12]
8018c5e: 795b ldrb r3, [r3, #5]
8018c60: 2b03 cmp r3, #3
8018c62: d10a bne.n 8018c7a <dhcp_timeout+0x8a>
if (dhcp->tries < REBOOT_TRIES) {
8018c64: 68fb ldr r3, [r7, #12]
8018c66: 799b ldrb r3, [r3, #6]
8018c68: 2b01 cmp r3, #1
8018c6a: d803 bhi.n 8018c74 <dhcp_timeout+0x84>
dhcp_reboot(netif);
8018c6c: 6878 ldr r0, [r7, #4]
8018c6e: f000 fced bl 801964c <dhcp_reboot>
}
8018c72: e002 b.n 8018c7a <dhcp_timeout+0x8a>
dhcp_discover(netif);
8018c74: 6878 ldr r0, [r7, #4]
8018c76: f000 fa35 bl 80190e4 <dhcp_discover>
}
8018c7a: bf00 nop
8018c7c: 3710 adds r7, #16
8018c7e: 46bd mov sp, r7
8018c80: bd80 pop {r7, pc}
08018c82 <dhcp_t1_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_t1_timeout(struct netif *netif)
{
8018c82: b580 push {r7, lr}
8018c84: b084 sub sp, #16
8018c86: af00 add r7, sp, #0
8018c88: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018c8a: 687b ldr r3, [r7, #4]
8018c8c: 6a5b ldr r3, [r3, #36] ; 0x24
8018c8e: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_t1_timeout()\n"));
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
8018c90: 68fb ldr r3, [r7, #12]
8018c92: 795b ldrb r3, [r3, #5]
8018c94: 2b01 cmp r3, #1
8018c96: d007 beq.n 8018ca8 <dhcp_t1_timeout+0x26>
8018c98: 68fb ldr r3, [r7, #12]
8018c9a: 795b ldrb r3, [r3, #5]
8018c9c: 2b0a cmp r3, #10
8018c9e: d003 beq.n 8018ca8 <dhcp_t1_timeout+0x26>
(dhcp->state == DHCP_STATE_RENEWING)) {
8018ca0: 68fb ldr r3, [r7, #12]
8018ca2: 795b ldrb r3, [r3, #5]
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
8018ca4: 2b05 cmp r3, #5
8018ca6: d117 bne.n 8018cd8 <dhcp_t1_timeout+0x56>
* eventually time-out if renew tries fail. */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
("dhcp_t1_timeout(): must renew\n"));
/* This slightly different to RFC2131: DHCPREQUEST will be sent from state
DHCP_STATE_RENEWING, not DHCP_STATE_BOUND */
dhcp_renew(netif);
8018ca8: 6878 ldr r0, [r7, #4]
8018caa: f000 fb97 bl 80193dc <dhcp_renew>
/* Calculate next timeout */
if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
8018cae: 68fb ldr r3, [r7, #12]
8018cb0: 899b ldrh r3, [r3, #12]
8018cb2: 461a mov r2, r3
8018cb4: 68fb ldr r3, [r7, #12]
8018cb6: 8a5b ldrh r3, [r3, #18]
8018cb8: 1ad3 subs r3, r2, r3
8018cba: 2b01 cmp r3, #1
8018cbc: dd0c ble.n 8018cd8 <dhcp_t1_timeout+0x56>
dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
8018cbe: 68fb ldr r3, [r7, #12]
8018cc0: 899b ldrh r3, [r3, #12]
8018cc2: 461a mov r2, r3
8018cc4: 68fb ldr r3, [r7, #12]
8018cc6: 8a5b ldrh r3, [r3, #18]
8018cc8: 1ad3 subs r3, r2, r3
8018cca: 2b00 cmp r3, #0
8018ccc: da00 bge.n 8018cd0 <dhcp_t1_timeout+0x4e>
8018cce: 3301 adds r3, #1
8018cd0: 105b asrs r3, r3, #1
8018cd2: b29a uxth r2, r3
8018cd4: 68fb ldr r3, [r7, #12]
8018cd6: 81da strh r2, [r3, #14]
}
}
}
8018cd8: bf00 nop
8018cda: 3710 adds r7, #16
8018cdc: 46bd mov sp, r7
8018cde: bd80 pop {r7, pc}
08018ce0 <dhcp_t2_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_t2_timeout(struct netif *netif)
{
8018ce0: b580 push {r7, lr}
8018ce2: b084 sub sp, #16
8018ce4: af00 add r7, sp, #0
8018ce6: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018ce8: 687b ldr r3, [r7, #4]
8018cea: 6a5b ldr r3, [r3, #36] ; 0x24
8018cec: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t2_timeout()\n"));
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
8018cee: 68fb ldr r3, [r7, #12]
8018cf0: 795b ldrb r3, [r3, #5]
8018cf2: 2b01 cmp r3, #1
8018cf4: d00b beq.n 8018d0e <dhcp_t2_timeout+0x2e>
8018cf6: 68fb ldr r3, [r7, #12]
8018cf8: 795b ldrb r3, [r3, #5]
8018cfa: 2b0a cmp r3, #10
8018cfc: d007 beq.n 8018d0e <dhcp_t2_timeout+0x2e>
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
8018cfe: 68fb ldr r3, [r7, #12]
8018d00: 795b ldrb r3, [r3, #5]
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
8018d02: 2b05 cmp r3, #5
8018d04: d003 beq.n 8018d0e <dhcp_t2_timeout+0x2e>
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
8018d06: 68fb ldr r3, [r7, #12]
8018d08: 795b ldrb r3, [r3, #5]
8018d0a: 2b04 cmp r3, #4
8018d0c: d117 bne.n 8018d3e <dhcp_t2_timeout+0x5e>
/* just retry to rebind */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
("dhcp_t2_timeout(): must rebind\n"));
/* This slightly different to RFC2131: DHCPREQUEST will be sent from state
DHCP_STATE_REBINDING, not DHCP_STATE_BOUND */
dhcp_rebind(netif);
8018d0e: 6878 ldr r0, [r7, #4]
8018d10: f000 fc00 bl 8019514 <dhcp_rebind>
/* Calculate next timeout */
if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
8018d14: 68fb ldr r3, [r7, #12]
8018d16: 8a9b ldrh r3, [r3, #20]
8018d18: 461a mov r2, r3
8018d1a: 68fb ldr r3, [r7, #12]
8018d1c: 8a5b ldrh r3, [r3, #18]
8018d1e: 1ad3 subs r3, r2, r3
8018d20: 2b01 cmp r3, #1
8018d22: dd0c ble.n 8018d3e <dhcp_t2_timeout+0x5e>
dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
8018d24: 68fb ldr r3, [r7, #12]
8018d26: 8a9b ldrh r3, [r3, #20]
8018d28: 461a mov r2, r3
8018d2a: 68fb ldr r3, [r7, #12]
8018d2c: 8a5b ldrh r3, [r3, #18]
8018d2e: 1ad3 subs r3, r2, r3
8018d30: 2b00 cmp r3, #0
8018d32: da00 bge.n 8018d36 <dhcp_t2_timeout+0x56>
8018d34: 3301 adds r3, #1
8018d36: 105b asrs r3, r3, #1
8018d38: b29a uxth r2, r3
8018d3a: 68fb ldr r3, [r7, #12]
8018d3c: 821a strh r2, [r3, #16]
}
}
}
8018d3e: bf00 nop
8018d40: 3710 adds r7, #16
8018d42: 46bd mov sp, r7
8018d44: bd80 pop {r7, pc}
...
08018d48 <dhcp_handle_ack>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in)
{
8018d48: b580 push {r7, lr}
8018d4a: b084 sub sp, #16
8018d4c: af00 add r7, sp, #0
8018d4e: 6078 str r0, [r7, #4]
8018d50: 6039 str r1, [r7, #0]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018d52: 687b ldr r3, [r7, #4]
8018d54: 6a5b ldr r3, [r3, #36] ; 0x24
8018d56: 60fb str r3, [r7, #12]
#if LWIP_DHCP_GET_NTP_SRV
ip4_addr_t ntp_server_addrs[LWIP_DHCP_MAX_NTP_SERVERS];
#endif
/* clear options we might not get from the ACK */
ip4_addr_set_zero(&dhcp->offered_sn_mask);
8018d58: 68fb ldr r3, [r7, #12]
8018d5a: 2200 movs r2, #0
8018d5c: 621a str r2, [r3, #32]
ip4_addr_set_zero(&dhcp->offered_gw_addr);
8018d5e: 68fb ldr r3, [r7, #12]
8018d60: 2200 movs r2, #0
8018d62: 625a str r2, [r3, #36] ; 0x24
#if LWIP_DHCP_BOOTP_FILE
ip4_addr_set_zero(&dhcp->offered_si_addr);
#endif /* LWIP_DHCP_BOOTP_FILE */
/* lease time given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) {
8018d64: 4b26 ldr r3, [pc, #152] ; (8018e00 <dhcp_handle_ack+0xb8>)
8018d66: 78db ldrb r3, [r3, #3]
8018d68: 2b00 cmp r3, #0
8018d6a: d003 beq.n 8018d74 <dhcp_handle_ack+0x2c>
/* remember offered lease time */
dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME);
8018d6c: 4b25 ldr r3, [pc, #148] ; (8018e04 <dhcp_handle_ack+0xbc>)
8018d6e: 68da ldr r2, [r3, #12]
8018d70: 68fb ldr r3, [r7, #12]
8018d72: 629a str r2, [r3, #40] ; 0x28
}
/* renewal period given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) {
8018d74: 4b22 ldr r3, [pc, #136] ; (8018e00 <dhcp_handle_ack+0xb8>)
8018d76: 791b ldrb r3, [r3, #4]
8018d78: 2b00 cmp r3, #0
8018d7a: d004 beq.n 8018d86 <dhcp_handle_ack+0x3e>
/* remember given renewal period */
dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1);
8018d7c: 4b21 ldr r3, [pc, #132] ; (8018e04 <dhcp_handle_ack+0xbc>)
8018d7e: 691a ldr r2, [r3, #16]
8018d80: 68fb ldr r3, [r7, #12]
8018d82: 62da str r2, [r3, #44] ; 0x2c
8018d84: e004 b.n 8018d90 <dhcp_handle_ack+0x48>
} else {
/* calculate safe periods for renewal */
dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2;
8018d86: 68fb ldr r3, [r7, #12]
8018d88: 6a9b ldr r3, [r3, #40] ; 0x28
8018d8a: 085a lsrs r2, r3, #1
8018d8c: 68fb ldr r3, [r7, #12]
8018d8e: 62da str r2, [r3, #44] ; 0x2c
}
/* renewal period given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) {
8018d90: 4b1b ldr r3, [pc, #108] ; (8018e00 <dhcp_handle_ack+0xb8>)
8018d92: 795b ldrb r3, [r3, #5]
8018d94: 2b00 cmp r3, #0
8018d96: d004 beq.n 8018da2 <dhcp_handle_ack+0x5a>
/* remember given rebind period */
dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2);
8018d98: 4b1a ldr r3, [pc, #104] ; (8018e04 <dhcp_handle_ack+0xbc>)
8018d9a: 695a ldr r2, [r3, #20]
8018d9c: 68fb ldr r3, [r7, #12]
8018d9e: 631a str r2, [r3, #48] ; 0x30
8018da0: e007 b.n 8018db2 <dhcp_handle_ack+0x6a>
} else {
/* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/
dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U;
8018da2: 68fb ldr r3, [r7, #12]
8018da4: 6a9a ldr r2, [r3, #40] ; 0x28
8018da6: 4613 mov r3, r2
8018da8: 00db lsls r3, r3, #3
8018daa: 1a9b subs r3, r3, r2
8018dac: 08da lsrs r2, r3, #3
8018dae: 68fb ldr r3, [r7, #12]
8018db0: 631a str r2, [r3, #48] ; 0x30
}
/* (y)our internet address */
ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
8018db2: 683b ldr r3, [r7, #0]
8018db4: 691a ldr r2, [r3, #16]
8018db6: 68fb ldr r3, [r7, #12]
8018db8: 61da str r2, [r3, #28]
boot file name copied in dhcp_parse_reply if not overloaded */
ip4_addr_copy(dhcp->offered_si_addr, msg_in->siaddr);
#endif /* LWIP_DHCP_BOOTP_FILE */
/* subnet mask given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) {
8018dba: 4b11 ldr r3, [pc, #68] ; (8018e00 <dhcp_handle_ack+0xb8>)
8018dbc: 799b ldrb r3, [r3, #6]
8018dbe: 2b00 cmp r3, #0
8018dc0: d00b beq.n 8018dda <dhcp_handle_ack+0x92>
/* remember given subnet mask */
ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)));
8018dc2: 4b10 ldr r3, [pc, #64] ; (8018e04 <dhcp_handle_ack+0xbc>)
8018dc4: 699b ldr r3, [r3, #24]
8018dc6: 4618 mov r0, r3
8018dc8: f7f7 fec7 bl 8010b5a <lwip_htonl>
8018dcc: 4602 mov r2, r0
8018dce: 68fb ldr r3, [r7, #12]
8018dd0: 621a str r2, [r3, #32]
dhcp->subnet_mask_given = 1;
8018dd2: 68fb ldr r3, [r7, #12]
8018dd4: 2201 movs r2, #1
8018dd6: 71da strb r2, [r3, #7]
8018dd8: e002 b.n 8018de0 <dhcp_handle_ack+0x98>
} else {
dhcp->subnet_mask_given = 0;
8018dda: 68fb ldr r3, [r7, #12]
8018ddc: 2200 movs r2, #0
8018dde: 71da strb r2, [r3, #7]
}
/* gateway router */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) {
8018de0: 4b07 ldr r3, [pc, #28] ; (8018e00 <dhcp_handle_ack+0xb8>)
8018de2: 79db ldrb r3, [r3, #7]
8018de4: 2b00 cmp r3, #0
8018de6: d007 beq.n 8018df8 <dhcp_handle_ack+0xb0>
ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER)));
8018de8: 4b06 ldr r3, [pc, #24] ; (8018e04 <dhcp_handle_ack+0xbc>)
8018dea: 69db ldr r3, [r3, #28]
8018dec: 4618 mov r0, r3
8018dee: f7f7 feb4 bl 8010b5a <lwip_htonl>
8018df2: 4602 mov r2, r0
8018df4: 68fb ldr r3, [r7, #12]
8018df6: 625a str r2, [r3, #36] ; 0x24
ip_addr_t dns_addr;
ip_addr_set_ip4_u32_val(dns_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n)));
dns_setserver(n, &dns_addr);
}
#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */
}
8018df8: bf00 nop
8018dfa: 3710 adds r7, #16
8018dfc: 46bd mov sp, r7
8018dfe: bd80 pop {r7, pc}
8018e00: 2000f818 .word 0x2000f818
8018e04: 2000f820 .word 0x2000f820
08018e08 <dhcp_start>:
* - ERR_OK - No error
* - ERR_MEM - Out of memory
*/
err_t
dhcp_start(struct netif *netif)
{
8018e08: b580 push {r7, lr}
8018e0a: b084 sub sp, #16
8018e0c: af00 add r7, sp, #0
8018e0e: 6078 str r0, [r7, #4]
struct dhcp *dhcp;
err_t result;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
8018e10: 687b ldr r3, [r7, #4]
8018e12: 2b00 cmp r3, #0
8018e14: d109 bne.n 8018e2a <dhcp_start+0x22>
8018e16: 4b37 ldr r3, [pc, #220] ; (8018ef4 <dhcp_start+0xec>)
8018e18: f240 22e7 movw r2, #743 ; 0x2e7
8018e1c: 4936 ldr r1, [pc, #216] ; (8018ef8 <dhcp_start+0xf0>)
8018e1e: 4837 ldr r0, [pc, #220] ; (8018efc <dhcp_start+0xf4>)
8018e20: f003 ff6a bl 801ccf8 <iprintf>
8018e24: f06f 030f mvn.w r3, #15
8018e28: e060 b.n 8018eec <dhcp_start+0xe4>
LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
8018e2a: 687b ldr r3, [r7, #4]
8018e2c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8018e30: f003 0301 and.w r3, r3, #1
8018e34: 2b00 cmp r3, #0
8018e36: d109 bne.n 8018e4c <dhcp_start+0x44>
8018e38: 4b2e ldr r3, [pc, #184] ; (8018ef4 <dhcp_start+0xec>)
8018e3a: f44f 723a mov.w r2, #744 ; 0x2e8
8018e3e: 4930 ldr r1, [pc, #192] ; (8018f00 <dhcp_start+0xf8>)
8018e40: 482e ldr r0, [pc, #184] ; (8018efc <dhcp_start+0xf4>)
8018e42: f003 ff59 bl 801ccf8 <iprintf>
8018e46: f06f 030f mvn.w r3, #15
8018e4a: e04f b.n 8018eec <dhcp_start+0xe4>
dhcp = netif_dhcp_data(netif);
8018e4c: 687b ldr r3, [r7, #4]
8018e4e: 6a5b ldr r3, [r3, #36] ; 0x24
8018e50: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
/* check MTU of the netif */
if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) {
8018e52: 687b ldr r3, [r7, #4]
8018e54: 8d1b ldrh r3, [r3, #40] ; 0x28
8018e56: f5b3 7f10 cmp.w r3, #576 ; 0x240
8018e5a: d202 bcs.n 8018e62 <dhcp_start+0x5a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n"));
return ERR_MEM;
8018e5c: f04f 33ff mov.w r3, #4294967295
8018e60: e044 b.n 8018eec <dhcp_start+0xe4>
}
/* no DHCP client attached yet? */
if (dhcp == NULL) {
8018e62: 68fb ldr r3, [r7, #12]
8018e64: 2b00 cmp r3, #0
8018e66: d10d bne.n 8018e84 <dhcp_start+0x7c>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n"));
dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp));
8018e68: 2034 movs r0, #52 ; 0x34
8018e6a: f7f8 f995 bl 8011198 <mem_malloc>
8018e6e: 60f8 str r0, [r7, #12]
if (dhcp == NULL) {
8018e70: 68fb ldr r3, [r7, #12]
8018e72: 2b00 cmp r3, #0
8018e74: d102 bne.n 8018e7c <dhcp_start+0x74>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n"));
return ERR_MEM;
8018e76: f04f 33ff mov.w r3, #4294967295
8018e7a: e037 b.n 8018eec <dhcp_start+0xe4>
}
/* store this dhcp client in the netif */
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
8018e7c: 687b ldr r3, [r7, #4]
8018e7e: 68fa ldr r2, [r7, #12]
8018e80: 625a str r2, [r3, #36] ; 0x24
8018e82: e005 b.n 8018e90 <dhcp_start+0x88>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp"));
/* already has DHCP client attached */
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n"));
if (dhcp->pcb_allocated != 0) {
8018e84: 68fb ldr r3, [r7, #12]
8018e86: 791b ldrb r3, [r3, #4]
8018e88: 2b00 cmp r3, #0
8018e8a: d001 beq.n 8018e90 <dhcp_start+0x88>
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
8018e8c: f7ff fc90 bl 80187b0 <dhcp_dec_pcb_refcount>
}
/* dhcp is cleared below, no need to reset flag*/
}
/* clear data structure */
memset(dhcp, 0, sizeof(struct dhcp));
8018e90: 2234 movs r2, #52 ; 0x34
8018e92: 2100 movs r1, #0
8018e94: 68f8 ldr r0, [r7, #12]
8018e96: f003 ff26 bl 801cce6 <memset>
/* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n"));
if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */
8018e9a: f7ff fc37 bl 801870c <dhcp_inc_pcb_refcount>
8018e9e: 4603 mov r3, r0
8018ea0: 2b00 cmp r3, #0
8018ea2: d002 beq.n 8018eaa <dhcp_start+0xa2>
return ERR_MEM;
8018ea4: f04f 33ff mov.w r3, #4294967295
8018ea8: e020 b.n 8018eec <dhcp_start+0xe4>
}
dhcp->pcb_allocated = 1;
8018eaa: 68fb ldr r3, [r7, #12]
8018eac: 2201 movs r2, #1
8018eae: 711a strb r2, [r3, #4]
if (!netif_is_link_up(netif)) {
8018eb0: 687b ldr r3, [r7, #4]
8018eb2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8018eb6: f003 0304 and.w r3, r3, #4
8018eba: 2b00 cmp r3, #0
8018ebc: d105 bne.n 8018eca <dhcp_start+0xc2>
/* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */
dhcp_set_state(dhcp, DHCP_STATE_INIT);
8018ebe: 2102 movs r1, #2
8018ec0: 68f8 ldr r0, [r7, #12]
8018ec2: f000 fd13 bl 80198ec <dhcp_set_state>
return ERR_OK;
8018ec6: 2300 movs r3, #0
8018ec8: e010 b.n 8018eec <dhcp_start+0xe4>
}
/* (re)start the DHCP negotiation */
result = dhcp_discover(netif);
8018eca: 6878 ldr r0, [r7, #4]
8018ecc: f000 f90a bl 80190e4 <dhcp_discover>
8018ed0: 4603 mov r3, r0
8018ed2: 72fb strb r3, [r7, #11]
if (result != ERR_OK) {
8018ed4: f997 300b ldrsb.w r3, [r7, #11]
8018ed8: 2b00 cmp r3, #0
8018eda: d005 beq.n 8018ee8 <dhcp_start+0xe0>
/* free resources allocated above */
dhcp_release_and_stop(netif);
8018edc: 6878 ldr r0, [r7, #4]
8018ede: f000 fc6b bl 80197b8 <dhcp_release_and_stop>
return ERR_MEM;
8018ee2: f04f 33ff mov.w r3, #4294967295
8018ee6: e001 b.n 8018eec <dhcp_start+0xe4>
}
return result;
8018ee8: f997 300b ldrsb.w r3, [r7, #11]
}
8018eec: 4618 mov r0, r3
8018eee: 3710 adds r7, #16
8018ef0: 46bd mov sp, r7
8018ef2: bd80 pop {r7, pc}
8018ef4: 080203d8 .word 0x080203d8
8018ef8: 080204bc .word 0x080204bc
8018efc: 08020438 .word 0x08020438
8018f00: 08020500 .word 0x08020500
08018f04 <dhcp_network_changed>:
* This enters the REBOOTING state to verify that the currently bound
* address is still valid.
*/
void
dhcp_network_changed(struct netif *netif)
{
8018f04: b580 push {r7, lr}
8018f06: b084 sub sp, #16
8018f08: af00 add r7, sp, #0
8018f0a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018f0c: 687b ldr r3, [r7, #4]
8018f0e: 6a5b ldr r3, [r3, #36] ; 0x24
8018f10: 60fb str r3, [r7, #12]
if (!dhcp) {
8018f12: 68fb ldr r3, [r7, #12]
8018f14: 2b00 cmp r3, #0
8018f16: d037 beq.n 8018f88 <dhcp_network_changed+0x84>
return;
}
switch (dhcp->state) {
8018f18: 68fb ldr r3, [r7, #12]
8018f1a: 795b ldrb r3, [r3, #5]
8018f1c: 2b0a cmp r3, #10
8018f1e: d820 bhi.n 8018f62 <dhcp_network_changed+0x5e>
8018f20: a201 add r2, pc, #4 ; (adr r2, 8018f28 <dhcp_network_changed+0x24>)
8018f22: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8018f26: bf00 nop
8018f28: 08018f8d .word 0x08018f8d
8018f2c: 08018f63 .word 0x08018f63
8018f30: 08018f63 .word 0x08018f63
8018f34: 08018f55 .word 0x08018f55
8018f38: 08018f55 .word 0x08018f55
8018f3c: 08018f55 .word 0x08018f55
8018f40: 08018f63 .word 0x08018f63
8018f44: 08018f63 .word 0x08018f63
8018f48: 08018f63 .word 0x08018f63
8018f4c: 08018f63 .word 0x08018f63
8018f50: 08018f55 .word 0x08018f55
case DHCP_STATE_REBINDING:
case DHCP_STATE_RENEWING:
case DHCP_STATE_BOUND:
case DHCP_STATE_REBOOTING:
dhcp->tries = 0;
8018f54: 68fb ldr r3, [r7, #12]
8018f56: 2200 movs r2, #0
8018f58: 719a strb r2, [r3, #6]
dhcp_reboot(netif);
8018f5a: 6878 ldr r0, [r7, #4]
8018f5c: f000 fb76 bl 801964c <dhcp_reboot>
break;
8018f60: e015 b.n 8018f8e <dhcp_network_changed+0x8a>
case DHCP_STATE_OFF:
/* stay off */
break;
default:
LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
8018f62: 68fb ldr r3, [r7, #12]
8018f64: 795b ldrb r3, [r3, #5]
8018f66: 2b0c cmp r3, #12
8018f68: d906 bls.n 8018f78 <dhcp_network_changed+0x74>
8018f6a: 4b0a ldr r3, [pc, #40] ; (8018f94 <dhcp_network_changed+0x90>)
8018f6c: f240 326d movw r2, #877 ; 0x36d
8018f70: 4909 ldr r1, [pc, #36] ; (8018f98 <dhcp_network_changed+0x94>)
8018f72: 480a ldr r0, [pc, #40] ; (8018f9c <dhcp_network_changed+0x98>)
8018f74: f003 fec0 bl 801ccf8 <iprintf>
autoip_stop(netif);
dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF;
}
#endif /* LWIP_DHCP_AUTOIP_COOP */
/* ensure we start with short timeouts, even if already discovering */
dhcp->tries = 0;
8018f78: 68fb ldr r3, [r7, #12]
8018f7a: 2200 movs r2, #0
8018f7c: 719a strb r2, [r3, #6]
dhcp_discover(netif);
8018f7e: 6878 ldr r0, [r7, #4]
8018f80: f000 f8b0 bl 80190e4 <dhcp_discover>
break;
8018f84: bf00 nop
8018f86: e002 b.n 8018f8e <dhcp_network_changed+0x8a>
return;
8018f88: bf00 nop
8018f8a: e000 b.n 8018f8e <dhcp_network_changed+0x8a>
break;
8018f8c: bf00 nop
}
}
8018f8e: 3710 adds r7, #16
8018f90: 46bd mov sp, r7
8018f92: bd80 pop {r7, pc}
8018f94: 080203d8 .word 0x080203d8
8018f98: 08020524 .word 0x08020524
8018f9c: 08020438 .word 0x08020438
08018fa0 <dhcp_arp_reply>:
* @param netif the network interface on which the reply was received
* @param addr The IP address we received a reply from
*/
void
dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr)
{
8018fa0: b580 push {r7, lr}
8018fa2: b084 sub sp, #16
8018fa4: af00 add r7, sp, #0
8018fa6: 6078 str r0, [r7, #4]
8018fa8: 6039 str r1, [r7, #0]
struct dhcp *dhcp;
LWIP_ERROR("netif != NULL", (netif != NULL), return;);
8018faa: 687b ldr r3, [r7, #4]
8018fac: 2b00 cmp r3, #0
8018fae: d107 bne.n 8018fc0 <dhcp_arp_reply+0x20>
8018fb0: 4b0e ldr r3, [pc, #56] ; (8018fec <dhcp_arp_reply+0x4c>)
8018fb2: f240 328b movw r2, #907 ; 0x38b
8018fb6: 490e ldr r1, [pc, #56] ; (8018ff0 <dhcp_arp_reply+0x50>)
8018fb8: 480e ldr r0, [pc, #56] ; (8018ff4 <dhcp_arp_reply+0x54>)
8018fba: f003 fe9d bl 801ccf8 <iprintf>
8018fbe: e012 b.n 8018fe6 <dhcp_arp_reply+0x46>
dhcp = netif_dhcp_data(netif);
8018fc0: 687b ldr r3, [r7, #4]
8018fc2: 6a5b ldr r3, [r3, #36] ; 0x24
8018fc4: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_arp_reply()\n"));
/* is a DHCP client doing an ARP check? */
if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) {
8018fc6: 68fb ldr r3, [r7, #12]
8018fc8: 2b00 cmp r3, #0
8018fca: d00c beq.n 8018fe6 <dhcp_arp_reply+0x46>
8018fcc: 68fb ldr r3, [r7, #12]
8018fce: 795b ldrb r3, [r3, #5]
8018fd0: 2b08 cmp r3, #8
8018fd2: d108 bne.n 8018fe6 <dhcp_arp_reply+0x46>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n",
ip4_addr_get_u32(addr)));
/* did a host respond with the address we
were offered by the DHCP server? */
if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) {
8018fd4: 683b ldr r3, [r7, #0]
8018fd6: 681a ldr r2, [r3, #0]
8018fd8: 68fb ldr r3, [r7, #12]
8018fda: 69db ldr r3, [r3, #28]
8018fdc: 429a cmp r2, r3
8018fde: d102 bne.n 8018fe6 <dhcp_arp_reply+0x46>
/* we will not accept the offered address */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING,
("dhcp_arp_reply(): arp reply matched with offered address, declining\n"));
dhcp_decline(netif);
8018fe0: 6878 ldr r0, [r7, #4]
8018fe2: f000 f809 bl 8018ff8 <dhcp_decline>
}
}
}
8018fe6: 3710 adds r7, #16
8018fe8: 46bd mov sp, r7
8018fea: bd80 pop {r7, pc}
8018fec: 080203d8 .word 0x080203d8
8018ff0: 080204bc .word 0x080204bc
8018ff4: 08020438 .word 0x08020438
08018ff8 <dhcp_decline>:
*
* @param netif the netif under DHCP control
*/
static err_t
dhcp_decline(struct netif *netif)
{
8018ff8: b5b0 push {r4, r5, r7, lr}
8018ffa: b08a sub sp, #40 ; 0x28
8018ffc: af02 add r7, sp, #8
8018ffe: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8019000: 687b ldr r3, [r7, #4]
8019002: 6a5b ldr r3, [r3, #36] ; 0x24
8019004: 61bb str r3, [r7, #24]
u16_t msecs;
struct pbuf *p_out;
u16_t options_out_len;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n"));
dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF);
8019006: 210c movs r1, #12
8019008: 69b8 ldr r0, [r7, #24]
801900a: f000 fc6f bl 80198ec <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len);
801900e: f107 030c add.w r3, r7, #12
8019012: 2204 movs r2, #4
8019014: 69b9 ldr r1, [r7, #24]
8019016: 6878 ldr r0, [r7, #4]
8019018: f001 f8f2 bl 801a200 <dhcp_create_msg>
801901c: 6178 str r0, [r7, #20]
if (p_out != NULL) {
801901e: 697b ldr r3, [r7, #20]
8019020: 2b00 cmp r3, #0
8019022: d035 beq.n 8019090 <dhcp_decline+0x98>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
8019024: 697b ldr r3, [r7, #20]
8019026: 685b ldr r3, [r3, #4]
8019028: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
801902a: 89b8 ldrh r0, [r7, #12]
801902c: 693b ldr r3, [r7, #16]
801902e: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019032: 2304 movs r3, #4
8019034: 2232 movs r2, #50 ; 0x32
8019036: f000 fc73 bl 8019920 <dhcp_option>
801903a: 4603 mov r3, r0
801903c: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
801903e: 89bc ldrh r4, [r7, #12]
8019040: 693b ldr r3, [r7, #16]
8019042: f103 05f0 add.w r5, r3, #240 ; 0xf0
8019046: 69bb ldr r3, [r7, #24]
8019048: 69db ldr r3, [r3, #28]
801904a: 4618 mov r0, r3
801904c: f7f7 fd85 bl 8010b5a <lwip_htonl>
8019050: 4603 mov r3, r0
8019052: 461a mov r2, r3
8019054: 4629 mov r1, r5
8019056: 4620 mov r0, r4
8019058: f000 fcee bl 8019a38 <dhcp_option_long>
801905c: 4603 mov r3, r0
801905e: 81bb strh r3, [r7, #12]
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_BACKING_OFF, msg_out, DHCP_DECLINE, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
8019060: 89b8 ldrh r0, [r7, #12]
8019062: 693b ldr r3, [r7, #16]
8019064: 33f0 adds r3, #240 ; 0xf0
8019066: 697a ldr r2, [r7, #20]
8019068: 4619 mov r1, r3
801906a: f001 f99f bl 801a3ac <dhcp_option_trailer>
/* per section 4.4.4, broadcast DECLINE messages */
result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
801906e: 4b19 ldr r3, [pc, #100] ; (80190d4 <dhcp_decline+0xdc>)
8019070: 6818 ldr r0, [r3, #0]
8019072: 4b19 ldr r3, [pc, #100] ; (80190d8 <dhcp_decline+0xe0>)
8019074: 9301 str r3, [sp, #4]
8019076: 687b ldr r3, [r7, #4]
8019078: 9300 str r3, [sp, #0]
801907a: 2343 movs r3, #67 ; 0x43
801907c: 4a17 ldr r2, [pc, #92] ; (80190dc <dhcp_decline+0xe4>)
801907e: 6979 ldr r1, [r7, #20]
8019080: f7ff f8be bl 8018200 <udp_sendto_if_src>
8019084: 4603 mov r3, r0
8019086: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
8019088: 6978 ldr r0, [r7, #20]
801908a: f7f9 f905 bl 8012298 <pbuf_free>
801908e: e001 b.n 8019094 <dhcp_decline+0x9c>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("dhcp_decline: could not allocate DHCP request\n"));
result = ERR_MEM;
8019090: 23ff movs r3, #255 ; 0xff
8019092: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
8019094: 69bb ldr r3, [r7, #24]
8019096: 799b ldrb r3, [r3, #6]
8019098: 2bff cmp r3, #255 ; 0xff
801909a: d005 beq.n 80190a8 <dhcp_decline+0xb0>
dhcp->tries++;
801909c: 69bb ldr r3, [r7, #24]
801909e: 799b ldrb r3, [r3, #6]
80190a0: 3301 adds r3, #1
80190a2: b2da uxtb r2, r3
80190a4: 69bb ldr r3, [r7, #24]
80190a6: 719a strb r2, [r3, #6]
}
msecs = 10 * 1000;
80190a8: f242 7310 movw r3, #10000 ; 0x2710
80190ac: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
80190ae: 89fb ldrh r3, [r7, #14]
80190b0: f203 13f3 addw r3, r3, #499 ; 0x1f3
80190b4: 4a0a ldr r2, [pc, #40] ; (80190e0 <dhcp_decline+0xe8>)
80190b6: fb82 1203 smull r1, r2, r2, r3
80190ba: 1152 asrs r2, r2, #5
80190bc: 17db asrs r3, r3, #31
80190be: 1ad3 subs r3, r2, r3
80190c0: b29a uxth r2, r3
80190c2: 69bb ldr r3, [r7, #24]
80190c4: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs));
return result;
80190c6: f997 301f ldrsb.w r3, [r7, #31]
}
80190ca: 4618 mov r0, r3
80190cc: 3720 adds r7, #32
80190ce: 46bd mov sp, r7
80190d0: bdb0 pop {r4, r5, r7, pc}
80190d2: bf00 nop
80190d4: 2000876c .word 0x2000876c
80190d8: 08022ea8 .word 0x08022ea8
80190dc: 08022eac .word 0x08022eac
80190e0: 10624dd3 .word 0x10624dd3
080190e4 <dhcp_discover>:
*
* @param netif the netif under DHCP control
*/
static err_t
dhcp_discover(struct netif *netif)
{
80190e4: b580 push {r7, lr}
80190e6: b08a sub sp, #40 ; 0x28
80190e8: af02 add r7, sp, #8
80190ea: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
80190ec: 687b ldr r3, [r7, #4]
80190ee: 6a5b ldr r3, [r3, #36] ; 0x24
80190f0: 61bb str r3, [r7, #24]
err_t result = ERR_OK;
80190f2: 2300 movs r3, #0
80190f4: 75fb strb r3, [r7, #23]
struct pbuf *p_out;
u16_t options_out_len;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n"));
ip4_addr_set_any(&dhcp->offered_ip_addr);
80190f6: 69bb ldr r3, [r7, #24]
80190f8: 2200 movs r2, #0
80190fa: 61da str r2, [r3, #28]
dhcp_set_state(dhcp, DHCP_STATE_SELECTING);
80190fc: 2106 movs r1, #6
80190fe: 69b8 ldr r0, [r7, #24]
8019100: f000 fbf4 bl 80198ec <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len);
8019104: f107 0308 add.w r3, r7, #8
8019108: 2201 movs r2, #1
801910a: 69b9 ldr r1, [r7, #24]
801910c: 6878 ldr r0, [r7, #4]
801910e: f001 f877 bl 801a200 <dhcp_create_msg>
8019112: 6138 str r0, [r7, #16]
if (p_out != NULL) {
8019114: 693b ldr r3, [r7, #16]
8019116: 2b00 cmp r3, #0
8019118: d04b beq.n 80191b2 <dhcp_discover+0xce>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
801911a: 693b ldr r3, [r7, #16]
801911c: 685b ldr r3, [r3, #4]
801911e: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n"));
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
8019120: 8938 ldrh r0, [r7, #8]
8019122: 68fb ldr r3, [r7, #12]
8019124: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019128: 2302 movs r3, #2
801912a: 2239 movs r2, #57 ; 0x39
801912c: f000 fbf8 bl 8019920 <dhcp_option>
8019130: 4603 mov r3, r0
8019132: 813b strh r3, [r7, #8]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
8019134: 8938 ldrh r0, [r7, #8]
8019136: 68fb ldr r3, [r7, #12]
8019138: f103 01f0 add.w r1, r3, #240 ; 0xf0
801913c: 687b ldr r3, [r7, #4]
801913e: 8d1b ldrh r3, [r3, #40] ; 0x28
8019140: 461a mov r2, r3
8019142: f000 fc47 bl 80199d4 <dhcp_option_short>
8019146: 4603 mov r3, r0
8019148: 813b strh r3, [r7, #8]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
801914a: 8938 ldrh r0, [r7, #8]
801914c: 68fb ldr r3, [r7, #12]
801914e: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019152: 2303 movs r3, #3
8019154: 2237 movs r2, #55 ; 0x37
8019156: f000 fbe3 bl 8019920 <dhcp_option>
801915a: 4603 mov r3, r0
801915c: 813b strh r3, [r7, #8]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
801915e: 2300 movs r3, #0
8019160: 77fb strb r3, [r7, #31]
8019162: e00e b.n 8019182 <dhcp_discover+0x9e>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
8019164: 8938 ldrh r0, [r7, #8]
8019166: 68fb ldr r3, [r7, #12]
8019168: f103 01f0 add.w r1, r3, #240 ; 0xf0
801916c: 7ffb ldrb r3, [r7, #31]
801916e: 4a29 ldr r2, [pc, #164] ; (8019214 <dhcp_discover+0x130>)
8019170: 5cd3 ldrb r3, [r2, r3]
8019172: 461a mov r2, r3
8019174: f000 fc08 bl 8019988 <dhcp_option_byte>
8019178: 4603 mov r3, r0
801917a: 813b strh r3, [r7, #8]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
801917c: 7ffb ldrb r3, [r7, #31]
801917e: 3301 adds r3, #1
8019180: 77fb strb r3, [r7, #31]
8019182: 7ffb ldrb r3, [r7, #31]
8019184: 2b02 cmp r3, #2
8019186: d9ed bls.n 8019164 <dhcp_discover+0x80>
}
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_SELECTING, msg_out, DHCP_DISCOVER, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
8019188: 8938 ldrh r0, [r7, #8]
801918a: 68fb ldr r3, [r7, #12]
801918c: 33f0 adds r3, #240 ; 0xf0
801918e: 693a ldr r2, [r7, #16]
8019190: 4619 mov r1, r3
8019192: f001 f90b bl 801a3ac <dhcp_option_trailer>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)\n"));
udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
8019196: 4b20 ldr r3, [pc, #128] ; (8019218 <dhcp_discover+0x134>)
8019198: 6818 ldr r0, [r3, #0]
801919a: 4b20 ldr r3, [pc, #128] ; (801921c <dhcp_discover+0x138>)
801919c: 9301 str r3, [sp, #4]
801919e: 687b ldr r3, [r7, #4]
80191a0: 9300 str r3, [sp, #0]
80191a2: 2343 movs r3, #67 ; 0x43
80191a4: 4a1e ldr r2, [pc, #120] ; (8019220 <dhcp_discover+0x13c>)
80191a6: 6939 ldr r1, [r7, #16]
80191a8: f7ff f82a bl 8018200 <udp_sendto_if_src>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n"));
pbuf_free(p_out);
80191ac: 6938 ldr r0, [r7, #16]
80191ae: f7f9 f873 bl 8012298 <pbuf_free>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n"));
}
if (dhcp->tries < 255) {
80191b2: 69bb ldr r3, [r7, #24]
80191b4: 799b ldrb r3, [r3, #6]
80191b6: 2bff cmp r3, #255 ; 0xff
80191b8: d005 beq.n 80191c6 <dhcp_discover+0xe2>
dhcp->tries++;
80191ba: 69bb ldr r3, [r7, #24]
80191bc: 799b ldrb r3, [r3, #6]
80191be: 3301 adds r3, #1
80191c0: b2da uxtb r2, r3
80191c2: 69bb ldr r3, [r7, #24]
80191c4: 719a strb r2, [r3, #6]
if (dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) {
dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON;
autoip_start(netif);
}
#endif /* LWIP_DHCP_AUTOIP_COOP */
msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
80191c6: 69bb ldr r3, [r7, #24]
80191c8: 799b ldrb r3, [r3, #6]
80191ca: 2b05 cmp r3, #5
80191cc: d80d bhi.n 80191ea <dhcp_discover+0x106>
80191ce: 69bb ldr r3, [r7, #24]
80191d0: 799b ldrb r3, [r3, #6]
80191d2: 461a mov r2, r3
80191d4: 2301 movs r3, #1
80191d6: 4093 lsls r3, r2
80191d8: b29b uxth r3, r3
80191da: 461a mov r2, r3
80191dc: 0152 lsls r2, r2, #5
80191de: 1ad2 subs r2, r2, r3
80191e0: 0092 lsls r2, r2, #2
80191e2: 4413 add r3, r2
80191e4: 00db lsls r3, r3, #3
80191e6: b29b uxth r3, r3
80191e8: e001 b.n 80191ee <dhcp_discover+0x10a>
80191ea: f64e 2360 movw r3, #60000 ; 0xea60
80191ee: 817b strh r3, [r7, #10]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
80191f0: 897b ldrh r3, [r7, #10]
80191f2: f203 13f3 addw r3, r3, #499 ; 0x1f3
80191f6: 4a0b ldr r2, [pc, #44] ; (8019224 <dhcp_discover+0x140>)
80191f8: fb82 1203 smull r1, r2, r2, r3
80191fc: 1152 asrs r2, r2, #5
80191fe: 17db asrs r3, r3, #31
8019200: 1ad3 subs r3, r2, r3
8019202: b29a uxth r2, r3
8019204: 69bb ldr r3, [r7, #24]
8019206: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs));
return result;
8019208: f997 3017 ldrsb.w r3, [r7, #23]
}
801920c: 4618 mov r0, r3
801920e: 3720 adds r7, #32
8019210: 46bd mov sp, r7
8019212: bd80 pop {r7, pc}
8019214: 20000080 .word 0x20000080
8019218: 2000876c .word 0x2000876c
801921c: 08022ea8 .word 0x08022ea8
8019220: 08022eac .word 0x08022eac
8019224: 10624dd3 .word 0x10624dd3
08019228 <dhcp_bind>:
*
* @param netif network interface to bind to the offered address
*/
static void
dhcp_bind(struct netif *netif)
{
8019228: b580 push {r7, lr}
801922a: b088 sub sp, #32
801922c: af00 add r7, sp, #0
801922e: 6078 str r0, [r7, #4]
u32_t timeout;
struct dhcp *dhcp;
ip4_addr_t sn_mask, gw_addr;
LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;);
8019230: 687b ldr r3, [r7, #4]
8019232: 2b00 cmp r3, #0
8019234: d107 bne.n 8019246 <dhcp_bind+0x1e>
8019236: 4b64 ldr r3, [pc, #400] ; (80193c8 <dhcp_bind+0x1a0>)
8019238: f240 4215 movw r2, #1045 ; 0x415
801923c: 4963 ldr r1, [pc, #396] ; (80193cc <dhcp_bind+0x1a4>)
801923e: 4864 ldr r0, [pc, #400] ; (80193d0 <dhcp_bind+0x1a8>)
8019240: f003 fd5a bl 801ccf8 <iprintf>
8019244: e0bc b.n 80193c0 <dhcp_bind+0x198>
dhcp = netif_dhcp_data(netif);
8019246: 687b ldr r3, [r7, #4]
8019248: 6a5b ldr r3, [r3, #36] ; 0x24
801924a: 61bb str r3, [r7, #24]
LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
801924c: 69bb ldr r3, [r7, #24]
801924e: 2b00 cmp r3, #0
8019250: d107 bne.n 8019262 <dhcp_bind+0x3a>
8019252: 4b5d ldr r3, [pc, #372] ; (80193c8 <dhcp_bind+0x1a0>)
8019254: f240 4217 movw r2, #1047 ; 0x417
8019258: 495e ldr r1, [pc, #376] ; (80193d4 <dhcp_bind+0x1ac>)
801925a: 485d ldr r0, [pc, #372] ; (80193d0 <dhcp_bind+0x1a8>)
801925c: f003 fd4c bl 801ccf8 <iprintf>
8019260: e0ae b.n 80193c0 <dhcp_bind+0x198>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void *)netif, netif->name[0], netif->name[1], (u16_t)netif->num));
/* reset time used of lease */
dhcp->lease_used = 0;
8019262: 69bb ldr r3, [r7, #24]
8019264: 2200 movs r2, #0
8019266: 825a strh r2, [r3, #18]
if (dhcp->offered_t0_lease != 0xffffffffUL) {
8019268: 69bb ldr r3, [r7, #24]
801926a: 6a9b ldr r3, [r3, #40] ; 0x28
801926c: f1b3 3fff cmp.w r3, #4294967295
8019270: d019 beq.n 80192a6 <dhcp_bind+0x7e>
/* set renewal period timer */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t0 renewal timer %"U32_F" secs\n", dhcp->offered_t0_lease));
timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
8019272: 69bb ldr r3, [r7, #24]
8019274: 6a9b ldr r3, [r3, #40] ; 0x28
8019276: 331e adds r3, #30
8019278: 4a57 ldr r2, [pc, #348] ; (80193d8 <dhcp_bind+0x1b0>)
801927a: fba2 2303 umull r2, r3, r2, r3
801927e: 095b lsrs r3, r3, #5
8019280: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
8019282: 69fb ldr r3, [r7, #28]
8019284: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8019288: d302 bcc.n 8019290 <dhcp_bind+0x68>
timeout = 0xffff;
801928a: f64f 73ff movw r3, #65535 ; 0xffff
801928e: 61fb str r3, [r7, #28]
}
dhcp->t0_timeout = (u16_t)timeout;
8019290: 69fb ldr r3, [r7, #28]
8019292: b29a uxth r2, r3
8019294: 69bb ldr r3, [r7, #24]
8019296: 829a strh r2, [r3, #20]
if (dhcp->t0_timeout == 0) {
8019298: 69bb ldr r3, [r7, #24]
801929a: 8a9b ldrh r3, [r3, #20]
801929c: 2b00 cmp r3, #0
801929e: d102 bne.n 80192a6 <dhcp_bind+0x7e>
dhcp->t0_timeout = 1;
80192a0: 69bb ldr r3, [r7, #24]
80192a2: 2201 movs r2, #1
80192a4: 829a strh r2, [r3, #20]
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t0_lease * 1000));
}
/* temporary DHCP lease? */
if (dhcp->offered_t1_renew != 0xffffffffUL) {
80192a6: 69bb ldr r3, [r7, #24]
80192a8: 6adb ldr r3, [r3, #44] ; 0x2c
80192aa: f1b3 3fff cmp.w r3, #4294967295
80192ae: d01d beq.n 80192ec <dhcp_bind+0xc4>
/* set renewal period timer */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t1 renewal timer %"U32_F" secs\n", dhcp->offered_t1_renew));
timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
80192b0: 69bb ldr r3, [r7, #24]
80192b2: 6adb ldr r3, [r3, #44] ; 0x2c
80192b4: 331e adds r3, #30
80192b6: 4a48 ldr r2, [pc, #288] ; (80193d8 <dhcp_bind+0x1b0>)
80192b8: fba2 2303 umull r2, r3, r2, r3
80192bc: 095b lsrs r3, r3, #5
80192be: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
80192c0: 69fb ldr r3, [r7, #28]
80192c2: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80192c6: d302 bcc.n 80192ce <dhcp_bind+0xa6>
timeout = 0xffff;
80192c8: f64f 73ff movw r3, #65535 ; 0xffff
80192cc: 61fb str r3, [r7, #28]
}
dhcp->t1_timeout = (u16_t)timeout;
80192ce: 69fb ldr r3, [r7, #28]
80192d0: b29a uxth r2, r3
80192d2: 69bb ldr r3, [r7, #24]
80192d4: 815a strh r2, [r3, #10]
if (dhcp->t1_timeout == 0) {
80192d6: 69bb ldr r3, [r7, #24]
80192d8: 895b ldrh r3, [r3, #10]
80192da: 2b00 cmp r3, #0
80192dc: d102 bne.n 80192e4 <dhcp_bind+0xbc>
dhcp->t1_timeout = 1;
80192de: 69bb ldr r3, [r7, #24]
80192e0: 2201 movs r2, #1
80192e2: 815a strh r2, [r3, #10]
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew * 1000));
dhcp->t1_renew_time = dhcp->t1_timeout;
80192e4: 69bb ldr r3, [r7, #24]
80192e6: 895a ldrh r2, [r3, #10]
80192e8: 69bb ldr r3, [r7, #24]
80192ea: 81da strh r2, [r3, #14]
}
/* set renewal period timer */
if (dhcp->offered_t2_rebind != 0xffffffffUL) {
80192ec: 69bb ldr r3, [r7, #24]
80192ee: 6b1b ldr r3, [r3, #48] ; 0x30
80192f0: f1b3 3fff cmp.w r3, #4294967295
80192f4: d01d beq.n 8019332 <dhcp_bind+0x10a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t2 rebind timer %"U32_F" secs\n", dhcp->offered_t2_rebind));
timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
80192f6: 69bb ldr r3, [r7, #24]
80192f8: 6b1b ldr r3, [r3, #48] ; 0x30
80192fa: 331e adds r3, #30
80192fc: 4a36 ldr r2, [pc, #216] ; (80193d8 <dhcp_bind+0x1b0>)
80192fe: fba2 2303 umull r2, r3, r2, r3
8019302: 095b lsrs r3, r3, #5
8019304: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
8019306: 69fb ldr r3, [r7, #28]
8019308: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
801930c: d302 bcc.n 8019314 <dhcp_bind+0xec>
timeout = 0xffff;
801930e: f64f 73ff movw r3, #65535 ; 0xffff
8019312: 61fb str r3, [r7, #28]
}
dhcp->t2_timeout = (u16_t)timeout;
8019314: 69fb ldr r3, [r7, #28]
8019316: b29a uxth r2, r3
8019318: 69bb ldr r3, [r7, #24]
801931a: 819a strh r2, [r3, #12]
if (dhcp->t2_timeout == 0) {
801931c: 69bb ldr r3, [r7, #24]
801931e: 899b ldrh r3, [r3, #12]
8019320: 2b00 cmp r3, #0
8019322: d102 bne.n 801932a <dhcp_bind+0x102>
dhcp->t2_timeout = 1;
8019324: 69bb ldr r3, [r7, #24]
8019326: 2201 movs r2, #1
8019328: 819a strh r2, [r3, #12]
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind * 1000));
dhcp->t2_rebind_time = dhcp->t2_timeout;
801932a: 69bb ldr r3, [r7, #24]
801932c: 899a ldrh r2, [r3, #12]
801932e: 69bb ldr r3, [r7, #24]
8019330: 821a strh r2, [r3, #16]
}
/* If we have sub 1 minute lease, t2 and t1 will kick in at the same time. */
if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) {
8019332: 69bb ldr r3, [r7, #24]
8019334: 895a ldrh r2, [r3, #10]
8019336: 69bb ldr r3, [r7, #24]
8019338: 899b ldrh r3, [r3, #12]
801933a: 429a cmp r2, r3
801933c: d306 bcc.n 801934c <dhcp_bind+0x124>
801933e: 69bb ldr r3, [r7, #24]
8019340: 899b ldrh r3, [r3, #12]
8019342: 2b00 cmp r3, #0
8019344: d002 beq.n 801934c <dhcp_bind+0x124>
dhcp->t1_timeout = 0;
8019346: 69bb ldr r3, [r7, #24]
8019348: 2200 movs r2, #0
801934a: 815a strh r2, [r3, #10]
}
if (dhcp->subnet_mask_given) {
801934c: 69bb ldr r3, [r7, #24]
801934e: 79db ldrb r3, [r3, #7]
8019350: 2b00 cmp r3, #0
8019352: d003 beq.n 801935c <dhcp_bind+0x134>
/* copy offered network mask */
ip4_addr_copy(sn_mask, dhcp->offered_sn_mask);
8019354: 69bb ldr r3, [r7, #24]
8019356: 6a1b ldr r3, [r3, #32]
8019358: 613b str r3, [r7, #16]
801935a: e014 b.n 8019386 <dhcp_bind+0x15e>
} else {
/* subnet mask not given, choose a safe subnet mask given the network class */
u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr);
801935c: 69bb ldr r3, [r7, #24]
801935e: 331c adds r3, #28
8019360: 781b ldrb r3, [r3, #0]
8019362: 75fb strb r3, [r7, #23]
if (first_octet <= 127) {
8019364: f997 3017 ldrsb.w r3, [r7, #23]
8019368: 2b00 cmp r3, #0
801936a: db02 blt.n 8019372 <dhcp_bind+0x14a>
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL));
801936c: 23ff movs r3, #255 ; 0xff
801936e: 613b str r3, [r7, #16]
8019370: e009 b.n 8019386 <dhcp_bind+0x15e>
} else if (first_octet >= 192) {
8019372: 7dfb ldrb r3, [r7, #23]
8019374: 2bbf cmp r3, #191 ; 0xbf
8019376: d903 bls.n 8019380 <dhcp_bind+0x158>
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL));
8019378: f06f 437f mvn.w r3, #4278190080 ; 0xff000000
801937c: 613b str r3, [r7, #16]
801937e: e002 b.n 8019386 <dhcp_bind+0x15e>
} else {
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL));
8019380: f64f 73ff movw r3, #65535 ; 0xffff
8019384: 613b str r3, [r7, #16]
}
}
ip4_addr_copy(gw_addr, dhcp->offered_gw_addr);
8019386: 69bb ldr r3, [r7, #24]
8019388: 6a5b ldr r3, [r3, #36] ; 0x24
801938a: 60fb str r3, [r7, #12]
/* gateway address not given? */
if (ip4_addr_isany_val(gw_addr)) {
801938c: 68fb ldr r3, [r7, #12]
801938e: 2b00 cmp r3, #0
8019390: d108 bne.n 80193a4 <dhcp_bind+0x17c>
/* copy network address */
ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask);
8019392: 69bb ldr r3, [r7, #24]
8019394: 69da ldr r2, [r3, #28]
8019396: 693b ldr r3, [r7, #16]
8019398: 4013 ands r3, r2
801939a: 60fb str r3, [r7, #12]
/* use first host address on network as gateway */
ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL));
801939c: 68fb ldr r3, [r7, #12]
801939e: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
80193a2: 60fb str r3, [r7, #12]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F" SN: 0x%08"X32_F" GW: 0x%08"X32_F"\n",
ip4_addr_get_u32(&dhcp->offered_ip_addr), ip4_addr_get_u32(&sn_mask), ip4_addr_get_u32(&gw_addr)));
/* netif is now bound to DHCP leased address - set this before assigning the address
to ensure the callback can use dhcp_supplied_address() */
dhcp_set_state(dhcp, DHCP_STATE_BOUND);
80193a4: 210a movs r1, #10
80193a6: 69b8 ldr r0, [r7, #24]
80193a8: f000 faa0 bl 80198ec <dhcp_set_state>
netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr);
80193ac: 69bb ldr r3, [r7, #24]
80193ae: f103 011c add.w r1, r3, #28
80193b2: f107 030c add.w r3, r7, #12
80193b6: f107 0210 add.w r2, r7, #16
80193ba: 6878 ldr r0, [r7, #4]
80193bc: f7f8 fa62 bl 8011884 <netif_set_addr>
/* interface is used by routing now that an address is set */
}
80193c0: 3720 adds r7, #32
80193c2: 46bd mov sp, r7
80193c4: bd80 pop {r7, pc}
80193c6: bf00 nop
80193c8: 080203d8 .word 0x080203d8
80193cc: 08020538 .word 0x08020538
80193d0: 08020438 .word 0x08020438
80193d4: 08020554 .word 0x08020554
80193d8: 88888889 .word 0x88888889
080193dc <dhcp_renew>:
*
* @param netif network interface which must renew its lease
*/
err_t
dhcp_renew(struct netif *netif)
{
80193dc: b580 push {r7, lr}
80193de: b08a sub sp, #40 ; 0x28
80193e0: af02 add r7, sp, #8
80193e2: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
80193e4: 687b ldr r3, [r7, #4]
80193e6: 6a5b ldr r3, [r3, #36] ; 0x24
80193e8: 61bb str r3, [r7, #24]
struct pbuf *p_out;
u16_t options_out_len;
LWIP_ASSERT_CORE_LOCKED();
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n"));
dhcp_set_state(dhcp, DHCP_STATE_RENEWING);
80193ea: 2105 movs r1, #5
80193ec: 69b8 ldr r0, [r7, #24]
80193ee: f000 fa7d bl 80198ec <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
80193f2: f107 030c add.w r3, r7, #12
80193f6: 2203 movs r2, #3
80193f8: 69b9 ldr r1, [r7, #24]
80193fa: 6878 ldr r0, [r7, #4]
80193fc: f000 ff00 bl 801a200 <dhcp_create_msg>
8019400: 6178 str r0, [r7, #20]
if (p_out != NULL) {
8019402: 697b ldr r3, [r7, #20]
8019404: 2b00 cmp r3, #0
8019406: d04e beq.n 80194a6 <dhcp_renew+0xca>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
8019408: 697b ldr r3, [r7, #20]
801940a: 685b ldr r3, [r3, #4]
801940c: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
801940e: 89b8 ldrh r0, [r7, #12]
8019410: 693b ldr r3, [r7, #16]
8019412: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019416: 2302 movs r3, #2
8019418: 2239 movs r2, #57 ; 0x39
801941a: f000 fa81 bl 8019920 <dhcp_option>
801941e: 4603 mov r3, r0
8019420: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
8019422: 89b8 ldrh r0, [r7, #12]
8019424: 693b ldr r3, [r7, #16]
8019426: f103 01f0 add.w r1, r3, #240 ; 0xf0
801942a: 687b ldr r3, [r7, #4]
801942c: 8d1b ldrh r3, [r3, #40] ; 0x28
801942e: 461a mov r2, r3
8019430: f000 fad0 bl 80199d4 <dhcp_option_short>
8019434: 4603 mov r3, r0
8019436: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
8019438: 89b8 ldrh r0, [r7, #12]
801943a: 693b ldr r3, [r7, #16]
801943c: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019440: 2303 movs r3, #3
8019442: 2237 movs r2, #55 ; 0x37
8019444: f000 fa6c bl 8019920 <dhcp_option>
8019448: 4603 mov r3, r0
801944a: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
801944c: 2300 movs r3, #0
801944e: 77bb strb r3, [r7, #30]
8019450: e00e b.n 8019470 <dhcp_renew+0x94>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
8019452: 89b8 ldrh r0, [r7, #12]
8019454: 693b ldr r3, [r7, #16]
8019456: f103 01f0 add.w r1, r3, #240 ; 0xf0
801945a: 7fbb ldrb r3, [r7, #30]
801945c: 4a2a ldr r2, [pc, #168] ; (8019508 <dhcp_renew+0x12c>)
801945e: 5cd3 ldrb r3, [r2, r3]
8019460: 461a mov r2, r3
8019462: f000 fa91 bl 8019988 <dhcp_option_byte>
8019466: 4603 mov r3, r0
8019468: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
801946a: 7fbb ldrb r3, [r7, #30]
801946c: 3301 adds r3, #1
801946e: 77bb strb r3, [r7, #30]
8019470: 7fbb ldrb r3, [r7, #30]
8019472: 2b02 cmp r3, #2
8019474: d9ed bls.n 8019452 <dhcp_renew+0x76>
#if LWIP_NETIF_HOSTNAME
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
#endif /* LWIP_NETIF_HOSTNAME */
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_RENEWING, msg_out, DHCP_REQUEST, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
8019476: 89b8 ldrh r0, [r7, #12]
8019478: 693b ldr r3, [r7, #16]
801947a: 33f0 adds r3, #240 ; 0xf0
801947c: 697a ldr r2, [r7, #20]
801947e: 4619 mov r1, r3
8019480: f000 ff94 bl 801a3ac <dhcp_option_trailer>
result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
8019484: 4b21 ldr r3, [pc, #132] ; (801950c <dhcp_renew+0x130>)
8019486: 6818 ldr r0, [r3, #0]
8019488: 69bb ldr r3, [r7, #24]
801948a: f103 0218 add.w r2, r3, #24
801948e: 687b ldr r3, [r7, #4]
8019490: 9300 str r3, [sp, #0]
8019492: 2343 movs r3, #67 ; 0x43
8019494: 6979 ldr r1, [r7, #20]
8019496: f7fe fe3f bl 8018118 <udp_sendto_if>
801949a: 4603 mov r3, r0
801949c: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
801949e: 6978 ldr r0, [r7, #20]
80194a0: f7f8 fefa bl 8012298 <pbuf_free>
80194a4: e001 b.n 80194aa <dhcp_renew+0xce>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n"));
result = ERR_MEM;
80194a6: 23ff movs r3, #255 ; 0xff
80194a8: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
80194aa: 69bb ldr r3, [r7, #24]
80194ac: 799b ldrb r3, [r3, #6]
80194ae: 2bff cmp r3, #255 ; 0xff
80194b0: d005 beq.n 80194be <dhcp_renew+0xe2>
dhcp->tries++;
80194b2: 69bb ldr r3, [r7, #24]
80194b4: 799b ldrb r3, [r3, #6]
80194b6: 3301 adds r3, #1
80194b8: b2da uxtb r2, r3
80194ba: 69bb ldr r3, [r7, #24]
80194bc: 719a strb r2, [r3, #6]
}
/* back-off on retries, but to a maximum of 20 seconds */
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000);
80194be: 69bb ldr r3, [r7, #24]
80194c0: 799b ldrb r3, [r3, #6]
80194c2: 2b09 cmp r3, #9
80194c4: d80a bhi.n 80194dc <dhcp_renew+0x100>
80194c6: 69bb ldr r3, [r7, #24]
80194c8: 799b ldrb r3, [r3, #6]
80194ca: b29b uxth r3, r3
80194cc: 461a mov r2, r3
80194ce: 0152 lsls r2, r2, #5
80194d0: 1ad2 subs r2, r2, r3
80194d2: 0092 lsls r2, r2, #2
80194d4: 4413 add r3, r2
80194d6: 011b lsls r3, r3, #4
80194d8: b29b uxth r3, r3
80194da: e001 b.n 80194e0 <dhcp_renew+0x104>
80194dc: f644 6320 movw r3, #20000 ; 0x4e20
80194e0: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
80194e2: 89fb ldrh r3, [r7, #14]
80194e4: f203 13f3 addw r3, r3, #499 ; 0x1f3
80194e8: 4a09 ldr r2, [pc, #36] ; (8019510 <dhcp_renew+0x134>)
80194ea: fb82 1203 smull r1, r2, r2, r3
80194ee: 1152 asrs r2, r2, #5
80194f0: 17db asrs r3, r3, #31
80194f2: 1ad3 subs r3, r2, r3
80194f4: b29a uxth r2, r3
80194f6: 69bb ldr r3, [r7, #24]
80194f8: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs));
return result;
80194fa: f997 301f ldrsb.w r3, [r7, #31]
}
80194fe: 4618 mov r0, r3
8019500: 3720 adds r7, #32
8019502: 46bd mov sp, r7
8019504: bd80 pop {r7, pc}
8019506: bf00 nop
8019508: 20000080 .word 0x20000080
801950c: 2000876c .word 0x2000876c
8019510: 10624dd3 .word 0x10624dd3
08019514 <dhcp_rebind>:
*
* @param netif network interface which must rebind with a DHCP server
*/
static err_t
dhcp_rebind(struct netif *netif)
{
8019514: b580 push {r7, lr}
8019516: b08a sub sp, #40 ; 0x28
8019518: af02 add r7, sp, #8
801951a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
801951c: 687b ldr r3, [r7, #4]
801951e: 6a5b ldr r3, [r3, #36] ; 0x24
8019520: 61bb str r3, [r7, #24]
u8_t i;
struct pbuf *p_out;
u16_t options_out_len;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n"));
dhcp_set_state(dhcp, DHCP_STATE_REBINDING);
8019522: 2104 movs r1, #4
8019524: 69b8 ldr r0, [r7, #24]
8019526: f000 f9e1 bl 80198ec <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
801952a: f107 030c add.w r3, r7, #12
801952e: 2203 movs r2, #3
8019530: 69b9 ldr r1, [r7, #24]
8019532: 6878 ldr r0, [r7, #4]
8019534: f000 fe64 bl 801a200 <dhcp_create_msg>
8019538: 6178 str r0, [r7, #20]
if (p_out != NULL) {
801953a: 697b ldr r3, [r7, #20]
801953c: 2b00 cmp r3, #0
801953e: d04c beq.n 80195da <dhcp_rebind+0xc6>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
8019540: 697b ldr r3, [r7, #20]
8019542: 685b ldr r3, [r3, #4]
8019544: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
8019546: 89b8 ldrh r0, [r7, #12]
8019548: 693b ldr r3, [r7, #16]
801954a: f103 01f0 add.w r1, r3, #240 ; 0xf0
801954e: 2302 movs r3, #2
8019550: 2239 movs r2, #57 ; 0x39
8019552: f000 f9e5 bl 8019920 <dhcp_option>
8019556: 4603 mov r3, r0
8019558: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
801955a: 89b8 ldrh r0, [r7, #12]
801955c: 693b ldr r3, [r7, #16]
801955e: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019562: 687b ldr r3, [r7, #4]
8019564: 8d1b ldrh r3, [r3, #40] ; 0x28
8019566: 461a mov r2, r3
8019568: f000 fa34 bl 80199d4 <dhcp_option_short>
801956c: 4603 mov r3, r0
801956e: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
8019570: 89b8 ldrh r0, [r7, #12]
8019572: 693b ldr r3, [r7, #16]
8019574: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019578: 2303 movs r3, #3
801957a: 2237 movs r2, #55 ; 0x37
801957c: f000 f9d0 bl 8019920 <dhcp_option>
8019580: 4603 mov r3, r0
8019582: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
8019584: 2300 movs r3, #0
8019586: 77bb strb r3, [r7, #30]
8019588: e00e b.n 80195a8 <dhcp_rebind+0x94>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
801958a: 89b8 ldrh r0, [r7, #12]
801958c: 693b ldr r3, [r7, #16]
801958e: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019592: 7fbb ldrb r3, [r7, #30]
8019594: 4a29 ldr r2, [pc, #164] ; (801963c <dhcp_rebind+0x128>)
8019596: 5cd3 ldrb r3, [r2, r3]
8019598: 461a mov r2, r3
801959a: f000 f9f5 bl 8019988 <dhcp_option_byte>
801959e: 4603 mov r3, r0
80195a0: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
80195a2: 7fbb ldrb r3, [r7, #30]
80195a4: 3301 adds r3, #1
80195a6: 77bb strb r3, [r7, #30]
80195a8: 7fbb ldrb r3, [r7, #30]
80195aa: 2b02 cmp r3, #2
80195ac: d9ed bls.n 801958a <dhcp_rebind+0x76>
#if LWIP_NETIF_HOSTNAME
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
#endif /* LWIP_NETIF_HOSTNAME */
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REBINDING, msg_out, DHCP_DISCOVER, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
80195ae: 89b8 ldrh r0, [r7, #12]
80195b0: 693b ldr r3, [r7, #16]
80195b2: 33f0 adds r3, #240 ; 0xf0
80195b4: 697a ldr r2, [r7, #20]
80195b6: 4619 mov r1, r3
80195b8: f000 fef8 bl 801a3ac <dhcp_option_trailer>
/* broadcast to server */
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
80195bc: 4b20 ldr r3, [pc, #128] ; (8019640 <dhcp_rebind+0x12c>)
80195be: 6818 ldr r0, [r3, #0]
80195c0: 687b ldr r3, [r7, #4]
80195c2: 9300 str r3, [sp, #0]
80195c4: 2343 movs r3, #67 ; 0x43
80195c6: 4a1f ldr r2, [pc, #124] ; (8019644 <dhcp_rebind+0x130>)
80195c8: 6979 ldr r1, [r7, #20]
80195ca: f7fe fda5 bl 8018118 <udp_sendto_if>
80195ce: 4603 mov r3, r0
80195d0: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
80195d2: 6978 ldr r0, [r7, #20]
80195d4: f7f8 fe60 bl 8012298 <pbuf_free>
80195d8: e001 b.n 80195de <dhcp_rebind+0xca>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n"));
result = ERR_MEM;
80195da: 23ff movs r3, #255 ; 0xff
80195dc: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
80195de: 69bb ldr r3, [r7, #24]
80195e0: 799b ldrb r3, [r3, #6]
80195e2: 2bff cmp r3, #255 ; 0xff
80195e4: d005 beq.n 80195f2 <dhcp_rebind+0xde>
dhcp->tries++;
80195e6: 69bb ldr r3, [r7, #24]
80195e8: 799b ldrb r3, [r3, #6]
80195ea: 3301 adds r3, #1
80195ec: b2da uxtb r2, r3
80195ee: 69bb ldr r3, [r7, #24]
80195f0: 719a strb r2, [r3, #6]
}
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
80195f2: 69bb ldr r3, [r7, #24]
80195f4: 799b ldrb r3, [r3, #6]
80195f6: 2b09 cmp r3, #9
80195f8: d80a bhi.n 8019610 <dhcp_rebind+0xfc>
80195fa: 69bb ldr r3, [r7, #24]
80195fc: 799b ldrb r3, [r3, #6]
80195fe: b29b uxth r3, r3
8019600: 461a mov r2, r3
8019602: 0152 lsls r2, r2, #5
8019604: 1ad2 subs r2, r2, r3
8019606: 0092 lsls r2, r2, #2
8019608: 4413 add r3, r2
801960a: 00db lsls r3, r3, #3
801960c: b29b uxth r3, r3
801960e: e001 b.n 8019614 <dhcp_rebind+0x100>
8019610: f242 7310 movw r3, #10000 ; 0x2710
8019614: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
8019616: 89fb ldrh r3, [r7, #14]
8019618: f203 13f3 addw r3, r3, #499 ; 0x1f3
801961c: 4a0a ldr r2, [pc, #40] ; (8019648 <dhcp_rebind+0x134>)
801961e: fb82 1203 smull r1, r2, r2, r3
8019622: 1152 asrs r2, r2, #5
8019624: 17db asrs r3, r3, #31
8019626: 1ad3 subs r3, r2, r3
8019628: b29a uxth r2, r3
801962a: 69bb ldr r3, [r7, #24]
801962c: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs));
return result;
801962e: f997 301f ldrsb.w r3, [r7, #31]
}
8019632: 4618 mov r0, r3
8019634: 3720 adds r7, #32
8019636: 46bd mov sp, r7
8019638: bd80 pop {r7, pc}
801963a: bf00 nop
801963c: 20000080 .word 0x20000080
8019640: 2000876c .word 0x2000876c
8019644: 08022eac .word 0x08022eac
8019648: 10624dd3 .word 0x10624dd3
0801964c <dhcp_reboot>:
*
* @param netif network interface which must reboot
*/
static err_t
dhcp_reboot(struct netif *netif)
{
801964c: b5b0 push {r4, r5, r7, lr}
801964e: b08a sub sp, #40 ; 0x28
8019650: af02 add r7, sp, #8
8019652: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8019654: 687b ldr r3, [r7, #4]
8019656: 6a5b ldr r3, [r3, #36] ; 0x24
8019658: 61bb str r3, [r7, #24]
u8_t i;
struct pbuf *p_out;
u16_t options_out_len;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n"));
dhcp_set_state(dhcp, DHCP_STATE_REBOOTING);
801965a: 2103 movs r1, #3
801965c: 69b8 ldr r0, [r7, #24]
801965e: f000 f945 bl 80198ec <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
8019662: f107 030c add.w r3, r7, #12
8019666: 2203 movs r2, #3
8019668: 69b9 ldr r1, [r7, #24]
801966a: 6878 ldr r0, [r7, #4]
801966c: f000 fdc8 bl 801a200 <dhcp_create_msg>
8019670: 6178 str r0, [r7, #20]
if (p_out != NULL) {
8019672: 697b ldr r3, [r7, #20]
8019674: 2b00 cmp r3, #0
8019676: d066 beq.n 8019746 <dhcp_reboot+0xfa>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
8019678: 697b ldr r3, [r7, #20]
801967a: 685b ldr r3, [r3, #4]
801967c: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
801967e: 89b8 ldrh r0, [r7, #12]
8019680: 693b ldr r3, [r7, #16]
8019682: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019686: 2302 movs r3, #2
8019688: 2239 movs r2, #57 ; 0x39
801968a: f000 f949 bl 8019920 <dhcp_option>
801968e: 4603 mov r3, r0
8019690: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED);
8019692: 89b8 ldrh r0, [r7, #12]
8019694: 693b ldr r3, [r7, #16]
8019696: 33f0 adds r3, #240 ; 0xf0
8019698: f44f 7210 mov.w r2, #576 ; 0x240
801969c: 4619 mov r1, r3
801969e: f000 f999 bl 80199d4 <dhcp_option_short>
80196a2: 4603 mov r3, r0
80196a4: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
80196a6: 89b8 ldrh r0, [r7, #12]
80196a8: 693b ldr r3, [r7, #16]
80196aa: f103 01f0 add.w r1, r3, #240 ; 0xf0
80196ae: 2304 movs r3, #4
80196b0: 2232 movs r2, #50 ; 0x32
80196b2: f000 f935 bl 8019920 <dhcp_option>
80196b6: 4603 mov r3, r0
80196b8: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
80196ba: 89bc ldrh r4, [r7, #12]
80196bc: 693b ldr r3, [r7, #16]
80196be: f103 05f0 add.w r5, r3, #240 ; 0xf0
80196c2: 69bb ldr r3, [r7, #24]
80196c4: 69db ldr r3, [r3, #28]
80196c6: 4618 mov r0, r3
80196c8: f7f7 fa47 bl 8010b5a <lwip_htonl>
80196cc: 4603 mov r3, r0
80196ce: 461a mov r2, r3
80196d0: 4629 mov r1, r5
80196d2: 4620 mov r0, r4
80196d4: f000 f9b0 bl 8019a38 <dhcp_option_long>
80196d8: 4603 mov r3, r0
80196da: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
80196dc: 89b8 ldrh r0, [r7, #12]
80196de: 693b ldr r3, [r7, #16]
80196e0: f103 01f0 add.w r1, r3, #240 ; 0xf0
80196e4: 2303 movs r3, #3
80196e6: 2237 movs r2, #55 ; 0x37
80196e8: f000 f91a bl 8019920 <dhcp_option>
80196ec: 4603 mov r3, r0
80196ee: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
80196f0: 2300 movs r3, #0
80196f2: 77bb strb r3, [r7, #30]
80196f4: e00e b.n 8019714 <dhcp_reboot+0xc8>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
80196f6: 89b8 ldrh r0, [r7, #12]
80196f8: 693b ldr r3, [r7, #16]
80196fa: f103 01f0 add.w r1, r3, #240 ; 0xf0
80196fe: 7fbb ldrb r3, [r7, #30]
8019700: 4a29 ldr r2, [pc, #164] ; (80197a8 <dhcp_reboot+0x15c>)
8019702: 5cd3 ldrb r3, [r2, r3]
8019704: 461a mov r2, r3
8019706: f000 f93f bl 8019988 <dhcp_option_byte>
801970a: 4603 mov r3, r0
801970c: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
801970e: 7fbb ldrb r3, [r7, #30]
8019710: 3301 adds r3, #1
8019712: 77bb strb r3, [r7, #30]
8019714: 7fbb ldrb r3, [r7, #30]
8019716: 2b02 cmp r3, #2
8019718: d9ed bls.n 80196f6 <dhcp_reboot+0xaa>
#if LWIP_NETIF_HOSTNAME
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
#endif /* LWIP_NETIF_HOSTNAME */
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REBOOTING, msg_out, DHCP_REQUEST, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
801971a: 89b8 ldrh r0, [r7, #12]
801971c: 693b ldr r3, [r7, #16]
801971e: 33f0 adds r3, #240 ; 0xf0
8019720: 697a ldr r2, [r7, #20]
8019722: 4619 mov r1, r3
8019724: f000 fe42 bl 801a3ac <dhcp_option_trailer>
/* broadcast to server */
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
8019728: 4b20 ldr r3, [pc, #128] ; (80197ac <dhcp_reboot+0x160>)
801972a: 6818 ldr r0, [r3, #0]
801972c: 687b ldr r3, [r7, #4]
801972e: 9300 str r3, [sp, #0]
8019730: 2343 movs r3, #67 ; 0x43
8019732: 4a1f ldr r2, [pc, #124] ; (80197b0 <dhcp_reboot+0x164>)
8019734: 6979 ldr r1, [r7, #20]
8019736: f7fe fcef bl 8018118 <udp_sendto_if>
801973a: 4603 mov r3, r0
801973c: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
801973e: 6978 ldr r0, [r7, #20]
8019740: f7f8 fdaa bl 8012298 <pbuf_free>
8019744: e001 b.n 801974a <dhcp_reboot+0xfe>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n"));
result = ERR_MEM;
8019746: 23ff movs r3, #255 ; 0xff
8019748: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
801974a: 69bb ldr r3, [r7, #24]
801974c: 799b ldrb r3, [r3, #6]
801974e: 2bff cmp r3, #255 ; 0xff
8019750: d005 beq.n 801975e <dhcp_reboot+0x112>
dhcp->tries++;
8019752: 69bb ldr r3, [r7, #24]
8019754: 799b ldrb r3, [r3, #6]
8019756: 3301 adds r3, #1
8019758: b2da uxtb r2, r3
801975a: 69bb ldr r3, [r7, #24]
801975c: 719a strb r2, [r3, #6]
}
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
801975e: 69bb ldr r3, [r7, #24]
8019760: 799b ldrb r3, [r3, #6]
8019762: 2b09 cmp r3, #9
8019764: d80a bhi.n 801977c <dhcp_reboot+0x130>
8019766: 69bb ldr r3, [r7, #24]
8019768: 799b ldrb r3, [r3, #6]
801976a: b29b uxth r3, r3
801976c: 461a mov r2, r3
801976e: 0152 lsls r2, r2, #5
8019770: 1ad2 subs r2, r2, r3
8019772: 0092 lsls r2, r2, #2
8019774: 4413 add r3, r2
8019776: 00db lsls r3, r3, #3
8019778: b29b uxth r3, r3
801977a: e001 b.n 8019780 <dhcp_reboot+0x134>
801977c: f242 7310 movw r3, #10000 ; 0x2710
8019780: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
8019782: 89fb ldrh r3, [r7, #14]
8019784: f203 13f3 addw r3, r3, #499 ; 0x1f3
8019788: 4a0a ldr r2, [pc, #40] ; (80197b4 <dhcp_reboot+0x168>)
801978a: fb82 1203 smull r1, r2, r2, r3
801978e: 1152 asrs r2, r2, #5
8019790: 17db asrs r3, r3, #31
8019792: 1ad3 subs r3, r2, r3
8019794: b29a uxth r2, r3
8019796: 69bb ldr r3, [r7, #24]
8019798: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs));
return result;
801979a: f997 301f ldrsb.w r3, [r7, #31]
}
801979e: 4618 mov r0, r3
80197a0: 3720 adds r7, #32
80197a2: 46bd mov sp, r7
80197a4: bdb0 pop {r4, r5, r7, pc}
80197a6: bf00 nop
80197a8: 20000080 .word 0x20000080
80197ac: 2000876c .word 0x2000876c
80197b0: 08022eac .word 0x08022eac
80197b4: 10624dd3 .word 0x10624dd3
080197b8 <dhcp_release_and_stop>:
*
* @param netif network interface
*/
void
dhcp_release_and_stop(struct netif *netif)
{
80197b8: b5b0 push {r4, r5, r7, lr}
80197ba: b08a sub sp, #40 ; 0x28
80197bc: af02 add r7, sp, #8
80197be: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
80197c0: 687b ldr r3, [r7, #4]
80197c2: 6a5b ldr r3, [r3, #36] ; 0x24
80197c4: 61fb str r3, [r7, #28]
ip_addr_t server_ip_addr;
LWIP_ASSERT_CORE_LOCKED();
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release_and_stop()\n"));
if (dhcp == NULL) {
80197c6: 69fb ldr r3, [r7, #28]
80197c8: 2b00 cmp r3, #0
80197ca: f000 8084 beq.w 80198d6 <dhcp_release_and_stop+0x11e>
return;
}
/* already off? -> nothing to do */
if (dhcp->state == DHCP_STATE_OFF) {
80197ce: 69fb ldr r3, [r7, #28]
80197d0: 795b ldrb r3, [r3, #5]
80197d2: 2b00 cmp r3, #0
80197d4: f000 8081 beq.w 80198da <dhcp_release_and_stop+0x122>
return;
}
ip_addr_copy(server_ip_addr, dhcp->server_ip_addr);
80197d8: 69fb ldr r3, [r7, #28]
80197da: 699b ldr r3, [r3, #24]
80197dc: 613b str r3, [r7, #16]
/* clean old DHCP offer */
ip_addr_set_zero_ip4(&dhcp->server_ip_addr);
80197de: 69fb ldr r3, [r7, #28]
80197e0: 2200 movs r2, #0
80197e2: 619a str r2, [r3, #24]
ip4_addr_set_zero(&dhcp->offered_ip_addr);
80197e4: 69fb ldr r3, [r7, #28]
80197e6: 2200 movs r2, #0
80197e8: 61da str r2, [r3, #28]
ip4_addr_set_zero(&dhcp->offered_sn_mask);
80197ea: 69fb ldr r3, [r7, #28]
80197ec: 2200 movs r2, #0
80197ee: 621a str r2, [r3, #32]
ip4_addr_set_zero(&dhcp->offered_gw_addr);
80197f0: 69fb ldr r3, [r7, #28]
80197f2: 2200 movs r2, #0
80197f4: 625a str r2, [r3, #36] ; 0x24
#if LWIP_DHCP_BOOTP_FILE
ip4_addr_set_zero(&dhcp->offered_si_addr);
#endif /* LWIP_DHCP_BOOTP_FILE */
dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0;
80197f6: 69fb ldr r3, [r7, #28]
80197f8: 2200 movs r2, #0
80197fa: 631a str r2, [r3, #48] ; 0x30
80197fc: 69fb ldr r3, [r7, #28]
80197fe: 6b1a ldr r2, [r3, #48] ; 0x30
8019800: 69fb ldr r3, [r7, #28]
8019802: 62da str r2, [r3, #44] ; 0x2c
8019804: 69fb ldr r3, [r7, #28]
8019806: 6ada ldr r2, [r3, #44] ; 0x2c
8019808: 69fb ldr r3, [r7, #28]
801980a: 629a str r2, [r3, #40] ; 0x28
dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0;
801980c: 69fb ldr r3, [r7, #28]
801980e: 2200 movs r2, #0
8019810: 829a strh r2, [r3, #20]
8019812: 69fb ldr r3, [r7, #28]
8019814: 8a9a ldrh r2, [r3, #20]
8019816: 69fb ldr r3, [r7, #28]
8019818: 825a strh r2, [r3, #18]
801981a: 69fb ldr r3, [r7, #28]
801981c: 8a5a ldrh r2, [r3, #18]
801981e: 69fb ldr r3, [r7, #28]
8019820: 821a strh r2, [r3, #16]
8019822: 69fb ldr r3, [r7, #28]
8019824: 8a1a ldrh r2, [r3, #16]
8019826: 69fb ldr r3, [r7, #28]
8019828: 81da strh r2, [r3, #14]
/* send release message when current IP was assigned via DHCP */
if (dhcp_supplied_address(netif)) {
801982a: 6878 ldr r0, [r7, #4]
801982c: f000 fdec bl 801a408 <dhcp_supplied_address>
8019830: 4603 mov r3, r0
8019832: 2b00 cmp r3, #0
8019834: d03b beq.n 80198ae <dhcp_release_and_stop+0xf6>
/* create and initialize the DHCP message header */
struct pbuf *p_out;
u16_t options_out_len;
p_out = dhcp_create_msg(netif, dhcp, DHCP_RELEASE, &options_out_len);
8019836: f107 030e add.w r3, r7, #14
801983a: 2207 movs r2, #7
801983c: 69f9 ldr r1, [r7, #28]
801983e: 6878 ldr r0, [r7, #4]
8019840: f000 fcde bl 801a200 <dhcp_create_msg>
8019844: 61b8 str r0, [r7, #24]
if (p_out != NULL) {
8019846: 69bb ldr r3, [r7, #24]
8019848: 2b00 cmp r3, #0
801984a: d030 beq.n 80198ae <dhcp_release_and_stop+0xf6>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
801984c: 69bb ldr r3, [r7, #24]
801984e: 685b ldr r3, [r3, #4]
8019850: 617b str r3, [r7, #20]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
8019852: 89f8 ldrh r0, [r7, #14]
8019854: 697b ldr r3, [r7, #20]
8019856: f103 01f0 add.w r1, r3, #240 ; 0xf0
801985a: 2304 movs r3, #4
801985c: 2236 movs r2, #54 ; 0x36
801985e: f000 f85f bl 8019920 <dhcp_option>
8019862: 4603 mov r3, r0
8019864: 81fb strh r3, [r7, #14]
options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr))));
8019866: 89fc ldrh r4, [r7, #14]
8019868: 697b ldr r3, [r7, #20]
801986a: f103 05f0 add.w r5, r3, #240 ; 0xf0
801986e: 693b ldr r3, [r7, #16]
8019870: 4618 mov r0, r3
8019872: f7f7 f972 bl 8010b5a <lwip_htonl>
8019876: 4603 mov r3, r0
8019878: 461a mov r2, r3
801987a: 4629 mov r1, r5
801987c: 4620 mov r0, r4
801987e: f000 f8db bl 8019a38 <dhcp_option_long>
8019882: 4603 mov r3, r0
8019884: 81fb strh r3, [r7, #14]
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, dhcp->state, msg_out, DHCP_RELEASE, &options_out_len);
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
8019886: 89f8 ldrh r0, [r7, #14]
8019888: 697b ldr r3, [r7, #20]
801988a: 33f0 adds r3, #240 ; 0xf0
801988c: 69ba ldr r2, [r7, #24]
801988e: 4619 mov r1, r3
8019890: f000 fd8c bl 801a3ac <dhcp_option_trailer>
udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
8019894: 4b13 ldr r3, [pc, #76] ; (80198e4 <dhcp_release_and_stop+0x12c>)
8019896: 6818 ldr r0, [r3, #0]
8019898: f107 0210 add.w r2, r7, #16
801989c: 687b ldr r3, [r7, #4]
801989e: 9300 str r3, [sp, #0]
80198a0: 2343 movs r3, #67 ; 0x43
80198a2: 69b9 ldr r1, [r7, #24]
80198a4: f7fe fc38 bl 8018118 <udp_sendto_if>
pbuf_free(p_out);
80198a8: 69b8 ldr r0, [r7, #24]
80198aa: f7f8 fcf5 bl 8012298 <pbuf_free>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n"));
}
}
/* remove IP address from interface (prevents routing from selecting this interface) */
netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
80198ae: 4b0e ldr r3, [pc, #56] ; (80198e8 <dhcp_release_and_stop+0x130>)
80198b0: 4a0d ldr r2, [pc, #52] ; (80198e8 <dhcp_release_and_stop+0x130>)
80198b2: 490d ldr r1, [pc, #52] ; (80198e8 <dhcp_release_and_stop+0x130>)
80198b4: 6878 ldr r0, [r7, #4]
80198b6: f7f7 ffe5 bl 8011884 <netif_set_addr>
autoip_stop(netif);
dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF;
}
#endif /* LWIP_DHCP_AUTOIP_COOP */
dhcp_set_state(dhcp, DHCP_STATE_OFF);
80198ba: 2100 movs r1, #0
80198bc: 69f8 ldr r0, [r7, #28]
80198be: f000 f815 bl 80198ec <dhcp_set_state>
if (dhcp->pcb_allocated != 0) {
80198c2: 69fb ldr r3, [r7, #28]
80198c4: 791b ldrb r3, [r3, #4]
80198c6: 2b00 cmp r3, #0
80198c8: d008 beq.n 80198dc <dhcp_release_and_stop+0x124>
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
80198ca: f7fe ff71 bl 80187b0 <dhcp_dec_pcb_refcount>
dhcp->pcb_allocated = 0;
80198ce: 69fb ldr r3, [r7, #28]
80198d0: 2200 movs r2, #0
80198d2: 711a strb r2, [r3, #4]
80198d4: e002 b.n 80198dc <dhcp_release_and_stop+0x124>
return;
80198d6: bf00 nop
80198d8: e000 b.n 80198dc <dhcp_release_and_stop+0x124>
return;
80198da: bf00 nop
}
}
80198dc: 3720 adds r7, #32
80198de: 46bd mov sp, r7
80198e0: bdb0 pop {r4, r5, r7, pc}
80198e2: bf00 nop
80198e4: 2000876c .word 0x2000876c
80198e8: 08022ea8 .word 0x08022ea8
080198ec <dhcp_set_state>:
*
* If the state changed, reset the number of tries.
*/
static void
dhcp_set_state(struct dhcp *dhcp, u8_t new_state)
{
80198ec: b480 push {r7}
80198ee: b083 sub sp, #12
80198f0: af00 add r7, sp, #0
80198f2: 6078 str r0, [r7, #4]
80198f4: 460b mov r3, r1
80198f6: 70fb strb r3, [r7, #3]
if (new_state != dhcp->state) {
80198f8: 687b ldr r3, [r7, #4]
80198fa: 795b ldrb r3, [r3, #5]
80198fc: 78fa ldrb r2, [r7, #3]
80198fe: 429a cmp r2, r3
8019900: d008 beq.n 8019914 <dhcp_set_state+0x28>
dhcp->state = new_state;
8019902: 687b ldr r3, [r7, #4]
8019904: 78fa ldrb r2, [r7, #3]
8019906: 715a strb r2, [r3, #5]
dhcp->tries = 0;
8019908: 687b ldr r3, [r7, #4]
801990a: 2200 movs r2, #0
801990c: 719a strb r2, [r3, #6]
dhcp->request_timeout = 0;
801990e: 687b ldr r3, [r7, #4]
8019910: 2200 movs r2, #0
8019912: 811a strh r2, [r3, #8]
}
}
8019914: bf00 nop
8019916: 370c adds r7, #12
8019918: 46bd mov sp, r7
801991a: f85d 7b04 ldr.w r7, [sp], #4
801991e: 4770 bx lr
08019920 <dhcp_option>:
* DHCP message.
*
*/
static u16_t
dhcp_option(u16_t options_out_len, u8_t *options, u8_t option_type, u8_t option_len)
{
8019920: b580 push {r7, lr}
8019922: b082 sub sp, #8
8019924: af00 add r7, sp, #0
8019926: 6039 str r1, [r7, #0]
8019928: 4611 mov r1, r2
801992a: 461a mov r2, r3
801992c: 4603 mov r3, r0
801992e: 80fb strh r3, [r7, #6]
8019930: 460b mov r3, r1
8019932: 717b strb r3, [r7, #5]
8019934: 4613 mov r3, r2
8019936: 713b strb r3, [r7, #4]
LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN);
8019938: 88fa ldrh r2, [r7, #6]
801993a: 793b ldrb r3, [r7, #4]
801993c: 4413 add r3, r2
801993e: 3302 adds r3, #2
8019940: 2b44 cmp r3, #68 ; 0x44
8019942: d906 bls.n 8019952 <dhcp_option+0x32>
8019944: 4b0d ldr r3, [pc, #52] ; (801997c <dhcp_option+0x5c>)
8019946: f240 529a movw r2, #1434 ; 0x59a
801994a: 490d ldr r1, [pc, #52] ; (8019980 <dhcp_option+0x60>)
801994c: 480d ldr r0, [pc, #52] ; (8019984 <dhcp_option+0x64>)
801994e: f003 f9d3 bl 801ccf8 <iprintf>
options[options_out_len++] = option_type;
8019952: 88fb ldrh r3, [r7, #6]
8019954: 1c5a adds r2, r3, #1
8019956: 80fa strh r2, [r7, #6]
8019958: 461a mov r2, r3
801995a: 683b ldr r3, [r7, #0]
801995c: 4413 add r3, r2
801995e: 797a ldrb r2, [r7, #5]
8019960: 701a strb r2, [r3, #0]
options[options_out_len++] = option_len;
8019962: 88fb ldrh r3, [r7, #6]
8019964: 1c5a adds r2, r3, #1
8019966: 80fa strh r2, [r7, #6]
8019968: 461a mov r2, r3
801996a: 683b ldr r3, [r7, #0]
801996c: 4413 add r3, r2
801996e: 793a ldrb r2, [r7, #4]
8019970: 701a strb r2, [r3, #0]
return options_out_len;
8019972: 88fb ldrh r3, [r7, #6]
}
8019974: 4618 mov r0, r3
8019976: 3708 adds r7, #8
8019978: 46bd mov sp, r7
801997a: bd80 pop {r7, pc}
801997c: 080203d8 .word 0x080203d8
8019980: 0802056c .word 0x0802056c
8019984: 08020438 .word 0x08020438
08019988 <dhcp_option_byte>:
* Concatenate a single byte to the outgoing DHCP message.
*
*/
static u16_t
dhcp_option_byte(u16_t options_out_len, u8_t *options, u8_t value)
{
8019988: b580 push {r7, lr}
801998a: b082 sub sp, #8
801998c: af00 add r7, sp, #0
801998e: 4603 mov r3, r0
8019990: 6039 str r1, [r7, #0]
8019992: 80fb strh r3, [r7, #6]
8019994: 4613 mov r3, r2
8019996: 717b strb r3, [r7, #5]
LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
8019998: 88fb ldrh r3, [r7, #6]
801999a: 2b43 cmp r3, #67 ; 0x43
801999c: d906 bls.n 80199ac <dhcp_option_byte+0x24>
801999e: 4b0a ldr r3, [pc, #40] ; (80199c8 <dhcp_option_byte+0x40>)
80199a0: f240 52a6 movw r2, #1446 ; 0x5a6
80199a4: 4909 ldr r1, [pc, #36] ; (80199cc <dhcp_option_byte+0x44>)
80199a6: 480a ldr r0, [pc, #40] ; (80199d0 <dhcp_option_byte+0x48>)
80199a8: f003 f9a6 bl 801ccf8 <iprintf>
options[options_out_len++] = value;
80199ac: 88fb ldrh r3, [r7, #6]
80199ae: 1c5a adds r2, r3, #1
80199b0: 80fa strh r2, [r7, #6]
80199b2: 461a mov r2, r3
80199b4: 683b ldr r3, [r7, #0]
80199b6: 4413 add r3, r2
80199b8: 797a ldrb r2, [r7, #5]
80199ba: 701a strb r2, [r3, #0]
return options_out_len;
80199bc: 88fb ldrh r3, [r7, #6]
}
80199be: 4618 mov r0, r3
80199c0: 3708 adds r7, #8
80199c2: 46bd mov sp, r7
80199c4: bd80 pop {r7, pc}
80199c6: bf00 nop
80199c8: 080203d8 .word 0x080203d8
80199cc: 080205b0 .word 0x080205b0
80199d0: 08020438 .word 0x08020438
080199d4 <dhcp_option_short>:
static u16_t
dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value)
{
80199d4: b580 push {r7, lr}
80199d6: b082 sub sp, #8
80199d8: af00 add r7, sp, #0
80199da: 4603 mov r3, r0
80199dc: 6039 str r1, [r7, #0]
80199de: 80fb strh r3, [r7, #6]
80199e0: 4613 mov r3, r2
80199e2: 80bb strh r3, [r7, #4]
LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
80199e4: 88fb ldrh r3, [r7, #6]
80199e6: 3302 adds r3, #2
80199e8: 2b44 cmp r3, #68 ; 0x44
80199ea: d906 bls.n 80199fa <dhcp_option_short+0x26>
80199ec: 4b0f ldr r3, [pc, #60] ; (8019a2c <dhcp_option_short+0x58>)
80199ee: f240 52ae movw r2, #1454 ; 0x5ae
80199f2: 490f ldr r1, [pc, #60] ; (8019a30 <dhcp_option_short+0x5c>)
80199f4: 480f ldr r0, [pc, #60] ; (8019a34 <dhcp_option_short+0x60>)
80199f6: f003 f97f bl 801ccf8 <iprintf>
options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8);
80199fa: 88bb ldrh r3, [r7, #4]
80199fc: 0a1b lsrs r3, r3, #8
80199fe: b29a uxth r2, r3
8019a00: 88fb ldrh r3, [r7, #6]
8019a02: 1c59 adds r1, r3, #1
8019a04: 80f9 strh r1, [r7, #6]
8019a06: 4619 mov r1, r3
8019a08: 683b ldr r3, [r7, #0]
8019a0a: 440b add r3, r1
8019a0c: b2d2 uxtb r2, r2
8019a0e: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t) (value & 0x00ffU);
8019a10: 88fb ldrh r3, [r7, #6]
8019a12: 1c5a adds r2, r3, #1
8019a14: 80fa strh r2, [r7, #6]
8019a16: 461a mov r2, r3
8019a18: 683b ldr r3, [r7, #0]
8019a1a: 4413 add r3, r2
8019a1c: 88ba ldrh r2, [r7, #4]
8019a1e: b2d2 uxtb r2, r2
8019a20: 701a strb r2, [r3, #0]
return options_out_len;
8019a22: 88fb ldrh r3, [r7, #6]
}
8019a24: 4618 mov r0, r3
8019a26: 3708 adds r7, #8
8019a28: 46bd mov sp, r7
8019a2a: bd80 pop {r7, pc}
8019a2c: 080203d8 .word 0x080203d8
8019a30: 080205e8 .word 0x080205e8
8019a34: 08020438 .word 0x08020438
08019a38 <dhcp_option_long>:
static u16_t
dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value)
{
8019a38: b580 push {r7, lr}
8019a3a: b084 sub sp, #16
8019a3c: af00 add r7, sp, #0
8019a3e: 4603 mov r3, r0
8019a40: 60b9 str r1, [r7, #8]
8019a42: 607a str r2, [r7, #4]
8019a44: 81fb strh r3, [r7, #14]
LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
8019a46: 89fb ldrh r3, [r7, #14]
8019a48: 3304 adds r3, #4
8019a4a: 2b44 cmp r3, #68 ; 0x44
8019a4c: d906 bls.n 8019a5c <dhcp_option_long+0x24>
8019a4e: 4b19 ldr r3, [pc, #100] ; (8019ab4 <dhcp_option_long+0x7c>)
8019a50: f240 52b7 movw r2, #1463 ; 0x5b7
8019a54: 4918 ldr r1, [pc, #96] ; (8019ab8 <dhcp_option_long+0x80>)
8019a56: 4819 ldr r0, [pc, #100] ; (8019abc <dhcp_option_long+0x84>)
8019a58: f003 f94e bl 801ccf8 <iprintf>
options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24);
8019a5c: 687b ldr r3, [r7, #4]
8019a5e: 0e1a lsrs r2, r3, #24
8019a60: 89fb ldrh r3, [r7, #14]
8019a62: 1c59 adds r1, r3, #1
8019a64: 81f9 strh r1, [r7, #14]
8019a66: 4619 mov r1, r3
8019a68: 68bb ldr r3, [r7, #8]
8019a6a: 440b add r3, r1
8019a6c: b2d2 uxtb r2, r2
8019a6e: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16);
8019a70: 687b ldr r3, [r7, #4]
8019a72: 0c1a lsrs r2, r3, #16
8019a74: 89fb ldrh r3, [r7, #14]
8019a76: 1c59 adds r1, r3, #1
8019a78: 81f9 strh r1, [r7, #14]
8019a7a: 4619 mov r1, r3
8019a7c: 68bb ldr r3, [r7, #8]
8019a7e: 440b add r3, r1
8019a80: b2d2 uxtb r2, r2
8019a82: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8);
8019a84: 687b ldr r3, [r7, #4]
8019a86: 0a1a lsrs r2, r3, #8
8019a88: 89fb ldrh r3, [r7, #14]
8019a8a: 1c59 adds r1, r3, #1
8019a8c: 81f9 strh r1, [r7, #14]
8019a8e: 4619 mov r1, r3
8019a90: 68bb ldr r3, [r7, #8]
8019a92: 440b add r3, r1
8019a94: b2d2 uxtb r2, r2
8019a96: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x000000ffUL));
8019a98: 89fb ldrh r3, [r7, #14]
8019a9a: 1c5a adds r2, r3, #1
8019a9c: 81fa strh r2, [r7, #14]
8019a9e: 461a mov r2, r3
8019aa0: 68bb ldr r3, [r7, #8]
8019aa2: 4413 add r3, r2
8019aa4: 687a ldr r2, [r7, #4]
8019aa6: b2d2 uxtb r2, r2
8019aa8: 701a strb r2, [r3, #0]
return options_out_len;
8019aaa: 89fb ldrh r3, [r7, #14]
}
8019aac: 4618 mov r0, r3
8019aae: 3710 adds r7, #16
8019ab0: 46bd mov sp, r7
8019ab2: bd80 pop {r7, pc}
8019ab4: 080203d8 .word 0x080203d8
8019ab8: 08020624 .word 0x08020624
8019abc: 08020438 .word 0x08020438
08019ac0 <dhcp_parse_reply>:
* use that further on.
*
*/
static err_t
dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp)
{
8019ac0: b580 push {r7, lr}
8019ac2: b090 sub sp, #64 ; 0x40
8019ac4: af00 add r7, sp, #0
8019ac6: 6078 str r0, [r7, #4]
8019ac8: 6039 str r1, [r7, #0]
u16_t offset;
u16_t offset_max;
u16_t options_idx;
u16_t options_idx_max;
struct pbuf *q;
int parse_file_as_options = 0;
8019aca: 2300 movs r3, #0
8019acc: 62fb str r3, [r7, #44] ; 0x2c
int parse_sname_as_options = 0;
8019ace: 2300 movs r3, #0
8019ad0: 62bb str r3, [r7, #40] ; 0x28
#endif
LWIP_UNUSED_ARG(dhcp);
/* clear received options */
dhcp_clear_all_options(dhcp);
8019ad2: 2208 movs r2, #8
8019ad4: 2100 movs r1, #0
8019ad6: 48be ldr r0, [pc, #760] ; (8019dd0 <dhcp_parse_reply+0x310>)
8019ad8: f003 f905 bl 801cce6 <memset>
/* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */
if (p->len < DHCP_SNAME_OFS) {
8019adc: 687b ldr r3, [r7, #4]
8019ade: 895b ldrh r3, [r3, #10]
8019ae0: 2b2b cmp r3, #43 ; 0x2b
8019ae2: d802 bhi.n 8019aea <dhcp_parse_reply+0x2a>
return ERR_BUF;
8019ae4: f06f 0301 mvn.w r3, #1
8019ae8: e2a8 b.n 801a03c <dhcp_parse_reply+0x57c>
}
msg_in = (struct dhcp_msg *)p->payload;
8019aea: 687b ldr r3, [r7, #4]
8019aec: 685b ldr r3, [r3, #4]
8019aee: 61bb str r3, [r7, #24]
#endif /* LWIP_DHCP_BOOTP_FILE */
/* parse options */
/* start with options field */
options_idx = DHCP_OPTIONS_OFS;
8019af0: 23f0 movs r3, #240 ; 0xf0
8019af2: 86fb strh r3, [r7, #54] ; 0x36
/* parse options to the end of the received packet */
options_idx_max = p->tot_len;
8019af4: 687b ldr r3, [r7, #4]
8019af6: 891b ldrh r3, [r3, #8]
8019af8: 86bb strh r3, [r7, #52] ; 0x34
again:
q = p;
8019afa: 687b ldr r3, [r7, #4]
8019afc: 633b str r3, [r7, #48] ; 0x30
while ((q != NULL) && (options_idx >= q->len)) {
8019afe: e00c b.n 8019b1a <dhcp_parse_reply+0x5a>
options_idx = (u16_t)(options_idx - q->len);
8019b00: 6b3b ldr r3, [r7, #48] ; 0x30
8019b02: 895b ldrh r3, [r3, #10]
8019b04: 8efa ldrh r2, [r7, #54] ; 0x36
8019b06: 1ad3 subs r3, r2, r3
8019b08: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = (u16_t)(options_idx_max - q->len);
8019b0a: 6b3b ldr r3, [r7, #48] ; 0x30
8019b0c: 895b ldrh r3, [r3, #10]
8019b0e: 8eba ldrh r2, [r7, #52] ; 0x34
8019b10: 1ad3 subs r3, r2, r3
8019b12: 86bb strh r3, [r7, #52] ; 0x34
q = q->next;
8019b14: 6b3b ldr r3, [r7, #48] ; 0x30
8019b16: 681b ldr r3, [r3, #0]
8019b18: 633b str r3, [r7, #48] ; 0x30
while ((q != NULL) && (options_idx >= q->len)) {
8019b1a: 6b3b ldr r3, [r7, #48] ; 0x30
8019b1c: 2b00 cmp r3, #0
8019b1e: d004 beq.n 8019b2a <dhcp_parse_reply+0x6a>
8019b20: 6b3b ldr r3, [r7, #48] ; 0x30
8019b22: 895b ldrh r3, [r3, #10]
8019b24: 8efa ldrh r2, [r7, #54] ; 0x36
8019b26: 429a cmp r2, r3
8019b28: d2ea bcs.n 8019b00 <dhcp_parse_reply+0x40>
}
if (q == NULL) {
8019b2a: 6b3b ldr r3, [r7, #48] ; 0x30
8019b2c: 2b00 cmp r3, #0
8019b2e: d102 bne.n 8019b36 <dhcp_parse_reply+0x76>
return ERR_BUF;
8019b30: f06f 0301 mvn.w r3, #1
8019b34: e282 b.n 801a03c <dhcp_parse_reply+0x57c>
}
offset = options_idx;
8019b36: 8efb ldrh r3, [r7, #54] ; 0x36
8019b38: 877b strh r3, [r7, #58] ; 0x3a
offset_max = options_idx_max;
8019b3a: 8ebb ldrh r3, [r7, #52] ; 0x34
8019b3c: 873b strh r3, [r7, #56] ; 0x38
options = (u8_t *)q->payload;
8019b3e: 6b3b ldr r3, [r7, #48] ; 0x30
8019b40: 685b ldr r3, [r3, #4]
8019b42: 63fb str r3, [r7, #60] ; 0x3c
/* at least 1 byte to read and no end marker, then at least 3 bytes to read? */
while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
8019b44: e23a b.n 8019fbc <dhcp_parse_reply+0x4fc>
u8_t op = options[offset];
8019b46: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019b48: 6bfa ldr r2, [r7, #60] ; 0x3c
8019b4a: 4413 add r3, r2
8019b4c: 781b ldrb r3, [r3, #0]
8019b4e: 75fb strb r3, [r7, #23]
u8_t len;
u8_t decode_len = 0;
8019b50: 2300 movs r3, #0
8019b52: f887 3026 strb.w r3, [r7, #38] ; 0x26
int decode_idx = -1;
8019b56: f04f 33ff mov.w r3, #4294967295
8019b5a: 623b str r3, [r7, #32]
u16_t val_offset = (u16_t)(offset + 2);
8019b5c: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019b5e: 3302 adds r3, #2
8019b60: 83fb strh r3, [r7, #30]
if (val_offset < offset) {
8019b62: 8bfa ldrh r2, [r7, #30]
8019b64: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019b66: 429a cmp r2, r3
8019b68: d202 bcs.n 8019b70 <dhcp_parse_reply+0xb0>
/* overflow */
return ERR_BUF;
8019b6a: f06f 0301 mvn.w r3, #1
8019b6e: e265 b.n 801a03c <dhcp_parse_reply+0x57c>
}
/* len byte might be in the next pbuf */
if ((offset + 1) < q->len) {
8019b70: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019b72: 3301 adds r3, #1
8019b74: 6b3a ldr r2, [r7, #48] ; 0x30
8019b76: 8952 ldrh r2, [r2, #10]
8019b78: 4293 cmp r3, r2
8019b7a: da07 bge.n 8019b8c <dhcp_parse_reply+0xcc>
len = options[offset + 1];
8019b7c: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019b7e: 3301 adds r3, #1
8019b80: 6bfa ldr r2, [r7, #60] ; 0x3c
8019b82: 4413 add r3, r2
8019b84: 781b ldrb r3, [r3, #0]
8019b86: f887 3027 strb.w r3, [r7, #39] ; 0x27
8019b8a: e00b b.n 8019ba4 <dhcp_parse_reply+0xe4>
} else {
len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0);
8019b8c: 6b3b ldr r3, [r7, #48] ; 0x30
8019b8e: 681b ldr r3, [r3, #0]
8019b90: 2b00 cmp r3, #0
8019b92: d004 beq.n 8019b9e <dhcp_parse_reply+0xde>
8019b94: 6b3b ldr r3, [r7, #48] ; 0x30
8019b96: 681b ldr r3, [r3, #0]
8019b98: 685b ldr r3, [r3, #4]
8019b9a: 781b ldrb r3, [r3, #0]
8019b9c: e000 b.n 8019ba0 <dhcp_parse_reply+0xe0>
8019b9e: 2300 movs r3, #0
8019ba0: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
/* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */
decode_len = len;
8019ba4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019ba8: f887 3026 strb.w r3, [r7, #38] ; 0x26
switch (op) {
8019bac: 7dfb ldrb r3, [r7, #23]
8019bae: 2b3b cmp r3, #59 ; 0x3b
8019bb0: f200 812d bhi.w 8019e0e <dhcp_parse_reply+0x34e>
8019bb4: a201 add r2, pc, #4 ; (adr r2, 8019bbc <dhcp_parse_reply+0xfc>)
8019bb6: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8019bba: bf00 nop
8019bbc: 08019cad .word 0x08019cad
8019bc0: 08019cbd .word 0x08019cbd
8019bc4: 08019e0f .word 0x08019e0f
8019bc8: 08019cdf .word 0x08019cdf
8019bcc: 08019e0f .word 0x08019e0f
8019bd0: 08019e0f .word 0x08019e0f
8019bd4: 08019e0f .word 0x08019e0f
8019bd8: 08019e0f .word 0x08019e0f
8019bdc: 08019e0f .word 0x08019e0f
8019be0: 08019e0f .word 0x08019e0f
8019be4: 08019e0f .word 0x08019e0f
8019be8: 08019e0f .word 0x08019e0f
8019bec: 08019e0f .word 0x08019e0f
8019bf0: 08019e0f .word 0x08019e0f
8019bf4: 08019e0f .word 0x08019e0f
8019bf8: 08019e0f .word 0x08019e0f
8019bfc: 08019e0f .word 0x08019e0f
8019c00: 08019e0f .word 0x08019e0f
8019c04: 08019e0f .word 0x08019e0f
8019c08: 08019e0f .word 0x08019e0f
8019c0c: 08019e0f .word 0x08019e0f
8019c10: 08019e0f .word 0x08019e0f
8019c14: 08019e0f .word 0x08019e0f
8019c18: 08019e0f .word 0x08019e0f
8019c1c: 08019e0f .word 0x08019e0f
8019c20: 08019e0f .word 0x08019e0f
8019c24: 08019e0f .word 0x08019e0f
8019c28: 08019e0f .word 0x08019e0f
8019c2c: 08019e0f .word 0x08019e0f
8019c30: 08019e0f .word 0x08019e0f
8019c34: 08019e0f .word 0x08019e0f
8019c38: 08019e0f .word 0x08019e0f
8019c3c: 08019e0f .word 0x08019e0f
8019c40: 08019e0f .word 0x08019e0f
8019c44: 08019e0f .word 0x08019e0f
8019c48: 08019e0f .word 0x08019e0f
8019c4c: 08019e0f .word 0x08019e0f
8019c50: 08019e0f .word 0x08019e0f
8019c54: 08019e0f .word 0x08019e0f
8019c58: 08019e0f .word 0x08019e0f
8019c5c: 08019e0f .word 0x08019e0f
8019c60: 08019e0f .word 0x08019e0f
8019c64: 08019e0f .word 0x08019e0f
8019c68: 08019e0f .word 0x08019e0f
8019c6c: 08019e0f .word 0x08019e0f
8019c70: 08019e0f .word 0x08019e0f
8019c74: 08019e0f .word 0x08019e0f
8019c78: 08019e0f .word 0x08019e0f
8019c7c: 08019e0f .word 0x08019e0f
8019c80: 08019e0f .word 0x08019e0f
8019c84: 08019e0f .word 0x08019e0f
8019c88: 08019d0b .word 0x08019d0b
8019c8c: 08019d2d .word 0x08019d2d
8019c90: 08019d69 .word 0x08019d69
8019c94: 08019d8b .word 0x08019d8b
8019c98: 08019e0f .word 0x08019e0f
8019c9c: 08019e0f .word 0x08019e0f
8019ca0: 08019e0f .word 0x08019e0f
8019ca4: 08019dad .word 0x08019dad
8019ca8: 08019ded .word 0x08019ded
/* case(DHCP_OPTION_END): handled above */
case (DHCP_OPTION_PAD):
/* special option: no len encoded */
decode_len = len = 0;
8019cac: 2300 movs r3, #0
8019cae: f887 3027 strb.w r3, [r7, #39] ; 0x27
8019cb2: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019cb6: f887 3026 strb.w r3, [r7, #38] ; 0x26
/* will be increased below */
break;
8019cba: e0ac b.n 8019e16 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_SUBNET_MASK):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
8019cbc: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019cc0: 2b04 cmp r3, #4
8019cc2: d009 beq.n 8019cd8 <dhcp_parse_reply+0x218>
8019cc4: 4b43 ldr r3, [pc, #268] ; (8019dd4 <dhcp_parse_reply+0x314>)
8019cc6: f240 622e movw r2, #1582 ; 0x62e
8019cca: 4943 ldr r1, [pc, #268] ; (8019dd8 <dhcp_parse_reply+0x318>)
8019ccc: 4843 ldr r0, [pc, #268] ; (8019ddc <dhcp_parse_reply+0x31c>)
8019cce: f003 f813 bl 801ccf8 <iprintf>
8019cd2: f06f 0305 mvn.w r3, #5
8019cd6: e1b1 b.n 801a03c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_SUBNET_MASK;
8019cd8: 2306 movs r3, #6
8019cda: 623b str r3, [r7, #32]
break;
8019cdc: e09b b.n 8019e16 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_ROUTER):
decode_len = 4; /* only copy the first given router */
8019cde: 2304 movs r3, #4
8019ce0: f887 3026 strb.w r3, [r7, #38] ; 0x26
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
8019ce4: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
8019ce8: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019cec: 429a cmp r2, r3
8019cee: d209 bcs.n 8019d04 <dhcp_parse_reply+0x244>
8019cf0: 4b38 ldr r3, [pc, #224] ; (8019dd4 <dhcp_parse_reply+0x314>)
8019cf2: f240 6233 movw r2, #1587 ; 0x633
8019cf6: 493a ldr r1, [pc, #232] ; (8019de0 <dhcp_parse_reply+0x320>)
8019cf8: 4838 ldr r0, [pc, #224] ; (8019ddc <dhcp_parse_reply+0x31c>)
8019cfa: f002 fffd bl 801ccf8 <iprintf>
8019cfe: f06f 0305 mvn.w r3, #5
8019d02: e19b b.n 801a03c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_ROUTER;
8019d04: 2307 movs r3, #7
8019d06: 623b str r3, [r7, #32]
break;
8019d08: e085 b.n 8019e16 <dhcp_parse_reply+0x356>
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
decode_idx = DHCP_OPTION_IDX_DNS_SERVER;
break;
#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */
case (DHCP_OPTION_LEASE_TIME):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
8019d0a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019d0e: 2b04 cmp r3, #4
8019d10: d009 beq.n 8019d26 <dhcp_parse_reply+0x266>
8019d12: 4b30 ldr r3, [pc, #192] ; (8019dd4 <dhcp_parse_reply+0x314>)
8019d14: f240 6241 movw r2, #1601 ; 0x641
8019d18: 492f ldr r1, [pc, #188] ; (8019dd8 <dhcp_parse_reply+0x318>)
8019d1a: 4830 ldr r0, [pc, #192] ; (8019ddc <dhcp_parse_reply+0x31c>)
8019d1c: f002 ffec bl 801ccf8 <iprintf>
8019d20: f06f 0305 mvn.w r3, #5
8019d24: e18a b.n 801a03c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_LEASE_TIME;
8019d26: 2303 movs r3, #3
8019d28: 623b str r3, [r7, #32]
break;
8019d2a: e074 b.n 8019e16 <dhcp_parse_reply+0x356>
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
decode_idx = DHCP_OPTION_IDX_NTP_SERVER;
break;
#endif /* LWIP_DHCP_GET_NTP_SRV*/
case (DHCP_OPTION_OVERLOAD):
LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
8019d2c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019d30: 2b01 cmp r3, #1
8019d32: d009 beq.n 8019d48 <dhcp_parse_reply+0x288>
8019d34: 4b27 ldr r3, [pc, #156] ; (8019dd4 <dhcp_parse_reply+0x314>)
8019d36: f240 624f movw r2, #1615 ; 0x64f
8019d3a: 492a ldr r1, [pc, #168] ; (8019de4 <dhcp_parse_reply+0x324>)
8019d3c: 4827 ldr r0, [pc, #156] ; (8019ddc <dhcp_parse_reply+0x31c>)
8019d3e: f002 ffdb bl 801ccf8 <iprintf>
8019d42: f06f 0305 mvn.w r3, #5
8019d46: e179 b.n 801a03c <dhcp_parse_reply+0x57c>
/* decode overload only in options, not in file/sname: invalid packet */
LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;);
8019d48: 8efb ldrh r3, [r7, #54] ; 0x36
8019d4a: 2bf0 cmp r3, #240 ; 0xf0
8019d4c: d009 beq.n 8019d62 <dhcp_parse_reply+0x2a2>
8019d4e: 4b21 ldr r3, [pc, #132] ; (8019dd4 <dhcp_parse_reply+0x314>)
8019d50: f240 6251 movw r2, #1617 ; 0x651
8019d54: 4924 ldr r1, [pc, #144] ; (8019de8 <dhcp_parse_reply+0x328>)
8019d56: 4821 ldr r0, [pc, #132] ; (8019ddc <dhcp_parse_reply+0x31c>)
8019d58: f002 ffce bl 801ccf8 <iprintf>
8019d5c: f06f 0305 mvn.w r3, #5
8019d60: e16c b.n 801a03c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_OVERLOAD;
8019d62: 2300 movs r3, #0
8019d64: 623b str r3, [r7, #32]
break;
8019d66: e056 b.n 8019e16 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_MESSAGE_TYPE):
LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
8019d68: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019d6c: 2b01 cmp r3, #1
8019d6e: d009 beq.n 8019d84 <dhcp_parse_reply+0x2c4>
8019d70: 4b18 ldr r3, [pc, #96] ; (8019dd4 <dhcp_parse_reply+0x314>)
8019d72: f240 6255 movw r2, #1621 ; 0x655
8019d76: 491b ldr r1, [pc, #108] ; (8019de4 <dhcp_parse_reply+0x324>)
8019d78: 4818 ldr r0, [pc, #96] ; (8019ddc <dhcp_parse_reply+0x31c>)
8019d7a: f002 ffbd bl 801ccf8 <iprintf>
8019d7e: f06f 0305 mvn.w r3, #5
8019d82: e15b b.n 801a03c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_MSG_TYPE;
8019d84: 2301 movs r3, #1
8019d86: 623b str r3, [r7, #32]
break;
8019d88: e045 b.n 8019e16 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_SERVER_ID):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
8019d8a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019d8e: 2b04 cmp r3, #4
8019d90: d009 beq.n 8019da6 <dhcp_parse_reply+0x2e6>
8019d92: 4b10 ldr r3, [pc, #64] ; (8019dd4 <dhcp_parse_reply+0x314>)
8019d94: f240 6259 movw r2, #1625 ; 0x659
8019d98: 490f ldr r1, [pc, #60] ; (8019dd8 <dhcp_parse_reply+0x318>)
8019d9a: 4810 ldr r0, [pc, #64] ; (8019ddc <dhcp_parse_reply+0x31c>)
8019d9c: f002 ffac bl 801ccf8 <iprintf>
8019da0: f06f 0305 mvn.w r3, #5
8019da4: e14a b.n 801a03c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_SERVER_ID;
8019da6: 2302 movs r3, #2
8019da8: 623b str r3, [r7, #32]
break;
8019daa: e034 b.n 8019e16 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_T1):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
8019dac: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019db0: 2b04 cmp r3, #4
8019db2: d009 beq.n 8019dc8 <dhcp_parse_reply+0x308>
8019db4: 4b07 ldr r3, [pc, #28] ; (8019dd4 <dhcp_parse_reply+0x314>)
8019db6: f240 625d movw r2, #1629 ; 0x65d
8019dba: 4907 ldr r1, [pc, #28] ; (8019dd8 <dhcp_parse_reply+0x318>)
8019dbc: 4807 ldr r0, [pc, #28] ; (8019ddc <dhcp_parse_reply+0x31c>)
8019dbe: f002 ff9b bl 801ccf8 <iprintf>
8019dc2: f06f 0305 mvn.w r3, #5
8019dc6: e139 b.n 801a03c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_T1;
8019dc8: 2304 movs r3, #4
8019dca: 623b str r3, [r7, #32]
break;
8019dcc: e023 b.n 8019e16 <dhcp_parse_reply+0x356>
8019dce: bf00 nop
8019dd0: 2000f818 .word 0x2000f818
8019dd4: 080203d8 .word 0x080203d8
8019dd8: 08020660 .word 0x08020660
8019ddc: 08020438 .word 0x08020438
8019de0: 0802066c .word 0x0802066c
8019de4: 08020680 .word 0x08020680
8019de8: 0802068c .word 0x0802068c
case (DHCP_OPTION_T2):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
8019dec: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019df0: 2b04 cmp r3, #4
8019df2: d009 beq.n 8019e08 <dhcp_parse_reply+0x348>
8019df4: 4b93 ldr r3, [pc, #588] ; (801a044 <dhcp_parse_reply+0x584>)
8019df6: f240 6261 movw r2, #1633 ; 0x661
8019dfa: 4993 ldr r1, [pc, #588] ; (801a048 <dhcp_parse_reply+0x588>)
8019dfc: 4893 ldr r0, [pc, #588] ; (801a04c <dhcp_parse_reply+0x58c>)
8019dfe: f002 ff7b bl 801ccf8 <iprintf>
8019e02: f06f 0305 mvn.w r3, #5
8019e06: e119 b.n 801a03c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_T2;
8019e08: 2305 movs r3, #5
8019e0a: 623b str r3, [r7, #32]
break;
8019e0c: e003 b.n 8019e16 <dhcp_parse_reply+0x356>
default:
decode_len = 0;
8019e0e: 2300 movs r3, #0
8019e10: f887 3026 strb.w r3, [r7, #38] ; 0x26
LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", (u16_t)op));
LWIP_HOOK_DHCP_PARSE_OPTION(ip_current_netif(), dhcp, dhcp->state, msg_in,
dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE) ? (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE) : 0,
op, len, q, val_offset);
break;
8019e14: bf00 nop
}
if (op == DHCP_OPTION_PAD) {
8019e16: 7dfb ldrb r3, [r7, #23]
8019e18: 2b00 cmp r3, #0
8019e1a: d103 bne.n 8019e24 <dhcp_parse_reply+0x364>
offset++;
8019e1c: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019e1e: 3301 adds r3, #1
8019e20: 877b strh r3, [r7, #58] ; 0x3a
8019e22: e0a1 b.n 8019f68 <dhcp_parse_reply+0x4a8>
} else {
if (offset + len + 2 > 0xFFFF) {
8019e24: 8f7a ldrh r2, [r7, #58] ; 0x3a
8019e26: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019e2a: 4413 add r3, r2
8019e2c: 3302 adds r3, #2
8019e2e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8019e32: db02 blt.n 8019e3a <dhcp_parse_reply+0x37a>
/* overflow */
return ERR_BUF;
8019e34: f06f 0301 mvn.w r3, #1
8019e38: e100 b.n 801a03c <dhcp_parse_reply+0x57c>
}
offset = (u16_t)(offset + len + 2);
8019e3a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019e3e: b29a uxth r2, r3
8019e40: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019e42: 4413 add r3, r2
8019e44: b29b uxth r3, r3
8019e46: 3302 adds r3, #2
8019e48: 877b strh r3, [r7, #58] ; 0x3a
if (decode_len > 0) {
8019e4a: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019e4e: 2b00 cmp r3, #0
8019e50: f000 808a beq.w 8019f68 <dhcp_parse_reply+0x4a8>
u32_t value = 0;
8019e54: 2300 movs r3, #0
8019e56: 60bb str r3, [r7, #8]
u16_t copy_len;
decode_next:
LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX);
8019e58: 6a3b ldr r3, [r7, #32]
8019e5a: 2b00 cmp r3, #0
8019e5c: db02 blt.n 8019e64 <dhcp_parse_reply+0x3a4>
8019e5e: 6a3b ldr r3, [r7, #32]
8019e60: 2b07 cmp r3, #7
8019e62: dd06 ble.n 8019e72 <dhcp_parse_reply+0x3b2>
8019e64: 4b77 ldr r3, [pc, #476] ; (801a044 <dhcp_parse_reply+0x584>)
8019e66: f44f 62cf mov.w r2, #1656 ; 0x678
8019e6a: 4979 ldr r1, [pc, #484] ; (801a050 <dhcp_parse_reply+0x590>)
8019e6c: 4877 ldr r0, [pc, #476] ; (801a04c <dhcp_parse_reply+0x58c>)
8019e6e: f002 ff43 bl 801ccf8 <iprintf>
if (!dhcp_option_given(dhcp, decode_idx)) {
8019e72: 4a78 ldr r2, [pc, #480] ; (801a054 <dhcp_parse_reply+0x594>)
8019e74: 6a3b ldr r3, [r7, #32]
8019e76: 4413 add r3, r2
8019e78: 781b ldrb r3, [r3, #0]
8019e7a: 2b00 cmp r3, #0
8019e7c: d174 bne.n 8019f68 <dhcp_parse_reply+0x4a8>
copy_len = LWIP_MIN(decode_len, 4);
8019e7e: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019e82: 2b04 cmp r3, #4
8019e84: bf28 it cs
8019e86: 2304 movcs r3, #4
8019e88: b2db uxtb r3, r3
8019e8a: 82bb strh r3, [r7, #20]
if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) {
8019e8c: 8bfb ldrh r3, [r7, #30]
8019e8e: 8aba ldrh r2, [r7, #20]
8019e90: f107 0108 add.w r1, r7, #8
8019e94: 6b38 ldr r0, [r7, #48] ; 0x30
8019e96: f7f8 fc05 bl 80126a4 <pbuf_copy_partial>
8019e9a: 4603 mov r3, r0
8019e9c: 461a mov r2, r3
8019e9e: 8abb ldrh r3, [r7, #20]
8019ea0: 4293 cmp r3, r2
8019ea2: d002 beq.n 8019eaa <dhcp_parse_reply+0x3ea>
return ERR_BUF;
8019ea4: f06f 0301 mvn.w r3, #1
8019ea8: e0c8 b.n 801a03c <dhcp_parse_reply+0x57c>
}
if (decode_len > 4) {
8019eaa: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019eae: 2b04 cmp r3, #4
8019eb0: d933 bls.n 8019f1a <dhcp_parse_reply+0x45a>
/* decode more than one u32_t */
u16_t next_val_offset;
LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;);
8019eb2: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019eb6: f003 0303 and.w r3, r3, #3
8019eba: b2db uxtb r3, r3
8019ebc: 2b00 cmp r3, #0
8019ebe: d009 beq.n 8019ed4 <dhcp_parse_reply+0x414>
8019ec0: 4b60 ldr r3, [pc, #384] ; (801a044 <dhcp_parse_reply+0x584>)
8019ec2: f240 6281 movw r2, #1665 ; 0x681
8019ec6: 4964 ldr r1, [pc, #400] ; (801a058 <dhcp_parse_reply+0x598>)
8019ec8: 4860 ldr r0, [pc, #384] ; (801a04c <dhcp_parse_reply+0x58c>)
8019eca: f002 ff15 bl 801ccf8 <iprintf>
8019ece: f06f 0305 mvn.w r3, #5
8019ed2: e0b3 b.n 801a03c <dhcp_parse_reply+0x57c>
dhcp_got_option(dhcp, decode_idx);
8019ed4: 4a5f ldr r2, [pc, #380] ; (801a054 <dhcp_parse_reply+0x594>)
8019ed6: 6a3b ldr r3, [r7, #32]
8019ed8: 4413 add r3, r2
8019eda: 2201 movs r2, #1
8019edc: 701a strb r2, [r3, #0]
dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value));
8019ede: 68bb ldr r3, [r7, #8]
8019ee0: 4618 mov r0, r3
8019ee2: f7f6 fe3a bl 8010b5a <lwip_htonl>
8019ee6: 4601 mov r1, r0
8019ee8: 4a5c ldr r2, [pc, #368] ; (801a05c <dhcp_parse_reply+0x59c>)
8019eea: 6a3b ldr r3, [r7, #32]
8019eec: f842 1023 str.w r1, [r2, r3, lsl #2]
decode_len = (u8_t)(decode_len - 4);
8019ef0: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019ef4: 3b04 subs r3, #4
8019ef6: f887 3026 strb.w r3, [r7, #38] ; 0x26
next_val_offset = (u16_t)(val_offset + 4);
8019efa: 8bfb ldrh r3, [r7, #30]
8019efc: 3304 adds r3, #4
8019efe: 827b strh r3, [r7, #18]
if (next_val_offset < val_offset) {
8019f00: 8a7a ldrh r2, [r7, #18]
8019f02: 8bfb ldrh r3, [r7, #30]
8019f04: 429a cmp r2, r3
8019f06: d202 bcs.n 8019f0e <dhcp_parse_reply+0x44e>
/* overflow */
return ERR_BUF;
8019f08: f06f 0301 mvn.w r3, #1
8019f0c: e096 b.n 801a03c <dhcp_parse_reply+0x57c>
}
val_offset = next_val_offset;
8019f0e: 8a7b ldrh r3, [r7, #18]
8019f10: 83fb strh r3, [r7, #30]
decode_idx++;
8019f12: 6a3b ldr r3, [r7, #32]
8019f14: 3301 adds r3, #1
8019f16: 623b str r3, [r7, #32]
goto decode_next;
8019f18: e79e b.n 8019e58 <dhcp_parse_reply+0x398>
} else if (decode_len == 4) {
8019f1a: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019f1e: 2b04 cmp r3, #4
8019f20: d106 bne.n 8019f30 <dhcp_parse_reply+0x470>
value = lwip_ntohl(value);
8019f22: 68bb ldr r3, [r7, #8]
8019f24: 4618 mov r0, r3
8019f26: f7f6 fe18 bl 8010b5a <lwip_htonl>
8019f2a: 4603 mov r3, r0
8019f2c: 60bb str r3, [r7, #8]
8019f2e: e011 b.n 8019f54 <dhcp_parse_reply+0x494>
} else {
LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
8019f30: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019f34: 2b01 cmp r3, #1
8019f36: d009 beq.n 8019f4c <dhcp_parse_reply+0x48c>
8019f38: 4b42 ldr r3, [pc, #264] ; (801a044 <dhcp_parse_reply+0x584>)
8019f3a: f44f 62d2 mov.w r2, #1680 ; 0x690
8019f3e: 4948 ldr r1, [pc, #288] ; (801a060 <dhcp_parse_reply+0x5a0>)
8019f40: 4842 ldr r0, [pc, #264] ; (801a04c <dhcp_parse_reply+0x58c>)
8019f42: f002 fed9 bl 801ccf8 <iprintf>
8019f46: f06f 0305 mvn.w r3, #5
8019f4a: e077 b.n 801a03c <dhcp_parse_reply+0x57c>
value = ((u8_t *)&value)[0];
8019f4c: f107 0308 add.w r3, r7, #8
8019f50: 781b ldrb r3, [r3, #0]
8019f52: 60bb str r3, [r7, #8]
}
dhcp_got_option(dhcp, decode_idx);
8019f54: 4a3f ldr r2, [pc, #252] ; (801a054 <dhcp_parse_reply+0x594>)
8019f56: 6a3b ldr r3, [r7, #32]
8019f58: 4413 add r3, r2
8019f5a: 2201 movs r2, #1
8019f5c: 701a strb r2, [r3, #0]
dhcp_set_option_value(dhcp, decode_idx, value);
8019f5e: 68ba ldr r2, [r7, #8]
8019f60: 493e ldr r1, [pc, #248] ; (801a05c <dhcp_parse_reply+0x59c>)
8019f62: 6a3b ldr r3, [r7, #32]
8019f64: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
}
if (offset >= q->len) {
8019f68: 6b3b ldr r3, [r7, #48] ; 0x30
8019f6a: 895b ldrh r3, [r3, #10]
8019f6c: 8f7a ldrh r2, [r7, #58] ; 0x3a
8019f6e: 429a cmp r2, r3
8019f70: d324 bcc.n 8019fbc <dhcp_parse_reply+0x4fc>
offset = (u16_t)(offset - q->len);
8019f72: 6b3b ldr r3, [r7, #48] ; 0x30
8019f74: 895b ldrh r3, [r3, #10]
8019f76: 8f7a ldrh r2, [r7, #58] ; 0x3a
8019f78: 1ad3 subs r3, r2, r3
8019f7a: 877b strh r3, [r7, #58] ; 0x3a
offset_max = (u16_t)(offset_max - q->len);
8019f7c: 6b3b ldr r3, [r7, #48] ; 0x30
8019f7e: 895b ldrh r3, [r3, #10]
8019f80: 8f3a ldrh r2, [r7, #56] ; 0x38
8019f82: 1ad3 subs r3, r2, r3
8019f84: 873b strh r3, [r7, #56] ; 0x38
if (offset < offset_max) {
8019f86: 8f7a ldrh r2, [r7, #58] ; 0x3a
8019f88: 8f3b ldrh r3, [r7, #56] ; 0x38
8019f8a: 429a cmp r2, r3
8019f8c: d213 bcs.n 8019fb6 <dhcp_parse_reply+0x4f6>
q = q->next;
8019f8e: 6b3b ldr r3, [r7, #48] ; 0x30
8019f90: 681b ldr r3, [r3, #0]
8019f92: 633b str r3, [r7, #48] ; 0x30
LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
8019f94: 6b3b ldr r3, [r7, #48] ; 0x30
8019f96: 2b00 cmp r3, #0
8019f98: d109 bne.n 8019fae <dhcp_parse_reply+0x4ee>
8019f9a: 4b2a ldr r3, [pc, #168] ; (801a044 <dhcp_parse_reply+0x584>)
8019f9c: f240 629d movw r2, #1693 ; 0x69d
8019fa0: 4930 ldr r1, [pc, #192] ; (801a064 <dhcp_parse_reply+0x5a4>)
8019fa2: 482a ldr r0, [pc, #168] ; (801a04c <dhcp_parse_reply+0x58c>)
8019fa4: f002 fea8 bl 801ccf8 <iprintf>
8019fa8: f06f 0305 mvn.w r3, #5
8019fac: e046 b.n 801a03c <dhcp_parse_reply+0x57c>
options = (u8_t *)q->payload;
8019fae: 6b3b ldr r3, [r7, #48] ; 0x30
8019fb0: 685b ldr r3, [r3, #4]
8019fb2: 63fb str r3, [r7, #60] ; 0x3c
8019fb4: e002 b.n 8019fbc <dhcp_parse_reply+0x4fc>
} else {
/* We've run out of bytes, probably no end marker. Don't proceed. */
return ERR_BUF;
8019fb6: f06f 0301 mvn.w r3, #1
8019fba: e03f b.n 801a03c <dhcp_parse_reply+0x57c>
while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
8019fbc: 6b3b ldr r3, [r7, #48] ; 0x30
8019fbe: 2b00 cmp r3, #0
8019fc0: d00a beq.n 8019fd8 <dhcp_parse_reply+0x518>
8019fc2: 8f7a ldrh r2, [r7, #58] ; 0x3a
8019fc4: 8f3b ldrh r3, [r7, #56] ; 0x38
8019fc6: 429a cmp r2, r3
8019fc8: d206 bcs.n 8019fd8 <dhcp_parse_reply+0x518>
8019fca: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019fcc: 6bfa ldr r2, [r7, #60] ; 0x3c
8019fce: 4413 add r3, r2
8019fd0: 781b ldrb r3, [r3, #0]
8019fd2: 2bff cmp r3, #255 ; 0xff
8019fd4: f47f adb7 bne.w 8019b46 <dhcp_parse_reply+0x86>
}
}
}
/* is this an overloaded message? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) {
8019fd8: 4b1e ldr r3, [pc, #120] ; (801a054 <dhcp_parse_reply+0x594>)
8019fda: 781b ldrb r3, [r3, #0]
8019fdc: 2b00 cmp r3, #0
8019fde: d018 beq.n 801a012 <dhcp_parse_reply+0x552>
u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD);
8019fe0: 4b1e ldr r3, [pc, #120] ; (801a05c <dhcp_parse_reply+0x59c>)
8019fe2: 681b ldr r3, [r3, #0]
8019fe4: 60fb str r3, [r7, #12]
dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD);
8019fe6: 4b1b ldr r3, [pc, #108] ; (801a054 <dhcp_parse_reply+0x594>)
8019fe8: 2200 movs r2, #0
8019fea: 701a strb r2, [r3, #0]
if (overload == DHCP_OVERLOAD_FILE) {
8019fec: 68fb ldr r3, [r7, #12]
8019fee: 2b01 cmp r3, #1
8019ff0: d102 bne.n 8019ff8 <dhcp_parse_reply+0x538>
parse_file_as_options = 1;
8019ff2: 2301 movs r3, #1
8019ff4: 62fb str r3, [r7, #44] ; 0x2c
8019ff6: e00c b.n 801a012 <dhcp_parse_reply+0x552>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n"));
} else if (overload == DHCP_OVERLOAD_SNAME) {
8019ff8: 68fb ldr r3, [r7, #12]
8019ffa: 2b02 cmp r3, #2
8019ffc: d102 bne.n 801a004 <dhcp_parse_reply+0x544>
parse_sname_as_options = 1;
8019ffe: 2301 movs r3, #1
801a000: 62bb str r3, [r7, #40] ; 0x28
801a002: e006 b.n 801a012 <dhcp_parse_reply+0x552>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n"));
} else if (overload == DHCP_OVERLOAD_SNAME_FILE) {
801a004: 68fb ldr r3, [r7, #12]
801a006: 2b03 cmp r3, #3
801a008: d103 bne.n 801a012 <dhcp_parse_reply+0x552>
parse_sname_as_options = 1;
801a00a: 2301 movs r3, #1
801a00c: 62bb str r3, [r7, #40] ; 0x28
parse_file_as_options = 1;
801a00e: 2301 movs r3, #1
801a010: 62fb str r3, [r7, #44] ; 0x2c
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname and file field\n"));
} else {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("invalid overload option: %d\n", (int)overload));
}
}
if (parse_file_as_options) {
801a012: 6afb ldr r3, [r7, #44] ; 0x2c
801a014: 2b00 cmp r3, #0
801a016: d006 beq.n 801a026 <dhcp_parse_reply+0x566>
/* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */
parse_file_as_options = 0;
801a018: 2300 movs r3, #0
801a01a: 62fb str r3, [r7, #44] ; 0x2c
options_idx = DHCP_FILE_OFS;
801a01c: 236c movs r3, #108 ; 0x6c
801a01e: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN;
801a020: 23ec movs r3, #236 ; 0xec
801a022: 86bb strh r3, [r7, #52] ; 0x34
#if LWIP_DHCP_BOOTP_FILE
file_overloaded = 1;
#endif
goto again;
801a024: e569 b.n 8019afa <dhcp_parse_reply+0x3a>
} else if (parse_sname_as_options) {
801a026: 6abb ldr r3, [r7, #40] ; 0x28
801a028: 2b00 cmp r3, #0
801a02a: d006 beq.n 801a03a <dhcp_parse_reply+0x57a>
parse_sname_as_options = 0;
801a02c: 2300 movs r3, #0
801a02e: 62bb str r3, [r7, #40] ; 0x28
options_idx = DHCP_SNAME_OFS;
801a030: 232c movs r3, #44 ; 0x2c
801a032: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN;
801a034: 236c movs r3, #108 ; 0x6c
801a036: 86bb strh r3, [r7, #52] ; 0x34
goto again;
801a038: e55f b.n 8019afa <dhcp_parse_reply+0x3a>
}
/* make sure the string is really NULL-terminated */
dhcp->boot_file_name[DHCP_FILE_LEN-1] = 0;
}
#endif /* LWIP_DHCP_BOOTP_FILE */
return ERR_OK;
801a03a: 2300 movs r3, #0
}
801a03c: 4618 mov r0, r3
801a03e: 3740 adds r7, #64 ; 0x40
801a040: 46bd mov sp, r7
801a042: bd80 pop {r7, pc}
801a044: 080203d8 .word 0x080203d8
801a048: 08020660 .word 0x08020660
801a04c: 08020438 .word 0x08020438
801a050: 080206a4 .word 0x080206a4
801a054: 2000f818 .word 0x2000f818
801a058: 080206b8 .word 0x080206b8
801a05c: 2000f820 .word 0x2000f820
801a060: 080206d0 .word 0x080206d0
801a064: 080206e4 .word 0x080206e4
0801a068 <dhcp_recv>:
/**
* If an incoming DHCP message is in response to us, then trigger the state machine
*/
static void
dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
{
801a068: b580 push {r7, lr}
801a06a: b08a sub sp, #40 ; 0x28
801a06c: af00 add r7, sp, #0
801a06e: 60f8 str r0, [r7, #12]
801a070: 60b9 str r1, [r7, #8]
801a072: 607a str r2, [r7, #4]
801a074: 603b str r3, [r7, #0]
struct netif *netif = ip_current_input_netif();
801a076: 4b5f ldr r3, [pc, #380] ; (801a1f4 <dhcp_recv+0x18c>)
801a078: 685b ldr r3, [r3, #4]
801a07a: 623b str r3, [r7, #32]
struct dhcp *dhcp = netif_dhcp_data(netif);
801a07c: 6a3b ldr r3, [r7, #32]
801a07e: 6a5b ldr r3, [r3, #36] ; 0x24
801a080: 61fb str r3, [r7, #28]
struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload;
801a082: 687b ldr r3, [r7, #4]
801a084: 685b ldr r3, [r3, #4]
801a086: 61bb str r3, [r7, #24]
struct dhcp_msg *msg_in;
LWIP_UNUSED_ARG(arg);
/* Caught DHCP message from netif that does not have DHCP enabled? -> not interested */
if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) {
801a088: 69fb ldr r3, [r7, #28]
801a08a: 2b00 cmp r3, #0
801a08c: f000 809d beq.w 801a1ca <dhcp_recv+0x162>
801a090: 69fb ldr r3, [r7, #28]
801a092: 791b ldrb r3, [r3, #4]
801a094: 2b00 cmp r3, #0
801a096: f000 8098 beq.w 801a1ca <dhcp_recv+0x162>
/* prevent warnings about unused arguments */
LWIP_UNUSED_ARG(pcb);
LWIP_UNUSED_ARG(addr);
LWIP_UNUSED_ARG(port);
if (p->len < DHCP_MIN_REPLY_LEN) {
801a09a: 687b ldr r3, [r7, #4]
801a09c: 895b ldrh r3, [r3, #10]
801a09e: 2b2b cmp r3, #43 ; 0x2b
801a0a0: f240 8095 bls.w 801a1ce <dhcp_recv+0x166>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n"));
goto free_pbuf_and_return;
}
if (reply_msg->op != DHCP_BOOTREPLY) {
801a0a4: 69bb ldr r3, [r7, #24]
801a0a6: 781b ldrb r3, [r3, #0]
801a0a8: 2b02 cmp r3, #2
801a0aa: f040 8092 bne.w 801a1d2 <dhcp_recv+0x16a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op));
goto free_pbuf_and_return;
}
/* iterate through hardware address and match against DHCP message */
for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
801a0ae: 2300 movs r3, #0
801a0b0: f887 3027 strb.w r3, [r7, #39] ; 0x27
801a0b4: e012 b.n 801a0dc <dhcp_recv+0x74>
if (netif->hwaddr[i] != reply_msg->chaddr[i]) {
801a0b6: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801a0ba: 6a3a ldr r2, [r7, #32]
801a0bc: 4413 add r3, r2
801a0be: f893 202a ldrb.w r2, [r3, #42] ; 0x2a
801a0c2: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801a0c6: 69b9 ldr r1, [r7, #24]
801a0c8: 440b add r3, r1
801a0ca: 7f1b ldrb r3, [r3, #28]
801a0cc: 429a cmp r2, r3
801a0ce: f040 8082 bne.w 801a1d6 <dhcp_recv+0x16e>
for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
801a0d2: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801a0d6: 3301 adds r3, #1
801a0d8: f887 3027 strb.w r3, [r7, #39] ; 0x27
801a0dc: 6a3b ldr r3, [r7, #32]
801a0de: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
801a0e2: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
801a0e6: 429a cmp r2, r3
801a0e8: d203 bcs.n 801a0f2 <dhcp_recv+0x8a>
801a0ea: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801a0ee: 2b05 cmp r3, #5
801a0f0: d9e1 bls.n 801a0b6 <dhcp_recv+0x4e>
(u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i]));
goto free_pbuf_and_return;
}
}
/* match transaction ID against what we expected */
if (lwip_ntohl(reply_msg->xid) != dhcp->xid) {
801a0f2: 69bb ldr r3, [r7, #24]
801a0f4: 685b ldr r3, [r3, #4]
801a0f6: 4618 mov r0, r3
801a0f8: f7f6 fd2f bl 8010b5a <lwip_htonl>
801a0fc: 4602 mov r2, r0
801a0fe: 69fb ldr r3, [r7, #28]
801a100: 681b ldr r3, [r3, #0]
801a102: 429a cmp r2, r3
801a104: d169 bne.n 801a1da <dhcp_recv+0x172>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING,
("transaction id mismatch reply_msg->xid(%"X32_F")!=dhcp->xid(%"X32_F")\n", lwip_ntohl(reply_msg->xid), dhcp->xid));
goto free_pbuf_and_return;
}
/* option fields could be unfold? */
if (dhcp_parse_reply(p, dhcp) != ERR_OK) {
801a106: 69f9 ldr r1, [r7, #28]
801a108: 6878 ldr r0, [r7, #4]
801a10a: f7ff fcd9 bl 8019ac0 <dhcp_parse_reply>
801a10e: 4603 mov r3, r0
801a110: 2b00 cmp r3, #0
801a112: d164 bne.n 801a1de <dhcp_recv+0x176>
goto free_pbuf_and_return;
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("searching DHCP_OPTION_MESSAGE_TYPE\n"));
/* obtain pointer to DHCP message type */
if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) {
801a114: 4b38 ldr r3, [pc, #224] ; (801a1f8 <dhcp_recv+0x190>)
801a116: 785b ldrb r3, [r3, #1]
801a118: 2b00 cmp r3, #0
801a11a: d062 beq.n 801a1e2 <dhcp_recv+0x17a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP_OPTION_MESSAGE_TYPE option not found\n"));
goto free_pbuf_and_return;
}
msg_in = (struct dhcp_msg *)p->payload;
801a11c: 687b ldr r3, [r7, #4]
801a11e: 685b ldr r3, [r3, #4]
801a120: 617b str r3, [r7, #20]
/* read DHCP message type */
msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE);
801a122: 4b36 ldr r3, [pc, #216] ; (801a1fc <dhcp_recv+0x194>)
801a124: 685b ldr r3, [r3, #4]
801a126: 74fb strb r3, [r7, #19]
/* message type is DHCP ACK? */
if (msg_type == DHCP_ACK) {
801a128: 7cfb ldrb r3, [r7, #19]
801a12a: 2b05 cmp r3, #5
801a12c: d12a bne.n 801a184 <dhcp_recv+0x11c>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n"));
/* in requesting state? */
if (dhcp->state == DHCP_STATE_REQUESTING) {
801a12e: 69fb ldr r3, [r7, #28]
801a130: 795b ldrb r3, [r3, #5]
801a132: 2b01 cmp r3, #1
801a134: d112 bne.n 801a15c <dhcp_recv+0xf4>
dhcp_handle_ack(netif, msg_in);
801a136: 6979 ldr r1, [r7, #20]
801a138: 6a38 ldr r0, [r7, #32]
801a13a: f7fe fe05 bl 8018d48 <dhcp_handle_ack>
#if DHCP_DOES_ARP_CHECK
if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
801a13e: 6a3b ldr r3, [r7, #32]
801a140: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801a144: f003 0308 and.w r3, r3, #8
801a148: 2b00 cmp r3, #0
801a14a: d003 beq.n 801a154 <dhcp_recv+0xec>
/* check if the acknowledged lease address is already in use */
dhcp_check(netif);
801a14c: 6a38 ldr r0, [r7, #32]
801a14e: f7fe fb73 bl 8018838 <dhcp_check>
801a152: e047 b.n 801a1e4 <dhcp_recv+0x17c>
} else {
/* bind interface to the acknowledged lease address */
dhcp_bind(netif);
801a154: 6a38 ldr r0, [r7, #32]
801a156: f7ff f867 bl 8019228 <dhcp_bind>
801a15a: e043 b.n 801a1e4 <dhcp_recv+0x17c>
/* bind interface to the acknowledged lease address */
dhcp_bind(netif);
#endif
}
/* already bound to the given lease address? */
else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
801a15c: 69fb ldr r3, [r7, #28]
801a15e: 795b ldrb r3, [r3, #5]
801a160: 2b03 cmp r3, #3
801a162: d007 beq.n 801a174 <dhcp_recv+0x10c>
801a164: 69fb ldr r3, [r7, #28]
801a166: 795b ldrb r3, [r3, #5]
801a168: 2b04 cmp r3, #4
801a16a: d003 beq.n 801a174 <dhcp_recv+0x10c>
(dhcp->state == DHCP_STATE_RENEWING)) {
801a16c: 69fb ldr r3, [r7, #28]
801a16e: 795b ldrb r3, [r3, #5]
else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
801a170: 2b05 cmp r3, #5
801a172: d137 bne.n 801a1e4 <dhcp_recv+0x17c>
dhcp_handle_ack(netif, msg_in);
801a174: 6979 ldr r1, [r7, #20]
801a176: 6a38 ldr r0, [r7, #32]
801a178: f7fe fde6 bl 8018d48 <dhcp_handle_ack>
dhcp_bind(netif);
801a17c: 6a38 ldr r0, [r7, #32]
801a17e: f7ff f853 bl 8019228 <dhcp_bind>
801a182: e02f b.n 801a1e4 <dhcp_recv+0x17c>
}
}
/* received a DHCP_NAK in appropriate state? */
else if ((msg_type == DHCP_NAK) &&
801a184: 7cfb ldrb r3, [r7, #19]
801a186: 2b06 cmp r3, #6
801a188: d113 bne.n 801a1b2 <dhcp_recv+0x14a>
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
801a18a: 69fb ldr r3, [r7, #28]
801a18c: 795b ldrb r3, [r3, #5]
else if ((msg_type == DHCP_NAK) &&
801a18e: 2b03 cmp r3, #3
801a190: d00b beq.n 801a1aa <dhcp_recv+0x142>
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
801a192: 69fb ldr r3, [r7, #28]
801a194: 795b ldrb r3, [r3, #5]
801a196: 2b01 cmp r3, #1
801a198: d007 beq.n 801a1aa <dhcp_recv+0x142>
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
801a19a: 69fb ldr r3, [r7, #28]
801a19c: 795b ldrb r3, [r3, #5]
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
801a19e: 2b04 cmp r3, #4
801a1a0: d003 beq.n 801a1aa <dhcp_recv+0x142>
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
801a1a2: 69fb ldr r3, [r7, #28]
801a1a4: 795b ldrb r3, [r3, #5]
801a1a6: 2b05 cmp r3, #5
801a1a8: d103 bne.n 801a1b2 <dhcp_recv+0x14a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n"));
dhcp_handle_nak(netif);
801a1aa: 6a38 ldr r0, [r7, #32]
801a1ac: f7fe fb2a bl 8018804 <dhcp_handle_nak>
801a1b0: e018 b.n 801a1e4 <dhcp_recv+0x17c>
}
/* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */
else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) {
801a1b2: 7cfb ldrb r3, [r7, #19]
801a1b4: 2b02 cmp r3, #2
801a1b6: d108 bne.n 801a1ca <dhcp_recv+0x162>
801a1b8: 69fb ldr r3, [r7, #28]
801a1ba: 795b ldrb r3, [r3, #5]
801a1bc: 2b06 cmp r3, #6
801a1be: d104 bne.n 801a1ca <dhcp_recv+0x162>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_STATE_SELECTING state\n"));
/* remember offered lease */
dhcp_handle_offer(netif, msg_in);
801a1c0: 6979 ldr r1, [r7, #20]
801a1c2: 6a38 ldr r0, [r7, #32]
801a1c4: f7fe fb6c bl 80188a0 <dhcp_handle_offer>
801a1c8: e00c b.n 801a1e4 <dhcp_recv+0x17c>
}
free_pbuf_and_return:
801a1ca: bf00 nop
801a1cc: e00a b.n 801a1e4 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
801a1ce: bf00 nop
801a1d0: e008 b.n 801a1e4 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
801a1d2: bf00 nop
801a1d4: e006 b.n 801a1e4 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
801a1d6: bf00 nop
801a1d8: e004 b.n 801a1e4 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
801a1da: bf00 nop
801a1dc: e002 b.n 801a1e4 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
801a1de: bf00 nop
801a1e0: e000 b.n 801a1e4 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
801a1e2: bf00 nop
pbuf_free(p);
801a1e4: 6878 ldr r0, [r7, #4]
801a1e6: f7f8 f857 bl 8012298 <pbuf_free>
}
801a1ea: bf00 nop
801a1ec: 3728 adds r7, #40 ; 0x28
801a1ee: 46bd mov sp, r7
801a1f0: bd80 pop {r7, pc}
801a1f2: bf00 nop
801a1f4: 2000c0c8 .word 0x2000c0c8
801a1f8: 2000f818 .word 0x2000f818
801a1fc: 2000f820 .word 0x2000f820
0801a200 <dhcp_create_msg>:
* @param dhcp dhcp control struct
* @param message_type message type of the request
*/
static struct pbuf *
dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type, u16_t *options_out_len)
{
801a200: b580 push {r7, lr}
801a202: b088 sub sp, #32
801a204: af00 add r7, sp, #0
801a206: 60f8 str r0, [r7, #12]
801a208: 60b9 str r1, [r7, #8]
801a20a: 603b str r3, [r7, #0]
801a20c: 4613 mov r3, r2
801a20e: 71fb strb r3, [r7, #7]
if (!xid_initialised) {
xid = DHCP_GLOBAL_XID;
xid_initialised = !xid_initialised;
}
#endif
LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;);
801a210: 68fb ldr r3, [r7, #12]
801a212: 2b00 cmp r3, #0
801a214: d108 bne.n 801a228 <dhcp_create_msg+0x28>
801a216: 4b5f ldr r3, [pc, #380] ; (801a394 <dhcp_create_msg+0x194>)
801a218: f240 7269 movw r2, #1897 ; 0x769
801a21c: 495e ldr r1, [pc, #376] ; (801a398 <dhcp_create_msg+0x198>)
801a21e: 485f ldr r0, [pc, #380] ; (801a39c <dhcp_create_msg+0x19c>)
801a220: f002 fd6a bl 801ccf8 <iprintf>
801a224: 2300 movs r3, #0
801a226: e0b1 b.n 801a38c <dhcp_create_msg+0x18c>
LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
801a228: 68bb ldr r3, [r7, #8]
801a22a: 2b00 cmp r3, #0
801a22c: d108 bne.n 801a240 <dhcp_create_msg+0x40>
801a22e: 4b59 ldr r3, [pc, #356] ; (801a394 <dhcp_create_msg+0x194>)
801a230: f240 726a movw r2, #1898 ; 0x76a
801a234: 495a ldr r1, [pc, #360] ; (801a3a0 <dhcp_create_msg+0x1a0>)
801a236: 4859 ldr r0, [pc, #356] ; (801a39c <dhcp_create_msg+0x19c>)
801a238: f002 fd5e bl 801ccf8 <iprintf>
801a23c: 2300 movs r3, #0
801a23e: e0a5 b.n 801a38c <dhcp_create_msg+0x18c>
p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM);
801a240: f44f 7220 mov.w r2, #640 ; 0x280
801a244: f44f 719a mov.w r1, #308 ; 0x134
801a248: 2036 movs r0, #54 ; 0x36
801a24a: f7f7 fd45 bl 8011cd8 <pbuf_alloc>
801a24e: 61b8 str r0, [r7, #24]
if (p_out == NULL) {
801a250: 69bb ldr r3, [r7, #24]
801a252: 2b00 cmp r3, #0
801a254: d101 bne.n 801a25a <dhcp_create_msg+0x5a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("dhcp_create_msg(): could not allocate pbuf\n"));
return NULL;
801a256: 2300 movs r3, #0
801a258: e098 b.n 801a38c <dhcp_create_msg+0x18c>
}
LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
801a25a: 69bb ldr r3, [r7, #24]
801a25c: 895b ldrh r3, [r3, #10]
801a25e: f5b3 7f9a cmp.w r3, #308 ; 0x134
801a262: d206 bcs.n 801a272 <dhcp_create_msg+0x72>
801a264: 4b4b ldr r3, [pc, #300] ; (801a394 <dhcp_create_msg+0x194>)
801a266: f240 7272 movw r2, #1906 ; 0x772
801a26a: 494e ldr r1, [pc, #312] ; (801a3a4 <dhcp_create_msg+0x1a4>)
801a26c: 484b ldr r0, [pc, #300] ; (801a39c <dhcp_create_msg+0x19c>)
801a26e: f002 fd43 bl 801ccf8 <iprintf>
(p_out->len >= sizeof(struct dhcp_msg)));
/* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */
if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) {
801a272: 79fb ldrb r3, [r7, #7]
801a274: 2b03 cmp r3, #3
801a276: d103 bne.n 801a280 <dhcp_create_msg+0x80>
801a278: 68bb ldr r3, [r7, #8]
801a27a: 795b ldrb r3, [r3, #5]
801a27c: 2b03 cmp r3, #3
801a27e: d10d bne.n 801a29c <dhcp_create_msg+0x9c>
/* reuse transaction identifier in retransmissions */
if (dhcp->tries == 0) {
801a280: 68bb ldr r3, [r7, #8]
801a282: 799b ldrb r3, [r3, #6]
801a284: 2b00 cmp r3, #0
801a286: d105 bne.n 801a294 <dhcp_create_msg+0x94>
#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND)
xid = LWIP_RAND();
801a288: f002 fd4e bl 801cd28 <rand>
801a28c: 4603 mov r3, r0
801a28e: 461a mov r2, r3
801a290: 4b45 ldr r3, [pc, #276] ; (801a3a8 <dhcp_create_msg+0x1a8>)
801a292: 601a str r2, [r3, #0]
#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
xid++;
#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
}
dhcp->xid = xid;
801a294: 4b44 ldr r3, [pc, #272] ; (801a3a8 <dhcp_create_msg+0x1a8>)
801a296: 681a ldr r2, [r3, #0]
801a298: 68bb ldr r3, [r7, #8]
801a29a: 601a str r2, [r3, #0]
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
("transaction id xid(%"X32_F")\n", xid));
msg_out = (struct dhcp_msg *)p_out->payload;
801a29c: 69bb ldr r3, [r7, #24]
801a29e: 685b ldr r3, [r3, #4]
801a2a0: 617b str r3, [r7, #20]
memset(msg_out, 0, sizeof(struct dhcp_msg));
801a2a2: f44f 729a mov.w r2, #308 ; 0x134
801a2a6: 2100 movs r1, #0
801a2a8: 6978 ldr r0, [r7, #20]
801a2aa: f002 fd1c bl 801cce6 <memset>
msg_out->op = DHCP_BOOTREQUEST;
801a2ae: 697b ldr r3, [r7, #20]
801a2b0: 2201 movs r2, #1
801a2b2: 701a strb r2, [r3, #0]
/* @todo: make link layer independent */
msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET;
801a2b4: 697b ldr r3, [r7, #20]
801a2b6: 2201 movs r2, #1
801a2b8: 705a strb r2, [r3, #1]
msg_out->hlen = netif->hwaddr_len;
801a2ba: 68fb ldr r3, [r7, #12]
801a2bc: f893 2030 ldrb.w r2, [r3, #48] ; 0x30
801a2c0: 697b ldr r3, [r7, #20]
801a2c2: 709a strb r2, [r3, #2]
msg_out->xid = lwip_htonl(dhcp->xid);
801a2c4: 68bb ldr r3, [r7, #8]
801a2c6: 681b ldr r3, [r3, #0]
801a2c8: 4618 mov r0, r3
801a2ca: f7f6 fc46 bl 8010b5a <lwip_htonl>
801a2ce: 4602 mov r2, r0
801a2d0: 697b ldr r3, [r7, #20]
801a2d2: 605a str r2, [r3, #4]
/* we don't need the broadcast flag since we can receive unicast traffic
before being fully configured! */
/* set ciaddr to netif->ip_addr based on message_type and state */
if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || (message_type == DHCP_RELEASE) ||
801a2d4: 79fb ldrb r3, [r7, #7]
801a2d6: 2b08 cmp r3, #8
801a2d8: d010 beq.n 801a2fc <dhcp_create_msg+0xfc>
801a2da: 79fb ldrb r3, [r7, #7]
801a2dc: 2b04 cmp r3, #4
801a2de: d00d beq.n 801a2fc <dhcp_create_msg+0xfc>
801a2e0: 79fb ldrb r3, [r7, #7]
801a2e2: 2b07 cmp r3, #7
801a2e4: d00a beq.n 801a2fc <dhcp_create_msg+0xfc>
801a2e6: 79fb ldrb r3, [r7, #7]
801a2e8: 2b03 cmp r3, #3
801a2ea: d10c bne.n 801a306 <dhcp_create_msg+0x106>
((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
801a2ec: 68bb ldr r3, [r7, #8]
801a2ee: 795b ldrb r3, [r3, #5]
((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
801a2f0: 2b05 cmp r3, #5
801a2f2: d003 beq.n 801a2fc <dhcp_create_msg+0xfc>
((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
801a2f4: 68bb ldr r3, [r7, #8]
801a2f6: 795b ldrb r3, [r3, #5]
801a2f8: 2b04 cmp r3, #4
801a2fa: d104 bne.n 801a306 <dhcp_create_msg+0x106>
ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif));
801a2fc: 68fb ldr r3, [r7, #12]
801a2fe: 3304 adds r3, #4
801a300: 681a ldr r2, [r3, #0]
801a302: 697b ldr r3, [r7, #20]
801a304: 60da str r2, [r3, #12]
}
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
801a306: 2300 movs r3, #0
801a308: 83fb strh r3, [r7, #30]
801a30a: e00c b.n 801a326 <dhcp_create_msg+0x126>
/* copy netif hardware address (padded with zeroes through memset already) */
msg_out->chaddr[i] = netif->hwaddr[i];
801a30c: 8bfa ldrh r2, [r7, #30]
801a30e: 8bfb ldrh r3, [r7, #30]
801a310: 68f9 ldr r1, [r7, #12]
801a312: 440a add r2, r1
801a314: f892 102a ldrb.w r1, [r2, #42] ; 0x2a
801a318: 697a ldr r2, [r7, #20]
801a31a: 4413 add r3, r2
801a31c: 460a mov r2, r1
801a31e: 771a strb r2, [r3, #28]
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
801a320: 8bfb ldrh r3, [r7, #30]
801a322: 3301 adds r3, #1
801a324: 83fb strh r3, [r7, #30]
801a326: 8bfb ldrh r3, [r7, #30]
801a328: 2b05 cmp r3, #5
801a32a: d9ef bls.n 801a30c <dhcp_create_msg+0x10c>
}
msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE);
801a32c: 697b ldr r3, [r7, #20]
801a32e: 2200 movs r2, #0
801a330: f042 0263 orr.w r2, r2, #99 ; 0x63
801a334: f883 20ec strb.w r2, [r3, #236] ; 0xec
801a338: 2200 movs r2, #0
801a33a: f062 027d orn r2, r2, #125 ; 0x7d
801a33e: f883 20ed strb.w r2, [r3, #237] ; 0xed
801a342: 2200 movs r2, #0
801a344: f042 0253 orr.w r2, r2, #83 ; 0x53
801a348: f883 20ee strb.w r2, [r3, #238] ; 0xee
801a34c: 2200 movs r2, #0
801a34e: f042 0263 orr.w r2, r2, #99 ; 0x63
801a352: f883 20ef strb.w r2, [r3, #239] ; 0xef
/* Add option MESSAGE_TYPE */
options_out_len_loc = dhcp_option(0, msg_out->options, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN);
801a356: 697b ldr r3, [r7, #20]
801a358: f103 01f0 add.w r1, r3, #240 ; 0xf0
801a35c: 2301 movs r3, #1
801a35e: 2235 movs r2, #53 ; 0x35
801a360: 2000 movs r0, #0
801a362: f7ff fadd bl 8019920 <dhcp_option>
801a366: 4603 mov r3, r0
801a368: 827b strh r3, [r7, #18]
options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type);
801a36a: 697b ldr r3, [r7, #20]
801a36c: f103 01f0 add.w r1, r3, #240 ; 0xf0
801a370: 79fa ldrb r2, [r7, #7]
801a372: 8a7b ldrh r3, [r7, #18]
801a374: 4618 mov r0, r3
801a376: f7ff fb07 bl 8019988 <dhcp_option_byte>
801a37a: 4603 mov r3, r0
801a37c: 827b strh r3, [r7, #18]
if (options_out_len) {
801a37e: 683b ldr r3, [r7, #0]
801a380: 2b00 cmp r3, #0
801a382: d002 beq.n 801a38a <dhcp_create_msg+0x18a>
*options_out_len = options_out_len_loc;
801a384: 683b ldr r3, [r7, #0]
801a386: 8a7a ldrh r2, [r7, #18]
801a388: 801a strh r2, [r3, #0]
}
return p_out;
801a38a: 69bb ldr r3, [r7, #24]
}
801a38c: 4618 mov r0, r3
801a38e: 3720 adds r7, #32
801a390: 46bd mov sp, r7
801a392: bd80 pop {r7, pc}
801a394: 080203d8 .word 0x080203d8
801a398: 080206f8 .word 0x080206f8
801a39c: 08020438 .word 0x08020438
801a3a0: 08020718 .word 0x08020718
801a3a4: 08020738 .word 0x08020738
801a3a8: 20008774 .word 0x20008774
0801a3ac <dhcp_option_trailer>:
* Adds the END option to the DHCP message, and if
* necessary, up to three padding bytes.
*/
static void
dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out)
{
801a3ac: b580 push {r7, lr}
801a3ae: b084 sub sp, #16
801a3b0: af00 add r7, sp, #0
801a3b2: 4603 mov r3, r0
801a3b4: 60b9 str r1, [r7, #8]
801a3b6: 607a str r2, [r7, #4]
801a3b8: 81fb strh r3, [r7, #14]
options[options_out_len++] = DHCP_OPTION_END;
801a3ba: 89fb ldrh r3, [r7, #14]
801a3bc: 1c5a adds r2, r3, #1
801a3be: 81fa strh r2, [r7, #14]
801a3c0: 461a mov r2, r3
801a3c2: 68bb ldr r3, [r7, #8]
801a3c4: 4413 add r3, r2
801a3c6: 22ff movs r2, #255 ; 0xff
801a3c8: 701a strb r2, [r3, #0]
/* packet is too small, or not 4 byte aligned? */
while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
801a3ca: e007 b.n 801a3dc <dhcp_option_trailer+0x30>
(options_out_len < DHCP_OPTIONS_LEN)) {
/* add a fill/padding byte */
options[options_out_len++] = 0;
801a3cc: 89fb ldrh r3, [r7, #14]
801a3ce: 1c5a adds r2, r3, #1
801a3d0: 81fa strh r2, [r7, #14]
801a3d2: 461a mov r2, r3
801a3d4: 68bb ldr r3, [r7, #8]
801a3d6: 4413 add r3, r2
801a3d8: 2200 movs r2, #0
801a3da: 701a strb r2, [r3, #0]
while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
801a3dc: 89fb ldrh r3, [r7, #14]
801a3de: 2b43 cmp r3, #67 ; 0x43
801a3e0: d904 bls.n 801a3ec <dhcp_option_trailer+0x40>
801a3e2: 89fb ldrh r3, [r7, #14]
801a3e4: f003 0303 and.w r3, r3, #3
801a3e8: 2b00 cmp r3, #0
801a3ea: d002 beq.n 801a3f2 <dhcp_option_trailer+0x46>
801a3ec: 89fb ldrh r3, [r7, #14]
801a3ee: 2b43 cmp r3, #67 ; 0x43
801a3f0: d9ec bls.n 801a3cc <dhcp_option_trailer+0x20>
}
/* shrink the pbuf to the actual content length */
pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len));
801a3f2: 89fb ldrh r3, [r7, #14]
801a3f4: 33f0 adds r3, #240 ; 0xf0
801a3f6: b29b uxth r3, r3
801a3f8: 4619 mov r1, r3
801a3fa: 6878 ldr r0, [r7, #4]
801a3fc: f7f7 fdc6 bl 8011f8c <pbuf_realloc>
}
801a400: bf00 nop
801a402: 3710 adds r7, #16
801a404: 46bd mov sp, r7
801a406: bd80 pop {r7, pc}
0801a408 <dhcp_supplied_address>:
* @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING),
* 0 otherwise
*/
u8_t
dhcp_supplied_address(const struct netif *netif)
{
801a408: b480 push {r7}
801a40a: b085 sub sp, #20
801a40c: af00 add r7, sp, #0
801a40e: 6078 str r0, [r7, #4]
if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) {
801a410: 687b ldr r3, [r7, #4]
801a412: 2b00 cmp r3, #0
801a414: d017 beq.n 801a446 <dhcp_supplied_address+0x3e>
801a416: 687b ldr r3, [r7, #4]
801a418: 6a5b ldr r3, [r3, #36] ; 0x24
801a41a: 2b00 cmp r3, #0
801a41c: d013 beq.n 801a446 <dhcp_supplied_address+0x3e>
struct dhcp *dhcp = netif_dhcp_data(netif);
801a41e: 687b ldr r3, [r7, #4]
801a420: 6a5b ldr r3, [r3, #36] ; 0x24
801a422: 60fb str r3, [r7, #12]
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
801a424: 68fb ldr r3, [r7, #12]
801a426: 795b ldrb r3, [r3, #5]
801a428: 2b0a cmp r3, #10
801a42a: d007 beq.n 801a43c <dhcp_supplied_address+0x34>
801a42c: 68fb ldr r3, [r7, #12]
801a42e: 795b ldrb r3, [r3, #5]
801a430: 2b05 cmp r3, #5
801a432: d003 beq.n 801a43c <dhcp_supplied_address+0x34>
(dhcp->state == DHCP_STATE_REBINDING);
801a434: 68fb ldr r3, [r7, #12]
801a436: 795b ldrb r3, [r3, #5]
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
801a438: 2b04 cmp r3, #4
801a43a: d101 bne.n 801a440 <dhcp_supplied_address+0x38>
801a43c: 2301 movs r3, #1
801a43e: e000 b.n 801a442 <dhcp_supplied_address+0x3a>
801a440: 2300 movs r3, #0
801a442: b2db uxtb r3, r3
801a444: e000 b.n 801a448 <dhcp_supplied_address+0x40>
}
return 0;
801a446: 2300 movs r3, #0
}
801a448: 4618 mov r0, r3
801a44a: 3714 adds r7, #20
801a44c: 46bd mov sp, r7
801a44e: f85d 7b04 ldr.w r7, [sp], #4
801a452: 4770 bx lr
0801a454 <etharp_free_entry>:
#endif /* ARP_QUEUEING */
/** Clean up ARP table entries */
static void
etharp_free_entry(int i)
{
801a454: b580 push {r7, lr}
801a456: b082 sub sp, #8
801a458: af00 add r7, sp, #0
801a45a: 6078 str r0, [r7, #4]
/* remove from SNMP ARP index tree */
mib2_remove_arp_entry(arp_table[i].netif, &arp_table[i].ipaddr);
/* and empty packet queue */
if (arp_table[i].q != NULL) {
801a45c: 4915 ldr r1, [pc, #84] ; (801a4b4 <etharp_free_entry+0x60>)
801a45e: 687a ldr r2, [r7, #4]
801a460: 4613 mov r3, r2
801a462: 005b lsls r3, r3, #1
801a464: 4413 add r3, r2
801a466: 00db lsls r3, r3, #3
801a468: 440b add r3, r1
801a46a: 681b ldr r3, [r3, #0]
801a46c: 2b00 cmp r3, #0
801a46e: d013 beq.n 801a498 <etharp_free_entry+0x44>
/* remove all queued packets */
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_free_entry: freeing entry %"U16_F", packet queue %p.\n", (u16_t)i, (void *)(arp_table[i].q)));
free_etharp_q(arp_table[i].q);
801a470: 4910 ldr r1, [pc, #64] ; (801a4b4 <etharp_free_entry+0x60>)
801a472: 687a ldr r2, [r7, #4]
801a474: 4613 mov r3, r2
801a476: 005b lsls r3, r3, #1
801a478: 4413 add r3, r2
801a47a: 00db lsls r3, r3, #3
801a47c: 440b add r3, r1
801a47e: 681b ldr r3, [r3, #0]
801a480: 4618 mov r0, r3
801a482: f7f7 ff09 bl 8012298 <pbuf_free>
arp_table[i].q = NULL;
801a486: 490b ldr r1, [pc, #44] ; (801a4b4 <etharp_free_entry+0x60>)
801a488: 687a ldr r2, [r7, #4]
801a48a: 4613 mov r3, r2
801a48c: 005b lsls r3, r3, #1
801a48e: 4413 add r3, r2
801a490: 00db lsls r3, r3, #3
801a492: 440b add r3, r1
801a494: 2200 movs r2, #0
801a496: 601a str r2, [r3, #0]
}
/* recycle entry for re-use */
arp_table[i].state = ETHARP_STATE_EMPTY;
801a498: 4906 ldr r1, [pc, #24] ; (801a4b4 <etharp_free_entry+0x60>)
801a49a: 687a ldr r2, [r7, #4]
801a49c: 4613 mov r3, r2
801a49e: 005b lsls r3, r3, #1
801a4a0: 4413 add r3, r2
801a4a2: 00db lsls r3, r3, #3
801a4a4: 440b add r3, r1
801a4a6: 3314 adds r3, #20
801a4a8: 2200 movs r2, #0
801a4aa: 701a strb r2, [r3, #0]
arp_table[i].ctime = 0;
arp_table[i].netif = NULL;
ip4_addr_set_zero(&arp_table[i].ipaddr);
arp_table[i].ethaddr = ethzero;
#endif /* LWIP_DEBUG */
}
801a4ac: bf00 nop
801a4ae: 3708 adds r7, #8
801a4b0: 46bd mov sp, r7
801a4b2: bd80 pop {r7, pc}
801a4b4: 20008778 .word 0x20008778
0801a4b8 <etharp_tmr>:
* This function should be called every ARP_TMR_INTERVAL milliseconds (1 second),
* in order to expire entries in the ARP table.
*/
void
etharp_tmr(void)
{
801a4b8: b580 push {r7, lr}
801a4ba: b082 sub sp, #8
801a4bc: af00 add r7, sp, #0
int i;
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n"));
/* remove expired entries from the ARP table */
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
801a4be: 2300 movs r3, #0
801a4c0: 607b str r3, [r7, #4]
801a4c2: e096 b.n 801a5f2 <etharp_tmr+0x13a>
u8_t state = arp_table[i].state;
801a4c4: 494f ldr r1, [pc, #316] ; (801a604 <etharp_tmr+0x14c>)
801a4c6: 687a ldr r2, [r7, #4]
801a4c8: 4613 mov r3, r2
801a4ca: 005b lsls r3, r3, #1
801a4cc: 4413 add r3, r2
801a4ce: 00db lsls r3, r3, #3
801a4d0: 440b add r3, r1
801a4d2: 3314 adds r3, #20
801a4d4: 781b ldrb r3, [r3, #0]
801a4d6: 70fb strb r3, [r7, #3]
if (state != ETHARP_STATE_EMPTY
801a4d8: 78fb ldrb r3, [r7, #3]
801a4da: 2b00 cmp r3, #0
801a4dc: f000 8086 beq.w 801a5ec <etharp_tmr+0x134>
#if ETHARP_SUPPORT_STATIC_ENTRIES
&& (state != ETHARP_STATE_STATIC)
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
) {
arp_table[i].ctime++;
801a4e0: 4948 ldr r1, [pc, #288] ; (801a604 <etharp_tmr+0x14c>)
801a4e2: 687a ldr r2, [r7, #4]
801a4e4: 4613 mov r3, r2
801a4e6: 005b lsls r3, r3, #1
801a4e8: 4413 add r3, r2
801a4ea: 00db lsls r3, r3, #3
801a4ec: 440b add r3, r1
801a4ee: 3312 adds r3, #18
801a4f0: 881b ldrh r3, [r3, #0]
801a4f2: 3301 adds r3, #1
801a4f4: b298 uxth r0, r3
801a4f6: 4943 ldr r1, [pc, #268] ; (801a604 <etharp_tmr+0x14c>)
801a4f8: 687a ldr r2, [r7, #4]
801a4fa: 4613 mov r3, r2
801a4fc: 005b lsls r3, r3, #1
801a4fe: 4413 add r3, r2
801a500: 00db lsls r3, r3, #3
801a502: 440b add r3, r1
801a504: 3312 adds r3, #18
801a506: 4602 mov r2, r0
801a508: 801a strh r2, [r3, #0]
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
801a50a: 493e ldr r1, [pc, #248] ; (801a604 <etharp_tmr+0x14c>)
801a50c: 687a ldr r2, [r7, #4]
801a50e: 4613 mov r3, r2
801a510: 005b lsls r3, r3, #1
801a512: 4413 add r3, r2
801a514: 00db lsls r3, r3, #3
801a516: 440b add r3, r1
801a518: 3312 adds r3, #18
801a51a: 881b ldrh r3, [r3, #0]
801a51c: f5b3 7f96 cmp.w r3, #300 ; 0x12c
801a520: d215 bcs.n 801a54e <etharp_tmr+0x96>
((arp_table[i].state == ETHARP_STATE_PENDING) &&
801a522: 4938 ldr r1, [pc, #224] ; (801a604 <etharp_tmr+0x14c>)
801a524: 687a ldr r2, [r7, #4]
801a526: 4613 mov r3, r2
801a528: 005b lsls r3, r3, #1
801a52a: 4413 add r3, r2
801a52c: 00db lsls r3, r3, #3
801a52e: 440b add r3, r1
801a530: 3314 adds r3, #20
801a532: 781b ldrb r3, [r3, #0]
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
801a534: 2b01 cmp r3, #1
801a536: d10e bne.n 801a556 <etharp_tmr+0x9e>
(arp_table[i].ctime >= ARP_MAXPENDING))) {
801a538: 4932 ldr r1, [pc, #200] ; (801a604 <etharp_tmr+0x14c>)
801a53a: 687a ldr r2, [r7, #4]
801a53c: 4613 mov r3, r2
801a53e: 005b lsls r3, r3, #1
801a540: 4413 add r3, r2
801a542: 00db lsls r3, r3, #3
801a544: 440b add r3, r1
801a546: 3312 adds r3, #18
801a548: 881b ldrh r3, [r3, #0]
((arp_table[i].state == ETHARP_STATE_PENDING) &&
801a54a: 2b04 cmp r3, #4
801a54c: d903 bls.n 801a556 <etharp_tmr+0x9e>
/* pending or stable entry has become old! */
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %d.\n",
arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", i));
/* clean up entries that have just been expired */
etharp_free_entry(i);
801a54e: 6878 ldr r0, [r7, #4]
801a550: f7ff ff80 bl 801a454 <etharp_free_entry>
801a554: e04a b.n 801a5ec <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) {
801a556: 492b ldr r1, [pc, #172] ; (801a604 <etharp_tmr+0x14c>)
801a558: 687a ldr r2, [r7, #4]
801a55a: 4613 mov r3, r2
801a55c: 005b lsls r3, r3, #1
801a55e: 4413 add r3, r2
801a560: 00db lsls r3, r3, #3
801a562: 440b add r3, r1
801a564: 3314 adds r3, #20
801a566: 781b ldrb r3, [r3, #0]
801a568: 2b03 cmp r3, #3
801a56a: d10a bne.n 801a582 <etharp_tmr+0xca>
/* Don't send more than one request every 2 seconds. */
arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2;
801a56c: 4925 ldr r1, [pc, #148] ; (801a604 <etharp_tmr+0x14c>)
801a56e: 687a ldr r2, [r7, #4]
801a570: 4613 mov r3, r2
801a572: 005b lsls r3, r3, #1
801a574: 4413 add r3, r2
801a576: 00db lsls r3, r3, #3
801a578: 440b add r3, r1
801a57a: 3314 adds r3, #20
801a57c: 2204 movs r2, #4
801a57e: 701a strb r2, [r3, #0]
801a580: e034 b.n 801a5ec <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) {
801a582: 4920 ldr r1, [pc, #128] ; (801a604 <etharp_tmr+0x14c>)
801a584: 687a ldr r2, [r7, #4]
801a586: 4613 mov r3, r2
801a588: 005b lsls r3, r3, #1
801a58a: 4413 add r3, r2
801a58c: 00db lsls r3, r3, #3
801a58e: 440b add r3, r1
801a590: 3314 adds r3, #20
801a592: 781b ldrb r3, [r3, #0]
801a594: 2b04 cmp r3, #4
801a596: d10a bne.n 801a5ae <etharp_tmr+0xf6>
/* Reset state to stable, so that the next transmitted packet will
re-send an ARP request. */
arp_table[i].state = ETHARP_STATE_STABLE;
801a598: 491a ldr r1, [pc, #104] ; (801a604 <etharp_tmr+0x14c>)
801a59a: 687a ldr r2, [r7, #4]
801a59c: 4613 mov r3, r2
801a59e: 005b lsls r3, r3, #1
801a5a0: 4413 add r3, r2
801a5a2: 00db lsls r3, r3, #3
801a5a4: 440b add r3, r1
801a5a6: 3314 adds r3, #20
801a5a8: 2202 movs r2, #2
801a5aa: 701a strb r2, [r3, #0]
801a5ac: e01e b.n 801a5ec <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
801a5ae: 4915 ldr r1, [pc, #84] ; (801a604 <etharp_tmr+0x14c>)
801a5b0: 687a ldr r2, [r7, #4]
801a5b2: 4613 mov r3, r2
801a5b4: 005b lsls r3, r3, #1
801a5b6: 4413 add r3, r2
801a5b8: 00db lsls r3, r3, #3
801a5ba: 440b add r3, r1
801a5bc: 3314 adds r3, #20
801a5be: 781b ldrb r3, [r3, #0]
801a5c0: 2b01 cmp r3, #1
801a5c2: d113 bne.n 801a5ec <etharp_tmr+0x134>
/* still pending, resend an ARP query */
etharp_request(arp_table[i].netif, &arp_table[i].ipaddr);
801a5c4: 490f ldr r1, [pc, #60] ; (801a604 <etharp_tmr+0x14c>)
801a5c6: 687a ldr r2, [r7, #4]
801a5c8: 4613 mov r3, r2
801a5ca: 005b lsls r3, r3, #1
801a5cc: 4413 add r3, r2
801a5ce: 00db lsls r3, r3, #3
801a5d0: 440b add r3, r1
801a5d2: 3308 adds r3, #8
801a5d4: 6818 ldr r0, [r3, #0]
801a5d6: 687a ldr r2, [r7, #4]
801a5d8: 4613 mov r3, r2
801a5da: 005b lsls r3, r3, #1
801a5dc: 4413 add r3, r2
801a5de: 00db lsls r3, r3, #3
801a5e0: 4a08 ldr r2, [pc, #32] ; (801a604 <etharp_tmr+0x14c>)
801a5e2: 4413 add r3, r2
801a5e4: 3304 adds r3, #4
801a5e6: 4619 mov r1, r3
801a5e8: f000 fe72 bl 801b2d0 <etharp_request>
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
801a5ec: 687b ldr r3, [r7, #4]
801a5ee: 3301 adds r3, #1
801a5f0: 607b str r3, [r7, #4]
801a5f2: 687b ldr r3, [r7, #4]
801a5f4: 2b09 cmp r3, #9
801a5f6: f77f af65 ble.w 801a4c4 <etharp_tmr+0xc>
}
}
}
}
801a5fa: bf00 nop
801a5fc: 3708 adds r7, #8
801a5fe: 46bd mov sp, r7
801a600: bd80 pop {r7, pc}
801a602: bf00 nop
801a604: 20008778 .word 0x20008778
0801a608 <etharp_find_entry>:
* @return The ARP entry index that matched or is created, ERR_MEM if no
* entry is found or could be recycled.
*/
static s16_t
etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif *netif)
{
801a608: b580 push {r7, lr}
801a60a: b08a sub sp, #40 ; 0x28
801a60c: af00 add r7, sp, #0
801a60e: 60f8 str r0, [r7, #12]
801a610: 460b mov r3, r1
801a612: 607a str r2, [r7, #4]
801a614: 72fb strb r3, [r7, #11]
s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE;
801a616: 230a movs r3, #10
801a618: 84fb strh r3, [r7, #38] ; 0x26
801a61a: 230a movs r3, #10
801a61c: 84bb strh r3, [r7, #36] ; 0x24
s16_t empty = ARP_TABLE_SIZE;
801a61e: 230a movs r3, #10
801a620: 847b strh r3, [r7, #34] ; 0x22
s16_t i = 0;
801a622: 2300 movs r3, #0
801a624: 843b strh r3, [r7, #32]
/* oldest entry with packets on queue */
s16_t old_queue = ARP_TABLE_SIZE;
801a626: 230a movs r3, #10
801a628: 83fb strh r3, [r7, #30]
/* its age */
u16_t age_queue = 0, age_pending = 0, age_stable = 0;
801a62a: 2300 movs r3, #0
801a62c: 83bb strh r3, [r7, #28]
801a62e: 2300 movs r3, #0
801a630: 837b strh r3, [r7, #26]
801a632: 2300 movs r3, #0
801a634: 833b strh r3, [r7, #24]
* 4) remember the oldest pending entry with queued packets (if any)
* 5) search for a matching IP entry, either pending or stable
* until 5 matches, or all entries are searched for.
*/
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
801a636: 2300 movs r3, #0
801a638: 843b strh r3, [r7, #32]
801a63a: e0ae b.n 801a79a <etharp_find_entry+0x192>
u8_t state = arp_table[i].state;
801a63c: f9b7 2020 ldrsh.w r2, [r7, #32]
801a640: 49a6 ldr r1, [pc, #664] ; (801a8dc <etharp_find_entry+0x2d4>)
801a642: 4613 mov r3, r2
801a644: 005b lsls r3, r3, #1
801a646: 4413 add r3, r2
801a648: 00db lsls r3, r3, #3
801a64a: 440b add r3, r1
801a64c: 3314 adds r3, #20
801a64e: 781b ldrb r3, [r3, #0]
801a650: 75fb strb r3, [r7, #23]
/* no empty entry found yet and now we do find one? */
if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) {
801a652: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
801a656: 2b0a cmp r3, #10
801a658: d105 bne.n 801a666 <etharp_find_entry+0x5e>
801a65a: 7dfb ldrb r3, [r7, #23]
801a65c: 2b00 cmp r3, #0
801a65e: d102 bne.n 801a666 <etharp_find_entry+0x5e>
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i));
/* remember first empty entry */
empty = i;
801a660: 8c3b ldrh r3, [r7, #32]
801a662: 847b strh r3, [r7, #34] ; 0x22
801a664: e095 b.n 801a792 <etharp_find_entry+0x18a>
} else if (state != ETHARP_STATE_EMPTY) {
801a666: 7dfb ldrb r3, [r7, #23]
801a668: 2b00 cmp r3, #0
801a66a: f000 8092 beq.w 801a792 <etharp_find_entry+0x18a>
LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE",
801a66e: 7dfb ldrb r3, [r7, #23]
801a670: 2b01 cmp r3, #1
801a672: d009 beq.n 801a688 <etharp_find_entry+0x80>
801a674: 7dfb ldrb r3, [r7, #23]
801a676: 2b01 cmp r3, #1
801a678: d806 bhi.n 801a688 <etharp_find_entry+0x80>
801a67a: 4b99 ldr r3, [pc, #612] ; (801a8e0 <etharp_find_entry+0x2d8>)
801a67c: f44f 7292 mov.w r2, #292 ; 0x124
801a680: 4998 ldr r1, [pc, #608] ; (801a8e4 <etharp_find_entry+0x2dc>)
801a682: 4899 ldr r0, [pc, #612] ; (801a8e8 <etharp_find_entry+0x2e0>)
801a684: f002 fb38 bl 801ccf8 <iprintf>
state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE);
/* if given, does IP address match IP address in ARP entry? */
if (ipaddr && ip4_addr_cmp(ipaddr, &arp_table[i].ipaddr)
801a688: 68fb ldr r3, [r7, #12]
801a68a: 2b00 cmp r3, #0
801a68c: d020 beq.n 801a6d0 <etharp_find_entry+0xc8>
801a68e: 68fb ldr r3, [r7, #12]
801a690: 6819 ldr r1, [r3, #0]
801a692: f9b7 2020 ldrsh.w r2, [r7, #32]
801a696: 4891 ldr r0, [pc, #580] ; (801a8dc <etharp_find_entry+0x2d4>)
801a698: 4613 mov r3, r2
801a69a: 005b lsls r3, r3, #1
801a69c: 4413 add r3, r2
801a69e: 00db lsls r3, r3, #3
801a6a0: 4403 add r3, r0
801a6a2: 3304 adds r3, #4
801a6a4: 681b ldr r3, [r3, #0]
801a6a6: 4299 cmp r1, r3
801a6a8: d112 bne.n 801a6d0 <etharp_find_entry+0xc8>
#if ETHARP_TABLE_MATCH_NETIF
&& ((netif == NULL) || (netif == arp_table[i].netif))
801a6aa: 687b ldr r3, [r7, #4]
801a6ac: 2b00 cmp r3, #0
801a6ae: d00c beq.n 801a6ca <etharp_find_entry+0xc2>
801a6b0: f9b7 2020 ldrsh.w r2, [r7, #32]
801a6b4: 4989 ldr r1, [pc, #548] ; (801a8dc <etharp_find_entry+0x2d4>)
801a6b6: 4613 mov r3, r2
801a6b8: 005b lsls r3, r3, #1
801a6ba: 4413 add r3, r2
801a6bc: 00db lsls r3, r3, #3
801a6be: 440b add r3, r1
801a6c0: 3308 adds r3, #8
801a6c2: 681b ldr r3, [r3, #0]
801a6c4: 687a ldr r2, [r7, #4]
801a6c6: 429a cmp r2, r3
801a6c8: d102 bne.n 801a6d0 <etharp_find_entry+0xc8>
#endif /* ETHARP_TABLE_MATCH_NETIF */
) {
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %d\n", (int)i));
/* found exact IP address match, simply bail out */
return i;
801a6ca: f9b7 3020 ldrsh.w r3, [r7, #32]
801a6ce: e100 b.n 801a8d2 <etharp_find_entry+0x2ca>
}
/* pending entry? */
if (state == ETHARP_STATE_PENDING) {
801a6d0: 7dfb ldrb r3, [r7, #23]
801a6d2: 2b01 cmp r3, #1
801a6d4: d140 bne.n 801a758 <etharp_find_entry+0x150>
/* pending with queued packets? */
if (arp_table[i].q != NULL) {
801a6d6: f9b7 2020 ldrsh.w r2, [r7, #32]
801a6da: 4980 ldr r1, [pc, #512] ; (801a8dc <etharp_find_entry+0x2d4>)
801a6dc: 4613 mov r3, r2
801a6de: 005b lsls r3, r3, #1
801a6e0: 4413 add r3, r2
801a6e2: 00db lsls r3, r3, #3
801a6e4: 440b add r3, r1
801a6e6: 681b ldr r3, [r3, #0]
801a6e8: 2b00 cmp r3, #0
801a6ea: d01a beq.n 801a722 <etharp_find_entry+0x11a>
if (arp_table[i].ctime >= age_queue) {
801a6ec: f9b7 2020 ldrsh.w r2, [r7, #32]
801a6f0: 497a ldr r1, [pc, #488] ; (801a8dc <etharp_find_entry+0x2d4>)
801a6f2: 4613 mov r3, r2
801a6f4: 005b lsls r3, r3, #1
801a6f6: 4413 add r3, r2
801a6f8: 00db lsls r3, r3, #3
801a6fa: 440b add r3, r1
801a6fc: 3312 adds r3, #18
801a6fe: 881b ldrh r3, [r3, #0]
801a700: 8bba ldrh r2, [r7, #28]
801a702: 429a cmp r2, r3
801a704: d845 bhi.n 801a792 <etharp_find_entry+0x18a>
old_queue = i;
801a706: 8c3b ldrh r3, [r7, #32]
801a708: 83fb strh r3, [r7, #30]
age_queue = arp_table[i].ctime;
801a70a: f9b7 2020 ldrsh.w r2, [r7, #32]
801a70e: 4973 ldr r1, [pc, #460] ; (801a8dc <etharp_find_entry+0x2d4>)
801a710: 4613 mov r3, r2
801a712: 005b lsls r3, r3, #1
801a714: 4413 add r3, r2
801a716: 00db lsls r3, r3, #3
801a718: 440b add r3, r1
801a71a: 3312 adds r3, #18
801a71c: 881b ldrh r3, [r3, #0]
801a71e: 83bb strh r3, [r7, #28]
801a720: e037 b.n 801a792 <etharp_find_entry+0x18a>
}
} else
/* pending without queued packets? */
{
if (arp_table[i].ctime >= age_pending) {
801a722: f9b7 2020 ldrsh.w r2, [r7, #32]
801a726: 496d ldr r1, [pc, #436] ; (801a8dc <etharp_find_entry+0x2d4>)
801a728: 4613 mov r3, r2
801a72a: 005b lsls r3, r3, #1
801a72c: 4413 add r3, r2
801a72e: 00db lsls r3, r3, #3
801a730: 440b add r3, r1
801a732: 3312 adds r3, #18
801a734: 881b ldrh r3, [r3, #0]
801a736: 8b7a ldrh r2, [r7, #26]
801a738: 429a cmp r2, r3
801a73a: d82a bhi.n 801a792 <etharp_find_entry+0x18a>
old_pending = i;
801a73c: 8c3b ldrh r3, [r7, #32]
801a73e: 84fb strh r3, [r7, #38] ; 0x26
age_pending = arp_table[i].ctime;
801a740: f9b7 2020 ldrsh.w r2, [r7, #32]
801a744: 4965 ldr r1, [pc, #404] ; (801a8dc <etharp_find_entry+0x2d4>)
801a746: 4613 mov r3, r2
801a748: 005b lsls r3, r3, #1
801a74a: 4413 add r3, r2
801a74c: 00db lsls r3, r3, #3
801a74e: 440b add r3, r1
801a750: 3312 adds r3, #18
801a752: 881b ldrh r3, [r3, #0]
801a754: 837b strh r3, [r7, #26]
801a756: e01c b.n 801a792 <etharp_find_entry+0x18a>
}
}
/* stable entry? */
} else if (state >= ETHARP_STATE_STABLE) {
801a758: 7dfb ldrb r3, [r7, #23]
801a75a: 2b01 cmp r3, #1
801a75c: d919 bls.n 801a792 <etharp_find_entry+0x18a>
/* don't record old_stable for static entries since they never expire */
if (state < ETHARP_STATE_STATIC)
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
{
/* remember entry with oldest stable entry in oldest, its age in maxtime */
if (arp_table[i].ctime >= age_stable) {
801a75e: f9b7 2020 ldrsh.w r2, [r7, #32]
801a762: 495e ldr r1, [pc, #376] ; (801a8dc <etharp_find_entry+0x2d4>)
801a764: 4613 mov r3, r2
801a766: 005b lsls r3, r3, #1
801a768: 4413 add r3, r2
801a76a: 00db lsls r3, r3, #3
801a76c: 440b add r3, r1
801a76e: 3312 adds r3, #18
801a770: 881b ldrh r3, [r3, #0]
801a772: 8b3a ldrh r2, [r7, #24]
801a774: 429a cmp r2, r3
801a776: d80c bhi.n 801a792 <etharp_find_entry+0x18a>
old_stable = i;
801a778: 8c3b ldrh r3, [r7, #32]
801a77a: 84bb strh r3, [r7, #36] ; 0x24
age_stable = arp_table[i].ctime;
801a77c: f9b7 2020 ldrsh.w r2, [r7, #32]
801a780: 4956 ldr r1, [pc, #344] ; (801a8dc <etharp_find_entry+0x2d4>)
801a782: 4613 mov r3, r2
801a784: 005b lsls r3, r3, #1
801a786: 4413 add r3, r2
801a788: 00db lsls r3, r3, #3
801a78a: 440b add r3, r1
801a78c: 3312 adds r3, #18
801a78e: 881b ldrh r3, [r3, #0]
801a790: 833b strh r3, [r7, #24]
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
801a792: 8c3b ldrh r3, [r7, #32]
801a794: 3301 adds r3, #1
801a796: b29b uxth r3, r3
801a798: 843b strh r3, [r7, #32]
801a79a: f9b7 3020 ldrsh.w r3, [r7, #32]
801a79e: 2b09 cmp r3, #9
801a7a0: f77f af4c ble.w 801a63c <etharp_find_entry+0x34>
}
}
/* { we have no match } => try to create a new entry */
/* don't create new entry, only search? */
if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) ||
801a7a4: 7afb ldrb r3, [r7, #11]
801a7a6: f003 0302 and.w r3, r3, #2
801a7aa: 2b00 cmp r3, #0
801a7ac: d108 bne.n 801a7c0 <etharp_find_entry+0x1b8>
801a7ae: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
801a7b2: 2b0a cmp r3, #10
801a7b4: d107 bne.n 801a7c6 <etharp_find_entry+0x1be>
/* or no empty entry found and not allowed to recycle? */
((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) {
801a7b6: 7afb ldrb r3, [r7, #11]
801a7b8: f003 0301 and.w r3, r3, #1
801a7bc: 2b00 cmp r3, #0
801a7be: d102 bne.n 801a7c6 <etharp_find_entry+0x1be>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n"));
return (s16_t)ERR_MEM;
801a7c0: f04f 33ff mov.w r3, #4294967295
801a7c4: e085 b.n 801a8d2 <etharp_find_entry+0x2ca>
*
* { ETHARP_FLAG_TRY_HARD is set at this point }
*/
/* 1) empty entry available? */
if (empty < ARP_TABLE_SIZE) {
801a7c6: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
801a7ca: 2b09 cmp r3, #9
801a7cc: dc02 bgt.n 801a7d4 <etharp_find_entry+0x1cc>
i = empty;
801a7ce: 8c7b ldrh r3, [r7, #34] ; 0x22
801a7d0: 843b strh r3, [r7, #32]
801a7d2: e039 b.n 801a848 <etharp_find_entry+0x240>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %d\n", (int)i));
} else {
/* 2) found recyclable stable entry? */
if (old_stable < ARP_TABLE_SIZE) {
801a7d4: f9b7 3024 ldrsh.w r3, [r7, #36] ; 0x24
801a7d8: 2b09 cmp r3, #9
801a7da: dc14 bgt.n 801a806 <etharp_find_entry+0x1fe>
/* recycle oldest stable*/
i = old_stable;
801a7dc: 8cbb ldrh r3, [r7, #36] ; 0x24
801a7de: 843b strh r3, [r7, #32]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %d\n", (int)i));
/* no queued packets should exist on stable entries */
LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL);
801a7e0: f9b7 2020 ldrsh.w r2, [r7, #32]
801a7e4: 493d ldr r1, [pc, #244] ; (801a8dc <etharp_find_entry+0x2d4>)
801a7e6: 4613 mov r3, r2
801a7e8: 005b lsls r3, r3, #1
801a7ea: 4413 add r3, r2
801a7ec: 00db lsls r3, r3, #3
801a7ee: 440b add r3, r1
801a7f0: 681b ldr r3, [r3, #0]
801a7f2: 2b00 cmp r3, #0
801a7f4: d018 beq.n 801a828 <etharp_find_entry+0x220>
801a7f6: 4b3a ldr r3, [pc, #232] ; (801a8e0 <etharp_find_entry+0x2d8>)
801a7f8: f240 126d movw r2, #365 ; 0x16d
801a7fc: 493b ldr r1, [pc, #236] ; (801a8ec <etharp_find_entry+0x2e4>)
801a7fe: 483a ldr r0, [pc, #232] ; (801a8e8 <etharp_find_entry+0x2e0>)
801a800: f002 fa7a bl 801ccf8 <iprintf>
801a804: e010 b.n 801a828 <etharp_find_entry+0x220>
/* 3) found recyclable pending entry without queued packets? */
} else if (old_pending < ARP_TABLE_SIZE) {
801a806: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26
801a80a: 2b09 cmp r3, #9
801a80c: dc02 bgt.n 801a814 <etharp_find_entry+0x20c>
/* recycle oldest pending */
i = old_pending;
801a80e: 8cfb ldrh r3, [r7, #38] ; 0x26
801a810: 843b strh r3, [r7, #32]
801a812: e009 b.n 801a828 <etharp_find_entry+0x220>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %d (without queue)\n", (int)i));
/* 4) found recyclable pending entry with queued packets? */
} else if (old_queue < ARP_TABLE_SIZE) {
801a814: f9b7 301e ldrsh.w r3, [r7, #30]
801a818: 2b09 cmp r3, #9
801a81a: dc02 bgt.n 801a822 <etharp_find_entry+0x21a>
/* recycle oldest pending (queued packets are free in etharp_free_entry) */
i = old_queue;
801a81c: 8bfb ldrh r3, [r7, #30]
801a81e: 843b strh r3, [r7, #32]
801a820: e002 b.n 801a828 <etharp_find_entry+0x220>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %d, freeing packet queue %p\n", (int)i, (void *)(arp_table[i].q)));
/* no empty or recyclable entries found */
} else {
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty or recyclable entries found\n"));
return (s16_t)ERR_MEM;
801a822: f04f 33ff mov.w r3, #4294967295
801a826: e054 b.n 801a8d2 <etharp_find_entry+0x2ca>
}
/* { empty or recyclable entry found } */
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
801a828: f9b7 3020 ldrsh.w r3, [r7, #32]
801a82c: 2b09 cmp r3, #9
801a82e: dd06 ble.n 801a83e <etharp_find_entry+0x236>
801a830: 4b2b ldr r3, [pc, #172] ; (801a8e0 <etharp_find_entry+0x2d8>)
801a832: f240 127f movw r2, #383 ; 0x17f
801a836: 492e ldr r1, [pc, #184] ; (801a8f0 <etharp_find_entry+0x2e8>)
801a838: 482b ldr r0, [pc, #172] ; (801a8e8 <etharp_find_entry+0x2e0>)
801a83a: f002 fa5d bl 801ccf8 <iprintf>
etharp_free_entry(i);
801a83e: f9b7 3020 ldrsh.w r3, [r7, #32]
801a842: 4618 mov r0, r3
801a844: f7ff fe06 bl 801a454 <etharp_free_entry>
}
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
801a848: f9b7 3020 ldrsh.w r3, [r7, #32]
801a84c: 2b09 cmp r3, #9
801a84e: dd06 ble.n 801a85e <etharp_find_entry+0x256>
801a850: 4b23 ldr r3, [pc, #140] ; (801a8e0 <etharp_find_entry+0x2d8>)
801a852: f240 1283 movw r2, #387 ; 0x183
801a856: 4926 ldr r1, [pc, #152] ; (801a8f0 <etharp_find_entry+0x2e8>)
801a858: 4823 ldr r0, [pc, #140] ; (801a8e8 <etharp_find_entry+0x2e0>)
801a85a: f002 fa4d bl 801ccf8 <iprintf>
LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
801a85e: f9b7 2020 ldrsh.w r2, [r7, #32]
801a862: 491e ldr r1, [pc, #120] ; (801a8dc <etharp_find_entry+0x2d4>)
801a864: 4613 mov r3, r2
801a866: 005b lsls r3, r3, #1
801a868: 4413 add r3, r2
801a86a: 00db lsls r3, r3, #3
801a86c: 440b add r3, r1
801a86e: 3314 adds r3, #20
801a870: 781b ldrb r3, [r3, #0]
801a872: 2b00 cmp r3, #0
801a874: d006 beq.n 801a884 <etharp_find_entry+0x27c>
801a876: 4b1a ldr r3, [pc, #104] ; (801a8e0 <etharp_find_entry+0x2d8>)
801a878: f240 1285 movw r2, #389 ; 0x185
801a87c: 491d ldr r1, [pc, #116] ; (801a8f4 <etharp_find_entry+0x2ec>)
801a87e: 481a ldr r0, [pc, #104] ; (801a8e8 <etharp_find_entry+0x2e0>)
801a880: f002 fa3a bl 801ccf8 <iprintf>
arp_table[i].state == ETHARP_STATE_EMPTY);
/* IP address given? */
if (ipaddr != NULL) {
801a884: 68fb ldr r3, [r7, #12]
801a886: 2b00 cmp r3, #0
801a888: d00b beq.n 801a8a2 <etharp_find_entry+0x29a>
/* set IP address */
ip4_addr_copy(arp_table[i].ipaddr, *ipaddr);
801a88a: f9b7 2020 ldrsh.w r2, [r7, #32]
801a88e: 68fb ldr r3, [r7, #12]
801a890: 6819 ldr r1, [r3, #0]
801a892: 4812 ldr r0, [pc, #72] ; (801a8dc <etharp_find_entry+0x2d4>)
801a894: 4613 mov r3, r2
801a896: 005b lsls r3, r3, #1
801a898: 4413 add r3, r2
801a89a: 00db lsls r3, r3, #3
801a89c: 4403 add r3, r0
801a89e: 3304 adds r3, #4
801a8a0: 6019 str r1, [r3, #0]
}
arp_table[i].ctime = 0;
801a8a2: f9b7 2020 ldrsh.w r2, [r7, #32]
801a8a6: 490d ldr r1, [pc, #52] ; (801a8dc <etharp_find_entry+0x2d4>)
801a8a8: 4613 mov r3, r2
801a8aa: 005b lsls r3, r3, #1
801a8ac: 4413 add r3, r2
801a8ae: 00db lsls r3, r3, #3
801a8b0: 440b add r3, r1
801a8b2: 3312 adds r3, #18
801a8b4: 2200 movs r2, #0
801a8b6: 801a strh r2, [r3, #0]
#if ETHARP_TABLE_MATCH_NETIF
arp_table[i].netif = netif;
801a8b8: f9b7 2020 ldrsh.w r2, [r7, #32]
801a8bc: 4907 ldr r1, [pc, #28] ; (801a8dc <etharp_find_entry+0x2d4>)
801a8be: 4613 mov r3, r2
801a8c0: 005b lsls r3, r3, #1
801a8c2: 4413 add r3, r2
801a8c4: 00db lsls r3, r3, #3
801a8c6: 440b add r3, r1
801a8c8: 3308 adds r3, #8
801a8ca: 687a ldr r2, [r7, #4]
801a8cc: 601a str r2, [r3, #0]
#endif /* ETHARP_TABLE_MATCH_NETIF */
return (s16_t)i;
801a8ce: f9b7 3020 ldrsh.w r3, [r7, #32]
}
801a8d2: 4618 mov r0, r3
801a8d4: 3728 adds r7, #40 ; 0x28
801a8d6: 46bd mov sp, r7
801a8d8: bd80 pop {r7, pc}
801a8da: bf00 nop
801a8dc: 20008778 .word 0x20008778
801a8e0: 08020778 .word 0x08020778
801a8e4: 080207b0 .word 0x080207b0
801a8e8: 080207f0 .word 0x080207f0
801a8ec: 08020818 .word 0x08020818
801a8f0: 08020830 .word 0x08020830
801a8f4: 08020844 .word 0x08020844
0801a8f8 <etharp_update_arp_entry>:
*
* @see pbuf_free()
*/
static err_t
etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, u8_t flags)
{
801a8f8: b580 push {r7, lr}
801a8fa: b088 sub sp, #32
801a8fc: af02 add r7, sp, #8
801a8fe: 60f8 str r0, [r7, #12]
801a900: 60b9 str r1, [r7, #8]
801a902: 607a str r2, [r7, #4]
801a904: 70fb strb r3, [r7, #3]
s16_t i;
LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
801a906: 68fb ldr r3, [r7, #12]
801a908: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
801a90c: 2b06 cmp r3, #6
801a90e: d006 beq.n 801a91e <etharp_update_arp_entry+0x26>
801a910: 4b48 ldr r3, [pc, #288] ; (801aa34 <etharp_update_arp_entry+0x13c>)
801a912: f240 12a9 movw r2, #425 ; 0x1a9
801a916: 4948 ldr r1, [pc, #288] ; (801aa38 <etharp_update_arp_entry+0x140>)
801a918: 4848 ldr r0, [pc, #288] ; (801aa3c <etharp_update_arp_entry+0x144>)
801a91a: f002 f9ed bl 801ccf8 <iprintf>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n",
ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr),
(u16_t)ethaddr->addr[0], (u16_t)ethaddr->addr[1], (u16_t)ethaddr->addr[2],
(u16_t)ethaddr->addr[3], (u16_t)ethaddr->addr[4], (u16_t)ethaddr->addr[5]));
/* non-unicast address? */
if (ip4_addr_isany(ipaddr) ||
801a91e: 68bb ldr r3, [r7, #8]
801a920: 2b00 cmp r3, #0
801a922: d012 beq.n 801a94a <etharp_update_arp_entry+0x52>
801a924: 68bb ldr r3, [r7, #8]
801a926: 681b ldr r3, [r3, #0]
801a928: 2b00 cmp r3, #0
801a92a: d00e beq.n 801a94a <etharp_update_arp_entry+0x52>
ip4_addr_isbroadcast(ipaddr, netif) ||
801a92c: 68bb ldr r3, [r7, #8]
801a92e: 681b ldr r3, [r3, #0]
801a930: 68f9 ldr r1, [r7, #12]
801a932: 4618 mov r0, r3
801a934: f001 f91e bl 801bb74 <ip4_addr_isbroadcast_u32>
801a938: 4603 mov r3, r0
if (ip4_addr_isany(ipaddr) ||
801a93a: 2b00 cmp r3, #0
801a93c: d105 bne.n 801a94a <etharp_update_arp_entry+0x52>
ip4_addr_ismulticast(ipaddr)) {
801a93e: 68bb ldr r3, [r7, #8]
801a940: 681b ldr r3, [r3, #0]
801a942: f003 03f0 and.w r3, r3, #240 ; 0xf0
ip4_addr_isbroadcast(ipaddr, netif) ||
801a946: 2be0 cmp r3, #224 ; 0xe0
801a948: d102 bne.n 801a950 <etharp_update_arp_entry+0x58>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: will not add non-unicast IP address to ARP cache\n"));
return ERR_ARG;
801a94a: f06f 030f mvn.w r3, #15
801a94e: e06c b.n 801aa2a <etharp_update_arp_entry+0x132>
}
/* find or create ARP entry */
i = etharp_find_entry(ipaddr, flags, netif);
801a950: 78fb ldrb r3, [r7, #3]
801a952: 68fa ldr r2, [r7, #12]
801a954: 4619 mov r1, r3
801a956: 68b8 ldr r0, [r7, #8]
801a958: f7ff fe56 bl 801a608 <etharp_find_entry>
801a95c: 4603 mov r3, r0
801a95e: 82fb strh r3, [r7, #22]
/* bail out if no entry could be found */
if (i < 0) {
801a960: f9b7 3016 ldrsh.w r3, [r7, #22]
801a964: 2b00 cmp r3, #0
801a966: da02 bge.n 801a96e <etharp_update_arp_entry+0x76>
return (err_t)i;
801a968: 8afb ldrh r3, [r7, #22]
801a96a: b25b sxtb r3, r3
801a96c: e05d b.n 801aa2a <etharp_update_arp_entry+0x132>
return ERR_VAL;
} else
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
{
/* mark it stable */
arp_table[i].state = ETHARP_STATE_STABLE;
801a96e: f9b7 2016 ldrsh.w r2, [r7, #22]
801a972: 4933 ldr r1, [pc, #204] ; (801aa40 <etharp_update_arp_entry+0x148>)
801a974: 4613 mov r3, r2
801a976: 005b lsls r3, r3, #1
801a978: 4413 add r3, r2
801a97a: 00db lsls r3, r3, #3
801a97c: 440b add r3, r1
801a97e: 3314 adds r3, #20
801a980: 2202 movs r2, #2
801a982: 701a strb r2, [r3, #0]
}
/* record network interface */
arp_table[i].netif = netif;
801a984: f9b7 2016 ldrsh.w r2, [r7, #22]
801a988: 492d ldr r1, [pc, #180] ; (801aa40 <etharp_update_arp_entry+0x148>)
801a98a: 4613 mov r3, r2
801a98c: 005b lsls r3, r3, #1
801a98e: 4413 add r3, r2
801a990: 00db lsls r3, r3, #3
801a992: 440b add r3, r1
801a994: 3308 adds r3, #8
801a996: 68fa ldr r2, [r7, #12]
801a998: 601a str r2, [r3, #0]
/* insert in SNMP ARP index tree */
mib2_add_arp_entry(netif, &arp_table[i].ipaddr);
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", i));
/* update address */
SMEMCPY(&arp_table[i].ethaddr, ethaddr, ETH_HWADDR_LEN);
801a99a: f9b7 2016 ldrsh.w r2, [r7, #22]
801a99e: 4613 mov r3, r2
801a9a0: 005b lsls r3, r3, #1
801a9a2: 4413 add r3, r2
801a9a4: 00db lsls r3, r3, #3
801a9a6: 3308 adds r3, #8
801a9a8: 4a25 ldr r2, [pc, #148] ; (801aa40 <etharp_update_arp_entry+0x148>)
801a9aa: 4413 add r3, r2
801a9ac: 3304 adds r3, #4
801a9ae: 2206 movs r2, #6
801a9b0: 6879 ldr r1, [r7, #4]
801a9b2: 4618 mov r0, r3
801a9b4: f002 f973 bl 801cc9e <memcpy>
/* reset time stamp */
arp_table[i].ctime = 0;
801a9b8: f9b7 2016 ldrsh.w r2, [r7, #22]
801a9bc: 4920 ldr r1, [pc, #128] ; (801aa40 <etharp_update_arp_entry+0x148>)
801a9be: 4613 mov r3, r2
801a9c0: 005b lsls r3, r3, #1
801a9c2: 4413 add r3, r2
801a9c4: 00db lsls r3, r3, #3
801a9c6: 440b add r3, r1
801a9c8: 3312 adds r3, #18
801a9ca: 2200 movs r2, #0
801a9cc: 801a strh r2, [r3, #0]
/* get the packet pointer */
p = q->p;
/* now queue entry can be freed */
memp_free(MEMP_ARP_QUEUE, q);
#else /* ARP_QUEUEING */
if (arp_table[i].q != NULL) {
801a9ce: f9b7 2016 ldrsh.w r2, [r7, #22]
801a9d2: 491b ldr r1, [pc, #108] ; (801aa40 <etharp_update_arp_entry+0x148>)
801a9d4: 4613 mov r3, r2
801a9d6: 005b lsls r3, r3, #1
801a9d8: 4413 add r3, r2
801a9da: 00db lsls r3, r3, #3
801a9dc: 440b add r3, r1
801a9de: 681b ldr r3, [r3, #0]
801a9e0: 2b00 cmp r3, #0
801a9e2: d021 beq.n 801aa28 <etharp_update_arp_entry+0x130>
struct pbuf *p = arp_table[i].q;
801a9e4: f9b7 2016 ldrsh.w r2, [r7, #22]
801a9e8: 4915 ldr r1, [pc, #84] ; (801aa40 <etharp_update_arp_entry+0x148>)
801a9ea: 4613 mov r3, r2
801a9ec: 005b lsls r3, r3, #1
801a9ee: 4413 add r3, r2
801a9f0: 00db lsls r3, r3, #3
801a9f2: 440b add r3, r1
801a9f4: 681b ldr r3, [r3, #0]
801a9f6: 613b str r3, [r7, #16]
arp_table[i].q = NULL;
801a9f8: f9b7 2016 ldrsh.w r2, [r7, #22]
801a9fc: 4910 ldr r1, [pc, #64] ; (801aa40 <etharp_update_arp_entry+0x148>)
801a9fe: 4613 mov r3, r2
801aa00: 005b lsls r3, r3, #1
801aa02: 4413 add r3, r2
801aa04: 00db lsls r3, r3, #3
801aa06: 440b add r3, r1
801aa08: 2200 movs r2, #0
801aa0a: 601a str r2, [r3, #0]
#endif /* ARP_QUEUEING */
/* send the queued IP packet */
ethernet_output(netif, p, (struct eth_addr *)(netif->hwaddr), ethaddr, ETHTYPE_IP);
801aa0c: 68fb ldr r3, [r7, #12]
801aa0e: f103 022a add.w r2, r3, #42 ; 0x2a
801aa12: f44f 6300 mov.w r3, #2048 ; 0x800
801aa16: 9300 str r3, [sp, #0]
801aa18: 687b ldr r3, [r7, #4]
801aa1a: 6939 ldr r1, [r7, #16]
801aa1c: 68f8 ldr r0, [r7, #12]
801aa1e: f001 ffad bl 801c97c <ethernet_output>
/* free the queued IP packet */
pbuf_free(p);
801aa22: 6938 ldr r0, [r7, #16]
801aa24: f7f7 fc38 bl 8012298 <pbuf_free>
}
return ERR_OK;
801aa28: 2300 movs r3, #0
}
801aa2a: 4618 mov r0, r3
801aa2c: 3718 adds r7, #24
801aa2e: 46bd mov sp, r7
801aa30: bd80 pop {r7, pc}
801aa32: bf00 nop
801aa34: 08020778 .word 0x08020778
801aa38: 08020870 .word 0x08020870
801aa3c: 080207f0 .word 0x080207f0
801aa40: 20008778 .word 0x20008778
0801aa44 <etharp_cleanup_netif>:
*
* @param netif points to a network interface
*/
void
etharp_cleanup_netif(struct netif *netif)
{
801aa44: b580 push {r7, lr}
801aa46: b084 sub sp, #16
801aa48: af00 add r7, sp, #0
801aa4a: 6078 str r0, [r7, #4]
int i;
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
801aa4c: 2300 movs r3, #0
801aa4e: 60fb str r3, [r7, #12]
801aa50: e01e b.n 801aa90 <etharp_cleanup_netif+0x4c>
u8_t state = arp_table[i].state;
801aa52: 4913 ldr r1, [pc, #76] ; (801aaa0 <etharp_cleanup_netif+0x5c>)
801aa54: 68fa ldr r2, [r7, #12]
801aa56: 4613 mov r3, r2
801aa58: 005b lsls r3, r3, #1
801aa5a: 4413 add r3, r2
801aa5c: 00db lsls r3, r3, #3
801aa5e: 440b add r3, r1
801aa60: 3314 adds r3, #20
801aa62: 781b ldrb r3, [r3, #0]
801aa64: 72fb strb r3, [r7, #11]
if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) {
801aa66: 7afb ldrb r3, [r7, #11]
801aa68: 2b00 cmp r3, #0
801aa6a: d00e beq.n 801aa8a <etharp_cleanup_netif+0x46>
801aa6c: 490c ldr r1, [pc, #48] ; (801aaa0 <etharp_cleanup_netif+0x5c>)
801aa6e: 68fa ldr r2, [r7, #12]
801aa70: 4613 mov r3, r2
801aa72: 005b lsls r3, r3, #1
801aa74: 4413 add r3, r2
801aa76: 00db lsls r3, r3, #3
801aa78: 440b add r3, r1
801aa7a: 3308 adds r3, #8
801aa7c: 681b ldr r3, [r3, #0]
801aa7e: 687a ldr r2, [r7, #4]
801aa80: 429a cmp r2, r3
801aa82: d102 bne.n 801aa8a <etharp_cleanup_netif+0x46>
etharp_free_entry(i);
801aa84: 68f8 ldr r0, [r7, #12]
801aa86: f7ff fce5 bl 801a454 <etharp_free_entry>
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
801aa8a: 68fb ldr r3, [r7, #12]
801aa8c: 3301 adds r3, #1
801aa8e: 60fb str r3, [r7, #12]
801aa90: 68fb ldr r3, [r7, #12]
801aa92: 2b09 cmp r3, #9
801aa94: dddd ble.n 801aa52 <etharp_cleanup_netif+0xe>
}
}
}
801aa96: bf00 nop
801aa98: 3710 adds r7, #16
801aa9a: 46bd mov sp, r7
801aa9c: bd80 pop {r7, pc}
801aa9e: bf00 nop
801aaa0: 20008778 .word 0x20008778
0801aaa4 <etharp_input>:
*
* @see pbuf_free()
*/
void
etharp_input(struct pbuf *p, struct netif *netif)
{
801aaa4: b5b0 push {r4, r5, r7, lr}
801aaa6: b08a sub sp, #40 ; 0x28
801aaa8: af04 add r7, sp, #16
801aaaa: 6078 str r0, [r7, #4]
801aaac: 6039 str r1, [r7, #0]
ip4_addr_t sipaddr, dipaddr;
u8_t for_us;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif != NULL", (netif != NULL), return;);
801aaae: 683b ldr r3, [r7, #0]
801aab0: 2b00 cmp r3, #0
801aab2: d107 bne.n 801aac4 <etharp_input+0x20>
801aab4: 4b3f ldr r3, [pc, #252] ; (801abb4 <etharp_input+0x110>)
801aab6: f240 228a movw r2, #650 ; 0x28a
801aaba: 493f ldr r1, [pc, #252] ; (801abb8 <etharp_input+0x114>)
801aabc: 483f ldr r0, [pc, #252] ; (801abbc <etharp_input+0x118>)
801aabe: f002 f91b bl 801ccf8 <iprintf>
801aac2: e074 b.n 801abae <etharp_input+0x10a>
hdr = (struct etharp_hdr *)p->payload;
801aac4: 687b ldr r3, [r7, #4]
801aac6: 685b ldr r3, [r3, #4]
801aac8: 613b str r3, [r7, #16]
/* RFC 826 "Packet Reception": */
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
801aaca: 693b ldr r3, [r7, #16]
801aacc: 881b ldrh r3, [r3, #0]
801aace: b29b uxth r3, r3
801aad0: f5b3 7f80 cmp.w r3, #256 ; 0x100
801aad4: d10c bne.n 801aaf0 <etharp_input+0x4c>
(hdr->hwlen != ETH_HWADDR_LEN) ||
801aad6: 693b ldr r3, [r7, #16]
801aad8: 791b ldrb r3, [r3, #4]
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
801aada: 2b06 cmp r3, #6
801aadc: d108 bne.n 801aaf0 <etharp_input+0x4c>
(hdr->protolen != sizeof(ip4_addr_t)) ||
801aade: 693b ldr r3, [r7, #16]
801aae0: 795b ldrb r3, [r3, #5]
(hdr->hwlen != ETH_HWADDR_LEN) ||
801aae2: 2b04 cmp r3, #4
801aae4: d104 bne.n 801aaf0 <etharp_input+0x4c>
(hdr->proto != PP_HTONS(ETHTYPE_IP))) {
801aae6: 693b ldr r3, [r7, #16]
801aae8: 885b ldrh r3, [r3, #2]
801aaea: b29b uxth r3, r3
(hdr->protolen != sizeof(ip4_addr_t)) ||
801aaec: 2b08 cmp r3, #8
801aaee: d003 beq.n 801aaf8 <etharp_input+0x54>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING,
("etharp_input: packet dropped, wrong hw type, hwlen, proto, protolen or ethernet type (%"U16_F"/%"U16_F"/%"U16_F"/%"U16_F")\n",
hdr->hwtype, (u16_t)hdr->hwlen, hdr->proto, (u16_t)hdr->protolen));
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
pbuf_free(p);
801aaf0: 6878 ldr r0, [r7, #4]
801aaf2: f7f7 fbd1 bl 8012298 <pbuf_free>
return;
801aaf6: e05a b.n 801abae <etharp_input+0x10a>
autoip_arp_reply(netif, hdr);
#endif /* LWIP_AUTOIP */
/* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without
* structure packing (not using structure copy which breaks strict-aliasing rules). */
IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&sipaddr, &hdr->sipaddr);
801aaf8: 693b ldr r3, [r7, #16]
801aafa: 330e adds r3, #14
801aafc: 681b ldr r3, [r3, #0]
801aafe: 60fb str r3, [r7, #12]
IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr);
801ab00: 693b ldr r3, [r7, #16]
801ab02: 3318 adds r3, #24
801ab04: 681b ldr r3, [r3, #0]
801ab06: 60bb str r3, [r7, #8]
/* this interface is not configured? */
if (ip4_addr_isany_val(*netif_ip4_addr(netif))) {
801ab08: 683b ldr r3, [r7, #0]
801ab0a: 3304 adds r3, #4
801ab0c: 681b ldr r3, [r3, #0]
801ab0e: 2b00 cmp r3, #0
801ab10: d102 bne.n 801ab18 <etharp_input+0x74>
for_us = 0;
801ab12: 2300 movs r3, #0
801ab14: 75fb strb r3, [r7, #23]
801ab16: e009 b.n 801ab2c <etharp_input+0x88>
} else {
/* ARP packet directed to us? */
for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif));
801ab18: 68ba ldr r2, [r7, #8]
801ab1a: 683b ldr r3, [r7, #0]
801ab1c: 3304 adds r3, #4
801ab1e: 681b ldr r3, [r3, #0]
801ab20: 429a cmp r2, r3
801ab22: bf0c ite eq
801ab24: 2301 moveq r3, #1
801ab26: 2300 movne r3, #0
801ab28: b2db uxtb r3, r3
801ab2a: 75fb strb r3, [r7, #23]
/* ARP message directed to us?
-> add IP address in ARP cache; assume requester wants to talk to us,
can result in directly sending the queued packets for this host.
ARP message not directed to us?
-> update the source IP address in the cache, if present */
etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr),
801ab2c: 693b ldr r3, [r7, #16]
801ab2e: f103 0208 add.w r2, r3, #8
801ab32: 7dfb ldrb r3, [r7, #23]
801ab34: 2b00 cmp r3, #0
801ab36: d001 beq.n 801ab3c <etharp_input+0x98>
801ab38: 2301 movs r3, #1
801ab3a: e000 b.n 801ab3e <etharp_input+0x9a>
801ab3c: 2302 movs r3, #2
801ab3e: f107 010c add.w r1, r7, #12
801ab42: 6838 ldr r0, [r7, #0]
801ab44: f7ff fed8 bl 801a8f8 <etharp_update_arp_entry>
for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY);
/* now act on the message itself */
switch (hdr->opcode) {
801ab48: 693b ldr r3, [r7, #16]
801ab4a: 88db ldrh r3, [r3, #6]
801ab4c: b29b uxth r3, r3
801ab4e: f5b3 7f80 cmp.w r3, #256 ; 0x100
801ab52: d003 beq.n 801ab5c <etharp_input+0xb8>
801ab54: f5b3 7f00 cmp.w r3, #512 ; 0x200
801ab58: d01e beq.n 801ab98 <etharp_input+0xf4>
#endif /* (LWIP_DHCP && DHCP_DOES_ARP_CHECK) */
break;
default:
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode)));
ETHARP_STATS_INC(etharp.err);
break;
801ab5a: e025 b.n 801aba8 <etharp_input+0x104>
if (for_us) {
801ab5c: 7dfb ldrb r3, [r7, #23]
801ab5e: 2b00 cmp r3, #0
801ab60: d021 beq.n 801aba6 <etharp_input+0x102>
(struct eth_addr *)netif->hwaddr, &hdr->shwaddr,
801ab62: 683b ldr r3, [r7, #0]
801ab64: f103 002a add.w r0, r3, #42 ; 0x2a
801ab68: 693b ldr r3, [r7, #16]
801ab6a: f103 0408 add.w r4, r3, #8
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif),
801ab6e: 683b ldr r3, [r7, #0]
801ab70: f103 052a add.w r5, r3, #42 ; 0x2a
801ab74: 683b ldr r3, [r7, #0]
801ab76: 3304 adds r3, #4
&hdr->shwaddr, &sipaddr,
801ab78: 693a ldr r2, [r7, #16]
801ab7a: 3208 adds r2, #8
etharp_raw(netif,
801ab7c: 2102 movs r1, #2
801ab7e: 9103 str r1, [sp, #12]
801ab80: f107 010c add.w r1, r7, #12
801ab84: 9102 str r1, [sp, #8]
801ab86: 9201 str r2, [sp, #4]
801ab88: 9300 str r3, [sp, #0]
801ab8a: 462b mov r3, r5
801ab8c: 4622 mov r2, r4
801ab8e: 4601 mov r1, r0
801ab90: 6838 ldr r0, [r7, #0]
801ab92: f000 faef bl 801b174 <etharp_raw>
break;
801ab96: e006 b.n 801aba6 <etharp_input+0x102>
dhcp_arp_reply(netif, &sipaddr);
801ab98: f107 030c add.w r3, r7, #12
801ab9c: 4619 mov r1, r3
801ab9e: 6838 ldr r0, [r7, #0]
801aba0: f7fe f9fe bl 8018fa0 <dhcp_arp_reply>
break;
801aba4: e000 b.n 801aba8 <etharp_input+0x104>
break;
801aba6: bf00 nop
}
/* free ARP packet */
pbuf_free(p);
801aba8: 6878 ldr r0, [r7, #4]
801abaa: f7f7 fb75 bl 8012298 <pbuf_free>
}
801abae: 3718 adds r7, #24
801abb0: 46bd mov sp, r7
801abb2: bdb0 pop {r4, r5, r7, pc}
801abb4: 08020778 .word 0x08020778
801abb8: 080208c8 .word 0x080208c8
801abbc: 080207f0 .word 0x080207f0
0801abc0 <etharp_output_to_arp_index>:
/** Just a small helper function that sends a pbuf to an ethernet address
* in the arp_table specified by the index 'arp_idx'.
*/
static err_t
etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, netif_addr_idx_t arp_idx)
{
801abc0: b580 push {r7, lr}
801abc2: b086 sub sp, #24
801abc4: af02 add r7, sp, #8
801abc6: 60f8 str r0, [r7, #12]
801abc8: 60b9 str r1, [r7, #8]
801abca: 4613 mov r3, r2
801abcc: 71fb strb r3, [r7, #7]
LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
801abce: 79fa ldrb r2, [r7, #7]
801abd0: 4944 ldr r1, [pc, #272] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801abd2: 4613 mov r3, r2
801abd4: 005b lsls r3, r3, #1
801abd6: 4413 add r3, r2
801abd8: 00db lsls r3, r3, #3
801abda: 440b add r3, r1
801abdc: 3314 adds r3, #20
801abde: 781b ldrb r3, [r3, #0]
801abe0: 2b01 cmp r3, #1
801abe2: d806 bhi.n 801abf2 <etharp_output_to_arp_index+0x32>
801abe4: 4b40 ldr r3, [pc, #256] ; (801ace8 <etharp_output_to_arp_index+0x128>)
801abe6: f240 22ef movw r2, #751 ; 0x2ef
801abea: 4940 ldr r1, [pc, #256] ; (801acec <etharp_output_to_arp_index+0x12c>)
801abec: 4840 ldr r0, [pc, #256] ; (801acf0 <etharp_output_to_arp_index+0x130>)
801abee: f002 f883 bl 801ccf8 <iprintf>
arp_table[arp_idx].state >= ETHARP_STATE_STABLE);
/* if arp table entry is about to expire: re-request it,
but only if its state is ETHARP_STATE_STABLE to prevent flooding the
network with ARP requests if this address is used frequently. */
if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) {
801abf2: 79fa ldrb r2, [r7, #7]
801abf4: 493b ldr r1, [pc, #236] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801abf6: 4613 mov r3, r2
801abf8: 005b lsls r3, r3, #1
801abfa: 4413 add r3, r2
801abfc: 00db lsls r3, r3, #3
801abfe: 440b add r3, r1
801ac00: 3314 adds r3, #20
801ac02: 781b ldrb r3, [r3, #0]
801ac04: 2b02 cmp r3, #2
801ac06: d153 bne.n 801acb0 <etharp_output_to_arp_index+0xf0>
if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) {
801ac08: 79fa ldrb r2, [r7, #7]
801ac0a: 4936 ldr r1, [pc, #216] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801ac0c: 4613 mov r3, r2
801ac0e: 005b lsls r3, r3, #1
801ac10: 4413 add r3, r2
801ac12: 00db lsls r3, r3, #3
801ac14: 440b add r3, r1
801ac16: 3312 adds r3, #18
801ac18: 881b ldrh r3, [r3, #0]
801ac1a: f5b3 7f8e cmp.w r3, #284 ; 0x11c
801ac1e: d919 bls.n 801ac54 <etharp_output_to_arp_index+0x94>
/* issue a standard request using broadcast */
if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) {
801ac20: 79fa ldrb r2, [r7, #7]
801ac22: 4613 mov r3, r2
801ac24: 005b lsls r3, r3, #1
801ac26: 4413 add r3, r2
801ac28: 00db lsls r3, r3, #3
801ac2a: 4a2e ldr r2, [pc, #184] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801ac2c: 4413 add r3, r2
801ac2e: 3304 adds r3, #4
801ac30: 4619 mov r1, r3
801ac32: 68f8 ldr r0, [r7, #12]
801ac34: f000 fb4c bl 801b2d0 <etharp_request>
801ac38: 4603 mov r3, r0
801ac3a: 2b00 cmp r3, #0
801ac3c: d138 bne.n 801acb0 <etharp_output_to_arp_index+0xf0>
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
801ac3e: 79fa ldrb r2, [r7, #7]
801ac40: 4928 ldr r1, [pc, #160] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801ac42: 4613 mov r3, r2
801ac44: 005b lsls r3, r3, #1
801ac46: 4413 add r3, r2
801ac48: 00db lsls r3, r3, #3
801ac4a: 440b add r3, r1
801ac4c: 3314 adds r3, #20
801ac4e: 2203 movs r2, #3
801ac50: 701a strb r2, [r3, #0]
801ac52: e02d b.n 801acb0 <etharp_output_to_arp_index+0xf0>
}
} else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) {
801ac54: 79fa ldrb r2, [r7, #7]
801ac56: 4923 ldr r1, [pc, #140] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801ac58: 4613 mov r3, r2
801ac5a: 005b lsls r3, r3, #1
801ac5c: 4413 add r3, r2
801ac5e: 00db lsls r3, r3, #3
801ac60: 440b add r3, r1
801ac62: 3312 adds r3, #18
801ac64: 881b ldrh r3, [r3, #0]
801ac66: f5b3 7f87 cmp.w r3, #270 ; 0x10e
801ac6a: d321 bcc.n 801acb0 <etharp_output_to_arp_index+0xf0>
/* issue a unicast request (for 15 seconds) to prevent unnecessary broadcast */
if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) {
801ac6c: 79fa ldrb r2, [r7, #7]
801ac6e: 4613 mov r3, r2
801ac70: 005b lsls r3, r3, #1
801ac72: 4413 add r3, r2
801ac74: 00db lsls r3, r3, #3
801ac76: 4a1b ldr r2, [pc, #108] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801ac78: 4413 add r3, r2
801ac7a: 1d19 adds r1, r3, #4
801ac7c: 79fa ldrb r2, [r7, #7]
801ac7e: 4613 mov r3, r2
801ac80: 005b lsls r3, r3, #1
801ac82: 4413 add r3, r2
801ac84: 00db lsls r3, r3, #3
801ac86: 3308 adds r3, #8
801ac88: 4a16 ldr r2, [pc, #88] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801ac8a: 4413 add r3, r2
801ac8c: 3304 adds r3, #4
801ac8e: 461a mov r2, r3
801ac90: 68f8 ldr r0, [r7, #12]
801ac92: f000 fafb bl 801b28c <etharp_request_dst>
801ac96: 4603 mov r3, r0
801ac98: 2b00 cmp r3, #0
801ac9a: d109 bne.n 801acb0 <etharp_output_to_arp_index+0xf0>
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
801ac9c: 79fa ldrb r2, [r7, #7]
801ac9e: 4911 ldr r1, [pc, #68] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801aca0: 4613 mov r3, r2
801aca2: 005b lsls r3, r3, #1
801aca4: 4413 add r3, r2
801aca6: 00db lsls r3, r3, #3
801aca8: 440b add r3, r1
801acaa: 3314 adds r3, #20
801acac: 2203 movs r2, #3
801acae: 701a strb r2, [r3, #0]
}
}
}
return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP);
801acb0: 68fb ldr r3, [r7, #12]
801acb2: f103 012a add.w r1, r3, #42 ; 0x2a
801acb6: 79fa ldrb r2, [r7, #7]
801acb8: 4613 mov r3, r2
801acba: 005b lsls r3, r3, #1
801acbc: 4413 add r3, r2
801acbe: 00db lsls r3, r3, #3
801acc0: 3308 adds r3, #8
801acc2: 4a08 ldr r2, [pc, #32] ; (801ace4 <etharp_output_to_arp_index+0x124>)
801acc4: 4413 add r3, r2
801acc6: 1d1a adds r2, r3, #4
801acc8: f44f 6300 mov.w r3, #2048 ; 0x800
801accc: 9300 str r3, [sp, #0]
801acce: 4613 mov r3, r2
801acd0: 460a mov r2, r1
801acd2: 68b9 ldr r1, [r7, #8]
801acd4: 68f8 ldr r0, [r7, #12]
801acd6: f001 fe51 bl 801c97c <ethernet_output>
801acda: 4603 mov r3, r0
}
801acdc: 4618 mov r0, r3
801acde: 3710 adds r7, #16
801ace0: 46bd mov sp, r7
801ace2: bd80 pop {r7, pc}
801ace4: 20008778 .word 0x20008778
801ace8: 08020778 .word 0x08020778
801acec: 080208e8 .word 0x080208e8
801acf0: 080207f0 .word 0x080207f0
0801acf4 <etharp_output>:
* - ERR_RTE No route to destination (no gateway to external networks),
* or the return type of either etharp_query() or ethernet_output().
*/
err_t
etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr)
{
801acf4: b580 push {r7, lr}
801acf6: b08a sub sp, #40 ; 0x28
801acf8: af02 add r7, sp, #8
801acfa: 60f8 str r0, [r7, #12]
801acfc: 60b9 str r1, [r7, #8]
801acfe: 607a str r2, [r7, #4]
const struct eth_addr *dest;
struct eth_addr mcastaddr;
const ip4_addr_t *dst_addr = ipaddr;
801ad00: 687b ldr r3, [r7, #4]
801ad02: 61bb str r3, [r7, #24]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("netif != NULL", netif != NULL);
801ad04: 68fb ldr r3, [r7, #12]
801ad06: 2b00 cmp r3, #0
801ad08: d106 bne.n 801ad18 <etharp_output+0x24>
801ad0a: 4b73 ldr r3, [pc, #460] ; (801aed8 <etharp_output+0x1e4>)
801ad0c: f240 321e movw r2, #798 ; 0x31e
801ad10: 4972 ldr r1, [pc, #456] ; (801aedc <etharp_output+0x1e8>)
801ad12: 4873 ldr r0, [pc, #460] ; (801aee0 <etharp_output+0x1ec>)
801ad14: f001 fff0 bl 801ccf8 <iprintf>
LWIP_ASSERT("q != NULL", q != NULL);
801ad18: 68bb ldr r3, [r7, #8]
801ad1a: 2b00 cmp r3, #0
801ad1c: d106 bne.n 801ad2c <etharp_output+0x38>
801ad1e: 4b6e ldr r3, [pc, #440] ; (801aed8 <etharp_output+0x1e4>)
801ad20: f240 321f movw r2, #799 ; 0x31f
801ad24: 496f ldr r1, [pc, #444] ; (801aee4 <etharp_output+0x1f0>)
801ad26: 486e ldr r0, [pc, #440] ; (801aee0 <etharp_output+0x1ec>)
801ad28: f001 ffe6 bl 801ccf8 <iprintf>
LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
801ad2c: 687b ldr r3, [r7, #4]
801ad2e: 2b00 cmp r3, #0
801ad30: d106 bne.n 801ad40 <etharp_output+0x4c>
801ad32: 4b69 ldr r3, [pc, #420] ; (801aed8 <etharp_output+0x1e4>)
801ad34: f44f 7248 mov.w r2, #800 ; 0x320
801ad38: 496b ldr r1, [pc, #428] ; (801aee8 <etharp_output+0x1f4>)
801ad3a: 4869 ldr r0, [pc, #420] ; (801aee0 <etharp_output+0x1ec>)
801ad3c: f001 ffdc bl 801ccf8 <iprintf>
/* Determine on destination hardware address. Broadcasts and multicasts
* are special, other IP addresses are looked up in the ARP table. */
/* broadcast destination IP address? */
if (ip4_addr_isbroadcast(ipaddr, netif)) {
801ad40: 687b ldr r3, [r7, #4]
801ad42: 681b ldr r3, [r3, #0]
801ad44: 68f9 ldr r1, [r7, #12]
801ad46: 4618 mov r0, r3
801ad48: f000 ff14 bl 801bb74 <ip4_addr_isbroadcast_u32>
801ad4c: 4603 mov r3, r0
801ad4e: 2b00 cmp r3, #0
801ad50: d002 beq.n 801ad58 <etharp_output+0x64>
/* broadcast on Ethernet also */
dest = (const struct eth_addr *)&ethbroadcast;
801ad52: 4b66 ldr r3, [pc, #408] ; (801aeec <etharp_output+0x1f8>)
801ad54: 61fb str r3, [r7, #28]
801ad56: e0af b.n 801aeb8 <etharp_output+0x1c4>
/* multicast destination IP address? */
} else if (ip4_addr_ismulticast(ipaddr)) {
801ad58: 687b ldr r3, [r7, #4]
801ad5a: 681b ldr r3, [r3, #0]
801ad5c: f003 03f0 and.w r3, r3, #240 ; 0xf0
801ad60: 2be0 cmp r3, #224 ; 0xe0
801ad62: d118 bne.n 801ad96 <etharp_output+0xa2>
/* Hash IP multicast address to MAC address.*/
mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0;
801ad64: 2301 movs r3, #1
801ad66: 743b strb r3, [r7, #16]
mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1;
801ad68: 2300 movs r3, #0
801ad6a: 747b strb r3, [r7, #17]
mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2;
801ad6c: 235e movs r3, #94 ; 0x5e
801ad6e: 74bb strb r3, [r7, #18]
mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f;
801ad70: 687b ldr r3, [r7, #4]
801ad72: 3301 adds r3, #1
801ad74: 781b ldrb r3, [r3, #0]
801ad76: f003 037f and.w r3, r3, #127 ; 0x7f
801ad7a: b2db uxtb r3, r3
801ad7c: 74fb strb r3, [r7, #19]
mcastaddr.addr[4] = ip4_addr3(ipaddr);
801ad7e: 687b ldr r3, [r7, #4]
801ad80: 3302 adds r3, #2
801ad82: 781b ldrb r3, [r3, #0]
801ad84: 753b strb r3, [r7, #20]
mcastaddr.addr[5] = ip4_addr4(ipaddr);
801ad86: 687b ldr r3, [r7, #4]
801ad88: 3303 adds r3, #3
801ad8a: 781b ldrb r3, [r3, #0]
801ad8c: 757b strb r3, [r7, #21]
/* destination Ethernet address is multicast */
dest = &mcastaddr;
801ad8e: f107 0310 add.w r3, r7, #16
801ad92: 61fb str r3, [r7, #28]
801ad94: e090 b.n 801aeb8 <etharp_output+0x1c4>
/* unicast destination IP address? */
} else {
netif_addr_idx_t i;
/* outside local network? if so, this can neither be a global broadcast nor
a subnet broadcast. */
if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
801ad96: 687b ldr r3, [r7, #4]
801ad98: 681a ldr r2, [r3, #0]
801ad9a: 68fb ldr r3, [r7, #12]
801ad9c: 3304 adds r3, #4
801ad9e: 681b ldr r3, [r3, #0]
801ada0: 405a eors r2, r3
801ada2: 68fb ldr r3, [r7, #12]
801ada4: 3308 adds r3, #8
801ada6: 681b ldr r3, [r3, #0]
801ada8: 4013 ands r3, r2
801adaa: 2b00 cmp r3, #0
801adac: d012 beq.n 801add4 <etharp_output+0xe0>
!ip4_addr_islinklocal(ipaddr)) {
801adae: 687b ldr r3, [r7, #4]
801adb0: 681b ldr r3, [r3, #0]
801adb2: b29b uxth r3, r3
if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
801adb4: f64f 62a9 movw r2, #65193 ; 0xfea9
801adb8: 4293 cmp r3, r2
801adba: d00b beq.n 801add4 <etharp_output+0xe0>
dst_addr = LWIP_HOOK_ETHARP_GET_GW(netif, ipaddr);
if (dst_addr == NULL)
#endif /* LWIP_HOOK_ETHARP_GET_GW */
{
/* interface has default gateway? */
if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) {
801adbc: 68fb ldr r3, [r7, #12]
801adbe: 330c adds r3, #12
801adc0: 681b ldr r3, [r3, #0]
801adc2: 2b00 cmp r3, #0
801adc4: d003 beq.n 801adce <etharp_output+0xda>
/* send to hardware address of default gateway IP address */
dst_addr = netif_ip4_gw(netif);
801adc6: 68fb ldr r3, [r7, #12]
801adc8: 330c adds r3, #12
801adca: 61bb str r3, [r7, #24]
801adcc: e002 b.n 801add4 <etharp_output+0xe0>
/* no default gateway available */
} else {
/* no route to destination error (default gateway missing) */
return ERR_RTE;
801adce: f06f 0303 mvn.w r3, #3
801add2: e07d b.n 801aed0 <etharp_output+0x1dc>
if (netif->hints != NULL) {
/* per-pcb cached entry was given */
netif_addr_idx_t etharp_cached_entry = netif->hints->addr_hint;
if (etharp_cached_entry < ARP_TABLE_SIZE) {
#endif /* LWIP_NETIF_HWADDRHINT */
if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
801add4: 4b46 ldr r3, [pc, #280] ; (801aef0 <etharp_output+0x1fc>)
801add6: 781b ldrb r3, [r3, #0]
801add8: 4619 mov r1, r3
801adda: 4a46 ldr r2, [pc, #280] ; (801aef4 <etharp_output+0x200>)
801addc: 460b mov r3, r1
801adde: 005b lsls r3, r3, #1
801ade0: 440b add r3, r1
801ade2: 00db lsls r3, r3, #3
801ade4: 4413 add r3, r2
801ade6: 3314 adds r3, #20
801ade8: 781b ldrb r3, [r3, #0]
801adea: 2b01 cmp r3, #1
801adec: d925 bls.n 801ae3a <etharp_output+0x146>
#if ETHARP_TABLE_MATCH_NETIF
(arp_table[etharp_cached_entry].netif == netif) &&
801adee: 4b40 ldr r3, [pc, #256] ; (801aef0 <etharp_output+0x1fc>)
801adf0: 781b ldrb r3, [r3, #0]
801adf2: 4619 mov r1, r3
801adf4: 4a3f ldr r2, [pc, #252] ; (801aef4 <etharp_output+0x200>)
801adf6: 460b mov r3, r1
801adf8: 005b lsls r3, r3, #1
801adfa: 440b add r3, r1
801adfc: 00db lsls r3, r3, #3
801adfe: 4413 add r3, r2
801ae00: 3308 adds r3, #8
801ae02: 681b ldr r3, [r3, #0]
if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
801ae04: 68fa ldr r2, [r7, #12]
801ae06: 429a cmp r2, r3
801ae08: d117 bne.n 801ae3a <etharp_output+0x146>
#endif
(ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) {
801ae0a: 69bb ldr r3, [r7, #24]
801ae0c: 681a ldr r2, [r3, #0]
801ae0e: 4b38 ldr r3, [pc, #224] ; (801aef0 <etharp_output+0x1fc>)
801ae10: 781b ldrb r3, [r3, #0]
801ae12: 4618 mov r0, r3
801ae14: 4937 ldr r1, [pc, #220] ; (801aef4 <etharp_output+0x200>)
801ae16: 4603 mov r3, r0
801ae18: 005b lsls r3, r3, #1
801ae1a: 4403 add r3, r0
801ae1c: 00db lsls r3, r3, #3
801ae1e: 440b add r3, r1
801ae20: 3304 adds r3, #4
801ae22: 681b ldr r3, [r3, #0]
(arp_table[etharp_cached_entry].netif == netif) &&
801ae24: 429a cmp r2, r3
801ae26: d108 bne.n 801ae3a <etharp_output+0x146>
/* the per-pcb-cached entry is stable and the right one! */
ETHARP_STATS_INC(etharp.cachehit);
return etharp_output_to_arp_index(netif, q, etharp_cached_entry);
801ae28: 4b31 ldr r3, [pc, #196] ; (801aef0 <etharp_output+0x1fc>)
801ae2a: 781b ldrb r3, [r3, #0]
801ae2c: 461a mov r2, r3
801ae2e: 68b9 ldr r1, [r7, #8]
801ae30: 68f8 ldr r0, [r7, #12]
801ae32: f7ff fec5 bl 801abc0 <etharp_output_to_arp_index>
801ae36: 4603 mov r3, r0
801ae38: e04a b.n 801aed0 <etharp_output+0x1dc>
}
#endif /* LWIP_NETIF_HWADDRHINT */
/* find stable entry: do this here since this is a critical path for
throughput and etharp_find_entry() is kind of slow */
for (i = 0; i < ARP_TABLE_SIZE; i++) {
801ae3a: 2300 movs r3, #0
801ae3c: 75fb strb r3, [r7, #23]
801ae3e: e031 b.n 801aea4 <etharp_output+0x1b0>
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
801ae40: 7dfa ldrb r2, [r7, #23]
801ae42: 492c ldr r1, [pc, #176] ; (801aef4 <etharp_output+0x200>)
801ae44: 4613 mov r3, r2
801ae46: 005b lsls r3, r3, #1
801ae48: 4413 add r3, r2
801ae4a: 00db lsls r3, r3, #3
801ae4c: 440b add r3, r1
801ae4e: 3314 adds r3, #20
801ae50: 781b ldrb r3, [r3, #0]
801ae52: 2b01 cmp r3, #1
801ae54: d923 bls.n 801ae9e <etharp_output+0x1aa>
#if ETHARP_TABLE_MATCH_NETIF
(arp_table[i].netif == netif) &&
801ae56: 7dfa ldrb r2, [r7, #23]
801ae58: 4926 ldr r1, [pc, #152] ; (801aef4 <etharp_output+0x200>)
801ae5a: 4613 mov r3, r2
801ae5c: 005b lsls r3, r3, #1
801ae5e: 4413 add r3, r2
801ae60: 00db lsls r3, r3, #3
801ae62: 440b add r3, r1
801ae64: 3308 adds r3, #8
801ae66: 681b ldr r3, [r3, #0]
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
801ae68: 68fa ldr r2, [r7, #12]
801ae6a: 429a cmp r2, r3
801ae6c: d117 bne.n 801ae9e <etharp_output+0x1aa>
#endif
(ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) {
801ae6e: 69bb ldr r3, [r7, #24]
801ae70: 6819 ldr r1, [r3, #0]
801ae72: 7dfa ldrb r2, [r7, #23]
801ae74: 481f ldr r0, [pc, #124] ; (801aef4 <etharp_output+0x200>)
801ae76: 4613 mov r3, r2
801ae78: 005b lsls r3, r3, #1
801ae7a: 4413 add r3, r2
801ae7c: 00db lsls r3, r3, #3
801ae7e: 4403 add r3, r0
801ae80: 3304 adds r3, #4
801ae82: 681b ldr r3, [r3, #0]
(arp_table[i].netif == netif) &&
801ae84: 4299 cmp r1, r3
801ae86: d10a bne.n 801ae9e <etharp_output+0x1aa>
/* found an existing, stable entry */
ETHARP_SET_ADDRHINT(netif, i);
801ae88: 4a19 ldr r2, [pc, #100] ; (801aef0 <etharp_output+0x1fc>)
801ae8a: 7dfb ldrb r3, [r7, #23]
801ae8c: 7013 strb r3, [r2, #0]
return etharp_output_to_arp_index(netif, q, i);
801ae8e: 7dfb ldrb r3, [r7, #23]
801ae90: 461a mov r2, r3
801ae92: 68b9 ldr r1, [r7, #8]
801ae94: 68f8 ldr r0, [r7, #12]
801ae96: f7ff fe93 bl 801abc0 <etharp_output_to_arp_index>
801ae9a: 4603 mov r3, r0
801ae9c: e018 b.n 801aed0 <etharp_output+0x1dc>
for (i = 0; i < ARP_TABLE_SIZE; i++) {
801ae9e: 7dfb ldrb r3, [r7, #23]
801aea0: 3301 adds r3, #1
801aea2: 75fb strb r3, [r7, #23]
801aea4: 7dfb ldrb r3, [r7, #23]
801aea6: 2b09 cmp r3, #9
801aea8: d9ca bls.n 801ae40 <etharp_output+0x14c>
}
}
/* no stable entry found, use the (slower) query function:
queue on destination Ethernet address belonging to ipaddr */
return etharp_query(netif, dst_addr, q);
801aeaa: 68ba ldr r2, [r7, #8]
801aeac: 69b9 ldr r1, [r7, #24]
801aeae: 68f8 ldr r0, [r7, #12]
801aeb0: f000 f822 bl 801aef8 <etharp_query>
801aeb4: 4603 mov r3, r0
801aeb6: e00b b.n 801aed0 <etharp_output+0x1dc>
}
/* continuation for multicast/broadcast destinations */
/* obtain source Ethernet address of the given interface */
/* send packet directly on the link */
return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), dest, ETHTYPE_IP);
801aeb8: 68fb ldr r3, [r7, #12]
801aeba: f103 022a add.w r2, r3, #42 ; 0x2a
801aebe: f44f 6300 mov.w r3, #2048 ; 0x800
801aec2: 9300 str r3, [sp, #0]
801aec4: 69fb ldr r3, [r7, #28]
801aec6: 68b9 ldr r1, [r7, #8]
801aec8: 68f8 ldr r0, [r7, #12]
801aeca: f001 fd57 bl 801c97c <ethernet_output>
801aece: 4603 mov r3, r0
}
801aed0: 4618 mov r0, r3
801aed2: 3720 adds r7, #32
801aed4: 46bd mov sp, r7
801aed6: bd80 pop {r7, pc}
801aed8: 08020778 .word 0x08020778
801aedc: 080208c8 .word 0x080208c8
801aee0: 080207f0 .word 0x080207f0
801aee4: 08020918 .word 0x08020918
801aee8: 080208b8 .word 0x080208b8
801aeec: 08022eb0 .word 0x08022eb0
801aef0: 20008868 .word 0x20008868
801aef4: 20008778 .word 0x20008778
0801aef8 <etharp_query>:
* - ERR_ARG Non-unicast address given, those will not appear in ARP cache.
*
*/
err_t
etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q)
{
801aef8: b580 push {r7, lr}
801aefa: b08c sub sp, #48 ; 0x30
801aefc: af02 add r7, sp, #8
801aefe: 60f8 str r0, [r7, #12]
801af00: 60b9 str r1, [r7, #8]
801af02: 607a str r2, [r7, #4]
struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr;
801af04: 68fb ldr r3, [r7, #12]
801af06: 332a adds r3, #42 ; 0x2a
801af08: 617b str r3, [r7, #20]
err_t result = ERR_MEM;
801af0a: 23ff movs r3, #255 ; 0xff
801af0c: f887 3027 strb.w r3, [r7, #39] ; 0x27
int is_new_entry = 0;
801af10: 2300 movs r3, #0
801af12: 623b str r3, [r7, #32]
s16_t i_err;
netif_addr_idx_t i;
/* non-unicast address? */
if (ip4_addr_isbroadcast(ipaddr, netif) ||
801af14: 68bb ldr r3, [r7, #8]
801af16: 681b ldr r3, [r3, #0]
801af18: 68f9 ldr r1, [r7, #12]
801af1a: 4618 mov r0, r3
801af1c: f000 fe2a bl 801bb74 <ip4_addr_isbroadcast_u32>
801af20: 4603 mov r3, r0
801af22: 2b00 cmp r3, #0
801af24: d10c bne.n 801af40 <etharp_query+0x48>
ip4_addr_ismulticast(ipaddr) ||
801af26: 68bb ldr r3, [r7, #8]
801af28: 681b ldr r3, [r3, #0]
801af2a: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip4_addr_isbroadcast(ipaddr, netif) ||
801af2e: 2be0 cmp r3, #224 ; 0xe0
801af30: d006 beq.n 801af40 <etharp_query+0x48>
ip4_addr_ismulticast(ipaddr) ||
801af32: 68bb ldr r3, [r7, #8]
801af34: 2b00 cmp r3, #0
801af36: d003 beq.n 801af40 <etharp_query+0x48>
ip4_addr_isany(ipaddr)) {
801af38: 68bb ldr r3, [r7, #8]
801af3a: 681b ldr r3, [r3, #0]
801af3c: 2b00 cmp r3, #0
801af3e: d102 bne.n 801af46 <etharp_query+0x4e>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n"));
return ERR_ARG;
801af40: f06f 030f mvn.w r3, #15
801af44: e102 b.n 801b14c <etharp_query+0x254>
}
/* find entry in ARP cache, ask to create entry if queueing packet */
i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif);
801af46: 68fa ldr r2, [r7, #12]
801af48: 2101 movs r1, #1
801af4a: 68b8 ldr r0, [r7, #8]
801af4c: f7ff fb5c bl 801a608 <etharp_find_entry>
801af50: 4603 mov r3, r0
801af52: 827b strh r3, [r7, #18]
/* could not find or create entry? */
if (i_err < 0) {
801af54: f9b7 3012 ldrsh.w r3, [r7, #18]
801af58: 2b00 cmp r3, #0
801af5a: da02 bge.n 801af62 <etharp_query+0x6a>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not create ARP entry\n"));
if (q) {
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: packet dropped\n"));
ETHARP_STATS_INC(etharp.memerr);
}
return (err_t)i_err;
801af5c: 8a7b ldrh r3, [r7, #18]
801af5e: b25b sxtb r3, r3
801af60: e0f4 b.n 801b14c <etharp_query+0x254>
}
LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
801af62: 8a7b ldrh r3, [r7, #18]
801af64: 2b7e cmp r3, #126 ; 0x7e
801af66: d906 bls.n 801af76 <etharp_query+0x7e>
801af68: 4b7a ldr r3, [pc, #488] ; (801b154 <etharp_query+0x25c>)
801af6a: f240 32c1 movw r2, #961 ; 0x3c1
801af6e: 497a ldr r1, [pc, #488] ; (801b158 <etharp_query+0x260>)
801af70: 487a ldr r0, [pc, #488] ; (801b15c <etharp_query+0x264>)
801af72: f001 fec1 bl 801ccf8 <iprintf>
i = (netif_addr_idx_t)i_err;
801af76: 8a7b ldrh r3, [r7, #18]
801af78: 747b strb r3, [r7, #17]
/* mark a fresh entry as pending (we just sent a request) */
if (arp_table[i].state == ETHARP_STATE_EMPTY) {
801af7a: 7c7a ldrb r2, [r7, #17]
801af7c: 4978 ldr r1, [pc, #480] ; (801b160 <etharp_query+0x268>)
801af7e: 4613 mov r3, r2
801af80: 005b lsls r3, r3, #1
801af82: 4413 add r3, r2
801af84: 00db lsls r3, r3, #3
801af86: 440b add r3, r1
801af88: 3314 adds r3, #20
801af8a: 781b ldrb r3, [r3, #0]
801af8c: 2b00 cmp r3, #0
801af8e: d115 bne.n 801afbc <etharp_query+0xc4>
is_new_entry = 1;
801af90: 2301 movs r3, #1
801af92: 623b str r3, [r7, #32]
arp_table[i].state = ETHARP_STATE_PENDING;
801af94: 7c7a ldrb r2, [r7, #17]
801af96: 4972 ldr r1, [pc, #456] ; (801b160 <etharp_query+0x268>)
801af98: 4613 mov r3, r2
801af9a: 005b lsls r3, r3, #1
801af9c: 4413 add r3, r2
801af9e: 00db lsls r3, r3, #3
801afa0: 440b add r3, r1
801afa2: 3314 adds r3, #20
801afa4: 2201 movs r2, #1
801afa6: 701a strb r2, [r3, #0]
/* record network interface for re-sending arp request in etharp_tmr */
arp_table[i].netif = netif;
801afa8: 7c7a ldrb r2, [r7, #17]
801afaa: 496d ldr r1, [pc, #436] ; (801b160 <etharp_query+0x268>)
801afac: 4613 mov r3, r2
801afae: 005b lsls r3, r3, #1
801afb0: 4413 add r3, r2
801afb2: 00db lsls r3, r3, #3
801afb4: 440b add r3, r1
801afb6: 3308 adds r3, #8
801afb8: 68fa ldr r2, [r7, #12]
801afba: 601a str r2, [r3, #0]
}
/* { i is either a STABLE or (new or existing) PENDING entry } */
LWIP_ASSERT("arp_table[i].state == PENDING or STABLE",
801afbc: 7c7a ldrb r2, [r7, #17]
801afbe: 4968 ldr r1, [pc, #416] ; (801b160 <etharp_query+0x268>)
801afc0: 4613 mov r3, r2
801afc2: 005b lsls r3, r3, #1
801afc4: 4413 add r3, r2
801afc6: 00db lsls r3, r3, #3
801afc8: 440b add r3, r1
801afca: 3314 adds r3, #20
801afcc: 781b ldrb r3, [r3, #0]
801afce: 2b01 cmp r3, #1
801afd0: d011 beq.n 801aff6 <etharp_query+0xfe>
801afd2: 7c7a ldrb r2, [r7, #17]
801afd4: 4962 ldr r1, [pc, #392] ; (801b160 <etharp_query+0x268>)
801afd6: 4613 mov r3, r2
801afd8: 005b lsls r3, r3, #1
801afda: 4413 add r3, r2
801afdc: 00db lsls r3, r3, #3
801afde: 440b add r3, r1
801afe0: 3314 adds r3, #20
801afe2: 781b ldrb r3, [r3, #0]
801afe4: 2b01 cmp r3, #1
801afe6: d806 bhi.n 801aff6 <etharp_query+0xfe>
801afe8: 4b5a ldr r3, [pc, #360] ; (801b154 <etharp_query+0x25c>)
801afea: f240 32cf movw r2, #975 ; 0x3cf
801afee: 495d ldr r1, [pc, #372] ; (801b164 <etharp_query+0x26c>)
801aff0: 485a ldr r0, [pc, #360] ; (801b15c <etharp_query+0x264>)
801aff2: f001 fe81 bl 801ccf8 <iprintf>
((arp_table[i].state == ETHARP_STATE_PENDING) ||
(arp_table[i].state >= ETHARP_STATE_STABLE)));
/* do we have a new entry? or an implicit query request? */
if (is_new_entry || (q == NULL)) {
801aff6: 6a3b ldr r3, [r7, #32]
801aff8: 2b00 cmp r3, #0
801affa: d102 bne.n 801b002 <etharp_query+0x10a>
801affc: 687b ldr r3, [r7, #4]
801affe: 2b00 cmp r3, #0
801b000: d10c bne.n 801b01c <etharp_query+0x124>
/* try to resolve it; send out ARP request */
result = etharp_request(netif, ipaddr);
801b002: 68b9 ldr r1, [r7, #8]
801b004: 68f8 ldr r0, [r7, #12]
801b006: f000 f963 bl 801b2d0 <etharp_request>
801b00a: 4603 mov r3, r0
801b00c: f887 3027 strb.w r3, [r7, #39] ; 0x27
/* ARP request couldn't be sent */
/* We don't re-send arp request in etharp_tmr, but we still queue packets,
since this failure could be temporary, and the next packet calling
etharp_query again could lead to sending the queued packets. */
}
if (q == NULL) {
801b010: 687b ldr r3, [r7, #4]
801b012: 2b00 cmp r3, #0
801b014: d102 bne.n 801b01c <etharp_query+0x124>
return result;
801b016: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
801b01a: e097 b.n 801b14c <etharp_query+0x254>
}
}
/* packet given? */
LWIP_ASSERT("q != NULL", q != NULL);
801b01c: 687b ldr r3, [r7, #4]
801b01e: 2b00 cmp r3, #0
801b020: d106 bne.n 801b030 <etharp_query+0x138>
801b022: 4b4c ldr r3, [pc, #304] ; (801b154 <etharp_query+0x25c>)
801b024: f240 32e1 movw r2, #993 ; 0x3e1
801b028: 494f ldr r1, [pc, #316] ; (801b168 <etharp_query+0x270>)
801b02a: 484c ldr r0, [pc, #304] ; (801b15c <etharp_query+0x264>)
801b02c: f001 fe64 bl 801ccf8 <iprintf>
/* stable entry? */
if (arp_table[i].state >= ETHARP_STATE_STABLE) {
801b030: 7c7a ldrb r2, [r7, #17]
801b032: 494b ldr r1, [pc, #300] ; (801b160 <etharp_query+0x268>)
801b034: 4613 mov r3, r2
801b036: 005b lsls r3, r3, #1
801b038: 4413 add r3, r2
801b03a: 00db lsls r3, r3, #3
801b03c: 440b add r3, r1
801b03e: 3314 adds r3, #20
801b040: 781b ldrb r3, [r3, #0]
801b042: 2b01 cmp r3, #1
801b044: d918 bls.n 801b078 <etharp_query+0x180>
/* we have a valid IP->Ethernet address mapping */
ETHARP_SET_ADDRHINT(netif, i);
801b046: 4a49 ldr r2, [pc, #292] ; (801b16c <etharp_query+0x274>)
801b048: 7c7b ldrb r3, [r7, #17]
801b04a: 7013 strb r3, [r2, #0]
/* send the packet */
result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP);
801b04c: 7c7a ldrb r2, [r7, #17]
801b04e: 4613 mov r3, r2
801b050: 005b lsls r3, r3, #1
801b052: 4413 add r3, r2
801b054: 00db lsls r3, r3, #3
801b056: 3308 adds r3, #8
801b058: 4a41 ldr r2, [pc, #260] ; (801b160 <etharp_query+0x268>)
801b05a: 4413 add r3, r2
801b05c: 1d1a adds r2, r3, #4
801b05e: f44f 6300 mov.w r3, #2048 ; 0x800
801b062: 9300 str r3, [sp, #0]
801b064: 4613 mov r3, r2
801b066: 697a ldr r2, [r7, #20]
801b068: 6879 ldr r1, [r7, #4]
801b06a: 68f8 ldr r0, [r7, #12]
801b06c: f001 fc86 bl 801c97c <ethernet_output>
801b070: 4603 mov r3, r0
801b072: f887 3027 strb.w r3, [r7, #39] ; 0x27
801b076: e067 b.n 801b148 <etharp_query+0x250>
/* pending entry? (either just created or already pending */
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
801b078: 7c7a ldrb r2, [r7, #17]
801b07a: 4939 ldr r1, [pc, #228] ; (801b160 <etharp_query+0x268>)
801b07c: 4613 mov r3, r2
801b07e: 005b lsls r3, r3, #1
801b080: 4413 add r3, r2
801b082: 00db lsls r3, r3, #3
801b084: 440b add r3, r1
801b086: 3314 adds r3, #20
801b088: 781b ldrb r3, [r3, #0]
801b08a: 2b01 cmp r3, #1
801b08c: d15c bne.n 801b148 <etharp_query+0x250>
/* entry is still pending, queue the given packet 'q' */
struct pbuf *p;
int copy_needed = 0;
801b08e: 2300 movs r3, #0
801b090: 61bb str r3, [r7, #24]
/* IF q includes a pbuf that must be copied, copy the whole chain into a
* new PBUF_RAM. See the definition of PBUF_NEEDS_COPY for details. */
p = q;
801b092: 687b ldr r3, [r7, #4]
801b094: 61fb str r3, [r7, #28]
while (p) {
801b096: e01c b.n 801b0d2 <etharp_query+0x1da>
LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
801b098: 69fb ldr r3, [r7, #28]
801b09a: 895a ldrh r2, [r3, #10]
801b09c: 69fb ldr r3, [r7, #28]
801b09e: 891b ldrh r3, [r3, #8]
801b0a0: 429a cmp r2, r3
801b0a2: d10a bne.n 801b0ba <etharp_query+0x1c2>
801b0a4: 69fb ldr r3, [r7, #28]
801b0a6: 681b ldr r3, [r3, #0]
801b0a8: 2b00 cmp r3, #0
801b0aa: d006 beq.n 801b0ba <etharp_query+0x1c2>
801b0ac: 4b29 ldr r3, [pc, #164] ; (801b154 <etharp_query+0x25c>)
801b0ae: f240 32f1 movw r2, #1009 ; 0x3f1
801b0b2: 492f ldr r1, [pc, #188] ; (801b170 <etharp_query+0x278>)
801b0b4: 4829 ldr r0, [pc, #164] ; (801b15c <etharp_query+0x264>)
801b0b6: f001 fe1f bl 801ccf8 <iprintf>
if (PBUF_NEEDS_COPY(p)) {
801b0ba: 69fb ldr r3, [r7, #28]
801b0bc: 7b1b ldrb r3, [r3, #12]
801b0be: f003 0340 and.w r3, r3, #64 ; 0x40
801b0c2: 2b00 cmp r3, #0
801b0c4: d002 beq.n 801b0cc <etharp_query+0x1d4>
copy_needed = 1;
801b0c6: 2301 movs r3, #1
801b0c8: 61bb str r3, [r7, #24]
break;
801b0ca: e005 b.n 801b0d8 <etharp_query+0x1e0>
}
p = p->next;
801b0cc: 69fb ldr r3, [r7, #28]
801b0ce: 681b ldr r3, [r3, #0]
801b0d0: 61fb str r3, [r7, #28]
while (p) {
801b0d2: 69fb ldr r3, [r7, #28]
801b0d4: 2b00 cmp r3, #0
801b0d6: d1df bne.n 801b098 <etharp_query+0x1a0>
}
if (copy_needed) {
801b0d8: 69bb ldr r3, [r7, #24]
801b0da: 2b00 cmp r3, #0
801b0dc: d007 beq.n 801b0ee <etharp_query+0x1f6>
/* copy the whole packet into new pbufs */
p = pbuf_clone(PBUF_LINK, PBUF_RAM, q);
801b0de: 687a ldr r2, [r7, #4]
801b0e0: f44f 7120 mov.w r1, #640 ; 0x280
801b0e4: 200e movs r0, #14
801b0e6: f7f7 fb4f bl 8012788 <pbuf_clone>
801b0ea: 61f8 str r0, [r7, #28]
801b0ec: e004 b.n 801b0f8 <etharp_query+0x200>
} else {
/* referencing the old pbuf is enough */
p = q;
801b0ee: 687b ldr r3, [r7, #4]
801b0f0: 61fb str r3, [r7, #28]
pbuf_ref(p);
801b0f2: 69f8 ldr r0, [r7, #28]
801b0f4: f7f7 f976 bl 80123e4 <pbuf_ref>
}
/* packet could be taken over? */
if (p != NULL) {
801b0f8: 69fb ldr r3, [r7, #28]
801b0fa: 2b00 cmp r3, #0
801b0fc: d021 beq.n 801b142 <etharp_query+0x24a>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
result = ERR_MEM;
}
#else /* ARP_QUEUEING */
/* always queue one packet per ARP request only, freeing a previously queued packet */
if (arp_table[i].q != NULL) {
801b0fe: 7c7a ldrb r2, [r7, #17]
801b100: 4917 ldr r1, [pc, #92] ; (801b160 <etharp_query+0x268>)
801b102: 4613 mov r3, r2
801b104: 005b lsls r3, r3, #1
801b106: 4413 add r3, r2
801b108: 00db lsls r3, r3, #3
801b10a: 440b add r3, r1
801b10c: 681b ldr r3, [r3, #0]
801b10e: 2b00 cmp r3, #0
801b110: d00a beq.n 801b128 <etharp_query+0x230>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"U16_F"\n", (void *)q, (u16_t)i));
pbuf_free(arp_table[i].q);
801b112: 7c7a ldrb r2, [r7, #17]
801b114: 4912 ldr r1, [pc, #72] ; (801b160 <etharp_query+0x268>)
801b116: 4613 mov r3, r2
801b118: 005b lsls r3, r3, #1
801b11a: 4413 add r3, r2
801b11c: 00db lsls r3, r3, #3
801b11e: 440b add r3, r1
801b120: 681b ldr r3, [r3, #0]
801b122: 4618 mov r0, r3
801b124: f7f7 f8b8 bl 8012298 <pbuf_free>
}
arp_table[i].q = p;
801b128: 7c7a ldrb r2, [r7, #17]
801b12a: 490d ldr r1, [pc, #52] ; (801b160 <etharp_query+0x268>)
801b12c: 4613 mov r3, r2
801b12e: 005b lsls r3, r3, #1
801b130: 4413 add r3, r2
801b132: 00db lsls r3, r3, #3
801b134: 440b add r3, r1
801b136: 69fa ldr r2, [r7, #28]
801b138: 601a str r2, [r3, #0]
result = ERR_OK;
801b13a: 2300 movs r3, #0
801b13c: f887 3027 strb.w r3, [r7, #39] ; 0x27
801b140: e002 b.n 801b148 <etharp_query+0x250>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"U16_F"\n", (void *)q, (u16_t)i));
#endif /* ARP_QUEUEING */
} else {
ETHARP_STATS_INC(etharp.memerr);
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
result = ERR_MEM;
801b142: 23ff movs r3, #255 ; 0xff
801b144: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
}
return result;
801b148: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
}
801b14c: 4618 mov r0, r3
801b14e: 3728 adds r7, #40 ; 0x28
801b150: 46bd mov sp, r7
801b152: bd80 pop {r7, pc}
801b154: 08020778 .word 0x08020778
801b158: 08020924 .word 0x08020924
801b15c: 080207f0 .word 0x080207f0
801b160: 20008778 .word 0x20008778
801b164: 08020934 .word 0x08020934
801b168: 08020918 .word 0x08020918
801b16c: 20008868 .word 0x20008868
801b170: 0802095c .word 0x0802095c
0801b174 <etharp_raw>:
etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr,
const struct eth_addr *ethdst_addr,
const struct eth_addr *hwsrc_addr, const ip4_addr_t *ipsrc_addr,
const struct eth_addr *hwdst_addr, const ip4_addr_t *ipdst_addr,
const u16_t opcode)
{
801b174: b580 push {r7, lr}
801b176: b08a sub sp, #40 ; 0x28
801b178: af02 add r7, sp, #8
801b17a: 60f8 str r0, [r7, #12]
801b17c: 60b9 str r1, [r7, #8]
801b17e: 607a str r2, [r7, #4]
801b180: 603b str r3, [r7, #0]
struct pbuf *p;
err_t result = ERR_OK;
801b182: 2300 movs r3, #0
801b184: 77fb strb r3, [r7, #31]
struct etharp_hdr *hdr;
LWIP_ASSERT("netif != NULL", netif != NULL);
801b186: 68fb ldr r3, [r7, #12]
801b188: 2b00 cmp r3, #0
801b18a: d106 bne.n 801b19a <etharp_raw+0x26>
801b18c: 4b3a ldr r3, [pc, #232] ; (801b278 <etharp_raw+0x104>)
801b18e: f240 4257 movw r2, #1111 ; 0x457
801b192: 493a ldr r1, [pc, #232] ; (801b27c <etharp_raw+0x108>)
801b194: 483a ldr r0, [pc, #232] ; (801b280 <etharp_raw+0x10c>)
801b196: f001 fdaf bl 801ccf8 <iprintf>
/* allocate a pbuf for the outgoing ARP request packet */
p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM);
801b19a: f44f 7220 mov.w r2, #640 ; 0x280
801b19e: 211c movs r1, #28
801b1a0: 200e movs r0, #14
801b1a2: f7f6 fd99 bl 8011cd8 <pbuf_alloc>
801b1a6: 61b8 str r0, [r7, #24]
/* could allocate a pbuf for an ARP request? */
if (p == NULL) {
801b1a8: 69bb ldr r3, [r7, #24]
801b1aa: 2b00 cmp r3, #0
801b1ac: d102 bne.n 801b1b4 <etharp_raw+0x40>
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("etharp_raw: could not allocate pbuf for ARP request.\n"));
ETHARP_STATS_INC(etharp.memerr);
return ERR_MEM;
801b1ae: f04f 33ff mov.w r3, #4294967295
801b1b2: e05d b.n 801b270 <etharp_raw+0xfc>
}
LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
801b1b4: 69bb ldr r3, [r7, #24]
801b1b6: 895b ldrh r3, [r3, #10]
801b1b8: 2b1b cmp r3, #27
801b1ba: d806 bhi.n 801b1ca <etharp_raw+0x56>
801b1bc: 4b2e ldr r3, [pc, #184] ; (801b278 <etharp_raw+0x104>)
801b1be: f240 4263 movw r2, #1123 ; 0x463
801b1c2: 4930 ldr r1, [pc, #192] ; (801b284 <etharp_raw+0x110>)
801b1c4: 482e ldr r0, [pc, #184] ; (801b280 <etharp_raw+0x10c>)
801b1c6: f001 fd97 bl 801ccf8 <iprintf>
(p->len >= SIZEOF_ETHARP_HDR));
hdr = (struct etharp_hdr *)p->payload;
801b1ca: 69bb ldr r3, [r7, #24]
801b1cc: 685b ldr r3, [r3, #4]
801b1ce: 617b str r3, [r7, #20]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
hdr->opcode = lwip_htons(opcode);
801b1d0: 8ebb ldrh r3, [r7, #52] ; 0x34
801b1d2: 4618 mov r0, r3
801b1d4: f7f5 fcac bl 8010b30 <lwip_htons>
801b1d8: 4603 mov r3, r0
801b1da: 461a mov r2, r3
801b1dc: 697b ldr r3, [r7, #20]
801b1de: 80da strh r2, [r3, #6]
LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
801b1e0: 68fb ldr r3, [r7, #12]
801b1e2: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
801b1e6: 2b06 cmp r3, #6
801b1e8: d006 beq.n 801b1f8 <etharp_raw+0x84>
801b1ea: 4b23 ldr r3, [pc, #140] ; (801b278 <etharp_raw+0x104>)
801b1ec: f240 426a movw r2, #1130 ; 0x46a
801b1f0: 4925 ldr r1, [pc, #148] ; (801b288 <etharp_raw+0x114>)
801b1f2: 4823 ldr r0, [pc, #140] ; (801b280 <etharp_raw+0x10c>)
801b1f4: f001 fd80 bl 801ccf8 <iprintf>
(netif->hwaddr_len == ETH_HWADDR_LEN));
/* Write the ARP MAC-Addresses */
SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN);
801b1f8: 697b ldr r3, [r7, #20]
801b1fa: 3308 adds r3, #8
801b1fc: 2206 movs r2, #6
801b1fe: 6839 ldr r1, [r7, #0]
801b200: 4618 mov r0, r3
801b202: f001 fd4c bl 801cc9e <memcpy>
SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN);
801b206: 697b ldr r3, [r7, #20]
801b208: 3312 adds r3, #18
801b20a: 2206 movs r2, #6
801b20c: 6af9 ldr r1, [r7, #44] ; 0x2c
801b20e: 4618 mov r0, r3
801b210: f001 fd45 bl 801cc9e <memcpy>
/* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without
* structure packing. */
IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->sipaddr, ipsrc_addr);
801b214: 697b ldr r3, [r7, #20]
801b216: 330e adds r3, #14
801b218: 6aba ldr r2, [r7, #40] ; 0x28
801b21a: 6812 ldr r2, [r2, #0]
801b21c: 601a str r2, [r3, #0]
IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr);
801b21e: 697b ldr r3, [r7, #20]
801b220: 3318 adds r3, #24
801b222: 6b3a ldr r2, [r7, #48] ; 0x30
801b224: 6812 ldr r2, [r2, #0]
801b226: 601a str r2, [r3, #0]
hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET);
801b228: 697b ldr r3, [r7, #20]
801b22a: 2200 movs r2, #0
801b22c: 701a strb r2, [r3, #0]
801b22e: 2200 movs r2, #0
801b230: f042 0201 orr.w r2, r2, #1
801b234: 705a strb r2, [r3, #1]
hdr->proto = PP_HTONS(ETHTYPE_IP);
801b236: 697b ldr r3, [r7, #20]
801b238: 2200 movs r2, #0
801b23a: f042 0208 orr.w r2, r2, #8
801b23e: 709a strb r2, [r3, #2]
801b240: 2200 movs r2, #0
801b242: 70da strb r2, [r3, #3]
/* set hwlen and protolen */
hdr->hwlen = ETH_HWADDR_LEN;
801b244: 697b ldr r3, [r7, #20]
801b246: 2206 movs r2, #6
801b248: 711a strb r2, [r3, #4]
hdr->protolen = sizeof(ip4_addr_t);
801b24a: 697b ldr r3, [r7, #20]
801b24c: 2204 movs r2, #4
801b24e: 715a strb r2, [r3, #5]
if (ip4_addr_islinklocal(ipsrc_addr)) {
ethernet_output(netif, p, ethsrc_addr, &ethbroadcast, ETHTYPE_ARP);
} else
#endif /* LWIP_AUTOIP */
{
ethernet_output(netif, p, ethsrc_addr, ethdst_addr, ETHTYPE_ARP);
801b250: f640 0306 movw r3, #2054 ; 0x806
801b254: 9300 str r3, [sp, #0]
801b256: 687b ldr r3, [r7, #4]
801b258: 68ba ldr r2, [r7, #8]
801b25a: 69b9 ldr r1, [r7, #24]
801b25c: 68f8 ldr r0, [r7, #12]
801b25e: f001 fb8d bl 801c97c <ethernet_output>
}
ETHARP_STATS_INC(etharp.xmit);
/* free ARP query packet */
pbuf_free(p);
801b262: 69b8 ldr r0, [r7, #24]
801b264: f7f7 f818 bl 8012298 <pbuf_free>
p = NULL;
801b268: 2300 movs r3, #0
801b26a: 61bb str r3, [r7, #24]
/* could not allocate pbuf for ARP request */
return result;
801b26c: f997 301f ldrsb.w r3, [r7, #31]
}
801b270: 4618 mov r0, r3
801b272: 3720 adds r7, #32
801b274: 46bd mov sp, r7
801b276: bd80 pop {r7, pc}
801b278: 08020778 .word 0x08020778
801b27c: 080208c8 .word 0x080208c8
801b280: 080207f0 .word 0x080207f0
801b284: 08020978 .word 0x08020978
801b288: 080209ac .word 0x080209ac
0801b28c <etharp_request_dst>:
* ERR_MEM if the ARP packet couldn't be allocated
* any other err_t on failure
*/
static err_t
etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr *hw_dst_addr)
{
801b28c: b580 push {r7, lr}
801b28e: b088 sub sp, #32
801b290: af04 add r7, sp, #16
801b292: 60f8 str r0, [r7, #12]
801b294: 60b9 str r1, [r7, #8]
801b296: 607a str r2, [r7, #4]
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
801b298: 68fb ldr r3, [r7, #12]
801b29a: f103 012a add.w r1, r3, #42 ; 0x2a
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), &ethzero,
801b29e: 68fb ldr r3, [r7, #12]
801b2a0: f103 002a add.w r0, r3, #42 ; 0x2a
801b2a4: 68fb ldr r3, [r7, #12]
801b2a6: 3304 adds r3, #4
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
801b2a8: 2201 movs r2, #1
801b2aa: 9203 str r2, [sp, #12]
801b2ac: 68ba ldr r2, [r7, #8]
801b2ae: 9202 str r2, [sp, #8]
801b2b0: 4a06 ldr r2, [pc, #24] ; (801b2cc <etharp_request_dst+0x40>)
801b2b2: 9201 str r2, [sp, #4]
801b2b4: 9300 str r3, [sp, #0]
801b2b6: 4603 mov r3, r0
801b2b8: 687a ldr r2, [r7, #4]
801b2ba: 68f8 ldr r0, [r7, #12]
801b2bc: f7ff ff5a bl 801b174 <etharp_raw>
801b2c0: 4603 mov r3, r0
ipaddr, ARP_REQUEST);
}
801b2c2: 4618 mov r0, r3
801b2c4: 3710 adds r7, #16
801b2c6: 46bd mov sp, r7
801b2c8: bd80 pop {r7, pc}
801b2ca: bf00 nop
801b2cc: 08022eb8 .word 0x08022eb8
0801b2d0 <etharp_request>:
* ERR_MEM if the ARP packet couldn't be allocated
* any other err_t on failure
*/
err_t
etharp_request(struct netif *netif, const ip4_addr_t *ipaddr)
{
801b2d0: b580 push {r7, lr}
801b2d2: b082 sub sp, #8
801b2d4: af00 add r7, sp, #0
801b2d6: 6078 str r0, [r7, #4]
801b2d8: 6039 str r1, [r7, #0]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n"));
return etharp_request_dst(netif, ipaddr, &ethbroadcast);
801b2da: 4a05 ldr r2, [pc, #20] ; (801b2f0 <etharp_request+0x20>)
801b2dc: 6839 ldr r1, [r7, #0]
801b2de: 6878 ldr r0, [r7, #4]
801b2e0: f7ff ffd4 bl 801b28c <etharp_request_dst>
801b2e4: 4603 mov r3, r0
}
801b2e6: 4618 mov r0, r3
801b2e8: 3708 adds r7, #8
801b2ea: 46bd mov sp, r7
801b2ec: bd80 pop {r7, pc}
801b2ee: bf00 nop
801b2f0: 08022eb0 .word 0x08022eb0
0801b2f4 <icmp_input>:
* @param p the icmp echo request packet, p->payload pointing to the icmp header
* @param inp the netif on which this packet was received
*/
void
icmp_input(struct pbuf *p, struct netif *inp)
{
801b2f4: b580 push {r7, lr}
801b2f6: b08e sub sp, #56 ; 0x38
801b2f8: af04 add r7, sp, #16
801b2fa: 6078 str r0, [r7, #4]
801b2fc: 6039 str r1, [r7, #0]
const ip4_addr_t *src;
ICMP_STATS_INC(icmp.recv);
MIB2_STATS_INC(mib2.icmpinmsgs);
iphdr_in = ip4_current_header();
801b2fe: 4b79 ldr r3, [pc, #484] ; (801b4e4 <icmp_input+0x1f0>)
801b300: 689b ldr r3, [r3, #8]
801b302: 627b str r3, [r7, #36] ; 0x24
hlen = IPH_HL_BYTES(iphdr_in);
801b304: 6a7b ldr r3, [r7, #36] ; 0x24
801b306: 781b ldrb r3, [r3, #0]
801b308: f003 030f and.w r3, r3, #15
801b30c: b2db uxtb r3, r3
801b30e: 009b lsls r3, r3, #2
801b310: b2db uxtb r3, r3
801b312: 847b strh r3, [r7, #34] ; 0x22
if (hlen < IP_HLEN) {
801b314: 8c7b ldrh r3, [r7, #34] ; 0x22
801b316: 2b13 cmp r3, #19
801b318: f240 80cd bls.w 801b4b6 <icmp_input+0x1c2>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen));
goto lenerr;
}
if (p->len < sizeof(u16_t) * 2) {
801b31c: 687b ldr r3, [r7, #4]
801b31e: 895b ldrh r3, [r3, #10]
801b320: 2b03 cmp r3, #3
801b322: f240 80ca bls.w 801b4ba <icmp_input+0x1c6>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len));
goto lenerr;
}
type = *((u8_t *)p->payload);
801b326: 687b ldr r3, [r7, #4]
801b328: 685b ldr r3, [r3, #4]
801b32a: 781b ldrb r3, [r3, #0]
801b32c: f887 3021 strb.w r3, [r7, #33] ; 0x21
#ifdef LWIP_DEBUG
code = *(((u8_t *)p->payload) + 1);
/* if debug is enabled but debug statement below is somehow disabled: */
LWIP_UNUSED_ARG(code);
#endif /* LWIP_DEBUG */
switch (type) {
801b330: f897 3021 ldrb.w r3, [r7, #33] ; 0x21
801b334: 2b00 cmp r3, #0
801b336: f000 80b7 beq.w 801b4a8 <icmp_input+0x1b4>
801b33a: 2b08 cmp r3, #8
801b33c: f040 80b7 bne.w 801b4ae <icmp_input+0x1ba>
(as obviously, an echo request has been sent, too). */
MIB2_STATS_INC(mib2.icmpinechoreps);
break;
case ICMP_ECHO:
MIB2_STATS_INC(mib2.icmpinechos);
src = ip4_current_dest_addr();
801b340: 4b69 ldr r3, [pc, #420] ; (801b4e8 <icmp_input+0x1f4>)
801b342: 61fb str r3, [r7, #28]
/* multicast destination address? */
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
801b344: 4b67 ldr r3, [pc, #412] ; (801b4e4 <icmp_input+0x1f0>)
801b346: 695b ldr r3, [r3, #20]
801b348: f003 03f0 and.w r3, r3, #240 ; 0xf0
801b34c: 2be0 cmp r3, #224 ; 0xe0
801b34e: f000 80bb beq.w 801b4c8 <icmp_input+0x1d4>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n"));
goto icmperr;
#endif /* LWIP_MULTICAST_PING */
}
/* broadcast destination address? */
if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) {
801b352: 4b64 ldr r3, [pc, #400] ; (801b4e4 <icmp_input+0x1f0>)
801b354: 695a ldr r2, [r3, #20]
801b356: 4b63 ldr r3, [pc, #396] ; (801b4e4 <icmp_input+0x1f0>)
801b358: 681b ldr r3, [r3, #0]
801b35a: 4619 mov r1, r3
801b35c: 4610 mov r0, r2
801b35e: f000 fc09 bl 801bb74 <ip4_addr_isbroadcast_u32>
801b362: 4603 mov r3, r0
801b364: 2b00 cmp r3, #0
801b366: f040 80b1 bne.w 801b4cc <icmp_input+0x1d8>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n"));
goto icmperr;
#endif /* LWIP_BROADCAST_PING */
}
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n"));
if (p->tot_len < sizeof(struct icmp_echo_hdr)) {
801b36a: 687b ldr r3, [r7, #4]
801b36c: 891b ldrh r3, [r3, #8]
801b36e: 2b07 cmp r3, #7
801b370: f240 80a5 bls.w 801b4be <icmp_input+0x1ca>
return;
}
}
#endif
#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN
if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) {
801b374: 8c7b ldrh r3, [r7, #34] ; 0x22
801b376: 330e adds r3, #14
801b378: 4619 mov r1, r3
801b37a: 6878 ldr r0, [r7, #4]
801b37c: f7f6 fef6 bl 801216c <pbuf_add_header>
801b380: 4603 mov r3, r0
801b382: 2b00 cmp r3, #0
801b384: d04b beq.n 801b41e <icmp_input+0x12a>
/* p is not big enough to contain link headers
* allocate a new one and copy p into it
*/
struct pbuf *r;
u16_t alloc_len = (u16_t)(p->tot_len + hlen);
801b386: 687b ldr r3, [r7, #4]
801b388: 891a ldrh r2, [r3, #8]
801b38a: 8c7b ldrh r3, [r7, #34] ; 0x22
801b38c: 4413 add r3, r2
801b38e: 837b strh r3, [r7, #26]
if (alloc_len < p->tot_len) {
801b390: 687b ldr r3, [r7, #4]
801b392: 891b ldrh r3, [r3, #8]
801b394: 8b7a ldrh r2, [r7, #26]
801b396: 429a cmp r2, r3
801b398: f0c0 809a bcc.w 801b4d0 <icmp_input+0x1dc>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed (tot_len overflow)\n"));
goto icmperr;
}
/* allocate new packet buffer with space for link headers */
r = pbuf_alloc(PBUF_LINK, alloc_len, PBUF_RAM);
801b39c: 8b7b ldrh r3, [r7, #26]
801b39e: f44f 7220 mov.w r2, #640 ; 0x280
801b3a2: 4619 mov r1, r3
801b3a4: 200e movs r0, #14
801b3a6: f7f6 fc97 bl 8011cd8 <pbuf_alloc>
801b3aa: 6178 str r0, [r7, #20]
if (r == NULL) {
801b3ac: 697b ldr r3, [r7, #20]
801b3ae: 2b00 cmp r3, #0
801b3b0: f000 8090 beq.w 801b4d4 <icmp_input+0x1e0>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n"));
goto icmperr;
}
if (r->len < hlen + sizeof(struct icmp_echo_hdr)) {
801b3b4: 697b ldr r3, [r7, #20]
801b3b6: 895b ldrh r3, [r3, #10]
801b3b8: 461a mov r2, r3
801b3ba: 8c7b ldrh r3, [r7, #34] ; 0x22
801b3bc: 3308 adds r3, #8
801b3be: 429a cmp r2, r3
801b3c0: d203 bcs.n 801b3ca <icmp_input+0xd6>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header"));
pbuf_free(r);
801b3c2: 6978 ldr r0, [r7, #20]
801b3c4: f7f6 ff68 bl 8012298 <pbuf_free>
goto icmperr;
801b3c8: e085 b.n 801b4d6 <icmp_input+0x1e2>
}
/* copy the ip header */
MEMCPY(r->payload, iphdr_in, hlen);
801b3ca: 697b ldr r3, [r7, #20]
801b3cc: 685b ldr r3, [r3, #4]
801b3ce: 8c7a ldrh r2, [r7, #34] ; 0x22
801b3d0: 6a79 ldr r1, [r7, #36] ; 0x24
801b3d2: 4618 mov r0, r3
801b3d4: f001 fc63 bl 801cc9e <memcpy>
/* switch r->payload back to icmp header (cannot fail) */
if (pbuf_remove_header(r, hlen)) {
801b3d8: 8c7b ldrh r3, [r7, #34] ; 0x22
801b3da: 4619 mov r1, r3
801b3dc: 6978 ldr r0, [r7, #20]
801b3de: f7f6 fed5 bl 801218c <pbuf_remove_header>
801b3e2: 4603 mov r3, r0
801b3e4: 2b00 cmp r3, #0
801b3e6: d009 beq.n 801b3fc <icmp_input+0x108>
LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0);
801b3e8: 4b40 ldr r3, [pc, #256] ; (801b4ec <icmp_input+0x1f8>)
801b3ea: 22b6 movs r2, #182 ; 0xb6
801b3ec: 4940 ldr r1, [pc, #256] ; (801b4f0 <icmp_input+0x1fc>)
801b3ee: 4841 ldr r0, [pc, #260] ; (801b4f4 <icmp_input+0x200>)
801b3f0: f001 fc82 bl 801ccf8 <iprintf>
pbuf_free(r);
801b3f4: 6978 ldr r0, [r7, #20]
801b3f6: f7f6 ff4f bl 8012298 <pbuf_free>
goto icmperr;
801b3fa: e06c b.n 801b4d6 <icmp_input+0x1e2>
}
/* copy the rest of the packet without ip header */
if (pbuf_copy(r, p) != ERR_OK) {
801b3fc: 6879 ldr r1, [r7, #4]
801b3fe: 6978 ldr r0, [r7, #20]
801b400: f7f7 f87e bl 8012500 <pbuf_copy>
801b404: 4603 mov r3, r0
801b406: 2b00 cmp r3, #0
801b408: d003 beq.n 801b412 <icmp_input+0x11e>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed"));
pbuf_free(r);
801b40a: 6978 ldr r0, [r7, #20]
801b40c: f7f6 ff44 bl 8012298 <pbuf_free>
goto icmperr;
801b410: e061 b.n 801b4d6 <icmp_input+0x1e2>
}
/* free the original p */
pbuf_free(p);
801b412: 6878 ldr r0, [r7, #4]
801b414: f7f6 ff40 bl 8012298 <pbuf_free>
/* we now have an identical copy of p that has room for link headers */
p = r;
801b418: 697b ldr r3, [r7, #20]
801b41a: 607b str r3, [r7, #4]
801b41c: e00f b.n 801b43e <icmp_input+0x14a>
} else {
/* restore p->payload to point to icmp header (cannot fail) */
if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) {
801b41e: 8c7b ldrh r3, [r7, #34] ; 0x22
801b420: 330e adds r3, #14
801b422: 4619 mov r1, r3
801b424: 6878 ldr r0, [r7, #4]
801b426: f7f6 feb1 bl 801218c <pbuf_remove_header>
801b42a: 4603 mov r3, r0
801b42c: 2b00 cmp r3, #0
801b42e: d006 beq.n 801b43e <icmp_input+0x14a>
LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0);
801b430: 4b2e ldr r3, [pc, #184] ; (801b4ec <icmp_input+0x1f8>)
801b432: 22c7 movs r2, #199 ; 0xc7
801b434: 4930 ldr r1, [pc, #192] ; (801b4f8 <icmp_input+0x204>)
801b436: 482f ldr r0, [pc, #188] ; (801b4f4 <icmp_input+0x200>)
801b438: f001 fc5e bl 801ccf8 <iprintf>
goto icmperr;
801b43c: e04b b.n 801b4d6 <icmp_input+0x1e2>
}
#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */
/* At this point, all checks are OK. */
/* We generate an answer by switching the dest and src ip addresses,
* setting the icmp type to ECHO_RESPONSE and updating the checksum. */
iecho = (struct icmp_echo_hdr *)p->payload;
801b43e: 687b ldr r3, [r7, #4]
801b440: 685b ldr r3, [r3, #4]
801b442: 613b str r3, [r7, #16]
if (pbuf_add_header(p, hlen)) {
801b444: 8c7b ldrh r3, [r7, #34] ; 0x22
801b446: 4619 mov r1, r3
801b448: 6878 ldr r0, [r7, #4]
801b44a: f7f6 fe8f bl 801216c <pbuf_add_header>
801b44e: 4603 mov r3, r0
801b450: 2b00 cmp r3, #0
801b452: d12b bne.n 801b4ac <icmp_input+0x1b8>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet"));
} else {
err_t ret;
struct ip_hdr *iphdr = (struct ip_hdr *)p->payload;
801b454: 687b ldr r3, [r7, #4]
801b456: 685b ldr r3, [r3, #4]
801b458: 60fb str r3, [r7, #12]
ip4_addr_copy(iphdr->src, *src);
801b45a: 69fb ldr r3, [r7, #28]
801b45c: 681a ldr r2, [r3, #0]
801b45e: 68fb ldr r3, [r7, #12]
801b460: 60da str r2, [r3, #12]
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
801b462: 4b20 ldr r3, [pc, #128] ; (801b4e4 <icmp_input+0x1f0>)
801b464: 691a ldr r2, [r3, #16]
801b466: 68fb ldr r3, [r7, #12]
801b468: 611a str r2, [r3, #16]
ICMPH_TYPE_SET(iecho, ICMP_ER);
801b46a: 693b ldr r3, [r7, #16]
801b46c: 2200 movs r2, #0
801b46e: 701a strb r2, [r3, #0]
else {
iecho->chksum = 0;
}
#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
#else /* CHECKSUM_GEN_ICMP */
iecho->chksum = 0;
801b470: 693b ldr r3, [r7, #16]
801b472: 2200 movs r2, #0
801b474: 709a strb r2, [r3, #2]
801b476: 2200 movs r2, #0
801b478: 70da strb r2, [r3, #3]
#endif /* CHECKSUM_GEN_ICMP */
/* Set the correct TTL and recalculate the header checksum. */
IPH_TTL_SET(iphdr, ICMP_TTL);
801b47a: 68fb ldr r3, [r7, #12]
801b47c: 22ff movs r2, #255 ; 0xff
801b47e: 721a strb r2, [r3, #8]
IPH_CHKSUM_SET(iphdr, 0);
801b480: 68fb ldr r3, [r7, #12]
801b482: 2200 movs r2, #0
801b484: 729a strb r2, [r3, #10]
801b486: 2200 movs r2, #0
801b488: 72da strb r2, [r3, #11]
MIB2_STATS_INC(mib2.icmpoutmsgs);
/* increase number of echo replies attempted to send */
MIB2_STATS_INC(mib2.icmpoutechoreps);
/* send an ICMP packet */
ret = ip4_output_if(p, src, LWIP_IP_HDRINCL,
801b48a: 683b ldr r3, [r7, #0]
801b48c: 9302 str r3, [sp, #8]
801b48e: 2301 movs r3, #1
801b490: 9301 str r3, [sp, #4]
801b492: 2300 movs r3, #0
801b494: 9300 str r3, [sp, #0]
801b496: 23ff movs r3, #255 ; 0xff
801b498: 2200 movs r2, #0
801b49a: 69f9 ldr r1, [r7, #28]
801b49c: 6878 ldr r0, [r7, #4]
801b49e: f000 fa91 bl 801b9c4 <ip4_output_if>
801b4a2: 4603 mov r3, r0
801b4a4: 72fb strb r3, [r7, #11]
ICMP_TTL, 0, IP_PROTO_ICMP, inp);
if (ret != ERR_OK) {
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret)));
}
}
break;
801b4a6: e001 b.n 801b4ac <icmp_input+0x1b8>
break;
801b4a8: bf00 nop
801b4aa: e000 b.n 801b4ae <icmp_input+0x1ba>
break;
801b4ac: bf00 nop
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n",
(s16_t)type, (s16_t)code));
ICMP_STATS_INC(icmp.proterr);
ICMP_STATS_INC(icmp.drop);
}
pbuf_free(p);
801b4ae: 6878 ldr r0, [r7, #4]
801b4b0: f7f6 fef2 bl 8012298 <pbuf_free>
return;
801b4b4: e013 b.n 801b4de <icmp_input+0x1ea>
goto lenerr;
801b4b6: bf00 nop
801b4b8: e002 b.n 801b4c0 <icmp_input+0x1cc>
goto lenerr;
801b4ba: bf00 nop
801b4bc: e000 b.n 801b4c0 <icmp_input+0x1cc>
goto lenerr;
801b4be: bf00 nop
lenerr:
pbuf_free(p);
801b4c0: 6878 ldr r0, [r7, #4]
801b4c2: f7f6 fee9 bl 8012298 <pbuf_free>
ICMP_STATS_INC(icmp.lenerr);
MIB2_STATS_INC(mib2.icmpinerrors);
return;
801b4c6: e00a b.n 801b4de <icmp_input+0x1ea>
goto icmperr;
801b4c8: bf00 nop
801b4ca: e004 b.n 801b4d6 <icmp_input+0x1e2>
goto icmperr;
801b4cc: bf00 nop
801b4ce: e002 b.n 801b4d6 <icmp_input+0x1e2>
goto icmperr;
801b4d0: bf00 nop
801b4d2: e000 b.n 801b4d6 <icmp_input+0x1e2>
goto icmperr;
801b4d4: bf00 nop
#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING
icmperr:
pbuf_free(p);
801b4d6: 6878 ldr r0, [r7, #4]
801b4d8: f7f6 fede bl 8012298 <pbuf_free>
ICMP_STATS_INC(icmp.err);
MIB2_STATS_INC(mib2.icmpinerrors);
return;
801b4dc: bf00 nop
#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */
}
801b4de: 3728 adds r7, #40 ; 0x28
801b4e0: 46bd mov sp, r7
801b4e2: bd80 pop {r7, pc}
801b4e4: 2000c0c8 .word 0x2000c0c8
801b4e8: 2000c0dc .word 0x2000c0dc
801b4ec: 080209f0 .word 0x080209f0
801b4f0: 08020a28 .word 0x08020a28
801b4f4: 08020a60 .word 0x08020a60
801b4f8: 08020a88 .word 0x08020a88
0801b4fc <icmp_dest_unreach>:
* p->payload pointing to the IP header
* @param t type of the 'unreachable' packet
*/
void
icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t)
{
801b4fc: b580 push {r7, lr}
801b4fe: b082 sub sp, #8
801b500: af00 add r7, sp, #0
801b502: 6078 str r0, [r7, #4]
801b504: 460b mov r3, r1
801b506: 70fb strb r3, [r7, #3]
MIB2_STATS_INC(mib2.icmpoutdestunreachs);
icmp_send_response(p, ICMP_DUR, t);
801b508: 78fb ldrb r3, [r7, #3]
801b50a: 461a mov r2, r3
801b50c: 2103 movs r1, #3
801b50e: 6878 ldr r0, [r7, #4]
801b510: f000 f814 bl 801b53c <icmp_send_response>
}
801b514: bf00 nop
801b516: 3708 adds r7, #8
801b518: 46bd mov sp, r7
801b51a: bd80 pop {r7, pc}
0801b51c <icmp_time_exceeded>:
* p->payload pointing to the IP header
* @param t type of the 'time exceeded' packet
*/
void
icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t)
{
801b51c: b580 push {r7, lr}
801b51e: b082 sub sp, #8
801b520: af00 add r7, sp, #0
801b522: 6078 str r0, [r7, #4]
801b524: 460b mov r3, r1
801b526: 70fb strb r3, [r7, #3]
MIB2_STATS_INC(mib2.icmpouttimeexcds);
icmp_send_response(p, ICMP_TE, t);
801b528: 78fb ldrb r3, [r7, #3]
801b52a: 461a mov r2, r3
801b52c: 210b movs r1, #11
801b52e: 6878 ldr r0, [r7, #4]
801b530: f000 f804 bl 801b53c <icmp_send_response>
}
801b534: bf00 nop
801b536: 3708 adds r7, #8
801b538: 46bd mov sp, r7
801b53a: bd80 pop {r7, pc}
0801b53c <icmp_send_response>:
* @param type Type of the ICMP header
* @param code Code of the ICMP header
*/
static void
icmp_send_response(struct pbuf *p, u8_t type, u8_t code)
{
801b53c: b580 push {r7, lr}
801b53e: b08c sub sp, #48 ; 0x30
801b540: af04 add r7, sp, #16
801b542: 6078 str r0, [r7, #4]
801b544: 460b mov r3, r1
801b546: 70fb strb r3, [r7, #3]
801b548: 4613 mov r3, r2
801b54a: 70bb strb r3, [r7, #2]
/* increase number of messages attempted to send */
MIB2_STATS_INC(mib2.icmpoutmsgs);
/* ICMP header + IP header + 8 bytes of data */
q = pbuf_alloc(PBUF_IP, sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE,
801b54c: f44f 7220 mov.w r2, #640 ; 0x280
801b550: 2124 movs r1, #36 ; 0x24
801b552: 2022 movs r0, #34 ; 0x22
801b554: f7f6 fbc0 bl 8011cd8 <pbuf_alloc>
801b558: 61f8 str r0, [r7, #28]
PBUF_RAM);
if (q == NULL) {
801b55a: 69fb ldr r3, [r7, #28]
801b55c: 2b00 cmp r3, #0
801b55e: d04c beq.n 801b5fa <icmp_send_response+0xbe>
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n"));
MIB2_STATS_INC(mib2.icmpouterrors);
return;
}
LWIP_ASSERT("check that first pbuf can hold icmp message",
801b560: 69fb ldr r3, [r7, #28]
801b562: 895b ldrh r3, [r3, #10]
801b564: 2b23 cmp r3, #35 ; 0x23
801b566: d806 bhi.n 801b576 <icmp_send_response+0x3a>
801b568: 4b26 ldr r3, [pc, #152] ; (801b604 <icmp_send_response+0xc8>)
801b56a: f240 1269 movw r2, #361 ; 0x169
801b56e: 4926 ldr r1, [pc, #152] ; (801b608 <icmp_send_response+0xcc>)
801b570: 4826 ldr r0, [pc, #152] ; (801b60c <icmp_send_response+0xd0>)
801b572: f001 fbc1 bl 801ccf8 <iprintf>
(q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE)));
iphdr = (struct ip_hdr *)p->payload;
801b576: 687b ldr r3, [r7, #4]
801b578: 685b ldr r3, [r3, #4]
801b57a: 61bb str r3, [r7, #24]
ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->src);
LWIP_DEBUGF(ICMP_DEBUG, (" to "));
ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->dest);
LWIP_DEBUGF(ICMP_DEBUG, ("\n"));
icmphdr = (struct icmp_echo_hdr *)q->payload;
801b57c: 69fb ldr r3, [r7, #28]
801b57e: 685b ldr r3, [r3, #4]
801b580: 617b str r3, [r7, #20]
icmphdr->type = type;
801b582: 697b ldr r3, [r7, #20]
801b584: 78fa ldrb r2, [r7, #3]
801b586: 701a strb r2, [r3, #0]
icmphdr->code = code;
801b588: 697b ldr r3, [r7, #20]
801b58a: 78ba ldrb r2, [r7, #2]
801b58c: 705a strb r2, [r3, #1]
icmphdr->id = 0;
801b58e: 697b ldr r3, [r7, #20]
801b590: 2200 movs r2, #0
801b592: 711a strb r2, [r3, #4]
801b594: 2200 movs r2, #0
801b596: 715a strb r2, [r3, #5]
icmphdr->seqno = 0;
801b598: 697b ldr r3, [r7, #20]
801b59a: 2200 movs r2, #0
801b59c: 719a strb r2, [r3, #6]
801b59e: 2200 movs r2, #0
801b5a0: 71da strb r2, [r3, #7]
/* copy fields from original packet */
SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload,
801b5a2: 69fb ldr r3, [r7, #28]
801b5a4: 685b ldr r3, [r3, #4]
801b5a6: f103 0008 add.w r0, r3, #8
801b5aa: 687b ldr r3, [r7, #4]
801b5ac: 685b ldr r3, [r3, #4]
801b5ae: 221c movs r2, #28
801b5b0: 4619 mov r1, r3
801b5b2: f001 fb74 bl 801cc9e <memcpy>
IP_HLEN + ICMP_DEST_UNREACH_DATASIZE);
ip4_addr_copy(iphdr_src, iphdr->src);
801b5b6: 69bb ldr r3, [r7, #24]
801b5b8: 68db ldr r3, [r3, #12]
801b5ba: 60fb str r3, [r7, #12]
ip4_addr_t iphdr_dst;
ip4_addr_copy(iphdr_dst, iphdr->dest);
netif = ip4_route_src(&iphdr_dst, &iphdr_src);
}
#else
netif = ip4_route(&iphdr_src);
801b5bc: f107 030c add.w r3, r7, #12
801b5c0: 4618 mov r0, r3
801b5c2: f000 f825 bl 801b610 <ip4_route>
801b5c6: 6138 str r0, [r7, #16]
#endif
if (netif != NULL) {
801b5c8: 693b ldr r3, [r7, #16]
801b5ca: 2b00 cmp r3, #0
801b5cc: d011 beq.n 801b5f2 <icmp_send_response+0xb6>
/* calculate checksum */
icmphdr->chksum = 0;
801b5ce: 697b ldr r3, [r7, #20]
801b5d0: 2200 movs r2, #0
801b5d2: 709a strb r2, [r3, #2]
801b5d4: 2200 movs r2, #0
801b5d6: 70da strb r2, [r3, #3]
IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) {
icmphdr->chksum = inet_chksum(icmphdr, q->len);
}
#endif
ICMP_STATS_INC(icmp.xmit);
ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif);
801b5d8: f107 020c add.w r2, r7, #12
801b5dc: 693b ldr r3, [r7, #16]
801b5de: 9302 str r3, [sp, #8]
801b5e0: 2301 movs r3, #1
801b5e2: 9301 str r3, [sp, #4]
801b5e4: 2300 movs r3, #0
801b5e6: 9300 str r3, [sp, #0]
801b5e8: 23ff movs r3, #255 ; 0xff
801b5ea: 2100 movs r1, #0
801b5ec: 69f8 ldr r0, [r7, #28]
801b5ee: f000 f9e9 bl 801b9c4 <ip4_output_if>
}
pbuf_free(q);
801b5f2: 69f8 ldr r0, [r7, #28]
801b5f4: f7f6 fe50 bl 8012298 <pbuf_free>
801b5f8: e000 b.n 801b5fc <icmp_send_response+0xc0>
return;
801b5fa: bf00 nop
}
801b5fc: 3720 adds r7, #32
801b5fe: 46bd mov sp, r7
801b600: bd80 pop {r7, pc}
801b602: bf00 nop
801b604: 080209f0 .word 0x080209f0
801b608: 08020abc .word 0x08020abc
801b60c: 08020a60 .word 0x08020a60
0801b610 <ip4_route>:
* @param dest the destination IP address for which to find the route
* @return the netif on which to send to reach dest
*/
struct netif *
ip4_route(const ip4_addr_t *dest)
{
801b610: b480 push {r7}
801b612: b085 sub sp, #20
801b614: af00 add r7, sp, #0
801b616: 6078 str r0, [r7, #4]
/* bug #54569: in case LWIP_SINGLE_NETIF=1 and LWIP_DEBUGF() disabled, the following loop is optimized away */
LWIP_UNUSED_ARG(dest);
/* iterate through netifs */
NETIF_FOREACH(netif) {
801b618: 4b33 ldr r3, [pc, #204] ; (801b6e8 <ip4_route+0xd8>)
801b61a: 681b ldr r3, [r3, #0]
801b61c: 60fb str r3, [r7, #12]
801b61e: e036 b.n 801b68e <ip4_route+0x7e>
/* is the netif up, does it have a link and a valid address? */
if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) {
801b620: 68fb ldr r3, [r7, #12]
801b622: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b626: f003 0301 and.w r3, r3, #1
801b62a: b2db uxtb r3, r3
801b62c: 2b00 cmp r3, #0
801b62e: d02b beq.n 801b688 <ip4_route+0x78>
801b630: 68fb ldr r3, [r7, #12]
801b632: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b636: 089b lsrs r3, r3, #2
801b638: f003 0301 and.w r3, r3, #1
801b63c: b2db uxtb r3, r3
801b63e: 2b00 cmp r3, #0
801b640: d022 beq.n 801b688 <ip4_route+0x78>
801b642: 68fb ldr r3, [r7, #12]
801b644: 3304 adds r3, #4
801b646: 681b ldr r3, [r3, #0]
801b648: 2b00 cmp r3, #0
801b64a: d01d beq.n 801b688 <ip4_route+0x78>
/* network mask matches? */
if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
801b64c: 687b ldr r3, [r7, #4]
801b64e: 681a ldr r2, [r3, #0]
801b650: 68fb ldr r3, [r7, #12]
801b652: 3304 adds r3, #4
801b654: 681b ldr r3, [r3, #0]
801b656: 405a eors r2, r3
801b658: 68fb ldr r3, [r7, #12]
801b65a: 3308 adds r3, #8
801b65c: 681b ldr r3, [r3, #0]
801b65e: 4013 ands r3, r2
801b660: 2b00 cmp r3, #0
801b662: d101 bne.n 801b668 <ip4_route+0x58>
/* return netif on which to forward IP packet */
return netif;
801b664: 68fb ldr r3, [r7, #12]
801b666: e038 b.n 801b6da <ip4_route+0xca>
}
/* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */
if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) {
801b668: 68fb ldr r3, [r7, #12]
801b66a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b66e: f003 0302 and.w r3, r3, #2
801b672: 2b00 cmp r3, #0
801b674: d108 bne.n 801b688 <ip4_route+0x78>
801b676: 687b ldr r3, [r7, #4]
801b678: 681a ldr r2, [r3, #0]
801b67a: 68fb ldr r3, [r7, #12]
801b67c: 330c adds r3, #12
801b67e: 681b ldr r3, [r3, #0]
801b680: 429a cmp r2, r3
801b682: d101 bne.n 801b688 <ip4_route+0x78>
/* return netif on which to forward IP packet */
return netif;
801b684: 68fb ldr r3, [r7, #12]
801b686: e028 b.n 801b6da <ip4_route+0xca>
NETIF_FOREACH(netif) {
801b688: 68fb ldr r3, [r7, #12]
801b68a: 681b ldr r3, [r3, #0]
801b68c: 60fb str r3, [r7, #12]
801b68e: 68fb ldr r3, [r7, #12]
801b690: 2b00 cmp r3, #0
801b692: d1c5 bne.n 801b620 <ip4_route+0x10>
return netif;
}
#endif
#endif /* !LWIP_SINGLE_NETIF */
if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
801b694: 4b15 ldr r3, [pc, #84] ; (801b6ec <ip4_route+0xdc>)
801b696: 681b ldr r3, [r3, #0]
801b698: 2b00 cmp r3, #0
801b69a: d01a beq.n 801b6d2 <ip4_route+0xc2>
801b69c: 4b13 ldr r3, [pc, #76] ; (801b6ec <ip4_route+0xdc>)
801b69e: 681b ldr r3, [r3, #0]
801b6a0: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b6a4: f003 0301 and.w r3, r3, #1
801b6a8: 2b00 cmp r3, #0
801b6aa: d012 beq.n 801b6d2 <ip4_route+0xc2>
801b6ac: 4b0f ldr r3, [pc, #60] ; (801b6ec <ip4_route+0xdc>)
801b6ae: 681b ldr r3, [r3, #0]
801b6b0: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b6b4: f003 0304 and.w r3, r3, #4
801b6b8: 2b00 cmp r3, #0
801b6ba: d00a beq.n 801b6d2 <ip4_route+0xc2>
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
801b6bc: 4b0b ldr r3, [pc, #44] ; (801b6ec <ip4_route+0xdc>)
801b6be: 681b ldr r3, [r3, #0]
801b6c0: 3304 adds r3, #4
801b6c2: 681b ldr r3, [r3, #0]
if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
801b6c4: 2b00 cmp r3, #0
801b6c6: d004 beq.n 801b6d2 <ip4_route+0xc2>
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
801b6c8: 687b ldr r3, [r7, #4]
801b6ca: 681b ldr r3, [r3, #0]
801b6cc: b2db uxtb r3, r3
801b6ce: 2b7f cmp r3, #127 ; 0x7f
801b6d0: d101 bne.n 801b6d6 <ip4_route+0xc6>
If this is not good enough for you, use LWIP_HOOK_IP4_ROUTE() */
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n",
ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest)));
IP_STATS_INC(ip.rterr);
MIB2_STATS_INC(mib2.ipoutnoroutes);
return NULL;
801b6d2: 2300 movs r3, #0
801b6d4: e001 b.n 801b6da <ip4_route+0xca>
}
return netif_default;
801b6d6: 4b05 ldr r3, [pc, #20] ; (801b6ec <ip4_route+0xdc>)
801b6d8: 681b ldr r3, [r3, #0]
}
801b6da: 4618 mov r0, r3
801b6dc: 3714 adds r7, #20
801b6de: 46bd mov sp, r7
801b6e0: f85d 7b04 ldr.w r7, [sp], #4
801b6e4: 4770 bx lr
801b6e6: bf00 nop
801b6e8: 2000f7ec .word 0x2000f7ec
801b6ec: 2000f7f0 .word 0x2000f7f0
0801b6f0 <ip4_input_accept>:
#endif /* IP_FORWARD */
/** Return true if the current input packet should be accepted on this netif */
static int
ip4_input_accept(struct netif *netif)
{
801b6f0: b580 push {r7, lr}
801b6f2: b082 sub sp, #8
801b6f4: af00 add r7, sp, #0
801b6f6: 6078 str r0, [r7, #4]
ip4_addr_get_u32(ip4_current_dest_addr()) & ip4_addr_get_u32(netif_ip4_netmask(netif)),
ip4_addr_get_u32(netif_ip4_addr(netif)) & ip4_addr_get_u32(netif_ip4_netmask(netif)),
ip4_addr_get_u32(ip4_current_dest_addr()) & ~ip4_addr_get_u32(netif_ip4_netmask(netif))));
/* interface is up and configured? */
if ((netif_is_up(netif)) && (!ip4_addr_isany_val(*netif_ip4_addr(netif)))) {
801b6f8: 687b ldr r3, [r7, #4]
801b6fa: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b6fe: f003 0301 and.w r3, r3, #1
801b702: b2db uxtb r3, r3
801b704: 2b00 cmp r3, #0
801b706: d016 beq.n 801b736 <ip4_input_accept+0x46>
801b708: 687b ldr r3, [r7, #4]
801b70a: 3304 adds r3, #4
801b70c: 681b ldr r3, [r3, #0]
801b70e: 2b00 cmp r3, #0
801b710: d011 beq.n 801b736 <ip4_input_accept+0x46>
/* unicast to this interface address? */
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
801b712: 4b0b ldr r3, [pc, #44] ; (801b740 <ip4_input_accept+0x50>)
801b714: 695a ldr r2, [r3, #20]
801b716: 687b ldr r3, [r7, #4]
801b718: 3304 adds r3, #4
801b71a: 681b ldr r3, [r3, #0]
801b71c: 429a cmp r2, r3
801b71e: d008 beq.n 801b732 <ip4_input_accept+0x42>
/* or broadcast on this interface network address? */
ip4_addr_isbroadcast(ip4_current_dest_addr(), netif)
801b720: 4b07 ldr r3, [pc, #28] ; (801b740 <ip4_input_accept+0x50>)
801b722: 695b ldr r3, [r3, #20]
801b724: 6879 ldr r1, [r7, #4]
801b726: 4618 mov r0, r3
801b728: f000 fa24 bl 801bb74 <ip4_addr_isbroadcast_u32>
801b72c: 4603 mov r3, r0
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
801b72e: 2b00 cmp r3, #0
801b730: d001 beq.n 801b736 <ip4_input_accept+0x46>
#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */
) {
LWIP_DEBUGF(IP_DEBUG, ("ip4_input: packet accepted on interface %c%c\n",
netif->name[0], netif->name[1]));
/* accept on this netif */
return 1;
801b732: 2301 movs r3, #1
801b734: e000 b.n 801b738 <ip4_input_accept+0x48>
/* accept on this netif */
return 1;
}
#endif /* LWIP_AUTOIP */
}
return 0;
801b736: 2300 movs r3, #0
}
801b738: 4618 mov r0, r3
801b73a: 3708 adds r7, #8
801b73c: 46bd mov sp, r7
801b73e: bd80 pop {r7, pc}
801b740: 2000c0c8 .word 0x2000c0c8
0801b744 <ip4_input>:
* @return ERR_OK if the packet was processed (could return ERR_* if it wasn't
* processed, but currently always returns ERR_OK)
*/
err_t
ip4_input(struct pbuf *p, struct netif *inp)
{
801b744: b580 push {r7, lr}
801b746: b088 sub sp, #32
801b748: af00 add r7, sp, #0
801b74a: 6078 str r0, [r7, #4]
801b74c: 6039 str r1, [r7, #0]
const struct ip_hdr *iphdr;
struct netif *netif;
u16_t iphdr_hlen;
u16_t iphdr_len;
#if IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP
int check_ip_src = 1;
801b74e: 2301 movs r3, #1
801b750: 617b str r3, [r7, #20]
IP_STATS_INC(ip.recv);
MIB2_STATS_INC(mib2.ipinreceives);
/* identify the IP header */
iphdr = (struct ip_hdr *)p->payload;
801b752: 687b ldr r3, [r7, #4]
801b754: 685b ldr r3, [r3, #4]
801b756: 61fb str r3, [r7, #28]
if (IPH_V(iphdr) != 4) {
801b758: 69fb ldr r3, [r7, #28]
801b75a: 781b ldrb r3, [r3, #0]
801b75c: 091b lsrs r3, r3, #4
801b75e: b2db uxtb r3, r3
801b760: 2b04 cmp r3, #4
801b762: d004 beq.n 801b76e <ip4_input+0x2a>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IP packet dropped due to bad version number %"U16_F"\n", (u16_t)IPH_V(iphdr)));
ip4_debug_print(p);
pbuf_free(p);
801b764: 6878 ldr r0, [r7, #4]
801b766: f7f6 fd97 bl 8012298 <pbuf_free>
IP_STATS_INC(ip.err);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinhdrerrors);
return ERR_OK;
801b76a: 2300 movs r3, #0
801b76c: e121 b.n 801b9b2 <ip4_input+0x26e>
return ERR_OK;
}
#endif
/* obtain IP header length in bytes */
iphdr_hlen = IPH_HL_BYTES(iphdr);
801b76e: 69fb ldr r3, [r7, #28]
801b770: 781b ldrb r3, [r3, #0]
801b772: f003 030f and.w r3, r3, #15
801b776: b2db uxtb r3, r3
801b778: 009b lsls r3, r3, #2
801b77a: b2db uxtb r3, r3
801b77c: 827b strh r3, [r7, #18]
/* obtain ip length in bytes */
iphdr_len = lwip_ntohs(IPH_LEN(iphdr));
801b77e: 69fb ldr r3, [r7, #28]
801b780: 885b ldrh r3, [r3, #2]
801b782: b29b uxth r3, r3
801b784: 4618 mov r0, r3
801b786: f7f5 f9d3 bl 8010b30 <lwip_htons>
801b78a: 4603 mov r3, r0
801b78c: 823b strh r3, [r7, #16]
/* Trim pbuf. This is especially required for packets < 60 bytes. */
if (iphdr_len < p->tot_len) {
801b78e: 687b ldr r3, [r7, #4]
801b790: 891b ldrh r3, [r3, #8]
801b792: 8a3a ldrh r2, [r7, #16]
801b794: 429a cmp r2, r3
801b796: d204 bcs.n 801b7a2 <ip4_input+0x5e>
pbuf_realloc(p, iphdr_len);
801b798: 8a3b ldrh r3, [r7, #16]
801b79a: 4619 mov r1, r3
801b79c: 6878 ldr r0, [r7, #4]
801b79e: f7f6 fbf5 bl 8011f8c <pbuf_realloc>
}
/* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */
if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) {
801b7a2: 687b ldr r3, [r7, #4]
801b7a4: 895b ldrh r3, [r3, #10]
801b7a6: 8a7a ldrh r2, [r7, #18]
801b7a8: 429a cmp r2, r3
801b7aa: d807 bhi.n 801b7bc <ip4_input+0x78>
801b7ac: 687b ldr r3, [r7, #4]
801b7ae: 891b ldrh r3, [r3, #8]
801b7b0: 8a3a ldrh r2, [r7, #16]
801b7b2: 429a cmp r2, r3
801b7b4: d802 bhi.n 801b7bc <ip4_input+0x78>
801b7b6: 8a7b ldrh r3, [r7, #18]
801b7b8: 2b13 cmp r3, #19
801b7ba: d804 bhi.n 801b7c6 <ip4_input+0x82>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n",
iphdr_len, p->tot_len));
}
/* free (drop) packet pbufs */
pbuf_free(p);
801b7bc: 6878 ldr r0, [r7, #4]
801b7be: f7f6 fd6b bl 8012298 <pbuf_free>
IP_STATS_INC(ip.lenerr);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipindiscards);
return ERR_OK;
801b7c2: 2300 movs r3, #0
801b7c4: e0f5 b.n 801b9b2 <ip4_input+0x26e>
}
}
#endif
/* copy IP addresses to aligned ip_addr_t */
ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest);
801b7c6: 69fb ldr r3, [r7, #28]
801b7c8: 691b ldr r3, [r3, #16]
801b7ca: 4a7c ldr r2, [pc, #496] ; (801b9bc <ip4_input+0x278>)
801b7cc: 6153 str r3, [r2, #20]
ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
801b7ce: 69fb ldr r3, [r7, #28]
801b7d0: 68db ldr r3, [r3, #12]
801b7d2: 4a7a ldr r2, [pc, #488] ; (801b9bc <ip4_input+0x278>)
801b7d4: 6113 str r3, [r2, #16]
/* match packet against an interface, i.e. is this packet for us? */
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
801b7d6: 4b79 ldr r3, [pc, #484] ; (801b9bc <ip4_input+0x278>)
801b7d8: 695b ldr r3, [r3, #20]
801b7da: f003 03f0 and.w r3, r3, #240 ; 0xf0
801b7de: 2be0 cmp r3, #224 ; 0xe0
801b7e0: d112 bne.n 801b808 <ip4_input+0xc4>
netif = inp;
} else {
netif = NULL;
}
#else /* LWIP_IGMP */
if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
801b7e2: 683b ldr r3, [r7, #0]
801b7e4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b7e8: f003 0301 and.w r3, r3, #1
801b7ec: b2db uxtb r3, r3
801b7ee: 2b00 cmp r3, #0
801b7f0: d007 beq.n 801b802 <ip4_input+0xbe>
801b7f2: 683b ldr r3, [r7, #0]
801b7f4: 3304 adds r3, #4
801b7f6: 681b ldr r3, [r3, #0]
801b7f8: 2b00 cmp r3, #0
801b7fa: d002 beq.n 801b802 <ip4_input+0xbe>
netif = inp;
801b7fc: 683b ldr r3, [r7, #0]
801b7fe: 61bb str r3, [r7, #24]
801b800: e02a b.n 801b858 <ip4_input+0x114>
} else {
netif = NULL;
801b802: 2300 movs r3, #0
801b804: 61bb str r3, [r7, #24]
801b806: e027 b.n 801b858 <ip4_input+0x114>
}
#endif /* LWIP_IGMP */
} else {
/* start trying with inp. if that's not acceptable, start walking the
list of configured netifs. */
if (ip4_input_accept(inp)) {
801b808: 6838 ldr r0, [r7, #0]
801b80a: f7ff ff71 bl 801b6f0 <ip4_input_accept>
801b80e: 4603 mov r3, r0
801b810: 2b00 cmp r3, #0
801b812: d002 beq.n 801b81a <ip4_input+0xd6>
netif = inp;
801b814: 683b ldr r3, [r7, #0]
801b816: 61bb str r3, [r7, #24]
801b818: e01e b.n 801b858 <ip4_input+0x114>
} else {
netif = NULL;
801b81a: 2300 movs r3, #0
801b81c: 61bb str r3, [r7, #24]
#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF
/* Packets sent to the loopback address must not be accepted on an
* interface that does not have the loopback address assigned to it,
* unless a non-loopback interface is used for loopback traffic. */
if (!ip4_addr_isloopback(ip4_current_dest_addr()))
801b81e: 4b67 ldr r3, [pc, #412] ; (801b9bc <ip4_input+0x278>)
801b820: 695b ldr r3, [r3, #20]
801b822: b2db uxtb r3, r3
801b824: 2b7f cmp r3, #127 ; 0x7f
801b826: d017 beq.n 801b858 <ip4_input+0x114>
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
{
#if !LWIP_SINGLE_NETIF
NETIF_FOREACH(netif) {
801b828: 4b65 ldr r3, [pc, #404] ; (801b9c0 <ip4_input+0x27c>)
801b82a: 681b ldr r3, [r3, #0]
801b82c: 61bb str r3, [r7, #24]
801b82e: e00e b.n 801b84e <ip4_input+0x10a>
if (netif == inp) {
801b830: 69ba ldr r2, [r7, #24]
801b832: 683b ldr r3, [r7, #0]
801b834: 429a cmp r2, r3
801b836: d006 beq.n 801b846 <ip4_input+0x102>
/* we checked that before already */
continue;
}
if (ip4_input_accept(netif)) {
801b838: 69b8 ldr r0, [r7, #24]
801b83a: f7ff ff59 bl 801b6f0 <ip4_input_accept>
801b83e: 4603 mov r3, r0
801b840: 2b00 cmp r3, #0
801b842: d108 bne.n 801b856 <ip4_input+0x112>
801b844: e000 b.n 801b848 <ip4_input+0x104>
continue;
801b846: bf00 nop
NETIF_FOREACH(netif) {
801b848: 69bb ldr r3, [r7, #24]
801b84a: 681b ldr r3, [r3, #0]
801b84c: 61bb str r3, [r7, #24]
801b84e: 69bb ldr r3, [r7, #24]
801b850: 2b00 cmp r3, #0
801b852: d1ed bne.n 801b830 <ip4_input+0xec>
801b854: e000 b.n 801b858 <ip4_input+0x114>
break;
801b856: bf00 nop
* If you want to accept private broadcast communication while a netif is down,
* define LWIP_IP_ACCEPT_UDP_PORT(dst_port), e.g.:
*
* #define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345))
*/
if (netif == NULL) {
801b858: 69bb ldr r3, [r7, #24]
801b85a: 2b00 cmp r3, #0
801b85c: d111 bne.n 801b882 <ip4_input+0x13e>
/* remote port is DHCP server? */
if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
801b85e: 69fb ldr r3, [r7, #28]
801b860: 7a5b ldrb r3, [r3, #9]
801b862: 2b11 cmp r3, #17
801b864: d10d bne.n 801b882 <ip4_input+0x13e>
const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen);
801b866: 8a7b ldrh r3, [r7, #18]
801b868: 69fa ldr r2, [r7, #28]
801b86a: 4413 add r3, r2
801b86c: 60fb str r3, [r7, #12]
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: UDP packet to DHCP client port %"U16_F"\n",
lwip_ntohs(udphdr->dest)));
if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) {
801b86e: 68fb ldr r3, [r7, #12]
801b870: 885b ldrh r3, [r3, #2]
801b872: b29b uxth r3, r3
801b874: f5b3 4f88 cmp.w r3, #17408 ; 0x4400
801b878: d103 bne.n 801b882 <ip4_input+0x13e>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n"));
netif = inp;
801b87a: 683b ldr r3, [r7, #0]
801b87c: 61bb str r3, [r7, #24]
check_ip_src = 0;
801b87e: 2300 movs r3, #0
801b880: 617b str r3, [r7, #20]
}
#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */
/* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */
#if LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING
if (check_ip_src
801b882: 697b ldr r3, [r7, #20]
801b884: 2b00 cmp r3, #0
801b886: d017 beq.n 801b8b8 <ip4_input+0x174>
#if IP_ACCEPT_LINK_LAYER_ADDRESSING
/* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */
&& !ip4_addr_isany_val(*ip4_current_src_addr())
801b888: 4b4c ldr r3, [pc, #304] ; (801b9bc <ip4_input+0x278>)
801b88a: 691b ldr r3, [r3, #16]
801b88c: 2b00 cmp r3, #0
801b88e: d013 beq.n 801b8b8 <ip4_input+0x174>
#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */
)
#endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */
{
if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
801b890: 4b4a ldr r3, [pc, #296] ; (801b9bc <ip4_input+0x278>)
801b892: 691b ldr r3, [r3, #16]
801b894: 6839 ldr r1, [r7, #0]
801b896: 4618 mov r0, r3
801b898: f000 f96c bl 801bb74 <ip4_addr_isbroadcast_u32>
801b89c: 4603 mov r3, r0
801b89e: 2b00 cmp r3, #0
801b8a0: d105 bne.n 801b8ae <ip4_input+0x16a>
(ip4_addr_ismulticast(ip4_current_src_addr()))) {
801b8a2: 4b46 ldr r3, [pc, #280] ; (801b9bc <ip4_input+0x278>)
801b8a4: 691b ldr r3, [r3, #16]
801b8a6: f003 03f0 and.w r3, r3, #240 ; 0xf0
if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
801b8aa: 2be0 cmp r3, #224 ; 0xe0
801b8ac: d104 bne.n 801b8b8 <ip4_input+0x174>
/* packet source is not valid */
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip4_input: packet source is not valid.\n"));
/* free (drop) packet pbufs */
pbuf_free(p);
801b8ae: 6878 ldr r0, [r7, #4]
801b8b0: f7f6 fcf2 bl 8012298 <pbuf_free>
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinaddrerrors);
MIB2_STATS_INC(mib2.ipindiscards);
return ERR_OK;
801b8b4: 2300 movs r3, #0
801b8b6: e07c b.n 801b9b2 <ip4_input+0x26e>
}
}
/* packet not for us? */
if (netif == NULL) {
801b8b8: 69bb ldr r3, [r7, #24]
801b8ba: 2b00 cmp r3, #0
801b8bc: d104 bne.n 801b8c8 <ip4_input+0x184>
{
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinaddrerrors);
MIB2_STATS_INC(mib2.ipindiscards);
}
pbuf_free(p);
801b8be: 6878 ldr r0, [r7, #4]
801b8c0: f7f6 fcea bl 8012298 <pbuf_free>
return ERR_OK;
801b8c4: 2300 movs r3, #0
801b8c6: e074 b.n 801b9b2 <ip4_input+0x26e>
}
/* packet consists of multiple fragments? */
if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
801b8c8: 69fb ldr r3, [r7, #28]
801b8ca: 88db ldrh r3, [r3, #6]
801b8cc: b29b uxth r3, r3
801b8ce: 461a mov r2, r3
801b8d0: f64f 733f movw r3, #65343 ; 0xff3f
801b8d4: 4013 ands r3, r2
801b8d6: 2b00 cmp r3, #0
801b8d8: d00b beq.n 801b8f2 <ip4_input+0x1ae>
#if IP_REASSEMBLY /* packet fragment reassembly code present? */
LWIP_DEBUGF(IP_DEBUG, ("IP packet is a fragment (id=0x%04"X16_F" tot_len=%"U16_F" len=%"U16_F" MF=%"U16_F" offset=%"U16_F"), calling ip4_reass()\n",
lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK) * 8)));
/* reassemble the packet*/
p = ip4_reass(p);
801b8da: 6878 ldr r0, [r7, #4]
801b8dc: f000 fc90 bl 801c200 <ip4_reass>
801b8e0: 6078 str r0, [r7, #4]
/* packet not fully reassembled yet? */
if (p == NULL) {
801b8e2: 687b ldr r3, [r7, #4]
801b8e4: 2b00 cmp r3, #0
801b8e6: d101 bne.n 801b8ec <ip4_input+0x1a8>
return ERR_OK;
801b8e8: 2300 movs r3, #0
801b8ea: e062 b.n 801b9b2 <ip4_input+0x26e>
}
iphdr = (const struct ip_hdr *)p->payload;
801b8ec: 687b ldr r3, [r7, #4]
801b8ee: 685b ldr r3, [r3, #4]
801b8f0: 61fb str r3, [r7, #28]
/* send to upper layers */
LWIP_DEBUGF(IP_DEBUG, ("ip4_input: \n"));
ip4_debug_print(p);
LWIP_DEBUGF(IP_DEBUG, ("ip4_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len));
ip_data.current_netif = netif;
801b8f2: 4a32 ldr r2, [pc, #200] ; (801b9bc <ip4_input+0x278>)
801b8f4: 69bb ldr r3, [r7, #24]
801b8f6: 6013 str r3, [r2, #0]
ip_data.current_input_netif = inp;
801b8f8: 4a30 ldr r2, [pc, #192] ; (801b9bc <ip4_input+0x278>)
801b8fa: 683b ldr r3, [r7, #0]
801b8fc: 6053 str r3, [r2, #4]
ip_data.current_ip4_header = iphdr;
801b8fe: 4a2f ldr r2, [pc, #188] ; (801b9bc <ip4_input+0x278>)
801b900: 69fb ldr r3, [r7, #28]
801b902: 6093 str r3, [r2, #8]
ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr);
801b904: 69fb ldr r3, [r7, #28]
801b906: 781b ldrb r3, [r3, #0]
801b908: f003 030f and.w r3, r3, #15
801b90c: b2db uxtb r3, r3
801b90e: 009b lsls r3, r3, #2
801b910: b2db uxtb r3, r3
801b912: b29a uxth r2, r3
801b914: 4b29 ldr r3, [pc, #164] ; (801b9bc <ip4_input+0x278>)
801b916: 819a strh r2, [r3, #12]
/* raw input did not eat the packet? */
raw_status = raw_input(p, inp);
if (raw_status != RAW_INPUT_EATEN)
#endif /* LWIP_RAW */
{
pbuf_remove_header(p, iphdr_hlen); /* Move to payload, no check necessary. */
801b918: 8a7b ldrh r3, [r7, #18]
801b91a: 4619 mov r1, r3
801b91c: 6878 ldr r0, [r7, #4]
801b91e: f7f6 fc35 bl 801218c <pbuf_remove_header>
switch (IPH_PROTO(iphdr)) {
801b922: 69fb ldr r3, [r7, #28]
801b924: 7a5b ldrb r3, [r3, #9]
801b926: 2b06 cmp r3, #6
801b928: d009 beq.n 801b93e <ip4_input+0x1fa>
801b92a: 2b11 cmp r3, #17
801b92c: d002 beq.n 801b934 <ip4_input+0x1f0>
801b92e: 2b01 cmp r3, #1
801b930: d00a beq.n 801b948 <ip4_input+0x204>
801b932: e00e b.n 801b952 <ip4_input+0x20e>
case IP_PROTO_UDP:
#if LWIP_UDPLITE
case IP_PROTO_UDPLITE:
#endif /* LWIP_UDPLITE */
MIB2_STATS_INC(mib2.ipindelivers);
udp_input(p, inp);
801b934: 6839 ldr r1, [r7, #0]
801b936: 6878 ldr r0, [r7, #4]
801b938: f7fc fada bl 8017ef0 <udp_input>
break;
801b93c: e026 b.n 801b98c <ip4_input+0x248>
#endif /* LWIP_UDP */
#if LWIP_TCP
case IP_PROTO_TCP:
MIB2_STATS_INC(mib2.ipindelivers);
tcp_input(p, inp);
801b93e: 6839 ldr r1, [r7, #0]
801b940: 6878 ldr r0, [r7, #4]
801b942: f7f8 fae1 bl 8013f08 <tcp_input>
break;
801b946: e021 b.n 801b98c <ip4_input+0x248>
#endif /* LWIP_TCP */
#if LWIP_ICMP
case IP_PROTO_ICMP:
MIB2_STATS_INC(mib2.ipindelivers);
icmp_input(p, inp);
801b948: 6839 ldr r1, [r7, #0]
801b94a: 6878 ldr r0, [r7, #4]
801b94c: f7ff fcd2 bl 801b2f4 <icmp_input>
break;
801b950: e01c b.n 801b98c <ip4_input+0x248>
} else
#endif /* LWIP_RAW */
{
#if LWIP_ICMP
/* send ICMP destination protocol unreachable unless is was a broadcast */
if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
801b952: 4b1a ldr r3, [pc, #104] ; (801b9bc <ip4_input+0x278>)
801b954: 695b ldr r3, [r3, #20]
801b956: 69b9 ldr r1, [r7, #24]
801b958: 4618 mov r0, r3
801b95a: f000 f90b bl 801bb74 <ip4_addr_isbroadcast_u32>
801b95e: 4603 mov r3, r0
801b960: 2b00 cmp r3, #0
801b962: d10f bne.n 801b984 <ip4_input+0x240>
!ip4_addr_ismulticast(ip4_current_dest_addr())) {
801b964: 4b15 ldr r3, [pc, #84] ; (801b9bc <ip4_input+0x278>)
801b966: 695b ldr r3, [r3, #20]
801b968: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
801b96c: 2be0 cmp r3, #224 ; 0xe0
801b96e: d009 beq.n 801b984 <ip4_input+0x240>
pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */
801b970: f9b7 3012 ldrsh.w r3, [r7, #18]
801b974: 4619 mov r1, r3
801b976: 6878 ldr r0, [r7, #4]
801b978: f7f6 fc7b bl 8012272 <pbuf_header_force>
icmp_dest_unreach(p, ICMP_DUR_PROTO);
801b97c: 2102 movs r1, #2
801b97e: 6878 ldr r0, [r7, #4]
801b980: f7ff fdbc bl 801b4fc <icmp_dest_unreach>
IP_STATS_INC(ip.proterr);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinunknownprotos);
}
pbuf_free(p);
801b984: 6878 ldr r0, [r7, #4]
801b986: f7f6 fc87 bl 8012298 <pbuf_free>
break;
801b98a: bf00 nop
}
}
/* @todo: this is not really necessary... */
ip_data.current_netif = NULL;
801b98c: 4b0b ldr r3, [pc, #44] ; (801b9bc <ip4_input+0x278>)
801b98e: 2200 movs r2, #0
801b990: 601a str r2, [r3, #0]
ip_data.current_input_netif = NULL;
801b992: 4b0a ldr r3, [pc, #40] ; (801b9bc <ip4_input+0x278>)
801b994: 2200 movs r2, #0
801b996: 605a str r2, [r3, #4]
ip_data.current_ip4_header = NULL;
801b998: 4b08 ldr r3, [pc, #32] ; (801b9bc <ip4_input+0x278>)
801b99a: 2200 movs r2, #0
801b99c: 609a str r2, [r3, #8]
ip_data.current_ip_header_tot_len = 0;
801b99e: 4b07 ldr r3, [pc, #28] ; (801b9bc <ip4_input+0x278>)
801b9a0: 2200 movs r2, #0
801b9a2: 819a strh r2, [r3, #12]
ip4_addr_set_any(ip4_current_src_addr());
801b9a4: 4b05 ldr r3, [pc, #20] ; (801b9bc <ip4_input+0x278>)
801b9a6: 2200 movs r2, #0
801b9a8: 611a str r2, [r3, #16]
ip4_addr_set_any(ip4_current_dest_addr());
801b9aa: 4b04 ldr r3, [pc, #16] ; (801b9bc <ip4_input+0x278>)
801b9ac: 2200 movs r2, #0
801b9ae: 615a str r2, [r3, #20]
return ERR_OK;
801b9b0: 2300 movs r3, #0
}
801b9b2: 4618 mov r0, r3
801b9b4: 3720 adds r7, #32
801b9b6: 46bd mov sp, r7
801b9b8: bd80 pop {r7, pc}
801b9ba: bf00 nop
801b9bc: 2000c0c8 .word 0x2000c0c8
801b9c0: 2000f7ec .word 0x2000f7ec
0801b9c4 <ip4_output_if>:
*/
err_t
ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest,
u8_t ttl, u8_t tos,
u8_t proto, struct netif *netif)
{
801b9c4: b580 push {r7, lr}
801b9c6: b08a sub sp, #40 ; 0x28
801b9c8: af04 add r7, sp, #16
801b9ca: 60f8 str r0, [r7, #12]
801b9cc: 60b9 str r1, [r7, #8]
801b9ce: 607a str r2, [r7, #4]
801b9d0: 70fb strb r3, [r7, #3]
ip4_output_if_opt(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest,
u8_t ttl, u8_t tos, u8_t proto, struct netif *netif, void *ip_options,
u16_t optlen)
{
#endif /* IP_OPTIONS_SEND */
const ip4_addr_t *src_used = src;
801b9d2: 68bb ldr r3, [r7, #8]
801b9d4: 617b str r3, [r7, #20]
if (dest != LWIP_IP_HDRINCL) {
801b9d6: 687b ldr r3, [r7, #4]
801b9d8: 2b00 cmp r3, #0
801b9da: d009 beq.n 801b9f0 <ip4_output_if+0x2c>
if (ip4_addr_isany(src)) {
801b9dc: 68bb ldr r3, [r7, #8]
801b9de: 2b00 cmp r3, #0
801b9e0: d003 beq.n 801b9ea <ip4_output_if+0x26>
801b9e2: 68bb ldr r3, [r7, #8]
801b9e4: 681b ldr r3, [r3, #0]
801b9e6: 2b00 cmp r3, #0
801b9e8: d102 bne.n 801b9f0 <ip4_output_if+0x2c>
src_used = netif_ip4_addr(netif);
801b9ea: 6abb ldr r3, [r7, #40] ; 0x28
801b9ec: 3304 adds r3, #4
801b9ee: 617b str r3, [r7, #20]
#if IP_OPTIONS_SEND
return ip4_output_if_opt_src(p, src_used, dest, ttl, tos, proto, netif,
ip_options, optlen);
#else /* IP_OPTIONS_SEND */
return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif);
801b9f0: 78fa ldrb r2, [r7, #3]
801b9f2: 6abb ldr r3, [r7, #40] ; 0x28
801b9f4: 9302 str r3, [sp, #8]
801b9f6: f897 3024 ldrb.w r3, [r7, #36] ; 0x24
801b9fa: 9301 str r3, [sp, #4]
801b9fc: f897 3020 ldrb.w r3, [r7, #32]
801ba00: 9300 str r3, [sp, #0]
801ba02: 4613 mov r3, r2
801ba04: 687a ldr r2, [r7, #4]
801ba06: 6979 ldr r1, [r7, #20]
801ba08: 68f8 ldr r0, [r7, #12]
801ba0a: f000 f805 bl 801ba18 <ip4_output_if_src>
801ba0e: 4603 mov r3, r0
#endif /* IP_OPTIONS_SEND */
}
801ba10: 4618 mov r0, r3
801ba12: 3718 adds r7, #24
801ba14: 46bd mov sp, r7
801ba16: bd80 pop {r7, pc}
0801ba18 <ip4_output_if_src>:
*/
err_t
ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest,
u8_t ttl, u8_t tos,
u8_t proto, struct netif *netif)
{
801ba18: b580 push {r7, lr}
801ba1a: b088 sub sp, #32
801ba1c: af00 add r7, sp, #0
801ba1e: 60f8 str r0, [r7, #12]
801ba20: 60b9 str r1, [r7, #8]
801ba22: 607a str r2, [r7, #4]
801ba24: 70fb strb r3, [r7, #3]
#if CHECKSUM_GEN_IP_INLINE
u32_t chk_sum = 0;
#endif /* CHECKSUM_GEN_IP_INLINE */
LWIP_ASSERT_CORE_LOCKED();
LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p);
801ba26: 68fb ldr r3, [r7, #12]
801ba28: 7b9b ldrb r3, [r3, #14]
801ba2a: 2b01 cmp r3, #1
801ba2c: d006 beq.n 801ba3c <ip4_output_if_src+0x24>
801ba2e: 4b4b ldr r3, [pc, #300] ; (801bb5c <ip4_output_if_src+0x144>)
801ba30: f44f 7255 mov.w r2, #852 ; 0x354
801ba34: 494a ldr r1, [pc, #296] ; (801bb60 <ip4_output_if_src+0x148>)
801ba36: 484b ldr r0, [pc, #300] ; (801bb64 <ip4_output_if_src+0x14c>)
801ba38: f001 f95e bl 801ccf8 <iprintf>
MIB2_STATS_INC(mib2.ipoutrequests);
/* Should the IP header be generated or is it already included in p? */
if (dest != LWIP_IP_HDRINCL) {
801ba3c: 687b ldr r3, [r7, #4]
801ba3e: 2b00 cmp r3, #0
801ba40: d060 beq.n 801bb04 <ip4_output_if_src+0xec>
u16_t ip_hlen = IP_HLEN;
801ba42: 2314 movs r3, #20
801ba44: 837b strh r3, [r7, #26]
}
#endif /* CHECKSUM_GEN_IP_INLINE */
}
#endif /* IP_OPTIONS_SEND */
/* generate IP header */
if (pbuf_add_header(p, IP_HLEN)) {
801ba46: 2114 movs r1, #20
801ba48: 68f8 ldr r0, [r7, #12]
801ba4a: f7f6 fb8f bl 801216c <pbuf_add_header>
801ba4e: 4603 mov r3, r0
801ba50: 2b00 cmp r3, #0
801ba52: d002 beq.n 801ba5a <ip4_output_if_src+0x42>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: not enough room for IP header in pbuf\n"));
IP_STATS_INC(ip.err);
MIB2_STATS_INC(mib2.ipoutdiscards);
return ERR_BUF;
801ba54: f06f 0301 mvn.w r3, #1
801ba58: e07c b.n 801bb54 <ip4_output_if_src+0x13c>
}
iphdr = (struct ip_hdr *)p->payload;
801ba5a: 68fb ldr r3, [r7, #12]
801ba5c: 685b ldr r3, [r3, #4]
801ba5e: 61fb str r3, [r7, #28]
LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
801ba60: 68fb ldr r3, [r7, #12]
801ba62: 895b ldrh r3, [r3, #10]
801ba64: 2b13 cmp r3, #19
801ba66: d806 bhi.n 801ba76 <ip4_output_if_src+0x5e>
801ba68: 4b3c ldr r3, [pc, #240] ; (801bb5c <ip4_output_if_src+0x144>)
801ba6a: f240 3289 movw r2, #905 ; 0x389
801ba6e: 493e ldr r1, [pc, #248] ; (801bb68 <ip4_output_if_src+0x150>)
801ba70: 483c ldr r0, [pc, #240] ; (801bb64 <ip4_output_if_src+0x14c>)
801ba72: f001 f941 bl 801ccf8 <iprintf>
(p->len >= sizeof(struct ip_hdr)));
IPH_TTL_SET(iphdr, ttl);
801ba76: 69fb ldr r3, [r7, #28]
801ba78: 78fa ldrb r2, [r7, #3]
801ba7a: 721a strb r2, [r3, #8]
IPH_PROTO_SET(iphdr, proto);
801ba7c: 69fb ldr r3, [r7, #28]
801ba7e: f897 202c ldrb.w r2, [r7, #44] ; 0x2c
801ba82: 725a strb r2, [r3, #9]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += PP_NTOHS(proto | (ttl << 8));
#endif /* CHECKSUM_GEN_IP_INLINE */
/* dest cannot be NULL here */
ip4_addr_copy(iphdr->dest, *dest);
801ba84: 687b ldr r3, [r7, #4]
801ba86: 681a ldr r2, [r3, #0]
801ba88: 69fb ldr r3, [r7, #28]
801ba8a: 611a str r2, [r3, #16]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += ip4_addr_get_u32(&iphdr->dest) & 0xFFFF;
chk_sum += ip4_addr_get_u32(&iphdr->dest) >> 16;
#endif /* CHECKSUM_GEN_IP_INLINE */
IPH_VHL_SET(iphdr, 4, ip_hlen / 4);
801ba8c: 8b7b ldrh r3, [r7, #26]
801ba8e: 089b lsrs r3, r3, #2
801ba90: b29b uxth r3, r3
801ba92: b2db uxtb r3, r3
801ba94: f043 0340 orr.w r3, r3, #64 ; 0x40
801ba98: b2da uxtb r2, r3
801ba9a: 69fb ldr r3, [r7, #28]
801ba9c: 701a strb r2, [r3, #0]
IPH_TOS_SET(iphdr, tos);
801ba9e: 69fb ldr r3, [r7, #28]
801baa0: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
801baa4: 705a strb r2, [r3, #1]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += PP_NTOHS(tos | (iphdr->_v_hl << 8));
#endif /* CHECKSUM_GEN_IP_INLINE */
IPH_LEN_SET(iphdr, lwip_htons(p->tot_len));
801baa6: 68fb ldr r3, [r7, #12]
801baa8: 891b ldrh r3, [r3, #8]
801baaa: 4618 mov r0, r3
801baac: f7f5 f840 bl 8010b30 <lwip_htons>
801bab0: 4603 mov r3, r0
801bab2: 461a mov r2, r3
801bab4: 69fb ldr r3, [r7, #28]
801bab6: 805a strh r2, [r3, #2]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += iphdr->_len;
#endif /* CHECKSUM_GEN_IP_INLINE */
IPH_OFFSET_SET(iphdr, 0);
801bab8: 69fb ldr r3, [r7, #28]
801baba: 2200 movs r2, #0
801babc: 719a strb r2, [r3, #6]
801babe: 2200 movs r2, #0
801bac0: 71da strb r2, [r3, #7]
IPH_ID_SET(iphdr, lwip_htons(ip_id));
801bac2: 4b2a ldr r3, [pc, #168] ; (801bb6c <ip4_output_if_src+0x154>)
801bac4: 881b ldrh r3, [r3, #0]
801bac6: 4618 mov r0, r3
801bac8: f7f5 f832 bl 8010b30 <lwip_htons>
801bacc: 4603 mov r3, r0
801bace: 461a mov r2, r3
801bad0: 69fb ldr r3, [r7, #28]
801bad2: 809a strh r2, [r3, #4]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += iphdr->_id;
#endif /* CHECKSUM_GEN_IP_INLINE */
++ip_id;
801bad4: 4b25 ldr r3, [pc, #148] ; (801bb6c <ip4_output_if_src+0x154>)
801bad6: 881b ldrh r3, [r3, #0]
801bad8: 3301 adds r3, #1
801bada: b29a uxth r2, r3
801badc: 4b23 ldr r3, [pc, #140] ; (801bb6c <ip4_output_if_src+0x154>)
801bade: 801a strh r2, [r3, #0]
if (src == NULL) {
801bae0: 68bb ldr r3, [r7, #8]
801bae2: 2b00 cmp r3, #0
801bae4: d104 bne.n 801baf0 <ip4_output_if_src+0xd8>
ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
801bae6: 4b22 ldr r3, [pc, #136] ; (801bb70 <ip4_output_if_src+0x158>)
801bae8: 681a ldr r2, [r3, #0]
801baea: 69fb ldr r3, [r7, #28]
801baec: 60da str r2, [r3, #12]
801baee: e003 b.n 801baf8 <ip4_output_if_src+0xe0>
} else {
/* src cannot be NULL here */
ip4_addr_copy(iphdr->src, *src);
801baf0: 68bb ldr r3, [r7, #8]
801baf2: 681a ldr r2, [r3, #0]
801baf4: 69fb ldr r3, [r7, #28]
801baf6: 60da str r2, [r3, #12]
else {
IPH_CHKSUM_SET(iphdr, 0);
}
#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/
#else /* CHECKSUM_GEN_IP_INLINE */
IPH_CHKSUM_SET(iphdr, 0);
801baf8: 69fb ldr r3, [r7, #28]
801bafa: 2200 movs r2, #0
801bafc: 729a strb r2, [r3, #10]
801bafe: 2200 movs r2, #0
801bb00: 72da strb r2, [r3, #11]
801bb02: e00f b.n 801bb24 <ip4_output_if_src+0x10c>
}
#endif /* CHECKSUM_GEN_IP */
#endif /* CHECKSUM_GEN_IP_INLINE */
} else {
/* IP header already included in p */
if (p->len < IP_HLEN) {
801bb04: 68fb ldr r3, [r7, #12]
801bb06: 895b ldrh r3, [r3, #10]
801bb08: 2b13 cmp r3, #19
801bb0a: d802 bhi.n 801bb12 <ip4_output_if_src+0xfa>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: LWIP_IP_HDRINCL but pbuf is too short\n"));
IP_STATS_INC(ip.err);
MIB2_STATS_INC(mib2.ipoutdiscards);
return ERR_BUF;
801bb0c: f06f 0301 mvn.w r3, #1
801bb10: e020 b.n 801bb54 <ip4_output_if_src+0x13c>
}
iphdr = (struct ip_hdr *)p->payload;
801bb12: 68fb ldr r3, [r7, #12]
801bb14: 685b ldr r3, [r3, #4]
801bb16: 61fb str r3, [r7, #28]
ip4_addr_copy(dest_addr, iphdr->dest);
801bb18: 69fb ldr r3, [r7, #28]
801bb1a: 691b ldr r3, [r3, #16]
801bb1c: 617b str r3, [r7, #20]
dest = &dest_addr;
801bb1e: f107 0314 add.w r3, r7, #20
801bb22: 607b str r3, [r7, #4]
}
#endif /* LWIP_MULTICAST_TX_OPTIONS */
#endif /* ENABLE_LOOPBACK */
#if IP_FRAG
/* don't fragment if interface has mtu set to 0 [loopif] */
if (netif->mtu && (p->tot_len > netif->mtu)) {
801bb24: 6b3b ldr r3, [r7, #48] ; 0x30
801bb26: 8d1b ldrh r3, [r3, #40] ; 0x28
801bb28: 2b00 cmp r3, #0
801bb2a: d00c beq.n 801bb46 <ip4_output_if_src+0x12e>
801bb2c: 68fb ldr r3, [r7, #12]
801bb2e: 891a ldrh r2, [r3, #8]
801bb30: 6b3b ldr r3, [r7, #48] ; 0x30
801bb32: 8d1b ldrh r3, [r3, #40] ; 0x28
801bb34: 429a cmp r2, r3
801bb36: d906 bls.n 801bb46 <ip4_output_if_src+0x12e>
return ip4_frag(p, netif, dest);
801bb38: 687a ldr r2, [r7, #4]
801bb3a: 6b39 ldr r1, [r7, #48] ; 0x30
801bb3c: 68f8 ldr r0, [r7, #12]
801bb3e: f000 fd4b bl 801c5d8 <ip4_frag>
801bb42: 4603 mov r3, r0
801bb44: e006 b.n 801bb54 <ip4_output_if_src+0x13c>
}
#endif /* IP_FRAG */
LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
return netif->output(netif, p, dest);
801bb46: 6b3b ldr r3, [r7, #48] ; 0x30
801bb48: 695b ldr r3, [r3, #20]
801bb4a: 687a ldr r2, [r7, #4]
801bb4c: 68f9 ldr r1, [r7, #12]
801bb4e: 6b38 ldr r0, [r7, #48] ; 0x30
801bb50: 4798 blx r3
801bb52: 4603 mov r3, r0
}
801bb54: 4618 mov r0, r3
801bb56: 3720 adds r7, #32
801bb58: 46bd mov sp, r7
801bb5a: bd80 pop {r7, pc}
801bb5c: 08020ae8 .word 0x08020ae8
801bb60: 08020b1c .word 0x08020b1c
801bb64: 08020b28 .word 0x08020b28
801bb68: 08020b50 .word 0x08020b50
801bb6c: 2000886a .word 0x2000886a
801bb70: 08022ea8 .word 0x08022ea8
0801bb74 <ip4_addr_isbroadcast_u32>:
* @param netif the network interface against which the address is checked
* @return returns non-zero if the address is a broadcast address
*/
u8_t
ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif)
{
801bb74: b480 push {r7}
801bb76: b085 sub sp, #20
801bb78: af00 add r7, sp, #0
801bb7a: 6078 str r0, [r7, #4]
801bb7c: 6039 str r1, [r7, #0]
ip4_addr_t ipaddr;
ip4_addr_set_u32(&ipaddr, addr);
801bb7e: 687b ldr r3, [r7, #4]
801bb80: 60fb str r3, [r7, #12]
/* all ones (broadcast) or all zeroes (old skool broadcast) */
if ((~addr == IPADDR_ANY) ||
801bb82: 687b ldr r3, [r7, #4]
801bb84: f1b3 3fff cmp.w r3, #4294967295
801bb88: d002 beq.n 801bb90 <ip4_addr_isbroadcast_u32+0x1c>
801bb8a: 687b ldr r3, [r7, #4]
801bb8c: 2b00 cmp r3, #0
801bb8e: d101 bne.n 801bb94 <ip4_addr_isbroadcast_u32+0x20>
(addr == IPADDR_ANY)) {
return 1;
801bb90: 2301 movs r3, #1
801bb92: e02a b.n 801bbea <ip4_addr_isbroadcast_u32+0x76>
/* no broadcast support on this network interface? */
} else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) {
801bb94: 683b ldr r3, [r7, #0]
801bb96: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801bb9a: f003 0302 and.w r3, r3, #2
801bb9e: 2b00 cmp r3, #0
801bba0: d101 bne.n 801bba6 <ip4_addr_isbroadcast_u32+0x32>
/* the given address cannot be a broadcast address
* nor can we check against any broadcast addresses */
return 0;
801bba2: 2300 movs r3, #0
801bba4: e021 b.n 801bbea <ip4_addr_isbroadcast_u32+0x76>
/* address matches network interface address exactly? => no broadcast */
} else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) {
801bba6: 683b ldr r3, [r7, #0]
801bba8: 3304 adds r3, #4
801bbaa: 681b ldr r3, [r3, #0]
801bbac: 687a ldr r2, [r7, #4]
801bbae: 429a cmp r2, r3
801bbb0: d101 bne.n 801bbb6 <ip4_addr_isbroadcast_u32+0x42>
return 0;
801bbb2: 2300 movs r3, #0
801bbb4: e019 b.n 801bbea <ip4_addr_isbroadcast_u32+0x76>
/* on the same (sub) network... */
} else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif))
801bbb6: 68fa ldr r2, [r7, #12]
801bbb8: 683b ldr r3, [r7, #0]
801bbba: 3304 adds r3, #4
801bbbc: 681b ldr r3, [r3, #0]
801bbbe: 405a eors r2, r3
801bbc0: 683b ldr r3, [r7, #0]
801bbc2: 3308 adds r3, #8
801bbc4: 681b ldr r3, [r3, #0]
801bbc6: 4013 ands r3, r2
801bbc8: 2b00 cmp r3, #0
801bbca: d10d bne.n 801bbe8 <ip4_addr_isbroadcast_u32+0x74>
/* ...and host identifier bits are all ones? =>... */
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
801bbcc: 683b ldr r3, [r7, #0]
801bbce: 3308 adds r3, #8
801bbd0: 681b ldr r3, [r3, #0]
801bbd2: 43da mvns r2, r3
801bbd4: 687b ldr r3, [r7, #4]
801bbd6: 401a ands r2, r3
(IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) {
801bbd8: 683b ldr r3, [r7, #0]
801bbda: 3308 adds r3, #8
801bbdc: 681b ldr r3, [r3, #0]
801bbde: 43db mvns r3, r3
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
801bbe0: 429a cmp r2, r3
801bbe2: d101 bne.n 801bbe8 <ip4_addr_isbroadcast_u32+0x74>
/* => network broadcast address */
return 1;
801bbe4: 2301 movs r3, #1
801bbe6: e000 b.n 801bbea <ip4_addr_isbroadcast_u32+0x76>
} else {
return 0;
801bbe8: 2300 movs r3, #0
}
}
801bbea: 4618 mov r0, r3
801bbec: 3714 adds r7, #20
801bbee: 46bd mov sp, r7
801bbf0: f85d 7b04 ldr.w r7, [sp], #4
801bbf4: 4770 bx lr
...
0801bbf8 <ip_reass_tmr>:
*
* Should be called every 1000 msec (defined by IP_TMR_INTERVAL).
*/
void
ip_reass_tmr(void)
{
801bbf8: b580 push {r7, lr}
801bbfa: b084 sub sp, #16
801bbfc: af00 add r7, sp, #0
struct ip_reassdata *r, *prev = NULL;
801bbfe: 2300 movs r3, #0
801bc00: 60bb str r3, [r7, #8]
r = reassdatagrams;
801bc02: 4b12 ldr r3, [pc, #72] ; (801bc4c <ip_reass_tmr+0x54>)
801bc04: 681b ldr r3, [r3, #0]
801bc06: 60fb str r3, [r7, #12]
while (r != NULL) {
801bc08: e018 b.n 801bc3c <ip_reass_tmr+0x44>
/* Decrement the timer. Once it reaches 0,
* clean up the incomplete fragment assembly */
if (r->timer > 0) {
801bc0a: 68fb ldr r3, [r7, #12]
801bc0c: 7fdb ldrb r3, [r3, #31]
801bc0e: 2b00 cmp r3, #0
801bc10: d00b beq.n 801bc2a <ip_reass_tmr+0x32>
r->timer--;
801bc12: 68fb ldr r3, [r7, #12]
801bc14: 7fdb ldrb r3, [r3, #31]
801bc16: 3b01 subs r3, #1
801bc18: b2da uxtb r2, r3
801bc1a: 68fb ldr r3, [r7, #12]
801bc1c: 77da strb r2, [r3, #31]
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer));
prev = r;
801bc1e: 68fb ldr r3, [r7, #12]
801bc20: 60bb str r3, [r7, #8]
r = r->next;
801bc22: 68fb ldr r3, [r7, #12]
801bc24: 681b ldr r3, [r3, #0]
801bc26: 60fb str r3, [r7, #12]
801bc28: e008 b.n 801bc3c <ip_reass_tmr+0x44>
} else {
/* reassembly timed out */
struct ip_reassdata *tmp;
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n"));
tmp = r;
801bc2a: 68fb ldr r3, [r7, #12]
801bc2c: 607b str r3, [r7, #4]
/* get the next pointer before freeing */
r = r->next;
801bc2e: 68fb ldr r3, [r7, #12]
801bc30: 681b ldr r3, [r3, #0]
801bc32: 60fb str r3, [r7, #12]
/* free the helper struct and all enqueued pbufs */
ip_reass_free_complete_datagram(tmp, prev);
801bc34: 68b9 ldr r1, [r7, #8]
801bc36: 6878 ldr r0, [r7, #4]
801bc38: f000 f80a bl 801bc50 <ip_reass_free_complete_datagram>
while (r != NULL) {
801bc3c: 68fb ldr r3, [r7, #12]
801bc3e: 2b00 cmp r3, #0
801bc40: d1e3 bne.n 801bc0a <ip_reass_tmr+0x12>
}
}
}
801bc42: bf00 nop
801bc44: 3710 adds r7, #16
801bc46: 46bd mov sp, r7
801bc48: bd80 pop {r7, pc}
801bc4a: bf00 nop
801bc4c: 2000886c .word 0x2000886c
0801bc50 <ip_reass_free_complete_datagram>:
* @param prev the previous datagram in the linked list
* @return the number of pbufs freed
*/
static int
ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
{
801bc50: b580 push {r7, lr}
801bc52: b088 sub sp, #32
801bc54: af00 add r7, sp, #0
801bc56: 6078 str r0, [r7, #4]
801bc58: 6039 str r1, [r7, #0]
u16_t pbufs_freed = 0;
801bc5a: 2300 movs r3, #0
801bc5c: 83fb strh r3, [r7, #30]
u16_t clen;
struct pbuf *p;
struct ip_reass_helper *iprh;
LWIP_ASSERT("prev != ipr", prev != ipr);
801bc5e: 683a ldr r2, [r7, #0]
801bc60: 687b ldr r3, [r7, #4]
801bc62: 429a cmp r2, r3
801bc64: d105 bne.n 801bc72 <ip_reass_free_complete_datagram+0x22>
801bc66: 4b45 ldr r3, [pc, #276] ; (801bd7c <ip_reass_free_complete_datagram+0x12c>)
801bc68: 22ab movs r2, #171 ; 0xab
801bc6a: 4945 ldr r1, [pc, #276] ; (801bd80 <ip_reass_free_complete_datagram+0x130>)
801bc6c: 4845 ldr r0, [pc, #276] ; (801bd84 <ip_reass_free_complete_datagram+0x134>)
801bc6e: f001 f843 bl 801ccf8 <iprintf>
if (prev != NULL) {
801bc72: 683b ldr r3, [r7, #0]
801bc74: 2b00 cmp r3, #0
801bc76: d00a beq.n 801bc8e <ip_reass_free_complete_datagram+0x3e>
LWIP_ASSERT("prev->next == ipr", prev->next == ipr);
801bc78: 683b ldr r3, [r7, #0]
801bc7a: 681b ldr r3, [r3, #0]
801bc7c: 687a ldr r2, [r7, #4]
801bc7e: 429a cmp r2, r3
801bc80: d005 beq.n 801bc8e <ip_reass_free_complete_datagram+0x3e>
801bc82: 4b3e ldr r3, [pc, #248] ; (801bd7c <ip_reass_free_complete_datagram+0x12c>)
801bc84: 22ad movs r2, #173 ; 0xad
801bc86: 4940 ldr r1, [pc, #256] ; (801bd88 <ip_reass_free_complete_datagram+0x138>)
801bc88: 483e ldr r0, [pc, #248] ; (801bd84 <ip_reass_free_complete_datagram+0x134>)
801bc8a: f001 f835 bl 801ccf8 <iprintf>
}
MIB2_STATS_INC(mib2.ipreasmfails);
#if LWIP_ICMP
iprh = (struct ip_reass_helper *)ipr->p->payload;
801bc8e: 687b ldr r3, [r7, #4]
801bc90: 685b ldr r3, [r3, #4]
801bc92: 685b ldr r3, [r3, #4]
801bc94: 617b str r3, [r7, #20]
if (iprh->start == 0) {
801bc96: 697b ldr r3, [r7, #20]
801bc98: 889b ldrh r3, [r3, #4]
801bc9a: b29b uxth r3, r3
801bc9c: 2b00 cmp r3, #0
801bc9e: d12a bne.n 801bcf6 <ip_reass_free_complete_datagram+0xa6>
/* The first fragment was received, send ICMP time exceeded. */
/* First, de-queue the first pbuf from r->p. */
p = ipr->p;
801bca0: 687b ldr r3, [r7, #4]
801bca2: 685b ldr r3, [r3, #4]
801bca4: 61bb str r3, [r7, #24]
ipr->p = iprh->next_pbuf;
801bca6: 697b ldr r3, [r7, #20]
801bca8: 681a ldr r2, [r3, #0]
801bcaa: 687b ldr r3, [r7, #4]
801bcac: 605a str r2, [r3, #4]
/* Then, copy the original header into it. */
SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
801bcae: 69bb ldr r3, [r7, #24]
801bcb0: 6858 ldr r0, [r3, #4]
801bcb2: 687b ldr r3, [r7, #4]
801bcb4: 3308 adds r3, #8
801bcb6: 2214 movs r2, #20
801bcb8: 4619 mov r1, r3
801bcba: f000 fff0 bl 801cc9e <memcpy>
icmp_time_exceeded(p, ICMP_TE_FRAG);
801bcbe: 2101 movs r1, #1
801bcc0: 69b8 ldr r0, [r7, #24]
801bcc2: f7ff fc2b bl 801b51c <icmp_time_exceeded>
clen = pbuf_clen(p);
801bcc6: 69b8 ldr r0, [r7, #24]
801bcc8: f7f6 fb74 bl 80123b4 <pbuf_clen>
801bccc: 4603 mov r3, r0
801bcce: 827b strh r3, [r7, #18]
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
801bcd0: 8bfa ldrh r2, [r7, #30]
801bcd2: 8a7b ldrh r3, [r7, #18]
801bcd4: 4413 add r3, r2
801bcd6: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
801bcda: db05 blt.n 801bce8 <ip_reass_free_complete_datagram+0x98>
801bcdc: 4b27 ldr r3, [pc, #156] ; (801bd7c <ip_reass_free_complete_datagram+0x12c>)
801bcde: 22bc movs r2, #188 ; 0xbc
801bce0: 492a ldr r1, [pc, #168] ; (801bd8c <ip_reass_free_complete_datagram+0x13c>)
801bce2: 4828 ldr r0, [pc, #160] ; (801bd84 <ip_reass_free_complete_datagram+0x134>)
801bce4: f001 f808 bl 801ccf8 <iprintf>
pbufs_freed = (u16_t)(pbufs_freed + clen);
801bce8: 8bfa ldrh r2, [r7, #30]
801bcea: 8a7b ldrh r3, [r7, #18]
801bcec: 4413 add r3, r2
801bcee: 83fb strh r3, [r7, #30]
pbuf_free(p);
801bcf0: 69b8 ldr r0, [r7, #24]
801bcf2: f7f6 fad1 bl 8012298 <pbuf_free>
}
#endif /* LWIP_ICMP */
/* First, free all received pbufs. The individual pbufs need to be released
separately as they have not yet been chained */
p = ipr->p;
801bcf6: 687b ldr r3, [r7, #4]
801bcf8: 685b ldr r3, [r3, #4]
801bcfa: 61bb str r3, [r7, #24]
while (p != NULL) {
801bcfc: e01f b.n 801bd3e <ip_reass_free_complete_datagram+0xee>
struct pbuf *pcur;
iprh = (struct ip_reass_helper *)p->payload;
801bcfe: 69bb ldr r3, [r7, #24]
801bd00: 685b ldr r3, [r3, #4]
801bd02: 617b str r3, [r7, #20]
pcur = p;
801bd04: 69bb ldr r3, [r7, #24]
801bd06: 60fb str r3, [r7, #12]
/* get the next pointer before freeing */
p = iprh->next_pbuf;
801bd08: 697b ldr r3, [r7, #20]
801bd0a: 681b ldr r3, [r3, #0]
801bd0c: 61bb str r3, [r7, #24]
clen = pbuf_clen(pcur);
801bd0e: 68f8 ldr r0, [r7, #12]
801bd10: f7f6 fb50 bl 80123b4 <pbuf_clen>
801bd14: 4603 mov r3, r0
801bd16: 827b strh r3, [r7, #18]
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
801bd18: 8bfa ldrh r2, [r7, #30]
801bd1a: 8a7b ldrh r3, [r7, #18]
801bd1c: 4413 add r3, r2
801bd1e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
801bd22: db05 blt.n 801bd30 <ip_reass_free_complete_datagram+0xe0>
801bd24: 4b15 ldr r3, [pc, #84] ; (801bd7c <ip_reass_free_complete_datagram+0x12c>)
801bd26: 22cc movs r2, #204 ; 0xcc
801bd28: 4918 ldr r1, [pc, #96] ; (801bd8c <ip_reass_free_complete_datagram+0x13c>)
801bd2a: 4816 ldr r0, [pc, #88] ; (801bd84 <ip_reass_free_complete_datagram+0x134>)
801bd2c: f000 ffe4 bl 801ccf8 <iprintf>
pbufs_freed = (u16_t)(pbufs_freed + clen);
801bd30: 8bfa ldrh r2, [r7, #30]
801bd32: 8a7b ldrh r3, [r7, #18]
801bd34: 4413 add r3, r2
801bd36: 83fb strh r3, [r7, #30]
pbuf_free(pcur);
801bd38: 68f8 ldr r0, [r7, #12]
801bd3a: f7f6 faad bl 8012298 <pbuf_free>
while (p != NULL) {
801bd3e: 69bb ldr r3, [r7, #24]
801bd40: 2b00 cmp r3, #0
801bd42: d1dc bne.n 801bcfe <ip_reass_free_complete_datagram+0xae>
}
/* Then, unchain the struct ip_reassdata from the list and free it. */
ip_reass_dequeue_datagram(ipr, prev);
801bd44: 6839 ldr r1, [r7, #0]
801bd46: 6878 ldr r0, [r7, #4]
801bd48: f000 f8c2 bl 801bed0 <ip_reass_dequeue_datagram>
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
801bd4c: 4b10 ldr r3, [pc, #64] ; (801bd90 <ip_reass_free_complete_datagram+0x140>)
801bd4e: 881b ldrh r3, [r3, #0]
801bd50: 8bfa ldrh r2, [r7, #30]
801bd52: 429a cmp r2, r3
801bd54: d905 bls.n 801bd62 <ip_reass_free_complete_datagram+0x112>
801bd56: 4b09 ldr r3, [pc, #36] ; (801bd7c <ip_reass_free_complete_datagram+0x12c>)
801bd58: 22d2 movs r2, #210 ; 0xd2
801bd5a: 490e ldr r1, [pc, #56] ; (801bd94 <ip_reass_free_complete_datagram+0x144>)
801bd5c: 4809 ldr r0, [pc, #36] ; (801bd84 <ip_reass_free_complete_datagram+0x134>)
801bd5e: f000 ffcb bl 801ccf8 <iprintf>
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
801bd62: 4b0b ldr r3, [pc, #44] ; (801bd90 <ip_reass_free_complete_datagram+0x140>)
801bd64: 881a ldrh r2, [r3, #0]
801bd66: 8bfb ldrh r3, [r7, #30]
801bd68: 1ad3 subs r3, r2, r3
801bd6a: b29a uxth r2, r3
801bd6c: 4b08 ldr r3, [pc, #32] ; (801bd90 <ip_reass_free_complete_datagram+0x140>)
801bd6e: 801a strh r2, [r3, #0]
return pbufs_freed;
801bd70: 8bfb ldrh r3, [r7, #30]
}
801bd72: 4618 mov r0, r3
801bd74: 3720 adds r7, #32
801bd76: 46bd mov sp, r7
801bd78: bd80 pop {r7, pc}
801bd7a: bf00 nop
801bd7c: 08020b80 .word 0x08020b80
801bd80: 08020bbc .word 0x08020bbc
801bd84: 08020bc8 .word 0x08020bc8
801bd88: 08020bf0 .word 0x08020bf0
801bd8c: 08020c04 .word 0x08020c04
801bd90: 20008870 .word 0x20008870
801bd94: 08020c24 .word 0x08020c24
0801bd98 <ip_reass_remove_oldest_datagram>:
* (used for freeing other datagrams if not enough space)
* @return the number of pbufs freed
*/
static int
ip_reass_remove_oldest_datagram(struct ip_hdr *fraghdr, int pbufs_needed)
{
801bd98: b580 push {r7, lr}
801bd9a: b08a sub sp, #40 ; 0x28
801bd9c: af00 add r7, sp, #0
801bd9e: 6078 str r0, [r7, #4]
801bda0: 6039 str r1, [r7, #0]
/* @todo Can't we simply remove the last datagram in the
* linked list behind reassdatagrams?
*/
struct ip_reassdata *r, *oldest, *prev, *oldest_prev;
int pbufs_freed = 0, pbufs_freed_current;
801bda2: 2300 movs r3, #0
801bda4: 617b str r3, [r7, #20]
int other_datagrams;
/* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs,
* but don't free the datagram that 'fraghdr' belongs to! */
do {
oldest = NULL;
801bda6: 2300 movs r3, #0
801bda8: 623b str r3, [r7, #32]
prev = NULL;
801bdaa: 2300 movs r3, #0
801bdac: 61fb str r3, [r7, #28]
oldest_prev = NULL;
801bdae: 2300 movs r3, #0
801bdb0: 61bb str r3, [r7, #24]
other_datagrams = 0;
801bdb2: 2300 movs r3, #0
801bdb4: 613b str r3, [r7, #16]
r = reassdatagrams;
801bdb6: 4b28 ldr r3, [pc, #160] ; (801be58 <ip_reass_remove_oldest_datagram+0xc0>)
801bdb8: 681b ldr r3, [r3, #0]
801bdba: 627b str r3, [r7, #36] ; 0x24
while (r != NULL) {
801bdbc: e030 b.n 801be20 <ip_reass_remove_oldest_datagram+0x88>
if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
801bdbe: 6a7b ldr r3, [r7, #36] ; 0x24
801bdc0: 695a ldr r2, [r3, #20]
801bdc2: 687b ldr r3, [r7, #4]
801bdc4: 68db ldr r3, [r3, #12]
801bdc6: 429a cmp r2, r3
801bdc8: d10c bne.n 801bde4 <ip_reass_remove_oldest_datagram+0x4c>
801bdca: 6a7b ldr r3, [r7, #36] ; 0x24
801bdcc: 699a ldr r2, [r3, #24]
801bdce: 687b ldr r3, [r7, #4]
801bdd0: 691b ldr r3, [r3, #16]
801bdd2: 429a cmp r2, r3
801bdd4: d106 bne.n 801bde4 <ip_reass_remove_oldest_datagram+0x4c>
801bdd6: 6a7b ldr r3, [r7, #36] ; 0x24
801bdd8: 899a ldrh r2, [r3, #12]
801bdda: 687b ldr r3, [r7, #4]
801bddc: 889b ldrh r3, [r3, #4]
801bdde: b29b uxth r3, r3
801bde0: 429a cmp r2, r3
801bde2: d014 beq.n 801be0e <ip_reass_remove_oldest_datagram+0x76>
/* Not the same datagram as fraghdr */
other_datagrams++;
801bde4: 693b ldr r3, [r7, #16]
801bde6: 3301 adds r3, #1
801bde8: 613b str r3, [r7, #16]
if (oldest == NULL) {
801bdea: 6a3b ldr r3, [r7, #32]
801bdec: 2b00 cmp r3, #0
801bdee: d104 bne.n 801bdfa <ip_reass_remove_oldest_datagram+0x62>
oldest = r;
801bdf0: 6a7b ldr r3, [r7, #36] ; 0x24
801bdf2: 623b str r3, [r7, #32]
oldest_prev = prev;
801bdf4: 69fb ldr r3, [r7, #28]
801bdf6: 61bb str r3, [r7, #24]
801bdf8: e009 b.n 801be0e <ip_reass_remove_oldest_datagram+0x76>
} else if (r->timer <= oldest->timer) {
801bdfa: 6a7b ldr r3, [r7, #36] ; 0x24
801bdfc: 7fda ldrb r2, [r3, #31]
801bdfe: 6a3b ldr r3, [r7, #32]
801be00: 7fdb ldrb r3, [r3, #31]
801be02: 429a cmp r2, r3
801be04: d803 bhi.n 801be0e <ip_reass_remove_oldest_datagram+0x76>
/* older than the previous oldest */
oldest = r;
801be06: 6a7b ldr r3, [r7, #36] ; 0x24
801be08: 623b str r3, [r7, #32]
oldest_prev = prev;
801be0a: 69fb ldr r3, [r7, #28]
801be0c: 61bb str r3, [r7, #24]
}
}
if (r->next != NULL) {
801be0e: 6a7b ldr r3, [r7, #36] ; 0x24
801be10: 681b ldr r3, [r3, #0]
801be12: 2b00 cmp r3, #0
801be14: d001 beq.n 801be1a <ip_reass_remove_oldest_datagram+0x82>
prev = r;
801be16: 6a7b ldr r3, [r7, #36] ; 0x24
801be18: 61fb str r3, [r7, #28]
}
r = r->next;
801be1a: 6a7b ldr r3, [r7, #36] ; 0x24
801be1c: 681b ldr r3, [r3, #0]
801be1e: 627b str r3, [r7, #36] ; 0x24
while (r != NULL) {
801be20: 6a7b ldr r3, [r7, #36] ; 0x24
801be22: 2b00 cmp r3, #0
801be24: d1cb bne.n 801bdbe <ip_reass_remove_oldest_datagram+0x26>
}
if (oldest != NULL) {
801be26: 6a3b ldr r3, [r7, #32]
801be28: 2b00 cmp r3, #0
801be2a: d008 beq.n 801be3e <ip_reass_remove_oldest_datagram+0xa6>
pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev);
801be2c: 69b9 ldr r1, [r7, #24]
801be2e: 6a38 ldr r0, [r7, #32]
801be30: f7ff ff0e bl 801bc50 <ip_reass_free_complete_datagram>
801be34: 60f8 str r0, [r7, #12]
pbufs_freed += pbufs_freed_current;
801be36: 697a ldr r2, [r7, #20]
801be38: 68fb ldr r3, [r7, #12]
801be3a: 4413 add r3, r2
801be3c: 617b str r3, [r7, #20]
}
} while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1));
801be3e: 697a ldr r2, [r7, #20]
801be40: 683b ldr r3, [r7, #0]
801be42: 429a cmp r2, r3
801be44: da02 bge.n 801be4c <ip_reass_remove_oldest_datagram+0xb4>
801be46: 693b ldr r3, [r7, #16]
801be48: 2b01 cmp r3, #1
801be4a: dcac bgt.n 801bda6 <ip_reass_remove_oldest_datagram+0xe>
return pbufs_freed;
801be4c: 697b ldr r3, [r7, #20]
}
801be4e: 4618 mov r0, r3
801be50: 3728 adds r7, #40 ; 0x28
801be52: 46bd mov sp, r7
801be54: bd80 pop {r7, pc}
801be56: bf00 nop
801be58: 2000886c .word 0x2000886c
0801be5c <ip_reass_enqueue_new_datagram>:
* @param clen number of pbufs needed to enqueue (used for freeing other datagrams if not enough space)
* @return A pointer to the queue location into which the fragment was enqueued
*/
static struct ip_reassdata *
ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen)
{
801be5c: b580 push {r7, lr}
801be5e: b084 sub sp, #16
801be60: af00 add r7, sp, #0
801be62: 6078 str r0, [r7, #4]
801be64: 6039 str r1, [r7, #0]
#if ! IP_REASS_FREE_OLDEST
LWIP_UNUSED_ARG(clen);
#endif
/* No matching previous fragment found, allocate a new reassdata struct */
ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
801be66: 2004 movs r0, #4
801be68: f7f5 fb18 bl 801149c <memp_malloc>
801be6c: 60f8 str r0, [r7, #12]
if (ipr == NULL) {
801be6e: 68fb ldr r3, [r7, #12]
801be70: 2b00 cmp r3, #0
801be72: d110 bne.n 801be96 <ip_reass_enqueue_new_datagram+0x3a>
#if IP_REASS_FREE_OLDEST
if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) {
801be74: 6839 ldr r1, [r7, #0]
801be76: 6878 ldr r0, [r7, #4]
801be78: f7ff ff8e bl 801bd98 <ip_reass_remove_oldest_datagram>
801be7c: 4602 mov r2, r0
801be7e: 683b ldr r3, [r7, #0]
801be80: 4293 cmp r3, r2
801be82: dc03 bgt.n 801be8c <ip_reass_enqueue_new_datagram+0x30>
ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
801be84: 2004 movs r0, #4
801be86: f7f5 fb09 bl 801149c <memp_malloc>
801be8a: 60f8 str r0, [r7, #12]
}
if (ipr == NULL)
801be8c: 68fb ldr r3, [r7, #12]
801be8e: 2b00 cmp r3, #0
801be90: d101 bne.n 801be96 <ip_reass_enqueue_new_datagram+0x3a>
#endif /* IP_REASS_FREE_OLDEST */
{
IPFRAG_STATS_INC(ip_frag.memerr);
LWIP_DEBUGF(IP_REASS_DEBUG, ("Failed to alloc reassdata struct\n"));
return NULL;
801be92: 2300 movs r3, #0
801be94: e016 b.n 801bec4 <ip_reass_enqueue_new_datagram+0x68>
}
}
memset(ipr, 0, sizeof(struct ip_reassdata));
801be96: 2220 movs r2, #32
801be98: 2100 movs r1, #0
801be9a: 68f8 ldr r0, [r7, #12]
801be9c: f000 ff23 bl 801cce6 <memset>
ipr->timer = IP_REASS_MAXAGE;
801bea0: 68fb ldr r3, [r7, #12]
801bea2: 220f movs r2, #15
801bea4: 77da strb r2, [r3, #31]
/* enqueue the new structure to the front of the list */
ipr->next = reassdatagrams;
801bea6: 4b09 ldr r3, [pc, #36] ; (801becc <ip_reass_enqueue_new_datagram+0x70>)
801bea8: 681a ldr r2, [r3, #0]
801beaa: 68fb ldr r3, [r7, #12]
801beac: 601a str r2, [r3, #0]
reassdatagrams = ipr;
801beae: 4a07 ldr r2, [pc, #28] ; (801becc <ip_reass_enqueue_new_datagram+0x70>)
801beb0: 68fb ldr r3, [r7, #12]
801beb2: 6013 str r3, [r2, #0]
/* copy the ip header for later tests and input */
/* @todo: no ip options supported? */
SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN);
801beb4: 68fb ldr r3, [r7, #12]
801beb6: 3308 adds r3, #8
801beb8: 2214 movs r2, #20
801beba: 6879 ldr r1, [r7, #4]
801bebc: 4618 mov r0, r3
801bebe: f000 feee bl 801cc9e <memcpy>
return ipr;
801bec2: 68fb ldr r3, [r7, #12]
}
801bec4: 4618 mov r0, r3
801bec6: 3710 adds r7, #16
801bec8: 46bd mov sp, r7
801beca: bd80 pop {r7, pc}
801becc: 2000886c .word 0x2000886c
0801bed0 <ip_reass_dequeue_datagram>:
* Dequeues a datagram from the datagram queue. Doesn't deallocate the pbufs.
* @param ipr points to the queue entry to dequeue
*/
static void
ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
{
801bed0: b580 push {r7, lr}
801bed2: b082 sub sp, #8
801bed4: af00 add r7, sp, #0
801bed6: 6078 str r0, [r7, #4]
801bed8: 6039 str r1, [r7, #0]
/* dequeue the reass struct */
if (reassdatagrams == ipr) {
801beda: 4b10 ldr r3, [pc, #64] ; (801bf1c <ip_reass_dequeue_datagram+0x4c>)
801bedc: 681b ldr r3, [r3, #0]
801bede: 687a ldr r2, [r7, #4]
801bee0: 429a cmp r2, r3
801bee2: d104 bne.n 801beee <ip_reass_dequeue_datagram+0x1e>
/* it was the first in the list */
reassdatagrams = ipr->next;
801bee4: 687b ldr r3, [r7, #4]
801bee6: 681b ldr r3, [r3, #0]
801bee8: 4a0c ldr r2, [pc, #48] ; (801bf1c <ip_reass_dequeue_datagram+0x4c>)
801beea: 6013 str r3, [r2, #0]
801beec: e00d b.n 801bf0a <ip_reass_dequeue_datagram+0x3a>
} else {
/* it wasn't the first, so it must have a valid 'prev' */
LWIP_ASSERT("sanity check linked list", prev != NULL);
801beee: 683b ldr r3, [r7, #0]
801bef0: 2b00 cmp r3, #0
801bef2: d106 bne.n 801bf02 <ip_reass_dequeue_datagram+0x32>
801bef4: 4b0a ldr r3, [pc, #40] ; (801bf20 <ip_reass_dequeue_datagram+0x50>)
801bef6: f240 1245 movw r2, #325 ; 0x145
801befa: 490a ldr r1, [pc, #40] ; (801bf24 <ip_reass_dequeue_datagram+0x54>)
801befc: 480a ldr r0, [pc, #40] ; (801bf28 <ip_reass_dequeue_datagram+0x58>)
801befe: f000 fefb bl 801ccf8 <iprintf>
prev->next = ipr->next;
801bf02: 687b ldr r3, [r7, #4]
801bf04: 681a ldr r2, [r3, #0]
801bf06: 683b ldr r3, [r7, #0]
801bf08: 601a str r2, [r3, #0]
}
/* now we can free the ip_reassdata struct */
memp_free(MEMP_REASSDATA, ipr);
801bf0a: 6879 ldr r1, [r7, #4]
801bf0c: 2004 movs r0, #4
801bf0e: f7f5 fb17 bl 8011540 <memp_free>
}
801bf12: bf00 nop
801bf14: 3708 adds r7, #8
801bf16: 46bd mov sp, r7
801bf18: bd80 pop {r7, pc}
801bf1a: bf00 nop
801bf1c: 2000886c .word 0x2000886c
801bf20: 08020b80 .word 0x08020b80
801bf24: 08020c48 .word 0x08020c48
801bf28: 08020bc8 .word 0x08020bc8
0801bf2c <ip_reass_chain_frag_into_datagram_and_validate>:
* @param is_last is 1 if this pbuf has MF==0 (ipr->flags not updated yet)
* @return see IP_REASS_VALIDATE_* defines
*/
static int
ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct pbuf *new_p, int is_last)
{
801bf2c: b580 push {r7, lr}
801bf2e: b08c sub sp, #48 ; 0x30
801bf30: af00 add r7, sp, #0
801bf32: 60f8 str r0, [r7, #12]
801bf34: 60b9 str r1, [r7, #8]
801bf36: 607a str r2, [r7, #4]
struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL;
801bf38: 2300 movs r3, #0
801bf3a: 62bb str r3, [r7, #40] ; 0x28
struct pbuf *q;
u16_t offset, len;
u8_t hlen;
struct ip_hdr *fraghdr;
int valid = 1;
801bf3c: 2301 movs r3, #1
801bf3e: 623b str r3, [r7, #32]
/* Extract length and fragment offset from current fragment */
fraghdr = (struct ip_hdr *)new_p->payload;
801bf40: 68bb ldr r3, [r7, #8]
801bf42: 685b ldr r3, [r3, #4]
801bf44: 61fb str r3, [r7, #28]
len = lwip_ntohs(IPH_LEN(fraghdr));
801bf46: 69fb ldr r3, [r7, #28]
801bf48: 885b ldrh r3, [r3, #2]
801bf4a: b29b uxth r3, r3
801bf4c: 4618 mov r0, r3
801bf4e: f7f4 fdef bl 8010b30 <lwip_htons>
801bf52: 4603 mov r3, r0
801bf54: 837b strh r3, [r7, #26]
hlen = IPH_HL_BYTES(fraghdr);
801bf56: 69fb ldr r3, [r7, #28]
801bf58: 781b ldrb r3, [r3, #0]
801bf5a: f003 030f and.w r3, r3, #15
801bf5e: b2db uxtb r3, r3
801bf60: 009b lsls r3, r3, #2
801bf62: 767b strb r3, [r7, #25]
if (hlen > len) {
801bf64: 7e7b ldrb r3, [r7, #25]
801bf66: b29b uxth r3, r3
801bf68: 8b7a ldrh r2, [r7, #26]
801bf6a: 429a cmp r2, r3
801bf6c: d202 bcs.n 801bf74 <ip_reass_chain_frag_into_datagram_and_validate+0x48>
/* invalid datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801bf6e: f04f 33ff mov.w r3, #4294967295
801bf72: e135 b.n 801c1e0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
len = (u16_t)(len - hlen);
801bf74: 7e7b ldrb r3, [r7, #25]
801bf76: b29b uxth r3, r3
801bf78: 8b7a ldrh r2, [r7, #26]
801bf7a: 1ad3 subs r3, r2, r3
801bf7c: 837b strh r3, [r7, #26]
offset = IPH_OFFSET_BYTES(fraghdr);
801bf7e: 69fb ldr r3, [r7, #28]
801bf80: 88db ldrh r3, [r3, #6]
801bf82: b29b uxth r3, r3
801bf84: 4618 mov r0, r3
801bf86: f7f4 fdd3 bl 8010b30 <lwip_htons>
801bf8a: 4603 mov r3, r0
801bf8c: f3c3 030c ubfx r3, r3, #0, #13
801bf90: b29b uxth r3, r3
801bf92: 00db lsls r3, r3, #3
801bf94: 82fb strh r3, [r7, #22]
/* overwrite the fragment's ip header from the pbuf with our helper struct,
* and setup the embedded helper structure. */
/* make sure the struct ip_reass_helper fits into the IP header */
LWIP_ASSERT("sizeof(struct ip_reass_helper) <= IP_HLEN",
sizeof(struct ip_reass_helper) <= IP_HLEN);
iprh = (struct ip_reass_helper *)new_p->payload;
801bf96: 68bb ldr r3, [r7, #8]
801bf98: 685b ldr r3, [r3, #4]
801bf9a: 62fb str r3, [r7, #44] ; 0x2c
iprh->next_pbuf = NULL;
801bf9c: 6afb ldr r3, [r7, #44] ; 0x2c
801bf9e: 2200 movs r2, #0
801bfa0: 701a strb r2, [r3, #0]
801bfa2: 2200 movs r2, #0
801bfa4: 705a strb r2, [r3, #1]
801bfa6: 2200 movs r2, #0
801bfa8: 709a strb r2, [r3, #2]
801bfaa: 2200 movs r2, #0
801bfac: 70da strb r2, [r3, #3]
iprh->start = offset;
801bfae: 6afb ldr r3, [r7, #44] ; 0x2c
801bfb0: 8afa ldrh r2, [r7, #22]
801bfb2: 809a strh r2, [r3, #4]
iprh->end = (u16_t)(offset + len);
801bfb4: 8afa ldrh r2, [r7, #22]
801bfb6: 8b7b ldrh r3, [r7, #26]
801bfb8: 4413 add r3, r2
801bfba: b29a uxth r2, r3
801bfbc: 6afb ldr r3, [r7, #44] ; 0x2c
801bfbe: 80da strh r2, [r3, #6]
if (iprh->end < offset) {
801bfc0: 6afb ldr r3, [r7, #44] ; 0x2c
801bfc2: 88db ldrh r3, [r3, #6]
801bfc4: b29b uxth r3, r3
801bfc6: 8afa ldrh r2, [r7, #22]
801bfc8: 429a cmp r2, r3
801bfca: d902 bls.n 801bfd2 <ip_reass_chain_frag_into_datagram_and_validate+0xa6>
/* u16_t overflow, cannot handle this */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801bfcc: f04f 33ff mov.w r3, #4294967295
801bfd0: e106 b.n 801c1e0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
/* Iterate through until we either get to the end of the list (append),
* or we find one with a larger offset (insert). */
for (q = ipr->p; q != NULL;) {
801bfd2: 68fb ldr r3, [r7, #12]
801bfd4: 685b ldr r3, [r3, #4]
801bfd6: 627b str r3, [r7, #36] ; 0x24
801bfd8: e068 b.n 801c0ac <ip_reass_chain_frag_into_datagram_and_validate+0x180>
iprh_tmp = (struct ip_reass_helper *)q->payload;
801bfda: 6a7b ldr r3, [r7, #36] ; 0x24
801bfdc: 685b ldr r3, [r3, #4]
801bfde: 613b str r3, [r7, #16]
if (iprh->start < iprh_tmp->start) {
801bfe0: 6afb ldr r3, [r7, #44] ; 0x2c
801bfe2: 889b ldrh r3, [r3, #4]
801bfe4: b29a uxth r2, r3
801bfe6: 693b ldr r3, [r7, #16]
801bfe8: 889b ldrh r3, [r3, #4]
801bfea: b29b uxth r3, r3
801bfec: 429a cmp r2, r3
801bfee: d235 bcs.n 801c05c <ip_reass_chain_frag_into_datagram_and_validate+0x130>
/* the new pbuf should be inserted before this */
iprh->next_pbuf = q;
801bff0: 6afb ldr r3, [r7, #44] ; 0x2c
801bff2: 6a7a ldr r2, [r7, #36] ; 0x24
801bff4: 601a str r2, [r3, #0]
if (iprh_prev != NULL) {
801bff6: 6abb ldr r3, [r7, #40] ; 0x28
801bff8: 2b00 cmp r3, #0
801bffa: d020 beq.n 801c03e <ip_reass_chain_frag_into_datagram_and_validate+0x112>
/* not the fragment with the lowest offset */
#if IP_REASS_CHECK_OVERLAP
if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) {
801bffc: 6afb ldr r3, [r7, #44] ; 0x2c
801bffe: 889b ldrh r3, [r3, #4]
801c000: b29a uxth r2, r3
801c002: 6abb ldr r3, [r7, #40] ; 0x28
801c004: 88db ldrh r3, [r3, #6]
801c006: b29b uxth r3, r3
801c008: 429a cmp r2, r3
801c00a: d307 bcc.n 801c01c <ip_reass_chain_frag_into_datagram_and_validate+0xf0>
801c00c: 6afb ldr r3, [r7, #44] ; 0x2c
801c00e: 88db ldrh r3, [r3, #6]
801c010: b29a uxth r2, r3
801c012: 693b ldr r3, [r7, #16]
801c014: 889b ldrh r3, [r3, #4]
801c016: b29b uxth r3, r3
801c018: 429a cmp r2, r3
801c01a: d902 bls.n 801c022 <ip_reass_chain_frag_into_datagram_and_validate+0xf6>
/* fragment overlaps with previous or following, throw away */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801c01c: f04f 33ff mov.w r3, #4294967295
801c020: e0de b.n 801c1e0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
801c022: 6abb ldr r3, [r7, #40] ; 0x28
801c024: 68ba ldr r2, [r7, #8]
801c026: 601a str r2, [r3, #0]
if (iprh_prev->end != iprh->start) {
801c028: 6abb ldr r3, [r7, #40] ; 0x28
801c02a: 88db ldrh r3, [r3, #6]
801c02c: b29a uxth r2, r3
801c02e: 6afb ldr r3, [r7, #44] ; 0x2c
801c030: 889b ldrh r3, [r3, #4]
801c032: b29b uxth r3, r3
801c034: 429a cmp r2, r3
801c036: d03d beq.n 801c0b4 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
801c038: 2300 movs r3, #0
801c03a: 623b str r3, [r7, #32]
}
#endif /* IP_REASS_CHECK_OVERLAP */
/* fragment with the lowest offset */
ipr->p = new_p;
}
break;
801c03c: e03a b.n 801c0b4 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
if (iprh->end > iprh_tmp->start) {
801c03e: 6afb ldr r3, [r7, #44] ; 0x2c
801c040: 88db ldrh r3, [r3, #6]
801c042: b29a uxth r2, r3
801c044: 693b ldr r3, [r7, #16]
801c046: 889b ldrh r3, [r3, #4]
801c048: b29b uxth r3, r3
801c04a: 429a cmp r2, r3
801c04c: d902 bls.n 801c054 <ip_reass_chain_frag_into_datagram_and_validate+0x128>
return IP_REASS_VALIDATE_PBUF_DROPPED;
801c04e: f04f 33ff mov.w r3, #4294967295
801c052: e0c5 b.n 801c1e0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
ipr->p = new_p;
801c054: 68fb ldr r3, [r7, #12]
801c056: 68ba ldr r2, [r7, #8]
801c058: 605a str r2, [r3, #4]
break;
801c05a: e02b b.n 801c0b4 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
} else if (iprh->start == iprh_tmp->start) {
801c05c: 6afb ldr r3, [r7, #44] ; 0x2c
801c05e: 889b ldrh r3, [r3, #4]
801c060: b29a uxth r2, r3
801c062: 693b ldr r3, [r7, #16]
801c064: 889b ldrh r3, [r3, #4]
801c066: b29b uxth r3, r3
801c068: 429a cmp r2, r3
801c06a: d102 bne.n 801c072 <ip_reass_chain_frag_into_datagram_and_validate+0x146>
/* received the same datagram twice: no need to keep the datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801c06c: f04f 33ff mov.w r3, #4294967295
801c070: e0b6 b.n 801c1e0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
#if IP_REASS_CHECK_OVERLAP
} else if (iprh->start < iprh_tmp->end) {
801c072: 6afb ldr r3, [r7, #44] ; 0x2c
801c074: 889b ldrh r3, [r3, #4]
801c076: b29a uxth r2, r3
801c078: 693b ldr r3, [r7, #16]
801c07a: 88db ldrh r3, [r3, #6]
801c07c: b29b uxth r3, r3
801c07e: 429a cmp r2, r3
801c080: d202 bcs.n 801c088 <ip_reass_chain_frag_into_datagram_and_validate+0x15c>
/* overlap: no need to keep the new datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801c082: f04f 33ff mov.w r3, #4294967295
801c086: e0ab b.n 801c1e0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
#endif /* IP_REASS_CHECK_OVERLAP */
} else {
/* Check if the fragments received so far have no holes. */
if (iprh_prev != NULL) {
801c088: 6abb ldr r3, [r7, #40] ; 0x28
801c08a: 2b00 cmp r3, #0
801c08c: d009 beq.n 801c0a2 <ip_reass_chain_frag_into_datagram_and_validate+0x176>
if (iprh_prev->end != iprh_tmp->start) {
801c08e: 6abb ldr r3, [r7, #40] ; 0x28
801c090: 88db ldrh r3, [r3, #6]
801c092: b29a uxth r2, r3
801c094: 693b ldr r3, [r7, #16]
801c096: 889b ldrh r3, [r3, #4]
801c098: b29b uxth r3, r3
801c09a: 429a cmp r2, r3
801c09c: d001 beq.n 801c0a2 <ip_reass_chain_frag_into_datagram_and_validate+0x176>
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
801c09e: 2300 movs r3, #0
801c0a0: 623b str r3, [r7, #32]
}
}
}
q = iprh_tmp->next_pbuf;
801c0a2: 693b ldr r3, [r7, #16]
801c0a4: 681b ldr r3, [r3, #0]
801c0a6: 627b str r3, [r7, #36] ; 0x24
iprh_prev = iprh_tmp;
801c0a8: 693b ldr r3, [r7, #16]
801c0aa: 62bb str r3, [r7, #40] ; 0x28
for (q = ipr->p; q != NULL;) {
801c0ac: 6a7b ldr r3, [r7, #36] ; 0x24
801c0ae: 2b00 cmp r3, #0
801c0b0: d193 bne.n 801bfda <ip_reass_chain_frag_into_datagram_and_validate+0xae>
801c0b2: e000 b.n 801c0b6 <ip_reass_chain_frag_into_datagram_and_validate+0x18a>
break;
801c0b4: bf00 nop
}
/* If q is NULL, then we made it to the end of the list. Determine what to do now */
if (q == NULL) {
801c0b6: 6a7b ldr r3, [r7, #36] ; 0x24
801c0b8: 2b00 cmp r3, #0
801c0ba: d12d bne.n 801c118 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
if (iprh_prev != NULL) {
801c0bc: 6abb ldr r3, [r7, #40] ; 0x28
801c0be: 2b00 cmp r3, #0
801c0c0: d01c beq.n 801c0fc <ip_reass_chain_frag_into_datagram_and_validate+0x1d0>
/* this is (for now), the fragment with the highest offset:
* chain it to the last fragment */
#if IP_REASS_CHECK_OVERLAP
LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start);
801c0c2: 6abb ldr r3, [r7, #40] ; 0x28
801c0c4: 88db ldrh r3, [r3, #6]
801c0c6: b29a uxth r2, r3
801c0c8: 6afb ldr r3, [r7, #44] ; 0x2c
801c0ca: 889b ldrh r3, [r3, #4]
801c0cc: b29b uxth r3, r3
801c0ce: 429a cmp r2, r3
801c0d0: d906 bls.n 801c0e0 <ip_reass_chain_frag_into_datagram_and_validate+0x1b4>
801c0d2: 4b45 ldr r3, [pc, #276] ; (801c1e8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801c0d4: f44f 72db mov.w r2, #438 ; 0x1b6
801c0d8: 4944 ldr r1, [pc, #272] ; (801c1ec <ip_reass_chain_frag_into_datagram_and_validate+0x2c0>)
801c0da: 4845 ldr r0, [pc, #276] ; (801c1f0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801c0dc: f000 fe0c bl 801ccf8 <iprintf>
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
801c0e0: 6abb ldr r3, [r7, #40] ; 0x28
801c0e2: 68ba ldr r2, [r7, #8]
801c0e4: 601a str r2, [r3, #0]
if (iprh_prev->end != iprh->start) {
801c0e6: 6abb ldr r3, [r7, #40] ; 0x28
801c0e8: 88db ldrh r3, [r3, #6]
801c0ea: b29a uxth r2, r3
801c0ec: 6afb ldr r3, [r7, #44] ; 0x2c
801c0ee: 889b ldrh r3, [r3, #4]
801c0f0: b29b uxth r3, r3
801c0f2: 429a cmp r2, r3
801c0f4: d010 beq.n 801c118 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
valid = 0;
801c0f6: 2300 movs r3, #0
801c0f8: 623b str r3, [r7, #32]
801c0fa: e00d b.n 801c118 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
}
} else {
#if IP_REASS_CHECK_OVERLAP
LWIP_ASSERT("no previous fragment, this must be the first fragment!",
801c0fc: 68fb ldr r3, [r7, #12]
801c0fe: 685b ldr r3, [r3, #4]
801c100: 2b00 cmp r3, #0
801c102: d006 beq.n 801c112 <ip_reass_chain_frag_into_datagram_and_validate+0x1e6>
801c104: 4b38 ldr r3, [pc, #224] ; (801c1e8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801c106: f240 12bf movw r2, #447 ; 0x1bf
801c10a: 493a ldr r1, [pc, #232] ; (801c1f4 <ip_reass_chain_frag_into_datagram_and_validate+0x2c8>)
801c10c: 4838 ldr r0, [pc, #224] ; (801c1f0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801c10e: f000 fdf3 bl 801ccf8 <iprintf>
ipr->p == NULL);
#endif /* IP_REASS_CHECK_OVERLAP */
/* this is the first fragment we ever received for this ip datagram */
ipr->p = new_p;
801c112: 68fb ldr r3, [r7, #12]
801c114: 68ba ldr r2, [r7, #8]
801c116: 605a str r2, [r3, #4]
}
}
/* At this point, the validation part begins: */
/* If we already received the last fragment */
if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) {
801c118: 687b ldr r3, [r7, #4]
801c11a: 2b00 cmp r3, #0
801c11c: d105 bne.n 801c12a <ip_reass_chain_frag_into_datagram_and_validate+0x1fe>
801c11e: 68fb ldr r3, [r7, #12]
801c120: 7f9b ldrb r3, [r3, #30]
801c122: f003 0301 and.w r3, r3, #1
801c126: 2b00 cmp r3, #0
801c128: d059 beq.n 801c1de <ip_reass_chain_frag_into_datagram_and_validate+0x2b2>
/* and had no holes so far */
if (valid) {
801c12a: 6a3b ldr r3, [r7, #32]
801c12c: 2b00 cmp r3, #0
801c12e: d04f beq.n 801c1d0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
/* then check if the rest of the fragments is here */
/* Check if the queue starts with the first datagram */
if ((ipr->p == NULL) || (((struct ip_reass_helper *)ipr->p->payload)->start != 0)) {
801c130: 68fb ldr r3, [r7, #12]
801c132: 685b ldr r3, [r3, #4]
801c134: 2b00 cmp r3, #0
801c136: d006 beq.n 801c146 <ip_reass_chain_frag_into_datagram_and_validate+0x21a>
801c138: 68fb ldr r3, [r7, #12]
801c13a: 685b ldr r3, [r3, #4]
801c13c: 685b ldr r3, [r3, #4]
801c13e: 889b ldrh r3, [r3, #4]
801c140: b29b uxth r3, r3
801c142: 2b00 cmp r3, #0
801c144: d002 beq.n 801c14c <ip_reass_chain_frag_into_datagram_and_validate+0x220>
valid = 0;
801c146: 2300 movs r3, #0
801c148: 623b str r3, [r7, #32]
801c14a: e041 b.n 801c1d0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
} else {
/* and check that there are no holes after this datagram */
iprh_prev = iprh;
801c14c: 6afb ldr r3, [r7, #44] ; 0x2c
801c14e: 62bb str r3, [r7, #40] ; 0x28
q = iprh->next_pbuf;
801c150: 6afb ldr r3, [r7, #44] ; 0x2c
801c152: 681b ldr r3, [r3, #0]
801c154: 627b str r3, [r7, #36] ; 0x24
while (q != NULL) {
801c156: e012 b.n 801c17e <ip_reass_chain_frag_into_datagram_and_validate+0x252>
iprh = (struct ip_reass_helper *)q->payload;
801c158: 6a7b ldr r3, [r7, #36] ; 0x24
801c15a: 685b ldr r3, [r3, #4]
801c15c: 62fb str r3, [r7, #44] ; 0x2c
if (iprh_prev->end != iprh->start) {
801c15e: 6abb ldr r3, [r7, #40] ; 0x28
801c160: 88db ldrh r3, [r3, #6]
801c162: b29a uxth r2, r3
801c164: 6afb ldr r3, [r7, #44] ; 0x2c
801c166: 889b ldrh r3, [r3, #4]
801c168: b29b uxth r3, r3
801c16a: 429a cmp r2, r3
801c16c: d002 beq.n 801c174 <ip_reass_chain_frag_into_datagram_and_validate+0x248>
valid = 0;
801c16e: 2300 movs r3, #0
801c170: 623b str r3, [r7, #32]
break;
801c172: e007 b.n 801c184 <ip_reass_chain_frag_into_datagram_and_validate+0x258>
}
iprh_prev = iprh;
801c174: 6afb ldr r3, [r7, #44] ; 0x2c
801c176: 62bb str r3, [r7, #40] ; 0x28
q = iprh->next_pbuf;
801c178: 6afb ldr r3, [r7, #44] ; 0x2c
801c17a: 681b ldr r3, [r3, #0]
801c17c: 627b str r3, [r7, #36] ; 0x24
while (q != NULL) {
801c17e: 6a7b ldr r3, [r7, #36] ; 0x24
801c180: 2b00 cmp r3, #0
801c182: d1e9 bne.n 801c158 <ip_reass_chain_frag_into_datagram_and_validate+0x22c>
}
/* if still valid, all fragments are received
* (because to the MF==0 already arrived */
if (valid) {
801c184: 6a3b ldr r3, [r7, #32]
801c186: 2b00 cmp r3, #0
801c188: d022 beq.n 801c1d0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
LWIP_ASSERT("sanity check", ipr->p != NULL);
801c18a: 68fb ldr r3, [r7, #12]
801c18c: 685b ldr r3, [r3, #4]
801c18e: 2b00 cmp r3, #0
801c190: d106 bne.n 801c1a0 <ip_reass_chain_frag_into_datagram_and_validate+0x274>
801c192: 4b15 ldr r3, [pc, #84] ; (801c1e8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801c194: f240 12df movw r2, #479 ; 0x1df
801c198: 4917 ldr r1, [pc, #92] ; (801c1f8 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
801c19a: 4815 ldr r0, [pc, #84] ; (801c1f0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801c19c: f000 fdac bl 801ccf8 <iprintf>
LWIP_ASSERT("sanity check",
801c1a0: 68fb ldr r3, [r7, #12]
801c1a2: 685b ldr r3, [r3, #4]
801c1a4: 685b ldr r3, [r3, #4]
801c1a6: 6afa ldr r2, [r7, #44] ; 0x2c
801c1a8: 429a cmp r2, r3
801c1aa: d106 bne.n 801c1ba <ip_reass_chain_frag_into_datagram_and_validate+0x28e>
801c1ac: 4b0e ldr r3, [pc, #56] ; (801c1e8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801c1ae: f240 12e1 movw r2, #481 ; 0x1e1
801c1b2: 4911 ldr r1, [pc, #68] ; (801c1f8 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
801c1b4: 480e ldr r0, [pc, #56] ; (801c1f0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801c1b6: f000 fd9f bl 801ccf8 <iprintf>
((struct ip_reass_helper *)ipr->p->payload) != iprh);
LWIP_ASSERT("validate_datagram:next_pbuf!=NULL",
801c1ba: 6afb ldr r3, [r7, #44] ; 0x2c
801c1bc: 681b ldr r3, [r3, #0]
801c1be: 2b00 cmp r3, #0
801c1c0: d006 beq.n 801c1d0 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
801c1c2: 4b09 ldr r3, [pc, #36] ; (801c1e8 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801c1c4: f240 12e3 movw r2, #483 ; 0x1e3
801c1c8: 490c ldr r1, [pc, #48] ; (801c1fc <ip_reass_chain_frag_into_datagram_and_validate+0x2d0>)
801c1ca: 4809 ldr r0, [pc, #36] ; (801c1f0 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801c1cc: f000 fd94 bl 801ccf8 <iprintf>
}
}
/* If valid is 0 here, there are some fragments missing in the middle
* (since MF == 0 has already arrived). Such datagrams simply time out if
* no more fragments are received... */
return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED;
801c1d0: 6a3b ldr r3, [r7, #32]
801c1d2: 2b00 cmp r3, #0
801c1d4: bf14 ite ne
801c1d6: 2301 movne r3, #1
801c1d8: 2300 moveq r3, #0
801c1da: b2db uxtb r3, r3
801c1dc: e000 b.n 801c1e0 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
/* If we come here, not all fragments were received, yet! */
return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */
801c1de: 2300 movs r3, #0
}
801c1e0: 4618 mov r0, r3
801c1e2: 3730 adds r7, #48 ; 0x30
801c1e4: 46bd mov sp, r7
801c1e6: bd80 pop {r7, pc}
801c1e8: 08020b80 .word 0x08020b80
801c1ec: 08020c64 .word 0x08020c64
801c1f0: 08020bc8 .word 0x08020bc8
801c1f4: 08020c84 .word 0x08020c84
801c1f8: 08020cbc .word 0x08020cbc
801c1fc: 08020ccc .word 0x08020ccc
0801c200 <ip4_reass>:
* @param p points to a pbuf chain of the fragment
* @return NULL if reassembly is incomplete, ? otherwise
*/
struct pbuf *
ip4_reass(struct pbuf *p)
{
801c200: b580 push {r7, lr}
801c202: b08e sub sp, #56 ; 0x38
801c204: af00 add r7, sp, #0
801c206: 6078 str r0, [r7, #4]
int is_last;
IPFRAG_STATS_INC(ip_frag.recv);
MIB2_STATS_INC(mib2.ipreasmreqds);
fraghdr = (struct ip_hdr *)p->payload;
801c208: 687b ldr r3, [r7, #4]
801c20a: 685b ldr r3, [r3, #4]
801c20c: 62bb str r3, [r7, #40] ; 0x28
if (IPH_HL_BYTES(fraghdr) != IP_HLEN) {
801c20e: 6abb ldr r3, [r7, #40] ; 0x28
801c210: 781b ldrb r3, [r3, #0]
801c212: f003 030f and.w r3, r3, #15
801c216: b2db uxtb r3, r3
801c218: 009b lsls r3, r3, #2
801c21a: b2db uxtb r3, r3
801c21c: 2b14 cmp r3, #20
801c21e: f040 8167 bne.w 801c4f0 <ip4_reass+0x2f0>
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: IP options currently not supported!\n"));
IPFRAG_STATS_INC(ip_frag.err);
goto nullreturn;
}
offset = IPH_OFFSET_BYTES(fraghdr);
801c222: 6abb ldr r3, [r7, #40] ; 0x28
801c224: 88db ldrh r3, [r3, #6]
801c226: b29b uxth r3, r3
801c228: 4618 mov r0, r3
801c22a: f7f4 fc81 bl 8010b30 <lwip_htons>
801c22e: 4603 mov r3, r0
801c230: f3c3 030c ubfx r3, r3, #0, #13
801c234: b29b uxth r3, r3
801c236: 00db lsls r3, r3, #3
801c238: 84fb strh r3, [r7, #38] ; 0x26
len = lwip_ntohs(IPH_LEN(fraghdr));
801c23a: 6abb ldr r3, [r7, #40] ; 0x28
801c23c: 885b ldrh r3, [r3, #2]
801c23e: b29b uxth r3, r3
801c240: 4618 mov r0, r3
801c242: f7f4 fc75 bl 8010b30 <lwip_htons>
801c246: 4603 mov r3, r0
801c248: 84bb strh r3, [r7, #36] ; 0x24
hlen = IPH_HL_BYTES(fraghdr);
801c24a: 6abb ldr r3, [r7, #40] ; 0x28
801c24c: 781b ldrb r3, [r3, #0]
801c24e: f003 030f and.w r3, r3, #15
801c252: b2db uxtb r3, r3
801c254: 009b lsls r3, r3, #2
801c256: f887 3023 strb.w r3, [r7, #35] ; 0x23
if (hlen > len) {
801c25a: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
801c25e: b29b uxth r3, r3
801c260: 8cba ldrh r2, [r7, #36] ; 0x24
801c262: 429a cmp r2, r3
801c264: f0c0 8146 bcc.w 801c4f4 <ip4_reass+0x2f4>
/* invalid datagram */
goto nullreturn;
}
len = (u16_t)(len - hlen);
801c268: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
801c26c: b29b uxth r3, r3
801c26e: 8cba ldrh r2, [r7, #36] ; 0x24
801c270: 1ad3 subs r3, r2, r3
801c272: 84bb strh r3, [r7, #36] ; 0x24
/* Check if we are allowed to enqueue more datagrams. */
clen = pbuf_clen(p);
801c274: 6878 ldr r0, [r7, #4]
801c276: f7f6 f89d bl 80123b4 <pbuf_clen>
801c27a: 4603 mov r3, r0
801c27c: 843b strh r3, [r7, #32]
if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) {
801c27e: 4ba3 ldr r3, [pc, #652] ; (801c50c <ip4_reass+0x30c>)
801c280: 881b ldrh r3, [r3, #0]
801c282: 461a mov r2, r3
801c284: 8c3b ldrh r3, [r7, #32]
801c286: 4413 add r3, r2
801c288: 2b0a cmp r3, #10
801c28a: dd10 ble.n 801c2ae <ip4_reass+0xae>
#if IP_REASS_FREE_OLDEST
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
801c28c: 8c3b ldrh r3, [r7, #32]
801c28e: 4619 mov r1, r3
801c290: 6ab8 ldr r0, [r7, #40] ; 0x28
801c292: f7ff fd81 bl 801bd98 <ip_reass_remove_oldest_datagram>
801c296: 4603 mov r3, r0
801c298: 2b00 cmp r3, #0
801c29a: f000 812d beq.w 801c4f8 <ip4_reass+0x2f8>
((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS))
801c29e: 4b9b ldr r3, [pc, #620] ; (801c50c <ip4_reass+0x30c>)
801c2a0: 881b ldrh r3, [r3, #0]
801c2a2: 461a mov r2, r3
801c2a4: 8c3b ldrh r3, [r7, #32]
801c2a6: 4413 add r3, r2
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
801c2a8: 2b0a cmp r3, #10
801c2aa: f300 8125 bgt.w 801c4f8 <ip4_reass+0x2f8>
}
}
/* Look for the datagram the fragment belongs to in the current datagram queue,
* remembering the previous in the queue for later dequeueing. */
for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
801c2ae: 4b98 ldr r3, [pc, #608] ; (801c510 <ip4_reass+0x310>)
801c2b0: 681b ldr r3, [r3, #0]
801c2b2: 633b str r3, [r7, #48] ; 0x30
801c2b4: e015 b.n 801c2e2 <ip4_reass+0xe2>
/* Check if the incoming fragment matches the one currently present
in the reassembly buffer. If so, we proceed with copying the
fragment into the buffer. */
if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) {
801c2b6: 6b3b ldr r3, [r7, #48] ; 0x30
801c2b8: 695a ldr r2, [r3, #20]
801c2ba: 6abb ldr r3, [r7, #40] ; 0x28
801c2bc: 68db ldr r3, [r3, #12]
801c2be: 429a cmp r2, r3
801c2c0: d10c bne.n 801c2dc <ip4_reass+0xdc>
801c2c2: 6b3b ldr r3, [r7, #48] ; 0x30
801c2c4: 699a ldr r2, [r3, #24]
801c2c6: 6abb ldr r3, [r7, #40] ; 0x28
801c2c8: 691b ldr r3, [r3, #16]
801c2ca: 429a cmp r2, r3
801c2cc: d106 bne.n 801c2dc <ip4_reass+0xdc>
801c2ce: 6b3b ldr r3, [r7, #48] ; 0x30
801c2d0: 899a ldrh r2, [r3, #12]
801c2d2: 6abb ldr r3, [r7, #40] ; 0x28
801c2d4: 889b ldrh r3, [r3, #4]
801c2d6: b29b uxth r3, r3
801c2d8: 429a cmp r2, r3
801c2da: d006 beq.n 801c2ea <ip4_reass+0xea>
for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
801c2dc: 6b3b ldr r3, [r7, #48] ; 0x30
801c2de: 681b ldr r3, [r3, #0]
801c2e0: 633b str r3, [r7, #48] ; 0x30
801c2e2: 6b3b ldr r3, [r7, #48] ; 0x30
801c2e4: 2b00 cmp r3, #0
801c2e6: d1e6 bne.n 801c2b6 <ip4_reass+0xb6>
801c2e8: e000 b.n 801c2ec <ip4_reass+0xec>
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: matching previous fragment ID=%"X16_F"\n",
lwip_ntohs(IPH_ID(fraghdr))));
IPFRAG_STATS_INC(ip_frag.cachehit);
break;
801c2ea: bf00 nop
}
}
if (ipr == NULL) {
801c2ec: 6b3b ldr r3, [r7, #48] ; 0x30
801c2ee: 2b00 cmp r3, #0
801c2f0: d109 bne.n 801c306 <ip4_reass+0x106>
/* Enqueue a new datagram into the datagram queue */
ipr = ip_reass_enqueue_new_datagram(fraghdr, clen);
801c2f2: 8c3b ldrh r3, [r7, #32]
801c2f4: 4619 mov r1, r3
801c2f6: 6ab8 ldr r0, [r7, #40] ; 0x28
801c2f8: f7ff fdb0 bl 801be5c <ip_reass_enqueue_new_datagram>
801c2fc: 6338 str r0, [r7, #48] ; 0x30
/* Bail if unable to enqueue */
if (ipr == NULL) {
801c2fe: 6b3b ldr r3, [r7, #48] ; 0x30
801c300: 2b00 cmp r3, #0
801c302: d11c bne.n 801c33e <ip4_reass+0x13e>
goto nullreturn;
801c304: e0f9 b.n 801c4fa <ip4_reass+0x2fa>
}
} else {
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
801c306: 6abb ldr r3, [r7, #40] ; 0x28
801c308: 88db ldrh r3, [r3, #6]
801c30a: b29b uxth r3, r3
801c30c: 4618 mov r0, r3
801c30e: f7f4 fc0f bl 8010b30 <lwip_htons>
801c312: 4603 mov r3, r0
801c314: f3c3 030c ubfx r3, r3, #0, #13
801c318: 2b00 cmp r3, #0
801c31a: d110 bne.n 801c33e <ip4_reass+0x13e>
((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) {
801c31c: 6b3b ldr r3, [r7, #48] ; 0x30
801c31e: 89db ldrh r3, [r3, #14]
801c320: 4618 mov r0, r3
801c322: f7f4 fc05 bl 8010b30 <lwip_htons>
801c326: 4603 mov r3, r0
801c328: f3c3 030c ubfx r3, r3, #0, #13
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
801c32c: 2b00 cmp r3, #0
801c32e: d006 beq.n 801c33e <ip4_reass+0x13e>
/* ipr->iphdr is not the header from the first fragment, but fraghdr is
* -> copy fraghdr into ipr->iphdr since we want to have the header
* of the first fragment (for ICMP time exceeded and later, for copying
* all options, if supported)*/
SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN);
801c330: 6b3b ldr r3, [r7, #48] ; 0x30
801c332: 3308 adds r3, #8
801c334: 2214 movs r2, #20
801c336: 6ab9 ldr r1, [r7, #40] ; 0x28
801c338: 4618 mov r0, r3
801c33a: f000 fcb0 bl 801cc9e <memcpy>
/* At this point, we have either created a new entry or pointing
* to an existing one */
/* check for 'no more fragments', and update queue entry*/
is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0;
801c33e: 6abb ldr r3, [r7, #40] ; 0x28
801c340: 88db ldrh r3, [r3, #6]
801c342: b29b uxth r3, r3
801c344: f003 0320 and.w r3, r3, #32
801c348: 2b00 cmp r3, #0
801c34a: bf0c ite eq
801c34c: 2301 moveq r3, #1
801c34e: 2300 movne r3, #0
801c350: b2db uxtb r3, r3
801c352: 61fb str r3, [r7, #28]
if (is_last) {
801c354: 69fb ldr r3, [r7, #28]
801c356: 2b00 cmp r3, #0
801c358: d00e beq.n 801c378 <ip4_reass+0x178>
u16_t datagram_len = (u16_t)(offset + len);
801c35a: 8cfa ldrh r2, [r7, #38] ; 0x26
801c35c: 8cbb ldrh r3, [r7, #36] ; 0x24
801c35e: 4413 add r3, r2
801c360: 837b strh r3, [r7, #26]
if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) {
801c362: 8b7a ldrh r2, [r7, #26]
801c364: 8cfb ldrh r3, [r7, #38] ; 0x26
801c366: 429a cmp r2, r3
801c368: f0c0 80a0 bcc.w 801c4ac <ip4_reass+0x2ac>
801c36c: 8b7b ldrh r3, [r7, #26]
801c36e: f64f 72eb movw r2, #65515 ; 0xffeb
801c372: 4293 cmp r3, r2
801c374: f200 809a bhi.w 801c4ac <ip4_reass+0x2ac>
goto nullreturn_ipr;
}
}
/* find the right place to insert this pbuf */
/* @todo: trim pbufs if fragments are overlapping */
valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last);
801c378: 69fa ldr r2, [r7, #28]
801c37a: 6879 ldr r1, [r7, #4]
801c37c: 6b38 ldr r0, [r7, #48] ; 0x30
801c37e: f7ff fdd5 bl 801bf2c <ip_reass_chain_frag_into_datagram_and_validate>
801c382: 6178 str r0, [r7, #20]
if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) {
801c384: 697b ldr r3, [r7, #20]
801c386: f1b3 3fff cmp.w r3, #4294967295
801c38a: f000 8091 beq.w 801c4b0 <ip4_reass+0x2b0>
/* if we come here, the pbuf has been enqueued */
/* Track the current number of pbufs current 'in-flight', in order to limit
the number of fragments that may be enqueued at any one time
(overflow checked by testing against IP_REASS_MAX_PBUFS) */
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen);
801c38e: 4b5f ldr r3, [pc, #380] ; (801c50c <ip4_reass+0x30c>)
801c390: 881a ldrh r2, [r3, #0]
801c392: 8c3b ldrh r3, [r7, #32]
801c394: 4413 add r3, r2
801c396: b29a uxth r2, r3
801c398: 4b5c ldr r3, [pc, #368] ; (801c50c <ip4_reass+0x30c>)
801c39a: 801a strh r2, [r3, #0]
if (is_last) {
801c39c: 69fb ldr r3, [r7, #28]
801c39e: 2b00 cmp r3, #0
801c3a0: d00d beq.n 801c3be <ip4_reass+0x1be>
u16_t datagram_len = (u16_t)(offset + len);
801c3a2: 8cfa ldrh r2, [r7, #38] ; 0x26
801c3a4: 8cbb ldrh r3, [r7, #36] ; 0x24
801c3a6: 4413 add r3, r2
801c3a8: 827b strh r3, [r7, #18]
ipr->datagram_len = datagram_len;
801c3aa: 6b3b ldr r3, [r7, #48] ; 0x30
801c3ac: 8a7a ldrh r2, [r7, #18]
801c3ae: 839a strh r2, [r3, #28]
ipr->flags |= IP_REASS_FLAG_LASTFRAG;
801c3b0: 6b3b ldr r3, [r7, #48] ; 0x30
801c3b2: 7f9b ldrb r3, [r3, #30]
801c3b4: f043 0301 orr.w r3, r3, #1
801c3b8: b2da uxtb r2, r3
801c3ba: 6b3b ldr r3, [r7, #48] ; 0x30
801c3bc: 779a strb r2, [r3, #30]
LWIP_DEBUGF(IP_REASS_DEBUG,
("ip4_reass: last fragment seen, total len %"S16_F"\n",
ipr->datagram_len));
}
if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) {
801c3be: 697b ldr r3, [r7, #20]
801c3c0: 2b01 cmp r3, #1
801c3c2: d171 bne.n 801c4a8 <ip4_reass+0x2a8>
struct ip_reassdata *ipr_prev;
/* the totally last fragment (flag more fragments = 0) was received at least
* once AND all fragments are received */
u16_t datagram_len = (u16_t)(ipr->datagram_len + IP_HLEN);
801c3c4: 6b3b ldr r3, [r7, #48] ; 0x30
801c3c6: 8b9b ldrh r3, [r3, #28]
801c3c8: 3314 adds r3, #20
801c3ca: 823b strh r3, [r7, #16]
/* save the second pbuf before copying the header over the pointer */
r = ((struct ip_reass_helper *)ipr->p->payload)->next_pbuf;
801c3cc: 6b3b ldr r3, [r7, #48] ; 0x30
801c3ce: 685b ldr r3, [r3, #4]
801c3d0: 685b ldr r3, [r3, #4]
801c3d2: 681b ldr r3, [r3, #0]
801c3d4: 637b str r3, [r7, #52] ; 0x34
/* copy the original ip header back to the first pbuf */
fraghdr = (struct ip_hdr *)(ipr->p->payload);
801c3d6: 6b3b ldr r3, [r7, #48] ; 0x30
801c3d8: 685b ldr r3, [r3, #4]
801c3da: 685b ldr r3, [r3, #4]
801c3dc: 62bb str r3, [r7, #40] ; 0x28
SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN);
801c3de: 6b3b ldr r3, [r7, #48] ; 0x30
801c3e0: 3308 adds r3, #8
801c3e2: 2214 movs r2, #20
801c3e4: 4619 mov r1, r3
801c3e6: 6ab8 ldr r0, [r7, #40] ; 0x28
801c3e8: f000 fc59 bl 801cc9e <memcpy>
IPH_LEN_SET(fraghdr, lwip_htons(datagram_len));
801c3ec: 8a3b ldrh r3, [r7, #16]
801c3ee: 4618 mov r0, r3
801c3f0: f7f4 fb9e bl 8010b30 <lwip_htons>
801c3f4: 4603 mov r3, r0
801c3f6: 461a mov r2, r3
801c3f8: 6abb ldr r3, [r7, #40] ; 0x28
801c3fa: 805a strh r2, [r3, #2]
IPH_OFFSET_SET(fraghdr, 0);
801c3fc: 6abb ldr r3, [r7, #40] ; 0x28
801c3fe: 2200 movs r2, #0
801c400: 719a strb r2, [r3, #6]
801c402: 2200 movs r2, #0
801c404: 71da strb r2, [r3, #7]
IPH_CHKSUM_SET(fraghdr, 0);
801c406: 6abb ldr r3, [r7, #40] ; 0x28
801c408: 2200 movs r2, #0
801c40a: 729a strb r2, [r3, #10]
801c40c: 2200 movs r2, #0
801c40e: 72da strb r2, [r3, #11]
IF__NETIF_CHECKSUM_ENABLED(ip_current_input_netif(), NETIF_CHECKSUM_GEN_IP) {
IPH_CHKSUM_SET(fraghdr, inet_chksum(fraghdr, IP_HLEN));
}
#endif /* CHECKSUM_GEN_IP */
p = ipr->p;
801c410: 6b3b ldr r3, [r7, #48] ; 0x30
801c412: 685b ldr r3, [r3, #4]
801c414: 607b str r3, [r7, #4]
/* chain together the pbufs contained within the reass_data list. */
while (r != NULL) {
801c416: e00d b.n 801c434 <ip4_reass+0x234>
iprh = (struct ip_reass_helper *)r->payload;
801c418: 6b7b ldr r3, [r7, #52] ; 0x34
801c41a: 685b ldr r3, [r3, #4]
801c41c: 60fb str r3, [r7, #12]
/* hide the ip header for every succeeding fragment */
pbuf_remove_header(r, IP_HLEN);
801c41e: 2114 movs r1, #20
801c420: 6b78 ldr r0, [r7, #52] ; 0x34
801c422: f7f5 feb3 bl 801218c <pbuf_remove_header>
pbuf_cat(p, r);
801c426: 6b79 ldr r1, [r7, #52] ; 0x34
801c428: 6878 ldr r0, [r7, #4]
801c42a: f7f6 f803 bl 8012434 <pbuf_cat>
r = iprh->next_pbuf;
801c42e: 68fb ldr r3, [r7, #12]
801c430: 681b ldr r3, [r3, #0]
801c432: 637b str r3, [r7, #52] ; 0x34
while (r != NULL) {
801c434: 6b7b ldr r3, [r7, #52] ; 0x34
801c436: 2b00 cmp r3, #0
801c438: d1ee bne.n 801c418 <ip4_reass+0x218>
}
/* find the previous entry in the linked list */
if (ipr == reassdatagrams) {
801c43a: 4b35 ldr r3, [pc, #212] ; (801c510 <ip4_reass+0x310>)
801c43c: 681b ldr r3, [r3, #0]
801c43e: 6b3a ldr r2, [r7, #48] ; 0x30
801c440: 429a cmp r2, r3
801c442: d102 bne.n 801c44a <ip4_reass+0x24a>
ipr_prev = NULL;
801c444: 2300 movs r3, #0
801c446: 62fb str r3, [r7, #44] ; 0x2c
801c448: e010 b.n 801c46c <ip4_reass+0x26c>
} else {
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
801c44a: 4b31 ldr r3, [pc, #196] ; (801c510 <ip4_reass+0x310>)
801c44c: 681b ldr r3, [r3, #0]
801c44e: 62fb str r3, [r7, #44] ; 0x2c
801c450: e007 b.n 801c462 <ip4_reass+0x262>
if (ipr_prev->next == ipr) {
801c452: 6afb ldr r3, [r7, #44] ; 0x2c
801c454: 681b ldr r3, [r3, #0]
801c456: 6b3a ldr r2, [r7, #48] ; 0x30
801c458: 429a cmp r2, r3
801c45a: d006 beq.n 801c46a <ip4_reass+0x26a>
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
801c45c: 6afb ldr r3, [r7, #44] ; 0x2c
801c45e: 681b ldr r3, [r3, #0]
801c460: 62fb str r3, [r7, #44] ; 0x2c
801c462: 6afb ldr r3, [r7, #44] ; 0x2c
801c464: 2b00 cmp r3, #0
801c466: d1f4 bne.n 801c452 <ip4_reass+0x252>
801c468: e000 b.n 801c46c <ip4_reass+0x26c>
break;
801c46a: bf00 nop
}
}
}
/* release the sources allocate for the fragment queue entry */
ip_reass_dequeue_datagram(ipr, ipr_prev);
801c46c: 6af9 ldr r1, [r7, #44] ; 0x2c
801c46e: 6b38 ldr r0, [r7, #48] ; 0x30
801c470: f7ff fd2e bl 801bed0 <ip_reass_dequeue_datagram>
/* and adjust the number of pbufs currently queued for reassembly. */
clen = pbuf_clen(p);
801c474: 6878 ldr r0, [r7, #4]
801c476: f7f5 ff9d bl 80123b4 <pbuf_clen>
801c47a: 4603 mov r3, r0
801c47c: 843b strh r3, [r7, #32]
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
801c47e: 4b23 ldr r3, [pc, #140] ; (801c50c <ip4_reass+0x30c>)
801c480: 881b ldrh r3, [r3, #0]
801c482: 8c3a ldrh r2, [r7, #32]
801c484: 429a cmp r2, r3
801c486: d906 bls.n 801c496 <ip4_reass+0x296>
801c488: 4b22 ldr r3, [pc, #136] ; (801c514 <ip4_reass+0x314>)
801c48a: f240 229b movw r2, #667 ; 0x29b
801c48e: 4922 ldr r1, [pc, #136] ; (801c518 <ip4_reass+0x318>)
801c490: 4822 ldr r0, [pc, #136] ; (801c51c <ip4_reass+0x31c>)
801c492: f000 fc31 bl 801ccf8 <iprintf>
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen);
801c496: 4b1d ldr r3, [pc, #116] ; (801c50c <ip4_reass+0x30c>)
801c498: 881a ldrh r2, [r3, #0]
801c49a: 8c3b ldrh r3, [r7, #32]
801c49c: 1ad3 subs r3, r2, r3
801c49e: b29a uxth r2, r3
801c4a0: 4b1a ldr r3, [pc, #104] ; (801c50c <ip4_reass+0x30c>)
801c4a2: 801a strh r2, [r3, #0]
MIB2_STATS_INC(mib2.ipreasmoks);
/* Return the pbuf chain */
return p;
801c4a4: 687b ldr r3, [r7, #4]
801c4a6: e02c b.n 801c502 <ip4_reass+0x302>
}
/* the datagram is not (yet?) reassembled completely */
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount));
return NULL;
801c4a8: 2300 movs r3, #0
801c4aa: e02a b.n 801c502 <ip4_reass+0x302>
nullreturn_ipr:
801c4ac: bf00 nop
801c4ae: e000 b.n 801c4b2 <ip4_reass+0x2b2>
goto nullreturn_ipr;
801c4b0: bf00 nop
LWIP_ASSERT("ipr != NULL", ipr != NULL);
801c4b2: 6b3b ldr r3, [r7, #48] ; 0x30
801c4b4: 2b00 cmp r3, #0
801c4b6: d106 bne.n 801c4c6 <ip4_reass+0x2c6>
801c4b8: 4b16 ldr r3, [pc, #88] ; (801c514 <ip4_reass+0x314>)
801c4ba: f44f 722a mov.w r2, #680 ; 0x2a8
801c4be: 4918 ldr r1, [pc, #96] ; (801c520 <ip4_reass+0x320>)
801c4c0: 4816 ldr r0, [pc, #88] ; (801c51c <ip4_reass+0x31c>)
801c4c2: f000 fc19 bl 801ccf8 <iprintf>
if (ipr->p == NULL) {
801c4c6: 6b3b ldr r3, [r7, #48] ; 0x30
801c4c8: 685b ldr r3, [r3, #4]
801c4ca: 2b00 cmp r3, #0
801c4cc: d114 bne.n 801c4f8 <ip4_reass+0x2f8>
/* dropped pbuf after creating a new datagram entry: remove the entry, too */
LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams);
801c4ce: 4b10 ldr r3, [pc, #64] ; (801c510 <ip4_reass+0x310>)
801c4d0: 681b ldr r3, [r3, #0]
801c4d2: 6b3a ldr r2, [r7, #48] ; 0x30
801c4d4: 429a cmp r2, r3
801c4d6: d006 beq.n 801c4e6 <ip4_reass+0x2e6>
801c4d8: 4b0e ldr r3, [pc, #56] ; (801c514 <ip4_reass+0x314>)
801c4da: f240 22ab movw r2, #683 ; 0x2ab
801c4de: 4911 ldr r1, [pc, #68] ; (801c524 <ip4_reass+0x324>)
801c4e0: 480e ldr r0, [pc, #56] ; (801c51c <ip4_reass+0x31c>)
801c4e2: f000 fc09 bl 801ccf8 <iprintf>
ip_reass_dequeue_datagram(ipr, NULL);
801c4e6: 2100 movs r1, #0
801c4e8: 6b38 ldr r0, [r7, #48] ; 0x30
801c4ea: f7ff fcf1 bl 801bed0 <ip_reass_dequeue_datagram>
801c4ee: e004 b.n 801c4fa <ip4_reass+0x2fa>
goto nullreturn;
801c4f0: bf00 nop
801c4f2: e002 b.n 801c4fa <ip4_reass+0x2fa>
goto nullreturn;
801c4f4: bf00 nop
801c4f6: e000 b.n 801c4fa <ip4_reass+0x2fa>
}
nullreturn:
801c4f8: bf00 nop
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n"));
IPFRAG_STATS_INC(ip_frag.drop);
pbuf_free(p);
801c4fa: 6878 ldr r0, [r7, #4]
801c4fc: f7f5 fecc bl 8012298 <pbuf_free>
return NULL;
801c500: 2300 movs r3, #0
}
801c502: 4618 mov r0, r3
801c504: 3738 adds r7, #56 ; 0x38
801c506: 46bd mov sp, r7
801c508: bd80 pop {r7, pc}
801c50a: bf00 nop
801c50c: 20008870 .word 0x20008870
801c510: 2000886c .word 0x2000886c
801c514: 08020b80 .word 0x08020b80
801c518: 08020cf0 .word 0x08020cf0
801c51c: 08020bc8 .word 0x08020bc8
801c520: 08020d0c .word 0x08020d0c
801c524: 08020d18 .word 0x08020d18
0801c528 <ip_frag_alloc_pbuf_custom_ref>:
#if IP_FRAG
#if !LWIP_NETIF_TX_SINGLE_PBUF
/** Allocate a new struct pbuf_custom_ref */
static struct pbuf_custom_ref *
ip_frag_alloc_pbuf_custom_ref(void)
{
801c528: b580 push {r7, lr}
801c52a: af00 add r7, sp, #0
return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF);
801c52c: 2005 movs r0, #5
801c52e: f7f4 ffb5 bl 801149c <memp_malloc>
801c532: 4603 mov r3, r0
}
801c534: 4618 mov r0, r3
801c536: bd80 pop {r7, pc}
0801c538 <ip_frag_free_pbuf_custom_ref>:
/** Free a struct pbuf_custom_ref */
static void
ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p)
{
801c538: b580 push {r7, lr}
801c53a: b082 sub sp, #8
801c53c: af00 add r7, sp, #0
801c53e: 6078 str r0, [r7, #4]
LWIP_ASSERT("p != NULL", p != NULL);
801c540: 687b ldr r3, [r7, #4]
801c542: 2b00 cmp r3, #0
801c544: d106 bne.n 801c554 <ip_frag_free_pbuf_custom_ref+0x1c>
801c546: 4b07 ldr r3, [pc, #28] ; (801c564 <ip_frag_free_pbuf_custom_ref+0x2c>)
801c548: f44f 7231 mov.w r2, #708 ; 0x2c4
801c54c: 4906 ldr r1, [pc, #24] ; (801c568 <ip_frag_free_pbuf_custom_ref+0x30>)
801c54e: 4807 ldr r0, [pc, #28] ; (801c56c <ip_frag_free_pbuf_custom_ref+0x34>)
801c550: f000 fbd2 bl 801ccf8 <iprintf>
memp_free(MEMP_FRAG_PBUF, p);
801c554: 6879 ldr r1, [r7, #4]
801c556: 2005 movs r0, #5
801c558: f7f4 fff2 bl 8011540 <memp_free>
}
801c55c: bf00 nop
801c55e: 3708 adds r7, #8
801c560: 46bd mov sp, r7
801c562: bd80 pop {r7, pc}
801c564: 08020b80 .word 0x08020b80
801c568: 08020d38 .word 0x08020d38
801c56c: 08020bc8 .word 0x08020bc8
0801c570 <ipfrag_free_pbuf_custom>:
/** Free-callback function to free a 'struct pbuf_custom_ref', called by
* pbuf_free. */
static void
ipfrag_free_pbuf_custom(struct pbuf *p)
{
801c570: b580 push {r7, lr}
801c572: b084 sub sp, #16
801c574: af00 add r7, sp, #0
801c576: 6078 str r0, [r7, #4]
struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p;
801c578: 687b ldr r3, [r7, #4]
801c57a: 60fb str r3, [r7, #12]
LWIP_ASSERT("pcr != NULL", pcr != NULL);
801c57c: 68fb ldr r3, [r7, #12]
801c57e: 2b00 cmp r3, #0
801c580: d106 bne.n 801c590 <ipfrag_free_pbuf_custom+0x20>
801c582: 4b11 ldr r3, [pc, #68] ; (801c5c8 <ipfrag_free_pbuf_custom+0x58>)
801c584: f240 22ce movw r2, #718 ; 0x2ce
801c588: 4910 ldr r1, [pc, #64] ; (801c5cc <ipfrag_free_pbuf_custom+0x5c>)
801c58a: 4811 ldr r0, [pc, #68] ; (801c5d0 <ipfrag_free_pbuf_custom+0x60>)
801c58c: f000 fbb4 bl 801ccf8 <iprintf>
LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p);
801c590: 68fa ldr r2, [r7, #12]
801c592: 687b ldr r3, [r7, #4]
801c594: 429a cmp r2, r3
801c596: d006 beq.n 801c5a6 <ipfrag_free_pbuf_custom+0x36>
801c598: 4b0b ldr r3, [pc, #44] ; (801c5c8 <ipfrag_free_pbuf_custom+0x58>)
801c59a: f240 22cf movw r2, #719 ; 0x2cf
801c59e: 490d ldr r1, [pc, #52] ; (801c5d4 <ipfrag_free_pbuf_custom+0x64>)
801c5a0: 480b ldr r0, [pc, #44] ; (801c5d0 <ipfrag_free_pbuf_custom+0x60>)
801c5a2: f000 fba9 bl 801ccf8 <iprintf>
if (pcr->original != NULL) {
801c5a6: 68fb ldr r3, [r7, #12]
801c5a8: 695b ldr r3, [r3, #20]
801c5aa: 2b00 cmp r3, #0
801c5ac: d004 beq.n 801c5b8 <ipfrag_free_pbuf_custom+0x48>
pbuf_free(pcr->original);
801c5ae: 68fb ldr r3, [r7, #12]
801c5b0: 695b ldr r3, [r3, #20]
801c5b2: 4618 mov r0, r3
801c5b4: f7f5 fe70 bl 8012298 <pbuf_free>
}
ip_frag_free_pbuf_custom_ref(pcr);
801c5b8: 68f8 ldr r0, [r7, #12]
801c5ba: f7ff ffbd bl 801c538 <ip_frag_free_pbuf_custom_ref>
}
801c5be: bf00 nop
801c5c0: 3710 adds r7, #16
801c5c2: 46bd mov sp, r7
801c5c4: bd80 pop {r7, pc}
801c5c6: bf00 nop
801c5c8: 08020b80 .word 0x08020b80
801c5cc: 08020d44 .word 0x08020d44
801c5d0: 08020bc8 .word 0x08020bc8
801c5d4: 08020d50 .word 0x08020d50
0801c5d8 <ip4_frag>:
*
* @return ERR_OK if sent successfully, err_t otherwise
*/
err_t
ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest)
{
801c5d8: b580 push {r7, lr}
801c5da: b094 sub sp, #80 ; 0x50
801c5dc: af02 add r7, sp, #8
801c5de: 60f8 str r0, [r7, #12]
801c5e0: 60b9 str r1, [r7, #8]
801c5e2: 607a str r2, [r7, #4]
struct pbuf *rambuf;
#if !LWIP_NETIF_TX_SINGLE_PBUF
struct pbuf *newpbuf;
u16_t newpbuflen = 0;
801c5e4: 2300 movs r3, #0
801c5e6: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
u16_t left_to_copy;
#endif
struct ip_hdr *original_iphdr;
struct ip_hdr *iphdr;
const u16_t nfb = (u16_t)((netif->mtu - IP_HLEN) / 8);
801c5ea: 68bb ldr r3, [r7, #8]
801c5ec: 8d1b ldrh r3, [r3, #40] ; 0x28
801c5ee: 3b14 subs r3, #20
801c5f0: 2b00 cmp r3, #0
801c5f2: da00 bge.n 801c5f6 <ip4_frag+0x1e>
801c5f4: 3307 adds r3, #7
801c5f6: 10db asrs r3, r3, #3
801c5f8: 877b strh r3, [r7, #58] ; 0x3a
u16_t left, fragsize;
u16_t ofo;
int last;
u16_t poff = IP_HLEN;
801c5fa: 2314 movs r3, #20
801c5fc: 87fb strh r3, [r7, #62] ; 0x3e
u16_t tmp;
int mf_set;
original_iphdr = (struct ip_hdr *)p->payload;
801c5fe: 68fb ldr r3, [r7, #12]
801c600: 685b ldr r3, [r3, #4]
801c602: 637b str r3, [r7, #52] ; 0x34
iphdr = original_iphdr;
801c604: 6b7b ldr r3, [r7, #52] ; 0x34
801c606: 633b str r3, [r7, #48] ; 0x30
if (IPH_HL_BYTES(iphdr) != IP_HLEN) {
801c608: 6b3b ldr r3, [r7, #48] ; 0x30
801c60a: 781b ldrb r3, [r3, #0]
801c60c: f003 030f and.w r3, r3, #15
801c610: b2db uxtb r3, r3
801c612: 009b lsls r3, r3, #2
801c614: b2db uxtb r3, r3
801c616: 2b14 cmp r3, #20
801c618: d002 beq.n 801c620 <ip4_frag+0x48>
/* ip4_frag() does not support IP options */
return ERR_VAL;
801c61a: f06f 0305 mvn.w r3, #5
801c61e: e10f b.n 801c840 <ip4_frag+0x268>
}
LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
801c620: 68fb ldr r3, [r7, #12]
801c622: 895b ldrh r3, [r3, #10]
801c624: 2b13 cmp r3, #19
801c626: d809 bhi.n 801c63c <ip4_frag+0x64>
801c628: 4b87 ldr r3, [pc, #540] ; (801c848 <ip4_frag+0x270>)
801c62a: f44f 723f mov.w r2, #764 ; 0x2fc
801c62e: 4987 ldr r1, [pc, #540] ; (801c84c <ip4_frag+0x274>)
801c630: 4887 ldr r0, [pc, #540] ; (801c850 <ip4_frag+0x278>)
801c632: f000 fb61 bl 801ccf8 <iprintf>
801c636: f06f 0305 mvn.w r3, #5
801c63a: e101 b.n 801c840 <ip4_frag+0x268>
/* Save original offset */
tmp = lwip_ntohs(IPH_OFFSET(iphdr));
801c63c: 6b3b ldr r3, [r7, #48] ; 0x30
801c63e: 88db ldrh r3, [r3, #6]
801c640: b29b uxth r3, r3
801c642: 4618 mov r0, r3
801c644: f7f4 fa74 bl 8010b30 <lwip_htons>
801c648: 4603 mov r3, r0
801c64a: 87bb strh r3, [r7, #60] ; 0x3c
ofo = tmp & IP_OFFMASK;
801c64c: 8fbb ldrh r3, [r7, #60] ; 0x3c
801c64e: f3c3 030c ubfx r3, r3, #0, #13
801c652: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
/* already fragmented? if so, the last fragment we create must have MF, too */
mf_set = tmp & IP_MF;
801c656: 8fbb ldrh r3, [r7, #60] ; 0x3c
801c658: f403 5300 and.w r3, r3, #8192 ; 0x2000
801c65c: 62fb str r3, [r7, #44] ; 0x2c
left = (u16_t)(p->tot_len - IP_HLEN);
801c65e: 68fb ldr r3, [r7, #12]
801c660: 891b ldrh r3, [r3, #8]
801c662: 3b14 subs r3, #20
801c664: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
while (left) {
801c668: e0e0 b.n 801c82c <ip4_frag+0x254>
/* Fill this fragment */
fragsize = LWIP_MIN(left, (u16_t)(nfb * 8));
801c66a: 8f7b ldrh r3, [r7, #58] ; 0x3a
801c66c: 00db lsls r3, r3, #3
801c66e: b29b uxth r3, r3
801c670: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
801c674: 4293 cmp r3, r2
801c676: bf28 it cs
801c678: 4613 movcs r3, r2
801c67a: 857b strh r3, [r7, #42] ; 0x2a
/* When not using a static buffer, create a chain of pbufs.
* The first will be a PBUF_RAM holding the link and IP header.
* The rest will be PBUF_REFs mirroring the pbuf chain to be fragged,
* but limited to the size of an mtu.
*/
rambuf = pbuf_alloc(PBUF_LINK, IP_HLEN, PBUF_RAM);
801c67c: f44f 7220 mov.w r2, #640 ; 0x280
801c680: 2114 movs r1, #20
801c682: 200e movs r0, #14
801c684: f7f5 fb28 bl 8011cd8 <pbuf_alloc>
801c688: 6278 str r0, [r7, #36] ; 0x24
if (rambuf == NULL) {
801c68a: 6a7b ldr r3, [r7, #36] ; 0x24
801c68c: 2b00 cmp r3, #0
801c68e: f000 80d4 beq.w 801c83a <ip4_frag+0x262>
goto memerr;
}
LWIP_ASSERT("this needs a pbuf in one piece!",
801c692: 6a7b ldr r3, [r7, #36] ; 0x24
801c694: 895b ldrh r3, [r3, #10]
801c696: 2b13 cmp r3, #19
801c698: d806 bhi.n 801c6a8 <ip4_frag+0xd0>
801c69a: 4b6b ldr r3, [pc, #428] ; (801c848 <ip4_frag+0x270>)
801c69c: f240 3225 movw r2, #805 ; 0x325
801c6a0: 496c ldr r1, [pc, #432] ; (801c854 <ip4_frag+0x27c>)
801c6a2: 486b ldr r0, [pc, #428] ; (801c850 <ip4_frag+0x278>)
801c6a4: f000 fb28 bl 801ccf8 <iprintf>
(rambuf->len >= (IP_HLEN)));
SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN);
801c6a8: 6a7b ldr r3, [r7, #36] ; 0x24
801c6aa: 685b ldr r3, [r3, #4]
801c6ac: 2214 movs r2, #20
801c6ae: 6b79 ldr r1, [r7, #52] ; 0x34
801c6b0: 4618 mov r0, r3
801c6b2: f000 faf4 bl 801cc9e <memcpy>
iphdr = (struct ip_hdr *)rambuf->payload;
801c6b6: 6a7b ldr r3, [r7, #36] ; 0x24
801c6b8: 685b ldr r3, [r3, #4]
801c6ba: 633b str r3, [r7, #48] ; 0x30
left_to_copy = fragsize;
801c6bc: 8d7b ldrh r3, [r7, #42] ; 0x2a
801c6be: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
while (left_to_copy) {
801c6c2: e064 b.n 801c78e <ip4_frag+0x1b6>
struct pbuf_custom_ref *pcr;
u16_t plen = (u16_t)(p->len - poff);
801c6c4: 68fb ldr r3, [r7, #12]
801c6c6: 895a ldrh r2, [r3, #10]
801c6c8: 8ffb ldrh r3, [r7, #62] ; 0x3e
801c6ca: 1ad3 subs r3, r2, r3
801c6cc: 83fb strh r3, [r7, #30]
LWIP_ASSERT("p->len >= poff", p->len >= poff);
801c6ce: 68fb ldr r3, [r7, #12]
801c6d0: 895b ldrh r3, [r3, #10]
801c6d2: 8ffa ldrh r2, [r7, #62] ; 0x3e
801c6d4: 429a cmp r2, r3
801c6d6: d906 bls.n 801c6e6 <ip4_frag+0x10e>
801c6d8: 4b5b ldr r3, [pc, #364] ; (801c848 <ip4_frag+0x270>)
801c6da: f240 322d movw r2, #813 ; 0x32d
801c6de: 495e ldr r1, [pc, #376] ; (801c858 <ip4_frag+0x280>)
801c6e0: 485b ldr r0, [pc, #364] ; (801c850 <ip4_frag+0x278>)
801c6e2: f000 fb09 bl 801ccf8 <iprintf>
newpbuflen = LWIP_MIN(left_to_copy, plen);
801c6e6: 8bfa ldrh r2, [r7, #30]
801c6e8: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
801c6ec: 4293 cmp r3, r2
801c6ee: bf28 it cs
801c6f0: 4613 movcs r3, r2
801c6f2: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
/* Is this pbuf already empty? */
if (!newpbuflen) {
801c6f6: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
801c6fa: 2b00 cmp r3, #0
801c6fc: d105 bne.n 801c70a <ip4_frag+0x132>
poff = 0;
801c6fe: 2300 movs r3, #0
801c700: 87fb strh r3, [r7, #62] ; 0x3e
p = p->next;
801c702: 68fb ldr r3, [r7, #12]
801c704: 681b ldr r3, [r3, #0]
801c706: 60fb str r3, [r7, #12]
continue;
801c708: e041 b.n 801c78e <ip4_frag+0x1b6>
}
pcr = ip_frag_alloc_pbuf_custom_ref();
801c70a: f7ff ff0d bl 801c528 <ip_frag_alloc_pbuf_custom_ref>
801c70e: 61b8 str r0, [r7, #24]
if (pcr == NULL) {
801c710: 69bb ldr r3, [r7, #24]
801c712: 2b00 cmp r3, #0
801c714: d103 bne.n 801c71e <ip4_frag+0x146>
pbuf_free(rambuf);
801c716: 6a78 ldr r0, [r7, #36] ; 0x24
801c718: f7f5 fdbe bl 8012298 <pbuf_free>
goto memerr;
801c71c: e08e b.n 801c83c <ip4_frag+0x264>
}
/* Mirror this pbuf, although we might not need all of it. */
newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
801c71e: 69b8 ldr r0, [r7, #24]
(u8_t *)p->payload + poff, newpbuflen);
801c720: 68fb ldr r3, [r7, #12]
801c722: 685a ldr r2, [r3, #4]
newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
801c724: 8ffb ldrh r3, [r7, #62] ; 0x3e
801c726: 4413 add r3, r2
801c728: f8b7 1046 ldrh.w r1, [r7, #70] ; 0x46
801c72c: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46
801c730: 9201 str r2, [sp, #4]
801c732: 9300 str r3, [sp, #0]
801c734: 4603 mov r3, r0
801c736: 2241 movs r2, #65 ; 0x41
801c738: 2000 movs r0, #0
801c73a: f7f5 fbf3 bl 8011f24 <pbuf_alloced_custom>
801c73e: 6178 str r0, [r7, #20]
if (newpbuf == NULL) {
801c740: 697b ldr r3, [r7, #20]
801c742: 2b00 cmp r3, #0
801c744: d106 bne.n 801c754 <ip4_frag+0x17c>
ip_frag_free_pbuf_custom_ref(pcr);
801c746: 69b8 ldr r0, [r7, #24]
801c748: f7ff fef6 bl 801c538 <ip_frag_free_pbuf_custom_ref>
pbuf_free(rambuf);
801c74c: 6a78 ldr r0, [r7, #36] ; 0x24
801c74e: f7f5 fda3 bl 8012298 <pbuf_free>
goto memerr;
801c752: e073 b.n 801c83c <ip4_frag+0x264>
}
pbuf_ref(p);
801c754: 68f8 ldr r0, [r7, #12]
801c756: f7f5 fe45 bl 80123e4 <pbuf_ref>
pcr->original = p;
801c75a: 69bb ldr r3, [r7, #24]
801c75c: 68fa ldr r2, [r7, #12]
801c75e: 615a str r2, [r3, #20]
pcr->pc.custom_free_function = ipfrag_free_pbuf_custom;
801c760: 69bb ldr r3, [r7, #24]
801c762: 4a3e ldr r2, [pc, #248] ; (801c85c <ip4_frag+0x284>)
801c764: 611a str r2, [r3, #16]
/* Add it to end of rambuf's chain, but using pbuf_cat, not pbuf_chain
* so that it is removed when pbuf_dechain is later called on rambuf.
*/
pbuf_cat(rambuf, newpbuf);
801c766: 6979 ldr r1, [r7, #20]
801c768: 6a78 ldr r0, [r7, #36] ; 0x24
801c76a: f7f5 fe63 bl 8012434 <pbuf_cat>
left_to_copy = (u16_t)(left_to_copy - newpbuflen);
801c76e: f8b7 2044 ldrh.w r2, [r7, #68] ; 0x44
801c772: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
801c776: 1ad3 subs r3, r2, r3
801c778: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
if (left_to_copy) {
801c77c: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
801c780: 2b00 cmp r3, #0
801c782: d004 beq.n 801c78e <ip4_frag+0x1b6>
poff = 0;
801c784: 2300 movs r3, #0
801c786: 87fb strh r3, [r7, #62] ; 0x3e
p = p->next;
801c788: 68fb ldr r3, [r7, #12]
801c78a: 681b ldr r3, [r3, #0]
801c78c: 60fb str r3, [r7, #12]
while (left_to_copy) {
801c78e: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
801c792: 2b00 cmp r3, #0
801c794: d196 bne.n 801c6c4 <ip4_frag+0xec>
}
}
poff = (u16_t)(poff + newpbuflen);
801c796: 8ffa ldrh r2, [r7, #62] ; 0x3e
801c798: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
801c79c: 4413 add r3, r2
801c79e: 87fb strh r3, [r7, #62] ; 0x3e
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
/* Correct header */
last = (left <= netif->mtu - IP_HLEN);
801c7a0: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
801c7a4: 68bb ldr r3, [r7, #8]
801c7a6: 8d1b ldrh r3, [r3, #40] ; 0x28
801c7a8: 3b14 subs r3, #20
801c7aa: 429a cmp r2, r3
801c7ac: bfd4 ite le
801c7ae: 2301 movle r3, #1
801c7b0: 2300 movgt r3, #0
801c7b2: b2db uxtb r3, r3
801c7b4: 623b str r3, [r7, #32]
/* Set new offset and MF flag */
tmp = (IP_OFFMASK & (ofo));
801c7b6: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
801c7ba: f3c3 030c ubfx r3, r3, #0, #13
801c7be: 87bb strh r3, [r7, #60] ; 0x3c
if (!last || mf_set) {
801c7c0: 6a3b ldr r3, [r7, #32]
801c7c2: 2b00 cmp r3, #0
801c7c4: d002 beq.n 801c7cc <ip4_frag+0x1f4>
801c7c6: 6afb ldr r3, [r7, #44] ; 0x2c
801c7c8: 2b00 cmp r3, #0
801c7ca: d003 beq.n 801c7d4 <ip4_frag+0x1fc>
/* the last fragment has MF set if the input frame had it */
tmp = tmp | IP_MF;
801c7cc: 8fbb ldrh r3, [r7, #60] ; 0x3c
801c7ce: f443 5300 orr.w r3, r3, #8192 ; 0x2000
801c7d2: 87bb strh r3, [r7, #60] ; 0x3c
}
IPH_OFFSET_SET(iphdr, lwip_htons(tmp));
801c7d4: 8fbb ldrh r3, [r7, #60] ; 0x3c
801c7d6: 4618 mov r0, r3
801c7d8: f7f4 f9aa bl 8010b30 <lwip_htons>
801c7dc: 4603 mov r3, r0
801c7de: 461a mov r2, r3
801c7e0: 6b3b ldr r3, [r7, #48] ; 0x30
801c7e2: 80da strh r2, [r3, #6]
IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN)));
801c7e4: 8d7b ldrh r3, [r7, #42] ; 0x2a
801c7e6: 3314 adds r3, #20
801c7e8: b29b uxth r3, r3
801c7ea: 4618 mov r0, r3
801c7ec: f7f4 f9a0 bl 8010b30 <lwip_htons>
801c7f0: 4603 mov r3, r0
801c7f2: 461a mov r2, r3
801c7f4: 6b3b ldr r3, [r7, #48] ; 0x30
801c7f6: 805a strh r2, [r3, #2]
IPH_CHKSUM_SET(iphdr, 0);
801c7f8: 6b3b ldr r3, [r7, #48] ; 0x30
801c7fa: 2200 movs r2, #0
801c7fc: 729a strb r2, [r3, #10]
801c7fe: 2200 movs r2, #0
801c800: 72da strb r2, [r3, #11]
#endif /* CHECKSUM_GEN_IP */
/* No need for separate header pbuf - we allowed room for it in rambuf
* when allocated.
*/
netif->output(netif, rambuf, dest);
801c802: 68bb ldr r3, [r7, #8]
801c804: 695b ldr r3, [r3, #20]
801c806: 687a ldr r2, [r7, #4]
801c808: 6a79 ldr r1, [r7, #36] ; 0x24
801c80a: 68b8 ldr r0, [r7, #8]
801c80c: 4798 blx r3
* recreate it next time round the loop. If we're lucky the hardware
* will have already sent the packet, the free will really free, and
* there will be zero memory penalty.
*/
pbuf_free(rambuf);
801c80e: 6a78 ldr r0, [r7, #36] ; 0x24
801c810: f7f5 fd42 bl 8012298 <pbuf_free>
left = (u16_t)(left - fragsize);
801c814: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
801c818: 8d7b ldrh r3, [r7, #42] ; 0x2a
801c81a: 1ad3 subs r3, r2, r3
801c81c: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
ofo = (u16_t)(ofo + nfb);
801c820: f8b7 2040 ldrh.w r2, [r7, #64] ; 0x40
801c824: 8f7b ldrh r3, [r7, #58] ; 0x3a
801c826: 4413 add r3, r2
801c828: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
while (left) {
801c82c: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
801c830: 2b00 cmp r3, #0
801c832: f47f af1a bne.w 801c66a <ip4_frag+0x92>
}
MIB2_STATS_INC(mib2.ipfragoks);
return ERR_OK;
801c836: 2300 movs r3, #0
801c838: e002 b.n 801c840 <ip4_frag+0x268>
goto memerr;
801c83a: bf00 nop
memerr:
MIB2_STATS_INC(mib2.ipfragfails);
return ERR_MEM;
801c83c: f04f 33ff mov.w r3, #4294967295
}
801c840: 4618 mov r0, r3
801c842: 3748 adds r7, #72 ; 0x48
801c844: 46bd mov sp, r7
801c846: bd80 pop {r7, pc}
801c848: 08020b80 .word 0x08020b80
801c84c: 08020d5c .word 0x08020d5c
801c850: 08020bc8 .word 0x08020bc8
801c854: 08020d78 .word 0x08020d78
801c858: 08020d98 .word 0x08020d98
801c85c: 0801c571 .word 0x0801c571
0801c860 <ethernet_input>:
* @see ETHARP_SUPPORT_VLAN
* @see LWIP_HOOK_VLAN_CHECK
*/
err_t
ethernet_input(struct pbuf *p, struct netif *netif)
{
801c860: b580 push {r7, lr}
801c862: b086 sub sp, #24
801c864: af00 add r7, sp, #0
801c866: 6078 str r0, [r7, #4]
801c868: 6039 str r1, [r7, #0]
struct eth_hdr *ethhdr;
u16_t type;
#if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6
u16_t next_hdr_offset = SIZEOF_ETH_HDR;
801c86a: 230e movs r3, #14
801c86c: 82fb strh r3, [r7, #22]
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
LWIP_ASSERT_CORE_LOCKED();
if (p->len <= SIZEOF_ETH_HDR) {
801c86e: 687b ldr r3, [r7, #4]
801c870: 895b ldrh r3, [r3, #10]
801c872: 2b0e cmp r3, #14
801c874: d96e bls.n 801c954 <ethernet_input+0xf4>
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinerrors);
goto free_and_return;
}
if (p->if_idx == NETIF_NO_INDEX) {
801c876: 687b ldr r3, [r7, #4]
801c878: 7bdb ldrb r3, [r3, #15]
801c87a: 2b00 cmp r3, #0
801c87c: d106 bne.n 801c88c <ethernet_input+0x2c>
p->if_idx = netif_get_index(netif);
801c87e: 683b ldr r3, [r7, #0]
801c880: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
801c884: 3301 adds r3, #1
801c886: b2da uxtb r2, r3
801c888: 687b ldr r3, [r7, #4]
801c88a: 73da strb r2, [r3, #15]
}
/* points to packet payload, which starts with an Ethernet header */
ethhdr = (struct eth_hdr *)p->payload;
801c88c: 687b ldr r3, [r7, #4]
801c88e: 685b ldr r3, [r3, #4]
801c890: 613b str r3, [r7, #16]
(unsigned char)ethhdr->dest.addr[3], (unsigned char)ethhdr->dest.addr[4], (unsigned char)ethhdr->dest.addr[5],
(unsigned char)ethhdr->src.addr[0], (unsigned char)ethhdr->src.addr[1], (unsigned char)ethhdr->src.addr[2],
(unsigned char)ethhdr->src.addr[3], (unsigned char)ethhdr->src.addr[4], (unsigned char)ethhdr->src.addr[5],
lwip_htons(ethhdr->type)));
type = ethhdr->type;
801c892: 693b ldr r3, [r7, #16]
801c894: 7b1a ldrb r2, [r3, #12]
801c896: 7b5b ldrb r3, [r3, #13]
801c898: 021b lsls r3, r3, #8
801c89a: 4313 orrs r3, r2
801c89c: 81fb strh r3, [r7, #14]
#if LWIP_ARP_FILTER_NETIF
netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, lwip_htons(type));
#endif /* LWIP_ARP_FILTER_NETIF*/
if (ethhdr->dest.addr[0] & 1) {
801c89e: 693b ldr r3, [r7, #16]
801c8a0: 781b ldrb r3, [r3, #0]
801c8a2: f003 0301 and.w r3, r3, #1
801c8a6: 2b00 cmp r3, #0
801c8a8: d023 beq.n 801c8f2 <ethernet_input+0x92>
/* this might be a multicast or broadcast packet */
if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) {
801c8aa: 693b ldr r3, [r7, #16]
801c8ac: 781b ldrb r3, [r3, #0]
801c8ae: 2b01 cmp r3, #1
801c8b0: d10f bne.n 801c8d2 <ethernet_input+0x72>
#if LWIP_IPV4
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
801c8b2: 693b ldr r3, [r7, #16]
801c8b4: 785b ldrb r3, [r3, #1]
801c8b6: 2b00 cmp r3, #0
801c8b8: d11b bne.n 801c8f2 <ethernet_input+0x92>
(ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) {
801c8ba: 693b ldr r3, [r7, #16]
801c8bc: 789b ldrb r3, [r3, #2]
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
801c8be: 2b5e cmp r3, #94 ; 0x5e
801c8c0: d117 bne.n 801c8f2 <ethernet_input+0x92>
/* mark the pbuf as link-layer multicast */
p->flags |= PBUF_FLAG_LLMCAST;
801c8c2: 687b ldr r3, [r7, #4]
801c8c4: 7b5b ldrb r3, [r3, #13]
801c8c6: f043 0310 orr.w r3, r3, #16
801c8ca: b2da uxtb r2, r3
801c8cc: 687b ldr r3, [r7, #4]
801c8ce: 735a strb r2, [r3, #13]
801c8d0: e00f b.n 801c8f2 <ethernet_input+0x92>
(ethhdr->dest.addr[1] == LL_IP6_MULTICAST_ADDR_1)) {
/* mark the pbuf as link-layer multicast */
p->flags |= PBUF_FLAG_LLMCAST;
}
#endif /* LWIP_IPV6 */
else if (eth_addr_cmp(&ethhdr->dest, &ethbroadcast)) {
801c8d2: 693b ldr r3, [r7, #16]
801c8d4: 2206 movs r2, #6
801c8d6: 4928 ldr r1, [pc, #160] ; (801c978 <ethernet_input+0x118>)
801c8d8: 4618 mov r0, r3
801c8da: f000 f9d1 bl 801cc80 <memcmp>
801c8de: 4603 mov r3, r0
801c8e0: 2b00 cmp r3, #0
801c8e2: d106 bne.n 801c8f2 <ethernet_input+0x92>
/* mark the pbuf as link-layer broadcast */
p->flags |= PBUF_FLAG_LLBCAST;
801c8e4: 687b ldr r3, [r7, #4]
801c8e6: 7b5b ldrb r3, [r3, #13]
801c8e8: f043 0308 orr.w r3, r3, #8
801c8ec: b2da uxtb r2, r3
801c8ee: 687b ldr r3, [r7, #4]
801c8f0: 735a strb r2, [r3, #13]
}
}
switch (type) {
801c8f2: 89fb ldrh r3, [r7, #14]
801c8f4: 2b08 cmp r3, #8
801c8f6: d003 beq.n 801c900 <ethernet_input+0xa0>
801c8f8: f5b3 6fc1 cmp.w r3, #1544 ; 0x608
801c8fc: d014 beq.n 801c928 <ethernet_input+0xc8>
}
#endif
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
goto free_and_return;
801c8fe: e032 b.n 801c966 <ethernet_input+0x106>
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
801c900: 683b ldr r3, [r7, #0]
801c902: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801c906: f003 0308 and.w r3, r3, #8
801c90a: 2b00 cmp r3, #0
801c90c: d024 beq.n 801c958 <ethernet_input+0xf8>
if (pbuf_remove_header(p, next_hdr_offset)) {
801c90e: 8afb ldrh r3, [r7, #22]
801c910: 4619 mov r1, r3
801c912: 6878 ldr r0, [r7, #4]
801c914: f7f5 fc3a bl 801218c <pbuf_remove_header>
801c918: 4603 mov r3, r0
801c91a: 2b00 cmp r3, #0
801c91c: d11e bne.n 801c95c <ethernet_input+0xfc>
ip4_input(p, netif);
801c91e: 6839 ldr r1, [r7, #0]
801c920: 6878 ldr r0, [r7, #4]
801c922: f7fe ff0f bl 801b744 <ip4_input>
break;
801c926: e013 b.n 801c950 <ethernet_input+0xf0>
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
801c928: 683b ldr r3, [r7, #0]
801c92a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801c92e: f003 0308 and.w r3, r3, #8
801c932: 2b00 cmp r3, #0
801c934: d014 beq.n 801c960 <ethernet_input+0x100>
if (pbuf_remove_header(p, next_hdr_offset)) {
801c936: 8afb ldrh r3, [r7, #22]
801c938: 4619 mov r1, r3
801c93a: 6878 ldr r0, [r7, #4]
801c93c: f7f5 fc26 bl 801218c <pbuf_remove_header>
801c940: 4603 mov r3, r0
801c942: 2b00 cmp r3, #0
801c944: d10e bne.n 801c964 <ethernet_input+0x104>
etharp_input(p, netif);
801c946: 6839 ldr r1, [r7, #0]
801c948: 6878 ldr r0, [r7, #4]
801c94a: f7fe f8ab bl 801aaa4 <etharp_input>
break;
801c94e: bf00 nop
}
/* This means the pbuf is freed or consumed,
so the caller doesn't have to free it again */
return ERR_OK;
801c950: 2300 movs r3, #0
801c952: e00c b.n 801c96e <ethernet_input+0x10e>
goto free_and_return;
801c954: bf00 nop
801c956: e006 b.n 801c966 <ethernet_input+0x106>
goto free_and_return;
801c958: bf00 nop
801c95a: e004 b.n 801c966 <ethernet_input+0x106>
goto free_and_return;
801c95c: bf00 nop
801c95e: e002 b.n 801c966 <ethernet_input+0x106>
goto free_and_return;
801c960: bf00 nop
801c962: e000 b.n 801c966 <ethernet_input+0x106>
goto free_and_return;
801c964: bf00 nop
free_and_return:
pbuf_free(p);
801c966: 6878 ldr r0, [r7, #4]
801c968: f7f5 fc96 bl 8012298 <pbuf_free>
return ERR_OK;
801c96c: 2300 movs r3, #0
}
801c96e: 4618 mov r0, r3
801c970: 3718 adds r7, #24
801c972: 46bd mov sp, r7
801c974: bd80 pop {r7, pc}
801c976: bf00 nop
801c978: 08022eb0 .word 0x08022eb0
0801c97c <ethernet_output>:
* @return ERR_OK if the packet was sent, any other err_t on failure
*/
err_t
ethernet_output(struct netif * netif, struct pbuf * p,
const struct eth_addr * src, const struct eth_addr * dst,
u16_t eth_type) {
801c97c: b580 push {r7, lr}
801c97e: b086 sub sp, #24
801c980: af00 add r7, sp, #0
801c982: 60f8 str r0, [r7, #12]
801c984: 60b9 str r1, [r7, #8]
801c986: 607a str r2, [r7, #4]
801c988: 603b str r3, [r7, #0]
struct eth_hdr *ethhdr;
u16_t eth_type_be = lwip_htons(eth_type);
801c98a: 8c3b ldrh r3, [r7, #32]
801c98c: 4618 mov r0, r3
801c98e: f7f4 f8cf bl 8010b30 <lwip_htons>
801c992: 4603 mov r3, r0
801c994: 82fb strh r3, [r7, #22]
eth_type_be = PP_HTONS(ETHTYPE_VLAN);
} else
#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */
{
if (pbuf_add_header(p, SIZEOF_ETH_HDR) != 0) {
801c996: 210e movs r1, #14
801c998: 68b8 ldr r0, [r7, #8]
801c99a: f7f5 fbe7 bl 801216c <pbuf_add_header>
801c99e: 4603 mov r3, r0
801c9a0: 2b00 cmp r3, #0
801c9a2: d125 bne.n 801c9f0 <ethernet_output+0x74>
}
}
LWIP_ASSERT_CORE_LOCKED();
ethhdr = (struct eth_hdr *)p->payload;
801c9a4: 68bb ldr r3, [r7, #8]
801c9a6: 685b ldr r3, [r3, #4]
801c9a8: 613b str r3, [r7, #16]
ethhdr->type = eth_type_be;
801c9aa: 693b ldr r3, [r7, #16]
801c9ac: 8afa ldrh r2, [r7, #22]
801c9ae: 819a strh r2, [r3, #12]
SMEMCPY(&ethhdr->dest, dst, ETH_HWADDR_LEN);
801c9b0: 693b ldr r3, [r7, #16]
801c9b2: 2206 movs r2, #6
801c9b4: 6839 ldr r1, [r7, #0]
801c9b6: 4618 mov r0, r3
801c9b8: f000 f971 bl 801cc9e <memcpy>
SMEMCPY(&ethhdr->src, src, ETH_HWADDR_LEN);
801c9bc: 693b ldr r3, [r7, #16]
801c9be: 3306 adds r3, #6
801c9c0: 2206 movs r2, #6
801c9c2: 6879 ldr r1, [r7, #4]
801c9c4: 4618 mov r0, r3
801c9c6: f000 f96a bl 801cc9e <memcpy>
LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
801c9ca: 68fb ldr r3, [r7, #12]
801c9cc: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
801c9d0: 2b06 cmp r3, #6
801c9d2: d006 beq.n 801c9e2 <ethernet_output+0x66>
801c9d4: 4b0a ldr r3, [pc, #40] ; (801ca00 <ethernet_output+0x84>)
801c9d6: f240 1233 movw r2, #307 ; 0x133
801c9da: 490a ldr r1, [pc, #40] ; (801ca04 <ethernet_output+0x88>)
801c9dc: 480a ldr r0, [pc, #40] ; (801ca08 <ethernet_output+0x8c>)
801c9de: f000 f98b bl 801ccf8 <iprintf>
(netif->hwaddr_len == ETH_HWADDR_LEN));
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE,
("ethernet_output: sending packet %p\n", (void *)p));
/* send the packet */
return netif->linkoutput(netif, p);
801c9e2: 68fb ldr r3, [r7, #12]
801c9e4: 699b ldr r3, [r3, #24]
801c9e6: 68b9 ldr r1, [r7, #8]
801c9e8: 68f8 ldr r0, [r7, #12]
801c9ea: 4798 blx r3
801c9ec: 4603 mov r3, r0
801c9ee: e002 b.n 801c9f6 <ethernet_output+0x7a>
goto pbuf_header_failed;
801c9f0: bf00 nop
pbuf_header_failed:
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
("ethernet_output: could not allocate room for header.\n"));
LINK_STATS_INC(link.lenerr);
return ERR_BUF;
801c9f2: f06f 0301 mvn.w r3, #1
}
801c9f6: 4618 mov r0, r3
801c9f8: 3718 adds r7, #24
801c9fa: 46bd mov sp, r7
801c9fc: bd80 pop {r7, pc}
801c9fe: bf00 nop
801ca00: 08020da8 .word 0x08020da8
801ca04: 08020de0 .word 0x08020de0
801ca08: 08020e14 .word 0x08020e14
0801ca0c <sys_mbox_new>:
#endif
/*-----------------------------------------------------------------------------------*/
// Creates an empty mailbox.
err_t sys_mbox_new(sys_mbox_t *mbox, int size)
{
801ca0c: b580 push {r7, lr}
801ca0e: b086 sub sp, #24
801ca10: af00 add r7, sp, #0
801ca12: 6078 str r0, [r7, #4]
801ca14: 6039 str r1, [r7, #0]
#if (osCMSIS < 0x20000U)
osMessageQDef(QUEUE, size, void *);
801ca16: 683b ldr r3, [r7, #0]
801ca18: 60bb str r3, [r7, #8]
801ca1a: 2304 movs r3, #4
801ca1c: 60fb str r3, [r7, #12]
801ca1e: 2300 movs r3, #0
801ca20: 613b str r3, [r7, #16]
801ca22: 2300 movs r3, #0
801ca24: 617b str r3, [r7, #20]
*mbox = osMessageCreate(osMessageQ(QUEUE), NULL);
801ca26: f107 0308 add.w r3, r7, #8
801ca2a: 2100 movs r1, #0
801ca2c: 4618 mov r0, r3
801ca2e: f7f0 fff7 bl 800da20 <osMessageCreate>
801ca32: 4602 mov r2, r0
801ca34: 687b ldr r3, [r7, #4]
801ca36: 601a str r2, [r3, #0]
if(lwip_stats.sys.mbox.max < lwip_stats.sys.mbox.used)
{
lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used;
}
#endif /* SYS_STATS */
if(*mbox == NULL)
801ca38: 687b ldr r3, [r7, #4]
801ca3a: 681b ldr r3, [r3, #0]
801ca3c: 2b00 cmp r3, #0
801ca3e: d102 bne.n 801ca46 <sys_mbox_new+0x3a>
return ERR_MEM;
801ca40: f04f 33ff mov.w r3, #4294967295
801ca44: e000 b.n 801ca48 <sys_mbox_new+0x3c>
return ERR_OK;
801ca46: 2300 movs r3, #0
}
801ca48: 4618 mov r0, r3
801ca4a: 3718 adds r7, #24
801ca4c: 46bd mov sp, r7
801ca4e: bd80 pop {r7, pc}
0801ca50 <sys_mbox_trypost>:
/*-----------------------------------------------------------------------------------*/
// Try to post the "msg" to the mailbox.
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
{
801ca50: b580 push {r7, lr}
801ca52: b084 sub sp, #16
801ca54: af00 add r7, sp, #0
801ca56: 6078 str r0, [r7, #4]
801ca58: 6039 str r1, [r7, #0]
err_t result;
#if (osCMSIS < 0x20000U)
if(osMessagePut(*mbox, (uint32_t)msg, 0) == osOK)
801ca5a: 687b ldr r3, [r7, #4]
801ca5c: 681b ldr r3, [r3, #0]
801ca5e: 6839 ldr r1, [r7, #0]
801ca60: 2200 movs r2, #0
801ca62: 4618 mov r0, r3
801ca64: f7f1 f806 bl 800da74 <osMessagePut>
801ca68: 4603 mov r3, r0
801ca6a: 2b00 cmp r3, #0
801ca6c: d102 bne.n 801ca74 <sys_mbox_trypost+0x24>
#else
if(osMessageQueuePut(*mbox, &msg, 0, 0) == osOK)
#endif
{
result = ERR_OK;
801ca6e: 2300 movs r3, #0
801ca70: 73fb strb r3, [r7, #15]
801ca72: e001 b.n 801ca78 <sys_mbox_trypost+0x28>
}
else
{
// could not post, queue must be full
result = ERR_MEM;
801ca74: 23ff movs r3, #255 ; 0xff
801ca76: 73fb strb r3, [r7, #15]
#if SYS_STATS
lwip_stats.sys.mbox.err++;
#endif /* SYS_STATS */
}
return result;
801ca78: f997 300f ldrsb.w r3, [r7, #15]
}
801ca7c: 4618 mov r0, r3
801ca7e: 3710 adds r7, #16
801ca80: 46bd mov sp, r7
801ca82: bd80 pop {r7, pc}
0801ca84 <sys_arch_mbox_fetch>:
Note that a function with a similar name, sys_mbox_fetch(), is
implemented by lwIP.
*/
u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
{
801ca84: b580 push {r7, lr}
801ca86: b08c sub sp, #48 ; 0x30
801ca88: af00 add r7, sp, #0
801ca8a: 61f8 str r0, [r7, #28]
801ca8c: 61b9 str r1, [r7, #24]
801ca8e: 617a str r2, [r7, #20]
#if (osCMSIS < 0x20000U)
osEvent event;
uint32_t starttime = osKernelSysTick();
801ca90: f7f0 fdf5 bl 800d67e <osKernelSysTick>
801ca94: 62f8 str r0, [r7, #44] ; 0x2c
#else
osStatus_t status;
uint32_t starttime = osKernelGetTickCount();
#endif
if(timeout != 0)
801ca96: 697b ldr r3, [r7, #20]
801ca98: 2b00 cmp r3, #0
801ca9a: d017 beq.n 801cacc <sys_arch_mbox_fetch+0x48>
{
#if (osCMSIS < 0x20000U)
event = osMessageGet (*mbox, timeout);
801ca9c: 69fb ldr r3, [r7, #28]
801ca9e: 6819 ldr r1, [r3, #0]
801caa0: f107 0320 add.w r3, r7, #32
801caa4: 697a ldr r2, [r7, #20]
801caa6: 4618 mov r0, r3
801caa8: f7f1 f824 bl 800daf4 <osMessageGet>
if(event.status == osEventMessage)
801caac: 6a3b ldr r3, [r7, #32]
801caae: 2b10 cmp r3, #16
801cab0: d109 bne.n 801cac6 <sys_arch_mbox_fetch+0x42>
{
*msg = (void *)event.value.v;
801cab2: 6a7b ldr r3, [r7, #36] ; 0x24
801cab4: 461a mov r2, r3
801cab6: 69bb ldr r3, [r7, #24]
801cab8: 601a str r2, [r3, #0]
return (osKernelSysTick() - starttime);
801caba: f7f0 fde0 bl 800d67e <osKernelSysTick>
801cabe: 4602 mov r2, r0
801cac0: 6afb ldr r3, [r7, #44] ; 0x2c
801cac2: 1ad3 subs r3, r2, r3
801cac4: e019 b.n 801cafa <sys_arch_mbox_fetch+0x76>
return (osKernelGetTickCount() - starttime);
}
#endif
else
{
return SYS_ARCH_TIMEOUT;
801cac6: f04f 33ff mov.w r3, #4294967295
801caca: e016 b.n 801cafa <sys_arch_mbox_fetch+0x76>
}
}
else
{
#if (osCMSIS < 0x20000U)
event = osMessageGet (*mbox, osWaitForever);
801cacc: 69fb ldr r3, [r7, #28]
801cace: 6819 ldr r1, [r3, #0]
801cad0: 463b mov r3, r7
801cad2: f04f 32ff mov.w r2, #4294967295
801cad6: 4618 mov r0, r3
801cad8: f7f1 f80c bl 800daf4 <osMessageGet>
801cadc: f107 0320 add.w r3, r7, #32
801cae0: 463a mov r2, r7
801cae2: ca07 ldmia r2, {r0, r1, r2}
801cae4: e883 0007 stmia.w r3, {r0, r1, r2}
*msg = (void *)event.value.v;
801cae8: 6a7b ldr r3, [r7, #36] ; 0x24
801caea: 461a mov r2, r3
801caec: 69bb ldr r3, [r7, #24]
801caee: 601a str r2, [r3, #0]
return (osKernelSysTick() - starttime);
801caf0: f7f0 fdc5 bl 800d67e <osKernelSysTick>
801caf4: 4602 mov r2, r0
801caf6: 6afb ldr r3, [r7, #44] ; 0x2c
801caf8: 1ad3 subs r3, r2, r3
#else
osMessageQueueGet(*mbox, msg, 0, osWaitForever );
return (osKernelGetTickCount() - starttime);
#endif
}
}
801cafa: 4618 mov r0, r3
801cafc: 3730 adds r7, #48 ; 0x30
801cafe: 46bd mov sp, r7
801cb00: bd80 pop {r7, pc}
0801cb02 <sys_mbox_valid>:
return SYS_MBOX_EMPTY;
}
}
/*----------------------------------------------------------------------------------*/
int sys_mbox_valid(sys_mbox_t *mbox)
{
801cb02: b480 push {r7}
801cb04: b083 sub sp, #12
801cb06: af00 add r7, sp, #0
801cb08: 6078 str r0, [r7, #4]
if (*mbox == SYS_MBOX_NULL)
801cb0a: 687b ldr r3, [r7, #4]
801cb0c: 681b ldr r3, [r3, #0]
801cb0e: 2b00 cmp r3, #0
801cb10: d101 bne.n 801cb16 <sys_mbox_valid+0x14>
return 0;
801cb12: 2300 movs r3, #0
801cb14: e000 b.n 801cb18 <sys_mbox_valid+0x16>
else
return 1;
801cb16: 2301 movs r3, #1
}
801cb18: 4618 mov r0, r3
801cb1a: 370c adds r7, #12
801cb1c: 46bd mov sp, r7
801cb1e: f85d 7b04 ldr.w r7, [sp], #4
801cb22: 4770 bx lr
0801cb24 <sys_init>:
#else
osMutexId_t lwip_sys_mutex;
#endif
// Initialize sys arch
void sys_init(void)
{
801cb24: b580 push {r7, lr}
801cb26: af00 add r7, sp, #0
#if (osCMSIS < 0x20000U)
lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex));
801cb28: 4803 ldr r0, [pc, #12] ; (801cb38 <sys_init+0x14>)
801cb2a: f7f0 fe18 bl 800d75e <osMutexCreate>
801cb2e: 4602 mov r2, r0
801cb30: 4b02 ldr r3, [pc, #8] ; (801cb3c <sys_init+0x18>)
801cb32: 601a str r2, [r3, #0]
#else
lwip_sys_mutex = osMutexNew(NULL);
#endif
}
801cb34: bf00 nop
801cb36: bd80 pop {r7, pc}
801cb38: 08022ec0 .word 0x08022ec0
801cb3c: 2000f844 .word 0x2000f844
0801cb40 <sys_mutex_new>:
/* Mutexes*/
/*-----------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------*/
#if LWIP_COMPAT_MUTEX == 0
/* Create a new mutex*/
err_t sys_mutex_new(sys_mutex_t *mutex) {
801cb40: b580 push {r7, lr}
801cb42: b084 sub sp, #16
801cb44: af00 add r7, sp, #0
801cb46: 6078 str r0, [r7, #4]
#if (osCMSIS < 0x20000U)
osMutexDef(MUTEX);
801cb48: 2300 movs r3, #0
801cb4a: 60bb str r3, [r7, #8]
801cb4c: 2300 movs r3, #0
801cb4e: 60fb str r3, [r7, #12]
*mutex = osMutexCreate(osMutex(MUTEX));
801cb50: f107 0308 add.w r3, r7, #8
801cb54: 4618 mov r0, r3
801cb56: f7f0 fe02 bl 800d75e <osMutexCreate>
801cb5a: 4602 mov r2, r0
801cb5c: 687b ldr r3, [r7, #4]
801cb5e: 601a str r2, [r3, #0]
#else
*mutex = osMutexNew(NULL);
#endif
if(*mutex == NULL)
801cb60: 687b ldr r3, [r7, #4]
801cb62: 681b ldr r3, [r3, #0]
801cb64: 2b00 cmp r3, #0
801cb66: d102 bne.n 801cb6e <sys_mutex_new+0x2e>
{
#if SYS_STATS
++lwip_stats.sys.mutex.err;
#endif /* SYS_STATS */
return ERR_MEM;
801cb68: f04f 33ff mov.w r3, #4294967295
801cb6c: e000 b.n 801cb70 <sys_mutex_new+0x30>
++lwip_stats.sys.mutex.used;
if (lwip_stats.sys.mutex.max < lwip_stats.sys.mutex.used) {
lwip_stats.sys.mutex.max = lwip_stats.sys.mutex.used;
}
#endif /* SYS_STATS */
return ERR_OK;
801cb6e: 2300 movs r3, #0
}
801cb70: 4618 mov r0, r3
801cb72: 3710 adds r7, #16
801cb74: 46bd mov sp, r7
801cb76: bd80 pop {r7, pc}
0801cb78 <sys_mutex_lock>:
osMutexDelete(*mutex);
}
/*-----------------------------------------------------------------------------------*/
/* Lock a mutex*/
void sys_mutex_lock(sys_mutex_t *mutex)
{
801cb78: b580 push {r7, lr}
801cb7a: b082 sub sp, #8
801cb7c: af00 add r7, sp, #0
801cb7e: 6078 str r0, [r7, #4]
#if (osCMSIS < 0x20000U)
osMutexWait(*mutex, osWaitForever);
801cb80: 687b ldr r3, [r7, #4]
801cb82: 681b ldr r3, [r3, #0]
801cb84: f04f 31ff mov.w r1, #4294967295
801cb88: 4618 mov r0, r3
801cb8a: f7f0 fe01 bl 800d790 <osMutexWait>
#else
osMutexAcquire(*mutex, osWaitForever);
#endif
}
801cb8e: bf00 nop
801cb90: 3708 adds r7, #8
801cb92: 46bd mov sp, r7
801cb94: bd80 pop {r7, pc}
0801cb96 <sys_mutex_unlock>:
/*-----------------------------------------------------------------------------------*/
/* Unlock a mutex*/
void sys_mutex_unlock(sys_mutex_t *mutex)
{
801cb96: b580 push {r7, lr}
801cb98: b082 sub sp, #8
801cb9a: af00 add r7, sp, #0
801cb9c: 6078 str r0, [r7, #4]
osMutexRelease(*mutex);
801cb9e: 687b ldr r3, [r7, #4]
801cba0: 681b ldr r3, [r3, #0]
801cba2: 4618 mov r0, r3
801cba4: f7f0 fe42 bl 800d82c <osMutexRelease>
}
801cba8: bf00 nop
801cbaa: 3708 adds r7, #8
801cbac: 46bd mov sp, r7
801cbae: bd80 pop {r7, pc}
0801cbb0 <sys_thread_new>:
function "thread()". The "arg" argument will be passed as an argument to the
thread() function. The id of the new thread is returned. Both the id and
the priority are system dependent.
*/
sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread , void *arg, int stacksize, int prio)
{
801cbb0: b580 push {r7, lr}
801cbb2: b08c sub sp, #48 ; 0x30
801cbb4: af00 add r7, sp, #0
801cbb6: 60f8 str r0, [r7, #12]
801cbb8: 60b9 str r1, [r7, #8]
801cbba: 607a str r2, [r7, #4]
801cbbc: 603b str r3, [r7, #0]
#if (osCMSIS < 0x20000U)
const osThreadDef_t os_thread_def = { (char *)name, (os_pthread)thread, (osPriority)prio, 0, stacksize};
801cbbe: f107 0314 add.w r3, r7, #20
801cbc2: 2200 movs r2, #0
801cbc4: 601a str r2, [r3, #0]
801cbc6: 605a str r2, [r3, #4]
801cbc8: 609a str r2, [r3, #8]
801cbca: 60da str r2, [r3, #12]
801cbcc: 611a str r2, [r3, #16]
801cbce: 615a str r2, [r3, #20]
801cbd0: 619a str r2, [r3, #24]
801cbd2: 68fb ldr r3, [r7, #12]
801cbd4: 617b str r3, [r7, #20]
801cbd6: 68bb ldr r3, [r7, #8]
801cbd8: 61bb str r3, [r7, #24]
801cbda: 6bbb ldr r3, [r7, #56] ; 0x38
801cbdc: b21b sxth r3, r3
801cbde: 83bb strh r3, [r7, #28]
801cbe0: 683b ldr r3, [r7, #0]
801cbe2: 627b str r3, [r7, #36] ; 0x24
return osThreadCreate(&os_thread_def, arg);
801cbe4: f107 0314 add.w r3, r7, #20
801cbe8: 6879 ldr r1, [r7, #4]
801cbea: 4618 mov r0, r3
801cbec: f7f0 fd57 bl 800d69e <osThreadCreate>
801cbf0: 4603 mov r3, r0
.stack_size = stacksize,
.priority = (osPriority_t)prio,
};
return osThreadNew(thread, arg, &attributes);
#endif
}
801cbf2: 4618 mov r0, r3
801cbf4: 3730 adds r7, #48 ; 0x30
801cbf6: 46bd mov sp, r7
801cbf8: bd80 pop {r7, pc}
...
0801cbfc <sys_arch_protect>:
Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS
API is available
*/
sys_prot_t sys_arch_protect(void)
{
801cbfc: b580 push {r7, lr}
801cbfe: af00 add r7, sp, #0
#if (osCMSIS < 0x20000U)
osMutexWait(lwip_sys_mutex, osWaitForever);
801cc00: 4b04 ldr r3, [pc, #16] ; (801cc14 <sys_arch_protect+0x18>)
801cc02: 681b ldr r3, [r3, #0]
801cc04: f04f 31ff mov.w r1, #4294967295
801cc08: 4618 mov r0, r3
801cc0a: f7f0 fdc1 bl 800d790 <osMutexWait>
#else
osMutexAcquire(lwip_sys_mutex, osWaitForever);
#endif
return (sys_prot_t)1;
801cc0e: 2301 movs r3, #1
}
801cc10: 4618 mov r0, r3
801cc12: bd80 pop {r7, pc}
801cc14: 2000f844 .word 0x2000f844
0801cc18 <sys_arch_unprotect>:
Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS
API is available
*/
void sys_arch_unprotect(sys_prot_t pval)
{
801cc18: b580 push {r7, lr}
801cc1a: b082 sub sp, #8
801cc1c: af00 add r7, sp, #0
801cc1e: 6078 str r0, [r7, #4]
( void ) pval;
osMutexRelease(lwip_sys_mutex);
801cc20: 4b04 ldr r3, [pc, #16] ; (801cc34 <sys_arch_unprotect+0x1c>)
801cc22: 681b ldr r3, [r3, #0]
801cc24: 4618 mov r0, r3
801cc26: f7f0 fe01 bl 800d82c <osMutexRelease>
}
801cc2a: bf00 nop
801cc2c: 3708 adds r7, #8
801cc2e: 46bd mov sp, r7
801cc30: bd80 pop {r7, pc}
801cc32: bf00 nop
801cc34: 2000f844 .word 0x2000f844
0801cc38 <__libc_init_array>:
801cc38: b570 push {r4, r5, r6, lr}
801cc3a: 4e0d ldr r6, [pc, #52] ; (801cc70 <__libc_init_array+0x38>)
801cc3c: 4c0d ldr r4, [pc, #52] ; (801cc74 <__libc_init_array+0x3c>)
801cc3e: 1ba4 subs r4, r4, r6
801cc40: 10a4 asrs r4, r4, #2
801cc42: 2500 movs r5, #0
801cc44: 42a5 cmp r5, r4
801cc46: d109 bne.n 801cc5c <__libc_init_array+0x24>
801cc48: 4e0b ldr r6, [pc, #44] ; (801cc78 <__libc_init_array+0x40>)
801cc4a: 4c0c ldr r4, [pc, #48] ; (801cc7c <__libc_init_array+0x44>)
801cc4c: f001 f914 bl 801de78 <_init>
801cc50: 1ba4 subs r4, r4, r6
801cc52: 10a4 asrs r4, r4, #2
801cc54: 2500 movs r5, #0
801cc56: 42a5 cmp r5, r4
801cc58: d105 bne.n 801cc66 <__libc_init_array+0x2e>
801cc5a: bd70 pop {r4, r5, r6, pc}
801cc5c: f856 3025 ldr.w r3, [r6, r5, lsl #2]
801cc60: 4798 blx r3
801cc62: 3501 adds r5, #1
801cc64: e7ee b.n 801cc44 <__libc_init_array+0xc>
801cc66: f856 3025 ldr.w r3, [r6, r5, lsl #2]
801cc6a: 4798 blx r3
801cc6c: 3501 adds r5, #1
801cc6e: e7f2 b.n 801cc56 <__libc_init_array+0x1e>
801cc70: 08022f68 .word 0x08022f68
801cc74: 08022f68 .word 0x08022f68
801cc78: 08022f68 .word 0x08022f68
801cc7c: 08022f6c .word 0x08022f6c
0801cc80 <memcmp>:
801cc80: b530 push {r4, r5, lr}
801cc82: 2400 movs r4, #0
801cc84: 42a2 cmp r2, r4
801cc86: d101 bne.n 801cc8c <memcmp+0xc>
801cc88: 2000 movs r0, #0
801cc8a: e007 b.n 801cc9c <memcmp+0x1c>
801cc8c: 5d03 ldrb r3, [r0, r4]
801cc8e: 3401 adds r4, #1
801cc90: 190d adds r5, r1, r4
801cc92: f815 5c01 ldrb.w r5, [r5, #-1]
801cc96: 42ab cmp r3, r5
801cc98: d0f4 beq.n 801cc84 <memcmp+0x4>
801cc9a: 1b58 subs r0, r3, r5
801cc9c: bd30 pop {r4, r5, pc}
0801cc9e <memcpy>:
801cc9e: b510 push {r4, lr}
801cca0: 1e43 subs r3, r0, #1
801cca2: 440a add r2, r1
801cca4: 4291 cmp r1, r2
801cca6: d100 bne.n 801ccaa <memcpy+0xc>
801cca8: bd10 pop {r4, pc}
801ccaa: f811 4b01 ldrb.w r4, [r1], #1
801ccae: f803 4f01 strb.w r4, [r3, #1]!
801ccb2: e7f7 b.n 801cca4 <memcpy+0x6>
0801ccb4 <memmove>:
801ccb4: 4288 cmp r0, r1
801ccb6: b510 push {r4, lr}
801ccb8: eb01 0302 add.w r3, r1, r2
801ccbc: d807 bhi.n 801ccce <memmove+0x1a>
801ccbe: 1e42 subs r2, r0, #1
801ccc0: 4299 cmp r1, r3
801ccc2: d00a beq.n 801ccda <memmove+0x26>
801ccc4: f811 4b01 ldrb.w r4, [r1], #1
801ccc8: f802 4f01 strb.w r4, [r2, #1]!
801cccc: e7f8 b.n 801ccc0 <memmove+0xc>
801ccce: 4283 cmp r3, r0
801ccd0: d9f5 bls.n 801ccbe <memmove+0xa>
801ccd2: 1881 adds r1, r0, r2
801ccd4: 1ad2 subs r2, r2, r3
801ccd6: 42d3 cmn r3, r2
801ccd8: d100 bne.n 801ccdc <memmove+0x28>
801ccda: bd10 pop {r4, pc}
801ccdc: f813 4d01 ldrb.w r4, [r3, #-1]!
801cce0: f801 4d01 strb.w r4, [r1, #-1]!
801cce4: e7f7 b.n 801ccd6 <memmove+0x22>
0801cce6 <memset>:
801cce6: 4402 add r2, r0
801cce8: 4603 mov r3, r0
801ccea: 4293 cmp r3, r2
801ccec: d100 bne.n 801ccf0 <memset+0xa>
801ccee: 4770 bx lr
801ccf0: f803 1b01 strb.w r1, [r3], #1
801ccf4: e7f9 b.n 801ccea <memset+0x4>
...
0801ccf8 <iprintf>:
801ccf8: b40f push {r0, r1, r2, r3}
801ccfa: 4b0a ldr r3, [pc, #40] ; (801cd24 <iprintf+0x2c>)
801ccfc: b513 push {r0, r1, r4, lr}
801ccfe: 681c ldr r4, [r3, #0]
801cd00: b124 cbz r4, 801cd0c <iprintf+0x14>
801cd02: 69a3 ldr r3, [r4, #24]
801cd04: b913 cbnz r3, 801cd0c <iprintf+0x14>
801cd06: 4620 mov r0, r4
801cd08: f000 f8a2 bl 801ce50 <__sinit>
801cd0c: ab05 add r3, sp, #20
801cd0e: 9a04 ldr r2, [sp, #16]
801cd10: 68a1 ldr r1, [r4, #8]
801cd12: 9301 str r3, [sp, #4]
801cd14: 4620 mov r0, r4
801cd16: f000 fb51 bl 801d3bc <_vfiprintf_r>
801cd1a: b002 add sp, #8
801cd1c: e8bd 4010 ldmia.w sp!, {r4, lr}
801cd20: b004 add sp, #16
801cd22: 4770 bx lr
801cd24: 20000084 .word 0x20000084
0801cd28 <rand>:
801cd28: b538 push {r3, r4, r5, lr}
801cd2a: 4b13 ldr r3, [pc, #76] ; (801cd78 <rand+0x50>)
801cd2c: 681c ldr r4, [r3, #0]
801cd2e: 6ba3 ldr r3, [r4, #56] ; 0x38
801cd30: b97b cbnz r3, 801cd52 <rand+0x2a>
801cd32: 2018 movs r0, #24
801cd34: f000 f916 bl 801cf64 <malloc>
801cd38: 4a10 ldr r2, [pc, #64] ; (801cd7c <rand+0x54>)
801cd3a: 4b11 ldr r3, [pc, #68] ; (801cd80 <rand+0x58>)
801cd3c: 63a0 str r0, [r4, #56] ; 0x38
801cd3e: e9c0 2300 strd r2, r3, [r0]
801cd42: 4b10 ldr r3, [pc, #64] ; (801cd84 <rand+0x5c>)
801cd44: 6083 str r3, [r0, #8]
801cd46: 230b movs r3, #11
801cd48: 8183 strh r3, [r0, #12]
801cd4a: 2201 movs r2, #1
801cd4c: 2300 movs r3, #0
801cd4e: e9c0 2304 strd r2, r3, [r0, #16]
801cd52: 6ba1 ldr r1, [r4, #56] ; 0x38
801cd54: 480c ldr r0, [pc, #48] ; (801cd88 <rand+0x60>)
801cd56: 690a ldr r2, [r1, #16]
801cd58: 694b ldr r3, [r1, #20]
801cd5a: 4c0c ldr r4, [pc, #48] ; (801cd8c <rand+0x64>)
801cd5c: 4350 muls r0, r2
801cd5e: fb04 0003 mla r0, r4, r3, r0
801cd62: fba2 2304 umull r2, r3, r2, r4
801cd66: 4403 add r3, r0
801cd68: 1c54 adds r4, r2, #1
801cd6a: f143 0500 adc.w r5, r3, #0
801cd6e: e9c1 4504 strd r4, r5, [r1, #16]
801cd72: f025 4000 bic.w r0, r5, #2147483648 ; 0x80000000
801cd76: bd38 pop {r3, r4, r5, pc}
801cd78: 20000084 .word 0x20000084
801cd7c: abcd330e .word 0xabcd330e
801cd80: e66d1234 .word 0xe66d1234
801cd84: 0005deec .word 0x0005deec
801cd88: 5851f42d .word 0x5851f42d
801cd8c: 4c957f2d .word 0x4c957f2d
0801cd90 <siprintf>:
801cd90: b40e push {r1, r2, r3}
801cd92: b500 push {lr}
801cd94: b09c sub sp, #112 ; 0x70
801cd96: ab1d add r3, sp, #116 ; 0x74
801cd98: 9002 str r0, [sp, #8]
801cd9a: 9006 str r0, [sp, #24]
801cd9c: f06f 4100 mvn.w r1, #2147483648 ; 0x80000000
801cda0: 4809 ldr r0, [pc, #36] ; (801cdc8 <siprintf+0x38>)
801cda2: 9107 str r1, [sp, #28]
801cda4: 9104 str r1, [sp, #16]
801cda6: 4909 ldr r1, [pc, #36] ; (801cdcc <siprintf+0x3c>)
801cda8: f853 2b04 ldr.w r2, [r3], #4
801cdac: 9105 str r1, [sp, #20]
801cdae: 6800 ldr r0, [r0, #0]
801cdb0: 9301 str r3, [sp, #4]
801cdb2: a902 add r1, sp, #8
801cdb4: f000 f9e0 bl 801d178 <_svfiprintf_r>
801cdb8: 9b02 ldr r3, [sp, #8]
801cdba: 2200 movs r2, #0
801cdbc: 701a strb r2, [r3, #0]
801cdbe: b01c add sp, #112 ; 0x70
801cdc0: f85d eb04 ldr.w lr, [sp], #4
801cdc4: b003 add sp, #12
801cdc6: 4770 bx lr
801cdc8: 20000084 .word 0x20000084
801cdcc: ffff0208 .word 0xffff0208
0801cdd0 <std>:
801cdd0: 2300 movs r3, #0
801cdd2: b510 push {r4, lr}
801cdd4: 4604 mov r4, r0
801cdd6: e9c0 3300 strd r3, r3, [r0]
801cdda: 6083 str r3, [r0, #8]
801cddc: 8181 strh r1, [r0, #12]
801cdde: 6643 str r3, [r0, #100] ; 0x64
801cde0: 81c2 strh r2, [r0, #14]
801cde2: e9c0 3304 strd r3, r3, [r0, #16]
801cde6: 6183 str r3, [r0, #24]
801cde8: 4619 mov r1, r3
801cdea: 2208 movs r2, #8
801cdec: 305c adds r0, #92 ; 0x5c
801cdee: f7ff ff7a bl 801cce6 <memset>
801cdf2: 4b05 ldr r3, [pc, #20] ; (801ce08 <std+0x38>)
801cdf4: 6263 str r3, [r4, #36] ; 0x24
801cdf6: 4b05 ldr r3, [pc, #20] ; (801ce0c <std+0x3c>)
801cdf8: 62a3 str r3, [r4, #40] ; 0x28
801cdfa: 4b05 ldr r3, [pc, #20] ; (801ce10 <std+0x40>)
801cdfc: 62e3 str r3, [r4, #44] ; 0x2c
801cdfe: 4b05 ldr r3, [pc, #20] ; (801ce14 <std+0x44>)
801ce00: 6224 str r4, [r4, #32]
801ce02: 6323 str r3, [r4, #48] ; 0x30
801ce04: bd10 pop {r4, pc}
801ce06: bf00 nop
801ce08: 0801d919 .word 0x0801d919
801ce0c: 0801d93b .word 0x0801d93b
801ce10: 0801d973 .word 0x0801d973
801ce14: 0801d997 .word 0x0801d997
0801ce18 <_cleanup_r>:
801ce18: 4901 ldr r1, [pc, #4] ; (801ce20 <_cleanup_r+0x8>)
801ce1a: f000 b885 b.w 801cf28 <_fwalk_reent>
801ce1e: bf00 nop
801ce20: 0801dc71 .word 0x0801dc71
0801ce24 <__sfmoreglue>:
801ce24: b570 push {r4, r5, r6, lr}
801ce26: 1e4a subs r2, r1, #1
801ce28: 2568 movs r5, #104 ; 0x68
801ce2a: 4355 muls r5, r2
801ce2c: 460e mov r6, r1
801ce2e: f105 0174 add.w r1, r5, #116 ; 0x74
801ce32: f000 f8ed bl 801d010 <_malloc_r>
801ce36: 4604 mov r4, r0
801ce38: b140 cbz r0, 801ce4c <__sfmoreglue+0x28>
801ce3a: 2100 movs r1, #0
801ce3c: e9c0 1600 strd r1, r6, [r0]
801ce40: 300c adds r0, #12
801ce42: 60a0 str r0, [r4, #8]
801ce44: f105 0268 add.w r2, r5, #104 ; 0x68
801ce48: f7ff ff4d bl 801cce6 <memset>
801ce4c: 4620 mov r0, r4
801ce4e: bd70 pop {r4, r5, r6, pc}
0801ce50 <__sinit>:
801ce50: 6983 ldr r3, [r0, #24]
801ce52: b510 push {r4, lr}
801ce54: 4604 mov r4, r0
801ce56: bb33 cbnz r3, 801cea6 <__sinit+0x56>
801ce58: e9c0 3312 strd r3, r3, [r0, #72] ; 0x48
801ce5c: 6503 str r3, [r0, #80] ; 0x50
801ce5e: 4b12 ldr r3, [pc, #72] ; (801cea8 <__sinit+0x58>)
801ce60: 4a12 ldr r2, [pc, #72] ; (801ceac <__sinit+0x5c>)
801ce62: 681b ldr r3, [r3, #0]
801ce64: 6282 str r2, [r0, #40] ; 0x28
801ce66: 4298 cmp r0, r3
801ce68: bf04 itt eq
801ce6a: 2301 moveq r3, #1
801ce6c: 6183 streq r3, [r0, #24]
801ce6e: f000 f81f bl 801ceb0 <__sfp>
801ce72: 6060 str r0, [r4, #4]
801ce74: 4620 mov r0, r4
801ce76: f000 f81b bl 801ceb0 <__sfp>
801ce7a: 60a0 str r0, [r4, #8]
801ce7c: 4620 mov r0, r4
801ce7e: f000 f817 bl 801ceb0 <__sfp>
801ce82: 2200 movs r2, #0
801ce84: 60e0 str r0, [r4, #12]
801ce86: 2104 movs r1, #4
801ce88: 6860 ldr r0, [r4, #4]
801ce8a: f7ff ffa1 bl 801cdd0 <std>
801ce8e: 2201 movs r2, #1
801ce90: 2109 movs r1, #9
801ce92: 68a0 ldr r0, [r4, #8]
801ce94: f7ff ff9c bl 801cdd0 <std>
801ce98: 2202 movs r2, #2
801ce9a: 2112 movs r1, #18
801ce9c: 68e0 ldr r0, [r4, #12]
801ce9e: f7ff ff97 bl 801cdd0 <std>
801cea2: 2301 movs r3, #1
801cea4: 61a3 str r3, [r4, #24]
801cea6: bd10 pop {r4, pc}
801cea8: 08022ec8 .word 0x08022ec8
801ceac: 0801ce19 .word 0x0801ce19
0801ceb0 <__sfp>:
801ceb0: b5f8 push {r3, r4, r5, r6, r7, lr}
801ceb2: 4b1b ldr r3, [pc, #108] ; (801cf20 <__sfp+0x70>)
801ceb4: 681e ldr r6, [r3, #0]
801ceb6: 69b3 ldr r3, [r6, #24]
801ceb8: 4607 mov r7, r0
801ceba: b913 cbnz r3, 801cec2 <__sfp+0x12>
801cebc: 4630 mov r0, r6
801cebe: f7ff ffc7 bl 801ce50 <__sinit>
801cec2: 3648 adds r6, #72 ; 0x48
801cec4: e9d6 3401 ldrd r3, r4, [r6, #4]
801cec8: 3b01 subs r3, #1
801ceca: d503 bpl.n 801ced4 <__sfp+0x24>
801cecc: 6833 ldr r3, [r6, #0]
801cece: b133 cbz r3, 801cede <__sfp+0x2e>
801ced0: 6836 ldr r6, [r6, #0]
801ced2: e7f7 b.n 801cec4 <__sfp+0x14>
801ced4: f9b4 500c ldrsh.w r5, [r4, #12]
801ced8: b16d cbz r5, 801cef6 <__sfp+0x46>
801ceda: 3468 adds r4, #104 ; 0x68
801cedc: e7f4 b.n 801cec8 <__sfp+0x18>
801cede: 2104 movs r1, #4
801cee0: 4638 mov r0, r7
801cee2: f7ff ff9f bl 801ce24 <__sfmoreglue>
801cee6: 6030 str r0, [r6, #0]
801cee8: 2800 cmp r0, #0
801ceea: d1f1 bne.n 801ced0 <__sfp+0x20>
801ceec: 230c movs r3, #12
801ceee: 603b str r3, [r7, #0]
801cef0: 4604 mov r4, r0
801cef2: 4620 mov r0, r4
801cef4: bdf8 pop {r3, r4, r5, r6, r7, pc}
801cef6: 4b0b ldr r3, [pc, #44] ; (801cf24 <__sfp+0x74>)
801cef8: 6665 str r5, [r4, #100] ; 0x64
801cefa: e9c4 5500 strd r5, r5, [r4]
801cefe: 60a5 str r5, [r4, #8]
801cf00: e9c4 3503 strd r3, r5, [r4, #12]
801cf04: e9c4 5505 strd r5, r5, [r4, #20]
801cf08: 2208 movs r2, #8
801cf0a: 4629 mov r1, r5
801cf0c: f104 005c add.w r0, r4, #92 ; 0x5c
801cf10: f7ff fee9 bl 801cce6 <memset>
801cf14: e9c4 550d strd r5, r5, [r4, #52] ; 0x34
801cf18: e9c4 5512 strd r5, r5, [r4, #72] ; 0x48
801cf1c: e7e9 b.n 801cef2 <__sfp+0x42>
801cf1e: bf00 nop
801cf20: 08022ec8 .word 0x08022ec8
801cf24: ffff0001 .word 0xffff0001
0801cf28 <_fwalk_reent>:
801cf28: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
801cf2c: 4680 mov r8, r0
801cf2e: 4689 mov r9, r1
801cf30: f100 0448 add.w r4, r0, #72 ; 0x48
801cf34: 2600 movs r6, #0
801cf36: b914 cbnz r4, 801cf3e <_fwalk_reent+0x16>
801cf38: 4630 mov r0, r6
801cf3a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
801cf3e: e9d4 7501 ldrd r7, r5, [r4, #4]
801cf42: 3f01 subs r7, #1
801cf44: d501 bpl.n 801cf4a <_fwalk_reent+0x22>
801cf46: 6824 ldr r4, [r4, #0]
801cf48: e7f5 b.n 801cf36 <_fwalk_reent+0xe>
801cf4a: 89ab ldrh r3, [r5, #12]
801cf4c: 2b01 cmp r3, #1
801cf4e: d907 bls.n 801cf60 <_fwalk_reent+0x38>
801cf50: f9b5 300e ldrsh.w r3, [r5, #14]
801cf54: 3301 adds r3, #1
801cf56: d003 beq.n 801cf60 <_fwalk_reent+0x38>
801cf58: 4629 mov r1, r5
801cf5a: 4640 mov r0, r8
801cf5c: 47c8 blx r9
801cf5e: 4306 orrs r6, r0
801cf60: 3568 adds r5, #104 ; 0x68
801cf62: e7ee b.n 801cf42 <_fwalk_reent+0x1a>
0801cf64 <malloc>:
801cf64: 4b02 ldr r3, [pc, #8] ; (801cf70 <malloc+0xc>)
801cf66: 4601 mov r1, r0
801cf68: 6818 ldr r0, [r3, #0]
801cf6a: f000 b851 b.w 801d010 <_malloc_r>
801cf6e: bf00 nop
801cf70: 20000084 .word 0x20000084
0801cf74 <_free_r>:
801cf74: b538 push {r3, r4, r5, lr}
801cf76: 4605 mov r5, r0
801cf78: 2900 cmp r1, #0
801cf7a: d045 beq.n 801d008 <_free_r+0x94>
801cf7c: f851 3c04 ldr.w r3, [r1, #-4]
801cf80: 1f0c subs r4, r1, #4
801cf82: 2b00 cmp r3, #0
801cf84: bfb8 it lt
801cf86: 18e4 addlt r4, r4, r3
801cf88: f000 ff12 bl 801ddb0 <__malloc_lock>
801cf8c: 4a1f ldr r2, [pc, #124] ; (801d00c <_free_r+0x98>)
801cf8e: 6813 ldr r3, [r2, #0]
801cf90: 4610 mov r0, r2
801cf92: b933 cbnz r3, 801cfa2 <_free_r+0x2e>
801cf94: 6063 str r3, [r4, #4]
801cf96: 6014 str r4, [r2, #0]
801cf98: 4628 mov r0, r5
801cf9a: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
801cf9e: f000 bf08 b.w 801ddb2 <__malloc_unlock>
801cfa2: 42a3 cmp r3, r4
801cfa4: d90c bls.n 801cfc0 <_free_r+0x4c>
801cfa6: 6821 ldr r1, [r4, #0]
801cfa8: 1862 adds r2, r4, r1
801cfaa: 4293 cmp r3, r2
801cfac: bf04 itt eq
801cfae: 681a ldreq r2, [r3, #0]
801cfb0: 685b ldreq r3, [r3, #4]
801cfb2: 6063 str r3, [r4, #4]
801cfb4: bf04 itt eq
801cfb6: 1852 addeq r2, r2, r1
801cfb8: 6022 streq r2, [r4, #0]
801cfba: 6004 str r4, [r0, #0]
801cfbc: e7ec b.n 801cf98 <_free_r+0x24>
801cfbe: 4613 mov r3, r2
801cfc0: 685a ldr r2, [r3, #4]
801cfc2: b10a cbz r2, 801cfc8 <_free_r+0x54>
801cfc4: 42a2 cmp r2, r4
801cfc6: d9fa bls.n 801cfbe <_free_r+0x4a>
801cfc8: 6819 ldr r1, [r3, #0]
801cfca: 1858 adds r0, r3, r1
801cfcc: 42a0 cmp r0, r4
801cfce: d10b bne.n 801cfe8 <_free_r+0x74>
801cfd0: 6820 ldr r0, [r4, #0]
801cfd2: 4401 add r1, r0
801cfd4: 1858 adds r0, r3, r1
801cfd6: 4282 cmp r2, r0
801cfd8: 6019 str r1, [r3, #0]
801cfda: d1dd bne.n 801cf98 <_free_r+0x24>
801cfdc: 6810 ldr r0, [r2, #0]
801cfde: 6852 ldr r2, [r2, #4]
801cfe0: 605a str r2, [r3, #4]
801cfe2: 4401 add r1, r0
801cfe4: 6019 str r1, [r3, #0]
801cfe6: e7d7 b.n 801cf98 <_free_r+0x24>
801cfe8: d902 bls.n 801cff0 <_free_r+0x7c>
801cfea: 230c movs r3, #12
801cfec: 602b str r3, [r5, #0]
801cfee: e7d3 b.n 801cf98 <_free_r+0x24>
801cff0: 6820 ldr r0, [r4, #0]
801cff2: 1821 adds r1, r4, r0
801cff4: 428a cmp r2, r1
801cff6: bf04 itt eq
801cff8: 6811 ldreq r1, [r2, #0]
801cffa: 6852 ldreq r2, [r2, #4]
801cffc: 6062 str r2, [r4, #4]
801cffe: bf04 itt eq
801d000: 1809 addeq r1, r1, r0
801d002: 6021 streq r1, [r4, #0]
801d004: 605c str r4, [r3, #4]
801d006: e7c7 b.n 801cf98 <_free_r+0x24>
801d008: bd38 pop {r3, r4, r5, pc}
801d00a: bf00 nop
801d00c: 20008874 .word 0x20008874
0801d010 <_malloc_r>:
801d010: b570 push {r4, r5, r6, lr}
801d012: 1ccd adds r5, r1, #3
801d014: f025 0503 bic.w r5, r5, #3
801d018: 3508 adds r5, #8
801d01a: 2d0c cmp r5, #12
801d01c: bf38 it cc
801d01e: 250c movcc r5, #12
801d020: 2d00 cmp r5, #0
801d022: 4606 mov r6, r0
801d024: db01 blt.n 801d02a <_malloc_r+0x1a>
801d026: 42a9 cmp r1, r5
801d028: d903 bls.n 801d032 <_malloc_r+0x22>
801d02a: 230c movs r3, #12
801d02c: 6033 str r3, [r6, #0]
801d02e: 2000 movs r0, #0
801d030: bd70 pop {r4, r5, r6, pc}
801d032: f000 febd bl 801ddb0 <__malloc_lock>
801d036: 4a21 ldr r2, [pc, #132] ; (801d0bc <_malloc_r+0xac>)
801d038: 6814 ldr r4, [r2, #0]
801d03a: 4621 mov r1, r4
801d03c: b991 cbnz r1, 801d064 <_malloc_r+0x54>
801d03e: 4c20 ldr r4, [pc, #128] ; (801d0c0 <_malloc_r+0xb0>)
801d040: 6823 ldr r3, [r4, #0]
801d042: b91b cbnz r3, 801d04c <_malloc_r+0x3c>
801d044: 4630 mov r0, r6
801d046: f000 fc57 bl 801d8f8 <_sbrk_r>
801d04a: 6020 str r0, [r4, #0]
801d04c: 4629 mov r1, r5
801d04e: 4630 mov r0, r6
801d050: f000 fc52 bl 801d8f8 <_sbrk_r>
801d054: 1c43 adds r3, r0, #1
801d056: d124 bne.n 801d0a2 <_malloc_r+0x92>
801d058: 230c movs r3, #12
801d05a: 6033 str r3, [r6, #0]
801d05c: 4630 mov r0, r6
801d05e: f000 fea8 bl 801ddb2 <__malloc_unlock>
801d062: e7e4 b.n 801d02e <_malloc_r+0x1e>
801d064: 680b ldr r3, [r1, #0]
801d066: 1b5b subs r3, r3, r5
801d068: d418 bmi.n 801d09c <_malloc_r+0x8c>
801d06a: 2b0b cmp r3, #11
801d06c: d90f bls.n 801d08e <_malloc_r+0x7e>
801d06e: 600b str r3, [r1, #0]
801d070: 50cd str r5, [r1, r3]
801d072: 18cc adds r4, r1, r3
801d074: 4630 mov r0, r6
801d076: f000 fe9c bl 801ddb2 <__malloc_unlock>
801d07a: f104 000b add.w r0, r4, #11
801d07e: 1d23 adds r3, r4, #4
801d080: f020 0007 bic.w r0, r0, #7
801d084: 1ac3 subs r3, r0, r3
801d086: d0d3 beq.n 801d030 <_malloc_r+0x20>
801d088: 425a negs r2, r3
801d08a: 50e2 str r2, [r4, r3]
801d08c: e7d0 b.n 801d030 <_malloc_r+0x20>
801d08e: 428c cmp r4, r1
801d090: 684b ldr r3, [r1, #4]
801d092: bf16 itet ne
801d094: 6063 strne r3, [r4, #4]
801d096: 6013 streq r3, [r2, #0]
801d098: 460c movne r4, r1
801d09a: e7eb b.n 801d074 <_malloc_r+0x64>
801d09c: 460c mov r4, r1
801d09e: 6849 ldr r1, [r1, #4]
801d0a0: e7cc b.n 801d03c <_malloc_r+0x2c>
801d0a2: 1cc4 adds r4, r0, #3
801d0a4: f024 0403 bic.w r4, r4, #3
801d0a8: 42a0 cmp r0, r4
801d0aa: d005 beq.n 801d0b8 <_malloc_r+0xa8>
801d0ac: 1a21 subs r1, r4, r0
801d0ae: 4630 mov r0, r6
801d0b0: f000 fc22 bl 801d8f8 <_sbrk_r>
801d0b4: 3001 adds r0, #1
801d0b6: d0cf beq.n 801d058 <_malloc_r+0x48>
801d0b8: 6025 str r5, [r4, #0]
801d0ba: e7db b.n 801d074 <_malloc_r+0x64>
801d0bc: 20008874 .word 0x20008874
801d0c0: 20008878 .word 0x20008878
0801d0c4 <__ssputs_r>:
801d0c4: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
801d0c8: 688e ldr r6, [r1, #8]
801d0ca: 429e cmp r6, r3
801d0cc: 4682 mov sl, r0
801d0ce: 460c mov r4, r1
801d0d0: 4690 mov r8, r2
801d0d2: 4699 mov r9, r3
801d0d4: d837 bhi.n 801d146 <__ssputs_r+0x82>
801d0d6: 898a ldrh r2, [r1, #12]
801d0d8: f412 6f90 tst.w r2, #1152 ; 0x480
801d0dc: d031 beq.n 801d142 <__ssputs_r+0x7e>
801d0de: 6825 ldr r5, [r4, #0]
801d0e0: 6909 ldr r1, [r1, #16]
801d0e2: 1a6f subs r7, r5, r1
801d0e4: 6965 ldr r5, [r4, #20]
801d0e6: 2302 movs r3, #2
801d0e8: eb05 0545 add.w r5, r5, r5, lsl #1
801d0ec: fb95 f5f3 sdiv r5, r5, r3
801d0f0: f109 0301 add.w r3, r9, #1
801d0f4: 443b add r3, r7
801d0f6: 429d cmp r5, r3
801d0f8: bf38 it cc
801d0fa: 461d movcc r5, r3
801d0fc: 0553 lsls r3, r2, #21
801d0fe: d530 bpl.n 801d162 <__ssputs_r+0x9e>
801d100: 4629 mov r1, r5
801d102: f7ff ff85 bl 801d010 <_malloc_r>
801d106: 4606 mov r6, r0
801d108: b950 cbnz r0, 801d120 <__ssputs_r+0x5c>
801d10a: 230c movs r3, #12
801d10c: f8ca 3000 str.w r3, [sl]
801d110: 89a3 ldrh r3, [r4, #12]
801d112: f043 0340 orr.w r3, r3, #64 ; 0x40
801d116: 81a3 strh r3, [r4, #12]
801d118: f04f 30ff mov.w r0, #4294967295
801d11c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
801d120: 463a mov r2, r7
801d122: 6921 ldr r1, [r4, #16]
801d124: f7ff fdbb bl 801cc9e <memcpy>
801d128: 89a3 ldrh r3, [r4, #12]
801d12a: f423 6390 bic.w r3, r3, #1152 ; 0x480
801d12e: f043 0380 orr.w r3, r3, #128 ; 0x80
801d132: 81a3 strh r3, [r4, #12]
801d134: 6126 str r6, [r4, #16]
801d136: 6165 str r5, [r4, #20]
801d138: 443e add r6, r7
801d13a: 1bed subs r5, r5, r7
801d13c: 6026 str r6, [r4, #0]
801d13e: 60a5 str r5, [r4, #8]
801d140: 464e mov r6, r9
801d142: 454e cmp r6, r9
801d144: d900 bls.n 801d148 <__ssputs_r+0x84>
801d146: 464e mov r6, r9
801d148: 4632 mov r2, r6
801d14a: 4641 mov r1, r8
801d14c: 6820 ldr r0, [r4, #0]
801d14e: f7ff fdb1 bl 801ccb4 <memmove>
801d152: 68a3 ldr r3, [r4, #8]
801d154: 1b9b subs r3, r3, r6
801d156: 60a3 str r3, [r4, #8]
801d158: 6823 ldr r3, [r4, #0]
801d15a: 441e add r6, r3
801d15c: 6026 str r6, [r4, #0]
801d15e: 2000 movs r0, #0
801d160: e7dc b.n 801d11c <__ssputs_r+0x58>
801d162: 462a mov r2, r5
801d164: f000 fe26 bl 801ddb4 <_realloc_r>
801d168: 4606 mov r6, r0
801d16a: 2800 cmp r0, #0
801d16c: d1e2 bne.n 801d134 <__ssputs_r+0x70>
801d16e: 6921 ldr r1, [r4, #16]
801d170: 4650 mov r0, sl
801d172: f7ff feff bl 801cf74 <_free_r>
801d176: e7c8 b.n 801d10a <__ssputs_r+0x46>
0801d178 <_svfiprintf_r>:
801d178: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
801d17c: 461d mov r5, r3
801d17e: 898b ldrh r3, [r1, #12]
801d180: 061f lsls r7, r3, #24
801d182: b09d sub sp, #116 ; 0x74
801d184: 4680 mov r8, r0
801d186: 460c mov r4, r1
801d188: 4616 mov r6, r2
801d18a: d50f bpl.n 801d1ac <_svfiprintf_r+0x34>
801d18c: 690b ldr r3, [r1, #16]
801d18e: b96b cbnz r3, 801d1ac <_svfiprintf_r+0x34>
801d190: 2140 movs r1, #64 ; 0x40
801d192: f7ff ff3d bl 801d010 <_malloc_r>
801d196: 6020 str r0, [r4, #0]
801d198: 6120 str r0, [r4, #16]
801d19a: b928 cbnz r0, 801d1a8 <_svfiprintf_r+0x30>
801d19c: 230c movs r3, #12
801d19e: f8c8 3000 str.w r3, [r8]
801d1a2: f04f 30ff mov.w r0, #4294967295
801d1a6: e0c8 b.n 801d33a <_svfiprintf_r+0x1c2>
801d1a8: 2340 movs r3, #64 ; 0x40
801d1aa: 6163 str r3, [r4, #20]
801d1ac: 2300 movs r3, #0
801d1ae: 9309 str r3, [sp, #36] ; 0x24
801d1b0: 2320 movs r3, #32
801d1b2: f88d 3029 strb.w r3, [sp, #41] ; 0x29
801d1b6: 2330 movs r3, #48 ; 0x30
801d1b8: f88d 302a strb.w r3, [sp, #42] ; 0x2a
801d1bc: 9503 str r5, [sp, #12]
801d1be: f04f 0b01 mov.w fp, #1
801d1c2: 4637 mov r7, r6
801d1c4: 463d mov r5, r7
801d1c6: f815 3b01 ldrb.w r3, [r5], #1
801d1ca: b10b cbz r3, 801d1d0 <_svfiprintf_r+0x58>
801d1cc: 2b25 cmp r3, #37 ; 0x25
801d1ce: d13e bne.n 801d24e <_svfiprintf_r+0xd6>
801d1d0: ebb7 0a06 subs.w sl, r7, r6
801d1d4: d00b beq.n 801d1ee <_svfiprintf_r+0x76>
801d1d6: 4653 mov r3, sl
801d1d8: 4632 mov r2, r6
801d1da: 4621 mov r1, r4
801d1dc: 4640 mov r0, r8
801d1de: f7ff ff71 bl 801d0c4 <__ssputs_r>
801d1e2: 3001 adds r0, #1
801d1e4: f000 80a4 beq.w 801d330 <_svfiprintf_r+0x1b8>
801d1e8: 9b09 ldr r3, [sp, #36] ; 0x24
801d1ea: 4453 add r3, sl
801d1ec: 9309 str r3, [sp, #36] ; 0x24
801d1ee: 783b ldrb r3, [r7, #0]
801d1f0: 2b00 cmp r3, #0
801d1f2: f000 809d beq.w 801d330 <_svfiprintf_r+0x1b8>
801d1f6: 2300 movs r3, #0
801d1f8: f04f 32ff mov.w r2, #4294967295
801d1fc: e9cd 2305 strd r2, r3, [sp, #20]
801d200: 9304 str r3, [sp, #16]
801d202: 9307 str r3, [sp, #28]
801d204: f88d 3053 strb.w r3, [sp, #83] ; 0x53
801d208: 931a str r3, [sp, #104] ; 0x68
801d20a: 462f mov r7, r5
801d20c: 2205 movs r2, #5
801d20e: f817 1b01 ldrb.w r1, [r7], #1
801d212: 4850 ldr r0, [pc, #320] ; (801d354 <_svfiprintf_r+0x1dc>)
801d214: f7e2 fffc bl 8000210 <memchr>
801d218: 9b04 ldr r3, [sp, #16]
801d21a: b9d0 cbnz r0, 801d252 <_svfiprintf_r+0xda>
801d21c: 06d9 lsls r1, r3, #27
801d21e: bf44 itt mi
801d220: 2220 movmi r2, #32
801d222: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
801d226: 071a lsls r2, r3, #28
801d228: bf44 itt mi
801d22a: 222b movmi r2, #43 ; 0x2b
801d22c: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
801d230: 782a ldrb r2, [r5, #0]
801d232: 2a2a cmp r2, #42 ; 0x2a
801d234: d015 beq.n 801d262 <_svfiprintf_r+0xea>
801d236: 9a07 ldr r2, [sp, #28]
801d238: 462f mov r7, r5
801d23a: 2000 movs r0, #0
801d23c: 250a movs r5, #10
801d23e: 4639 mov r1, r7
801d240: f811 3b01 ldrb.w r3, [r1], #1
801d244: 3b30 subs r3, #48 ; 0x30
801d246: 2b09 cmp r3, #9
801d248: d94d bls.n 801d2e6 <_svfiprintf_r+0x16e>
801d24a: b1b8 cbz r0, 801d27c <_svfiprintf_r+0x104>
801d24c: e00f b.n 801d26e <_svfiprintf_r+0xf6>
801d24e: 462f mov r7, r5
801d250: e7b8 b.n 801d1c4 <_svfiprintf_r+0x4c>
801d252: 4a40 ldr r2, [pc, #256] ; (801d354 <_svfiprintf_r+0x1dc>)
801d254: 1a80 subs r0, r0, r2
801d256: fa0b f000 lsl.w r0, fp, r0
801d25a: 4318 orrs r0, r3
801d25c: 9004 str r0, [sp, #16]
801d25e: 463d mov r5, r7
801d260: e7d3 b.n 801d20a <_svfiprintf_r+0x92>
801d262: 9a03 ldr r2, [sp, #12]
801d264: 1d11 adds r1, r2, #4
801d266: 6812 ldr r2, [r2, #0]
801d268: 9103 str r1, [sp, #12]
801d26a: 2a00 cmp r2, #0
801d26c: db01 blt.n 801d272 <_svfiprintf_r+0xfa>
801d26e: 9207 str r2, [sp, #28]
801d270: e004 b.n 801d27c <_svfiprintf_r+0x104>
801d272: 4252 negs r2, r2
801d274: f043 0302 orr.w r3, r3, #2
801d278: 9207 str r2, [sp, #28]
801d27a: 9304 str r3, [sp, #16]
801d27c: 783b ldrb r3, [r7, #0]
801d27e: 2b2e cmp r3, #46 ; 0x2e
801d280: d10c bne.n 801d29c <_svfiprintf_r+0x124>
801d282: 787b ldrb r3, [r7, #1]
801d284: 2b2a cmp r3, #42 ; 0x2a
801d286: d133 bne.n 801d2f0 <_svfiprintf_r+0x178>
801d288: 9b03 ldr r3, [sp, #12]
801d28a: 1d1a adds r2, r3, #4
801d28c: 681b ldr r3, [r3, #0]
801d28e: 9203 str r2, [sp, #12]
801d290: 2b00 cmp r3, #0
801d292: bfb8 it lt
801d294: f04f 33ff movlt.w r3, #4294967295
801d298: 3702 adds r7, #2
801d29a: 9305 str r3, [sp, #20]
801d29c: 4d2e ldr r5, [pc, #184] ; (801d358 <_svfiprintf_r+0x1e0>)
801d29e: 7839 ldrb r1, [r7, #0]
801d2a0: 2203 movs r2, #3
801d2a2: 4628 mov r0, r5
801d2a4: f7e2 ffb4 bl 8000210 <memchr>
801d2a8: b138 cbz r0, 801d2ba <_svfiprintf_r+0x142>
801d2aa: 2340 movs r3, #64 ; 0x40
801d2ac: 1b40 subs r0, r0, r5
801d2ae: fa03 f000 lsl.w r0, r3, r0
801d2b2: 9b04 ldr r3, [sp, #16]
801d2b4: 4303 orrs r3, r0
801d2b6: 3701 adds r7, #1
801d2b8: 9304 str r3, [sp, #16]
801d2ba: 7839 ldrb r1, [r7, #0]
801d2bc: 4827 ldr r0, [pc, #156] ; (801d35c <_svfiprintf_r+0x1e4>)
801d2be: f88d 1028 strb.w r1, [sp, #40] ; 0x28
801d2c2: 2206 movs r2, #6
801d2c4: 1c7e adds r6, r7, #1
801d2c6: f7e2 ffa3 bl 8000210 <memchr>
801d2ca: 2800 cmp r0, #0
801d2cc: d038 beq.n 801d340 <_svfiprintf_r+0x1c8>
801d2ce: 4b24 ldr r3, [pc, #144] ; (801d360 <_svfiprintf_r+0x1e8>)
801d2d0: bb13 cbnz r3, 801d318 <_svfiprintf_r+0x1a0>
801d2d2: 9b03 ldr r3, [sp, #12]
801d2d4: 3307 adds r3, #7
801d2d6: f023 0307 bic.w r3, r3, #7
801d2da: 3308 adds r3, #8
801d2dc: 9303 str r3, [sp, #12]
801d2de: 9b09 ldr r3, [sp, #36] ; 0x24
801d2e0: 444b add r3, r9
801d2e2: 9309 str r3, [sp, #36] ; 0x24
801d2e4: e76d b.n 801d1c2 <_svfiprintf_r+0x4a>
801d2e6: fb05 3202 mla r2, r5, r2, r3
801d2ea: 2001 movs r0, #1
801d2ec: 460f mov r7, r1
801d2ee: e7a6 b.n 801d23e <_svfiprintf_r+0xc6>
801d2f0: 2300 movs r3, #0
801d2f2: 3701 adds r7, #1
801d2f4: 9305 str r3, [sp, #20]
801d2f6: 4619 mov r1, r3
801d2f8: 250a movs r5, #10
801d2fa: 4638 mov r0, r7
801d2fc: f810 2b01 ldrb.w r2, [r0], #1
801d300: 3a30 subs r2, #48 ; 0x30
801d302: 2a09 cmp r2, #9
801d304: d903 bls.n 801d30e <_svfiprintf_r+0x196>
801d306: 2b00 cmp r3, #0
801d308: d0c8 beq.n 801d29c <_svfiprintf_r+0x124>
801d30a: 9105 str r1, [sp, #20]
801d30c: e7c6 b.n 801d29c <_svfiprintf_r+0x124>
801d30e: fb05 2101 mla r1, r5, r1, r2
801d312: 2301 movs r3, #1
801d314: 4607 mov r7, r0
801d316: e7f0 b.n 801d2fa <_svfiprintf_r+0x182>
801d318: ab03 add r3, sp, #12
801d31a: 9300 str r3, [sp, #0]
801d31c: 4622 mov r2, r4
801d31e: 4b11 ldr r3, [pc, #68] ; (801d364 <_svfiprintf_r+0x1ec>)
801d320: a904 add r1, sp, #16
801d322: 4640 mov r0, r8
801d324: f3af 8000 nop.w
801d328: f1b0 3fff cmp.w r0, #4294967295
801d32c: 4681 mov r9, r0
801d32e: d1d6 bne.n 801d2de <_svfiprintf_r+0x166>
801d330: 89a3 ldrh r3, [r4, #12]
801d332: 065b lsls r3, r3, #25
801d334: f53f af35 bmi.w 801d1a2 <_svfiprintf_r+0x2a>
801d338: 9809 ldr r0, [sp, #36] ; 0x24
801d33a: b01d add sp, #116 ; 0x74
801d33c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
801d340: ab03 add r3, sp, #12
801d342: 9300 str r3, [sp, #0]
801d344: 4622 mov r2, r4
801d346: 4b07 ldr r3, [pc, #28] ; (801d364 <_svfiprintf_r+0x1ec>)
801d348: a904 add r1, sp, #16
801d34a: 4640 mov r0, r8
801d34c: f000 f9c2 bl 801d6d4 <_printf_i>
801d350: e7ea b.n 801d328 <_svfiprintf_r+0x1b0>
801d352: bf00 nop
801d354: 08022f2c .word 0x08022f2c
801d358: 08022f32 .word 0x08022f32
801d35c: 08022f36 .word 0x08022f36
801d360: 00000000 .word 0x00000000
801d364: 0801d0c5 .word 0x0801d0c5
0801d368 <__sfputc_r>:
801d368: 6893 ldr r3, [r2, #8]
801d36a: 3b01 subs r3, #1
801d36c: 2b00 cmp r3, #0
801d36e: b410 push {r4}
801d370: 6093 str r3, [r2, #8]
801d372: da08 bge.n 801d386 <__sfputc_r+0x1e>
801d374: 6994 ldr r4, [r2, #24]
801d376: 42a3 cmp r3, r4
801d378: db01 blt.n 801d37e <__sfputc_r+0x16>
801d37a: 290a cmp r1, #10
801d37c: d103 bne.n 801d386 <__sfputc_r+0x1e>
801d37e: f85d 4b04 ldr.w r4, [sp], #4
801d382: f000 bb0d b.w 801d9a0 <__swbuf_r>
801d386: 6813 ldr r3, [r2, #0]
801d388: 1c58 adds r0, r3, #1
801d38a: 6010 str r0, [r2, #0]
801d38c: 7019 strb r1, [r3, #0]
801d38e: 4608 mov r0, r1
801d390: f85d 4b04 ldr.w r4, [sp], #4
801d394: 4770 bx lr
0801d396 <__sfputs_r>:
801d396: b5f8 push {r3, r4, r5, r6, r7, lr}
801d398: 4606 mov r6, r0
801d39a: 460f mov r7, r1
801d39c: 4614 mov r4, r2
801d39e: 18d5 adds r5, r2, r3
801d3a0: 42ac cmp r4, r5
801d3a2: d101 bne.n 801d3a8 <__sfputs_r+0x12>
801d3a4: 2000 movs r0, #0
801d3a6: e007 b.n 801d3b8 <__sfputs_r+0x22>
801d3a8: 463a mov r2, r7
801d3aa: f814 1b01 ldrb.w r1, [r4], #1
801d3ae: 4630 mov r0, r6
801d3b0: f7ff ffda bl 801d368 <__sfputc_r>
801d3b4: 1c43 adds r3, r0, #1
801d3b6: d1f3 bne.n 801d3a0 <__sfputs_r+0xa>
801d3b8: bdf8 pop {r3, r4, r5, r6, r7, pc}
...
0801d3bc <_vfiprintf_r>:
801d3bc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
801d3c0: 460c mov r4, r1
801d3c2: b09d sub sp, #116 ; 0x74
801d3c4: 4617 mov r7, r2
801d3c6: 461d mov r5, r3
801d3c8: 4606 mov r6, r0
801d3ca: b118 cbz r0, 801d3d4 <_vfiprintf_r+0x18>
801d3cc: 6983 ldr r3, [r0, #24]
801d3ce: b90b cbnz r3, 801d3d4 <_vfiprintf_r+0x18>
801d3d0: f7ff fd3e bl 801ce50 <__sinit>
801d3d4: 4b7c ldr r3, [pc, #496] ; (801d5c8 <_vfiprintf_r+0x20c>)
801d3d6: 429c cmp r4, r3
801d3d8: d158 bne.n 801d48c <_vfiprintf_r+0xd0>
801d3da: 6874 ldr r4, [r6, #4]
801d3dc: 89a3 ldrh r3, [r4, #12]
801d3de: 0718 lsls r0, r3, #28
801d3e0: d55e bpl.n 801d4a0 <_vfiprintf_r+0xe4>
801d3e2: 6923 ldr r3, [r4, #16]
801d3e4: 2b00 cmp r3, #0
801d3e6: d05b beq.n 801d4a0 <_vfiprintf_r+0xe4>
801d3e8: 2300 movs r3, #0
801d3ea: 9309 str r3, [sp, #36] ; 0x24
801d3ec: 2320 movs r3, #32
801d3ee: f88d 3029 strb.w r3, [sp, #41] ; 0x29
801d3f2: 2330 movs r3, #48 ; 0x30
801d3f4: f88d 302a strb.w r3, [sp, #42] ; 0x2a
801d3f8: 9503 str r5, [sp, #12]
801d3fa: f04f 0b01 mov.w fp, #1
801d3fe: 46b8 mov r8, r7
801d400: 4645 mov r5, r8
801d402: f815 3b01 ldrb.w r3, [r5], #1
801d406: b10b cbz r3, 801d40c <_vfiprintf_r+0x50>
801d408: 2b25 cmp r3, #37 ; 0x25
801d40a: d154 bne.n 801d4b6 <_vfiprintf_r+0xfa>
801d40c: ebb8 0a07 subs.w sl, r8, r7
801d410: d00b beq.n 801d42a <_vfiprintf_r+0x6e>
801d412: 4653 mov r3, sl
801d414: 463a mov r2, r7
801d416: 4621 mov r1, r4
801d418: 4630 mov r0, r6
801d41a: f7ff ffbc bl 801d396 <__sfputs_r>
801d41e: 3001 adds r0, #1
801d420: f000 80c2 beq.w 801d5a8 <_vfiprintf_r+0x1ec>
801d424: 9b09 ldr r3, [sp, #36] ; 0x24
801d426: 4453 add r3, sl
801d428: 9309 str r3, [sp, #36] ; 0x24
801d42a: f898 3000 ldrb.w r3, [r8]
801d42e: 2b00 cmp r3, #0
801d430: f000 80ba beq.w 801d5a8 <_vfiprintf_r+0x1ec>
801d434: 2300 movs r3, #0
801d436: f04f 32ff mov.w r2, #4294967295
801d43a: e9cd 2305 strd r2, r3, [sp, #20]
801d43e: 9304 str r3, [sp, #16]
801d440: 9307 str r3, [sp, #28]
801d442: f88d 3053 strb.w r3, [sp, #83] ; 0x53
801d446: 931a str r3, [sp, #104] ; 0x68
801d448: 46a8 mov r8, r5
801d44a: 2205 movs r2, #5
801d44c: f818 1b01 ldrb.w r1, [r8], #1
801d450: 485e ldr r0, [pc, #376] ; (801d5cc <_vfiprintf_r+0x210>)
801d452: f7e2 fedd bl 8000210 <memchr>
801d456: 9b04 ldr r3, [sp, #16]
801d458: bb78 cbnz r0, 801d4ba <_vfiprintf_r+0xfe>
801d45a: 06d9 lsls r1, r3, #27
801d45c: bf44 itt mi
801d45e: 2220 movmi r2, #32
801d460: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
801d464: 071a lsls r2, r3, #28
801d466: bf44 itt mi
801d468: 222b movmi r2, #43 ; 0x2b
801d46a: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
801d46e: 782a ldrb r2, [r5, #0]
801d470: 2a2a cmp r2, #42 ; 0x2a
801d472: d02a beq.n 801d4ca <_vfiprintf_r+0x10e>
801d474: 9a07 ldr r2, [sp, #28]
801d476: 46a8 mov r8, r5
801d478: 2000 movs r0, #0
801d47a: 250a movs r5, #10
801d47c: 4641 mov r1, r8
801d47e: f811 3b01 ldrb.w r3, [r1], #1
801d482: 3b30 subs r3, #48 ; 0x30
801d484: 2b09 cmp r3, #9
801d486: d969 bls.n 801d55c <_vfiprintf_r+0x1a0>
801d488: b360 cbz r0, 801d4e4 <_vfiprintf_r+0x128>
801d48a: e024 b.n 801d4d6 <_vfiprintf_r+0x11a>
801d48c: 4b50 ldr r3, [pc, #320] ; (801d5d0 <_vfiprintf_r+0x214>)
801d48e: 429c cmp r4, r3
801d490: d101 bne.n 801d496 <_vfiprintf_r+0xda>
801d492: 68b4 ldr r4, [r6, #8]
801d494: e7a2 b.n 801d3dc <_vfiprintf_r+0x20>
801d496: 4b4f ldr r3, [pc, #316] ; (801d5d4 <_vfiprintf_r+0x218>)
801d498: 429c cmp r4, r3
801d49a: bf08 it eq
801d49c: 68f4 ldreq r4, [r6, #12]
801d49e: e79d b.n 801d3dc <_vfiprintf_r+0x20>
801d4a0: 4621 mov r1, r4
801d4a2: 4630 mov r0, r6
801d4a4: f000 fae0 bl 801da68 <__swsetup_r>
801d4a8: 2800 cmp r0, #0
801d4aa: d09d beq.n 801d3e8 <_vfiprintf_r+0x2c>
801d4ac: f04f 30ff mov.w r0, #4294967295
801d4b0: b01d add sp, #116 ; 0x74
801d4b2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
801d4b6: 46a8 mov r8, r5
801d4b8: e7a2 b.n 801d400 <_vfiprintf_r+0x44>
801d4ba: 4a44 ldr r2, [pc, #272] ; (801d5cc <_vfiprintf_r+0x210>)
801d4bc: 1a80 subs r0, r0, r2
801d4be: fa0b f000 lsl.w r0, fp, r0
801d4c2: 4318 orrs r0, r3
801d4c4: 9004 str r0, [sp, #16]
801d4c6: 4645 mov r5, r8
801d4c8: e7be b.n 801d448 <_vfiprintf_r+0x8c>
801d4ca: 9a03 ldr r2, [sp, #12]
801d4cc: 1d11 adds r1, r2, #4
801d4ce: 6812 ldr r2, [r2, #0]
801d4d0: 9103 str r1, [sp, #12]
801d4d2: 2a00 cmp r2, #0
801d4d4: db01 blt.n 801d4da <_vfiprintf_r+0x11e>
801d4d6: 9207 str r2, [sp, #28]
801d4d8: e004 b.n 801d4e4 <_vfiprintf_r+0x128>
801d4da: 4252 negs r2, r2
801d4dc: f043 0302 orr.w r3, r3, #2
801d4e0: 9207 str r2, [sp, #28]
801d4e2: 9304 str r3, [sp, #16]
801d4e4: f898 3000 ldrb.w r3, [r8]
801d4e8: 2b2e cmp r3, #46 ; 0x2e
801d4ea: d10e bne.n 801d50a <_vfiprintf_r+0x14e>
801d4ec: f898 3001 ldrb.w r3, [r8, #1]
801d4f0: 2b2a cmp r3, #42 ; 0x2a
801d4f2: d138 bne.n 801d566 <_vfiprintf_r+0x1aa>
801d4f4: 9b03 ldr r3, [sp, #12]
801d4f6: 1d1a adds r2, r3, #4
801d4f8: 681b ldr r3, [r3, #0]
801d4fa: 9203 str r2, [sp, #12]
801d4fc: 2b00 cmp r3, #0
801d4fe: bfb8 it lt
801d500: f04f 33ff movlt.w r3, #4294967295
801d504: f108 0802 add.w r8, r8, #2
801d508: 9305 str r3, [sp, #20]
801d50a: 4d33 ldr r5, [pc, #204] ; (801d5d8 <_vfiprintf_r+0x21c>)
801d50c: f898 1000 ldrb.w r1, [r8]
801d510: 2203 movs r2, #3
801d512: 4628 mov r0, r5
801d514: f7e2 fe7c bl 8000210 <memchr>
801d518: b140 cbz r0, 801d52c <_vfiprintf_r+0x170>
801d51a: 2340 movs r3, #64 ; 0x40
801d51c: 1b40 subs r0, r0, r5
801d51e: fa03 f000 lsl.w r0, r3, r0
801d522: 9b04 ldr r3, [sp, #16]
801d524: 4303 orrs r3, r0
801d526: f108 0801 add.w r8, r8, #1
801d52a: 9304 str r3, [sp, #16]
801d52c: f898 1000 ldrb.w r1, [r8]
801d530: 482a ldr r0, [pc, #168] ; (801d5dc <_vfiprintf_r+0x220>)
801d532: f88d 1028 strb.w r1, [sp, #40] ; 0x28
801d536: 2206 movs r2, #6
801d538: f108 0701 add.w r7, r8, #1
801d53c: f7e2 fe68 bl 8000210 <memchr>
801d540: 2800 cmp r0, #0
801d542: d037 beq.n 801d5b4 <_vfiprintf_r+0x1f8>
801d544: 4b26 ldr r3, [pc, #152] ; (801d5e0 <_vfiprintf_r+0x224>)
801d546: bb1b cbnz r3, 801d590 <_vfiprintf_r+0x1d4>
801d548: 9b03 ldr r3, [sp, #12]
801d54a: 3307 adds r3, #7
801d54c: f023 0307 bic.w r3, r3, #7
801d550: 3308 adds r3, #8
801d552: 9303 str r3, [sp, #12]
801d554: 9b09 ldr r3, [sp, #36] ; 0x24
801d556: 444b add r3, r9
801d558: 9309 str r3, [sp, #36] ; 0x24
801d55a: e750 b.n 801d3fe <_vfiprintf_r+0x42>
801d55c: fb05 3202 mla r2, r5, r2, r3
801d560: 2001 movs r0, #1
801d562: 4688 mov r8, r1
801d564: e78a b.n 801d47c <_vfiprintf_r+0xc0>
801d566: 2300 movs r3, #0
801d568: f108 0801 add.w r8, r8, #1
801d56c: 9305 str r3, [sp, #20]
801d56e: 4619 mov r1, r3
801d570: 250a movs r5, #10
801d572: 4640 mov r0, r8
801d574: f810 2b01 ldrb.w r2, [r0], #1
801d578: 3a30 subs r2, #48 ; 0x30
801d57a: 2a09 cmp r2, #9
801d57c: d903 bls.n 801d586 <_vfiprintf_r+0x1ca>
801d57e: 2b00 cmp r3, #0
801d580: d0c3 beq.n 801d50a <_vfiprintf_r+0x14e>
801d582: 9105 str r1, [sp, #20]
801d584: e7c1 b.n 801d50a <_vfiprintf_r+0x14e>
801d586: fb05 2101 mla r1, r5, r1, r2
801d58a: 2301 movs r3, #1
801d58c: 4680 mov r8, r0
801d58e: e7f0 b.n 801d572 <_vfiprintf_r+0x1b6>
801d590: ab03 add r3, sp, #12
801d592: 9300 str r3, [sp, #0]
801d594: 4622 mov r2, r4
801d596: 4b13 ldr r3, [pc, #76] ; (801d5e4 <_vfiprintf_r+0x228>)
801d598: a904 add r1, sp, #16
801d59a: 4630 mov r0, r6
801d59c: f3af 8000 nop.w
801d5a0: f1b0 3fff cmp.w r0, #4294967295
801d5a4: 4681 mov r9, r0
801d5a6: d1d5 bne.n 801d554 <_vfiprintf_r+0x198>
801d5a8: 89a3 ldrh r3, [r4, #12]
801d5aa: 065b lsls r3, r3, #25
801d5ac: f53f af7e bmi.w 801d4ac <_vfiprintf_r+0xf0>
801d5b0: 9809 ldr r0, [sp, #36] ; 0x24
801d5b2: e77d b.n 801d4b0 <_vfiprintf_r+0xf4>
801d5b4: ab03 add r3, sp, #12
801d5b6: 9300 str r3, [sp, #0]
801d5b8: 4622 mov r2, r4
801d5ba: 4b0a ldr r3, [pc, #40] ; (801d5e4 <_vfiprintf_r+0x228>)
801d5bc: a904 add r1, sp, #16
801d5be: 4630 mov r0, r6
801d5c0: f000 f888 bl 801d6d4 <_printf_i>
801d5c4: e7ec b.n 801d5a0 <_vfiprintf_r+0x1e4>
801d5c6: bf00 nop
801d5c8: 08022eec .word 0x08022eec
801d5cc: 08022f2c .word 0x08022f2c
801d5d0: 08022f0c .word 0x08022f0c
801d5d4: 08022ecc .word 0x08022ecc
801d5d8: 08022f32 .word 0x08022f32
801d5dc: 08022f36 .word 0x08022f36
801d5e0: 00000000 .word 0x00000000
801d5e4: 0801d397 .word 0x0801d397
0801d5e8 <_printf_common>:
801d5e8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
801d5ec: 4691 mov r9, r2
801d5ee: 461f mov r7, r3
801d5f0: 688a ldr r2, [r1, #8]
801d5f2: 690b ldr r3, [r1, #16]
801d5f4: f8dd 8020 ldr.w r8, [sp, #32]
801d5f8: 4293 cmp r3, r2
801d5fa: bfb8 it lt
801d5fc: 4613 movlt r3, r2
801d5fe: f8c9 3000 str.w r3, [r9]
801d602: f891 2043 ldrb.w r2, [r1, #67] ; 0x43
801d606: 4606 mov r6, r0
801d608: 460c mov r4, r1
801d60a: b112 cbz r2, 801d612 <_printf_common+0x2a>
801d60c: 3301 adds r3, #1
801d60e: f8c9 3000 str.w r3, [r9]
801d612: 6823 ldr r3, [r4, #0]
801d614: 0699 lsls r1, r3, #26
801d616: bf42 ittt mi
801d618: f8d9 3000 ldrmi.w r3, [r9]
801d61c: 3302 addmi r3, #2
801d61e: f8c9 3000 strmi.w r3, [r9]
801d622: 6825 ldr r5, [r4, #0]
801d624: f015 0506 ands.w r5, r5, #6
801d628: d107 bne.n 801d63a <_printf_common+0x52>
801d62a: f104 0a19 add.w sl, r4, #25
801d62e: 68e3 ldr r3, [r4, #12]
801d630: f8d9 2000 ldr.w r2, [r9]
801d634: 1a9b subs r3, r3, r2
801d636: 42ab cmp r3, r5
801d638: dc28 bgt.n 801d68c <_printf_common+0xa4>
801d63a: f894 3043 ldrb.w r3, [r4, #67] ; 0x43
801d63e: 6822 ldr r2, [r4, #0]
801d640: 3300 adds r3, #0
801d642: bf18 it ne
801d644: 2301 movne r3, #1
801d646: 0692 lsls r2, r2, #26
801d648: d42d bmi.n 801d6a6 <_printf_common+0xbe>
801d64a: f104 0243 add.w r2, r4, #67 ; 0x43
801d64e: 4639 mov r1, r7
801d650: 4630 mov r0, r6
801d652: 47c0 blx r8
801d654: 3001 adds r0, #1
801d656: d020 beq.n 801d69a <_printf_common+0xb2>
801d658: 6823 ldr r3, [r4, #0]
801d65a: 68e5 ldr r5, [r4, #12]
801d65c: f8d9 2000 ldr.w r2, [r9]
801d660: f003 0306 and.w r3, r3, #6
801d664: 2b04 cmp r3, #4
801d666: bf08 it eq
801d668: 1aad subeq r5, r5, r2
801d66a: 68a3 ldr r3, [r4, #8]
801d66c: 6922 ldr r2, [r4, #16]
801d66e: bf0c ite eq
801d670: ea25 75e5 biceq.w r5, r5, r5, asr #31
801d674: 2500 movne r5, #0
801d676: 4293 cmp r3, r2
801d678: bfc4 itt gt
801d67a: 1a9b subgt r3, r3, r2
801d67c: 18ed addgt r5, r5, r3
801d67e: f04f 0900 mov.w r9, #0
801d682: 341a adds r4, #26
801d684: 454d cmp r5, r9
801d686: d11a bne.n 801d6be <_printf_common+0xd6>
801d688: 2000 movs r0, #0
801d68a: e008 b.n 801d69e <_printf_common+0xb6>
801d68c: 2301 movs r3, #1
801d68e: 4652 mov r2, sl
801d690: 4639 mov r1, r7
801d692: 4630 mov r0, r6
801d694: 47c0 blx r8
801d696: 3001 adds r0, #1
801d698: d103 bne.n 801d6a2 <_printf_common+0xba>
801d69a: f04f 30ff mov.w r0, #4294967295
801d69e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
801d6a2: 3501 adds r5, #1
801d6a4: e7c3 b.n 801d62e <_printf_common+0x46>
801d6a6: 18e1 adds r1, r4, r3
801d6a8: 1c5a adds r2, r3, #1
801d6aa: 2030 movs r0, #48 ; 0x30
801d6ac: f881 0043 strb.w r0, [r1, #67] ; 0x43
801d6b0: 4422 add r2, r4
801d6b2: f894 1045 ldrb.w r1, [r4, #69] ; 0x45
801d6b6: f882 1043 strb.w r1, [r2, #67] ; 0x43
801d6ba: 3302 adds r3, #2
801d6bc: e7c5 b.n 801d64a <_printf_common+0x62>
801d6be: 2301 movs r3, #1
801d6c0: 4622 mov r2, r4
801d6c2: 4639 mov r1, r7
801d6c4: 4630 mov r0, r6
801d6c6: 47c0 blx r8
801d6c8: 3001 adds r0, #1
801d6ca: d0e6 beq.n 801d69a <_printf_common+0xb2>
801d6cc: f109 0901 add.w r9, r9, #1
801d6d0: e7d8 b.n 801d684 <_printf_common+0x9c>
...
0801d6d4 <_printf_i>:
801d6d4: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
801d6d8: f101 0c43 add.w ip, r1, #67 ; 0x43
801d6dc: 460c mov r4, r1
801d6de: 7e09 ldrb r1, [r1, #24]
801d6e0: b085 sub sp, #20
801d6e2: 296e cmp r1, #110 ; 0x6e
801d6e4: 4617 mov r7, r2
801d6e6: 4606 mov r6, r0
801d6e8: 4698 mov r8, r3
801d6ea: 9a0c ldr r2, [sp, #48] ; 0x30
801d6ec: f000 80b3 beq.w 801d856 <_printf_i+0x182>
801d6f0: d822 bhi.n 801d738 <_printf_i+0x64>
801d6f2: 2963 cmp r1, #99 ; 0x63
801d6f4: d036 beq.n 801d764 <_printf_i+0x90>
801d6f6: d80a bhi.n 801d70e <_printf_i+0x3a>
801d6f8: 2900 cmp r1, #0
801d6fa: f000 80b9 beq.w 801d870 <_printf_i+0x19c>
801d6fe: 2958 cmp r1, #88 ; 0x58
801d700: f000 8083 beq.w 801d80a <_printf_i+0x136>
801d704: f104 0542 add.w r5, r4, #66 ; 0x42
801d708: f884 1042 strb.w r1, [r4, #66] ; 0x42
801d70c: e032 b.n 801d774 <_printf_i+0xa0>
801d70e: 2964 cmp r1, #100 ; 0x64
801d710: d001 beq.n 801d716 <_printf_i+0x42>
801d712: 2969 cmp r1, #105 ; 0x69
801d714: d1f6 bne.n 801d704 <_printf_i+0x30>
801d716: 6820 ldr r0, [r4, #0]
801d718: 6813 ldr r3, [r2, #0]
801d71a: 0605 lsls r5, r0, #24
801d71c: f103 0104 add.w r1, r3, #4
801d720: d52a bpl.n 801d778 <_printf_i+0xa4>
801d722: 681b ldr r3, [r3, #0]
801d724: 6011 str r1, [r2, #0]
801d726: 2b00 cmp r3, #0
801d728: da03 bge.n 801d732 <_printf_i+0x5e>
801d72a: 222d movs r2, #45 ; 0x2d
801d72c: 425b negs r3, r3
801d72e: f884 2043 strb.w r2, [r4, #67] ; 0x43
801d732: 486f ldr r0, [pc, #444] ; (801d8f0 <_printf_i+0x21c>)
801d734: 220a movs r2, #10
801d736: e039 b.n 801d7ac <_printf_i+0xd8>
801d738: 2973 cmp r1, #115 ; 0x73
801d73a: f000 809d beq.w 801d878 <_printf_i+0x1a4>
801d73e: d808 bhi.n 801d752 <_printf_i+0x7e>
801d740: 296f cmp r1, #111 ; 0x6f
801d742: d020 beq.n 801d786 <_printf_i+0xb2>
801d744: 2970 cmp r1, #112 ; 0x70
801d746: d1dd bne.n 801d704 <_printf_i+0x30>
801d748: 6823 ldr r3, [r4, #0]
801d74a: f043 0320 orr.w r3, r3, #32
801d74e: 6023 str r3, [r4, #0]
801d750: e003 b.n 801d75a <_printf_i+0x86>
801d752: 2975 cmp r1, #117 ; 0x75
801d754: d017 beq.n 801d786 <_printf_i+0xb2>
801d756: 2978 cmp r1, #120 ; 0x78
801d758: d1d4 bne.n 801d704 <_printf_i+0x30>
801d75a: 2378 movs r3, #120 ; 0x78
801d75c: f884 3045 strb.w r3, [r4, #69] ; 0x45
801d760: 4864 ldr r0, [pc, #400] ; (801d8f4 <_printf_i+0x220>)
801d762: e055 b.n 801d810 <_printf_i+0x13c>
801d764: 6813 ldr r3, [r2, #0]
801d766: 1d19 adds r1, r3, #4
801d768: 681b ldr r3, [r3, #0]
801d76a: 6011 str r1, [r2, #0]
801d76c: f104 0542 add.w r5, r4, #66 ; 0x42
801d770: f884 3042 strb.w r3, [r4, #66] ; 0x42
801d774: 2301 movs r3, #1
801d776: e08c b.n 801d892 <_printf_i+0x1be>
801d778: 681b ldr r3, [r3, #0]
801d77a: 6011 str r1, [r2, #0]
801d77c: f010 0f40 tst.w r0, #64 ; 0x40
801d780: bf18 it ne
801d782: b21b sxthne r3, r3
801d784: e7cf b.n 801d726 <_printf_i+0x52>
801d786: 6813 ldr r3, [r2, #0]
801d788: 6825 ldr r5, [r4, #0]
801d78a: 1d18 adds r0, r3, #4
801d78c: 6010 str r0, [r2, #0]
801d78e: 0628 lsls r0, r5, #24
801d790: d501 bpl.n 801d796 <_printf_i+0xc2>
801d792: 681b ldr r3, [r3, #0]
801d794: e002 b.n 801d79c <_printf_i+0xc8>
801d796: 0668 lsls r0, r5, #25
801d798: d5fb bpl.n 801d792 <_printf_i+0xbe>
801d79a: 881b ldrh r3, [r3, #0]
801d79c: 4854 ldr r0, [pc, #336] ; (801d8f0 <_printf_i+0x21c>)
801d79e: 296f cmp r1, #111 ; 0x6f
801d7a0: bf14 ite ne
801d7a2: 220a movne r2, #10
801d7a4: 2208 moveq r2, #8
801d7a6: 2100 movs r1, #0
801d7a8: f884 1043 strb.w r1, [r4, #67] ; 0x43
801d7ac: 6865 ldr r5, [r4, #4]
801d7ae: 60a5 str r5, [r4, #8]
801d7b0: 2d00 cmp r5, #0
801d7b2: f2c0 8095 blt.w 801d8e0 <_printf_i+0x20c>
801d7b6: 6821 ldr r1, [r4, #0]
801d7b8: f021 0104 bic.w r1, r1, #4
801d7bc: 6021 str r1, [r4, #0]
801d7be: 2b00 cmp r3, #0
801d7c0: d13d bne.n 801d83e <_printf_i+0x16a>
801d7c2: 2d00 cmp r5, #0
801d7c4: f040 808e bne.w 801d8e4 <_printf_i+0x210>
801d7c8: 4665 mov r5, ip
801d7ca: 2a08 cmp r2, #8
801d7cc: d10b bne.n 801d7e6 <_printf_i+0x112>
801d7ce: 6823 ldr r3, [r4, #0]
801d7d0: 07db lsls r3, r3, #31
801d7d2: d508 bpl.n 801d7e6 <_printf_i+0x112>
801d7d4: 6923 ldr r3, [r4, #16]
801d7d6: 6862 ldr r2, [r4, #4]
801d7d8: 429a cmp r2, r3
801d7da: bfde ittt le
801d7dc: 2330 movle r3, #48 ; 0x30
801d7de: f805 3c01 strble.w r3, [r5, #-1]
801d7e2: f105 35ff addle.w r5, r5, #4294967295
801d7e6: ebac 0305 sub.w r3, ip, r5
801d7ea: 6123 str r3, [r4, #16]
801d7ec: f8cd 8000 str.w r8, [sp]
801d7f0: 463b mov r3, r7
801d7f2: aa03 add r2, sp, #12
801d7f4: 4621 mov r1, r4
801d7f6: 4630 mov r0, r6
801d7f8: f7ff fef6 bl 801d5e8 <_printf_common>
801d7fc: 3001 adds r0, #1
801d7fe: d14d bne.n 801d89c <_printf_i+0x1c8>
801d800: f04f 30ff mov.w r0, #4294967295
801d804: b005 add sp, #20
801d806: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
801d80a: 4839 ldr r0, [pc, #228] ; (801d8f0 <_printf_i+0x21c>)
801d80c: f884 1045 strb.w r1, [r4, #69] ; 0x45
801d810: 6813 ldr r3, [r2, #0]
801d812: 6821 ldr r1, [r4, #0]
801d814: 1d1d adds r5, r3, #4
801d816: 681b ldr r3, [r3, #0]
801d818: 6015 str r5, [r2, #0]
801d81a: 060a lsls r2, r1, #24
801d81c: d50b bpl.n 801d836 <_printf_i+0x162>
801d81e: 07ca lsls r2, r1, #31
801d820: bf44 itt mi
801d822: f041 0120 orrmi.w r1, r1, #32
801d826: 6021 strmi r1, [r4, #0]
801d828: b91b cbnz r3, 801d832 <_printf_i+0x15e>
801d82a: 6822 ldr r2, [r4, #0]
801d82c: f022 0220 bic.w r2, r2, #32
801d830: 6022 str r2, [r4, #0]
801d832: 2210 movs r2, #16
801d834: e7b7 b.n 801d7a6 <_printf_i+0xd2>
801d836: 064d lsls r5, r1, #25
801d838: bf48 it mi
801d83a: b29b uxthmi r3, r3
801d83c: e7ef b.n 801d81e <_printf_i+0x14a>
801d83e: 4665 mov r5, ip
801d840: fbb3 f1f2 udiv r1, r3, r2
801d844: fb02 3311 mls r3, r2, r1, r3
801d848: 5cc3 ldrb r3, [r0, r3]
801d84a: f805 3d01 strb.w r3, [r5, #-1]!
801d84e: 460b mov r3, r1
801d850: 2900 cmp r1, #0
801d852: d1f5 bne.n 801d840 <_printf_i+0x16c>
801d854: e7b9 b.n 801d7ca <_printf_i+0xf6>
801d856: 6813 ldr r3, [r2, #0]
801d858: 6825 ldr r5, [r4, #0]
801d85a: 6961 ldr r1, [r4, #20]
801d85c: 1d18 adds r0, r3, #4
801d85e: 6010 str r0, [r2, #0]
801d860: 0628 lsls r0, r5, #24
801d862: 681b ldr r3, [r3, #0]
801d864: d501 bpl.n 801d86a <_printf_i+0x196>
801d866: 6019 str r1, [r3, #0]
801d868: e002 b.n 801d870 <_printf_i+0x19c>
801d86a: 066a lsls r2, r5, #25
801d86c: d5fb bpl.n 801d866 <_printf_i+0x192>
801d86e: 8019 strh r1, [r3, #0]
801d870: 2300 movs r3, #0
801d872: 6123 str r3, [r4, #16]
801d874: 4665 mov r5, ip
801d876: e7b9 b.n 801d7ec <_printf_i+0x118>
801d878: 6813 ldr r3, [r2, #0]
801d87a: 1d19 adds r1, r3, #4
801d87c: 6011 str r1, [r2, #0]
801d87e: 681d ldr r5, [r3, #0]
801d880: 6862 ldr r2, [r4, #4]
801d882: 2100 movs r1, #0
801d884: 4628 mov r0, r5
801d886: f7e2 fcc3 bl 8000210 <memchr>
801d88a: b108 cbz r0, 801d890 <_printf_i+0x1bc>
801d88c: 1b40 subs r0, r0, r5
801d88e: 6060 str r0, [r4, #4]
801d890: 6863 ldr r3, [r4, #4]
801d892: 6123 str r3, [r4, #16]
801d894: 2300 movs r3, #0
801d896: f884 3043 strb.w r3, [r4, #67] ; 0x43
801d89a: e7a7 b.n 801d7ec <_printf_i+0x118>
801d89c: 6923 ldr r3, [r4, #16]
801d89e: 462a mov r2, r5
801d8a0: 4639 mov r1, r7
801d8a2: 4630 mov r0, r6
801d8a4: 47c0 blx r8
801d8a6: 3001 adds r0, #1
801d8a8: d0aa beq.n 801d800 <_printf_i+0x12c>
801d8aa: 6823 ldr r3, [r4, #0]
801d8ac: 079b lsls r3, r3, #30
801d8ae: d413 bmi.n 801d8d8 <_printf_i+0x204>
801d8b0: 68e0 ldr r0, [r4, #12]
801d8b2: 9b03 ldr r3, [sp, #12]
801d8b4: 4298 cmp r0, r3
801d8b6: bfb8 it lt
801d8b8: 4618 movlt r0, r3
801d8ba: e7a3 b.n 801d804 <_printf_i+0x130>
801d8bc: 2301 movs r3, #1
801d8be: 464a mov r2, r9
801d8c0: 4639 mov r1, r7
801d8c2: 4630 mov r0, r6
801d8c4: 47c0 blx r8
801d8c6: 3001 adds r0, #1
801d8c8: d09a beq.n 801d800 <_printf_i+0x12c>
801d8ca: 3501 adds r5, #1
801d8cc: 68e3 ldr r3, [r4, #12]
801d8ce: 9a03 ldr r2, [sp, #12]
801d8d0: 1a9b subs r3, r3, r2
801d8d2: 42ab cmp r3, r5
801d8d4: dcf2 bgt.n 801d8bc <_printf_i+0x1e8>
801d8d6: e7eb b.n 801d8b0 <_printf_i+0x1dc>
801d8d8: 2500 movs r5, #0
801d8da: f104 0919 add.w r9, r4, #25
801d8de: e7f5 b.n 801d8cc <_printf_i+0x1f8>
801d8e0: 2b00 cmp r3, #0
801d8e2: d1ac bne.n 801d83e <_printf_i+0x16a>
801d8e4: 7803 ldrb r3, [r0, #0]
801d8e6: f884 3042 strb.w r3, [r4, #66] ; 0x42
801d8ea: f104 0542 add.w r5, r4, #66 ; 0x42
801d8ee: e76c b.n 801d7ca <_printf_i+0xf6>
801d8f0: 08022f3d .word 0x08022f3d
801d8f4: 08022f4e .word 0x08022f4e
0801d8f8 <_sbrk_r>:
801d8f8: b538 push {r3, r4, r5, lr}
801d8fa: 4c06 ldr r4, [pc, #24] ; (801d914 <_sbrk_r+0x1c>)
801d8fc: 2300 movs r3, #0
801d8fe: 4605 mov r5, r0
801d900: 4608 mov r0, r1
801d902: 6023 str r3, [r4, #0]
801d904: f7e7 fc74 bl 80051f0 <_sbrk>
801d908: 1c43 adds r3, r0, #1
801d90a: d102 bne.n 801d912 <_sbrk_r+0x1a>
801d90c: 6823 ldr r3, [r4, #0]
801d90e: b103 cbz r3, 801d912 <_sbrk_r+0x1a>
801d910: 602b str r3, [r5, #0]
801d912: bd38 pop {r3, r4, r5, pc}
801d914: 2000f840 .word 0x2000f840
0801d918 <__sread>:
801d918: b510 push {r4, lr}
801d91a: 460c mov r4, r1
801d91c: f9b1 100e ldrsh.w r1, [r1, #14]
801d920: f000 fa6e bl 801de00 <_read_r>
801d924: 2800 cmp r0, #0
801d926: bfab itete ge
801d928: 6d63 ldrge r3, [r4, #84] ; 0x54
801d92a: 89a3 ldrhlt r3, [r4, #12]
801d92c: 181b addge r3, r3, r0
801d92e: f423 5380 biclt.w r3, r3, #4096 ; 0x1000
801d932: bfac ite ge
801d934: 6563 strge r3, [r4, #84] ; 0x54
801d936: 81a3 strhlt r3, [r4, #12]
801d938: bd10 pop {r4, pc}
0801d93a <__swrite>:
801d93a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
801d93e: 461f mov r7, r3
801d940: 898b ldrh r3, [r1, #12]
801d942: 05db lsls r3, r3, #23
801d944: 4605 mov r5, r0
801d946: 460c mov r4, r1
801d948: 4616 mov r6, r2
801d94a: d505 bpl.n 801d958 <__swrite+0x1e>
801d94c: 2302 movs r3, #2
801d94e: 2200 movs r2, #0
801d950: f9b1 100e ldrsh.w r1, [r1, #14]
801d954: f000 f9b6 bl 801dcc4 <_lseek_r>
801d958: 89a3 ldrh r3, [r4, #12]
801d95a: f9b4 100e ldrsh.w r1, [r4, #14]
801d95e: f423 5380 bic.w r3, r3, #4096 ; 0x1000
801d962: 81a3 strh r3, [r4, #12]
801d964: 4632 mov r2, r6
801d966: 463b mov r3, r7
801d968: 4628 mov r0, r5
801d96a: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr}
801d96e: f000 b869 b.w 801da44 <_write_r>
0801d972 <__sseek>:
801d972: b510 push {r4, lr}
801d974: 460c mov r4, r1
801d976: f9b1 100e ldrsh.w r1, [r1, #14]
801d97a: f000 f9a3 bl 801dcc4 <_lseek_r>
801d97e: 1c43 adds r3, r0, #1
801d980: 89a3 ldrh r3, [r4, #12]
801d982: bf15 itete ne
801d984: 6560 strne r0, [r4, #84] ; 0x54
801d986: f423 5380 biceq.w r3, r3, #4096 ; 0x1000
801d98a: f443 5380 orrne.w r3, r3, #4096 ; 0x1000
801d98e: 81a3 strheq r3, [r4, #12]
801d990: bf18 it ne
801d992: 81a3 strhne r3, [r4, #12]
801d994: bd10 pop {r4, pc}
0801d996 <__sclose>:
801d996: f9b1 100e ldrsh.w r1, [r1, #14]
801d99a: f000 b8d3 b.w 801db44 <_close_r>
...
0801d9a0 <__swbuf_r>:
801d9a0: b5f8 push {r3, r4, r5, r6, r7, lr}
801d9a2: 460e mov r6, r1
801d9a4: 4614 mov r4, r2
801d9a6: 4605 mov r5, r0
801d9a8: b118 cbz r0, 801d9b2 <__swbuf_r+0x12>
801d9aa: 6983 ldr r3, [r0, #24]
801d9ac: b90b cbnz r3, 801d9b2 <__swbuf_r+0x12>
801d9ae: f7ff fa4f bl 801ce50 <__sinit>
801d9b2: 4b21 ldr r3, [pc, #132] ; (801da38 <__swbuf_r+0x98>)
801d9b4: 429c cmp r4, r3
801d9b6: d12a bne.n 801da0e <__swbuf_r+0x6e>
801d9b8: 686c ldr r4, [r5, #4]
801d9ba: 69a3 ldr r3, [r4, #24]
801d9bc: 60a3 str r3, [r4, #8]
801d9be: 89a3 ldrh r3, [r4, #12]
801d9c0: 071a lsls r2, r3, #28
801d9c2: d52e bpl.n 801da22 <__swbuf_r+0x82>
801d9c4: 6923 ldr r3, [r4, #16]
801d9c6: b363 cbz r3, 801da22 <__swbuf_r+0x82>
801d9c8: 6923 ldr r3, [r4, #16]
801d9ca: 6820 ldr r0, [r4, #0]
801d9cc: 1ac0 subs r0, r0, r3
801d9ce: 6963 ldr r3, [r4, #20]
801d9d0: b2f6 uxtb r6, r6
801d9d2: 4283 cmp r3, r0
801d9d4: 4637 mov r7, r6
801d9d6: dc04 bgt.n 801d9e2 <__swbuf_r+0x42>
801d9d8: 4621 mov r1, r4
801d9da: 4628 mov r0, r5
801d9dc: f000 f948 bl 801dc70 <_fflush_r>
801d9e0: bb28 cbnz r0, 801da2e <__swbuf_r+0x8e>
801d9e2: 68a3 ldr r3, [r4, #8]
801d9e4: 3b01 subs r3, #1
801d9e6: 60a3 str r3, [r4, #8]
801d9e8: 6823 ldr r3, [r4, #0]
801d9ea: 1c5a adds r2, r3, #1
801d9ec: 6022 str r2, [r4, #0]
801d9ee: 701e strb r6, [r3, #0]
801d9f0: 6963 ldr r3, [r4, #20]
801d9f2: 3001 adds r0, #1
801d9f4: 4283 cmp r3, r0
801d9f6: d004 beq.n 801da02 <__swbuf_r+0x62>
801d9f8: 89a3 ldrh r3, [r4, #12]
801d9fa: 07db lsls r3, r3, #31
801d9fc: d519 bpl.n 801da32 <__swbuf_r+0x92>
801d9fe: 2e0a cmp r6, #10
801da00: d117 bne.n 801da32 <__swbuf_r+0x92>
801da02: 4621 mov r1, r4
801da04: 4628 mov r0, r5
801da06: f000 f933 bl 801dc70 <_fflush_r>
801da0a: b190 cbz r0, 801da32 <__swbuf_r+0x92>
801da0c: e00f b.n 801da2e <__swbuf_r+0x8e>
801da0e: 4b0b ldr r3, [pc, #44] ; (801da3c <__swbuf_r+0x9c>)
801da10: 429c cmp r4, r3
801da12: d101 bne.n 801da18 <__swbuf_r+0x78>
801da14: 68ac ldr r4, [r5, #8]
801da16: e7d0 b.n 801d9ba <__swbuf_r+0x1a>
801da18: 4b09 ldr r3, [pc, #36] ; (801da40 <__swbuf_r+0xa0>)
801da1a: 429c cmp r4, r3
801da1c: bf08 it eq
801da1e: 68ec ldreq r4, [r5, #12]
801da20: e7cb b.n 801d9ba <__swbuf_r+0x1a>
801da22: 4621 mov r1, r4
801da24: 4628 mov r0, r5
801da26: f000 f81f bl 801da68 <__swsetup_r>
801da2a: 2800 cmp r0, #0
801da2c: d0cc beq.n 801d9c8 <__swbuf_r+0x28>
801da2e: f04f 37ff mov.w r7, #4294967295
801da32: 4638 mov r0, r7
801da34: bdf8 pop {r3, r4, r5, r6, r7, pc}
801da36: bf00 nop
801da38: 08022eec .word 0x08022eec
801da3c: 08022f0c .word 0x08022f0c
801da40: 08022ecc .word 0x08022ecc
0801da44 <_write_r>:
801da44: b538 push {r3, r4, r5, lr}
801da46: 4c07 ldr r4, [pc, #28] ; (801da64 <_write_r+0x20>)
801da48: 4605 mov r5, r0
801da4a: 4608 mov r0, r1
801da4c: 4611 mov r1, r2
801da4e: 2200 movs r2, #0
801da50: 6022 str r2, [r4, #0]
801da52: 461a mov r2, r3
801da54: f7e7 fb7b bl 800514e <_write>
801da58: 1c43 adds r3, r0, #1
801da5a: d102 bne.n 801da62 <_write_r+0x1e>
801da5c: 6823 ldr r3, [r4, #0]
801da5e: b103 cbz r3, 801da62 <_write_r+0x1e>
801da60: 602b str r3, [r5, #0]
801da62: bd38 pop {r3, r4, r5, pc}
801da64: 2000f840 .word 0x2000f840
0801da68 <__swsetup_r>:
801da68: 4b32 ldr r3, [pc, #200] ; (801db34 <__swsetup_r+0xcc>)
801da6a: b570 push {r4, r5, r6, lr}
801da6c: 681d ldr r5, [r3, #0]
801da6e: 4606 mov r6, r0
801da70: 460c mov r4, r1
801da72: b125 cbz r5, 801da7e <__swsetup_r+0x16>
801da74: 69ab ldr r3, [r5, #24]
801da76: b913 cbnz r3, 801da7e <__swsetup_r+0x16>
801da78: 4628 mov r0, r5
801da7a: f7ff f9e9 bl 801ce50 <__sinit>
801da7e: 4b2e ldr r3, [pc, #184] ; (801db38 <__swsetup_r+0xd0>)
801da80: 429c cmp r4, r3
801da82: d10f bne.n 801daa4 <__swsetup_r+0x3c>
801da84: 686c ldr r4, [r5, #4]
801da86: f9b4 300c ldrsh.w r3, [r4, #12]
801da8a: b29a uxth r2, r3
801da8c: 0715 lsls r5, r2, #28
801da8e: d42c bmi.n 801daea <__swsetup_r+0x82>
801da90: 06d0 lsls r0, r2, #27
801da92: d411 bmi.n 801dab8 <__swsetup_r+0x50>
801da94: 2209 movs r2, #9
801da96: 6032 str r2, [r6, #0]
801da98: f043 0340 orr.w r3, r3, #64 ; 0x40
801da9c: 81a3 strh r3, [r4, #12]
801da9e: f04f 30ff mov.w r0, #4294967295
801daa2: e03e b.n 801db22 <__swsetup_r+0xba>
801daa4: 4b25 ldr r3, [pc, #148] ; (801db3c <__swsetup_r+0xd4>)
801daa6: 429c cmp r4, r3
801daa8: d101 bne.n 801daae <__swsetup_r+0x46>
801daaa: 68ac ldr r4, [r5, #8]
801daac: e7eb b.n 801da86 <__swsetup_r+0x1e>
801daae: 4b24 ldr r3, [pc, #144] ; (801db40 <__swsetup_r+0xd8>)
801dab0: 429c cmp r4, r3
801dab2: bf08 it eq
801dab4: 68ec ldreq r4, [r5, #12]
801dab6: e7e6 b.n 801da86 <__swsetup_r+0x1e>
801dab8: 0751 lsls r1, r2, #29
801daba: d512 bpl.n 801dae2 <__swsetup_r+0x7a>
801dabc: 6b61 ldr r1, [r4, #52] ; 0x34
801dabe: b141 cbz r1, 801dad2 <__swsetup_r+0x6a>
801dac0: f104 0344 add.w r3, r4, #68 ; 0x44
801dac4: 4299 cmp r1, r3
801dac6: d002 beq.n 801dace <__swsetup_r+0x66>
801dac8: 4630 mov r0, r6
801daca: f7ff fa53 bl 801cf74 <_free_r>
801dace: 2300 movs r3, #0
801dad0: 6363 str r3, [r4, #52] ; 0x34
801dad2: 89a3 ldrh r3, [r4, #12]
801dad4: f023 0324 bic.w r3, r3, #36 ; 0x24
801dad8: 81a3 strh r3, [r4, #12]
801dada: 2300 movs r3, #0
801dadc: 6063 str r3, [r4, #4]
801dade: 6923 ldr r3, [r4, #16]
801dae0: 6023 str r3, [r4, #0]
801dae2: 89a3 ldrh r3, [r4, #12]
801dae4: f043 0308 orr.w r3, r3, #8
801dae8: 81a3 strh r3, [r4, #12]
801daea: 6923 ldr r3, [r4, #16]
801daec: b94b cbnz r3, 801db02 <__swsetup_r+0x9a>
801daee: 89a3 ldrh r3, [r4, #12]
801daf0: f403 7320 and.w r3, r3, #640 ; 0x280
801daf4: f5b3 7f00 cmp.w r3, #512 ; 0x200
801daf8: d003 beq.n 801db02 <__swsetup_r+0x9a>
801dafa: 4621 mov r1, r4
801dafc: 4630 mov r0, r6
801dafe: f000 f917 bl 801dd30 <__smakebuf_r>
801db02: 89a2 ldrh r2, [r4, #12]
801db04: f012 0301 ands.w r3, r2, #1
801db08: d00c beq.n 801db24 <__swsetup_r+0xbc>
801db0a: 2300 movs r3, #0
801db0c: 60a3 str r3, [r4, #8]
801db0e: 6963 ldr r3, [r4, #20]
801db10: 425b negs r3, r3
801db12: 61a3 str r3, [r4, #24]
801db14: 6923 ldr r3, [r4, #16]
801db16: b953 cbnz r3, 801db2e <__swsetup_r+0xc6>
801db18: f9b4 300c ldrsh.w r3, [r4, #12]
801db1c: f013 0080 ands.w r0, r3, #128 ; 0x80
801db20: d1ba bne.n 801da98 <__swsetup_r+0x30>
801db22: bd70 pop {r4, r5, r6, pc}
801db24: 0792 lsls r2, r2, #30
801db26: bf58 it pl
801db28: 6963 ldrpl r3, [r4, #20]
801db2a: 60a3 str r3, [r4, #8]
801db2c: e7f2 b.n 801db14 <__swsetup_r+0xac>
801db2e: 2000 movs r0, #0
801db30: e7f7 b.n 801db22 <__swsetup_r+0xba>
801db32: bf00 nop
801db34: 20000084 .word 0x20000084
801db38: 08022eec .word 0x08022eec
801db3c: 08022f0c .word 0x08022f0c
801db40: 08022ecc .word 0x08022ecc
0801db44 <_close_r>:
801db44: b538 push {r3, r4, r5, lr}
801db46: 4c06 ldr r4, [pc, #24] ; (801db60 <_close_r+0x1c>)
801db48: 2300 movs r3, #0
801db4a: 4605 mov r5, r0
801db4c: 4608 mov r0, r1
801db4e: 6023 str r3, [r4, #0]
801db50: f7e7 fb19 bl 8005186 <_close>
801db54: 1c43 adds r3, r0, #1
801db56: d102 bne.n 801db5e <_close_r+0x1a>
801db58: 6823 ldr r3, [r4, #0]
801db5a: b103 cbz r3, 801db5e <_close_r+0x1a>
801db5c: 602b str r3, [r5, #0]
801db5e: bd38 pop {r3, r4, r5, pc}
801db60: 2000f840 .word 0x2000f840
0801db64 <__sflush_r>:
801db64: 898a ldrh r2, [r1, #12]
801db66: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
801db6a: 4605 mov r5, r0
801db6c: 0710 lsls r0, r2, #28
801db6e: 460c mov r4, r1
801db70: d458 bmi.n 801dc24 <__sflush_r+0xc0>
801db72: 684b ldr r3, [r1, #4]
801db74: 2b00 cmp r3, #0
801db76: dc05 bgt.n 801db84 <__sflush_r+0x20>
801db78: 6c0b ldr r3, [r1, #64] ; 0x40
801db7a: 2b00 cmp r3, #0
801db7c: dc02 bgt.n 801db84 <__sflush_r+0x20>
801db7e: 2000 movs r0, #0
801db80: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
801db84: 6ae6 ldr r6, [r4, #44] ; 0x2c
801db86: 2e00 cmp r6, #0
801db88: d0f9 beq.n 801db7e <__sflush_r+0x1a>
801db8a: 2300 movs r3, #0
801db8c: f412 5280 ands.w r2, r2, #4096 ; 0x1000
801db90: 682f ldr r7, [r5, #0]
801db92: 6a21 ldr r1, [r4, #32]
801db94: 602b str r3, [r5, #0]
801db96: d032 beq.n 801dbfe <__sflush_r+0x9a>
801db98: 6d60 ldr r0, [r4, #84] ; 0x54
801db9a: 89a3 ldrh r3, [r4, #12]
801db9c: 075a lsls r2, r3, #29
801db9e: d505 bpl.n 801dbac <__sflush_r+0x48>
801dba0: 6863 ldr r3, [r4, #4]
801dba2: 1ac0 subs r0, r0, r3
801dba4: 6b63 ldr r3, [r4, #52] ; 0x34
801dba6: b10b cbz r3, 801dbac <__sflush_r+0x48>
801dba8: 6c23 ldr r3, [r4, #64] ; 0x40
801dbaa: 1ac0 subs r0, r0, r3
801dbac: 2300 movs r3, #0
801dbae: 4602 mov r2, r0
801dbb0: 6ae6 ldr r6, [r4, #44] ; 0x2c
801dbb2: 6a21 ldr r1, [r4, #32]
801dbb4: 4628 mov r0, r5
801dbb6: 47b0 blx r6
801dbb8: 1c43 adds r3, r0, #1
801dbba: 89a3 ldrh r3, [r4, #12]
801dbbc: d106 bne.n 801dbcc <__sflush_r+0x68>
801dbbe: 6829 ldr r1, [r5, #0]
801dbc0: 291d cmp r1, #29
801dbc2: d848 bhi.n 801dc56 <__sflush_r+0xf2>
801dbc4: 4a29 ldr r2, [pc, #164] ; (801dc6c <__sflush_r+0x108>)
801dbc6: 40ca lsrs r2, r1
801dbc8: 07d6 lsls r6, r2, #31
801dbca: d544 bpl.n 801dc56 <__sflush_r+0xf2>
801dbcc: 2200 movs r2, #0
801dbce: 6062 str r2, [r4, #4]
801dbd0: 04d9 lsls r1, r3, #19
801dbd2: 6922 ldr r2, [r4, #16]
801dbd4: 6022 str r2, [r4, #0]
801dbd6: d504 bpl.n 801dbe2 <__sflush_r+0x7e>
801dbd8: 1c42 adds r2, r0, #1
801dbda: d101 bne.n 801dbe0 <__sflush_r+0x7c>
801dbdc: 682b ldr r3, [r5, #0]
801dbde: b903 cbnz r3, 801dbe2 <__sflush_r+0x7e>
801dbe0: 6560 str r0, [r4, #84] ; 0x54
801dbe2: 6b61 ldr r1, [r4, #52] ; 0x34
801dbe4: 602f str r7, [r5, #0]
801dbe6: 2900 cmp r1, #0
801dbe8: d0c9 beq.n 801db7e <__sflush_r+0x1a>
801dbea: f104 0344 add.w r3, r4, #68 ; 0x44
801dbee: 4299 cmp r1, r3
801dbf0: d002 beq.n 801dbf8 <__sflush_r+0x94>
801dbf2: 4628 mov r0, r5
801dbf4: f7ff f9be bl 801cf74 <_free_r>
801dbf8: 2000 movs r0, #0
801dbfa: 6360 str r0, [r4, #52] ; 0x34
801dbfc: e7c0 b.n 801db80 <__sflush_r+0x1c>
801dbfe: 2301 movs r3, #1
801dc00: 4628 mov r0, r5
801dc02: 47b0 blx r6
801dc04: 1c41 adds r1, r0, #1
801dc06: d1c8 bne.n 801db9a <__sflush_r+0x36>
801dc08: 682b ldr r3, [r5, #0]
801dc0a: 2b00 cmp r3, #0
801dc0c: d0c5 beq.n 801db9a <__sflush_r+0x36>
801dc0e: 2b1d cmp r3, #29
801dc10: d001 beq.n 801dc16 <__sflush_r+0xb2>
801dc12: 2b16 cmp r3, #22
801dc14: d101 bne.n 801dc1a <__sflush_r+0xb6>
801dc16: 602f str r7, [r5, #0]
801dc18: e7b1 b.n 801db7e <__sflush_r+0x1a>
801dc1a: 89a3 ldrh r3, [r4, #12]
801dc1c: f043 0340 orr.w r3, r3, #64 ; 0x40
801dc20: 81a3 strh r3, [r4, #12]
801dc22: e7ad b.n 801db80 <__sflush_r+0x1c>
801dc24: 690f ldr r7, [r1, #16]
801dc26: 2f00 cmp r7, #0
801dc28: d0a9 beq.n 801db7e <__sflush_r+0x1a>
801dc2a: 0793 lsls r3, r2, #30
801dc2c: 680e ldr r6, [r1, #0]
801dc2e: bf08 it eq
801dc30: 694b ldreq r3, [r1, #20]
801dc32: 600f str r7, [r1, #0]
801dc34: bf18 it ne
801dc36: 2300 movne r3, #0
801dc38: eba6 0807 sub.w r8, r6, r7
801dc3c: 608b str r3, [r1, #8]
801dc3e: f1b8 0f00 cmp.w r8, #0
801dc42: dd9c ble.n 801db7e <__sflush_r+0x1a>
801dc44: 4643 mov r3, r8
801dc46: 463a mov r2, r7
801dc48: 6a21 ldr r1, [r4, #32]
801dc4a: 6aa6 ldr r6, [r4, #40] ; 0x28
801dc4c: 4628 mov r0, r5
801dc4e: 47b0 blx r6
801dc50: 2800 cmp r0, #0
801dc52: dc06 bgt.n 801dc62 <__sflush_r+0xfe>
801dc54: 89a3 ldrh r3, [r4, #12]
801dc56: f043 0340 orr.w r3, r3, #64 ; 0x40
801dc5a: 81a3 strh r3, [r4, #12]
801dc5c: f04f 30ff mov.w r0, #4294967295
801dc60: e78e b.n 801db80 <__sflush_r+0x1c>
801dc62: 4407 add r7, r0
801dc64: eba8 0800 sub.w r8, r8, r0
801dc68: e7e9 b.n 801dc3e <__sflush_r+0xda>
801dc6a: bf00 nop
801dc6c: 20400001 .word 0x20400001
0801dc70 <_fflush_r>:
801dc70: b538 push {r3, r4, r5, lr}
801dc72: 690b ldr r3, [r1, #16]
801dc74: 4605 mov r5, r0
801dc76: 460c mov r4, r1
801dc78: b1db cbz r3, 801dcb2 <_fflush_r+0x42>
801dc7a: b118 cbz r0, 801dc84 <_fflush_r+0x14>
801dc7c: 6983 ldr r3, [r0, #24]
801dc7e: b90b cbnz r3, 801dc84 <_fflush_r+0x14>
801dc80: f7ff f8e6 bl 801ce50 <__sinit>
801dc84: 4b0c ldr r3, [pc, #48] ; (801dcb8 <_fflush_r+0x48>)
801dc86: 429c cmp r4, r3
801dc88: d109 bne.n 801dc9e <_fflush_r+0x2e>
801dc8a: 686c ldr r4, [r5, #4]
801dc8c: f9b4 300c ldrsh.w r3, [r4, #12]
801dc90: b17b cbz r3, 801dcb2 <_fflush_r+0x42>
801dc92: 4621 mov r1, r4
801dc94: 4628 mov r0, r5
801dc96: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
801dc9a: f7ff bf63 b.w 801db64 <__sflush_r>
801dc9e: 4b07 ldr r3, [pc, #28] ; (801dcbc <_fflush_r+0x4c>)
801dca0: 429c cmp r4, r3
801dca2: d101 bne.n 801dca8 <_fflush_r+0x38>
801dca4: 68ac ldr r4, [r5, #8]
801dca6: e7f1 b.n 801dc8c <_fflush_r+0x1c>
801dca8: 4b05 ldr r3, [pc, #20] ; (801dcc0 <_fflush_r+0x50>)
801dcaa: 429c cmp r4, r3
801dcac: bf08 it eq
801dcae: 68ec ldreq r4, [r5, #12]
801dcb0: e7ec b.n 801dc8c <_fflush_r+0x1c>
801dcb2: 2000 movs r0, #0
801dcb4: bd38 pop {r3, r4, r5, pc}
801dcb6: bf00 nop
801dcb8: 08022eec .word 0x08022eec
801dcbc: 08022f0c .word 0x08022f0c
801dcc0: 08022ecc .word 0x08022ecc
0801dcc4 <_lseek_r>:
801dcc4: b538 push {r3, r4, r5, lr}
801dcc6: 4c07 ldr r4, [pc, #28] ; (801dce4 <_lseek_r+0x20>)
801dcc8: 4605 mov r5, r0
801dcca: 4608 mov r0, r1
801dccc: 4611 mov r1, r2
801dcce: 2200 movs r2, #0
801dcd0: 6022 str r2, [r4, #0]
801dcd2: 461a mov r2, r3
801dcd4: f7e7 fa7e bl 80051d4 <_lseek>
801dcd8: 1c43 adds r3, r0, #1
801dcda: d102 bne.n 801dce2 <_lseek_r+0x1e>
801dcdc: 6823 ldr r3, [r4, #0]
801dcde: b103 cbz r3, 801dce2 <_lseek_r+0x1e>
801dce0: 602b str r3, [r5, #0]
801dce2: bd38 pop {r3, r4, r5, pc}
801dce4: 2000f840 .word 0x2000f840
0801dce8 <__swhatbuf_r>:
801dce8: b570 push {r4, r5, r6, lr}
801dcea: 460e mov r6, r1
801dcec: f9b1 100e ldrsh.w r1, [r1, #14]
801dcf0: 2900 cmp r1, #0
801dcf2: b096 sub sp, #88 ; 0x58
801dcf4: 4614 mov r4, r2
801dcf6: 461d mov r5, r3
801dcf8: da07 bge.n 801dd0a <__swhatbuf_r+0x22>
801dcfa: 2300 movs r3, #0
801dcfc: 602b str r3, [r5, #0]
801dcfe: 89b3 ldrh r3, [r6, #12]
801dd00: 061a lsls r2, r3, #24
801dd02: d410 bmi.n 801dd26 <__swhatbuf_r+0x3e>
801dd04: f44f 6380 mov.w r3, #1024 ; 0x400
801dd08: e00e b.n 801dd28 <__swhatbuf_r+0x40>
801dd0a: 466a mov r2, sp
801dd0c: f000 f88a bl 801de24 <_fstat_r>
801dd10: 2800 cmp r0, #0
801dd12: dbf2 blt.n 801dcfa <__swhatbuf_r+0x12>
801dd14: 9a01 ldr r2, [sp, #4]
801dd16: f402 4270 and.w r2, r2, #61440 ; 0xf000
801dd1a: f5a2 5300 sub.w r3, r2, #8192 ; 0x2000
801dd1e: 425a negs r2, r3
801dd20: 415a adcs r2, r3
801dd22: 602a str r2, [r5, #0]
801dd24: e7ee b.n 801dd04 <__swhatbuf_r+0x1c>
801dd26: 2340 movs r3, #64 ; 0x40
801dd28: 2000 movs r0, #0
801dd2a: 6023 str r3, [r4, #0]
801dd2c: b016 add sp, #88 ; 0x58
801dd2e: bd70 pop {r4, r5, r6, pc}
0801dd30 <__smakebuf_r>:
801dd30: 898b ldrh r3, [r1, #12]
801dd32: b573 push {r0, r1, r4, r5, r6, lr}
801dd34: 079d lsls r5, r3, #30
801dd36: 4606 mov r6, r0
801dd38: 460c mov r4, r1
801dd3a: d507 bpl.n 801dd4c <__smakebuf_r+0x1c>
801dd3c: f104 0347 add.w r3, r4, #71 ; 0x47
801dd40: 6023 str r3, [r4, #0]
801dd42: 6123 str r3, [r4, #16]
801dd44: 2301 movs r3, #1
801dd46: 6163 str r3, [r4, #20]
801dd48: b002 add sp, #8
801dd4a: bd70 pop {r4, r5, r6, pc}
801dd4c: ab01 add r3, sp, #4
801dd4e: 466a mov r2, sp
801dd50: f7ff ffca bl 801dce8 <__swhatbuf_r>
801dd54: 9900 ldr r1, [sp, #0]
801dd56: 4605 mov r5, r0
801dd58: 4630 mov r0, r6
801dd5a: f7ff f959 bl 801d010 <_malloc_r>
801dd5e: b948 cbnz r0, 801dd74 <__smakebuf_r+0x44>
801dd60: f9b4 300c ldrsh.w r3, [r4, #12]
801dd64: 059a lsls r2, r3, #22
801dd66: d4ef bmi.n 801dd48 <__smakebuf_r+0x18>
801dd68: f023 0303 bic.w r3, r3, #3
801dd6c: f043 0302 orr.w r3, r3, #2
801dd70: 81a3 strh r3, [r4, #12]
801dd72: e7e3 b.n 801dd3c <__smakebuf_r+0xc>
801dd74: 4b0d ldr r3, [pc, #52] ; (801ddac <__smakebuf_r+0x7c>)
801dd76: 62b3 str r3, [r6, #40] ; 0x28
801dd78: 89a3 ldrh r3, [r4, #12]
801dd7a: 6020 str r0, [r4, #0]
801dd7c: f043 0380 orr.w r3, r3, #128 ; 0x80
801dd80: 81a3 strh r3, [r4, #12]
801dd82: 9b00 ldr r3, [sp, #0]
801dd84: 6163 str r3, [r4, #20]
801dd86: 9b01 ldr r3, [sp, #4]
801dd88: 6120 str r0, [r4, #16]
801dd8a: b15b cbz r3, 801dda4 <__smakebuf_r+0x74>
801dd8c: f9b4 100e ldrsh.w r1, [r4, #14]
801dd90: 4630 mov r0, r6
801dd92: f000 f859 bl 801de48 <_isatty_r>
801dd96: b128 cbz r0, 801dda4 <__smakebuf_r+0x74>
801dd98: 89a3 ldrh r3, [r4, #12]
801dd9a: f023 0303 bic.w r3, r3, #3
801dd9e: f043 0301 orr.w r3, r3, #1
801dda2: 81a3 strh r3, [r4, #12]
801dda4: 89a3 ldrh r3, [r4, #12]
801dda6: 431d orrs r5, r3
801dda8: 81a5 strh r5, [r4, #12]
801ddaa: e7cd b.n 801dd48 <__smakebuf_r+0x18>
801ddac: 0801ce19 .word 0x0801ce19
0801ddb0 <__malloc_lock>:
801ddb0: 4770 bx lr
0801ddb2 <__malloc_unlock>:
801ddb2: 4770 bx lr
0801ddb4 <_realloc_r>:
801ddb4: b5f8 push {r3, r4, r5, r6, r7, lr}
801ddb6: 4607 mov r7, r0
801ddb8: 4614 mov r4, r2
801ddba: 460e mov r6, r1
801ddbc: b921 cbnz r1, 801ddc8 <_realloc_r+0x14>
801ddbe: 4611 mov r1, r2
801ddc0: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr}
801ddc4: f7ff b924 b.w 801d010 <_malloc_r>
801ddc8: b922 cbnz r2, 801ddd4 <_realloc_r+0x20>
801ddca: f7ff f8d3 bl 801cf74 <_free_r>
801ddce: 4625 mov r5, r4
801ddd0: 4628 mov r0, r5
801ddd2: bdf8 pop {r3, r4, r5, r6, r7, pc}
801ddd4: f000 f848 bl 801de68 <_malloc_usable_size_r>
801ddd8: 42a0 cmp r0, r4
801ddda: d20f bcs.n 801ddfc <_realloc_r+0x48>
801dddc: 4621 mov r1, r4
801ddde: 4638 mov r0, r7
801dde0: f7ff f916 bl 801d010 <_malloc_r>
801dde4: 4605 mov r5, r0
801dde6: 2800 cmp r0, #0
801dde8: d0f2 beq.n 801ddd0 <_realloc_r+0x1c>
801ddea: 4631 mov r1, r6
801ddec: 4622 mov r2, r4
801ddee: f7fe ff56 bl 801cc9e <memcpy>
801ddf2: 4631 mov r1, r6
801ddf4: 4638 mov r0, r7
801ddf6: f7ff f8bd bl 801cf74 <_free_r>
801ddfa: e7e9 b.n 801ddd0 <_realloc_r+0x1c>
801ddfc: 4635 mov r5, r6
801ddfe: e7e7 b.n 801ddd0 <_realloc_r+0x1c>
0801de00 <_read_r>:
801de00: b538 push {r3, r4, r5, lr}
801de02: 4c07 ldr r4, [pc, #28] ; (801de20 <_read_r+0x20>)
801de04: 4605 mov r5, r0
801de06: 4608 mov r0, r1
801de08: 4611 mov r1, r2
801de0a: 2200 movs r2, #0
801de0c: 6022 str r2, [r4, #0]
801de0e: 461a mov r2, r3
801de10: f7e7 f980 bl 8005114 <_read>
801de14: 1c43 adds r3, r0, #1
801de16: d102 bne.n 801de1e <_read_r+0x1e>
801de18: 6823 ldr r3, [r4, #0]
801de1a: b103 cbz r3, 801de1e <_read_r+0x1e>
801de1c: 602b str r3, [r5, #0]
801de1e: bd38 pop {r3, r4, r5, pc}
801de20: 2000f840 .word 0x2000f840
0801de24 <_fstat_r>:
801de24: b538 push {r3, r4, r5, lr}
801de26: 4c07 ldr r4, [pc, #28] ; (801de44 <_fstat_r+0x20>)
801de28: 2300 movs r3, #0
801de2a: 4605 mov r5, r0
801de2c: 4608 mov r0, r1
801de2e: 4611 mov r1, r2
801de30: 6023 str r3, [r4, #0]
801de32: f7e7 f9b4 bl 800519e <_fstat>
801de36: 1c43 adds r3, r0, #1
801de38: d102 bne.n 801de40 <_fstat_r+0x1c>
801de3a: 6823 ldr r3, [r4, #0]
801de3c: b103 cbz r3, 801de40 <_fstat_r+0x1c>
801de3e: 602b str r3, [r5, #0]
801de40: bd38 pop {r3, r4, r5, pc}
801de42: bf00 nop
801de44: 2000f840 .word 0x2000f840
0801de48 <_isatty_r>:
801de48: b538 push {r3, r4, r5, lr}
801de4a: 4c06 ldr r4, [pc, #24] ; (801de64 <_isatty_r+0x1c>)
801de4c: 2300 movs r3, #0
801de4e: 4605 mov r5, r0
801de50: 4608 mov r0, r1
801de52: 6023 str r3, [r4, #0]
801de54: f7e7 f9b3 bl 80051be <_isatty>
801de58: 1c43 adds r3, r0, #1
801de5a: d102 bne.n 801de62 <_isatty_r+0x1a>
801de5c: 6823 ldr r3, [r4, #0]
801de5e: b103 cbz r3, 801de62 <_isatty_r+0x1a>
801de60: 602b str r3, [r5, #0]
801de62: bd38 pop {r3, r4, r5, pc}
801de64: 2000f840 .word 0x2000f840
0801de68 <_malloc_usable_size_r>:
801de68: f851 3c04 ldr.w r3, [r1, #-4]
801de6c: 1f18 subs r0, r3, #4
801de6e: 2b00 cmp r3, #0
801de70: bfbc itt lt
801de72: 580b ldrlt r3, [r1, r0]
801de74: 18c0 addlt r0, r0, r3
801de76: 4770 bx lr
0801de78 <_init>:
801de78: b5f8 push {r3, r4, r5, r6, r7, lr}
801de7a: bf00 nop
801de7c: bcf8 pop {r3, r4, r5, r6, r7}
801de7e: bc08 pop {r3}
801de80: 469e mov lr, r3
801de82: 4770 bx lr
0801de84 <_fini>:
801de84: b5f8 push {r3, r4, r5, r6, r7, lr}
801de86: bf00 nop
801de88: bcf8 pop {r3, r4, r5, r6, r7}
801de8a: bc08 pop {r3}
801de8c: 469e mov lr, r3
801de8e: 4770 bx lr