Space_Invaders/Debug/Space_Invaders.list
Thomas 9c28bf0677 Ajout de Task projectil
Remplissage de la liste des missiles et test si les missiles touches. Remplissage de la queue_N pour tuer le joueur.

Ajout d'une animation en cas de collision ?
2021-04-13 20:00:07 +02:00

79335 lines
2.9 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 0001d510 080001d0 080001d0 000101d0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 000050c0 0801d6e0 0801d6e0 0002d6e0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .ARM.extab 00000000 080227a0 080227a0 000400d4 2**0
CONTENTS
4 .ARM 00000008 080227a0 080227a0 000327a0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .preinit_array 00000000 080227a8 080227a8 000400d4 2**0
CONTENTS, ALLOC, LOAD, DATA
6 .init_array 00000004 080227a8 080227a8 000327a8 2**2
CONTENTS, ALLOC, LOAD, DATA
7 .fini_array 00000004 080227ac 080227ac 000327ac 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .data 000000d4 20000000 080227b0 00040000 2**2
CONTENTS, ALLOC, LOAD, DATA
9 .bss 0000f760 200000d4 08022884 000400d4 2**2
ALLOC
10 ._user_heap_stack 00000604 2000f834 08022884 0004f834 2**0
ALLOC
11 .ARM.attributes 00000030 00000000 00000000 000400d4 2**0
CONTENTS, READONLY
12 .debug_info 00055b1c 00000000 00000000 00040104 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_abbrev 00009e35 00000000 00000000 00095c20 2**0
CONTENTS, READONLY, DEBUGGING
14 .debug_aranges 00003580 00000000 00000000 0009fa58 2**3
CONTENTS, READONLY, DEBUGGING
15 .debug_ranges 00003288 00000000 00000000 000a2fd8 2**3
CONTENTS, READONLY, DEBUGGING
16 .debug_macro 0003df8f 00000000 00000000 000a6260 2**0
CONTENTS, READONLY, DEBUGGING
17 .debug_line 0003e246 00000000 00000000 000e41ef 2**0
CONTENTS, READONLY, DEBUGGING
18 .debug_str 00133267 00000000 00000000 00122435 2**0
CONTENTS, READONLY, DEBUGGING
19 .comment 0000007b 00000000 00000000 0025569c 2**0
CONTENTS, READONLY
20 .debug_frame 0000e6d0 00000000 00000000 00255718 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: 200000d4 .word 0x200000d4
80001ec: 00000000 .word 0x00000000
80001f0: 0801d6c8 .word 0x0801d6c8
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: 200000d8 .word 0x200000d8
800020c: 0801d6c8 .word 0x0801d6c8
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: 200000f0 .word 0x200000f0
8000614: 20000148 .word 0x20000148
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 f896 bl 8002754 <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 f851 bl 8002718 <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 f81b bl 8002718 <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: 20000348 .word 0x20000348
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: f001 ff68 bl 8002718 <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: f001 ff5a bl 8002718 <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: f001 ff3f bl 8002718 <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: f001 ff31 bl 8002718 <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: 20000348 .word 0x20000348
80008f8: 2000034c .word 0x2000034c
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: f001 fee4 bl 80026e4 <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: f001 fed0 bl 80026e4 <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: f001 fec1 bl 8002718 <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: f001 fe36 bl 8002718 <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: f001 fe26 bl 8002718 <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: f001 fe18 bl 8002718 <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: 20000348 .word 0x20000348
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: 20000348 .word 0x20000348
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: f001 fdcf bl 80026d0 <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: 20000348 .word 0x20000348
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: f01b fce3 bl 801c536 <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 f866 bl 8004c5a <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_ADC1_Init();
8000bca: f000 fa1f bl 800100c <MX_ADC1_Init>
MX_DAC_Init();
8000bce: f000 fae3 bl 8001198 <MX_DAC_Init>
MX_UART7_Init();
8000bd2: f000 ff5f bl 8001a94 <MX_UART7_Init>
MX_FMC_Init();
8000bd6: f000 ffed bl 8001bb4 <MX_FMC_Init>
MX_DMA2D_Init();
8000bda: f000 fb07 bl 80011ec <MX_DMA2D_Init>
MX_CRC_Init();
8000bde: f000 fab9 bl 8001154 <MX_CRC_Init>
MX_RNG_Init();
8000be2: f000 fc37 bl 8001454 <MX_RNG_Init>
/* USER CODE BEGIN 2 */
BSP_LCD_Init();
8000be6: f001 fdc1 bl 800276c <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: f001 fe54 bl 800289c <BSP_LCD_LayerDefaultInit>
BSP_LCD_LayerDefaultInit(1,
LCD_FB_START_ADDRESS + BSP_LCD_GetXSize() * BSP_LCD_GetYSize() * 4);
8000bf4: f001 fe2a bl 800284c <BSP_LCD_GetXSize>
8000bf8: 4604 mov r4, r0
8000bfa: f001 fe3b bl 8002874 <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: f001 fe45 bl 800289c <BSP_LCD_LayerDefaultInit>
BSP_LCD_DisplayOn();
8000c12: f002 fb0d bl 8003230 <BSP_LCD_DisplayOn>
BSP_LCD_SelectLayer(1);
8000c16: 2001 movs r0, #1
8000c18: f001 fea0 bl 800295c <BSP_LCD_SelectLayer>
BSP_LCD_Clear(LCD_COLOR_LIGHTGREEN);
8000c1c: f06f 107f mvn.w r0, #8323199 ; 0x7f007f
8000c20: f001 ff0e bl 8002a40 <BSP_LCD_Clear>
BSP_LCD_SetFont(&Font12);
8000c24: 4887 ldr r0, [pc, #540] ; (8000e44 <main+0x2e8>)
8000c26: f001 fedb bl 80029e0 <BSP_LCD_SetFont>
BSP_LCD_SetTextColor(LCD_COLOR_BLUE);
8000c2a: 4887 ldr r0, [pc, #540] ; (8000e48 <main+0x2ec>)
8000c2c: f001 fea6 bl 800297c <BSP_LCD_SetTextColor>
BSP_LCD_SetBackColor(LCD_COLOR_LIGHTGREEN);
8000c30: f06f 107f mvn.w r0, #8323199 ; 0x7f007f
8000c34: f001 feba bl 80029ac <BSP_LCD_SetBackColor>
BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
8000c38: f001 fe08 bl 800284c <BSP_LCD_GetXSize>
8000c3c: 4603 mov r3, r0
8000c3e: b29c uxth r4, r3
8000c40: f001 fe18 bl 8002874 <BSP_LCD_GetYSize>
8000c44: 4603 mov r3, r0
8000c46: b29b uxth r3, r3
8000c48: 4619 mov r1, r3
8000c4a: 4620 mov r0, r4
8000c4c: f002 febe bl 80039cc <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 fb9a bl 800d39c <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 fb8b bl 800d39c <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 fb7c bl 800d39c <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 fb6d bl 800d39c <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 fb5e bl 800d39c <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 f98a bl 800d01a <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 f977 bl 800d01a <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 f964 bl 800d01a <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 f952 bl 800d01a <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 f936 bl 800cfec <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: f006 fead bl 8007ae4 <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: f006 febe bl 8007b14 <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: f006 fea1 bl 8007ae4 <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: f006 feb3 bl 8007b14 <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: f006 fe96 bl 8007ae4 <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 fc0c bl 801c5e0 <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: f001 ff66 bl 8002ca0 <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 f91f bl 8005024 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
8000de6: 482c ldr r0, [pc, #176] ; (8000e98 <main+0x33c>)
8000de8: f003 ffca bl 8004d80 <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 f913 bl 8005024 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
8000dfe: 4826 ldr r0, [pc, #152] ; (8000e98 <main+0x33c>)
8000e00: f003 ffbe bl 8004d80 <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 f907 bl 8005024 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
8000e16: 4820 ldr r0, [pc, #128] ; (8000e98 <main+0x33c>)
8000e18: f003 ffb2 bl 8004d80 <HAL_ADC_Start>
HAL_ADC_Start(&hadc1);
8000e1c: 481f ldr r0, [pc, #124] ; (8000e9c <main+0x340>)
8000e1e: f003 ffaf bl 8004d80 <HAL_ADC_Start>
BSP_TS_GetState(&TS_State);
8000e22: 481f ldr r0, [pc, #124] ; (8000ea0 <main+0x344>)
8000e24: f002 fe12 bl 8003a4c <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 f958 bl 80030f0 <BSP_LCD_FillCircle>
HAL_GPIO_WritePin(LED13_GPIO_Port, LED13_Pin,
8000e40: e79e b.n 8000d80 <main+0x224>
8000e42: bf00 nop
8000e44: 20000044 .word 0x20000044
8000e48: ff0000ff .word 0xff0000ff
8000e4c: 0801d6ec .word 0x0801d6ec
8000e50: 20008e20 .word 0x20008e20
8000e54: 0801d6fc .word 0x0801d6fc
8000e58: 20008c8c .word 0x20008c8c
8000e5c: 200089d8 .word 0x200089d8
8000e60: 20008c90 .word 0x20008c90
8000e64: 20008c08 .word 0x20008c08
8000e68: 0801d718 .word 0x0801d718
8000e6c: 20008d9c .word 0x20008d9c
8000e70: 0801d740 .word 0x0801d740
8000e74: 20008a4c .word 0x20008a4c
8000e78: 0801d76c .word 0x0801d76c
8000e7c: 20008e58 .word 0x20008e58
8000e80: 0801d794 .word 0x0801d794
8000e84: 20008ca8 .word 0x20008ca8
8000e88: 40020000 .word 0x40020000
8000e8c: 40021c00 .word 0x40021c00
8000e90: 40021000 .word 0x40021000
8000e94: 0801d6e0 .word 0x0801d6e0
8000e98: 20008bc0 .word 0x20008bc0
8000e9c: 20008b78 .word 0x20008b78
8000ea0: 20000350 .word 0x20000350
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 fb3f bl 801c536 <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 fb30 bl 801c536 <memset>
/** Configure LSE Drive Capability
*/
HAL_PWR_EnableBkUpAccess();
8000ed6: f007 ff5f bl 8008d98 <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: f007 ff84 bl 8008e58 <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 fa61 bl 800241c <Error_Handler>
}
/** Activate the Over-Drive mode
*/
if (HAL_PWREx_EnableOverDrive() != HAL_OK)
8000f5a: f007 ff2d bl 8008db8 <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 fa5a bl 800241c <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 fa05 bl 80093a0 <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 fa3e bl 800241c <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 fbde bl 80097a8 <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 fa13 bl 800241c <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: f003 fe43 bl 8004cf8 <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 f9d0 bl 800241c <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: f003 ffc9 bl 8005024 <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 f9c0 bl 800241c <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: 20008b78 .word 0x20008b78
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: f003 fdf1 bl 8004cf8 <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 f97e bl 800241c <Error_Handler>
}
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
*/
sConfig.Channel = ADC_CHANNEL_6;
8001120: 2306 movs r3, #6
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: f003 ff77 bl 8005024 <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 f96e bl 800241c <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: 20008bc0 .word 0x20008bc0
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 fa77 bl 8005670 <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 f948 bl 800241c <Error_Handler>
}
/* USER CODE BEGIN CRC_Init 2 */
/* USER CODE END CRC_Init 2 */
}
800118c: bf00 nop
800118e: bd80 pop {r7, pc}
8001190: 20008a28 .word 0x20008a28
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 fb49 bl 8005844 <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 f930 bl 800241c <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 fbb0 bl 8005930 <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 f921 bl 800241c <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: 20008c94 .word 0x20008c94
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: f004 fd99 bl 8005d58 <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 f8f6 bl 800241c <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: f004 feee bl 8006014 <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 f8ed bl 800241c <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: 20008da0 .word 0x20008da0
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 fc5c bl 8007b48 <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 f8c1 bl 800241c <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 f96b bl 8008578 <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 f8b8 bl 800241c <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 f9ad bl 800860e <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 f8af bl 800241c <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: 200089dc .word 0x200089dc
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 fc1c bl 8007b48 <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 f881 bl 800241c <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 f92b bl 8008578 <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 f878 bl 800241c <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 f96d bl 800860e <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 f86f bl 800241c <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: 20008868 .word 0x20008868
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 f8ea bl 801c536 <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 f969 bl 80086a8 <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 f81e bl 800241c <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 fac9 bl 80089cc <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: f000 ffec bl 800241c <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: 20008ad0 .word 0x20008ad0
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: f008 fd90 bl 8009f84 <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: f000 ffd7 bl 800241c <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: 20008d0c .word 0x20008d0c
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 f849 bl 801c536 <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: f008 fd82 bl 8009fd8 <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: f000 ff9f bl 800241c <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: f008 fde5 bl 800a0d0 <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: f000 ff86 bl 800241c <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: f008 fe8b bl 800a24c <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: f000 ff6e bl 800241c <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: f008 ff10 bl 800a39c <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: f000 ff4b bl 800241c <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: f008 ff02 bl 800a39c <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: f000 ff3d bl 800241c <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 f882 bl 800a6b0 <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: f000 ff33 bl 800241c <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: 20008cac .word 0x20008cac
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 f917 bl 800a85a <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: f000 fef3 bl 800241c <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: 200088b4 .word 0x200088b4
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 f975 bl 800a97e <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: f000 febf bl 800241c <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 fc28 bl 800af00 <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: f000 feb1 bl 800241c <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 f95c bl 800b988 <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: f000 fea1 bl 800241c <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: 20008ccc .word 0x20008ccc
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 f923 bl 800a97e <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: f000 fe6d bl 800241c <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 fbd6 bl 800af00 <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: f000 fe5f bl 800241c <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 f90c bl 800b988 <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: f000 fe51 bl 800241c <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: 20008de0 .word 0x20008de0
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 f8c4 bl 800a97e <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: f000 fe0e bl 800241c <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 fb77 bl 800af00 <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: f000 fe00 bl 800241c <Error_Handler>
}
if (HAL_TIM_PWM_Init(&htim3) != HAL_OK)
800181c: 481f ldr r0, [pc, #124] ; (800189c <MX_TIM3_Init+0x114>)
800181e: f009 f903 bl 800aa28 <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: f000 fdf8 bl 800241c <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 fc1a bl 800b074 <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: f000 fde9 bl 800241c <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 f895 bl 800b988 <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: f000 fdda bl 800241c <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 fa26 bl 800acd0 <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: f000 fdc7 bl 800241c <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: f002 feb0 bl 80045f4 <HAL_TIM_MspPostInit>
}
8001894: bf00 nop
8001896: 3750 adds r7, #80 ; 0x50
8001898: 46bd mov sp, r7
800189a: bd80 pop {r7, pc}
800189c: 20008a90 .word 0x20008a90
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 f848 bl 800a97e <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 fd92 bl 800241c <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 fafb bl 800af00 <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 fd84 bl 800241c <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 f831 bl 800b988 <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 fd76 bl 800241c <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: 20008a50 .word 0x20008a50
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: f01a fddb bl 801c536 <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: f008 ffe6 bl 800a97e <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 fd30 bl 800241c <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 fa99 bl 800af00 <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 fd22 bl 800241c <Error_Handler>
}
if (HAL_TIM_PWM_Init(&htim8) != HAL_OK)
80019d8: 482c ldr r0, [pc, #176] ; (8001a8c <MX_TIM8_Init+0x14c>)
80019da: f009 f825 bl 800aa28 <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 fd1a bl 800241c <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: f009 ffc4 bl 800b988 <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 fd09 bl 800241c <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 f950 bl 800acd0 <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 fcf1 bl 800241c <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 f818 bl 800baa4 <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 fccf bl 800241c <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: f002 fdb8 bl 80045f4 <HAL_TIM_MspPostInit>
}
8001a84: bf00 nop
8001a86: 3768 adds r7, #104 ; 0x68
8001a88: 46bd mov sp, r7
8001a8a: bd80 pop {r7, pc}
8001a8c: 20008998 .word 0x20008998
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 f880 bl 800bbdc <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 fc9b bl 800241c <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: 20008918 .word 0x20008918
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 f850 bl 800bbdc <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 fc6b bl 800241c <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: 20008c0c .word 0x20008c0c
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 f820 bl 800bbdc <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 fc3b bl 800241c <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: 20008d1c .word 0x20008d1c
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: f008 fd94 bl 800a75c <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 fbef bl 800241c <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: 20008e24 .word 0x20008e24
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: f005 fece bl 8007b14 <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: f005 fec9 bl 8007b14 <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: f005 fec4 bl 8007b14 <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: f005 febf bl 8007b14 <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: f005 feba bl 8007b14 <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: f005 feb4 bl 8007b14 <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: f005 feae bl 8007b14 <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: f005 fea9 bl 8007b14 <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 fbd1 bl 800757c <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 fbc0 bl 800757c <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 fbb3 bl 800757c <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 fba5 bl 800757c <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 fb98 bl 800757c <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 fb8c bl 800757c <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 fb7e bl 800757c <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 fb6f bl 800757c <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 fb62 bl 800757c <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 fb54 bl 800757c <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 fb48 bl 800757c <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 fb3b bl 800757c <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 fb2c bl 800757c <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 fb05 bl 800757c <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 faf5 bl 800757c <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 fae9 bl 800757c <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 fad9 bl 800757c <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 facb bl 800757c <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 fabb bl 800757c <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: b084 sub sp, #16
800202c: af00 add r7, sp, #0
800202e: 6078 str r0, [r7, #4]
/* init code for LWIP */
MX_LWIP_Init();
8002030: f00a fb3e bl 800c6b0 <MX_LWIP_Init>
/* USER CODE BEGIN 5 */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
8002034: 230a movs r3, #10
8002036: 60fb str r3, [r7, #12]
vTaskDelayUntil(&xLastWakeTime, xPeriodeTache);
8002038: f107 0308 add.w r3, r7, #8
800203c: 68f9 ldr r1, [r7, #12]
800203e: 4618 mov r0, r3
8002040: f00c fcb0 bl 800e9a4 <vTaskDelayUntil>
8002044: e7f8 b.n 8002038 <f_GameMaster+0x10>
...
08002048 <f_Joueur_1>:
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_f_Joueur_1 */
void f_Joueur_1(void const * argument)
{
8002048: b580 push {r7, lr}
800204a: b092 sub sp, #72 ; 0x48
800204c: af00 add r7, sp, #0
800204e: 6078 str r0, [r7, #4]
/* USER CODE BEGIN f_Joueur_1 */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
8002050: 230a movs r3, #10
8002052: 647b str r3, [r7, #68] ; 0x44
uint16_t Width = 20;
8002054: 2314 movs r3, #20
8002056: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
uint16_t Height = 20;
800205a: 2314 movs r3, #20
800205c: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
uint32_t joystick_h, joystick_v;
uint8_t stop = 1;
8002060: 2301 movs r3, #1
8002062: f887 3033 strb.w r3, [r7, #51] ; 0x33
struct Missile missile;
ADC_ChannelConfTypeDef sConfig = {0};
8002066: f107 0318 add.w r3, r7, #24
800206a: 2200 movs r2, #0
800206c: 601a str r2, [r3, #0]
800206e: 605a str r2, [r3, #4]
8002070: 609a str r2, [r3, #8]
8002072: 60da str r2, [r3, #12]
sConfig.Rank = ADC_REGULAR_RANK_1;
8002074: 2301 movs r3, #1
8002076: 61fb str r3, [r7, #28]
sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
8002078: 2300 movs r3, #0
800207a: 623b str r3, [r7, #32]
sConfig.Channel = ADC_CHANNEL_8;
800207c: 2308 movs r3, #8
800207e: 61bb str r3, [r7, #24]
HAL_ADC_ConfigChannel(&hadc3, &sConfig);
8002080: f107 0318 add.w r3, r7, #24
8002084: 4619 mov r1, r3
8002086: 4872 ldr r0, [pc, #456] ; (8002250 <f_Joueur_1+0x208>)
8002088: f002 ffcc bl 8005024 <HAL_ADC_ConfigChannel>
HAL_ADC_Start(&hadc3);
800208c: 4870 ldr r0, [pc, #448] ; (8002250 <f_Joueur_1+0x208>)
800208e: f002 fe77 bl 8004d80 <HAL_ADC_Start>
HAL_ADC_Start(&hadc1);
8002092: 4870 ldr r0, [pc, #448] ; (8002254 <f_Joueur_1+0x20c>)
8002094: f002 fe74 bl 8004d80 <HAL_ADC_Start>
/* Infinite loop */
for (;;)
{
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
8002098: f04f 30ff mov.w r0, #4294967295
800209c: f000 fc6e bl 800297c <BSP_LCD_SetTextColor>
BSP_LCD_FillRect(joueur.x, joueur.y, Width, Height);
80020a0: 4b6d ldr r3, [pc, #436] ; (8002258 <f_Joueur_1+0x210>)
80020a2: 8818 ldrh r0, [r3, #0]
80020a4: 4b6c ldr r3, [pc, #432] ; (8002258 <f_Joueur_1+0x210>)
80020a6: 8859 ldrh r1, [r3, #2]
80020a8: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
80020ac: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
80020b0: f000 ffa4 bl 8002ffc <BSP_LCD_FillRect>
// BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp)
while (HAL_ADC_PollForConversion(&hadc3, 100) != HAL_OK);
80020b4: bf00 nop
80020b6: 2164 movs r1, #100 ; 0x64
80020b8: 4865 ldr r0, [pc, #404] ; (8002250 <f_Joueur_1+0x208>)
80020ba: f002 ff21 bl 8004f00 <HAL_ADC_PollForConversion>
80020be: 4603 mov r3, r0
80020c0: 2b00 cmp r3, #0
80020c2: d1f8 bne.n 80020b6 <f_Joueur_1+0x6e>
joystick_v = HAL_ADC_GetValue(&hadc3);
80020c4: 4862 ldr r0, [pc, #392] ; (8002250 <f_Joueur_1+0x208>)
80020c6: f002 ff9f bl 8005008 <HAL_ADC_GetValue>
80020ca: 63f8 str r0, [r7, #60] ; 0x3c
while (HAL_ADC_PollForConversion(&hadc1, 100) != HAL_OK);
80020cc: bf00 nop
80020ce: 2164 movs r1, #100 ; 0x64
80020d0: 4860 ldr r0, [pc, #384] ; (8002254 <f_Joueur_1+0x20c>)
80020d2: f002 ff15 bl 8004f00 <HAL_ADC_PollForConversion>
80020d6: 4603 mov r3, r0
80020d8: 2b00 cmp r3, #0
80020da: d1f8 bne.n 80020ce <f_Joueur_1+0x86>
joystick_h = HAL_ADC_GetValue(&hadc1);
80020dc: 485d ldr r0, [pc, #372] ; (8002254 <f_Joueur_1+0x20c>)
80020de: f002 ff93 bl 8005008 <HAL_ADC_GetValue>
80020e2: 63b8 str r0, [r7, #56] ; 0x38
if ((joueur.y < 27424- Width - joueur.dy)&&(joystick_h < 1900)) joueur.y += joueur.dy;
80020e4: 4b5c ldr r3, [pc, #368] ; (8002258 <f_Joueur_1+0x210>)
80020e6: 885b ldrh r3, [r3, #2]
80020e8: 4619 mov r1, r3
80020ea: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
80020ee: f646 3320 movw r3, #27424 ; 0x6b20
80020f2: 1a9b subs r3, r3, r2
80020f4: 4a58 ldr r2, [pc, #352] ; (8002258 <f_Joueur_1+0x210>)
80020f6: 7952 ldrb r2, [r2, #5]
80020f8: 1a9b subs r3, r3, r2
80020fa: 4299 cmp r1, r3
80020fc: da0d bge.n 800211a <f_Joueur_1+0xd2>
80020fe: 6bbb ldr r3, [r7, #56] ; 0x38
8002100: f240 726b movw r2, #1899 ; 0x76b
8002104: 4293 cmp r3, r2
8002106: d808 bhi.n 800211a <f_Joueur_1+0xd2>
8002108: 4b53 ldr r3, [pc, #332] ; (8002258 <f_Joueur_1+0x210>)
800210a: 885a ldrh r2, [r3, #2]
800210c: 4b52 ldr r3, [pc, #328] ; (8002258 <f_Joueur_1+0x210>)
800210e: 795b ldrb r3, [r3, #5]
8002110: b29b uxth r3, r3
8002112: 4413 add r3, r2
8002114: b29a uxth r2, r3
8002116: 4b50 ldr r3, [pc, #320] ; (8002258 <f_Joueur_1+0x210>)
8002118: 805a strh r2, [r3, #2]
if ((joueur.y > Width + joueur.dy)&&(joystick_h > 2100)) joueur.y -= joueur.dy;
800211a: 4b4f ldr r3, [pc, #316] ; (8002258 <f_Joueur_1+0x210>)
800211c: 885b ldrh r3, [r3, #2]
800211e: 4619 mov r1, r3
8002120: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8002124: 4a4c ldr r2, [pc, #304] ; (8002258 <f_Joueur_1+0x210>)
8002126: 7952 ldrb r2, [r2, #5]
8002128: 4413 add r3, r2
800212a: 4299 cmp r1, r3
800212c: dd0d ble.n 800214a <f_Joueur_1+0x102>
800212e: 6bbb ldr r3, [r7, #56] ; 0x38
8002130: f640 0234 movw r2, #2100 ; 0x834
8002134: 4293 cmp r3, r2
8002136: d908 bls.n 800214a <f_Joueur_1+0x102>
8002138: 4b47 ldr r3, [pc, #284] ; (8002258 <f_Joueur_1+0x210>)
800213a: 885a ldrh r2, [r3, #2]
800213c: 4b46 ldr r3, [pc, #280] ; (8002258 <f_Joueur_1+0x210>)
800213e: 795b ldrb r3, [r3, #5]
8002140: b29b uxth r3, r3
8002142: 1ad3 subs r3, r2, r3
8002144: b29a uxth r2, r3
8002146: 4b44 ldr r3, [pc, #272] ; (8002258 <f_Joueur_1+0x210>)
8002148: 805a strh r2, [r3, #2]
if ((joueur.x > Height + joueur.dx)&&(joystick_v < 1900)) joueur.x += joueur.dx;
800214a: 4b43 ldr r3, [pc, #268] ; (8002258 <f_Joueur_1+0x210>)
800214c: 881b ldrh r3, [r3, #0]
800214e: 4619 mov r1, r3
8002150: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
8002154: 4a40 ldr r2, [pc, #256] ; (8002258 <f_Joueur_1+0x210>)
8002156: 7912 ldrb r2, [r2, #4]
8002158: 4413 add r3, r2
800215a: 4299 cmp r1, r3
800215c: dd0d ble.n 800217a <f_Joueur_1+0x132>
800215e: 6bfb ldr r3, [r7, #60] ; 0x3c
8002160: f240 726b movw r2, #1899 ; 0x76b
8002164: 4293 cmp r3, r2
8002166: d808 bhi.n 800217a <f_Joueur_1+0x132>
8002168: 4b3b ldr r3, [pc, #236] ; (8002258 <f_Joueur_1+0x210>)
800216a: 881a ldrh r2, [r3, #0]
800216c: 4b3a ldr r3, [pc, #232] ; (8002258 <f_Joueur_1+0x210>)
800216e: 791b ldrb r3, [r3, #4]
8002170: b29b uxth r3, r3
8002172: 4413 add r3, r2
8002174: b29a uxth r2, r3
8002176: 4b38 ldr r3, [pc, #224] ; (8002258 <f_Joueur_1+0x210>)
8002178: 801a strh r2, [r3, #0]
if ((joueur.x < 480-Height - joueur.dx)&&(joystick_v > 2100)) joueur.x -= joueur.dx;
800217a: 4b37 ldr r3, [pc, #220] ; (8002258 <f_Joueur_1+0x210>)
800217c: 881b ldrh r3, [r3, #0]
800217e: 4619 mov r1, r3
8002180: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
8002184: f5c3 73f0 rsb r3, r3, #480 ; 0x1e0
8002188: 4a33 ldr r2, [pc, #204] ; (8002258 <f_Joueur_1+0x210>)
800218a: 7912 ldrb r2, [r2, #4]
800218c: 1a9b subs r3, r3, r2
800218e: 4299 cmp r1, r3
8002190: da0d bge.n 80021ae <f_Joueur_1+0x166>
8002192: 6bfb ldr r3, [r7, #60] ; 0x3c
8002194: f640 0234 movw r2, #2100 ; 0x834
8002198: 4293 cmp r3, r2
800219a: d908 bls.n 80021ae <f_Joueur_1+0x166>
800219c: 4b2e ldr r3, [pc, #184] ; (8002258 <f_Joueur_1+0x210>)
800219e: 881a ldrh r2, [r3, #0]
80021a0: 4b2d ldr r3, [pc, #180] ; (8002258 <f_Joueur_1+0x210>)
80021a2: 791b ldrb r3, [r3, #4]
80021a4: b29b uxth r3, r3
80021a6: 1ad3 subs r3, r2, r3
80021a8: b29a uxth r2, r3
80021aa: 4b2b ldr r3, [pc, #172] ; (8002258 <f_Joueur_1+0x210>)
80021ac: 801a strh r2, [r3, #0]
BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
80021ae: f04f 407f mov.w r0, #4278190080 ; 0xff000000
80021b2: f000 fbe3 bl 800297c <BSP_LCD_SetTextColor>
BSP_LCD_FillRect(joueur.x, joueur.y, Width, Height);
80021b6: 4b28 ldr r3, [pc, #160] ; (8002258 <f_Joueur_1+0x210>)
80021b8: 8818 ldrh r0, [r3, #0]
80021ba: 4b27 ldr r3, [pc, #156] ; (8002258 <f_Joueur_1+0x210>)
80021bc: 8859 ldrh r1, [r3, #2]
80021be: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
80021c2: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
80021c6: f000 ff19 bl 8002ffc <BSP_LCD_FillRect>
if (xQueueReceive(Queue_JHandle, &missile, 0) == pdPASS)
80021ca: 4b24 ldr r3, [pc, #144] ; (800225c <f_Joueur_1+0x214>)
80021cc: 681b ldr r3, [r3, #0]
80021ce: f107 0128 add.w r1, r7, #40 ; 0x28
80021d2: 2200 movs r2, #0
80021d4: 4618 mov r0, r3
80021d6: f00b fea5 bl 800df24 <xQueueReceive>
80021da: 4603 mov r3, r0
80021dc: 2b01 cmp r3, #1
80021de: d107 bne.n 80021f0 <f_Joueur_1+0x1a8>
joueur.health = joueur.health - missile.damage;
80021e0: 4b1d ldr r3, [pc, #116] ; (8002258 <f_Joueur_1+0x210>)
80021e2: 799a ldrb r2, [r3, #6]
80021e4: f897 3030 ldrb.w r3, [r7, #48] ; 0x30
80021e8: 1ad3 subs r3, r2, r3
80021ea: b2da uxtb r2, r3
80021ec: 4b1a ldr r3, [pc, #104] ; (8002258 <f_Joueur_1+0x210>)
80021ee: 719a strb r2, [r3, #6]
// 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);
80021f0: 4b19 ldr r3, [pc, #100] ; (8002258 <f_Joueur_1+0x210>)
80021f2: 799b ldrb r3, [r3, #6]
80021f4: 2b00 cmp r3, #0
80021f6: d107 bne.n 8002208 <f_Joueur_1+0x1c0>
80021f8: 4b19 ldr r3, [pc, #100] ; (8002260 <f_Joueur_1+0x218>)
80021fa: 6818 ldr r0, [r3, #0]
80021fc: f107 0133 add.w r1, r7, #51 ; 0x33
8002200: 2300 movs r3, #0
8002202: 2200 movs r2, #0
8002204: f00b fc5e bl 800dac4 <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};
8002208: 4b13 ldr r3, [pc, #76] ; (8002258 <f_Joueur_1+0x210>)
800220a: 881b ldrh r3, [r3, #0]
800220c: 81bb strh r3, [r7, #12]
800220e: 4b12 ldr r3, [pc, #72] ; (8002258 <f_Joueur_1+0x210>)
8002210: 885b ldrh r3, [r3, #2]
8002212: 81fb strh r3, [r7, #14]
8002214: 4b10 ldr r3, [pc, #64] ; (8002258 <f_Joueur_1+0x210>)
8002216: 7b1b ldrb r3, [r3, #12]
8002218: 743b strb r3, [r7, #16]
800221a: 4b0f ldr r3, [pc, #60] ; (8002258 <f_Joueur_1+0x210>)
800221c: 7b5b ldrb r3, [r3, #13]
800221e: 747b strb r3, [r7, #17]
8002220: 2301 movs r3, #1
8002222: 74bb strb r3, [r7, #18]
8002224: 4b0c ldr r3, [pc, #48] ; (8002258 <f_Joueur_1+0x210>)
8002226: 7bdb ldrb r3, [r3, #15]
8002228: 74fb strb r3, [r7, #19]
800222a: 4b0b ldr r3, [pc, #44] ; (8002258 <f_Joueur_1+0x210>)
800222c: 7c1b ldrb r3, [r3, #16]
800222e: 753b strb r3, [r7, #20]
xQueueSend(Queue_NHandle,&missile,0);
8002230: 4b0c ldr r3, [pc, #48] ; (8002264 <f_Joueur_1+0x21c>)
8002232: 6818 ldr r0, [r3, #0]
8002234: f107 010c add.w r1, r7, #12
8002238: 2300 movs r3, #0
800223a: 2200 movs r2, #0
800223c: f00b fc42 bl 800dac4 <xQueueGenericSend>
vTaskDelayUntil(&xLastWakeTime, xPeriodeTache);
8002240: f107 0334 add.w r3, r7, #52 ; 0x34
8002244: 6c79 ldr r1, [r7, #68] ; 0x44
8002246: 4618 mov r0, r3
8002248: f00c fbac bl 800e9a4 <vTaskDelayUntil>
{
800224c: e724 b.n 8002098 <f_Joueur_1+0x50>
800224e: bf00 nop
8002250: 20008bc0 .word 0x20008bc0
8002254: 20008b78 .word 0x20008b78
8002258: 20000028 .word 0x20000028
800225c: 200089d8 .word 0x200089d8
8002260: 20008c8c .word 0x20008c8c
8002264: 20008c08 .word 0x20008c08
08002268 <f_block_enemie>:
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_f_block_enemie */
void f_block_enemie(void const * argument)
{
8002268: b580 push {r7, lr}
800226a: b084 sub sp, #16
800226c: af00 add r7, sp, #0
800226e: 6078 str r0, [r7, #4]
/* USER CODE BEGIN f_block_enemie */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
8002270: 230a movs r3, #10
8002272: 60fb str r3, [r7, #12]
/* Infinite loop */
for (;;)
{
vTaskDelayUntil(&xLastWakeTime, xPeriodeTache);
8002274: f107 0308 add.w r3, r7, #8
8002278: 68f9 ldr r1, [r7, #12]
800227a: 4618 mov r0, r3
800227c: f00c fb92 bl 800e9a4 <vTaskDelayUntil>
8002280: e7f8 b.n 8002274 <f_block_enemie+0xc>
...
08002284 <f_projectile>:
* @param argument: Not used
* @retval None
*/
/* USER CODE END Header_f_projectile */
void f_projectile(void const * argument)
{
8002284: b580 push {r7, lr}
8002286: f5ad 7d06 sub.w sp, sp, #536 ; 0x218
800228a: af00 add r7, sp, #0
800228c: 1d3b adds r3, r7, #4
800228e: 6018 str r0, [r3, #0]
/* USER CODE BEGIN f_projectile */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
8002290: 230a movs r3, #10
8002292: f8c7 320c str.w r3, [r7, #524] ; 0x20c
/* Infinite loop */
struct Missile liste_missile[50];
struct Missile missile;
uint8_t indice = 0;
8002296: 2300 movs r3, #0
8002298: f887 3217 strb.w r3, [r7, #535] ; 0x217
for (;;)
{
xQueueReceive(Queue_NHandle, &missile, 0);
800229c: 4b53 ldr r3, [pc, #332] ; (80023ec <f_projectile+0x168>)
800229e: 681b ldr r3, [r3, #0]
80022a0: f107 0108 add.w r1, r7, #8
80022a4: 2200 movs r2, #0
80022a6: 4618 mov r0, r3
80022a8: f00b fe3c bl 800df24 <xQueueReceive>
liste_missile[indice++] = missile;
80022ac: f897 3217 ldrb.w r3, [r7, #535] ; 0x217
80022b0: 1c5a adds r2, r3, #1
80022b2: f887 2217 strb.w r2, [r7, #535] ; 0x217
80022b6: 4619 mov r1, r3
80022b8: f107 0214 add.w r2, r7, #20
80022bc: 460b mov r3, r1
80022be: 009b lsls r3, r3, #2
80022c0: 440b add r3, r1
80022c2: 005b lsls r3, r3, #1
80022c4: 441a add r2, r3
80022c6: f107 0308 add.w r3, r7, #8
80022ca: cb03 ldmia r3!, {r0, r1}
80022cc: 6010 str r0, [r2, #0]
80022ce: 6051 str r1, [r2, #4]
80022d0: 881b ldrh r3, [r3, #0]
80022d2: 8113 strh r3, [r2, #8]
for (int i=0;i<= indice;i++)
80022d4: 2300 movs r3, #0
80022d6: f8c7 3210 str.w r3, [r7, #528] ; 0x210
80022da: e078 b.n 80023ce <f_projectile+0x14a>
{
liste_missile[i].x = liste_missile[i].dx + liste_missile[i].x;
80022dc: f107 0114 add.w r1, r7, #20
80022e0: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
80022e4: 4613 mov r3, r2
80022e6: 009b lsls r3, r3, #2
80022e8: 4413 add r3, r2
80022ea: 005b lsls r3, r3, #1
80022ec: 440b add r3, r1
80022ee: 3304 adds r3, #4
80022f0: 781b ldrb r3, [r3, #0]
80022f2: b299 uxth r1, r3
80022f4: f107 0014 add.w r0, r7, #20
80022f8: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
80022fc: 4613 mov r3, r2
80022fe: 009b lsls r3, r3, #2
8002300: 4413 add r3, r2
8002302: 005b lsls r3, r3, #1
8002304: 4403 add r3, r0
8002306: 881b ldrh r3, [r3, #0]
8002308: 440b add r3, r1
800230a: b298 uxth r0, r3
800230c: f107 0114 add.w r1, r7, #20
8002310: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
8002314: 4613 mov r3, r2
8002316: 009b lsls r3, r3, #2
8002318: 4413 add r3, r2
800231a: 005b lsls r3, r3, #1
800231c: 440b add r3, r1
800231e: 4602 mov r2, r0
8002320: 801a strh r2, [r3, #0]
liste_missile[i].y = liste_missile[i].dy + liste_missile[i].y;
8002322: f107 0114 add.w r1, r7, #20
8002326: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
800232a: 4613 mov r3, r2
800232c: 009b lsls r3, r3, #2
800232e: 4413 add r3, r2
8002330: 005b lsls r3, r3, #1
8002332: 440b add r3, r1
8002334: 3305 adds r3, #5
8002336: 781b ldrb r3, [r3, #0]
8002338: b299 uxth r1, r3
800233a: f107 0014 add.w r0, r7, #20
800233e: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
8002342: 4613 mov r3, r2
8002344: 009b lsls r3, r3, #2
8002346: 4413 add r3, r2
8002348: 005b lsls r3, r3, #1
800234a: 4403 add r3, r0
800234c: 3302 adds r3, #2
800234e: 881b ldrh r3, [r3, #0]
8002350: 440b add r3, r1
8002352: b298 uxth r0, r3
8002354: f107 0114 add.w r1, r7, #20
8002358: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
800235c: 4613 mov r3, r2
800235e: 009b lsls r3, r3, #2
8002360: 4413 add r3, r2
8002362: 005b lsls r3, r3, #1
8002364: 440b add r3, r1
8002366: 3302 adds r3, #2
8002368: 4602 mov r2, r0
800236a: 801a strh r2, [r3, #0]
if ((liste_missile[i].x == joueur.x)&&(liste_missile[i].y == joueur.y))
800236c: f107 0114 add.w r1, r7, #20
8002370: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
8002374: 4613 mov r3, r2
8002376: 009b lsls r3, r3, #2
8002378: 4413 add r3, r2
800237a: 005b lsls r3, r3, #1
800237c: 440b add r3, r1
800237e: 881a ldrh r2, [r3, #0]
8002380: 4b1b ldr r3, [pc, #108] ; (80023f0 <f_projectile+0x16c>)
8002382: 881b ldrh r3, [r3, #0]
8002384: 429a cmp r2, r3
8002386: d11d bne.n 80023c4 <f_projectile+0x140>
8002388: f107 0114 add.w r1, r7, #20
800238c: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
8002390: 4613 mov r3, r2
8002392: 009b lsls r3, r3, #2
8002394: 4413 add r3, r2
8002396: 005b lsls r3, r3, #1
8002398: 440b add r3, r1
800239a: 3302 adds r3, #2
800239c: 881a ldrh r2, [r3, #0]
800239e: 4b14 ldr r3, [pc, #80] ; (80023f0 <f_projectile+0x16c>)
80023a0: 885b ldrh r3, [r3, #2]
80023a2: 429a cmp r2, r3
80023a4: d10e bne.n 80023c4 <f_projectile+0x140>
{
xQueueSend(Queue_JHandle, &liste_missile+indice,0);
80023a6: 4b13 ldr r3, [pc, #76] ; (80023f4 <f_projectile+0x170>)
80023a8: 6818 ldr r0, [r3, #0]
80023aa: f897 3217 ldrb.w r3, [r7, #535] ; 0x217
80023ae: f44f 72fa mov.w r2, #500 ; 0x1f4
80023b2: fb02 f303 mul.w r3, r2, r3
80023b6: f107 0214 add.w r2, r7, #20
80023ba: 18d1 adds r1, r2, r3
80023bc: 2300 movs r3, #0
80023be: 2200 movs r2, #0
80023c0: f00b fb80 bl 800dac4 <xQueueGenericSend>
for (int i=0;i<= indice;i++)
80023c4: f8d7 3210 ldr.w r3, [r7, #528] ; 0x210
80023c8: 3301 adds r3, #1
80023ca: f8c7 3210 str.w r3, [r7, #528] ; 0x210
80023ce: f897 3217 ldrb.w r3, [r7, #535] ; 0x217
80023d2: f8d7 2210 ldr.w r2, [r7, #528] ; 0x210
80023d6: 429a cmp r2, r3
80023d8: dd80 ble.n 80022dc <f_projectile+0x58>
// TODO Une petite animation d'explosion ?
}
}
vTaskDelayUntil(&xLastWakeTime, xPeriodeTache);
80023da: f507 7302 add.w r3, r7, #520 ; 0x208
80023de: f8d7 120c ldr.w r1, [r7, #524] ; 0x20c
80023e2: 4618 mov r0, r3
80023e4: f00c fade bl 800e9a4 <vTaskDelayUntil>
xQueueReceive(Queue_NHandle, &missile, 0);
80023e8: e758 b.n 800229c <f_projectile+0x18>
80023ea: bf00 nop
80023ec: 20008c08 .word 0x20008c08
80023f0: 20000028 .word 0x20000028
80023f4: 200089d8 .word 0x200089d8
080023f8 <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)
{
80023f8: b580 push {r7, lr}
80023fa: b082 sub sp, #8
80023fc: af00 add r7, sp, #0
80023fe: 6078 str r0, [r7, #4]
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM6) {
8002400: 687b ldr r3, [r7, #4]
8002402: 681b ldr r3, [r3, #0]
8002404: 4a04 ldr r2, [pc, #16] ; (8002418 <HAL_TIM_PeriodElapsedCallback+0x20>)
8002406: 4293 cmp r3, r2
8002408: d101 bne.n 800240e <HAL_TIM_PeriodElapsedCallback+0x16>
HAL_IncTick();
800240a: f002 fc33 bl 8004c74 <HAL_IncTick>
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
800240e: bf00 nop
8002410: 3708 adds r7, #8
8002412: 46bd mov sp, r7
8002414: bd80 pop {r7, pc}
8002416: bf00 nop
8002418: 40001000 .word 0x40001000
0800241c <Error_Handler>:
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
800241c: b480 push {r7}
800241e: 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");
8002420: 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)
8002422: e7fe b.n 8002422 <Error_Handler+0x6>
08002424 <I2Cx_MspInit>:
* @brief Initializes I2C MSP.
* @param i2c_handler : I2C handler
* @retval None
*/
static void I2Cx_MspInit(I2C_HandleTypeDef *i2c_handler)
{
8002424: b580 push {r7, lr}
8002426: b08c sub sp, #48 ; 0x30
8002428: af00 add r7, sp, #0
800242a: 6078 str r0, [r7, #4]
GPIO_InitTypeDef gpio_init_structure;
if (i2c_handler == (I2C_HandleTypeDef*)(&hI2cAudioHandler))
800242c: 687b ldr r3, [r7, #4]
800242e: 4a51 ldr r2, [pc, #324] ; (8002574 <I2Cx_MspInit+0x150>)
8002430: 4293 cmp r3, r2
8002432: d14d bne.n 80024d0 <I2Cx_MspInit+0xac>
{
/* AUDIO and LCD I2C MSP init */
/*** Configure the GPIOs ***/
/* Enable GPIO clock */
DISCOVERY_AUDIO_I2Cx_SCL_SDA_GPIO_CLK_ENABLE();
8002434: 4b50 ldr r3, [pc, #320] ; (8002578 <I2Cx_MspInit+0x154>)
8002436: 6b1b ldr r3, [r3, #48] ; 0x30
8002438: 4a4f ldr r2, [pc, #316] ; (8002578 <I2Cx_MspInit+0x154>)
800243a: f043 0380 orr.w r3, r3, #128 ; 0x80
800243e: 6313 str r3, [r2, #48] ; 0x30
8002440: 4b4d ldr r3, [pc, #308] ; (8002578 <I2Cx_MspInit+0x154>)
8002442: 6b1b ldr r3, [r3, #48] ; 0x30
8002444: f003 0380 and.w r3, r3, #128 ; 0x80
8002448: 61bb str r3, [r7, #24]
800244a: 69bb ldr r3, [r7, #24]
/* Configure I2C Tx as alternate function */
gpio_init_structure.Pin = DISCOVERY_AUDIO_I2Cx_SCL_PIN;
800244c: 2380 movs r3, #128 ; 0x80
800244e: 61fb str r3, [r7, #28]
gpio_init_structure.Mode = GPIO_MODE_AF_OD;
8002450: 2312 movs r3, #18
8002452: 623b str r3, [r7, #32]
gpio_init_structure.Pull = GPIO_NOPULL;
8002454: 2300 movs r3, #0
8002456: 627b str r3, [r7, #36] ; 0x24
gpio_init_structure.Speed = GPIO_SPEED_FAST;
8002458: 2302 movs r3, #2
800245a: 62bb str r3, [r7, #40] ; 0x28
gpio_init_structure.Alternate = DISCOVERY_AUDIO_I2Cx_SCL_SDA_AF;
800245c: 2304 movs r3, #4
800245e: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(DISCOVERY_AUDIO_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
8002460: f107 031c add.w r3, r7, #28
8002464: 4619 mov r1, r3
8002466: 4845 ldr r0, [pc, #276] ; (800257c <I2Cx_MspInit+0x158>)
8002468: f005 f888 bl 800757c <HAL_GPIO_Init>
/* Configure I2C Rx as alternate function */
gpio_init_structure.Pin = DISCOVERY_AUDIO_I2Cx_SDA_PIN;
800246c: f44f 7380 mov.w r3, #256 ; 0x100
8002470: 61fb str r3, [r7, #28]
HAL_GPIO_Init(DISCOVERY_AUDIO_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
8002472: f107 031c add.w r3, r7, #28
8002476: 4619 mov r1, r3
8002478: 4840 ldr r0, [pc, #256] ; (800257c <I2Cx_MspInit+0x158>)
800247a: f005 f87f bl 800757c <HAL_GPIO_Init>
/*** Configure the I2C peripheral ***/
/* Enable I2C clock */
DISCOVERY_AUDIO_I2Cx_CLK_ENABLE();
800247e: 4b3e ldr r3, [pc, #248] ; (8002578 <I2Cx_MspInit+0x154>)
8002480: 6c1b ldr r3, [r3, #64] ; 0x40
8002482: 4a3d ldr r2, [pc, #244] ; (8002578 <I2Cx_MspInit+0x154>)
8002484: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
8002488: 6413 str r3, [r2, #64] ; 0x40
800248a: 4b3b ldr r3, [pc, #236] ; (8002578 <I2Cx_MspInit+0x154>)
800248c: 6c1b ldr r3, [r3, #64] ; 0x40
800248e: f403 0300 and.w r3, r3, #8388608 ; 0x800000
8002492: 617b str r3, [r7, #20]
8002494: 697b ldr r3, [r7, #20]
/* Force the I2C peripheral clock reset */
DISCOVERY_AUDIO_I2Cx_FORCE_RESET();
8002496: 4b38 ldr r3, [pc, #224] ; (8002578 <I2Cx_MspInit+0x154>)
8002498: 6a1b ldr r3, [r3, #32]
800249a: 4a37 ldr r2, [pc, #220] ; (8002578 <I2Cx_MspInit+0x154>)
800249c: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
80024a0: 6213 str r3, [r2, #32]
/* Release the I2C peripheral clock reset */
DISCOVERY_AUDIO_I2Cx_RELEASE_RESET();
80024a2: 4b35 ldr r3, [pc, #212] ; (8002578 <I2Cx_MspInit+0x154>)
80024a4: 6a1b ldr r3, [r3, #32]
80024a6: 4a34 ldr r2, [pc, #208] ; (8002578 <I2Cx_MspInit+0x154>)
80024a8: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
80024ac: 6213 str r3, [r2, #32]
/* Enable and set I2Cx Interrupt to a lower priority */
HAL_NVIC_SetPriority(DISCOVERY_AUDIO_I2Cx_EV_IRQn, 0x0F, 0);
80024ae: 2200 movs r2, #0
80024b0: 210f movs r1, #15
80024b2: 2048 movs r0, #72 ; 0x48
80024b4: f003 f8b2 bl 800561c <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DISCOVERY_AUDIO_I2Cx_EV_IRQn);
80024b8: 2048 movs r0, #72 ; 0x48
80024ba: f003 f8cb bl 8005654 <HAL_NVIC_EnableIRQ>
/* Enable and set I2Cx Interrupt to a lower priority */
HAL_NVIC_SetPriority(DISCOVERY_AUDIO_I2Cx_ER_IRQn, 0x0F, 0);
80024be: 2200 movs r2, #0
80024c0: 210f movs r1, #15
80024c2: 2049 movs r0, #73 ; 0x49
80024c4: f003 f8aa bl 800561c <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DISCOVERY_AUDIO_I2Cx_ER_IRQn);
80024c8: 2049 movs r0, #73 ; 0x49
80024ca: f003 f8c3 bl 8005654 <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);
}
}
80024ce: e04d b.n 800256c <I2Cx_MspInit+0x148>
DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_CLK_ENABLE();
80024d0: 4b29 ldr r3, [pc, #164] ; (8002578 <I2Cx_MspInit+0x154>)
80024d2: 6b1b ldr r3, [r3, #48] ; 0x30
80024d4: 4a28 ldr r2, [pc, #160] ; (8002578 <I2Cx_MspInit+0x154>)
80024d6: f043 0302 orr.w r3, r3, #2
80024da: 6313 str r3, [r2, #48] ; 0x30
80024dc: 4b26 ldr r3, [pc, #152] ; (8002578 <I2Cx_MspInit+0x154>)
80024de: 6b1b ldr r3, [r3, #48] ; 0x30
80024e0: f003 0302 and.w r3, r3, #2
80024e4: 613b str r3, [r7, #16]
80024e6: 693b ldr r3, [r7, #16]
gpio_init_structure.Pin = DISCOVERY_EXT_I2Cx_SCL_PIN;
80024e8: f44f 7380 mov.w r3, #256 ; 0x100
80024ec: 61fb str r3, [r7, #28]
gpio_init_structure.Mode = GPIO_MODE_AF_OD;
80024ee: 2312 movs r3, #18
80024f0: 623b str r3, [r7, #32]
gpio_init_structure.Pull = GPIO_NOPULL;
80024f2: 2300 movs r3, #0
80024f4: 627b str r3, [r7, #36] ; 0x24
gpio_init_structure.Speed = GPIO_SPEED_FAST;
80024f6: 2302 movs r3, #2
80024f8: 62bb str r3, [r7, #40] ; 0x28
gpio_init_structure.Alternate = DISCOVERY_EXT_I2Cx_SCL_SDA_AF;
80024fa: 2304 movs r3, #4
80024fc: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
80024fe: f107 031c add.w r3, r7, #28
8002502: 4619 mov r1, r3
8002504: 481e ldr r0, [pc, #120] ; (8002580 <I2Cx_MspInit+0x15c>)
8002506: f005 f839 bl 800757c <HAL_GPIO_Init>
gpio_init_structure.Pin = DISCOVERY_EXT_I2Cx_SDA_PIN;
800250a: f44f 7300 mov.w r3, #512 ; 0x200
800250e: 61fb str r3, [r7, #28]
HAL_GPIO_Init(DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
8002510: f107 031c add.w r3, r7, #28
8002514: 4619 mov r1, r3
8002516: 481a ldr r0, [pc, #104] ; (8002580 <I2Cx_MspInit+0x15c>)
8002518: f005 f830 bl 800757c <HAL_GPIO_Init>
DISCOVERY_EXT_I2Cx_CLK_ENABLE();
800251c: 4b16 ldr r3, [pc, #88] ; (8002578 <I2Cx_MspInit+0x154>)
800251e: 6c1b ldr r3, [r3, #64] ; 0x40
8002520: 4a15 ldr r2, [pc, #84] ; (8002578 <I2Cx_MspInit+0x154>)
8002522: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
8002526: 6413 str r3, [r2, #64] ; 0x40
8002528: 4b13 ldr r3, [pc, #76] ; (8002578 <I2Cx_MspInit+0x154>)
800252a: 6c1b ldr r3, [r3, #64] ; 0x40
800252c: f403 1300 and.w r3, r3, #2097152 ; 0x200000
8002530: 60fb str r3, [r7, #12]
8002532: 68fb ldr r3, [r7, #12]
DISCOVERY_EXT_I2Cx_FORCE_RESET();
8002534: 4b10 ldr r3, [pc, #64] ; (8002578 <I2Cx_MspInit+0x154>)
8002536: 6a1b ldr r3, [r3, #32]
8002538: 4a0f ldr r2, [pc, #60] ; (8002578 <I2Cx_MspInit+0x154>)
800253a: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
800253e: 6213 str r3, [r2, #32]
DISCOVERY_EXT_I2Cx_RELEASE_RESET();
8002540: 4b0d ldr r3, [pc, #52] ; (8002578 <I2Cx_MspInit+0x154>)
8002542: 6a1b ldr r3, [r3, #32]
8002544: 4a0c ldr r2, [pc, #48] ; (8002578 <I2Cx_MspInit+0x154>)
8002546: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
800254a: 6213 str r3, [r2, #32]
HAL_NVIC_SetPriority(DISCOVERY_EXT_I2Cx_EV_IRQn, 0x0F, 0);
800254c: 2200 movs r2, #0
800254e: 210f movs r1, #15
8002550: 201f movs r0, #31
8002552: f003 f863 bl 800561c <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DISCOVERY_EXT_I2Cx_EV_IRQn);
8002556: 201f movs r0, #31
8002558: f003 f87c bl 8005654 <HAL_NVIC_EnableIRQ>
HAL_NVIC_SetPriority(DISCOVERY_EXT_I2Cx_ER_IRQn, 0x0F, 0);
800255c: 2200 movs r2, #0
800255e: 210f movs r1, #15
8002560: 2020 movs r0, #32
8002562: f003 f85b bl 800561c <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(DISCOVERY_EXT_I2Cx_ER_IRQn);
8002566: 2020 movs r0, #32
8002568: f003 f874 bl 8005654 <HAL_NVIC_EnableIRQ>
}
800256c: bf00 nop
800256e: 3730 adds r7, #48 ; 0x30
8002570: 46bd mov sp, r7
8002572: bd80 pop {r7, pc}
8002574: 2000037c .word 0x2000037c
8002578: 40023800 .word 0x40023800
800257c: 40021c00 .word 0x40021c00
8002580: 40020400 .word 0x40020400
08002584 <I2Cx_Init>:
* @brief Initializes I2C HAL.
* @param i2c_handler : I2C handler
* @retval None
*/
static void I2Cx_Init(I2C_HandleTypeDef *i2c_handler)
{
8002584: b580 push {r7, lr}
8002586: b082 sub sp, #8
8002588: af00 add r7, sp, #0
800258a: 6078 str r0, [r7, #4]
if(HAL_I2C_GetState(i2c_handler) == HAL_I2C_STATE_RESET)
800258c: 6878 ldr r0, [r7, #4]
800258e: f005 fdc9 bl 8008124 <HAL_I2C_GetState>
8002592: 4603 mov r3, r0
8002594: 2b00 cmp r3, #0
8002596: d125 bne.n 80025e4 <I2Cx_Init+0x60>
{
if (i2c_handler == (I2C_HandleTypeDef*)(&hI2cAudioHandler))
8002598: 687b ldr r3, [r7, #4]
800259a: 4a14 ldr r2, [pc, #80] ; (80025ec <I2Cx_Init+0x68>)
800259c: 4293 cmp r3, r2
800259e: d103 bne.n 80025a8 <I2Cx_Init+0x24>
{
/* Audio and LCD I2C configuration */
i2c_handler->Instance = DISCOVERY_AUDIO_I2Cx;
80025a0: 687b ldr r3, [r7, #4]
80025a2: 4a13 ldr r2, [pc, #76] ; (80025f0 <I2Cx_Init+0x6c>)
80025a4: 601a str r2, [r3, #0]
80025a6: e002 b.n 80025ae <I2Cx_Init+0x2a>
}
else
{
/* External, camera and Arduino connector I2C configuration */
i2c_handler->Instance = DISCOVERY_EXT_I2Cx;
80025a8: 687b ldr r3, [r7, #4]
80025aa: 4a12 ldr r2, [pc, #72] ; (80025f4 <I2Cx_Init+0x70>)
80025ac: 601a str r2, [r3, #0]
}
i2c_handler->Init.Timing = DISCOVERY_I2Cx_TIMING;
80025ae: 687b ldr r3, [r7, #4]
80025b0: 4a11 ldr r2, [pc, #68] ; (80025f8 <I2Cx_Init+0x74>)
80025b2: 605a str r2, [r3, #4]
i2c_handler->Init.OwnAddress1 = 0;
80025b4: 687b ldr r3, [r7, #4]
80025b6: 2200 movs r2, #0
80025b8: 609a str r2, [r3, #8]
i2c_handler->Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
80025ba: 687b ldr r3, [r7, #4]
80025bc: 2201 movs r2, #1
80025be: 60da str r2, [r3, #12]
i2c_handler->Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
80025c0: 687b ldr r3, [r7, #4]
80025c2: 2200 movs r2, #0
80025c4: 611a str r2, [r3, #16]
i2c_handler->Init.OwnAddress2 = 0;
80025c6: 687b ldr r3, [r7, #4]
80025c8: 2200 movs r2, #0
80025ca: 615a str r2, [r3, #20]
i2c_handler->Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
80025cc: 687b ldr r3, [r7, #4]
80025ce: 2200 movs r2, #0
80025d0: 61da str r2, [r3, #28]
i2c_handler->Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
80025d2: 687b ldr r3, [r7, #4]
80025d4: 2200 movs r2, #0
80025d6: 621a str r2, [r3, #32]
/* Init the I2C */
I2Cx_MspInit(i2c_handler);
80025d8: 6878 ldr r0, [r7, #4]
80025da: f7ff ff23 bl 8002424 <I2Cx_MspInit>
HAL_I2C_Init(i2c_handler);
80025de: 6878 ldr r0, [r7, #4]
80025e0: f005 fab2 bl 8007b48 <HAL_I2C_Init>
}
}
80025e4: bf00 nop
80025e6: 3708 adds r7, #8
80025e8: 46bd mov sp, r7
80025ea: bd80 pop {r7, pc}
80025ec: 2000037c .word 0x2000037c
80025f0: 40005c00 .word 0x40005c00
80025f4: 40005400 .word 0x40005400
80025f8: 40912732 .word 0x40912732
080025fc <I2Cx_ReadMultiple>:
uint8_t Addr,
uint16_t Reg,
uint16_t MemAddress,
uint8_t *Buffer,
uint16_t Length)
{
80025fc: b580 push {r7, lr}
80025fe: b08a sub sp, #40 ; 0x28
8002600: af04 add r7, sp, #16
8002602: 60f8 str r0, [r7, #12]
8002604: 4608 mov r0, r1
8002606: 4611 mov r1, r2
8002608: 461a mov r2, r3
800260a: 4603 mov r3, r0
800260c: 72fb strb r3, [r7, #11]
800260e: 460b mov r3, r1
8002610: 813b strh r3, [r7, #8]
8002612: 4613 mov r3, r2
8002614: 80fb strh r3, [r7, #6]
HAL_StatusTypeDef status = HAL_OK;
8002616: 2300 movs r3, #0
8002618: 75fb strb r3, [r7, #23]
status = HAL_I2C_Mem_Read(i2c_handler, Addr, (uint16_t)Reg, MemAddress, Buffer, Length, 1000);
800261a: 7afb ldrb r3, [r7, #11]
800261c: b299 uxth r1, r3
800261e: 88f8 ldrh r0, [r7, #6]
8002620: 893a ldrh r2, [r7, #8]
8002622: f44f 737a mov.w r3, #1000 ; 0x3e8
8002626: 9302 str r3, [sp, #8]
8002628: 8cbb ldrh r3, [r7, #36] ; 0x24
800262a: 9301 str r3, [sp, #4]
800262c: 6a3b ldr r3, [r7, #32]
800262e: 9300 str r3, [sp, #0]
8002630: 4603 mov r3, r0
8002632: 68f8 ldr r0, [r7, #12]
8002634: f005 fc5c bl 8007ef0 <HAL_I2C_Mem_Read>
8002638: 4603 mov r3, r0
800263a: 75fb strb r3, [r7, #23]
/* Check the communication status */
if(status != HAL_OK)
800263c: 7dfb ldrb r3, [r7, #23]
800263e: 2b00 cmp r3, #0
8002640: d004 beq.n 800264c <I2Cx_ReadMultiple+0x50>
{
/* I2C error occurred */
I2Cx_Error(i2c_handler, Addr);
8002642: 7afb ldrb r3, [r7, #11]
8002644: 4619 mov r1, r3
8002646: 68f8 ldr r0, [r7, #12]
8002648: f000 f832 bl 80026b0 <I2Cx_Error>
}
return status;
800264c: 7dfb ldrb r3, [r7, #23]
}
800264e: 4618 mov r0, r3
8002650: 3718 adds r7, #24
8002652: 46bd mov sp, r7
8002654: bd80 pop {r7, pc}
08002656 <I2Cx_WriteMultiple>:
uint8_t Addr,
uint16_t Reg,
uint16_t MemAddress,
uint8_t *Buffer,
uint16_t Length)
{
8002656: b580 push {r7, lr}
8002658: b08a sub sp, #40 ; 0x28
800265a: af04 add r7, sp, #16
800265c: 60f8 str r0, [r7, #12]
800265e: 4608 mov r0, r1
8002660: 4611 mov r1, r2
8002662: 461a mov r2, r3
8002664: 4603 mov r3, r0
8002666: 72fb strb r3, [r7, #11]
8002668: 460b mov r3, r1
800266a: 813b strh r3, [r7, #8]
800266c: 4613 mov r3, r2
800266e: 80fb strh r3, [r7, #6]
HAL_StatusTypeDef status = HAL_OK;
8002670: 2300 movs r3, #0
8002672: 75fb strb r3, [r7, #23]
status = HAL_I2C_Mem_Write(i2c_handler, Addr, (uint16_t)Reg, MemAddress, Buffer, Length, 1000);
8002674: 7afb ldrb r3, [r7, #11]
8002676: b299 uxth r1, r3
8002678: 88f8 ldrh r0, [r7, #6]
800267a: 893a ldrh r2, [r7, #8]
800267c: f44f 737a mov.w r3, #1000 ; 0x3e8
8002680: 9302 str r3, [sp, #8]
8002682: 8cbb ldrh r3, [r7, #36] ; 0x24
8002684: 9301 str r3, [sp, #4]
8002686: 6a3b ldr r3, [r7, #32]
8002688: 9300 str r3, [sp, #0]
800268a: 4603 mov r3, r0
800268c: 68f8 ldr r0, [r7, #12]
800268e: f005 fb1b bl 8007cc8 <HAL_I2C_Mem_Write>
8002692: 4603 mov r3, r0
8002694: 75fb strb r3, [r7, #23]
/* Check the communication status */
if(status != HAL_OK)
8002696: 7dfb ldrb r3, [r7, #23]
8002698: 2b00 cmp r3, #0
800269a: d004 beq.n 80026a6 <I2Cx_WriteMultiple+0x50>
{
/* Re-Initiaize the I2C Bus */
I2Cx_Error(i2c_handler, Addr);
800269c: 7afb ldrb r3, [r7, #11]
800269e: 4619 mov r1, r3
80026a0: 68f8 ldr r0, [r7, #12]
80026a2: f000 f805 bl 80026b0 <I2Cx_Error>
}
return status;
80026a6: 7dfb ldrb r3, [r7, #23]
}
80026a8: 4618 mov r0, r3
80026aa: 3718 adds r7, #24
80026ac: 46bd mov sp, r7
80026ae: bd80 pop {r7, pc}
080026b0 <I2Cx_Error>:
* @param i2c_handler : I2C handler
* @param Addr: I2C Address
* @retval None
*/
static void I2Cx_Error(I2C_HandleTypeDef *i2c_handler, uint8_t Addr)
{
80026b0: b580 push {r7, lr}
80026b2: b082 sub sp, #8
80026b4: af00 add r7, sp, #0
80026b6: 6078 str r0, [r7, #4]
80026b8: 460b mov r3, r1
80026ba: 70fb strb r3, [r7, #3]
/* De-initialize the I2C communication bus */
HAL_I2C_DeInit(i2c_handler);
80026bc: 6878 ldr r0, [r7, #4]
80026be: f005 fad3 bl 8007c68 <HAL_I2C_DeInit>
/* Re-Initialize the I2C communication bus */
I2Cx_Init(i2c_handler);
80026c2: 6878 ldr r0, [r7, #4]
80026c4: f7ff ff5e bl 8002584 <I2Cx_Init>
}
80026c8: bf00 nop
80026ca: 3708 adds r7, #8
80026cc: 46bd mov sp, r7
80026ce: bd80 pop {r7, pc}
080026d0 <TS_IO_Init>:
/**
* @brief Initializes Touchscreen low level.
* @retval None
*/
void TS_IO_Init(void)
{
80026d0: b580 push {r7, lr}
80026d2: af00 add r7, sp, #0
I2Cx_Init(&hI2cAudioHandler);
80026d4: 4802 ldr r0, [pc, #8] ; (80026e0 <TS_IO_Init+0x10>)
80026d6: f7ff ff55 bl 8002584 <I2Cx_Init>
}
80026da: bf00 nop
80026dc: bd80 pop {r7, pc}
80026de: bf00 nop
80026e0: 2000037c .word 0x2000037c
080026e4 <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)
{
80026e4: b580 push {r7, lr}
80026e6: b084 sub sp, #16
80026e8: af02 add r7, sp, #8
80026ea: 4603 mov r3, r0
80026ec: 71fb strb r3, [r7, #7]
80026ee: 460b mov r3, r1
80026f0: 71bb strb r3, [r7, #6]
80026f2: 4613 mov r3, r2
80026f4: 717b strb r3, [r7, #5]
I2Cx_WriteMultiple(&hI2cAudioHandler, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT,(uint8_t*)&Value, 1);
80026f6: 79bb ldrb r3, [r7, #6]
80026f8: b29a uxth r2, r3
80026fa: 79f9 ldrb r1, [r7, #7]
80026fc: 2301 movs r3, #1
80026fe: 9301 str r3, [sp, #4]
8002700: 1d7b adds r3, r7, #5
8002702: 9300 str r3, [sp, #0]
8002704: 2301 movs r3, #1
8002706: 4803 ldr r0, [pc, #12] ; (8002714 <TS_IO_Write+0x30>)
8002708: f7ff ffa5 bl 8002656 <I2Cx_WriteMultiple>
}
800270c: bf00 nop
800270e: 3708 adds r7, #8
8002710: 46bd mov sp, r7
8002712: bd80 pop {r7, pc}
8002714: 2000037c .word 0x2000037c
08002718 <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)
{
8002718: b580 push {r7, lr}
800271a: b086 sub sp, #24
800271c: af02 add r7, sp, #8
800271e: 4603 mov r3, r0
8002720: 460a mov r2, r1
8002722: 71fb strb r3, [r7, #7]
8002724: 4613 mov r3, r2
8002726: 71bb strb r3, [r7, #6]
uint8_t read_value = 0;
8002728: 2300 movs r3, #0
800272a: 73fb strb r3, [r7, #15]
I2Cx_ReadMultiple(&hI2cAudioHandler, Addr, Reg, I2C_MEMADD_SIZE_8BIT, (uint8_t*)&read_value, 1);
800272c: 79bb ldrb r3, [r7, #6]
800272e: b29a uxth r2, r3
8002730: 79f9 ldrb r1, [r7, #7]
8002732: 2301 movs r3, #1
8002734: 9301 str r3, [sp, #4]
8002736: f107 030f add.w r3, r7, #15
800273a: 9300 str r3, [sp, #0]
800273c: 2301 movs r3, #1
800273e: 4804 ldr r0, [pc, #16] ; (8002750 <TS_IO_Read+0x38>)
8002740: f7ff ff5c bl 80025fc <I2Cx_ReadMultiple>
return read_value;
8002744: 7bfb ldrb r3, [r7, #15]
}
8002746: 4618 mov r0, r3
8002748: 3710 adds r7, #16
800274a: 46bd mov sp, r7
800274c: bd80 pop {r7, pc}
800274e: bf00 nop
8002750: 2000037c .word 0x2000037c
08002754 <TS_IO_Delay>:
* @brief TS delay
* @param Delay: Delay in ms
* @retval None
*/
void TS_IO_Delay(uint32_t Delay)
{
8002754: b580 push {r7, lr}
8002756: b082 sub sp, #8
8002758: af00 add r7, sp, #0
800275a: 6078 str r0, [r7, #4]
HAL_Delay(Delay);
800275c: 6878 ldr r0, [r7, #4]
800275e: f002 faa9 bl 8004cb4 <HAL_Delay>
}
8002762: bf00 nop
8002764: 3708 adds r7, #8
8002766: 46bd mov sp, r7
8002768: bd80 pop {r7, pc}
...
0800276c <BSP_LCD_Init>:
/**
* @brief Initializes the LCD.
* @retval LCD state
*/
uint8_t BSP_LCD_Init(void)
{
800276c: b580 push {r7, lr}
800276e: af00 add r7, sp, #0
/* Select the used LCD */
/* The RK043FN48H LCD 480x272 is selected */
/* Timing Configuration */
hLtdcHandler.Init.HorizontalSync = (RK043FN48H_HSYNC - 1);
8002770: 4b31 ldr r3, [pc, #196] ; (8002838 <BSP_LCD_Init+0xcc>)
8002772: 2228 movs r2, #40 ; 0x28
8002774: 615a str r2, [r3, #20]
hLtdcHandler.Init.VerticalSync = (RK043FN48H_VSYNC - 1);
8002776: 4b30 ldr r3, [pc, #192] ; (8002838 <BSP_LCD_Init+0xcc>)
8002778: 2209 movs r2, #9
800277a: 619a str r2, [r3, #24]
hLtdcHandler.Init.AccumulatedHBP = (RK043FN48H_HSYNC + RK043FN48H_HBP - 1);
800277c: 4b2e ldr r3, [pc, #184] ; (8002838 <BSP_LCD_Init+0xcc>)
800277e: 2235 movs r2, #53 ; 0x35
8002780: 61da str r2, [r3, #28]
hLtdcHandler.Init.AccumulatedVBP = (RK043FN48H_VSYNC + RK043FN48H_VBP - 1);
8002782: 4b2d ldr r3, [pc, #180] ; (8002838 <BSP_LCD_Init+0xcc>)
8002784: 220b movs r2, #11
8002786: 621a str r2, [r3, #32]
hLtdcHandler.Init.AccumulatedActiveH = (RK043FN48H_HEIGHT + RK043FN48H_VSYNC + RK043FN48H_VBP - 1);
8002788: 4b2b ldr r3, [pc, #172] ; (8002838 <BSP_LCD_Init+0xcc>)
800278a: f240 121b movw r2, #283 ; 0x11b
800278e: 629a str r2, [r3, #40] ; 0x28
hLtdcHandler.Init.AccumulatedActiveW = (RK043FN48H_WIDTH + RK043FN48H_HSYNC + RK043FN48H_HBP - 1);
8002790: 4b29 ldr r3, [pc, #164] ; (8002838 <BSP_LCD_Init+0xcc>)
8002792: f240 2215 movw r2, #533 ; 0x215
8002796: 625a str r2, [r3, #36] ; 0x24
hLtdcHandler.Init.TotalHeigh = (RK043FN48H_HEIGHT + RK043FN48H_VSYNC + RK043FN48H_VBP + RK043FN48H_VFP - 1);
8002798: 4b27 ldr r3, [pc, #156] ; (8002838 <BSP_LCD_Init+0xcc>)
800279a: f240 121d movw r2, #285 ; 0x11d
800279e: 631a str r2, [r3, #48] ; 0x30
hLtdcHandler.Init.TotalWidth = (RK043FN48H_WIDTH + RK043FN48H_HSYNC + RK043FN48H_HBP + RK043FN48H_HFP - 1);
80027a0: 4b25 ldr r3, [pc, #148] ; (8002838 <BSP_LCD_Init+0xcc>)
80027a2: f240 2235 movw r2, #565 ; 0x235
80027a6: 62da str r2, [r3, #44] ; 0x2c
/* LCD clock configuration */
BSP_LCD_ClockConfig(&hLtdcHandler, NULL);
80027a8: 2100 movs r1, #0
80027aa: 4823 ldr r0, [pc, #140] ; (8002838 <BSP_LCD_Init+0xcc>)
80027ac: f000 fe38 bl 8003420 <BSP_LCD_ClockConfig>
/* Initialize the LCD pixel width and pixel height */
hLtdcHandler.LayerCfg->ImageWidth = RK043FN48H_WIDTH;
80027b0: 4b21 ldr r3, [pc, #132] ; (8002838 <BSP_LCD_Init+0xcc>)
80027b2: f44f 72f0 mov.w r2, #480 ; 0x1e0
80027b6: 661a str r2, [r3, #96] ; 0x60
hLtdcHandler.LayerCfg->ImageHeight = RK043FN48H_HEIGHT;
80027b8: 4b1f ldr r3, [pc, #124] ; (8002838 <BSP_LCD_Init+0xcc>)
80027ba: f44f 7288 mov.w r2, #272 ; 0x110
80027be: 665a str r2, [r3, #100] ; 0x64
/* Background value */
hLtdcHandler.Init.Backcolor.Blue = 0;
80027c0: 4b1d ldr r3, [pc, #116] ; (8002838 <BSP_LCD_Init+0xcc>)
80027c2: 2200 movs r2, #0
80027c4: f883 2034 strb.w r2, [r3, #52] ; 0x34
hLtdcHandler.Init.Backcolor.Green = 0;
80027c8: 4b1b ldr r3, [pc, #108] ; (8002838 <BSP_LCD_Init+0xcc>)
80027ca: 2200 movs r2, #0
80027cc: f883 2035 strb.w r2, [r3, #53] ; 0x35
hLtdcHandler.Init.Backcolor.Red = 0;
80027d0: 4b19 ldr r3, [pc, #100] ; (8002838 <BSP_LCD_Init+0xcc>)
80027d2: 2200 movs r2, #0
80027d4: f883 2036 strb.w r2, [r3, #54] ; 0x36
/* Polarity */
hLtdcHandler.Init.HSPolarity = LTDC_HSPOLARITY_AL;
80027d8: 4b17 ldr r3, [pc, #92] ; (8002838 <BSP_LCD_Init+0xcc>)
80027da: 2200 movs r2, #0
80027dc: 605a str r2, [r3, #4]
hLtdcHandler.Init.VSPolarity = LTDC_VSPOLARITY_AL;
80027de: 4b16 ldr r3, [pc, #88] ; (8002838 <BSP_LCD_Init+0xcc>)
80027e0: 2200 movs r2, #0
80027e2: 609a str r2, [r3, #8]
hLtdcHandler.Init.DEPolarity = LTDC_DEPOLARITY_AL;
80027e4: 4b14 ldr r3, [pc, #80] ; (8002838 <BSP_LCD_Init+0xcc>)
80027e6: 2200 movs r2, #0
80027e8: 60da str r2, [r3, #12]
hLtdcHandler.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
80027ea: 4b13 ldr r3, [pc, #76] ; (8002838 <BSP_LCD_Init+0xcc>)
80027ec: 2200 movs r2, #0
80027ee: 611a str r2, [r3, #16]
hLtdcHandler.Instance = LTDC;
80027f0: 4b11 ldr r3, [pc, #68] ; (8002838 <BSP_LCD_Init+0xcc>)
80027f2: 4a12 ldr r2, [pc, #72] ; (800283c <BSP_LCD_Init+0xd0>)
80027f4: 601a str r2, [r3, #0]
if(HAL_LTDC_GetState(&hLtdcHandler) == HAL_LTDC_STATE_RESET)
80027f6: 4810 ldr r0, [pc, #64] ; (8002838 <BSP_LCD_Init+0xcc>)
80027f8: f006 f926 bl 8008a48 <HAL_LTDC_GetState>
80027fc: 4603 mov r3, r0
80027fe: 2b00 cmp r3, #0
8002800: d103 bne.n 800280a <BSP_LCD_Init+0x9e>
{
/* Initialize the LCD Msp: this __weak function can be rewritten by the application */
BSP_LCD_MspInit(&hLtdcHandler, NULL);
8002802: 2100 movs r1, #0
8002804: 480c ldr r0, [pc, #48] ; (8002838 <BSP_LCD_Init+0xcc>)
8002806: f000 fd31 bl 800326c <BSP_LCD_MspInit>
}
HAL_LTDC_Init(&hLtdcHandler);
800280a: 480b ldr r0, [pc, #44] ; (8002838 <BSP_LCD_Init+0xcc>)
800280c: f005 ff4c bl 80086a8 <HAL_LTDC_Init>
/* Assert display enable LCD_DISP pin */
HAL_GPIO_WritePin(LCD_DISP_GPIO_PORT, LCD_DISP_PIN, GPIO_PIN_SET);
8002810: 2201 movs r2, #1
8002812: f44f 5180 mov.w r1, #4096 ; 0x1000
8002816: 480a ldr r0, [pc, #40] ; (8002840 <BSP_LCD_Init+0xd4>)
8002818: f005 f97c bl 8007b14 <HAL_GPIO_WritePin>
/* Assert backlight LCD_BL_CTRL pin */
HAL_GPIO_WritePin(LCD_BL_CTRL_GPIO_PORT, LCD_BL_CTRL_PIN, GPIO_PIN_SET);
800281c: 2201 movs r2, #1
800281e: 2108 movs r1, #8
8002820: 4808 ldr r0, [pc, #32] ; (8002844 <BSP_LCD_Init+0xd8>)
8002822: f005 f977 bl 8007b14 <HAL_GPIO_WritePin>
#if !defined(DATA_IN_ExtSDRAM)
/* Initialize the SDRAM */
BSP_SDRAM_Init();
8002826: f000 ff1b bl 8003660 <BSP_SDRAM_Init>
#endif
/* Initialize the font */
BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
800282a: 4807 ldr r0, [pc, #28] ; (8002848 <BSP_LCD_Init+0xdc>)
800282c: f000 f8d8 bl 80029e0 <BSP_LCD_SetFont>
return LCD_OK;
8002830: 2300 movs r3, #0
}
8002832: 4618 mov r0, r3
8002834: bd80 pop {r7, pc}
8002836: bf00 nop
8002838: 20008e5c .word 0x20008e5c
800283c: 40016800 .word 0x40016800
8002840: 40022000 .word 0x40022000
8002844: 40022800 .word 0x40022800
8002848: 2000003c .word 0x2000003c
0800284c <BSP_LCD_GetXSize>:
/**
* @brief Gets the LCD X size.
* @retval Used LCD X size
*/
uint32_t BSP_LCD_GetXSize(void)
{
800284c: b480 push {r7}
800284e: af00 add r7, sp, #0
return hLtdcHandler.LayerCfg[ActiveLayer].ImageWidth;
8002850: 4b06 ldr r3, [pc, #24] ; (800286c <BSP_LCD_GetXSize+0x20>)
8002852: 681b ldr r3, [r3, #0]
8002854: 4a06 ldr r2, [pc, #24] ; (8002870 <BSP_LCD_GetXSize+0x24>)
8002856: 2134 movs r1, #52 ; 0x34
8002858: fb01 f303 mul.w r3, r1, r3
800285c: 4413 add r3, r2
800285e: 3360 adds r3, #96 ; 0x60
8002860: 681b ldr r3, [r3, #0]
}
8002862: 4618 mov r0, r3
8002864: 46bd mov sp, r7
8002866: f85d 7b04 ldr.w r7, [sp], #4
800286a: 4770 bx lr
800286c: 20000408 .word 0x20000408
8002870: 20008e5c .word 0x20008e5c
08002874 <BSP_LCD_GetYSize>:
/**
* @brief Gets the LCD Y size.
* @retval Used LCD Y size
*/
uint32_t BSP_LCD_GetYSize(void)
{
8002874: b480 push {r7}
8002876: af00 add r7, sp, #0
return hLtdcHandler.LayerCfg[ActiveLayer].ImageHeight;
8002878: 4b06 ldr r3, [pc, #24] ; (8002894 <BSP_LCD_GetYSize+0x20>)
800287a: 681b ldr r3, [r3, #0]
800287c: 4a06 ldr r2, [pc, #24] ; (8002898 <BSP_LCD_GetYSize+0x24>)
800287e: 2134 movs r1, #52 ; 0x34
8002880: fb01 f303 mul.w r3, r1, r3
8002884: 4413 add r3, r2
8002886: 3364 adds r3, #100 ; 0x64
8002888: 681b ldr r3, [r3, #0]
}
800288a: 4618 mov r0, r3
800288c: 46bd mov sp, r7
800288e: f85d 7b04 ldr.w r7, [sp], #4
8002892: 4770 bx lr
8002894: 20000408 .word 0x20000408
8002898: 20008e5c .word 0x20008e5c
0800289c <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)
{
800289c: b580 push {r7, lr}
800289e: b090 sub sp, #64 ; 0x40
80028a0: af00 add r7, sp, #0
80028a2: 4603 mov r3, r0
80028a4: 6039 str r1, [r7, #0]
80028a6: 80fb strh r3, [r7, #6]
LCD_LayerCfgTypeDef layer_cfg;
/* Layer Init */
layer_cfg.WindowX0 = 0;
80028a8: 2300 movs r3, #0
80028aa: 60fb str r3, [r7, #12]
layer_cfg.WindowX1 = BSP_LCD_GetXSize();
80028ac: f7ff ffce bl 800284c <BSP_LCD_GetXSize>
80028b0: 4603 mov r3, r0
80028b2: 613b str r3, [r7, #16]
layer_cfg.WindowY0 = 0;
80028b4: 2300 movs r3, #0
80028b6: 617b str r3, [r7, #20]
layer_cfg.WindowY1 = BSP_LCD_GetYSize();
80028b8: f7ff ffdc bl 8002874 <BSP_LCD_GetYSize>
80028bc: 4603 mov r3, r0
80028be: 61bb str r3, [r7, #24]
layer_cfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
80028c0: 2300 movs r3, #0
80028c2: 61fb str r3, [r7, #28]
layer_cfg.FBStartAdress = FB_Address;
80028c4: 683b ldr r3, [r7, #0]
80028c6: 633b str r3, [r7, #48] ; 0x30
layer_cfg.Alpha = 255;
80028c8: 23ff movs r3, #255 ; 0xff
80028ca: 623b str r3, [r7, #32]
layer_cfg.Alpha0 = 0;
80028cc: 2300 movs r3, #0
80028ce: 627b str r3, [r7, #36] ; 0x24
layer_cfg.Backcolor.Blue = 0;
80028d0: 2300 movs r3, #0
80028d2: f887 303c strb.w r3, [r7, #60] ; 0x3c
layer_cfg.Backcolor.Green = 0;
80028d6: 2300 movs r3, #0
80028d8: f887 303d strb.w r3, [r7, #61] ; 0x3d
layer_cfg.Backcolor.Red = 0;
80028dc: 2300 movs r3, #0
80028de: f887 303e strb.w r3, [r7, #62] ; 0x3e
layer_cfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA;
80028e2: f44f 63c0 mov.w r3, #1536 ; 0x600
80028e6: 62bb str r3, [r7, #40] ; 0x28
layer_cfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA;
80028e8: 2307 movs r3, #7
80028ea: 62fb str r3, [r7, #44] ; 0x2c
layer_cfg.ImageWidth = BSP_LCD_GetXSize();
80028ec: f7ff ffae bl 800284c <BSP_LCD_GetXSize>
80028f0: 4603 mov r3, r0
80028f2: 637b str r3, [r7, #52] ; 0x34
layer_cfg.ImageHeight = BSP_LCD_GetYSize();
80028f4: f7ff ffbe bl 8002874 <BSP_LCD_GetYSize>
80028f8: 4603 mov r3, r0
80028fa: 63bb str r3, [r7, #56] ; 0x38
HAL_LTDC_ConfigLayer(&hLtdcHandler, &layer_cfg, LayerIndex);
80028fc: 88fa ldrh r2, [r7, #6]
80028fe: f107 030c add.w r3, r7, #12
8002902: 4619 mov r1, r3
8002904: 4812 ldr r0, [pc, #72] ; (8002950 <BSP_LCD_LayerDefaultInit+0xb4>)
8002906: f006 f861 bl 80089cc <HAL_LTDC_ConfigLayer>
DrawProp[LayerIndex].BackColor = LCD_COLOR_WHITE;
800290a: 88fa ldrh r2, [r7, #6]
800290c: 4911 ldr r1, [pc, #68] ; (8002954 <BSP_LCD_LayerDefaultInit+0xb8>)
800290e: 4613 mov r3, r2
8002910: 005b lsls r3, r3, #1
8002912: 4413 add r3, r2
8002914: 009b lsls r3, r3, #2
8002916: 440b add r3, r1
8002918: 3304 adds r3, #4
800291a: f04f 32ff mov.w r2, #4294967295
800291e: 601a str r2, [r3, #0]
DrawProp[LayerIndex].pFont = &Font24;
8002920: 88fa ldrh r2, [r7, #6]
8002922: 490c ldr r1, [pc, #48] ; (8002954 <BSP_LCD_LayerDefaultInit+0xb8>)
8002924: 4613 mov r3, r2
8002926: 005b lsls r3, r3, #1
8002928: 4413 add r3, r2
800292a: 009b lsls r3, r3, #2
800292c: 440b add r3, r1
800292e: 3308 adds r3, #8
8002930: 4a09 ldr r2, [pc, #36] ; (8002958 <BSP_LCD_LayerDefaultInit+0xbc>)
8002932: 601a str r2, [r3, #0]
DrawProp[LayerIndex].TextColor = LCD_COLOR_BLACK;
8002934: 88fa ldrh r2, [r7, #6]
8002936: 4907 ldr r1, [pc, #28] ; (8002954 <BSP_LCD_LayerDefaultInit+0xb8>)
8002938: 4613 mov r3, r2
800293a: 005b lsls r3, r3, #1
800293c: 4413 add r3, r2
800293e: 009b lsls r3, r3, #2
8002940: 440b add r3, r1
8002942: f04f 427f mov.w r2, #4278190080 ; 0xff000000
8002946: 601a str r2, [r3, #0]
}
8002948: bf00 nop
800294a: 3740 adds r7, #64 ; 0x40
800294c: 46bd mov sp, r7
800294e: bd80 pop {r7, pc}
8002950: 20008e5c .word 0x20008e5c
8002954: 2000040c .word 0x2000040c
8002958: 2000003c .word 0x2000003c
0800295c <BSP_LCD_SelectLayer>:
* @brief Selects the LCD Layer.
* @param LayerIndex: Layer foreground or background
* @retval None
*/
void BSP_LCD_SelectLayer(uint32_t LayerIndex)
{
800295c: b480 push {r7}
800295e: b083 sub sp, #12
8002960: af00 add r7, sp, #0
8002962: 6078 str r0, [r7, #4]
ActiveLayer = LayerIndex;
8002964: 4a04 ldr r2, [pc, #16] ; (8002978 <BSP_LCD_SelectLayer+0x1c>)
8002966: 687b ldr r3, [r7, #4]
8002968: 6013 str r3, [r2, #0]
}
800296a: bf00 nop
800296c: 370c adds r7, #12
800296e: 46bd mov sp, r7
8002970: f85d 7b04 ldr.w r7, [sp], #4
8002974: 4770 bx lr
8002976: bf00 nop
8002978: 20000408 .word 0x20000408
0800297c <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)
{
800297c: b480 push {r7}
800297e: b083 sub sp, #12
8002980: af00 add r7, sp, #0
8002982: 6078 str r0, [r7, #4]
DrawProp[ActiveLayer].TextColor = Color;
8002984: 4b07 ldr r3, [pc, #28] ; (80029a4 <BSP_LCD_SetTextColor+0x28>)
8002986: 681a ldr r2, [r3, #0]
8002988: 4907 ldr r1, [pc, #28] ; (80029a8 <BSP_LCD_SetTextColor+0x2c>)
800298a: 4613 mov r3, r2
800298c: 005b lsls r3, r3, #1
800298e: 4413 add r3, r2
8002990: 009b lsls r3, r3, #2
8002992: 440b add r3, r1
8002994: 687a ldr r2, [r7, #4]
8002996: 601a str r2, [r3, #0]
}
8002998: bf00 nop
800299a: 370c adds r7, #12
800299c: 46bd mov sp, r7
800299e: f85d 7b04 ldr.w r7, [sp], #4
80029a2: 4770 bx lr
80029a4: 20000408 .word 0x20000408
80029a8: 2000040c .word 0x2000040c
080029ac <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)
{
80029ac: b480 push {r7}
80029ae: b083 sub sp, #12
80029b0: af00 add r7, sp, #0
80029b2: 6078 str r0, [r7, #4]
DrawProp[ActiveLayer].BackColor = Color;
80029b4: 4b08 ldr r3, [pc, #32] ; (80029d8 <BSP_LCD_SetBackColor+0x2c>)
80029b6: 681a ldr r2, [r3, #0]
80029b8: 4908 ldr r1, [pc, #32] ; (80029dc <BSP_LCD_SetBackColor+0x30>)
80029ba: 4613 mov r3, r2
80029bc: 005b lsls r3, r3, #1
80029be: 4413 add r3, r2
80029c0: 009b lsls r3, r3, #2
80029c2: 440b add r3, r1
80029c4: 3304 adds r3, #4
80029c6: 687a ldr r2, [r7, #4]
80029c8: 601a str r2, [r3, #0]
}
80029ca: bf00 nop
80029cc: 370c adds r7, #12
80029ce: 46bd mov sp, r7
80029d0: f85d 7b04 ldr.w r7, [sp], #4
80029d4: 4770 bx lr
80029d6: bf00 nop
80029d8: 20000408 .word 0x20000408
80029dc: 2000040c .word 0x2000040c
080029e0 <BSP_LCD_SetFont>:
* @brief Sets the LCD text font.
* @param fonts: Layer font to be used
* @retval None
*/
void BSP_LCD_SetFont(sFONT *fonts)
{
80029e0: b480 push {r7}
80029e2: b083 sub sp, #12
80029e4: af00 add r7, sp, #0
80029e6: 6078 str r0, [r7, #4]
DrawProp[ActiveLayer].pFont = fonts;
80029e8: 4b08 ldr r3, [pc, #32] ; (8002a0c <BSP_LCD_SetFont+0x2c>)
80029ea: 681a ldr r2, [r3, #0]
80029ec: 4908 ldr r1, [pc, #32] ; (8002a10 <BSP_LCD_SetFont+0x30>)
80029ee: 4613 mov r3, r2
80029f0: 005b lsls r3, r3, #1
80029f2: 4413 add r3, r2
80029f4: 009b lsls r3, r3, #2
80029f6: 440b add r3, r1
80029f8: 3308 adds r3, #8
80029fa: 687a ldr r2, [r7, #4]
80029fc: 601a str r2, [r3, #0]
}
80029fe: bf00 nop
8002a00: 370c adds r7, #12
8002a02: 46bd mov sp, r7
8002a04: f85d 7b04 ldr.w r7, [sp], #4
8002a08: 4770 bx lr
8002a0a: bf00 nop
8002a0c: 20000408 .word 0x20000408
8002a10: 2000040c .word 0x2000040c
08002a14 <BSP_LCD_GetFont>:
/**
* @brief Gets the LCD text font.
* @retval Used layer font
*/
sFONT *BSP_LCD_GetFont(void)
{
8002a14: b480 push {r7}
8002a16: af00 add r7, sp, #0
return DrawProp[ActiveLayer].pFont;
8002a18: 4b07 ldr r3, [pc, #28] ; (8002a38 <BSP_LCD_GetFont+0x24>)
8002a1a: 681a ldr r2, [r3, #0]
8002a1c: 4907 ldr r1, [pc, #28] ; (8002a3c <BSP_LCD_GetFont+0x28>)
8002a1e: 4613 mov r3, r2
8002a20: 005b lsls r3, r3, #1
8002a22: 4413 add r3, r2
8002a24: 009b lsls r3, r3, #2
8002a26: 440b add r3, r1
8002a28: 3308 adds r3, #8
8002a2a: 681b ldr r3, [r3, #0]
}
8002a2c: 4618 mov r0, r3
8002a2e: 46bd mov sp, r7
8002a30: f85d 7b04 ldr.w r7, [sp], #4
8002a34: 4770 bx lr
8002a36: bf00 nop
8002a38: 20000408 .word 0x20000408
8002a3c: 2000040c .word 0x2000040c
08002a40 <BSP_LCD_Clear>:
* @brief Clears the hole LCD.
* @param Color: Color of the background
* @retval None
*/
void BSP_LCD_Clear(uint32_t Color)
{
8002a40: b5f0 push {r4, r5, r6, r7, lr}
8002a42: b085 sub sp, #20
8002a44: af02 add r7, sp, #8
8002a46: 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);
8002a48: 4b0f ldr r3, [pc, #60] ; (8002a88 <BSP_LCD_Clear+0x48>)
8002a4a: 681c ldr r4, [r3, #0]
8002a4c: 4b0e ldr r3, [pc, #56] ; (8002a88 <BSP_LCD_Clear+0x48>)
8002a4e: 681b ldr r3, [r3, #0]
8002a50: 4a0e ldr r2, [pc, #56] ; (8002a8c <BSP_LCD_Clear+0x4c>)
8002a52: 2134 movs r1, #52 ; 0x34
8002a54: fb01 f303 mul.w r3, r1, r3
8002a58: 4413 add r3, r2
8002a5a: 335c adds r3, #92 ; 0x5c
8002a5c: 681b ldr r3, [r3, #0]
8002a5e: 461d mov r5, r3
8002a60: f7ff fef4 bl 800284c <BSP_LCD_GetXSize>
8002a64: 4606 mov r6, r0
8002a66: f7ff ff05 bl 8002874 <BSP_LCD_GetYSize>
8002a6a: 4602 mov r2, r0
8002a6c: 687b ldr r3, [r7, #4]
8002a6e: 9301 str r3, [sp, #4]
8002a70: 2300 movs r3, #0
8002a72: 9300 str r3, [sp, #0]
8002a74: 4613 mov r3, r2
8002a76: 4632 mov r2, r6
8002a78: 4629 mov r1, r5
8002a7a: 4620 mov r0, r4
8002a7c: f000 fda4 bl 80035c8 <LL_FillBuffer>
}
8002a80: bf00 nop
8002a82: 370c adds r7, #12
8002a84: 46bd mov sp, r7
8002a86: bdf0 pop {r4, r5, r6, r7, pc}
8002a88: 20000408 .word 0x20000408
8002a8c: 20008e5c .word 0x20008e5c
08002a90 <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)
{
8002a90: b590 push {r4, r7, lr}
8002a92: b083 sub sp, #12
8002a94: af00 add r7, sp, #0
8002a96: 4603 mov r3, r0
8002a98: 80fb strh r3, [r7, #6]
8002a9a: 460b mov r3, r1
8002a9c: 80bb strh r3, [r7, #4]
8002a9e: 4613 mov r3, r2
8002aa0: 70fb strb r3, [r7, #3]
DrawChar(Xpos, Ypos, &DrawProp[ActiveLayer].pFont->table[(Ascii-' ') *\
8002aa2: 4b1b ldr r3, [pc, #108] ; (8002b10 <BSP_LCD_DisplayChar+0x80>)
8002aa4: 681a ldr r2, [r3, #0]
8002aa6: 491b ldr r1, [pc, #108] ; (8002b14 <BSP_LCD_DisplayChar+0x84>)
8002aa8: 4613 mov r3, r2
8002aaa: 005b lsls r3, r3, #1
8002aac: 4413 add r3, r2
8002aae: 009b lsls r3, r3, #2
8002ab0: 440b add r3, r1
8002ab2: 3308 adds r3, #8
8002ab4: 681b ldr r3, [r3, #0]
8002ab6: 6819 ldr r1, [r3, #0]
8002ab8: 78fb ldrb r3, [r7, #3]
8002aba: f1a3 0020 sub.w r0, r3, #32
DrawProp[ActiveLayer].pFont->Height * ((DrawProp[ActiveLayer].pFont->Width + 7) / 8)]);
8002abe: 4b14 ldr r3, [pc, #80] ; (8002b10 <BSP_LCD_DisplayChar+0x80>)
8002ac0: 681a ldr r2, [r3, #0]
8002ac2: 4c14 ldr r4, [pc, #80] ; (8002b14 <BSP_LCD_DisplayChar+0x84>)
8002ac4: 4613 mov r3, r2
8002ac6: 005b lsls r3, r3, #1
8002ac8: 4413 add r3, r2
8002aca: 009b lsls r3, r3, #2
8002acc: 4423 add r3, r4
8002ace: 3308 adds r3, #8
8002ad0: 681b ldr r3, [r3, #0]
8002ad2: 88db ldrh r3, [r3, #6]
DrawChar(Xpos, Ypos, &DrawProp[ActiveLayer].pFont->table[(Ascii-' ') *\
8002ad4: fb03 f000 mul.w r0, r3, r0
DrawProp[ActiveLayer].pFont->Height * ((DrawProp[ActiveLayer].pFont->Width + 7) / 8)]);
8002ad8: 4b0d ldr r3, [pc, #52] ; (8002b10 <BSP_LCD_DisplayChar+0x80>)
8002ada: 681a ldr r2, [r3, #0]
8002adc: 4c0d ldr r4, [pc, #52] ; (8002b14 <BSP_LCD_DisplayChar+0x84>)
8002ade: 4613 mov r3, r2
8002ae0: 005b lsls r3, r3, #1
8002ae2: 4413 add r3, r2
8002ae4: 009b lsls r3, r3, #2
8002ae6: 4423 add r3, r4
8002ae8: 3308 adds r3, #8
8002aea: 681b ldr r3, [r3, #0]
8002aec: 889b ldrh r3, [r3, #4]
8002aee: 3307 adds r3, #7
8002af0: 2b00 cmp r3, #0
8002af2: da00 bge.n 8002af6 <BSP_LCD_DisplayChar+0x66>
8002af4: 3307 adds r3, #7
8002af6: 10db asrs r3, r3, #3
8002af8: fb03 f300 mul.w r3, r3, r0
DrawChar(Xpos, Ypos, &DrawProp[ActiveLayer].pFont->table[(Ascii-' ') *\
8002afc: 18ca adds r2, r1, r3
8002afe: 88b9 ldrh r1, [r7, #4]
8002b00: 88fb ldrh r3, [r7, #6]
8002b02: 4618 mov r0, r3
8002b04: f000 fca8 bl 8003458 <DrawChar>
}
8002b08: bf00 nop
8002b0a: 370c adds r7, #12
8002b0c: 46bd mov sp, r7
8002b0e: bd90 pop {r4, r7, pc}
8002b10: 20000408 .word 0x20000408
8002b14: 2000040c .word 0x2000040c
08002b18 <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)
{
8002b18: b5b0 push {r4, r5, r7, lr}
8002b1a: b088 sub sp, #32
8002b1c: af00 add r7, sp, #0
8002b1e: 60ba str r2, [r7, #8]
8002b20: 461a mov r2, r3
8002b22: 4603 mov r3, r0
8002b24: 81fb strh r3, [r7, #14]
8002b26: 460b mov r3, r1
8002b28: 81bb strh r3, [r7, #12]
8002b2a: 4613 mov r3, r2
8002b2c: 71fb strb r3, [r7, #7]
uint16_t ref_column = 1, i = 0;
8002b2e: 2301 movs r3, #1
8002b30: 83fb strh r3, [r7, #30]
8002b32: 2300 movs r3, #0
8002b34: 83bb strh r3, [r7, #28]
uint32_t size = 0, xsize = 0;
8002b36: 2300 movs r3, #0
8002b38: 61bb str r3, [r7, #24]
8002b3a: 2300 movs r3, #0
8002b3c: 613b str r3, [r7, #16]
uint8_t *ptr = Text;
8002b3e: 68bb ldr r3, [r7, #8]
8002b40: 617b str r3, [r7, #20]
/* Get the text size */
while (*ptr++) size ++ ;
8002b42: e002 b.n 8002b4a <BSP_LCD_DisplayStringAt+0x32>
8002b44: 69bb ldr r3, [r7, #24]
8002b46: 3301 adds r3, #1
8002b48: 61bb str r3, [r7, #24]
8002b4a: 697b ldr r3, [r7, #20]
8002b4c: 1c5a adds r2, r3, #1
8002b4e: 617a str r2, [r7, #20]
8002b50: 781b ldrb r3, [r3, #0]
8002b52: 2b00 cmp r3, #0
8002b54: d1f6 bne.n 8002b44 <BSP_LCD_DisplayStringAt+0x2c>
/* Characters number per line */
xsize = (BSP_LCD_GetXSize()/DrawProp[ActiveLayer].pFont->Width);
8002b56: f7ff fe79 bl 800284c <BSP_LCD_GetXSize>
8002b5a: 4b4f ldr r3, [pc, #316] ; (8002c98 <BSP_LCD_DisplayStringAt+0x180>)
8002b5c: 681a ldr r2, [r3, #0]
8002b5e: 494f ldr r1, [pc, #316] ; (8002c9c <BSP_LCD_DisplayStringAt+0x184>)
8002b60: 4613 mov r3, r2
8002b62: 005b lsls r3, r3, #1
8002b64: 4413 add r3, r2
8002b66: 009b lsls r3, r3, #2
8002b68: 440b add r3, r1
8002b6a: 3308 adds r3, #8
8002b6c: 681b ldr r3, [r3, #0]
8002b6e: 889b ldrh r3, [r3, #4]
8002b70: fbb0 f3f3 udiv r3, r0, r3
8002b74: 613b str r3, [r7, #16]
switch (Mode)
8002b76: 79fb ldrb r3, [r7, #7]
8002b78: 2b02 cmp r3, #2
8002b7a: d01c beq.n 8002bb6 <BSP_LCD_DisplayStringAt+0x9e>
8002b7c: 2b03 cmp r3, #3
8002b7e: d017 beq.n 8002bb0 <BSP_LCD_DisplayStringAt+0x98>
8002b80: 2b01 cmp r3, #1
8002b82: d12e bne.n 8002be2 <BSP_LCD_DisplayStringAt+0xca>
{
case CENTER_MODE:
{
ref_column = Xpos + ((xsize - size)* DrawProp[ActiveLayer].pFont->Width) / 2;
8002b84: 693a ldr r2, [r7, #16]
8002b86: 69bb ldr r3, [r7, #24]
8002b88: 1ad1 subs r1, r2, r3
8002b8a: 4b43 ldr r3, [pc, #268] ; (8002c98 <BSP_LCD_DisplayStringAt+0x180>)
8002b8c: 681a ldr r2, [r3, #0]
8002b8e: 4843 ldr r0, [pc, #268] ; (8002c9c <BSP_LCD_DisplayStringAt+0x184>)
8002b90: 4613 mov r3, r2
8002b92: 005b lsls r3, r3, #1
8002b94: 4413 add r3, r2
8002b96: 009b lsls r3, r3, #2
8002b98: 4403 add r3, r0
8002b9a: 3308 adds r3, #8
8002b9c: 681b ldr r3, [r3, #0]
8002b9e: 889b ldrh r3, [r3, #4]
8002ba0: fb03 f301 mul.w r3, r3, r1
8002ba4: 085b lsrs r3, r3, #1
8002ba6: b29a uxth r2, r3
8002ba8: 89fb ldrh r3, [r7, #14]
8002baa: 4413 add r3, r2
8002bac: 83fb strh r3, [r7, #30]
break;
8002bae: e01b b.n 8002be8 <BSP_LCD_DisplayStringAt+0xd0>
}
case LEFT_MODE:
{
ref_column = Xpos;
8002bb0: 89fb ldrh r3, [r7, #14]
8002bb2: 83fb strh r3, [r7, #30]
break;
8002bb4: e018 b.n 8002be8 <BSP_LCD_DisplayStringAt+0xd0>
}
case RIGHT_MODE:
{
ref_column = - Xpos + ((xsize - size)*DrawProp[ActiveLayer].pFont->Width);
8002bb6: 693a ldr r2, [r7, #16]
8002bb8: 69bb ldr r3, [r7, #24]
8002bba: 1ad3 subs r3, r2, r3
8002bbc: b299 uxth r1, r3
8002bbe: 4b36 ldr r3, [pc, #216] ; (8002c98 <BSP_LCD_DisplayStringAt+0x180>)
8002bc0: 681a ldr r2, [r3, #0]
8002bc2: 4836 ldr r0, [pc, #216] ; (8002c9c <BSP_LCD_DisplayStringAt+0x184>)
8002bc4: 4613 mov r3, r2
8002bc6: 005b lsls r3, r3, #1
8002bc8: 4413 add r3, r2
8002bca: 009b lsls r3, r3, #2
8002bcc: 4403 add r3, r0
8002bce: 3308 adds r3, #8
8002bd0: 681b ldr r3, [r3, #0]
8002bd2: 889b ldrh r3, [r3, #4]
8002bd4: fb11 f303 smulbb r3, r1, r3
8002bd8: b29a uxth r2, r3
8002bda: 89fb ldrh r3, [r7, #14]
8002bdc: 1ad3 subs r3, r2, r3
8002bde: 83fb strh r3, [r7, #30]
break;
8002be0: e002 b.n 8002be8 <BSP_LCD_DisplayStringAt+0xd0>
}
default:
{
ref_column = Xpos;
8002be2: 89fb ldrh r3, [r7, #14]
8002be4: 83fb strh r3, [r7, #30]
break;
8002be6: bf00 nop
}
}
/* Check that the Start column is located in the screen */
if ((ref_column < 1) || (ref_column >= 0x8000))
8002be8: 8bfb ldrh r3, [r7, #30]
8002bea: 2b00 cmp r3, #0
8002bec: d003 beq.n 8002bf6 <BSP_LCD_DisplayStringAt+0xde>
8002bee: f9b7 301e ldrsh.w r3, [r7, #30]
8002bf2: 2b00 cmp r3, #0
8002bf4: da1d bge.n 8002c32 <BSP_LCD_DisplayStringAt+0x11a>
{
ref_column = 1;
8002bf6: 2301 movs r3, #1
8002bf8: 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))
8002bfa: e01a b.n 8002c32 <BSP_LCD_DisplayStringAt+0x11a>
{
/* Display one character on LCD */
BSP_LCD_DisplayChar(ref_column, Ypos, *Text);
8002bfc: 68bb ldr r3, [r7, #8]
8002bfe: 781a ldrb r2, [r3, #0]
8002c00: 89b9 ldrh r1, [r7, #12]
8002c02: 8bfb ldrh r3, [r7, #30]
8002c04: 4618 mov r0, r3
8002c06: f7ff ff43 bl 8002a90 <BSP_LCD_DisplayChar>
/* Decrement the column position by 16 */
ref_column += DrawProp[ActiveLayer].pFont->Width;
8002c0a: 4b23 ldr r3, [pc, #140] ; (8002c98 <BSP_LCD_DisplayStringAt+0x180>)
8002c0c: 681a ldr r2, [r3, #0]
8002c0e: 4923 ldr r1, [pc, #140] ; (8002c9c <BSP_LCD_DisplayStringAt+0x184>)
8002c10: 4613 mov r3, r2
8002c12: 005b lsls r3, r3, #1
8002c14: 4413 add r3, r2
8002c16: 009b lsls r3, r3, #2
8002c18: 440b add r3, r1
8002c1a: 3308 adds r3, #8
8002c1c: 681b ldr r3, [r3, #0]
8002c1e: 889a ldrh r2, [r3, #4]
8002c20: 8bfb ldrh r3, [r7, #30]
8002c22: 4413 add r3, r2
8002c24: 83fb strh r3, [r7, #30]
/* Point on the next character */
Text++;
8002c26: 68bb ldr r3, [r7, #8]
8002c28: 3301 adds r3, #1
8002c2a: 60bb str r3, [r7, #8]
i++;
8002c2c: 8bbb ldrh r3, [r7, #28]
8002c2e: 3301 adds r3, #1
8002c30: 83bb strh r3, [r7, #28]
while ((*Text != 0) & (((BSP_LCD_GetXSize() - (i*DrawProp[ActiveLayer].pFont->Width)) & 0xFFFF) >= DrawProp[ActiveLayer].pFont->Width))
8002c32: 68bb ldr r3, [r7, #8]
8002c34: 781b ldrb r3, [r3, #0]
8002c36: 2b00 cmp r3, #0
8002c38: bf14 ite ne
8002c3a: 2301 movne r3, #1
8002c3c: 2300 moveq r3, #0
8002c3e: b2dc uxtb r4, r3
8002c40: f7ff fe04 bl 800284c <BSP_LCD_GetXSize>
8002c44: 4605 mov r5, r0
8002c46: 8bb9 ldrh r1, [r7, #28]
8002c48: 4b13 ldr r3, [pc, #76] ; (8002c98 <BSP_LCD_DisplayStringAt+0x180>)
8002c4a: 681a ldr r2, [r3, #0]
8002c4c: 4813 ldr r0, [pc, #76] ; (8002c9c <BSP_LCD_DisplayStringAt+0x184>)
8002c4e: 4613 mov r3, r2
8002c50: 005b lsls r3, r3, #1
8002c52: 4413 add r3, r2
8002c54: 009b lsls r3, r3, #2
8002c56: 4403 add r3, r0
8002c58: 3308 adds r3, #8
8002c5a: 681b ldr r3, [r3, #0]
8002c5c: 889b ldrh r3, [r3, #4]
8002c5e: fb03 f301 mul.w r3, r3, r1
8002c62: 1aeb subs r3, r5, r3
8002c64: b299 uxth r1, r3
8002c66: 4b0c ldr r3, [pc, #48] ; (8002c98 <BSP_LCD_DisplayStringAt+0x180>)
8002c68: 681a ldr r2, [r3, #0]
8002c6a: 480c ldr r0, [pc, #48] ; (8002c9c <BSP_LCD_DisplayStringAt+0x184>)
8002c6c: 4613 mov r3, r2
8002c6e: 005b lsls r3, r3, #1
8002c70: 4413 add r3, r2
8002c72: 009b lsls r3, r3, #2
8002c74: 4403 add r3, r0
8002c76: 3308 adds r3, #8
8002c78: 681b ldr r3, [r3, #0]
8002c7a: 889b ldrh r3, [r3, #4]
8002c7c: 4299 cmp r1, r3
8002c7e: bf2c ite cs
8002c80: 2301 movcs r3, #1
8002c82: 2300 movcc r3, #0
8002c84: b2db uxtb r3, r3
8002c86: 4023 ands r3, r4
8002c88: b2db uxtb r3, r3
8002c8a: 2b00 cmp r3, #0
8002c8c: d1b6 bne.n 8002bfc <BSP_LCD_DisplayStringAt+0xe4>
}
}
8002c8e: bf00 nop
8002c90: 3720 adds r7, #32
8002c92: 46bd mov sp, r7
8002c94: bdb0 pop {r4, r5, r7, pc}
8002c96: bf00 nop
8002c98: 20000408 .word 0x20000408
8002c9c: 2000040c .word 0x2000040c
08002ca0 <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)
{
8002ca0: b580 push {r7, lr}
8002ca2: b082 sub sp, #8
8002ca4: af00 add r7, sp, #0
8002ca6: 4603 mov r3, r0
8002ca8: 6039 str r1, [r7, #0]
8002caa: 80fb strh r3, [r7, #6]
BSP_LCD_DisplayStringAt(0, LINE(Line), ptr, LEFT_MODE);
8002cac: f7ff feb2 bl 8002a14 <BSP_LCD_GetFont>
8002cb0: 4603 mov r3, r0
8002cb2: 88db ldrh r3, [r3, #6]
8002cb4: 88fa ldrh r2, [r7, #6]
8002cb6: fb12 f303 smulbb r3, r2, r3
8002cba: b299 uxth r1, r3
8002cbc: 2303 movs r3, #3
8002cbe: 683a ldr r2, [r7, #0]
8002cc0: 2000 movs r0, #0
8002cc2: f7ff ff29 bl 8002b18 <BSP_LCD_DisplayStringAt>
}
8002cc6: bf00 nop
8002cc8: 3708 adds r7, #8
8002cca: 46bd mov sp, r7
8002ccc: bd80 pop {r7, pc}
...
08002cd0 <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)
{
8002cd0: b5b0 push {r4, r5, r7, lr}
8002cd2: b086 sub sp, #24
8002cd4: af02 add r7, sp, #8
8002cd6: 4603 mov r3, r0
8002cd8: 80fb strh r3, [r7, #6]
8002cda: 460b mov r3, r1
8002cdc: 80bb strh r3, [r7, #4]
8002cde: 4613 mov r3, r2
8002ce0: 807b strh r3, [r7, #2]
uint32_t Xaddress = 0;
8002ce2: 2300 movs r3, #0
8002ce4: 60fb str r3, [r7, #12]
/* Get the line address */
if(hLtdcHandler.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)
8002ce6: 4b26 ldr r3, [pc, #152] ; (8002d80 <BSP_LCD_DrawHLine+0xb0>)
8002ce8: 681b ldr r3, [r3, #0]
8002cea: 4a26 ldr r2, [pc, #152] ; (8002d84 <BSP_LCD_DrawHLine+0xb4>)
8002cec: 2134 movs r1, #52 ; 0x34
8002cee: fb01 f303 mul.w r3, r1, r3
8002cf2: 4413 add r3, r2
8002cf4: 3348 adds r3, #72 ; 0x48
8002cf6: 681b ldr r3, [r3, #0]
8002cf8: 2b02 cmp r3, #2
8002cfa: d114 bne.n 8002d26 <BSP_LCD_DrawHLine+0x56>
{ /* RGB565 format */
Xaddress = (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress) + 2*(BSP_LCD_GetXSize()*Ypos + Xpos);
8002cfc: 4b20 ldr r3, [pc, #128] ; (8002d80 <BSP_LCD_DrawHLine+0xb0>)
8002cfe: 681b ldr r3, [r3, #0]
8002d00: 4a20 ldr r2, [pc, #128] ; (8002d84 <BSP_LCD_DrawHLine+0xb4>)
8002d02: 2134 movs r1, #52 ; 0x34
8002d04: fb01 f303 mul.w r3, r1, r3
8002d08: 4413 add r3, r2
8002d0a: 335c adds r3, #92 ; 0x5c
8002d0c: 681c ldr r4, [r3, #0]
8002d0e: f7ff fd9d bl 800284c <BSP_LCD_GetXSize>
8002d12: 4602 mov r2, r0
8002d14: 88bb ldrh r3, [r7, #4]
8002d16: fb03 f202 mul.w r2, r3, r2
8002d1a: 88fb ldrh r3, [r7, #6]
8002d1c: 4413 add r3, r2
8002d1e: 005b lsls r3, r3, #1
8002d20: 4423 add r3, r4
8002d22: 60fb str r3, [r7, #12]
8002d24: e013 b.n 8002d4e <BSP_LCD_DrawHLine+0x7e>
}
else
{ /* ARGB8888 format */
Xaddress = (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos);
8002d26: 4b16 ldr r3, [pc, #88] ; (8002d80 <BSP_LCD_DrawHLine+0xb0>)
8002d28: 681b ldr r3, [r3, #0]
8002d2a: 4a16 ldr r2, [pc, #88] ; (8002d84 <BSP_LCD_DrawHLine+0xb4>)
8002d2c: 2134 movs r1, #52 ; 0x34
8002d2e: fb01 f303 mul.w r3, r1, r3
8002d32: 4413 add r3, r2
8002d34: 335c adds r3, #92 ; 0x5c
8002d36: 681c ldr r4, [r3, #0]
8002d38: f7ff fd88 bl 800284c <BSP_LCD_GetXSize>
8002d3c: 4602 mov r2, r0
8002d3e: 88bb ldrh r3, [r7, #4]
8002d40: fb03 f202 mul.w r2, r3, r2
8002d44: 88fb ldrh r3, [r7, #6]
8002d46: 4413 add r3, r2
8002d48: 009b lsls r3, r3, #2
8002d4a: 4423 add r3, r4
8002d4c: 60fb str r3, [r7, #12]
}
/* Write line */
LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, Length, 1, 0, DrawProp[ActiveLayer].TextColor);
8002d4e: 4b0c ldr r3, [pc, #48] ; (8002d80 <BSP_LCD_DrawHLine+0xb0>)
8002d50: 6818 ldr r0, [r3, #0]
8002d52: 68fc ldr r4, [r7, #12]
8002d54: 887d ldrh r5, [r7, #2]
8002d56: 4b0a ldr r3, [pc, #40] ; (8002d80 <BSP_LCD_DrawHLine+0xb0>)
8002d58: 681a ldr r2, [r3, #0]
8002d5a: 490b ldr r1, [pc, #44] ; (8002d88 <BSP_LCD_DrawHLine+0xb8>)
8002d5c: 4613 mov r3, r2
8002d5e: 005b lsls r3, r3, #1
8002d60: 4413 add r3, r2
8002d62: 009b lsls r3, r3, #2
8002d64: 440b add r3, r1
8002d66: 681b ldr r3, [r3, #0]
8002d68: 9301 str r3, [sp, #4]
8002d6a: 2300 movs r3, #0
8002d6c: 9300 str r3, [sp, #0]
8002d6e: 2301 movs r3, #1
8002d70: 462a mov r2, r5
8002d72: 4621 mov r1, r4
8002d74: f000 fc28 bl 80035c8 <LL_FillBuffer>
}
8002d78: bf00 nop
8002d7a: 3710 adds r7, #16
8002d7c: 46bd mov sp, r7
8002d7e: bdb0 pop {r4, r5, r7, pc}
8002d80: 20000408 .word 0x20000408
8002d84: 20008e5c .word 0x20008e5c
8002d88: 2000040c .word 0x2000040c
08002d8c <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)
{
8002d8c: b590 push {r4, r7, lr}
8002d8e: b087 sub sp, #28
8002d90: af00 add r7, sp, #0
8002d92: 4603 mov r3, r0
8002d94: 80fb strh r3, [r7, #6]
8002d96: 460b mov r3, r1
8002d98: 80bb strh r3, [r7, #4]
8002d9a: 4613 mov r3, r2
8002d9c: 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);
8002d9e: 887b ldrh r3, [r7, #2]
8002da0: 005b lsls r3, r3, #1
8002da2: f1c3 0303 rsb r3, r3, #3
8002da6: 617b str r3, [r7, #20]
current_x = 0;
8002da8: 2300 movs r3, #0
8002daa: 613b str r3, [r7, #16]
current_y = Radius;
8002dac: 887b ldrh r3, [r7, #2]
8002dae: 60fb str r3, [r7, #12]
while (current_x <= current_y)
8002db0: e0cf b.n 8002f52 <BSP_LCD_DrawCircle+0x1c6>
{
BSP_LCD_DrawPixel((Xpos + current_x), (Ypos - current_y), DrawProp[ActiveLayer].TextColor);
8002db2: 693b ldr r3, [r7, #16]
8002db4: b29a uxth r2, r3
8002db6: 88fb ldrh r3, [r7, #6]
8002db8: 4413 add r3, r2
8002dba: b298 uxth r0, r3
8002dbc: 68fb ldr r3, [r7, #12]
8002dbe: b29b uxth r3, r3
8002dc0: 88ba ldrh r2, [r7, #4]
8002dc2: 1ad3 subs r3, r2, r3
8002dc4: b29c uxth r4, r3
8002dc6: 4b67 ldr r3, [pc, #412] ; (8002f64 <BSP_LCD_DrawCircle+0x1d8>)
8002dc8: 681a ldr r2, [r3, #0]
8002dca: 4967 ldr r1, [pc, #412] ; (8002f68 <BSP_LCD_DrawCircle+0x1dc>)
8002dcc: 4613 mov r3, r2
8002dce: 005b lsls r3, r3, #1
8002dd0: 4413 add r3, r2
8002dd2: 009b lsls r3, r3, #2
8002dd4: 440b add r3, r1
8002dd6: 681b ldr r3, [r3, #0]
8002dd8: 461a mov r2, r3
8002dda: 4621 mov r1, r4
8002ddc: f000 f8c6 bl 8002f6c <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos - current_x), (Ypos - current_y), DrawProp[ActiveLayer].TextColor);
8002de0: 693b ldr r3, [r7, #16]
8002de2: b29b uxth r3, r3
8002de4: 88fa ldrh r2, [r7, #6]
8002de6: 1ad3 subs r3, r2, r3
8002de8: b298 uxth r0, r3
8002dea: 68fb ldr r3, [r7, #12]
8002dec: b29b uxth r3, r3
8002dee: 88ba ldrh r2, [r7, #4]
8002df0: 1ad3 subs r3, r2, r3
8002df2: b29c uxth r4, r3
8002df4: 4b5b ldr r3, [pc, #364] ; (8002f64 <BSP_LCD_DrawCircle+0x1d8>)
8002df6: 681a ldr r2, [r3, #0]
8002df8: 495b ldr r1, [pc, #364] ; (8002f68 <BSP_LCD_DrawCircle+0x1dc>)
8002dfa: 4613 mov r3, r2
8002dfc: 005b lsls r3, r3, #1
8002dfe: 4413 add r3, r2
8002e00: 009b lsls r3, r3, #2
8002e02: 440b add r3, r1
8002e04: 681b ldr r3, [r3, #0]
8002e06: 461a mov r2, r3
8002e08: 4621 mov r1, r4
8002e0a: f000 f8af bl 8002f6c <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos + current_y), (Ypos - current_x), DrawProp[ActiveLayer].TextColor);
8002e0e: 68fb ldr r3, [r7, #12]
8002e10: b29a uxth r2, r3
8002e12: 88fb ldrh r3, [r7, #6]
8002e14: 4413 add r3, r2
8002e16: b298 uxth r0, r3
8002e18: 693b ldr r3, [r7, #16]
8002e1a: b29b uxth r3, r3
8002e1c: 88ba ldrh r2, [r7, #4]
8002e1e: 1ad3 subs r3, r2, r3
8002e20: b29c uxth r4, r3
8002e22: 4b50 ldr r3, [pc, #320] ; (8002f64 <BSP_LCD_DrawCircle+0x1d8>)
8002e24: 681a ldr r2, [r3, #0]
8002e26: 4950 ldr r1, [pc, #320] ; (8002f68 <BSP_LCD_DrawCircle+0x1dc>)
8002e28: 4613 mov r3, r2
8002e2a: 005b lsls r3, r3, #1
8002e2c: 4413 add r3, r2
8002e2e: 009b lsls r3, r3, #2
8002e30: 440b add r3, r1
8002e32: 681b ldr r3, [r3, #0]
8002e34: 461a mov r2, r3
8002e36: 4621 mov r1, r4
8002e38: f000 f898 bl 8002f6c <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos - current_y), (Ypos - current_x), DrawProp[ActiveLayer].TextColor);
8002e3c: 68fb ldr r3, [r7, #12]
8002e3e: b29b uxth r3, r3
8002e40: 88fa ldrh r2, [r7, #6]
8002e42: 1ad3 subs r3, r2, r3
8002e44: b298 uxth r0, r3
8002e46: 693b ldr r3, [r7, #16]
8002e48: b29b uxth r3, r3
8002e4a: 88ba ldrh r2, [r7, #4]
8002e4c: 1ad3 subs r3, r2, r3
8002e4e: b29c uxth r4, r3
8002e50: 4b44 ldr r3, [pc, #272] ; (8002f64 <BSP_LCD_DrawCircle+0x1d8>)
8002e52: 681a ldr r2, [r3, #0]
8002e54: 4944 ldr r1, [pc, #272] ; (8002f68 <BSP_LCD_DrawCircle+0x1dc>)
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: 681b ldr r3, [r3, #0]
8002e62: 461a mov r2, r3
8002e64: 4621 mov r1, r4
8002e66: f000 f881 bl 8002f6c <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos + current_x), (Ypos + current_y), DrawProp[ActiveLayer].TextColor);
8002e6a: 693b ldr r3, [r7, #16]
8002e6c: b29a uxth r2, r3
8002e6e: 88fb ldrh r3, [r7, #6]
8002e70: 4413 add r3, r2
8002e72: b298 uxth r0, r3
8002e74: 68fb ldr r3, [r7, #12]
8002e76: b29a uxth r2, r3
8002e78: 88bb ldrh r3, [r7, #4]
8002e7a: 4413 add r3, r2
8002e7c: b29c uxth r4, r3
8002e7e: 4b39 ldr r3, [pc, #228] ; (8002f64 <BSP_LCD_DrawCircle+0x1d8>)
8002e80: 681a ldr r2, [r3, #0]
8002e82: 4939 ldr r1, [pc, #228] ; (8002f68 <BSP_LCD_DrawCircle+0x1dc>)
8002e84: 4613 mov r3, r2
8002e86: 005b lsls r3, r3, #1
8002e88: 4413 add r3, r2
8002e8a: 009b lsls r3, r3, #2
8002e8c: 440b add r3, r1
8002e8e: 681b ldr r3, [r3, #0]
8002e90: 461a mov r2, r3
8002e92: 4621 mov r1, r4
8002e94: f000 f86a bl 8002f6c <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos - current_x), (Ypos + current_y), DrawProp[ActiveLayer].TextColor);
8002e98: 693b ldr r3, [r7, #16]
8002e9a: b29b uxth r3, r3
8002e9c: 88fa ldrh r2, [r7, #6]
8002e9e: 1ad3 subs r3, r2, r3
8002ea0: b298 uxth r0, r3
8002ea2: 68fb ldr r3, [r7, #12]
8002ea4: b29a uxth r2, r3
8002ea6: 88bb ldrh r3, [r7, #4]
8002ea8: 4413 add r3, r2
8002eaa: b29c uxth r4, r3
8002eac: 4b2d ldr r3, [pc, #180] ; (8002f64 <BSP_LCD_DrawCircle+0x1d8>)
8002eae: 681a ldr r2, [r3, #0]
8002eb0: 492d ldr r1, [pc, #180] ; (8002f68 <BSP_LCD_DrawCircle+0x1dc>)
8002eb2: 4613 mov r3, r2
8002eb4: 005b lsls r3, r3, #1
8002eb6: 4413 add r3, r2
8002eb8: 009b lsls r3, r3, #2
8002eba: 440b add r3, r1
8002ebc: 681b ldr r3, [r3, #0]
8002ebe: 461a mov r2, r3
8002ec0: 4621 mov r1, r4
8002ec2: f000 f853 bl 8002f6c <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos + current_y), (Ypos + current_x), DrawProp[ActiveLayer].TextColor);
8002ec6: 68fb ldr r3, [r7, #12]
8002ec8: b29a uxth r2, r3
8002eca: 88fb ldrh r3, [r7, #6]
8002ecc: 4413 add r3, r2
8002ece: b298 uxth r0, r3
8002ed0: 693b ldr r3, [r7, #16]
8002ed2: b29a uxth r2, r3
8002ed4: 88bb ldrh r3, [r7, #4]
8002ed6: 4413 add r3, r2
8002ed8: b29c uxth r4, r3
8002eda: 4b22 ldr r3, [pc, #136] ; (8002f64 <BSP_LCD_DrawCircle+0x1d8>)
8002edc: 681a ldr r2, [r3, #0]
8002ede: 4922 ldr r1, [pc, #136] ; (8002f68 <BSP_LCD_DrawCircle+0x1dc>)
8002ee0: 4613 mov r3, r2
8002ee2: 005b lsls r3, r3, #1
8002ee4: 4413 add r3, r2
8002ee6: 009b lsls r3, r3, #2
8002ee8: 440b add r3, r1
8002eea: 681b ldr r3, [r3, #0]
8002eec: 461a mov r2, r3
8002eee: 4621 mov r1, r4
8002ef0: f000 f83c bl 8002f6c <BSP_LCD_DrawPixel>
BSP_LCD_DrawPixel((Xpos - current_y), (Ypos + current_x), DrawProp[ActiveLayer].TextColor);
8002ef4: 68fb ldr r3, [r7, #12]
8002ef6: b29b uxth r3, r3
8002ef8: 88fa ldrh r2, [r7, #6]
8002efa: 1ad3 subs r3, r2, r3
8002efc: b298 uxth r0, r3
8002efe: 693b ldr r3, [r7, #16]
8002f00: b29a uxth r2, r3
8002f02: 88bb ldrh r3, [r7, #4]
8002f04: 4413 add r3, r2
8002f06: b29c uxth r4, r3
8002f08: 4b16 ldr r3, [pc, #88] ; (8002f64 <BSP_LCD_DrawCircle+0x1d8>)
8002f0a: 681a ldr r2, [r3, #0]
8002f0c: 4916 ldr r1, [pc, #88] ; (8002f68 <BSP_LCD_DrawCircle+0x1dc>)
8002f0e: 4613 mov r3, r2
8002f10: 005b lsls r3, r3, #1
8002f12: 4413 add r3, r2
8002f14: 009b lsls r3, r3, #2
8002f16: 440b add r3, r1
8002f18: 681b ldr r3, [r3, #0]
8002f1a: 461a mov r2, r3
8002f1c: 4621 mov r1, r4
8002f1e: f000 f825 bl 8002f6c <BSP_LCD_DrawPixel>
if (decision < 0)
8002f22: 697b ldr r3, [r7, #20]
8002f24: 2b00 cmp r3, #0
8002f26: da06 bge.n 8002f36 <BSP_LCD_DrawCircle+0x1aa>
{
decision += (current_x << 2) + 6;
8002f28: 693b ldr r3, [r7, #16]
8002f2a: 009a lsls r2, r3, #2
8002f2c: 697b ldr r3, [r7, #20]
8002f2e: 4413 add r3, r2
8002f30: 3306 adds r3, #6
8002f32: 617b str r3, [r7, #20]
8002f34: e00a b.n 8002f4c <BSP_LCD_DrawCircle+0x1c0>
}
else
{
decision += ((current_x - current_y) << 2) + 10;
8002f36: 693a ldr r2, [r7, #16]
8002f38: 68fb ldr r3, [r7, #12]
8002f3a: 1ad3 subs r3, r2, r3
8002f3c: 009a lsls r2, r3, #2
8002f3e: 697b ldr r3, [r7, #20]
8002f40: 4413 add r3, r2
8002f42: 330a adds r3, #10
8002f44: 617b str r3, [r7, #20]
current_y--;
8002f46: 68fb ldr r3, [r7, #12]
8002f48: 3b01 subs r3, #1
8002f4a: 60fb str r3, [r7, #12]
}
current_x++;
8002f4c: 693b ldr r3, [r7, #16]
8002f4e: 3301 adds r3, #1
8002f50: 613b str r3, [r7, #16]
while (current_x <= current_y)
8002f52: 693a ldr r2, [r7, #16]
8002f54: 68fb ldr r3, [r7, #12]
8002f56: 429a cmp r2, r3
8002f58: f67f af2b bls.w 8002db2 <BSP_LCD_DrawCircle+0x26>
}
}
8002f5c: bf00 nop
8002f5e: 371c adds r7, #28
8002f60: 46bd mov sp, r7
8002f62: bd90 pop {r4, r7, pc}
8002f64: 20000408 .word 0x20000408
8002f68: 2000040c .word 0x2000040c
08002f6c <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)
{
8002f6c: b5b0 push {r4, r5, r7, lr}
8002f6e: b082 sub sp, #8
8002f70: af00 add r7, sp, #0
8002f72: 4603 mov r3, r0
8002f74: 603a str r2, [r7, #0]
8002f76: 80fb strh r3, [r7, #6]
8002f78: 460b mov r3, r1
8002f7a: 80bb strh r3, [r7, #4]
/* Write data value to all SDRAM memory */
if(hLtdcHandler.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)
8002f7c: 4b1d ldr r3, [pc, #116] ; (8002ff4 <BSP_LCD_DrawPixel+0x88>)
8002f7e: 681b ldr r3, [r3, #0]
8002f80: 4a1d ldr r2, [pc, #116] ; (8002ff8 <BSP_LCD_DrawPixel+0x8c>)
8002f82: 2134 movs r1, #52 ; 0x34
8002f84: fb01 f303 mul.w r3, r1, r3
8002f88: 4413 add r3, r2
8002f8a: 3348 adds r3, #72 ; 0x48
8002f8c: 681b ldr r3, [r3, #0]
8002f8e: 2b02 cmp r3, #2
8002f90: d116 bne.n 8002fc0 <BSP_LCD_DrawPixel+0x54>
{ /* RGB565 format */
*(__IO uint16_t*) (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress + (2*(Ypos*BSP_LCD_GetXSize() + Xpos))) = (uint16_t)RGB_Code;
8002f92: 4b18 ldr r3, [pc, #96] ; (8002ff4 <BSP_LCD_DrawPixel+0x88>)
8002f94: 681b ldr r3, [r3, #0]
8002f96: 4a18 ldr r2, [pc, #96] ; (8002ff8 <BSP_LCD_DrawPixel+0x8c>)
8002f98: 2134 movs r1, #52 ; 0x34
8002f9a: fb01 f303 mul.w r3, r1, r3
8002f9e: 4413 add r3, r2
8002fa0: 335c adds r3, #92 ; 0x5c
8002fa2: 681c ldr r4, [r3, #0]
8002fa4: 88bd ldrh r5, [r7, #4]
8002fa6: f7ff fc51 bl 800284c <BSP_LCD_GetXSize>
8002faa: 4603 mov r3, r0
8002fac: fb03 f205 mul.w r2, r3, r5
8002fb0: 88fb ldrh r3, [r7, #6]
8002fb2: 4413 add r3, r2
8002fb4: 005b lsls r3, r3, #1
8002fb6: 4423 add r3, r4
8002fb8: 683a ldr r2, [r7, #0]
8002fba: b292 uxth r2, r2
8002fbc: 801a strh r2, [r3, #0]
}
else
{ /* ARGB8888 format */
*(__IO uint32_t*) (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress + (4*(Ypos*BSP_LCD_GetXSize() + Xpos))) = RGB_Code;
}
}
8002fbe: e015 b.n 8002fec <BSP_LCD_DrawPixel+0x80>
*(__IO uint32_t*) (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress + (4*(Ypos*BSP_LCD_GetXSize() + Xpos))) = RGB_Code;
8002fc0: 4b0c ldr r3, [pc, #48] ; (8002ff4 <BSP_LCD_DrawPixel+0x88>)
8002fc2: 681b ldr r3, [r3, #0]
8002fc4: 4a0c ldr r2, [pc, #48] ; (8002ff8 <BSP_LCD_DrawPixel+0x8c>)
8002fc6: 2134 movs r1, #52 ; 0x34
8002fc8: fb01 f303 mul.w r3, r1, r3
8002fcc: 4413 add r3, r2
8002fce: 335c adds r3, #92 ; 0x5c
8002fd0: 681c ldr r4, [r3, #0]
8002fd2: 88bd ldrh r5, [r7, #4]
8002fd4: f7ff fc3a bl 800284c <BSP_LCD_GetXSize>
8002fd8: 4603 mov r3, r0
8002fda: fb03 f205 mul.w r2, r3, r5
8002fde: 88fb ldrh r3, [r7, #6]
8002fe0: 4413 add r3, r2
8002fe2: 009b lsls r3, r3, #2
8002fe4: 4423 add r3, r4
8002fe6: 461a mov r2, r3
8002fe8: 683b ldr r3, [r7, #0]
8002fea: 6013 str r3, [r2, #0]
}
8002fec: bf00 nop
8002fee: 3708 adds r7, #8
8002ff0: 46bd mov sp, r7
8002ff2: bdb0 pop {r4, r5, r7, pc}
8002ff4: 20000408 .word 0x20000408
8002ff8: 20008e5c .word 0x20008e5c
08002ffc <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)
{
8002ffc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
8003000: b086 sub sp, #24
8003002: af02 add r7, sp, #8
8003004: 4604 mov r4, r0
8003006: 4608 mov r0, r1
8003008: 4611 mov r1, r2
800300a: 461a mov r2, r3
800300c: 4623 mov r3, r4
800300e: 80fb strh r3, [r7, #6]
8003010: 4603 mov r3, r0
8003012: 80bb strh r3, [r7, #4]
8003014: 460b mov r3, r1
8003016: 807b strh r3, [r7, #2]
8003018: 4613 mov r3, r2
800301a: 803b strh r3, [r7, #0]
uint32_t x_address = 0;
800301c: 2300 movs r3, #0
800301e: 60fb str r3, [r7, #12]
/* Set the text color */
BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor);
8003020: 4b30 ldr r3, [pc, #192] ; (80030e4 <BSP_LCD_FillRect+0xe8>)
8003022: 681a ldr r2, [r3, #0]
8003024: 4930 ldr r1, [pc, #192] ; (80030e8 <BSP_LCD_FillRect+0xec>)
8003026: 4613 mov r3, r2
8003028: 005b lsls r3, r3, #1
800302a: 4413 add r3, r2
800302c: 009b lsls r3, r3, #2
800302e: 440b add r3, r1
8003030: 681b ldr r3, [r3, #0]
8003032: 4618 mov r0, r3
8003034: f7ff fca2 bl 800297c <BSP_LCD_SetTextColor>
/* Get the rectangle start address */
if(hLtdcHandler.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)
8003038: 4b2a ldr r3, [pc, #168] ; (80030e4 <BSP_LCD_FillRect+0xe8>)
800303a: 681b ldr r3, [r3, #0]
800303c: 4a2b ldr r2, [pc, #172] ; (80030ec <BSP_LCD_FillRect+0xf0>)
800303e: 2134 movs r1, #52 ; 0x34
8003040: fb01 f303 mul.w r3, r1, r3
8003044: 4413 add r3, r2
8003046: 3348 adds r3, #72 ; 0x48
8003048: 681b ldr r3, [r3, #0]
800304a: 2b02 cmp r3, #2
800304c: d114 bne.n 8003078 <BSP_LCD_FillRect+0x7c>
{ /* RGB565 format */
x_address = (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress) + 2*(BSP_LCD_GetXSize()*Ypos + Xpos);
800304e: 4b25 ldr r3, [pc, #148] ; (80030e4 <BSP_LCD_FillRect+0xe8>)
8003050: 681b ldr r3, [r3, #0]
8003052: 4a26 ldr r2, [pc, #152] ; (80030ec <BSP_LCD_FillRect+0xf0>)
8003054: 2134 movs r1, #52 ; 0x34
8003056: fb01 f303 mul.w r3, r1, r3
800305a: 4413 add r3, r2
800305c: 335c adds r3, #92 ; 0x5c
800305e: 681c ldr r4, [r3, #0]
8003060: f7ff fbf4 bl 800284c <BSP_LCD_GetXSize>
8003064: 4602 mov r2, r0
8003066: 88bb ldrh r3, [r7, #4]
8003068: fb03 f202 mul.w r2, r3, r2
800306c: 88fb ldrh r3, [r7, #6]
800306e: 4413 add r3, r2
8003070: 005b lsls r3, r3, #1
8003072: 4423 add r3, r4
8003074: 60fb str r3, [r7, #12]
8003076: e013 b.n 80030a0 <BSP_LCD_FillRect+0xa4>
}
else
{ /* ARGB8888 format */
x_address = (hLtdcHandler.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos);
8003078: 4b1a ldr r3, [pc, #104] ; (80030e4 <BSP_LCD_FillRect+0xe8>)
800307a: 681b ldr r3, [r3, #0]
800307c: 4a1b ldr r2, [pc, #108] ; (80030ec <BSP_LCD_FillRect+0xf0>)
800307e: 2134 movs r1, #52 ; 0x34
8003080: fb01 f303 mul.w r3, r1, r3
8003084: 4413 add r3, r2
8003086: 335c adds r3, #92 ; 0x5c
8003088: 681c ldr r4, [r3, #0]
800308a: f7ff fbdf bl 800284c <BSP_LCD_GetXSize>
800308e: 4602 mov r2, r0
8003090: 88bb ldrh r3, [r7, #4]
8003092: fb03 f202 mul.w r2, r3, r2
8003096: 88fb ldrh r3, [r7, #6]
8003098: 4413 add r3, r2
800309a: 009b lsls r3, r3, #2
800309c: 4423 add r3, r4
800309e: 60fb str r3, [r7, #12]
}
/* Fill the rectangle */
LL_FillBuffer(ActiveLayer, (uint32_t *)x_address, Width, Height, (BSP_LCD_GetXSize() - Width), DrawProp[ActiveLayer].TextColor);
80030a0: 4b10 ldr r3, [pc, #64] ; (80030e4 <BSP_LCD_FillRect+0xe8>)
80030a2: 681c ldr r4, [r3, #0]
80030a4: 68fd ldr r5, [r7, #12]
80030a6: 887e ldrh r6, [r7, #2]
80030a8: f8b7 8000 ldrh.w r8, [r7]
80030ac: f7ff fbce bl 800284c <BSP_LCD_GetXSize>
80030b0: 4602 mov r2, r0
80030b2: 887b ldrh r3, [r7, #2]
80030b4: 1ad1 subs r1, r2, r3
80030b6: 4b0b ldr r3, [pc, #44] ; (80030e4 <BSP_LCD_FillRect+0xe8>)
80030b8: 681a ldr r2, [r3, #0]
80030ba: 480b ldr r0, [pc, #44] ; (80030e8 <BSP_LCD_FillRect+0xec>)
80030bc: 4613 mov r3, r2
80030be: 005b lsls r3, r3, #1
80030c0: 4413 add r3, r2
80030c2: 009b lsls r3, r3, #2
80030c4: 4403 add r3, r0
80030c6: 681b ldr r3, [r3, #0]
80030c8: 9301 str r3, [sp, #4]
80030ca: 9100 str r1, [sp, #0]
80030cc: 4643 mov r3, r8
80030ce: 4632 mov r2, r6
80030d0: 4629 mov r1, r5
80030d2: 4620 mov r0, r4
80030d4: f000 fa78 bl 80035c8 <LL_FillBuffer>
}
80030d8: bf00 nop
80030da: 3710 adds r7, #16
80030dc: 46bd mov sp, r7
80030de: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
80030e2: bf00 nop
80030e4: 20000408 .word 0x20000408
80030e8: 2000040c .word 0x2000040c
80030ec: 20008e5c .word 0x20008e5c
080030f0 <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)
{
80030f0: b580 push {r7, lr}
80030f2: b086 sub sp, #24
80030f4: af00 add r7, sp, #0
80030f6: 4603 mov r3, r0
80030f8: 80fb strh r3, [r7, #6]
80030fa: 460b mov r3, r1
80030fc: 80bb strh r3, [r7, #4]
80030fe: 4613 mov r3, r2
8003100: 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);
8003102: 887b ldrh r3, [r7, #2]
8003104: 005b lsls r3, r3, #1
8003106: f1c3 0303 rsb r3, r3, #3
800310a: 617b str r3, [r7, #20]
current_x = 0;
800310c: 2300 movs r3, #0
800310e: 613b str r3, [r7, #16]
current_y = Radius;
8003110: 887b ldrh r3, [r7, #2]
8003112: 60fb str r3, [r7, #12]
BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor);
8003114: 4b44 ldr r3, [pc, #272] ; (8003228 <BSP_LCD_FillCircle+0x138>)
8003116: 681a ldr r2, [r3, #0]
8003118: 4944 ldr r1, [pc, #272] ; (800322c <BSP_LCD_FillCircle+0x13c>)
800311a: 4613 mov r3, r2
800311c: 005b lsls r3, r3, #1
800311e: 4413 add r3, r2
8003120: 009b lsls r3, r3, #2
8003122: 440b add r3, r1
8003124: 681b ldr r3, [r3, #0]
8003126: 4618 mov r0, r3
8003128: f7ff fc28 bl 800297c <BSP_LCD_SetTextColor>
while (current_x <= current_y)
800312c: e061 b.n 80031f2 <BSP_LCD_FillCircle+0x102>
{
if(current_y > 0)
800312e: 68fb ldr r3, [r7, #12]
8003130: 2b00 cmp r3, #0
8003132: d021 beq.n 8003178 <BSP_LCD_FillCircle+0x88>
{
BSP_LCD_DrawHLine(Xpos - current_y, Ypos + current_x, 2*current_y);
8003134: 68fb ldr r3, [r7, #12]
8003136: b29b uxth r3, r3
8003138: 88fa ldrh r2, [r7, #6]
800313a: 1ad3 subs r3, r2, r3
800313c: b298 uxth r0, r3
800313e: 693b ldr r3, [r7, #16]
8003140: b29a uxth r2, r3
8003142: 88bb ldrh r3, [r7, #4]
8003144: 4413 add r3, r2
8003146: b299 uxth r1, r3
8003148: 68fb ldr r3, [r7, #12]
800314a: b29b uxth r3, r3
800314c: 005b lsls r3, r3, #1
800314e: b29b uxth r3, r3
8003150: 461a mov r2, r3
8003152: f7ff fdbd bl 8002cd0 <BSP_LCD_DrawHLine>
BSP_LCD_DrawHLine(Xpos - current_y, Ypos - current_x, 2*current_y);
8003156: 68fb ldr r3, [r7, #12]
8003158: b29b uxth r3, r3
800315a: 88fa ldrh r2, [r7, #6]
800315c: 1ad3 subs r3, r2, r3
800315e: b298 uxth r0, r3
8003160: 693b ldr r3, [r7, #16]
8003162: b29b uxth r3, r3
8003164: 88ba ldrh r2, [r7, #4]
8003166: 1ad3 subs r3, r2, r3
8003168: b299 uxth r1, r3
800316a: 68fb ldr r3, [r7, #12]
800316c: b29b uxth r3, r3
800316e: 005b lsls r3, r3, #1
8003170: b29b uxth r3, r3
8003172: 461a mov r2, r3
8003174: f7ff fdac bl 8002cd0 <BSP_LCD_DrawHLine>
}
if(current_x > 0)
8003178: 693b ldr r3, [r7, #16]
800317a: 2b00 cmp r3, #0
800317c: d021 beq.n 80031c2 <BSP_LCD_FillCircle+0xd2>
{
BSP_LCD_DrawHLine(Xpos - current_x, Ypos - current_y, 2*current_x);
800317e: 693b ldr r3, [r7, #16]
8003180: b29b uxth r3, r3
8003182: 88fa ldrh r2, [r7, #6]
8003184: 1ad3 subs r3, r2, r3
8003186: b298 uxth r0, r3
8003188: 68fb ldr r3, [r7, #12]
800318a: b29b uxth r3, r3
800318c: 88ba ldrh r2, [r7, #4]
800318e: 1ad3 subs r3, r2, r3
8003190: b299 uxth r1, r3
8003192: 693b ldr r3, [r7, #16]
8003194: b29b uxth r3, r3
8003196: 005b lsls r3, r3, #1
8003198: b29b uxth r3, r3
800319a: 461a mov r2, r3
800319c: f7ff fd98 bl 8002cd0 <BSP_LCD_DrawHLine>
BSP_LCD_DrawHLine(Xpos - current_x, Ypos + current_y, 2*current_x);
80031a0: 693b ldr r3, [r7, #16]
80031a2: b29b uxth r3, r3
80031a4: 88fa ldrh r2, [r7, #6]
80031a6: 1ad3 subs r3, r2, r3
80031a8: b298 uxth r0, r3
80031aa: 68fb ldr r3, [r7, #12]
80031ac: b29a uxth r2, r3
80031ae: 88bb ldrh r3, [r7, #4]
80031b0: 4413 add r3, r2
80031b2: b299 uxth r1, r3
80031b4: 693b ldr r3, [r7, #16]
80031b6: b29b uxth r3, r3
80031b8: 005b lsls r3, r3, #1
80031ba: b29b uxth r3, r3
80031bc: 461a mov r2, r3
80031be: f7ff fd87 bl 8002cd0 <BSP_LCD_DrawHLine>
}
if (decision < 0)
80031c2: 697b ldr r3, [r7, #20]
80031c4: 2b00 cmp r3, #0
80031c6: da06 bge.n 80031d6 <BSP_LCD_FillCircle+0xe6>
{
decision += (current_x << 2) + 6;
80031c8: 693b ldr r3, [r7, #16]
80031ca: 009a lsls r2, r3, #2
80031cc: 697b ldr r3, [r7, #20]
80031ce: 4413 add r3, r2
80031d0: 3306 adds r3, #6
80031d2: 617b str r3, [r7, #20]
80031d4: e00a b.n 80031ec <BSP_LCD_FillCircle+0xfc>
}
else
{
decision += ((current_x - current_y) << 2) + 10;
80031d6: 693a ldr r2, [r7, #16]
80031d8: 68fb ldr r3, [r7, #12]
80031da: 1ad3 subs r3, r2, r3
80031dc: 009a lsls r2, r3, #2
80031de: 697b ldr r3, [r7, #20]
80031e0: 4413 add r3, r2
80031e2: 330a adds r3, #10
80031e4: 617b str r3, [r7, #20]
current_y--;
80031e6: 68fb ldr r3, [r7, #12]
80031e8: 3b01 subs r3, #1
80031ea: 60fb str r3, [r7, #12]
}
current_x++;
80031ec: 693b ldr r3, [r7, #16]
80031ee: 3301 adds r3, #1
80031f0: 613b str r3, [r7, #16]
while (current_x <= current_y)
80031f2: 693a ldr r2, [r7, #16]
80031f4: 68fb ldr r3, [r7, #12]
80031f6: 429a cmp r2, r3
80031f8: d999 bls.n 800312e <BSP_LCD_FillCircle+0x3e>
}
BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor);
80031fa: 4b0b ldr r3, [pc, #44] ; (8003228 <BSP_LCD_FillCircle+0x138>)
80031fc: 681a ldr r2, [r3, #0]
80031fe: 490b ldr r1, [pc, #44] ; (800322c <BSP_LCD_FillCircle+0x13c>)
8003200: 4613 mov r3, r2
8003202: 005b lsls r3, r3, #1
8003204: 4413 add r3, r2
8003206: 009b lsls r3, r3, #2
8003208: 440b add r3, r1
800320a: 681b ldr r3, [r3, #0]
800320c: 4618 mov r0, r3
800320e: f7ff fbb5 bl 800297c <BSP_LCD_SetTextColor>
BSP_LCD_DrawCircle(Xpos, Ypos, Radius);
8003212: 887a ldrh r2, [r7, #2]
8003214: 88b9 ldrh r1, [r7, #4]
8003216: 88fb ldrh r3, [r7, #6]
8003218: 4618 mov r0, r3
800321a: f7ff fdb7 bl 8002d8c <BSP_LCD_DrawCircle>
}
800321e: bf00 nop
8003220: 3718 adds r7, #24
8003222: 46bd mov sp, r7
8003224: bd80 pop {r7, pc}
8003226: bf00 nop
8003228: 20000408 .word 0x20000408
800322c: 2000040c .word 0x2000040c
08003230 <BSP_LCD_DisplayOn>:
/**
* @brief Enables the display.
* @retval None
*/
void BSP_LCD_DisplayOn(void)
{
8003230: b580 push {r7, lr}
8003232: af00 add r7, sp, #0
/* Display On */
__HAL_LTDC_ENABLE(&hLtdcHandler);
8003234: 4b0a ldr r3, [pc, #40] ; (8003260 <BSP_LCD_DisplayOn+0x30>)
8003236: 681b ldr r3, [r3, #0]
8003238: 699a ldr r2, [r3, #24]
800323a: 4b09 ldr r3, [pc, #36] ; (8003260 <BSP_LCD_DisplayOn+0x30>)
800323c: 681b ldr r3, [r3, #0]
800323e: f042 0201 orr.w r2, r2, #1
8003242: 619a str r2, [r3, #24]
HAL_GPIO_WritePin(LCD_DISP_GPIO_PORT, LCD_DISP_PIN, GPIO_PIN_SET); /* Assert LCD_DISP pin */
8003244: 2201 movs r2, #1
8003246: f44f 5180 mov.w r1, #4096 ; 0x1000
800324a: 4806 ldr r0, [pc, #24] ; (8003264 <BSP_LCD_DisplayOn+0x34>)
800324c: f004 fc62 bl 8007b14 <HAL_GPIO_WritePin>
HAL_GPIO_WritePin(LCD_BL_CTRL_GPIO_PORT, LCD_BL_CTRL_PIN, GPIO_PIN_SET); /* Assert LCD_BL_CTRL pin */
8003250: 2201 movs r2, #1
8003252: 2108 movs r1, #8
8003254: 4804 ldr r0, [pc, #16] ; (8003268 <BSP_LCD_DisplayOn+0x38>)
8003256: f004 fc5d bl 8007b14 <HAL_GPIO_WritePin>
}
800325a: bf00 nop
800325c: bd80 pop {r7, pc}
800325e: bf00 nop
8003260: 20008e5c .word 0x20008e5c
8003264: 40022000 .word 0x40022000
8003268: 40022800 .word 0x40022800
0800326c <BSP_LCD_MspInit>:
* @param hltdc: LTDC handle
* @param Params
* @retval None
*/
__weak void BSP_LCD_MspInit(LTDC_HandleTypeDef *hltdc, void *Params)
{
800326c: b580 push {r7, lr}
800326e: b090 sub sp, #64 ; 0x40
8003270: af00 add r7, sp, #0
8003272: 6078 str r0, [r7, #4]
8003274: 6039 str r1, [r7, #0]
GPIO_InitTypeDef gpio_init_structure;
/* Enable the LTDC and DMA2D clocks */
__HAL_RCC_LTDC_CLK_ENABLE();
8003276: 4b64 ldr r3, [pc, #400] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003278: 6c5b ldr r3, [r3, #68] ; 0x44
800327a: 4a63 ldr r2, [pc, #396] ; (8003408 <BSP_LCD_MspInit+0x19c>)
800327c: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
8003280: 6453 str r3, [r2, #68] ; 0x44
8003282: 4b61 ldr r3, [pc, #388] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003284: 6c5b ldr r3, [r3, #68] ; 0x44
8003286: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
800328a: 62bb str r3, [r7, #40] ; 0x28
800328c: 6abb ldr r3, [r7, #40] ; 0x28
__HAL_RCC_DMA2D_CLK_ENABLE();
800328e: 4b5e ldr r3, [pc, #376] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003290: 6b1b ldr r3, [r3, #48] ; 0x30
8003292: 4a5d ldr r2, [pc, #372] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003294: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
8003298: 6313 str r3, [r2, #48] ; 0x30
800329a: 4b5b ldr r3, [pc, #364] ; (8003408 <BSP_LCD_MspInit+0x19c>)
800329c: 6b1b ldr r3, [r3, #48] ; 0x30
800329e: f403 0300 and.w r3, r3, #8388608 ; 0x800000
80032a2: 627b str r3, [r7, #36] ; 0x24
80032a4: 6a7b ldr r3, [r7, #36] ; 0x24
/* Enable GPIOs clock */
__HAL_RCC_GPIOE_CLK_ENABLE();
80032a6: 4b58 ldr r3, [pc, #352] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032a8: 6b1b ldr r3, [r3, #48] ; 0x30
80032aa: 4a57 ldr r2, [pc, #348] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032ac: f043 0310 orr.w r3, r3, #16
80032b0: 6313 str r3, [r2, #48] ; 0x30
80032b2: 4b55 ldr r3, [pc, #340] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032b4: 6b1b ldr r3, [r3, #48] ; 0x30
80032b6: f003 0310 and.w r3, r3, #16
80032ba: 623b str r3, [r7, #32]
80032bc: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOG_CLK_ENABLE();
80032be: 4b52 ldr r3, [pc, #328] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032c0: 6b1b ldr r3, [r3, #48] ; 0x30
80032c2: 4a51 ldr r2, [pc, #324] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032c4: f043 0340 orr.w r3, r3, #64 ; 0x40
80032c8: 6313 str r3, [r2, #48] ; 0x30
80032ca: 4b4f ldr r3, [pc, #316] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032cc: 6b1b ldr r3, [r3, #48] ; 0x30
80032ce: f003 0340 and.w r3, r3, #64 ; 0x40
80032d2: 61fb str r3, [r7, #28]
80032d4: 69fb ldr r3, [r7, #28]
__HAL_RCC_GPIOI_CLK_ENABLE();
80032d6: 4b4c ldr r3, [pc, #304] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032d8: 6b1b ldr r3, [r3, #48] ; 0x30
80032da: 4a4b ldr r2, [pc, #300] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032dc: f443 7380 orr.w r3, r3, #256 ; 0x100
80032e0: 6313 str r3, [r2, #48] ; 0x30
80032e2: 4b49 ldr r3, [pc, #292] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032e4: 6b1b ldr r3, [r3, #48] ; 0x30
80032e6: f403 7380 and.w r3, r3, #256 ; 0x100
80032ea: 61bb str r3, [r7, #24]
80032ec: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOJ_CLK_ENABLE();
80032ee: 4b46 ldr r3, [pc, #280] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032f0: 6b1b ldr r3, [r3, #48] ; 0x30
80032f2: 4a45 ldr r2, [pc, #276] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032f4: f443 7300 orr.w r3, r3, #512 ; 0x200
80032f8: 6313 str r3, [r2, #48] ; 0x30
80032fa: 4b43 ldr r3, [pc, #268] ; (8003408 <BSP_LCD_MspInit+0x19c>)
80032fc: 6b1b ldr r3, [r3, #48] ; 0x30
80032fe: f403 7300 and.w r3, r3, #512 ; 0x200
8003302: 617b str r3, [r7, #20]
8003304: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOK_CLK_ENABLE();
8003306: 4b40 ldr r3, [pc, #256] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003308: 6b1b ldr r3, [r3, #48] ; 0x30
800330a: 4a3f ldr r2, [pc, #252] ; (8003408 <BSP_LCD_MspInit+0x19c>)
800330c: f443 6380 orr.w r3, r3, #1024 ; 0x400
8003310: 6313 str r3, [r2, #48] ; 0x30
8003312: 4b3d ldr r3, [pc, #244] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003314: 6b1b ldr r3, [r3, #48] ; 0x30
8003316: f403 6380 and.w r3, r3, #1024 ; 0x400
800331a: 613b str r3, [r7, #16]
800331c: 693b ldr r3, [r7, #16]
LCD_DISP_GPIO_CLK_ENABLE();
800331e: 4b3a ldr r3, [pc, #232] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003320: 6b1b ldr r3, [r3, #48] ; 0x30
8003322: 4a39 ldr r2, [pc, #228] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003324: f443 7380 orr.w r3, r3, #256 ; 0x100
8003328: 6313 str r3, [r2, #48] ; 0x30
800332a: 4b37 ldr r3, [pc, #220] ; (8003408 <BSP_LCD_MspInit+0x19c>)
800332c: 6b1b ldr r3, [r3, #48] ; 0x30
800332e: f403 7380 and.w r3, r3, #256 ; 0x100
8003332: 60fb str r3, [r7, #12]
8003334: 68fb ldr r3, [r7, #12]
LCD_BL_CTRL_GPIO_CLK_ENABLE();
8003336: 4b34 ldr r3, [pc, #208] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003338: 6b1b ldr r3, [r3, #48] ; 0x30
800333a: 4a33 ldr r2, [pc, #204] ; (8003408 <BSP_LCD_MspInit+0x19c>)
800333c: f443 6380 orr.w r3, r3, #1024 ; 0x400
8003340: 6313 str r3, [r2, #48] ; 0x30
8003342: 4b31 ldr r3, [pc, #196] ; (8003408 <BSP_LCD_MspInit+0x19c>)
8003344: 6b1b ldr r3, [r3, #48] ; 0x30
8003346: f403 6380 and.w r3, r3, #1024 ; 0x400
800334a: 60bb str r3, [r7, #8]
800334c: 68bb ldr r3, [r7, #8]
/*** LTDC Pins configuration ***/
/* GPIOE configuration */
gpio_init_structure.Pin = GPIO_PIN_4;
800334e: 2310 movs r3, #16
8003350: 62fb str r3, [r7, #44] ; 0x2c
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
8003352: 2302 movs r3, #2
8003354: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Pull = GPIO_NOPULL;
8003356: 2300 movs r3, #0
8003358: 637b str r3, [r7, #52] ; 0x34
gpio_init_structure.Speed = GPIO_SPEED_FAST;
800335a: 2302 movs r3, #2
800335c: 63bb str r3, [r7, #56] ; 0x38
gpio_init_structure.Alternate = GPIO_AF14_LTDC;
800335e: 230e movs r3, #14
8003360: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOE, &gpio_init_structure);
8003362: f107 032c add.w r3, r7, #44 ; 0x2c
8003366: 4619 mov r1, r3
8003368: 4828 ldr r0, [pc, #160] ; (800340c <BSP_LCD_MspInit+0x1a0>)
800336a: f004 f907 bl 800757c <HAL_GPIO_Init>
/* GPIOG configuration */
gpio_init_structure.Pin = GPIO_PIN_12;
800336e: f44f 5380 mov.w r3, #4096 ; 0x1000
8003372: 62fb str r3, [r7, #44] ; 0x2c
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
8003374: 2302 movs r3, #2
8003376: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Alternate = GPIO_AF9_LTDC;
8003378: 2309 movs r3, #9
800337a: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOG, &gpio_init_structure);
800337c: f107 032c add.w r3, r7, #44 ; 0x2c
8003380: 4619 mov r1, r3
8003382: 4823 ldr r0, [pc, #140] ; (8003410 <BSP_LCD_MspInit+0x1a4>)
8003384: f004 f8fa bl 800757c <HAL_GPIO_Init>
/* GPIOI LTDC alternate configuration */
gpio_init_structure.Pin = GPIO_PIN_9 | GPIO_PIN_10 | \
8003388: f44f 4366 mov.w r3, #58880 ; 0xe600
800338c: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
800338e: 2302 movs r3, #2
8003390: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Alternate = GPIO_AF14_LTDC;
8003392: 230e movs r3, #14
8003394: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOI, &gpio_init_structure);
8003396: f107 032c add.w r3, r7, #44 ; 0x2c
800339a: 4619 mov r1, r3
800339c: 481d ldr r0, [pc, #116] ; (8003414 <BSP_LCD_MspInit+0x1a8>)
800339e: f004 f8ed bl 800757c <HAL_GPIO_Init>
/* GPIOJ configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | \
80033a2: f64e 73ff movw r3, #61439 ; 0xefff
80033a6: 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;
80033a8: 2302 movs r3, #2
80033aa: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Alternate = GPIO_AF14_LTDC;
80033ac: 230e movs r3, #14
80033ae: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOJ, &gpio_init_structure);
80033b0: f107 032c add.w r3, r7, #44 ; 0x2c
80033b4: 4619 mov r1, r3
80033b6: 4818 ldr r0, [pc, #96] ; (8003418 <BSP_LCD_MspInit+0x1ac>)
80033b8: f004 f8e0 bl 800757c <HAL_GPIO_Init>
/* GPIOK configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_4 | \
80033bc: 23f7 movs r3, #247 ; 0xf7
80033be: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7;
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
80033c0: 2302 movs r3, #2
80033c2: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Alternate = GPIO_AF14_LTDC;
80033c4: 230e movs r3, #14
80033c6: 63fb str r3, [r7, #60] ; 0x3c
HAL_GPIO_Init(GPIOK, &gpio_init_structure);
80033c8: f107 032c add.w r3, r7, #44 ; 0x2c
80033cc: 4619 mov r1, r3
80033ce: 4813 ldr r0, [pc, #76] ; (800341c <BSP_LCD_MspInit+0x1b0>)
80033d0: f004 f8d4 bl 800757c <HAL_GPIO_Init>
/* LCD_DISP GPIO configuration */
gpio_init_structure.Pin = LCD_DISP_PIN; /* LCD_DISP pin has to be manually controlled */
80033d4: f44f 5380 mov.w r3, #4096 ; 0x1000
80033d8: 62fb str r3, [r7, #44] ; 0x2c
gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP;
80033da: 2301 movs r3, #1
80033dc: 633b str r3, [r7, #48] ; 0x30
HAL_GPIO_Init(LCD_DISP_GPIO_PORT, &gpio_init_structure);
80033de: f107 032c add.w r3, r7, #44 ; 0x2c
80033e2: 4619 mov r1, r3
80033e4: 480b ldr r0, [pc, #44] ; (8003414 <BSP_LCD_MspInit+0x1a8>)
80033e6: f004 f8c9 bl 800757c <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 */
80033ea: 2308 movs r3, #8
80033ec: 62fb str r3, [r7, #44] ; 0x2c
gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP;
80033ee: 2301 movs r3, #1
80033f0: 633b str r3, [r7, #48] ; 0x30
HAL_GPIO_Init(LCD_BL_CTRL_GPIO_PORT, &gpio_init_structure);
80033f2: f107 032c add.w r3, r7, #44 ; 0x2c
80033f6: 4619 mov r1, r3
80033f8: 4808 ldr r0, [pc, #32] ; (800341c <BSP_LCD_MspInit+0x1b0>)
80033fa: f004 f8bf bl 800757c <HAL_GPIO_Init>
}
80033fe: bf00 nop
8003400: 3740 adds r7, #64 ; 0x40
8003402: 46bd mov sp, r7
8003404: bd80 pop {r7, pc}
8003406: bf00 nop
8003408: 40023800 .word 0x40023800
800340c: 40021000 .word 0x40021000
8003410: 40021800 .word 0x40021800
8003414: 40022000 .word 0x40022000
8003418: 40022400 .word 0x40022400
800341c: 40022800 .word 0x40022800
08003420 <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)
{
8003420: b580 push {r7, lr}
8003422: b082 sub sp, #8
8003424: af00 add r7, sp, #0
8003426: 6078 str r0, [r7, #4]
8003428: 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;
800342a: 4b0a ldr r3, [pc, #40] ; (8003454 <BSP_LCD_ClockConfig+0x34>)
800342c: 2208 movs r2, #8
800342e: 601a str r2, [r3, #0]
periph_clk_init_struct.PLLSAI.PLLSAIN = 192;
8003430: 4b08 ldr r3, [pc, #32] ; (8003454 <BSP_LCD_ClockConfig+0x34>)
8003432: 22c0 movs r2, #192 ; 0xc0
8003434: 615a str r2, [r3, #20]
periph_clk_init_struct.PLLSAI.PLLSAIR = RK043FN48H_FREQUENCY_DIVIDER;
8003436: 4b07 ldr r3, [pc, #28] ; (8003454 <BSP_LCD_ClockConfig+0x34>)
8003438: 2205 movs r2, #5
800343a: 61da str r2, [r3, #28]
periph_clk_init_struct.PLLSAIDivR = RCC_PLLSAIDIVR_4;
800343c: 4b05 ldr r3, [pc, #20] ; (8003454 <BSP_LCD_ClockConfig+0x34>)
800343e: f44f 3280 mov.w r2, #65536 ; 0x10000
8003442: 62da str r2, [r3, #44] ; 0x2c
HAL_RCCEx_PeriphCLKConfig(&periph_clk_init_struct);
8003444: 4803 ldr r0, [pc, #12] ; (8003454 <BSP_LCD_ClockConfig+0x34>)
8003446: f006 f9af bl 80097a8 <HAL_RCCEx_PeriphCLKConfig>
}
800344a: bf00 nop
800344c: 3708 adds r7, #8
800344e: 46bd mov sp, r7
8003450: bd80 pop {r7, pc}
8003452: bf00 nop
8003454: 20000424 .word 0x20000424
08003458 <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)
{
8003458: b580 push {r7, lr}
800345a: b088 sub sp, #32
800345c: af00 add r7, sp, #0
800345e: 4603 mov r3, r0
8003460: 603a str r2, [r7, #0]
8003462: 80fb strh r3, [r7, #6]
8003464: 460b mov r3, r1
8003466: 80bb strh r3, [r7, #4]
uint32_t i = 0, j = 0;
8003468: 2300 movs r3, #0
800346a: 61fb str r3, [r7, #28]
800346c: 2300 movs r3, #0
800346e: 61bb str r3, [r7, #24]
uint16_t height, width;
uint8_t offset;
uint8_t *pchar;
uint32_t line;
height = DrawProp[ActiveLayer].pFont->Height;
8003470: 4b53 ldr r3, [pc, #332] ; (80035c0 <DrawChar+0x168>)
8003472: 681a ldr r2, [r3, #0]
8003474: 4953 ldr r1, [pc, #332] ; (80035c4 <DrawChar+0x16c>)
8003476: 4613 mov r3, r2
8003478: 005b lsls r3, r3, #1
800347a: 4413 add r3, r2
800347c: 009b lsls r3, r3, #2
800347e: 440b add r3, r1
8003480: 3308 adds r3, #8
8003482: 681b ldr r3, [r3, #0]
8003484: 88db ldrh r3, [r3, #6]
8003486: 827b strh r3, [r7, #18]
width = DrawProp[ActiveLayer].pFont->Width;
8003488: 4b4d ldr r3, [pc, #308] ; (80035c0 <DrawChar+0x168>)
800348a: 681a ldr r2, [r3, #0]
800348c: 494d ldr r1, [pc, #308] ; (80035c4 <DrawChar+0x16c>)
800348e: 4613 mov r3, r2
8003490: 005b lsls r3, r3, #1
8003492: 4413 add r3, r2
8003494: 009b lsls r3, r3, #2
8003496: 440b add r3, r1
8003498: 3308 adds r3, #8
800349a: 681b ldr r3, [r3, #0]
800349c: 889b ldrh r3, [r3, #4]
800349e: 823b strh r3, [r7, #16]
offset = 8 *((width + 7)/8) - width ;
80034a0: 8a3b ldrh r3, [r7, #16]
80034a2: 3307 adds r3, #7
80034a4: 2b00 cmp r3, #0
80034a6: da00 bge.n 80034aa <DrawChar+0x52>
80034a8: 3307 adds r3, #7
80034aa: 10db asrs r3, r3, #3
80034ac: b2db uxtb r3, r3
80034ae: 00db lsls r3, r3, #3
80034b0: b2da uxtb r2, r3
80034b2: 8a3b ldrh r3, [r7, #16]
80034b4: b2db uxtb r3, r3
80034b6: 1ad3 subs r3, r2, r3
80034b8: 73fb strb r3, [r7, #15]
for(i = 0; i < height; i++)
80034ba: 2300 movs r3, #0
80034bc: 61fb str r3, [r7, #28]
80034be: e076 b.n 80035ae <DrawChar+0x156>
{
pchar = ((uint8_t *)c + (width + 7)/8 * i);
80034c0: 8a3b ldrh r3, [r7, #16]
80034c2: 3307 adds r3, #7
80034c4: 2b00 cmp r3, #0
80034c6: da00 bge.n 80034ca <DrawChar+0x72>
80034c8: 3307 adds r3, #7
80034ca: 10db asrs r3, r3, #3
80034cc: 461a mov r2, r3
80034ce: 69fb ldr r3, [r7, #28]
80034d0: fb03 f302 mul.w r3, r3, r2
80034d4: 683a ldr r2, [r7, #0]
80034d6: 4413 add r3, r2
80034d8: 60bb str r3, [r7, #8]
switch(((width + 7)/8))
80034da: 8a3b ldrh r3, [r7, #16]
80034dc: 3307 adds r3, #7
80034de: 2b00 cmp r3, #0
80034e0: da00 bge.n 80034e4 <DrawChar+0x8c>
80034e2: 3307 adds r3, #7
80034e4: 10db asrs r3, r3, #3
80034e6: 2b01 cmp r3, #1
80034e8: d002 beq.n 80034f0 <DrawChar+0x98>
80034ea: 2b02 cmp r3, #2
80034ec: d004 beq.n 80034f8 <DrawChar+0xa0>
80034ee: e00c b.n 800350a <DrawChar+0xb2>
{
case 1:
line = pchar[0];
80034f0: 68bb ldr r3, [r7, #8]
80034f2: 781b ldrb r3, [r3, #0]
80034f4: 617b str r3, [r7, #20]
break;
80034f6: e016 b.n 8003526 <DrawChar+0xce>
case 2:
line = (pchar[0]<< 8) | pchar[1];
80034f8: 68bb ldr r3, [r7, #8]
80034fa: 781b ldrb r3, [r3, #0]
80034fc: 021b lsls r3, r3, #8
80034fe: 68ba ldr r2, [r7, #8]
8003500: 3201 adds r2, #1
8003502: 7812 ldrb r2, [r2, #0]
8003504: 4313 orrs r3, r2
8003506: 617b str r3, [r7, #20]
break;
8003508: e00d b.n 8003526 <DrawChar+0xce>
case 3:
default:
line = (pchar[0]<< 16) | (pchar[1]<< 8) | pchar[2];
800350a: 68bb ldr r3, [r7, #8]
800350c: 781b ldrb r3, [r3, #0]
800350e: 041a lsls r2, r3, #16
8003510: 68bb ldr r3, [r7, #8]
8003512: 3301 adds r3, #1
8003514: 781b ldrb r3, [r3, #0]
8003516: 021b lsls r3, r3, #8
8003518: 4313 orrs r3, r2
800351a: 68ba ldr r2, [r7, #8]
800351c: 3202 adds r2, #2
800351e: 7812 ldrb r2, [r2, #0]
8003520: 4313 orrs r3, r2
8003522: 617b str r3, [r7, #20]
break;
8003524: bf00 nop
}
for (j = 0; j < width; j++)
8003526: 2300 movs r3, #0
8003528: 61bb str r3, [r7, #24]
800352a: e036 b.n 800359a <DrawChar+0x142>
{
if(line & (1 << (width- j + offset- 1)))
800352c: 8a3a ldrh r2, [r7, #16]
800352e: 69bb ldr r3, [r7, #24]
8003530: 1ad2 subs r2, r2, r3
8003532: 7bfb ldrb r3, [r7, #15]
8003534: 4413 add r3, r2
8003536: 3b01 subs r3, #1
8003538: 2201 movs r2, #1
800353a: fa02 f303 lsl.w r3, r2, r3
800353e: 461a mov r2, r3
8003540: 697b ldr r3, [r7, #20]
8003542: 4013 ands r3, r2
8003544: 2b00 cmp r3, #0
8003546: d012 beq.n 800356e <DrawChar+0x116>
{
BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp[ActiveLayer].TextColor);
8003548: 69bb ldr r3, [r7, #24]
800354a: b29a uxth r2, r3
800354c: 88fb ldrh r3, [r7, #6]
800354e: 4413 add r3, r2
8003550: b298 uxth r0, r3
8003552: 4b1b ldr r3, [pc, #108] ; (80035c0 <DrawChar+0x168>)
8003554: 681a ldr r2, [r3, #0]
8003556: 491b ldr r1, [pc, #108] ; (80035c4 <DrawChar+0x16c>)
8003558: 4613 mov r3, r2
800355a: 005b lsls r3, r3, #1
800355c: 4413 add r3, r2
800355e: 009b lsls r3, r3, #2
8003560: 440b add r3, r1
8003562: 681a ldr r2, [r3, #0]
8003564: 88bb ldrh r3, [r7, #4]
8003566: 4619 mov r1, r3
8003568: f7ff fd00 bl 8002f6c <BSP_LCD_DrawPixel>
800356c: e012 b.n 8003594 <DrawChar+0x13c>
}
else
{
BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp[ActiveLayer].BackColor);
800356e: 69bb ldr r3, [r7, #24]
8003570: b29a uxth r2, r3
8003572: 88fb ldrh r3, [r7, #6]
8003574: 4413 add r3, r2
8003576: b298 uxth r0, r3
8003578: 4b11 ldr r3, [pc, #68] ; (80035c0 <DrawChar+0x168>)
800357a: 681a ldr r2, [r3, #0]
800357c: 4911 ldr r1, [pc, #68] ; (80035c4 <DrawChar+0x16c>)
800357e: 4613 mov r3, r2
8003580: 005b lsls r3, r3, #1
8003582: 4413 add r3, r2
8003584: 009b lsls r3, r3, #2
8003586: 440b add r3, r1
8003588: 3304 adds r3, #4
800358a: 681a ldr r2, [r3, #0]
800358c: 88bb ldrh r3, [r7, #4]
800358e: 4619 mov r1, r3
8003590: f7ff fcec bl 8002f6c <BSP_LCD_DrawPixel>
for (j = 0; j < width; j++)
8003594: 69bb ldr r3, [r7, #24]
8003596: 3301 adds r3, #1
8003598: 61bb str r3, [r7, #24]
800359a: 8a3b ldrh r3, [r7, #16]
800359c: 69ba ldr r2, [r7, #24]
800359e: 429a cmp r2, r3
80035a0: d3c4 bcc.n 800352c <DrawChar+0xd4>
}
}
Ypos++;
80035a2: 88bb ldrh r3, [r7, #4]
80035a4: 3301 adds r3, #1
80035a6: 80bb strh r3, [r7, #4]
for(i = 0; i < height; i++)
80035a8: 69fb ldr r3, [r7, #28]
80035aa: 3301 adds r3, #1
80035ac: 61fb str r3, [r7, #28]
80035ae: 8a7b ldrh r3, [r7, #18]
80035b0: 69fa ldr r2, [r7, #28]
80035b2: 429a cmp r2, r3
80035b4: d384 bcc.n 80034c0 <DrawChar+0x68>
}
}
80035b6: bf00 nop
80035b8: 3720 adds r7, #32
80035ba: 46bd mov sp, r7
80035bc: bd80 pop {r7, pc}
80035be: bf00 nop
80035c0: 20000408 .word 0x20000408
80035c4: 2000040c .word 0x2000040c
080035c8 <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)
{
80035c8: b580 push {r7, lr}
80035ca: b086 sub sp, #24
80035cc: af02 add r7, sp, #8
80035ce: 60f8 str r0, [r7, #12]
80035d0: 60b9 str r1, [r7, #8]
80035d2: 607a str r2, [r7, #4]
80035d4: 603b str r3, [r7, #0]
/* Register to memory mode with ARGB8888 as color Mode */
hDma2dHandler.Init.Mode = DMA2D_R2M;
80035d6: 4b1e ldr r3, [pc, #120] ; (8003650 <LL_FillBuffer+0x88>)
80035d8: f44f 3240 mov.w r2, #196608 ; 0x30000
80035dc: 605a str r2, [r3, #4]
if(hLtdcHandler.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)
80035de: 4b1d ldr r3, [pc, #116] ; (8003654 <LL_FillBuffer+0x8c>)
80035e0: 681b ldr r3, [r3, #0]
80035e2: 4a1d ldr r2, [pc, #116] ; (8003658 <LL_FillBuffer+0x90>)
80035e4: 2134 movs r1, #52 ; 0x34
80035e6: fb01 f303 mul.w r3, r1, r3
80035ea: 4413 add r3, r2
80035ec: 3348 adds r3, #72 ; 0x48
80035ee: 681b ldr r3, [r3, #0]
80035f0: 2b02 cmp r3, #2
80035f2: d103 bne.n 80035fc <LL_FillBuffer+0x34>
{ /* RGB565 format */
hDma2dHandler.Init.ColorMode = DMA2D_RGB565;
80035f4: 4b16 ldr r3, [pc, #88] ; (8003650 <LL_FillBuffer+0x88>)
80035f6: 2202 movs r2, #2
80035f8: 609a str r2, [r3, #8]
80035fa: e002 b.n 8003602 <LL_FillBuffer+0x3a>
}
else
{ /* ARGB8888 format */
hDma2dHandler.Init.ColorMode = DMA2D_ARGB8888;
80035fc: 4b14 ldr r3, [pc, #80] ; (8003650 <LL_FillBuffer+0x88>)
80035fe: 2200 movs r2, #0
8003600: 609a str r2, [r3, #8]
}
hDma2dHandler.Init.OutputOffset = OffLine;
8003602: 4a13 ldr r2, [pc, #76] ; (8003650 <LL_FillBuffer+0x88>)
8003604: 69bb ldr r3, [r7, #24]
8003606: 60d3 str r3, [r2, #12]
hDma2dHandler.Instance = DMA2D;
8003608: 4b11 ldr r3, [pc, #68] ; (8003650 <LL_FillBuffer+0x88>)
800360a: 4a14 ldr r2, [pc, #80] ; (800365c <LL_FillBuffer+0x94>)
800360c: 601a str r2, [r3, #0]
/* DMA2D Initialization */
if(HAL_DMA2D_Init(&hDma2dHandler) == HAL_OK)
800360e: 4810 ldr r0, [pc, #64] ; (8003650 <LL_FillBuffer+0x88>)
8003610: f002 fba2 bl 8005d58 <HAL_DMA2D_Init>
8003614: 4603 mov r3, r0
8003616: 2b00 cmp r3, #0
8003618: d115 bne.n 8003646 <LL_FillBuffer+0x7e>
{
if(HAL_DMA2D_ConfigLayer(&hDma2dHandler, LayerIndex) == HAL_OK)
800361a: 68f9 ldr r1, [r7, #12]
800361c: 480c ldr r0, [pc, #48] ; (8003650 <LL_FillBuffer+0x88>)
800361e: f002 fcf9 bl 8006014 <HAL_DMA2D_ConfigLayer>
8003622: 4603 mov r3, r0
8003624: 2b00 cmp r3, #0
8003626: d10e bne.n 8003646 <LL_FillBuffer+0x7e>
{
if (HAL_DMA2D_Start(&hDma2dHandler, ColorIndex, (uint32_t)pDst, xSize, ySize) == HAL_OK)
8003628: 68ba ldr r2, [r7, #8]
800362a: 683b ldr r3, [r7, #0]
800362c: 9300 str r3, [sp, #0]
800362e: 687b ldr r3, [r7, #4]
8003630: 69f9 ldr r1, [r7, #28]
8003632: 4807 ldr r0, [pc, #28] ; (8003650 <LL_FillBuffer+0x88>)
8003634: f002 fbda bl 8005dec <HAL_DMA2D_Start>
8003638: 4603 mov r3, r0
800363a: 2b00 cmp r3, #0
800363c: d103 bne.n 8003646 <LL_FillBuffer+0x7e>
{
/* Polling For DMA transfer */
HAL_DMA2D_PollForTransfer(&hDma2dHandler, 10);
800363e: 210a movs r1, #10
8003640: 4803 ldr r0, [pc, #12] ; (8003650 <LL_FillBuffer+0x88>)
8003642: f002 fbfe bl 8005e42 <HAL_DMA2D_PollForTransfer>
}
}
}
}
8003646: bf00 nop
8003648: 3710 adds r7, #16
800364a: 46bd mov sp, r7
800364c: bd80 pop {r7, pc}
800364e: bf00 nop
8003650: 200003c8 .word 0x200003c8
8003654: 20000408 .word 0x20000408
8003658: 20008e5c .word 0x20008e5c
800365c: 4002b000 .word 0x4002b000
08003660 <BSP_SDRAM_Init>:
/**
* @brief Initializes the SDRAM device.
* @retval SDRAM status
*/
uint8_t BSP_SDRAM_Init(void)
{
8003660: b580 push {r7, lr}
8003662: af00 add r7, sp, #0
static uint8_t sdramstatus = SDRAM_ERROR;
/* SDRAM device configuration */
sdramHandle.Instance = FMC_SDRAM_DEVICE;
8003664: 4b29 ldr r3, [pc, #164] ; (800370c <BSP_SDRAM_Init+0xac>)
8003666: 4a2a ldr r2, [pc, #168] ; (8003710 <BSP_SDRAM_Init+0xb0>)
8003668: 601a str r2, [r3, #0]
/* Timing configuration for 100Mhz as SD clock frequency (System clock is up to 200Mhz) */
Timing.LoadToActiveDelay = 2;
800366a: 4b2a ldr r3, [pc, #168] ; (8003714 <BSP_SDRAM_Init+0xb4>)
800366c: 2202 movs r2, #2
800366e: 601a str r2, [r3, #0]
Timing.ExitSelfRefreshDelay = 7;
8003670: 4b28 ldr r3, [pc, #160] ; (8003714 <BSP_SDRAM_Init+0xb4>)
8003672: 2207 movs r2, #7
8003674: 605a str r2, [r3, #4]
Timing.SelfRefreshTime = 4;
8003676: 4b27 ldr r3, [pc, #156] ; (8003714 <BSP_SDRAM_Init+0xb4>)
8003678: 2204 movs r2, #4
800367a: 609a str r2, [r3, #8]
Timing.RowCycleDelay = 7;
800367c: 4b25 ldr r3, [pc, #148] ; (8003714 <BSP_SDRAM_Init+0xb4>)
800367e: 2207 movs r2, #7
8003680: 60da str r2, [r3, #12]
Timing.WriteRecoveryTime = 2;
8003682: 4b24 ldr r3, [pc, #144] ; (8003714 <BSP_SDRAM_Init+0xb4>)
8003684: 2202 movs r2, #2
8003686: 611a str r2, [r3, #16]
Timing.RPDelay = 2;
8003688: 4b22 ldr r3, [pc, #136] ; (8003714 <BSP_SDRAM_Init+0xb4>)
800368a: 2202 movs r2, #2
800368c: 615a str r2, [r3, #20]
Timing.RCDDelay = 2;
800368e: 4b21 ldr r3, [pc, #132] ; (8003714 <BSP_SDRAM_Init+0xb4>)
8003690: 2202 movs r2, #2
8003692: 619a str r2, [r3, #24]
sdramHandle.Init.SDBank = FMC_SDRAM_BANK1;
8003694: 4b1d ldr r3, [pc, #116] ; (800370c <BSP_SDRAM_Init+0xac>)
8003696: 2200 movs r2, #0
8003698: 605a str r2, [r3, #4]
sdramHandle.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;
800369a: 4b1c ldr r3, [pc, #112] ; (800370c <BSP_SDRAM_Init+0xac>)
800369c: 2200 movs r2, #0
800369e: 609a str r2, [r3, #8]
sdramHandle.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
80036a0: 4b1a ldr r3, [pc, #104] ; (800370c <BSP_SDRAM_Init+0xac>)
80036a2: 2204 movs r2, #4
80036a4: 60da str r2, [r3, #12]
sdramHandle.Init.MemoryDataWidth = SDRAM_MEMORY_WIDTH;
80036a6: 4b19 ldr r3, [pc, #100] ; (800370c <BSP_SDRAM_Init+0xac>)
80036a8: 2210 movs r2, #16
80036aa: 611a str r2, [r3, #16]
sdramHandle.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
80036ac: 4b17 ldr r3, [pc, #92] ; (800370c <BSP_SDRAM_Init+0xac>)
80036ae: 2240 movs r2, #64 ; 0x40
80036b0: 615a str r2, [r3, #20]
sdramHandle.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_2;
80036b2: 4b16 ldr r3, [pc, #88] ; (800370c <BSP_SDRAM_Init+0xac>)
80036b4: f44f 7280 mov.w r2, #256 ; 0x100
80036b8: 619a str r2, [r3, #24]
sdramHandle.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
80036ba: 4b14 ldr r3, [pc, #80] ; (800370c <BSP_SDRAM_Init+0xac>)
80036bc: 2200 movs r2, #0
80036be: 61da str r2, [r3, #28]
sdramHandle.Init.SDClockPeriod = SDCLOCK_PERIOD;
80036c0: 4b12 ldr r3, [pc, #72] ; (800370c <BSP_SDRAM_Init+0xac>)
80036c2: f44f 6200 mov.w r2, #2048 ; 0x800
80036c6: 621a str r2, [r3, #32]
sdramHandle.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE;
80036c8: 4b10 ldr r3, [pc, #64] ; (800370c <BSP_SDRAM_Init+0xac>)
80036ca: f44f 5280 mov.w r2, #4096 ; 0x1000
80036ce: 625a str r2, [r3, #36] ; 0x24
sdramHandle.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0;
80036d0: 4b0e ldr r3, [pc, #56] ; (800370c <BSP_SDRAM_Init+0xac>)
80036d2: 2200 movs r2, #0
80036d4: 629a str r2, [r3, #40] ; 0x28
/* SDRAM controller initialization */
BSP_SDRAM_MspInit(&sdramHandle, NULL); /* __weak function can be rewritten by the application */
80036d6: 2100 movs r1, #0
80036d8: 480c ldr r0, [pc, #48] ; (800370c <BSP_SDRAM_Init+0xac>)
80036da: f000 f87f bl 80037dc <BSP_SDRAM_MspInit>
if(HAL_SDRAM_Init(&sdramHandle, &Timing) != HAL_OK)
80036de: 490d ldr r1, [pc, #52] ; (8003714 <BSP_SDRAM_Init+0xb4>)
80036e0: 480a ldr r0, [pc, #40] ; (800370c <BSP_SDRAM_Init+0xac>)
80036e2: f007 f83b bl 800a75c <HAL_SDRAM_Init>
80036e6: 4603 mov r3, r0
80036e8: 2b00 cmp r3, #0
80036ea: d003 beq.n 80036f4 <BSP_SDRAM_Init+0x94>
{
sdramstatus = SDRAM_ERROR;
80036ec: 4b0a ldr r3, [pc, #40] ; (8003718 <BSP_SDRAM_Init+0xb8>)
80036ee: 2201 movs r2, #1
80036f0: 701a strb r2, [r3, #0]
80036f2: e002 b.n 80036fa <BSP_SDRAM_Init+0x9a>
}
else
{
sdramstatus = SDRAM_OK;
80036f4: 4b08 ldr r3, [pc, #32] ; (8003718 <BSP_SDRAM_Init+0xb8>)
80036f6: 2200 movs r2, #0
80036f8: 701a strb r2, [r3, #0]
}
/* SDRAM initialization sequence */
BSP_SDRAM_Initialization_sequence(REFRESH_COUNT);
80036fa: f240 6003 movw r0, #1539 ; 0x603
80036fe: f000 f80d bl 800371c <BSP_SDRAM_Initialization_sequence>
return sdramstatus;
8003702: 4b05 ldr r3, [pc, #20] ; (8003718 <BSP_SDRAM_Init+0xb8>)
8003704: 781b ldrb r3, [r3, #0]
}
8003706: 4618 mov r0, r3
8003708: bd80 pop {r7, pc}
800370a: bf00 nop
800370c: 20008f04 .word 0x20008f04
8003710: a0000140 .word 0xa0000140
8003714: 200004a8 .word 0x200004a8
8003718: 2000004c .word 0x2000004c
0800371c <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)
{
800371c: b580 push {r7, lr}
800371e: b084 sub sp, #16
8003720: af00 add r7, sp, #0
8003722: 6078 str r0, [r7, #4]
__IO uint32_t tmpmrd = 0;
8003724: 2300 movs r3, #0
8003726: 60fb str r3, [r7, #12]
/* Step 1: Configure a clock configuration enable command */
Command.CommandMode = FMC_SDRAM_CMD_CLK_ENABLE;
8003728: 4b2a ldr r3, [pc, #168] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
800372a: 2201 movs r2, #1
800372c: 601a str r2, [r3, #0]
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
800372e: 4b29 ldr r3, [pc, #164] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003730: 2210 movs r2, #16
8003732: 605a str r2, [r3, #4]
Command.AutoRefreshNumber = 1;
8003734: 4b27 ldr r3, [pc, #156] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003736: 2201 movs r2, #1
8003738: 609a str r2, [r3, #8]
Command.ModeRegisterDefinition = 0;
800373a: 4b26 ldr r3, [pc, #152] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
800373c: 2200 movs r2, #0
800373e: 60da str r2, [r3, #12]
/* Send the command */
HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT);
8003740: f64f 72ff movw r2, #65535 ; 0xffff
8003744: 4923 ldr r1, [pc, #140] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003746: 4824 ldr r0, [pc, #144] ; (80037d8 <BSP_SDRAM_Initialization_sequence+0xbc>)
8003748: f007 f83c bl 800a7c4 <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);
800374c: 2001 movs r0, #1
800374e: f001 fab1 bl 8004cb4 <HAL_Delay>
/* Step 3: Configure a PALL (precharge all) command */
Command.CommandMode = FMC_SDRAM_CMD_PALL;
8003752: 4b20 ldr r3, [pc, #128] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003754: 2202 movs r2, #2
8003756: 601a str r2, [r3, #0]
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
8003758: 4b1e ldr r3, [pc, #120] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
800375a: 2210 movs r2, #16
800375c: 605a str r2, [r3, #4]
Command.AutoRefreshNumber = 1;
800375e: 4b1d ldr r3, [pc, #116] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003760: 2201 movs r2, #1
8003762: 609a str r2, [r3, #8]
Command.ModeRegisterDefinition = 0;
8003764: 4b1b ldr r3, [pc, #108] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003766: 2200 movs r2, #0
8003768: 60da str r2, [r3, #12]
/* Send the command */
HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT);
800376a: f64f 72ff movw r2, #65535 ; 0xffff
800376e: 4919 ldr r1, [pc, #100] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003770: 4819 ldr r0, [pc, #100] ; (80037d8 <BSP_SDRAM_Initialization_sequence+0xbc>)
8003772: f007 f827 bl 800a7c4 <HAL_SDRAM_SendCommand>
/* Step 4: Configure an Auto Refresh command */
Command.CommandMode = FMC_SDRAM_CMD_AUTOREFRESH_MODE;
8003776: 4b17 ldr r3, [pc, #92] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003778: 2203 movs r2, #3
800377a: 601a str r2, [r3, #0]
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
800377c: 4b15 ldr r3, [pc, #84] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
800377e: 2210 movs r2, #16
8003780: 605a str r2, [r3, #4]
Command.AutoRefreshNumber = 8;
8003782: 4b14 ldr r3, [pc, #80] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003784: 2208 movs r2, #8
8003786: 609a str r2, [r3, #8]
Command.ModeRegisterDefinition = 0;
8003788: 4b12 ldr r3, [pc, #72] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
800378a: 2200 movs r2, #0
800378c: 60da str r2, [r3, #12]
/* Send the command */
HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT);
800378e: f64f 72ff movw r2, #65535 ; 0xffff
8003792: 4910 ldr r1, [pc, #64] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
8003794: 4810 ldr r0, [pc, #64] ; (80037d8 <BSP_SDRAM_Initialization_sequence+0xbc>)
8003796: f007 f815 bl 800a7c4 <HAL_SDRAM_SendCommand>
/* Step 5: Program the external memory mode register */
tmpmrd = (uint32_t)SDRAM_MODEREG_BURST_LENGTH_1 |\
800379a: f44f 7308 mov.w r3, #544 ; 0x220
800379e: 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;
80037a0: 4b0c ldr r3, [pc, #48] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
80037a2: 2204 movs r2, #4
80037a4: 601a str r2, [r3, #0]
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
80037a6: 4b0b ldr r3, [pc, #44] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
80037a8: 2210 movs r2, #16
80037aa: 605a str r2, [r3, #4]
Command.AutoRefreshNumber = 1;
80037ac: 4b09 ldr r3, [pc, #36] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
80037ae: 2201 movs r2, #1
80037b0: 609a str r2, [r3, #8]
Command.ModeRegisterDefinition = tmpmrd;
80037b2: 68fb ldr r3, [r7, #12]
80037b4: 4a07 ldr r2, [pc, #28] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
80037b6: 60d3 str r3, [r2, #12]
/* Send the command */
HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT);
80037b8: f64f 72ff movw r2, #65535 ; 0xffff
80037bc: 4905 ldr r1, [pc, #20] ; (80037d4 <BSP_SDRAM_Initialization_sequence+0xb8>)
80037be: 4806 ldr r0, [pc, #24] ; (80037d8 <BSP_SDRAM_Initialization_sequence+0xbc>)
80037c0: f007 f800 bl 800a7c4 <HAL_SDRAM_SendCommand>
/* Step 6: Set the refresh rate counter */
/* Set the device refresh rate */
HAL_SDRAM_ProgramRefreshRate(&sdramHandle, RefreshCount);
80037c4: 6879 ldr r1, [r7, #4]
80037c6: 4804 ldr r0, [pc, #16] ; (80037d8 <BSP_SDRAM_Initialization_sequence+0xbc>)
80037c8: f007 f827 bl 800a81a <HAL_SDRAM_ProgramRefreshRate>
}
80037cc: bf00 nop
80037ce: 3710 adds r7, #16
80037d0: 46bd mov sp, r7
80037d2: bd80 pop {r7, pc}
80037d4: 200004c4 .word 0x200004c4
80037d8: 20008f04 .word 0x20008f04
080037dc <BSP_SDRAM_MspInit>:
* @param hsdram: SDRAM handle
* @param Params
* @retval None
*/
__weak void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params)
{
80037dc: b580 push {r7, lr}
80037de: b090 sub sp, #64 ; 0x40
80037e0: af00 add r7, sp, #0
80037e2: 6078 str r0, [r7, #4]
80037e4: 6039 str r1, [r7, #0]
static DMA_HandleTypeDef dma_handle;
GPIO_InitTypeDef gpio_init_structure;
/* Enable FMC clock */
__HAL_RCC_FMC_CLK_ENABLE();
80037e6: 4b70 ldr r3, [pc, #448] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
80037e8: 6b9b ldr r3, [r3, #56] ; 0x38
80037ea: 4a6f ldr r2, [pc, #444] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
80037ec: f043 0301 orr.w r3, r3, #1
80037f0: 6393 str r3, [r2, #56] ; 0x38
80037f2: 4b6d ldr r3, [pc, #436] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
80037f4: 6b9b ldr r3, [r3, #56] ; 0x38
80037f6: f003 0301 and.w r3, r3, #1
80037fa: 62bb str r3, [r7, #40] ; 0x28
80037fc: 6abb ldr r3, [r7, #40] ; 0x28
/* Enable chosen DMAx clock */
__DMAx_CLK_ENABLE();
80037fe: 4b6a ldr r3, [pc, #424] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003800: 6b1b ldr r3, [r3, #48] ; 0x30
8003802: 4a69 ldr r2, [pc, #420] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003804: f443 0380 orr.w r3, r3, #4194304 ; 0x400000
8003808: 6313 str r3, [r2, #48] ; 0x30
800380a: 4b67 ldr r3, [pc, #412] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
800380c: 6b1b ldr r3, [r3, #48] ; 0x30
800380e: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8003812: 627b str r3, [r7, #36] ; 0x24
8003814: 6a7b ldr r3, [r7, #36] ; 0x24
/* Enable GPIOs clock */
__HAL_RCC_GPIOC_CLK_ENABLE();
8003816: 4b64 ldr r3, [pc, #400] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003818: 6b1b ldr r3, [r3, #48] ; 0x30
800381a: 4a63 ldr r2, [pc, #396] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
800381c: f043 0304 orr.w r3, r3, #4
8003820: 6313 str r3, [r2, #48] ; 0x30
8003822: 4b61 ldr r3, [pc, #388] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003824: 6b1b ldr r3, [r3, #48] ; 0x30
8003826: f003 0304 and.w r3, r3, #4
800382a: 623b str r3, [r7, #32]
800382c: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOD_CLK_ENABLE();
800382e: 4b5e ldr r3, [pc, #376] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003830: 6b1b ldr r3, [r3, #48] ; 0x30
8003832: 4a5d ldr r2, [pc, #372] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003834: f043 0308 orr.w r3, r3, #8
8003838: 6313 str r3, [r2, #48] ; 0x30
800383a: 4b5b ldr r3, [pc, #364] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
800383c: 6b1b ldr r3, [r3, #48] ; 0x30
800383e: f003 0308 and.w r3, r3, #8
8003842: 61fb str r3, [r7, #28]
8003844: 69fb ldr r3, [r7, #28]
__HAL_RCC_GPIOE_CLK_ENABLE();
8003846: 4b58 ldr r3, [pc, #352] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003848: 6b1b ldr r3, [r3, #48] ; 0x30
800384a: 4a57 ldr r2, [pc, #348] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
800384c: f043 0310 orr.w r3, r3, #16
8003850: 6313 str r3, [r2, #48] ; 0x30
8003852: 4b55 ldr r3, [pc, #340] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003854: 6b1b ldr r3, [r3, #48] ; 0x30
8003856: f003 0310 and.w r3, r3, #16
800385a: 61bb str r3, [r7, #24]
800385c: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOF_CLK_ENABLE();
800385e: 4b52 ldr r3, [pc, #328] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003860: 6b1b ldr r3, [r3, #48] ; 0x30
8003862: 4a51 ldr r2, [pc, #324] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003864: f043 0320 orr.w r3, r3, #32
8003868: 6313 str r3, [r2, #48] ; 0x30
800386a: 4b4f ldr r3, [pc, #316] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
800386c: 6b1b ldr r3, [r3, #48] ; 0x30
800386e: f003 0320 and.w r3, r3, #32
8003872: 617b str r3, [r7, #20]
8003874: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOG_CLK_ENABLE();
8003876: 4b4c ldr r3, [pc, #304] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003878: 6b1b ldr r3, [r3, #48] ; 0x30
800387a: 4a4b ldr r2, [pc, #300] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
800387c: f043 0340 orr.w r3, r3, #64 ; 0x40
8003880: 6313 str r3, [r2, #48] ; 0x30
8003882: 4b49 ldr r3, [pc, #292] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003884: 6b1b ldr r3, [r3, #48] ; 0x30
8003886: f003 0340 and.w r3, r3, #64 ; 0x40
800388a: 613b str r3, [r7, #16]
800388c: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOH_CLK_ENABLE();
800388e: 4b46 ldr r3, [pc, #280] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003890: 6b1b ldr r3, [r3, #48] ; 0x30
8003892: 4a45 ldr r2, [pc, #276] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
8003894: f043 0380 orr.w r3, r3, #128 ; 0x80
8003898: 6313 str r3, [r2, #48] ; 0x30
800389a: 4b43 ldr r3, [pc, #268] ; (80039a8 <BSP_SDRAM_MspInit+0x1cc>)
800389c: 6b1b ldr r3, [r3, #48] ; 0x30
800389e: f003 0380 and.w r3, r3, #128 ; 0x80
80038a2: 60fb str r3, [r7, #12]
80038a4: 68fb ldr r3, [r7, #12]
/* Common GPIO configuration */
gpio_init_structure.Mode = GPIO_MODE_AF_PP;
80038a6: 2302 movs r3, #2
80038a8: 633b str r3, [r7, #48] ; 0x30
gpio_init_structure.Pull = GPIO_PULLUP;
80038aa: 2301 movs r3, #1
80038ac: 637b str r3, [r7, #52] ; 0x34
gpio_init_structure.Speed = GPIO_SPEED_FAST;
80038ae: 2302 movs r3, #2
80038b0: 63bb str r3, [r7, #56] ; 0x38
gpio_init_structure.Alternate = GPIO_AF12_FMC;
80038b2: 230c movs r3, #12
80038b4: 63fb str r3, [r7, #60] ; 0x3c
/* GPIOC configuration */
gpio_init_structure.Pin = GPIO_PIN_3;
80038b6: 2308 movs r3, #8
80038b8: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(GPIOC, &gpio_init_structure);
80038ba: f107 032c add.w r3, r7, #44 ; 0x2c
80038be: 4619 mov r1, r3
80038c0: 483a ldr r0, [pc, #232] ; (80039ac <BSP_SDRAM_MspInit+0x1d0>)
80038c2: f003 fe5b bl 800757c <HAL_GPIO_Init>
/* GPIOD configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_8 | GPIO_PIN_9 |
80038c6: f24c 7303 movw r3, #50947 ; 0xc703
80038ca: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_10 | GPIO_PIN_14 | GPIO_PIN_15;
HAL_GPIO_Init(GPIOD, &gpio_init_structure);
80038cc: f107 032c add.w r3, r7, #44 ; 0x2c
80038d0: 4619 mov r1, r3
80038d2: 4837 ldr r0, [pc, #220] ; (80039b0 <BSP_SDRAM_MspInit+0x1d4>)
80038d4: f003 fe52 bl 800757c <HAL_GPIO_Init>
/* GPIOE configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_7| GPIO_PIN_8 | GPIO_PIN_9 |\
80038d8: f64f 7383 movw r3, #65411 ; 0xff83
80038dc: 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);
80038de: f107 032c add.w r3, r7, #44 ; 0x2c
80038e2: 4619 mov r1, r3
80038e4: 4833 ldr r0, [pc, #204] ; (80039b4 <BSP_SDRAM_MspInit+0x1d8>)
80038e6: f003 fe49 bl 800757c <HAL_GPIO_Init>
/* GPIOF configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\
80038ea: f64f 033f movw r3, #63551 ; 0xf83f
80038ee: 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);
80038f0: f107 032c add.w r3, r7, #44 ; 0x2c
80038f4: 4619 mov r1, r3
80038f6: 4830 ldr r0, [pc, #192] ; (80039b8 <BSP_SDRAM_MspInit+0x1dc>)
80038f8: f003 fe40 bl 800757c <HAL_GPIO_Init>
/* GPIOG configuration */
gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4| GPIO_PIN_5 | GPIO_PIN_8 |\
80038fc: f248 1333 movw r3, #33075 ; 0x8133
8003900: 62fb str r3, [r7, #44] ; 0x2c
GPIO_PIN_15;
HAL_GPIO_Init(GPIOG, &gpio_init_structure);
8003902: f107 032c add.w r3, r7, #44 ; 0x2c
8003906: 4619 mov r1, r3
8003908: 482c ldr r0, [pc, #176] ; (80039bc <BSP_SDRAM_MspInit+0x1e0>)
800390a: f003 fe37 bl 800757c <HAL_GPIO_Init>
/* GPIOH configuration */
gpio_init_structure.Pin = GPIO_PIN_3 | GPIO_PIN_5;
800390e: 2328 movs r3, #40 ; 0x28
8003910: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(GPIOH, &gpio_init_structure);
8003912: f107 032c add.w r3, r7, #44 ; 0x2c
8003916: 4619 mov r1, r3
8003918: 4829 ldr r0, [pc, #164] ; (80039c0 <BSP_SDRAM_MspInit+0x1e4>)
800391a: f003 fe2f bl 800757c <HAL_GPIO_Init>
/* Configure common DMA parameters */
dma_handle.Init.Channel = SDRAM_DMAx_CHANNEL;
800391e: 4b29 ldr r3, [pc, #164] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003920: 2200 movs r2, #0
8003922: 605a str r2, [r3, #4]
dma_handle.Init.Direction = DMA_MEMORY_TO_MEMORY;
8003924: 4b27 ldr r3, [pc, #156] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003926: 2280 movs r2, #128 ; 0x80
8003928: 609a str r2, [r3, #8]
dma_handle.Init.PeriphInc = DMA_PINC_ENABLE;
800392a: 4b26 ldr r3, [pc, #152] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
800392c: f44f 7200 mov.w r2, #512 ; 0x200
8003930: 60da str r2, [r3, #12]
dma_handle.Init.MemInc = DMA_MINC_ENABLE;
8003932: 4b24 ldr r3, [pc, #144] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003934: f44f 6280 mov.w r2, #1024 ; 0x400
8003938: 611a str r2, [r3, #16]
dma_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
800393a: 4b22 ldr r3, [pc, #136] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
800393c: f44f 5280 mov.w r2, #4096 ; 0x1000
8003940: 615a str r2, [r3, #20]
dma_handle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
8003942: 4b20 ldr r3, [pc, #128] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003944: f44f 4280 mov.w r2, #16384 ; 0x4000
8003948: 619a str r2, [r3, #24]
dma_handle.Init.Mode = DMA_NORMAL;
800394a: 4b1e ldr r3, [pc, #120] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
800394c: 2200 movs r2, #0
800394e: 61da str r2, [r3, #28]
dma_handle.Init.Priority = DMA_PRIORITY_HIGH;
8003950: 4b1c ldr r3, [pc, #112] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003952: f44f 3200 mov.w r2, #131072 ; 0x20000
8003956: 621a str r2, [r3, #32]
dma_handle.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
8003958: 4b1a ldr r3, [pc, #104] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
800395a: 2200 movs r2, #0
800395c: 625a str r2, [r3, #36] ; 0x24
dma_handle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
800395e: 4b19 ldr r3, [pc, #100] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003960: 2203 movs r2, #3
8003962: 629a str r2, [r3, #40] ; 0x28
dma_handle.Init.MemBurst = DMA_MBURST_SINGLE;
8003964: 4b17 ldr r3, [pc, #92] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003966: 2200 movs r2, #0
8003968: 62da str r2, [r3, #44] ; 0x2c
dma_handle.Init.PeriphBurst = DMA_PBURST_SINGLE;
800396a: 4b16 ldr r3, [pc, #88] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
800396c: 2200 movs r2, #0
800396e: 631a str r2, [r3, #48] ; 0x30
dma_handle.Instance = SDRAM_DMAx_STREAM;
8003970: 4b14 ldr r3, [pc, #80] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003972: 4a15 ldr r2, [pc, #84] ; (80039c8 <BSP_SDRAM_MspInit+0x1ec>)
8003974: 601a str r2, [r3, #0]
/* Associate the DMA handle */
__HAL_LINKDMA(hsdram, hdma, dma_handle);
8003976: 687b ldr r3, [r7, #4]
8003978: 4a12 ldr r2, [pc, #72] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
800397a: 631a str r2, [r3, #48] ; 0x30
800397c: 4a11 ldr r2, [pc, #68] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
800397e: 687b ldr r3, [r7, #4]
8003980: 6393 str r3, [r2, #56] ; 0x38
/* Deinitialize the stream for new transfer */
HAL_DMA_DeInit(&dma_handle);
8003982: 4810 ldr r0, [pc, #64] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
8003984: f002 f8da bl 8005b3c <HAL_DMA_DeInit>
/* Configure the DMA stream */
HAL_DMA_Init(&dma_handle);
8003988: 480e ldr r0, [pc, #56] ; (80039c4 <BSP_SDRAM_MspInit+0x1e8>)
800398a: f002 f829 bl 80059e0 <HAL_DMA_Init>
/* NVIC configuration for DMA transfer complete interrupt */
HAL_NVIC_SetPriority(SDRAM_DMAx_IRQn, 0x0F, 0);
800398e: 2200 movs r2, #0
8003990: 210f movs r1, #15
8003992: 2038 movs r0, #56 ; 0x38
8003994: f001 fe42 bl 800561c <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(SDRAM_DMAx_IRQn);
8003998: 2038 movs r0, #56 ; 0x38
800399a: f001 fe5b bl 8005654 <HAL_NVIC_EnableIRQ>
}
800399e: bf00 nop
80039a0: 3740 adds r7, #64 ; 0x40
80039a2: 46bd mov sp, r7
80039a4: bd80 pop {r7, pc}
80039a6: bf00 nop
80039a8: 40023800 .word 0x40023800
80039ac: 40020800 .word 0x40020800
80039b0: 40020c00 .word 0x40020c00
80039b4: 40021000 .word 0x40021000
80039b8: 40021400 .word 0x40021400
80039bc: 40021800 .word 0x40021800
80039c0: 40021c00 .word 0x40021c00
80039c4: 200004d4 .word 0x200004d4
80039c8: 40026410 .word 0x40026410
080039cc <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)
{
80039cc: b580 push {r7, lr}
80039ce: b084 sub sp, #16
80039d0: af00 add r7, sp, #0
80039d2: 4603 mov r3, r0
80039d4: 460a mov r2, r1
80039d6: 80fb strh r3, [r7, #6]
80039d8: 4613 mov r3, r2
80039da: 80bb strh r3, [r7, #4]
uint8_t status = TS_OK;
80039dc: 2300 movs r3, #0
80039de: 73fb strb r3, [r7, #15]
tsXBoundary = ts_SizeX;
80039e0: 4a14 ldr r2, [pc, #80] ; (8003a34 <BSP_TS_Init+0x68>)
80039e2: 88fb ldrh r3, [r7, #6]
80039e4: 8013 strh r3, [r2, #0]
tsYBoundary = ts_SizeY;
80039e6: 4a14 ldr r2, [pc, #80] ; (8003a38 <BSP_TS_Init+0x6c>)
80039e8: 88bb ldrh r3, [r7, #4]
80039ea: 8013 strh r3, [r2, #0]
/* Read ID and verify if the touch screen driver is ready */
ft5336_ts_drv.Init(TS_I2C_ADDRESS);
80039ec: 4b13 ldr r3, [pc, #76] ; (8003a3c <BSP_TS_Init+0x70>)
80039ee: 681b ldr r3, [r3, #0]
80039f0: 2070 movs r0, #112 ; 0x70
80039f2: 4798 blx r3
if(ft5336_ts_drv.ReadID(TS_I2C_ADDRESS) == FT5336_ID_VALUE)
80039f4: 4b11 ldr r3, [pc, #68] ; (8003a3c <BSP_TS_Init+0x70>)
80039f6: 685b ldr r3, [r3, #4]
80039f8: 2070 movs r0, #112 ; 0x70
80039fa: 4798 blx r3
80039fc: 4603 mov r3, r0
80039fe: 2b51 cmp r3, #81 ; 0x51
8003a00: d111 bne.n 8003a26 <BSP_TS_Init+0x5a>
{
/* Initialize the TS driver structure */
tsDriver = &ft5336_ts_drv;
8003a02: 4b0f ldr r3, [pc, #60] ; (8003a40 <BSP_TS_Init+0x74>)
8003a04: 4a0d ldr r2, [pc, #52] ; (8003a3c <BSP_TS_Init+0x70>)
8003a06: 601a str r2, [r3, #0]
I2cAddress = TS_I2C_ADDRESS;
8003a08: 4b0e ldr r3, [pc, #56] ; (8003a44 <BSP_TS_Init+0x78>)
8003a0a: 2270 movs r2, #112 ; 0x70
8003a0c: 701a strb r2, [r3, #0]
tsOrientation = TS_SWAP_XY;
8003a0e: 4b0e ldr r3, [pc, #56] ; (8003a48 <BSP_TS_Init+0x7c>)
8003a10: 2208 movs r2, #8
8003a12: 701a strb r2, [r3, #0]
/* Initialize the TS driver */
tsDriver->Start(I2cAddress);
8003a14: 4b0a ldr r3, [pc, #40] ; (8003a40 <BSP_TS_Init+0x74>)
8003a16: 681b ldr r3, [r3, #0]
8003a18: 68db ldr r3, [r3, #12]
8003a1a: 4a0a ldr r2, [pc, #40] ; (8003a44 <BSP_TS_Init+0x78>)
8003a1c: 7812 ldrb r2, [r2, #0]
8003a1e: b292 uxth r2, r2
8003a20: 4610 mov r0, r2
8003a22: 4798 blx r3
8003a24: e001 b.n 8003a2a <BSP_TS_Init+0x5e>
}
else
{
status = TS_DEVICE_NOT_FOUND;
8003a26: 2303 movs r3, #3
8003a28: 73fb strb r3, [r7, #15]
}
return status;
8003a2a: 7bfb ldrb r3, [r7, #15]
}
8003a2c: 4618 mov r0, r3
8003a2e: 3710 adds r7, #16
8003a30: 46bd mov sp, r7
8003a32: bd80 pop {r7, pc}
8003a34: 20000538 .word 0x20000538
8003a38: 2000053a .word 0x2000053a
8003a3c: 20000000 .word 0x20000000
8003a40: 20000534 .word 0x20000534
8003a44: 2000053d .word 0x2000053d
8003a48: 2000053c .word 0x2000053c
08003a4c <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)
{
8003a4c: b590 push {r4, r7, lr}
8003a4e: b097 sub sp, #92 ; 0x5c
8003a50: af02 add r7, sp, #8
8003a52: 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;
8003a54: 2300 movs r3, #0
8003a56: 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;
8003a5a: 2300 movs r3, #0
8003a5c: 613b str r3, [r7, #16]
uint32_t area = 0;
8003a5e: 2300 movs r3, #0
8003a60: 60fb str r3, [r7, #12]
uint32_t event = 0;
8003a62: 2300 movs r3, #0
8003a64: 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);
8003a66: 4b97 ldr r3, [pc, #604] ; (8003cc4 <BSP_TS_GetState+0x278>)
8003a68: 681b ldr r3, [r3, #0]
8003a6a: 691b ldr r3, [r3, #16]
8003a6c: 4a96 ldr r2, [pc, #600] ; (8003cc8 <BSP_TS_GetState+0x27c>)
8003a6e: 7812 ldrb r2, [r2, #0]
8003a70: b292 uxth r2, r2
8003a72: 4610 mov r0, r2
8003a74: 4798 blx r3
8003a76: 4603 mov r3, r0
8003a78: 461a mov r2, r3
8003a7a: 687b ldr r3, [r7, #4]
8003a7c: 701a strb r2, [r3, #0]
if(TS_State->touchDetected)
8003a7e: 687b ldr r3, [r7, #4]
8003a80: 781b ldrb r3, [r3, #0]
8003a82: 2b00 cmp r3, #0
8003a84: f000 81a8 beq.w 8003dd8 <BSP_TS_GetState+0x38c>
{
for(index=0; index < TS_State->touchDetected; index++)
8003a88: 2300 movs r3, #0
8003a8a: 64bb str r3, [r7, #72] ; 0x48
8003a8c: e197 b.n 8003dbe <BSP_TS_GetState+0x372>
{
/* Get each touch coordinates */
tsDriver->GetXY(I2cAddress, &(brute_x[index]), &(brute_y[index]));
8003a8e: 4b8d ldr r3, [pc, #564] ; (8003cc4 <BSP_TS_GetState+0x278>)
8003a90: 681b ldr r3, [r3, #0]
8003a92: 695b ldr r3, [r3, #20]
8003a94: 4a8c ldr r2, [pc, #560] ; (8003cc8 <BSP_TS_GetState+0x27c>)
8003a96: 7812 ldrb r2, [r2, #0]
8003a98: b290 uxth r0, r2
8003a9a: f107 0120 add.w r1, r7, #32
8003a9e: 6cba ldr r2, [r7, #72] ; 0x48
8003aa0: 0052 lsls r2, r2, #1
8003aa2: 188c adds r4, r1, r2
8003aa4: f107 0114 add.w r1, r7, #20
8003aa8: 6cba ldr r2, [r7, #72] ; 0x48
8003aaa: 0052 lsls r2, r2, #1
8003aac: 440a add r2, r1
8003aae: 4621 mov r1, r4
8003ab0: 4798 blx r3
if(tsOrientation == TS_SWAP_NONE)
8003ab2: 4b86 ldr r3, [pc, #536] ; (8003ccc <BSP_TS_GetState+0x280>)
8003ab4: 781b ldrb r3, [r3, #0]
8003ab6: 2b01 cmp r3, #1
8003ab8: d11b bne.n 8003af2 <BSP_TS_GetState+0xa6>
{
x[index] = brute_x[index];
8003aba: 6cbb ldr r3, [r7, #72] ; 0x48
8003abc: 005b lsls r3, r3, #1
8003abe: f107 0250 add.w r2, r7, #80 ; 0x50
8003ac2: 4413 add r3, r2
8003ac4: f833 2c30 ldrh.w r2, [r3, #-48]
8003ac8: 6cbb ldr r3, [r7, #72] ; 0x48
8003aca: 005b lsls r3, r3, #1
8003acc: f107 0150 add.w r1, r7, #80 ; 0x50
8003ad0: 440b add r3, r1
8003ad2: f823 2c18 strh.w r2, [r3, #-24]
y[index] = brute_y[index];
8003ad6: 6cbb ldr r3, [r7, #72] ; 0x48
8003ad8: 005b lsls r3, r3, #1
8003ada: f107 0250 add.w r2, r7, #80 ; 0x50
8003ade: 4413 add r3, r2
8003ae0: f833 2c3c ldrh.w r2, [r3, #-60]
8003ae4: 6cbb ldr r3, [r7, #72] ; 0x48
8003ae6: 005b lsls r3, r3, #1
8003ae8: f107 0150 add.w r1, r7, #80 ; 0x50
8003aec: 440b add r3, r1
8003aee: f823 2c24 strh.w r2, [r3, #-36]
}
if(tsOrientation & TS_SWAP_X)
8003af2: 4b76 ldr r3, [pc, #472] ; (8003ccc <BSP_TS_GetState+0x280>)
8003af4: 781b ldrb r3, [r3, #0]
8003af6: f003 0302 and.w r3, r3, #2
8003afa: 2b00 cmp r3, #0
8003afc: d010 beq.n 8003b20 <BSP_TS_GetState+0xd4>
{
x[index] = 4096 - brute_x[index];
8003afe: 6cbb ldr r3, [r7, #72] ; 0x48
8003b00: 005b lsls r3, r3, #1
8003b02: f107 0250 add.w r2, r7, #80 ; 0x50
8003b06: 4413 add r3, r2
8003b08: f833 3c30 ldrh.w r3, [r3, #-48]
8003b0c: f5c3 5380 rsb r3, r3, #4096 ; 0x1000
8003b10: b29a uxth r2, r3
8003b12: 6cbb ldr r3, [r7, #72] ; 0x48
8003b14: 005b lsls r3, r3, #1
8003b16: f107 0150 add.w r1, r7, #80 ; 0x50
8003b1a: 440b add r3, r1
8003b1c: f823 2c18 strh.w r2, [r3, #-24]
}
if(tsOrientation & TS_SWAP_Y)
8003b20: 4b6a ldr r3, [pc, #424] ; (8003ccc <BSP_TS_GetState+0x280>)
8003b22: 781b ldrb r3, [r3, #0]
8003b24: f003 0304 and.w r3, r3, #4
8003b28: 2b00 cmp r3, #0
8003b2a: d010 beq.n 8003b4e <BSP_TS_GetState+0x102>
{
y[index] = 4096 - brute_y[index];
8003b2c: 6cbb ldr r3, [r7, #72] ; 0x48
8003b2e: 005b lsls r3, r3, #1
8003b30: f107 0250 add.w r2, r7, #80 ; 0x50
8003b34: 4413 add r3, r2
8003b36: f833 3c3c ldrh.w r3, [r3, #-60]
8003b3a: f5c3 5380 rsb r3, r3, #4096 ; 0x1000
8003b3e: b29a uxth r2, r3
8003b40: 6cbb ldr r3, [r7, #72] ; 0x48
8003b42: 005b lsls r3, r3, #1
8003b44: f107 0150 add.w r1, r7, #80 ; 0x50
8003b48: 440b add r3, r1
8003b4a: f823 2c24 strh.w r2, [r3, #-36]
}
if(tsOrientation & TS_SWAP_XY)
8003b4e: 4b5f ldr r3, [pc, #380] ; (8003ccc <BSP_TS_GetState+0x280>)
8003b50: 781b ldrb r3, [r3, #0]
8003b52: f003 0308 and.w r3, r3, #8
8003b56: 2b00 cmp r3, #0
8003b58: d01b beq.n 8003b92 <BSP_TS_GetState+0x146>
{
y[index] = brute_x[index];
8003b5a: 6cbb ldr r3, [r7, #72] ; 0x48
8003b5c: 005b lsls r3, r3, #1
8003b5e: f107 0250 add.w r2, r7, #80 ; 0x50
8003b62: 4413 add r3, r2
8003b64: f833 2c30 ldrh.w r2, [r3, #-48]
8003b68: 6cbb ldr r3, [r7, #72] ; 0x48
8003b6a: 005b lsls r3, r3, #1
8003b6c: f107 0150 add.w r1, r7, #80 ; 0x50
8003b70: 440b add r3, r1
8003b72: f823 2c24 strh.w r2, [r3, #-36]
x[index] = brute_y[index];
8003b76: 6cbb ldr r3, [r7, #72] ; 0x48
8003b78: 005b lsls r3, r3, #1
8003b7a: f107 0250 add.w r2, r7, #80 ; 0x50
8003b7e: 4413 add r3, r2
8003b80: f833 2c3c ldrh.w r2, [r3, #-60]
8003b84: 6cbb ldr r3, [r7, #72] ; 0x48
8003b86: 005b lsls r3, r3, #1
8003b88: f107 0150 add.w r1, r7, #80 ; 0x50
8003b8c: 440b add r3, r1
8003b8e: f823 2c18 strh.w r2, [r3, #-24]
}
x_diff = x[index] > _x[index]? (x[index] - _x[index]): (_x[index] - x[index]);
8003b92: 6cbb ldr r3, [r7, #72] ; 0x48
8003b94: 005b lsls r3, r3, #1
8003b96: f107 0250 add.w r2, r7, #80 ; 0x50
8003b9a: 4413 add r3, r2
8003b9c: f833 3c18 ldrh.w r3, [r3, #-24]
8003ba0: 4619 mov r1, r3
8003ba2: 4a4b ldr r2, [pc, #300] ; (8003cd0 <BSP_TS_GetState+0x284>)
8003ba4: 6cbb ldr r3, [r7, #72] ; 0x48
8003ba6: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8003baa: 4299 cmp r1, r3
8003bac: d90e bls.n 8003bcc <BSP_TS_GetState+0x180>
8003bae: 6cbb ldr r3, [r7, #72] ; 0x48
8003bb0: 005b lsls r3, r3, #1
8003bb2: f107 0250 add.w r2, r7, #80 ; 0x50
8003bb6: 4413 add r3, r2
8003bb8: f833 2c18 ldrh.w r2, [r3, #-24]
8003bbc: 4944 ldr r1, [pc, #272] ; (8003cd0 <BSP_TS_GetState+0x284>)
8003bbe: 6cbb ldr r3, [r7, #72] ; 0x48
8003bc0: f851 3023 ldr.w r3, [r1, r3, lsl #2]
8003bc4: b29b uxth r3, r3
8003bc6: 1ad3 subs r3, r2, r3
8003bc8: b29b uxth r3, r3
8003bca: e00d b.n 8003be8 <BSP_TS_GetState+0x19c>
8003bcc: 4a40 ldr r2, [pc, #256] ; (8003cd0 <BSP_TS_GetState+0x284>)
8003bce: 6cbb ldr r3, [r7, #72] ; 0x48
8003bd0: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8003bd4: b29a uxth r2, r3
8003bd6: 6cbb ldr r3, [r7, #72] ; 0x48
8003bd8: 005b lsls r3, r3, #1
8003bda: f107 0150 add.w r1, r7, #80 ; 0x50
8003bde: 440b add r3, r1
8003be0: f833 3c18 ldrh.w r3, [r3, #-24]
8003be4: 1ad3 subs r3, r2, r3
8003be6: b29b uxth r3, r3
8003be8: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
y_diff = y[index] > _y[index]? (y[index] - _y[index]): (_y[index] - y[index]);
8003bec: 6cbb ldr r3, [r7, #72] ; 0x48
8003bee: 005b lsls r3, r3, #1
8003bf0: f107 0250 add.w r2, r7, #80 ; 0x50
8003bf4: 4413 add r3, r2
8003bf6: f833 3c24 ldrh.w r3, [r3, #-36]
8003bfa: 4619 mov r1, r3
8003bfc: 4a35 ldr r2, [pc, #212] ; (8003cd4 <BSP_TS_GetState+0x288>)
8003bfe: 6cbb ldr r3, [r7, #72] ; 0x48
8003c00: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8003c04: 4299 cmp r1, r3
8003c06: d90e bls.n 8003c26 <BSP_TS_GetState+0x1da>
8003c08: 6cbb ldr r3, [r7, #72] ; 0x48
8003c0a: 005b lsls r3, r3, #1
8003c0c: f107 0250 add.w r2, r7, #80 ; 0x50
8003c10: 4413 add r3, r2
8003c12: f833 2c24 ldrh.w r2, [r3, #-36]
8003c16: 492f ldr r1, [pc, #188] ; (8003cd4 <BSP_TS_GetState+0x288>)
8003c18: 6cbb ldr r3, [r7, #72] ; 0x48
8003c1a: f851 3023 ldr.w r3, [r1, r3, lsl #2]
8003c1e: b29b uxth r3, r3
8003c20: 1ad3 subs r3, r2, r3
8003c22: b29b uxth r3, r3
8003c24: e00d b.n 8003c42 <BSP_TS_GetState+0x1f6>
8003c26: 4a2b ldr r2, [pc, #172] ; (8003cd4 <BSP_TS_GetState+0x288>)
8003c28: 6cbb ldr r3, [r7, #72] ; 0x48
8003c2a: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8003c2e: b29a uxth r2, r3
8003c30: 6cbb ldr r3, [r7, #72] ; 0x48
8003c32: 005b lsls r3, r3, #1
8003c34: f107 0150 add.w r1, r7, #80 ; 0x50
8003c38: 440b add r3, r1
8003c3a: f833 3c24 ldrh.w r3, [r3, #-36]
8003c3e: 1ad3 subs r3, r2, r3
8003c40: b29b uxth r3, r3
8003c42: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
if ((x_diff + y_diff) > 5)
8003c46: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46
8003c4a: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
8003c4e: 4413 add r3, r2
8003c50: 2b05 cmp r3, #5
8003c52: dd17 ble.n 8003c84 <BSP_TS_GetState+0x238>
{
_x[index] = x[index];
8003c54: 6cbb ldr r3, [r7, #72] ; 0x48
8003c56: 005b lsls r3, r3, #1
8003c58: f107 0250 add.w r2, r7, #80 ; 0x50
8003c5c: 4413 add r3, r2
8003c5e: f833 3c18 ldrh.w r3, [r3, #-24]
8003c62: 4619 mov r1, r3
8003c64: 4a1a ldr r2, [pc, #104] ; (8003cd0 <BSP_TS_GetState+0x284>)
8003c66: 6cbb ldr r3, [r7, #72] ; 0x48
8003c68: f842 1023 str.w r1, [r2, r3, lsl #2]
_y[index] = y[index];
8003c6c: 6cbb ldr r3, [r7, #72] ; 0x48
8003c6e: 005b lsls r3, r3, #1
8003c70: f107 0250 add.w r2, r7, #80 ; 0x50
8003c74: 4413 add r3, r2
8003c76: f833 3c24 ldrh.w r3, [r3, #-36]
8003c7a: 4619 mov r1, r3
8003c7c: 4a15 ldr r2, [pc, #84] ; (8003cd4 <BSP_TS_GetState+0x288>)
8003c7e: 6cbb ldr r3, [r7, #72] ; 0x48
8003c80: f842 1023 str.w r1, [r2, r3, lsl #2]
}
if(I2cAddress == FT5336_I2C_SLAVE_ADDRESS)
8003c84: 4b10 ldr r3, [pc, #64] ; (8003cc8 <BSP_TS_GetState+0x27c>)
8003c86: 781b ldrb r3, [r3, #0]
8003c88: 2b70 cmp r3, #112 ; 0x70
8003c8a: d125 bne.n 8003cd8 <BSP_TS_GetState+0x28c>
{
TS_State->touchX[index] = x[index];
8003c8c: 6cbb ldr r3, [r7, #72] ; 0x48
8003c8e: 005b lsls r3, r3, #1
8003c90: f107 0250 add.w r2, r7, #80 ; 0x50
8003c94: 4413 add r3, r2
8003c96: f833 1c18 ldrh.w r1, [r3, #-24]
8003c9a: 687a ldr r2, [r7, #4]
8003c9c: 6cbb ldr r3, [r7, #72] ; 0x48
8003c9e: 005b lsls r3, r3, #1
8003ca0: 4413 add r3, r2
8003ca2: 460a mov r2, r1
8003ca4: 805a strh r2, [r3, #2]
TS_State->touchY[index] = y[index];
8003ca6: 6cbb ldr r3, [r7, #72] ; 0x48
8003ca8: 005b lsls r3, r3, #1
8003caa: f107 0250 add.w r2, r7, #80 ; 0x50
8003cae: 4413 add r3, r2
8003cb0: f833 1c24 ldrh.w r1, [r3, #-36]
8003cb4: 687a ldr r2, [r7, #4]
8003cb6: 6cbb ldr r3, [r7, #72] ; 0x48
8003cb8: 3304 adds r3, #4
8003cba: 005b lsls r3, r3, #1
8003cbc: 4413 add r3, r2
8003cbe: 460a mov r2, r1
8003cc0: 809a strh r2, [r3, #4]
8003cc2: e02c b.n 8003d1e <BSP_TS_GetState+0x2d2>
8003cc4: 20000534 .word 0x20000534
8003cc8: 2000053d .word 0x2000053d
8003ccc: 2000053c .word 0x2000053c
8003cd0: 20000540 .word 0x20000540
8003cd4: 20000554 .word 0x20000554
}
else
{
/* 2^12 = 4096 : indexes are expressed on a dynamic of 4096 */
TS_State->touchX[index] = (tsXBoundary * _x[index]) >> 12;
8003cd8: 4b42 ldr r3, [pc, #264] ; (8003de4 <BSP_TS_GetState+0x398>)
8003cda: 881b ldrh r3, [r3, #0]
8003cdc: 4619 mov r1, r3
8003cde: 4a42 ldr r2, [pc, #264] ; (8003de8 <BSP_TS_GetState+0x39c>)
8003ce0: 6cbb ldr r3, [r7, #72] ; 0x48
8003ce2: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8003ce6: fb03 f301 mul.w r3, r3, r1
8003cea: 0b1b lsrs r3, r3, #12
8003cec: b299 uxth r1, r3
8003cee: 687a ldr r2, [r7, #4]
8003cf0: 6cbb ldr r3, [r7, #72] ; 0x48
8003cf2: 005b lsls r3, r3, #1
8003cf4: 4413 add r3, r2
8003cf6: 460a mov r2, r1
8003cf8: 805a strh r2, [r3, #2]
TS_State->touchY[index] = (tsYBoundary * _y[index]) >> 12;
8003cfa: 4b3c ldr r3, [pc, #240] ; (8003dec <BSP_TS_GetState+0x3a0>)
8003cfc: 881b ldrh r3, [r3, #0]
8003cfe: 4619 mov r1, r3
8003d00: 4a3b ldr r2, [pc, #236] ; (8003df0 <BSP_TS_GetState+0x3a4>)
8003d02: 6cbb ldr r3, [r7, #72] ; 0x48
8003d04: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8003d08: fb03 f301 mul.w r3, r3, r1
8003d0c: 0b1b lsrs r3, r3, #12
8003d0e: b299 uxth r1, r3
8003d10: 687a ldr r2, [r7, #4]
8003d12: 6cbb ldr r3, [r7, #72] ; 0x48
8003d14: 3304 adds r3, #4
8003d16: 005b lsls r3, r3, #1
8003d18: 4413 add r3, r2
8003d1a: 460a mov r2, r1
8003d1c: 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);
8003d1e: 4b35 ldr r3, [pc, #212] ; (8003df4 <BSP_TS_GetState+0x3a8>)
8003d20: 781b ldrb r3, [r3, #0]
8003d22: b298 uxth r0, r3
8003d24: f107 010c add.w r1, r7, #12
8003d28: f107 0210 add.w r2, r7, #16
8003d2c: f107 0308 add.w r3, r7, #8
8003d30: 9300 str r3, [sp, #0]
8003d32: 460b mov r3, r1
8003d34: 6cb9 ldr r1, [r7, #72] ; 0x48
8003d36: f7fc fe39 bl 80009ac <ft5336_TS_GetTouchInfo>
/* Update TS_State structure */
TS_State->touchWeight[index] = weight;
8003d3a: 693b ldr r3, [r7, #16]
8003d3c: b2d9 uxtb r1, r3
8003d3e: 687a ldr r2, [r7, #4]
8003d40: 6cbb ldr r3, [r7, #72] ; 0x48
8003d42: 4413 add r3, r2
8003d44: 3316 adds r3, #22
8003d46: 460a mov r2, r1
8003d48: 701a strb r2, [r3, #0]
TS_State->touchArea[index] = area;
8003d4a: 68fb ldr r3, [r7, #12]
8003d4c: b2d9 uxtb r1, r3
8003d4e: 687a ldr r2, [r7, #4]
8003d50: 6cbb ldr r3, [r7, #72] ; 0x48
8003d52: 4413 add r3, r2
8003d54: 3320 adds r3, #32
8003d56: 460a mov r2, r1
8003d58: 701a strb r2, [r3, #0]
/* Remap touch event */
switch(event)
8003d5a: 68bb ldr r3, [r7, #8]
8003d5c: 2b03 cmp r3, #3
8003d5e: d827 bhi.n 8003db0 <BSP_TS_GetState+0x364>
8003d60: a201 add r2, pc, #4 ; (adr r2, 8003d68 <BSP_TS_GetState+0x31c>)
8003d62: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8003d66: bf00 nop
8003d68: 08003d79 .word 0x08003d79
8003d6c: 08003d87 .word 0x08003d87
8003d70: 08003d95 .word 0x08003d95
8003d74: 08003da3 .word 0x08003da3
{
case FT5336_TOUCH_EVT_FLAG_PRESS_DOWN :
TS_State->touchEventId[index] = TOUCH_EVENT_PRESS_DOWN;
8003d78: 687a ldr r2, [r7, #4]
8003d7a: 6cbb ldr r3, [r7, #72] ; 0x48
8003d7c: 4413 add r3, r2
8003d7e: 331b adds r3, #27
8003d80: 2201 movs r2, #1
8003d82: 701a strb r2, [r3, #0]
break;
8003d84: e018 b.n 8003db8 <BSP_TS_GetState+0x36c>
case FT5336_TOUCH_EVT_FLAG_LIFT_UP :
TS_State->touchEventId[index] = TOUCH_EVENT_LIFT_UP;
8003d86: 687a ldr r2, [r7, #4]
8003d88: 6cbb ldr r3, [r7, #72] ; 0x48
8003d8a: 4413 add r3, r2
8003d8c: 331b adds r3, #27
8003d8e: 2202 movs r2, #2
8003d90: 701a strb r2, [r3, #0]
break;
8003d92: e011 b.n 8003db8 <BSP_TS_GetState+0x36c>
case FT5336_TOUCH_EVT_FLAG_CONTACT :
TS_State->touchEventId[index] = TOUCH_EVENT_CONTACT;
8003d94: 687a ldr r2, [r7, #4]
8003d96: 6cbb ldr r3, [r7, #72] ; 0x48
8003d98: 4413 add r3, r2
8003d9a: 331b adds r3, #27
8003d9c: 2203 movs r2, #3
8003d9e: 701a strb r2, [r3, #0]
break;
8003da0: e00a b.n 8003db8 <BSP_TS_GetState+0x36c>
case FT5336_TOUCH_EVT_FLAG_NO_EVENT :
TS_State->touchEventId[index] = TOUCH_EVENT_NO_EVT;
8003da2: 687a ldr r2, [r7, #4]
8003da4: 6cbb ldr r3, [r7, #72] ; 0x48
8003da6: 4413 add r3, r2
8003da8: 331b adds r3, #27
8003daa: 2200 movs r2, #0
8003dac: 701a strb r2, [r3, #0]
break;
8003dae: e003 b.n 8003db8 <BSP_TS_GetState+0x36c>
default :
ts_status = TS_ERROR;
8003db0: 2301 movs r3, #1
8003db2: f887 304f strb.w r3, [r7, #79] ; 0x4f
break;
8003db6: bf00 nop
for(index=0; index < TS_State->touchDetected; index++)
8003db8: 6cbb ldr r3, [r7, #72] ; 0x48
8003dba: 3301 adds r3, #1
8003dbc: 64bb str r3, [r7, #72] ; 0x48
8003dbe: 687b ldr r3, [r7, #4]
8003dc0: 781b ldrb r3, [r3, #0]
8003dc2: 461a mov r2, r3
8003dc4: 6cbb ldr r3, [r7, #72] ; 0x48
8003dc6: 4293 cmp r3, r2
8003dc8: f4ff ae61 bcc.w 8003a8e <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);
8003dcc: 6878 ldr r0, [r7, #4]
8003dce: f000 f813 bl 8003df8 <BSP_TS_Get_GestureId>
8003dd2: 4603 mov r3, r0
8003dd4: f887 304f strb.w r3, [r7, #79] ; 0x4f
#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */
} /* end of if(TS_State->touchDetected != 0) */
return (ts_status);
8003dd8: f897 304f ldrb.w r3, [r7, #79] ; 0x4f
}
8003ddc: 4618 mov r0, r3
8003dde: 3754 adds r7, #84 ; 0x54
8003de0: 46bd mov sp, r7
8003de2: bd90 pop {r4, r7, pc}
8003de4: 20000538 .word 0x20000538
8003de8: 20000540 .word 0x20000540
8003dec: 2000053a .word 0x2000053a
8003df0: 20000554 .word 0x20000554
8003df4: 2000053d .word 0x2000053d
08003df8 <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)
{
8003df8: b580 push {r7, lr}
8003dfa: b084 sub sp, #16
8003dfc: af00 add r7, sp, #0
8003dfe: 6078 str r0, [r7, #4]
uint32_t gestureId = 0;
8003e00: 2300 movs r3, #0
8003e02: 60bb str r3, [r7, #8]
uint8_t ts_status = TS_OK;
8003e04: 2300 movs r3, #0
8003e06: 73fb strb r3, [r7, #15]
/* Get gesture Id */
ft5336_TS_GetGestureID(I2cAddress, &gestureId);
8003e08: 4b1f ldr r3, [pc, #124] ; (8003e88 <BSP_TS_Get_GestureId+0x90>)
8003e0a: 781b ldrb r3, [r3, #0]
8003e0c: b29b uxth r3, r3
8003e0e: f107 0208 add.w r2, r7, #8
8003e12: 4611 mov r1, r2
8003e14: 4618 mov r0, r3
8003e16: f7fc fdb0 bl 800097a <ft5336_TS_GetGestureID>
/* Remap gesture Id to a TS_GestureIdTypeDef value */
switch(gestureId)
8003e1a: 68bb ldr r3, [r7, #8]
8003e1c: 2b18 cmp r3, #24
8003e1e: d01b beq.n 8003e58 <BSP_TS_Get_GestureId+0x60>
8003e20: 2b18 cmp r3, #24
8003e22: d806 bhi.n 8003e32 <BSP_TS_Get_GestureId+0x3a>
8003e24: 2b10 cmp r3, #16
8003e26: d00f beq.n 8003e48 <BSP_TS_Get_GestureId+0x50>
8003e28: 2b14 cmp r3, #20
8003e2a: d011 beq.n 8003e50 <BSP_TS_Get_GestureId+0x58>
8003e2c: 2b00 cmp r3, #0
8003e2e: d007 beq.n 8003e40 <BSP_TS_Get_GestureId+0x48>
8003e30: e022 b.n 8003e78 <BSP_TS_Get_GestureId+0x80>
8003e32: 2b40 cmp r3, #64 ; 0x40
8003e34: d018 beq.n 8003e68 <BSP_TS_Get_GestureId+0x70>
8003e36: 2b49 cmp r3, #73 ; 0x49
8003e38: d01a beq.n 8003e70 <BSP_TS_Get_GestureId+0x78>
8003e3a: 2b1c cmp r3, #28
8003e3c: d010 beq.n 8003e60 <BSP_TS_Get_GestureId+0x68>
8003e3e: e01b b.n 8003e78 <BSP_TS_Get_GestureId+0x80>
{
case FT5336_GEST_ID_NO_GESTURE :
TS_State->gestureId = GEST_ID_NO_GESTURE;
8003e40: 687b ldr r3, [r7, #4]
8003e42: 2200 movs r2, #0
8003e44: 629a str r2, [r3, #40] ; 0x28
break;
8003e46: e01a b.n 8003e7e <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_MOVE_UP :
TS_State->gestureId = GEST_ID_MOVE_UP;
8003e48: 687b ldr r3, [r7, #4]
8003e4a: 2201 movs r2, #1
8003e4c: 629a str r2, [r3, #40] ; 0x28
break;
8003e4e: e016 b.n 8003e7e <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_MOVE_RIGHT :
TS_State->gestureId = GEST_ID_MOVE_RIGHT;
8003e50: 687b ldr r3, [r7, #4]
8003e52: 2202 movs r2, #2
8003e54: 629a str r2, [r3, #40] ; 0x28
break;
8003e56: e012 b.n 8003e7e <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_MOVE_DOWN :
TS_State->gestureId = GEST_ID_MOVE_DOWN;
8003e58: 687b ldr r3, [r7, #4]
8003e5a: 2203 movs r2, #3
8003e5c: 629a str r2, [r3, #40] ; 0x28
break;
8003e5e: e00e b.n 8003e7e <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_MOVE_LEFT :
TS_State->gestureId = GEST_ID_MOVE_LEFT;
8003e60: 687b ldr r3, [r7, #4]
8003e62: 2204 movs r2, #4
8003e64: 629a str r2, [r3, #40] ; 0x28
break;
8003e66: e00a b.n 8003e7e <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_ZOOM_IN :
TS_State->gestureId = GEST_ID_ZOOM_IN;
8003e68: 687b ldr r3, [r7, #4]
8003e6a: 2205 movs r2, #5
8003e6c: 629a str r2, [r3, #40] ; 0x28
break;
8003e6e: e006 b.n 8003e7e <BSP_TS_Get_GestureId+0x86>
case FT5336_GEST_ID_ZOOM_OUT :
TS_State->gestureId = GEST_ID_ZOOM_OUT;
8003e70: 687b ldr r3, [r7, #4]
8003e72: 2206 movs r2, #6
8003e74: 629a str r2, [r3, #40] ; 0x28
break;
8003e76: e002 b.n 8003e7e <BSP_TS_Get_GestureId+0x86>
default :
ts_status = TS_ERROR;
8003e78: 2301 movs r3, #1
8003e7a: 73fb strb r3, [r7, #15]
break;
8003e7c: bf00 nop
} /* of switch(gestureId) */
return(ts_status);
8003e7e: 7bfb ldrb r3, [r7, #15]
}
8003e80: 4618 mov r0, r3
8003e82: 3710 adds r7, #16
8003e84: 46bd mov sp, r7
8003e86: bd80 pop {r7, pc}
8003e88: 2000053d .word 0x2000053d
08003e8c <HAL_MspInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
8003e8c: b580 push {r7, lr}
8003e8e: b082 sub sp, #8
8003e90: af00 add r7, sp, #0
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_PWR_CLK_ENABLE();
8003e92: 4b11 ldr r3, [pc, #68] ; (8003ed8 <HAL_MspInit+0x4c>)
8003e94: 6c1b ldr r3, [r3, #64] ; 0x40
8003e96: 4a10 ldr r2, [pc, #64] ; (8003ed8 <HAL_MspInit+0x4c>)
8003e98: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8003e9c: 6413 str r3, [r2, #64] ; 0x40
8003e9e: 4b0e ldr r3, [pc, #56] ; (8003ed8 <HAL_MspInit+0x4c>)
8003ea0: 6c1b ldr r3, [r3, #64] ; 0x40
8003ea2: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8003ea6: 607b str r3, [r7, #4]
8003ea8: 687b ldr r3, [r7, #4]
__HAL_RCC_SYSCFG_CLK_ENABLE();
8003eaa: 4b0b ldr r3, [pc, #44] ; (8003ed8 <HAL_MspInit+0x4c>)
8003eac: 6c5b ldr r3, [r3, #68] ; 0x44
8003eae: 4a0a ldr r2, [pc, #40] ; (8003ed8 <HAL_MspInit+0x4c>)
8003eb0: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8003eb4: 6453 str r3, [r2, #68] ; 0x44
8003eb6: 4b08 ldr r3, [pc, #32] ; (8003ed8 <HAL_MspInit+0x4c>)
8003eb8: 6c5b ldr r3, [r3, #68] ; 0x44
8003eba: f403 4380 and.w r3, r3, #16384 ; 0x4000
8003ebe: 603b str r3, [r7, #0]
8003ec0: 683b ldr r3, [r7, #0]
/* System interrupt init*/
/* PendSV_IRQn interrupt configuration */
HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
8003ec2: 2200 movs r2, #0
8003ec4: 210f movs r1, #15
8003ec6: f06f 0001 mvn.w r0, #1
8003eca: f001 fba7 bl 800561c <HAL_NVIC_SetPriority>
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
8003ece: bf00 nop
8003ed0: 3708 adds r7, #8
8003ed2: 46bd mov sp, r7
8003ed4: bd80 pop {r7, pc}
8003ed6: bf00 nop
8003ed8: 40023800 .word 0x40023800
08003edc <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)
{
8003edc: b580 push {r7, lr}
8003ede: b08c sub sp, #48 ; 0x30
8003ee0: af00 add r7, sp, #0
8003ee2: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8003ee4: f107 031c add.w r3, r7, #28
8003ee8: 2200 movs r2, #0
8003eea: 601a str r2, [r3, #0]
8003eec: 605a str r2, [r3, #4]
8003eee: 609a str r2, [r3, #8]
8003ef0: 60da str r2, [r3, #12]
8003ef2: 611a str r2, [r3, #16]
if(hadc->Instance==ADC1)
8003ef4: 687b ldr r3, [r7, #4]
8003ef6: 681b ldr r3, [r3, #0]
8003ef8: 4a2a ldr r2, [pc, #168] ; (8003fa4 <HAL_ADC_MspInit+0xc8>)
8003efa: 4293 cmp r3, r2
8003efc: d124 bne.n 8003f48 <HAL_ADC_MspInit+0x6c>
{
/* USER CODE BEGIN ADC1_MspInit 0 */
/* USER CODE END ADC1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_ADC1_CLK_ENABLE();
8003efe: 4b2a ldr r3, [pc, #168] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f00: 6c5b ldr r3, [r3, #68] ; 0x44
8003f02: 4a29 ldr r2, [pc, #164] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f04: f443 7380 orr.w r3, r3, #256 ; 0x100
8003f08: 6453 str r3, [r2, #68] ; 0x44
8003f0a: 4b27 ldr r3, [pc, #156] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f0c: 6c5b ldr r3, [r3, #68] ; 0x44
8003f0e: f403 7380 and.w r3, r3, #256 ; 0x100
8003f12: 61bb str r3, [r7, #24]
8003f14: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOA_CLK_ENABLE();
8003f16: 4b24 ldr r3, [pc, #144] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f18: 6b1b ldr r3, [r3, #48] ; 0x30
8003f1a: 4a23 ldr r2, [pc, #140] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f1c: f043 0301 orr.w r3, r3, #1
8003f20: 6313 str r3, [r2, #48] ; 0x30
8003f22: 4b21 ldr r3, [pc, #132] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f24: 6b1b ldr r3, [r3, #48] ; 0x30
8003f26: f003 0301 and.w r3, r3, #1
8003f2a: 617b str r3, [r7, #20]
8003f2c: 697b ldr r3, [r7, #20]
/**ADC1 GPIO Configuration
PA0/WKUP ------> ADC1_IN0
*/
GPIO_InitStruct.Pin = GPIO_PIN_0;
8003f2e: 2301 movs r3, #1
8003f30: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
8003f32: 2303 movs r3, #3
8003f34: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003f36: 2300 movs r3, #0
8003f38: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8003f3a: f107 031c add.w r3, r7, #28
8003f3e: 4619 mov r1, r3
8003f40: 481a ldr r0, [pc, #104] ; (8003fac <HAL_ADC_MspInit+0xd0>)
8003f42: f003 fb1b bl 800757c <HAL_GPIO_Init>
/* USER CODE BEGIN ADC3_MspInit 1 */
/* USER CODE END ADC3_MspInit 1 */
}
}
8003f46: e029 b.n 8003f9c <HAL_ADC_MspInit+0xc0>
else if(hadc->Instance==ADC3)
8003f48: 687b ldr r3, [r7, #4]
8003f4a: 681b ldr r3, [r3, #0]
8003f4c: 4a18 ldr r2, [pc, #96] ; (8003fb0 <HAL_ADC_MspInit+0xd4>)
8003f4e: 4293 cmp r3, r2
8003f50: d124 bne.n 8003f9c <HAL_ADC_MspInit+0xc0>
__HAL_RCC_ADC3_CLK_ENABLE();
8003f52: 4b15 ldr r3, [pc, #84] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f54: 6c5b ldr r3, [r3, #68] ; 0x44
8003f56: 4a14 ldr r2, [pc, #80] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f58: f443 6380 orr.w r3, r3, #1024 ; 0x400
8003f5c: 6453 str r3, [r2, #68] ; 0x44
8003f5e: 4b12 ldr r3, [pc, #72] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f60: 6c5b ldr r3, [r3, #68] ; 0x44
8003f62: f403 6380 and.w r3, r3, #1024 ; 0x400
8003f66: 613b str r3, [r7, #16]
8003f68: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOF_CLK_ENABLE();
8003f6a: 4b0f ldr r3, [pc, #60] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f6c: 6b1b ldr r3, [r3, #48] ; 0x30
8003f6e: 4a0e ldr r2, [pc, #56] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f70: f043 0320 orr.w r3, r3, #32
8003f74: 6313 str r3, [r2, #48] ; 0x30
8003f76: 4b0c ldr r3, [pc, #48] ; (8003fa8 <HAL_ADC_MspInit+0xcc>)
8003f78: 6b1b ldr r3, [r3, #48] ; 0x30
8003f7a: f003 0320 and.w r3, r3, #32
8003f7e: 60fb str r3, [r7, #12]
8003f80: 68fb ldr r3, [r7, #12]
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_9|GPIO_PIN_8;
8003f82: f44f 63e0 mov.w r3, #1792 ; 0x700
8003f86: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
8003f88: 2303 movs r3, #3
8003f8a: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8003f8c: 2300 movs r3, #0
8003f8e: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
8003f90: f107 031c add.w r3, r7, #28
8003f94: 4619 mov r1, r3
8003f96: 4807 ldr r0, [pc, #28] ; (8003fb4 <HAL_ADC_MspInit+0xd8>)
8003f98: f003 faf0 bl 800757c <HAL_GPIO_Init>
}
8003f9c: bf00 nop
8003f9e: 3730 adds r7, #48 ; 0x30
8003fa0: 46bd mov sp, r7
8003fa2: bd80 pop {r7, pc}
8003fa4: 40012000 .word 0x40012000
8003fa8: 40023800 .word 0x40023800
8003fac: 40020000 .word 0x40020000
8003fb0: 40012200 .word 0x40012200
8003fb4: 40021400 .word 0x40021400
08003fb8 <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)
{
8003fb8: b480 push {r7}
8003fba: b085 sub sp, #20
8003fbc: af00 add r7, sp, #0
8003fbe: 6078 str r0, [r7, #4]
if(hcrc->Instance==CRC)
8003fc0: 687b ldr r3, [r7, #4]
8003fc2: 681b ldr r3, [r3, #0]
8003fc4: 4a0a ldr r2, [pc, #40] ; (8003ff0 <HAL_CRC_MspInit+0x38>)
8003fc6: 4293 cmp r3, r2
8003fc8: d10b bne.n 8003fe2 <HAL_CRC_MspInit+0x2a>
{
/* USER CODE BEGIN CRC_MspInit 0 */
/* USER CODE END CRC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_CRC_CLK_ENABLE();
8003fca: 4b0a ldr r3, [pc, #40] ; (8003ff4 <HAL_CRC_MspInit+0x3c>)
8003fcc: 6b1b ldr r3, [r3, #48] ; 0x30
8003fce: 4a09 ldr r2, [pc, #36] ; (8003ff4 <HAL_CRC_MspInit+0x3c>)
8003fd0: f443 5380 orr.w r3, r3, #4096 ; 0x1000
8003fd4: 6313 str r3, [r2, #48] ; 0x30
8003fd6: 4b07 ldr r3, [pc, #28] ; (8003ff4 <HAL_CRC_MspInit+0x3c>)
8003fd8: 6b1b ldr r3, [r3, #48] ; 0x30
8003fda: f403 5380 and.w r3, r3, #4096 ; 0x1000
8003fde: 60fb str r3, [r7, #12]
8003fe0: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN CRC_MspInit 1 */
/* USER CODE END CRC_MspInit 1 */
}
}
8003fe2: bf00 nop
8003fe4: 3714 adds r7, #20
8003fe6: 46bd mov sp, r7
8003fe8: f85d 7b04 ldr.w r7, [sp], #4
8003fec: 4770 bx lr
8003fee: bf00 nop
8003ff0: 40023000 .word 0x40023000
8003ff4: 40023800 .word 0x40023800
08003ff8 <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)
{
8003ff8: b580 push {r7, lr}
8003ffa: b08a sub sp, #40 ; 0x28
8003ffc: af00 add r7, sp, #0
8003ffe: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8004000: f107 0314 add.w r3, r7, #20
8004004: 2200 movs r2, #0
8004006: 601a str r2, [r3, #0]
8004008: 605a str r2, [r3, #4]
800400a: 609a str r2, [r3, #8]
800400c: 60da str r2, [r3, #12]
800400e: 611a str r2, [r3, #16]
if(hdac->Instance==DAC)
8004010: 687b ldr r3, [r7, #4]
8004012: 681b ldr r3, [r3, #0]
8004014: 4a19 ldr r2, [pc, #100] ; (800407c <HAL_DAC_MspInit+0x84>)
8004016: 4293 cmp r3, r2
8004018: d12b bne.n 8004072 <HAL_DAC_MspInit+0x7a>
{
/* USER CODE BEGIN DAC_MspInit 0 */
/* USER CODE END DAC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_DAC_CLK_ENABLE();
800401a: 4b19 ldr r3, [pc, #100] ; (8004080 <HAL_DAC_MspInit+0x88>)
800401c: 6c1b ldr r3, [r3, #64] ; 0x40
800401e: 4a18 ldr r2, [pc, #96] ; (8004080 <HAL_DAC_MspInit+0x88>)
8004020: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
8004024: 6413 str r3, [r2, #64] ; 0x40
8004026: 4b16 ldr r3, [pc, #88] ; (8004080 <HAL_DAC_MspInit+0x88>)
8004028: 6c1b ldr r3, [r3, #64] ; 0x40
800402a: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
800402e: 613b str r3, [r7, #16]
8004030: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
8004032: 4b13 ldr r3, [pc, #76] ; (8004080 <HAL_DAC_MspInit+0x88>)
8004034: 6b1b ldr r3, [r3, #48] ; 0x30
8004036: 4a12 ldr r2, [pc, #72] ; (8004080 <HAL_DAC_MspInit+0x88>)
8004038: f043 0301 orr.w r3, r3, #1
800403c: 6313 str r3, [r2, #48] ; 0x30
800403e: 4b10 ldr r3, [pc, #64] ; (8004080 <HAL_DAC_MspInit+0x88>)
8004040: 6b1b ldr r3, [r3, #48] ; 0x30
8004042: f003 0301 and.w r3, r3, #1
8004046: 60fb str r3, [r7, #12]
8004048: 68fb ldr r3, [r7, #12]
/**DAC GPIO Configuration
PA4 ------> DAC_OUT1
*/
GPIO_InitStruct.Pin = GPIO_PIN_4;
800404a: 2310 movs r3, #16
800404c: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
800404e: 2303 movs r3, #3
8004050: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004052: 2300 movs r3, #0
8004054: 61fb str r3, [r7, #28]
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
8004056: f107 0314 add.w r3, r7, #20
800405a: 4619 mov r1, r3
800405c: 4809 ldr r0, [pc, #36] ; (8004084 <HAL_DAC_MspInit+0x8c>)
800405e: f003 fa8d bl 800757c <HAL_GPIO_Init>
/* DAC interrupt Init */
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, 0, 0);
8004062: 2200 movs r2, #0
8004064: 2100 movs r1, #0
8004066: 2036 movs r0, #54 ; 0x36
8004068: f001 fad8 bl 800561c <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
800406c: 2036 movs r0, #54 ; 0x36
800406e: f001 faf1 bl 8005654 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN DAC_MspInit 1 */
/* USER CODE END DAC_MspInit 1 */
}
}
8004072: bf00 nop
8004074: 3728 adds r7, #40 ; 0x28
8004076: 46bd mov sp, r7
8004078: bd80 pop {r7, pc}
800407a: bf00 nop
800407c: 40007400 .word 0x40007400
8004080: 40023800 .word 0x40023800
8004084: 40020000 .word 0x40020000
08004088 <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)
{
8004088: b480 push {r7}
800408a: b085 sub sp, #20
800408c: af00 add r7, sp, #0
800408e: 6078 str r0, [r7, #4]
if(hdma2d->Instance==DMA2D)
8004090: 687b ldr r3, [r7, #4]
8004092: 681b ldr r3, [r3, #0]
8004094: 4a0a ldr r2, [pc, #40] ; (80040c0 <HAL_DMA2D_MspInit+0x38>)
8004096: 4293 cmp r3, r2
8004098: d10b bne.n 80040b2 <HAL_DMA2D_MspInit+0x2a>
{
/* USER CODE BEGIN DMA2D_MspInit 0 */
/* USER CODE END DMA2D_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_DMA2D_CLK_ENABLE();
800409a: 4b0a ldr r3, [pc, #40] ; (80040c4 <HAL_DMA2D_MspInit+0x3c>)
800409c: 6b1b ldr r3, [r3, #48] ; 0x30
800409e: 4a09 ldr r2, [pc, #36] ; (80040c4 <HAL_DMA2D_MspInit+0x3c>)
80040a0: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
80040a4: 6313 str r3, [r2, #48] ; 0x30
80040a6: 4b07 ldr r3, [pc, #28] ; (80040c4 <HAL_DMA2D_MspInit+0x3c>)
80040a8: 6b1b ldr r3, [r3, #48] ; 0x30
80040aa: f403 0300 and.w r3, r3, #8388608 ; 0x800000
80040ae: 60fb str r3, [r7, #12]
80040b0: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN DMA2D_MspInit 1 */
/* USER CODE END DMA2D_MspInit 1 */
}
}
80040b2: bf00 nop
80040b4: 3714 adds r7, #20
80040b6: 46bd mov sp, r7
80040b8: f85d 7b04 ldr.w r7, [sp], #4
80040bc: 4770 bx lr
80040be: bf00 nop
80040c0: 4002b000 .word 0x4002b000
80040c4: 40023800 .word 0x40023800
080040c8 <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)
{
80040c8: b580 push {r7, lr}
80040ca: b08c sub sp, #48 ; 0x30
80040cc: af00 add r7, sp, #0
80040ce: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
80040d0: f107 031c add.w r3, r7, #28
80040d4: 2200 movs r2, #0
80040d6: 601a str r2, [r3, #0]
80040d8: 605a str r2, [r3, #4]
80040da: 609a str r2, [r3, #8]
80040dc: 60da str r2, [r3, #12]
80040de: 611a str r2, [r3, #16]
if(hi2c->Instance==I2C1)
80040e0: 687b ldr r3, [r7, #4]
80040e2: 681b ldr r3, [r3, #0]
80040e4: 4a2f ldr r2, [pc, #188] ; (80041a4 <HAL_I2C_MspInit+0xdc>)
80040e6: 4293 cmp r3, r2
80040e8: d129 bne.n 800413e <HAL_I2C_MspInit+0x76>
{
/* USER CODE BEGIN I2C1_MspInit 0 */
/* USER CODE END I2C1_MspInit 0 */
__HAL_RCC_GPIOB_CLK_ENABLE();
80040ea: 4b2f ldr r3, [pc, #188] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
80040ec: 6b1b ldr r3, [r3, #48] ; 0x30
80040ee: 4a2e ldr r2, [pc, #184] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
80040f0: f043 0302 orr.w r3, r3, #2
80040f4: 6313 str r3, [r2, #48] ; 0x30
80040f6: 4b2c ldr r3, [pc, #176] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
80040f8: 6b1b ldr r3, [r3, #48] ; 0x30
80040fa: f003 0302 and.w r3, r3, #2
80040fe: 61bb str r3, [r7, #24]
8004100: 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;
8004102: f44f 7340 mov.w r3, #768 ; 0x300
8004106: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
8004108: 2312 movs r3, #18
800410a: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_PULLUP;
800410c: 2301 movs r3, #1
800410e: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004110: 2300 movs r3, #0
8004112: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
8004114: 2304 movs r3, #4
8004116: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8004118: f107 031c add.w r3, r7, #28
800411c: 4619 mov r1, r3
800411e: 4823 ldr r0, [pc, #140] ; (80041ac <HAL_I2C_MspInit+0xe4>)
8004120: f003 fa2c bl 800757c <HAL_GPIO_Init>
/* Peripheral clock enable */
__HAL_RCC_I2C1_CLK_ENABLE();
8004124: 4b20 ldr r3, [pc, #128] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
8004126: 6c1b ldr r3, [r3, #64] ; 0x40
8004128: 4a1f ldr r2, [pc, #124] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
800412a: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
800412e: 6413 str r3, [r2, #64] ; 0x40
8004130: 4b1d ldr r3, [pc, #116] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
8004132: 6c1b ldr r3, [r3, #64] ; 0x40
8004134: f403 1300 and.w r3, r3, #2097152 ; 0x200000
8004138: 617b str r3, [r7, #20]
800413a: 697b ldr r3, [r7, #20]
/* USER CODE BEGIN I2C3_MspInit 1 */
/* USER CODE END I2C3_MspInit 1 */
}
}
800413c: e02d b.n 800419a <HAL_I2C_MspInit+0xd2>
else if(hi2c->Instance==I2C3)
800413e: 687b ldr r3, [r7, #4]
8004140: 681b ldr r3, [r3, #0]
8004142: 4a1b ldr r2, [pc, #108] ; (80041b0 <HAL_I2C_MspInit+0xe8>)
8004144: 4293 cmp r3, r2
8004146: d128 bne.n 800419a <HAL_I2C_MspInit+0xd2>
__HAL_RCC_GPIOH_CLK_ENABLE();
8004148: 4b17 ldr r3, [pc, #92] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
800414a: 6b1b ldr r3, [r3, #48] ; 0x30
800414c: 4a16 ldr r2, [pc, #88] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
800414e: f043 0380 orr.w r3, r3, #128 ; 0x80
8004152: 6313 str r3, [r2, #48] ; 0x30
8004154: 4b14 ldr r3, [pc, #80] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
8004156: 6b1b ldr r3, [r3, #48] ; 0x30
8004158: f003 0380 and.w r3, r3, #128 ; 0x80
800415c: 613b str r3, [r7, #16]
800415e: 693b ldr r3, [r7, #16]
GPIO_InitStruct.Pin = LCD_SCL_Pin|LCD_SDA_Pin;
8004160: f44f 73c0 mov.w r3, #384 ; 0x180
8004164: 61fb str r3, [r7, #28]
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
8004166: 2312 movs r3, #18
8004168: 623b str r3, [r7, #32]
GPIO_InitStruct.Pull = GPIO_PULLUP;
800416a: 2301 movs r3, #1
800416c: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
800416e: 2303 movs r3, #3
8004170: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Alternate = GPIO_AF4_I2C3;
8004172: 2304 movs r3, #4
8004174: 62fb str r3, [r7, #44] ; 0x2c
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
8004176: f107 031c add.w r3, r7, #28
800417a: 4619 mov r1, r3
800417c: 480d ldr r0, [pc, #52] ; (80041b4 <HAL_I2C_MspInit+0xec>)
800417e: f003 f9fd bl 800757c <HAL_GPIO_Init>
__HAL_RCC_I2C3_CLK_ENABLE();
8004182: 4b09 ldr r3, [pc, #36] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
8004184: 6c1b ldr r3, [r3, #64] ; 0x40
8004186: 4a08 ldr r2, [pc, #32] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
8004188: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
800418c: 6413 str r3, [r2, #64] ; 0x40
800418e: 4b06 ldr r3, [pc, #24] ; (80041a8 <HAL_I2C_MspInit+0xe0>)
8004190: 6c1b ldr r3, [r3, #64] ; 0x40
8004192: f403 0300 and.w r3, r3, #8388608 ; 0x800000
8004196: 60fb str r3, [r7, #12]
8004198: 68fb ldr r3, [r7, #12]
}
800419a: bf00 nop
800419c: 3730 adds r7, #48 ; 0x30
800419e: 46bd mov sp, r7
80041a0: bd80 pop {r7, pc}
80041a2: bf00 nop
80041a4: 40005400 .word 0x40005400
80041a8: 40023800 .word 0x40023800
80041ac: 40020400 .word 0x40020400
80041b0: 40005c00 .word 0x40005c00
80041b4: 40021c00 .word 0x40021c00
080041b8 <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)
{
80041b8: b580 push {r7, lr}
80041ba: b082 sub sp, #8
80041bc: af00 add r7, sp, #0
80041be: 6078 str r0, [r7, #4]
if(hi2c->Instance==I2C1)
80041c0: 687b ldr r3, [r7, #4]
80041c2: 681b ldr r3, [r3, #0]
80041c4: 4a15 ldr r2, [pc, #84] ; (800421c <HAL_I2C_MspDeInit+0x64>)
80041c6: 4293 cmp r3, r2
80041c8: d110 bne.n 80041ec <HAL_I2C_MspDeInit+0x34>
{
/* USER CODE BEGIN I2C1_MspDeInit 0 */
/* USER CODE END I2C1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_I2C1_CLK_DISABLE();
80041ca: 4b15 ldr r3, [pc, #84] ; (8004220 <HAL_I2C_MspDeInit+0x68>)
80041cc: 6c1b ldr r3, [r3, #64] ; 0x40
80041ce: 4a14 ldr r2, [pc, #80] ; (8004220 <HAL_I2C_MspDeInit+0x68>)
80041d0: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
80041d4: 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);
80041d6: f44f 7180 mov.w r1, #256 ; 0x100
80041da: 4812 ldr r0, [pc, #72] ; (8004224 <HAL_I2C_MspDeInit+0x6c>)
80041dc: f003 fb78 bl 80078d0 <HAL_GPIO_DeInit>
HAL_GPIO_DeInit(ARDUINO_SDA_D14_GPIO_Port, ARDUINO_SDA_D14_Pin);
80041e0: f44f 7100 mov.w r1, #512 ; 0x200
80041e4: 480f ldr r0, [pc, #60] ; (8004224 <HAL_I2C_MspDeInit+0x6c>)
80041e6: f003 fb73 bl 80078d0 <HAL_GPIO_DeInit>
/* USER CODE BEGIN I2C3_MspDeInit 1 */
/* USER CODE END I2C3_MspDeInit 1 */
}
}
80041ea: e013 b.n 8004214 <HAL_I2C_MspDeInit+0x5c>
else if(hi2c->Instance==I2C3)
80041ec: 687b ldr r3, [r7, #4]
80041ee: 681b ldr r3, [r3, #0]
80041f0: 4a0d ldr r2, [pc, #52] ; (8004228 <HAL_I2C_MspDeInit+0x70>)
80041f2: 4293 cmp r3, r2
80041f4: d10e bne.n 8004214 <HAL_I2C_MspDeInit+0x5c>
__HAL_RCC_I2C3_CLK_DISABLE();
80041f6: 4b0a ldr r3, [pc, #40] ; (8004220 <HAL_I2C_MspDeInit+0x68>)
80041f8: 6c1b ldr r3, [r3, #64] ; 0x40
80041fa: 4a09 ldr r2, [pc, #36] ; (8004220 <HAL_I2C_MspDeInit+0x68>)
80041fc: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
8004200: 6413 str r3, [r2, #64] ; 0x40
HAL_GPIO_DeInit(LCD_SCL_GPIO_Port, LCD_SCL_Pin);
8004202: 2180 movs r1, #128 ; 0x80
8004204: 4809 ldr r0, [pc, #36] ; (800422c <HAL_I2C_MspDeInit+0x74>)
8004206: f003 fb63 bl 80078d0 <HAL_GPIO_DeInit>
HAL_GPIO_DeInit(LCD_SDA_GPIO_Port, LCD_SDA_Pin);
800420a: f44f 7180 mov.w r1, #256 ; 0x100
800420e: 4807 ldr r0, [pc, #28] ; (800422c <HAL_I2C_MspDeInit+0x74>)
8004210: f003 fb5e bl 80078d0 <HAL_GPIO_DeInit>
}
8004214: bf00 nop
8004216: 3708 adds r7, #8
8004218: 46bd mov sp, r7
800421a: bd80 pop {r7, pc}
800421c: 40005400 .word 0x40005400
8004220: 40023800 .word 0x40023800
8004224: 40020400 .word 0x40020400
8004228: 40005c00 .word 0x40005c00
800422c: 40021c00 .word 0x40021c00
08004230 <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)
{
8004230: b580 push {r7, lr}
8004232: b08e sub sp, #56 ; 0x38
8004234: af00 add r7, sp, #0
8004236: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
8004238: f107 0324 add.w r3, r7, #36 ; 0x24
800423c: 2200 movs r2, #0
800423e: 601a str r2, [r3, #0]
8004240: 605a str r2, [r3, #4]
8004242: 609a str r2, [r3, #8]
8004244: 60da str r2, [r3, #12]
8004246: 611a str r2, [r3, #16]
if(hltdc->Instance==LTDC)
8004248: 687b ldr r3, [r7, #4]
800424a: 681b ldr r3, [r3, #0]
800424c: 4a55 ldr r2, [pc, #340] ; (80043a4 <HAL_LTDC_MspInit+0x174>)
800424e: 4293 cmp r3, r2
8004250: f040 80a3 bne.w 800439a <HAL_LTDC_MspInit+0x16a>
{
/* USER CODE BEGIN LTDC_MspInit 0 */
/* USER CODE END LTDC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_LTDC_CLK_ENABLE();
8004254: 4b54 ldr r3, [pc, #336] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
8004256: 6c5b ldr r3, [r3, #68] ; 0x44
8004258: 4a53 ldr r2, [pc, #332] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
800425a: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
800425e: 6453 str r3, [r2, #68] ; 0x44
8004260: 4b51 ldr r3, [pc, #324] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
8004262: 6c5b ldr r3, [r3, #68] ; 0x44
8004264: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
8004268: 623b str r3, [r7, #32]
800426a: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOE_CLK_ENABLE();
800426c: 4b4e ldr r3, [pc, #312] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
800426e: 6b1b ldr r3, [r3, #48] ; 0x30
8004270: 4a4d ldr r2, [pc, #308] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
8004272: f043 0310 orr.w r3, r3, #16
8004276: 6313 str r3, [r2, #48] ; 0x30
8004278: 4b4b ldr r3, [pc, #300] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
800427a: 6b1b ldr r3, [r3, #48] ; 0x30
800427c: f003 0310 and.w r3, r3, #16
8004280: 61fb str r3, [r7, #28]
8004282: 69fb ldr r3, [r7, #28]
__HAL_RCC_GPIOJ_CLK_ENABLE();
8004284: 4b48 ldr r3, [pc, #288] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
8004286: 6b1b ldr r3, [r3, #48] ; 0x30
8004288: 4a47 ldr r2, [pc, #284] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
800428a: f443 7300 orr.w r3, r3, #512 ; 0x200
800428e: 6313 str r3, [r2, #48] ; 0x30
8004290: 4b45 ldr r3, [pc, #276] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
8004292: 6b1b ldr r3, [r3, #48] ; 0x30
8004294: f403 7300 and.w r3, r3, #512 ; 0x200
8004298: 61bb str r3, [r7, #24]
800429a: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOK_CLK_ENABLE();
800429c: 4b42 ldr r3, [pc, #264] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
800429e: 6b1b ldr r3, [r3, #48] ; 0x30
80042a0: 4a41 ldr r2, [pc, #260] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
80042a2: f443 6380 orr.w r3, r3, #1024 ; 0x400
80042a6: 6313 str r3, [r2, #48] ; 0x30
80042a8: 4b3f ldr r3, [pc, #252] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
80042aa: 6b1b ldr r3, [r3, #48] ; 0x30
80042ac: f403 6380 and.w r3, r3, #1024 ; 0x400
80042b0: 617b str r3, [r7, #20]
80042b2: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOG_CLK_ENABLE();
80042b4: 4b3c ldr r3, [pc, #240] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
80042b6: 6b1b ldr r3, [r3, #48] ; 0x30
80042b8: 4a3b ldr r2, [pc, #236] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
80042ba: f043 0340 orr.w r3, r3, #64 ; 0x40
80042be: 6313 str r3, [r2, #48] ; 0x30
80042c0: 4b39 ldr r3, [pc, #228] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
80042c2: 6b1b ldr r3, [r3, #48] ; 0x30
80042c4: f003 0340 and.w r3, r3, #64 ; 0x40
80042c8: 613b str r3, [r7, #16]
80042ca: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOI_CLK_ENABLE();
80042cc: 4b36 ldr r3, [pc, #216] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
80042ce: 6b1b ldr r3, [r3, #48] ; 0x30
80042d0: 4a35 ldr r2, [pc, #212] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
80042d2: f443 7380 orr.w r3, r3, #256 ; 0x100
80042d6: 6313 str r3, [r2, #48] ; 0x30
80042d8: 4b33 ldr r3, [pc, #204] ; (80043a8 <HAL_LTDC_MspInit+0x178>)
80042da: 6b1b ldr r3, [r3, #48] ; 0x30
80042dc: f403 7380 and.w r3, r3, #256 ; 0x100
80042e0: 60fb str r3, [r7, #12]
80042e2: 68fb ldr r3, [r7, #12]
PJ3 ------> LTDC_R4
PJ2 ------> LTDC_R3
PJ0 ------> LTDC_R1
PJ1 ------> LTDC_R2
*/
GPIO_InitStruct.Pin = LCD_B0_Pin;
80042e4: 2310 movs r3, #16
80042e6: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80042e8: 2302 movs r3, #2
80042ea: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
80042ec: 2300 movs r3, #0
80042ee: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80042f0: 2300 movs r3, #0
80042f2: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
80042f4: 230e movs r3, #14
80042f6: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(LCD_B0_GPIO_Port, &GPIO_InitStruct);
80042f8: f107 0324 add.w r3, r7, #36 ; 0x24
80042fc: 4619 mov r1, r3
80042fe: 482b ldr r0, [pc, #172] ; (80043ac <HAL_LTDC_MspInit+0x17c>)
8004300: f003 f93c bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = LCD_B1_Pin|LCD_B2_Pin|LCD_B3_Pin|LCD_G4_Pin
8004304: f64e 73ff movw r3, #61439 ; 0xefff
8004308: 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;
800430a: 2302 movs r3, #2
800430c: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800430e: 2300 movs r3, #0
8004310: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004312: 2300 movs r3, #0
8004314: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
8004316: 230e movs r3, #14
8004318: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOJ, &GPIO_InitStruct);
800431a: f107 0324 add.w r3, r7, #36 ; 0x24
800431e: 4619 mov r1, r3
8004320: 4823 ldr r0, [pc, #140] ; (80043b0 <HAL_LTDC_MspInit+0x180>)
8004322: f003 f92b bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = LCD_DE_Pin|LCD_B7_Pin|LCD_B6_Pin|LCD_B5_Pin
8004326: 23f7 movs r3, #247 ; 0xf7
8004328: 627b str r3, [r7, #36] ; 0x24
|LCD_G6_Pin|LCD_G7_Pin|LCD_G5_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800432a: 2302 movs r3, #2
800432c: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800432e: 2300 movs r3, #0
8004330: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004332: 2300 movs r3, #0
8004334: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
8004336: 230e movs r3, #14
8004338: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOK, &GPIO_InitStruct);
800433a: f107 0324 add.w r3, r7, #36 ; 0x24
800433e: 4619 mov r1, r3
8004340: 481c ldr r0, [pc, #112] ; (80043b4 <HAL_LTDC_MspInit+0x184>)
8004342: f003 f91b bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = LCD_B4_Pin;
8004346: f44f 5380 mov.w r3, #4096 ; 0x1000
800434a: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800434c: 2302 movs r3, #2
800434e: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004350: 2300 movs r3, #0
8004352: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004354: 2300 movs r3, #0
8004356: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF9_LTDC;
8004358: 2309 movs r3, #9
800435a: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(LCD_B4_GPIO_Port, &GPIO_InitStruct);
800435c: f107 0324 add.w r3, r7, #36 ; 0x24
8004360: 4619 mov r1, r3
8004362: 4815 ldr r0, [pc, #84] ; (80043b8 <HAL_LTDC_MspInit+0x188>)
8004364: f003 f90a bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = LCD_HSYNC_Pin|LCD_VSYNC_Pin|LCD_R0_Pin|LCD_CLK_Pin;
8004368: f44f 4346 mov.w r3, #50688 ; 0xc600
800436c: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800436e: 2302 movs r3, #2
8004370: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004372: 2300 movs r3, #0
8004374: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004376: 2300 movs r3, #0
8004378: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
800437a: 230e movs r3, #14
800437c: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
800437e: f107 0324 add.w r3, r7, #36 ; 0x24
8004382: 4619 mov r1, r3
8004384: 480d ldr r0, [pc, #52] ; (80043bc <HAL_LTDC_MspInit+0x18c>)
8004386: f003 f8f9 bl 800757c <HAL_GPIO_Init>
/* LTDC interrupt Init */
HAL_NVIC_SetPriority(LTDC_IRQn, 5, 0);
800438a: 2200 movs r2, #0
800438c: 2105 movs r1, #5
800438e: 2058 movs r0, #88 ; 0x58
8004390: f001 f944 bl 800561c <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(LTDC_IRQn);
8004394: 2058 movs r0, #88 ; 0x58
8004396: f001 f95d bl 8005654 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN LTDC_MspInit 1 */
/* USER CODE END LTDC_MspInit 1 */
}
}
800439a: bf00 nop
800439c: 3738 adds r7, #56 ; 0x38
800439e: 46bd mov sp, r7
80043a0: bd80 pop {r7, pc}
80043a2: bf00 nop
80043a4: 40016800 .word 0x40016800
80043a8: 40023800 .word 0x40023800
80043ac: 40021000 .word 0x40021000
80043b0: 40022400 .word 0x40022400
80043b4: 40022800 .word 0x40022800
80043b8: 40021800 .word 0x40021800
80043bc: 40022000 .word 0x40022000
080043c0 <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)
{
80043c0: b480 push {r7}
80043c2: b085 sub sp, #20
80043c4: af00 add r7, sp, #0
80043c6: 6078 str r0, [r7, #4]
if(hrng->Instance==RNG)
80043c8: 687b ldr r3, [r7, #4]
80043ca: 681b ldr r3, [r3, #0]
80043cc: 4a0a ldr r2, [pc, #40] ; (80043f8 <HAL_RNG_MspInit+0x38>)
80043ce: 4293 cmp r3, r2
80043d0: d10b bne.n 80043ea <HAL_RNG_MspInit+0x2a>
{
/* USER CODE BEGIN RNG_MspInit 0 */
/* USER CODE END RNG_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_RNG_CLK_ENABLE();
80043d2: 4b0a ldr r3, [pc, #40] ; (80043fc <HAL_RNG_MspInit+0x3c>)
80043d4: 6b5b ldr r3, [r3, #52] ; 0x34
80043d6: 4a09 ldr r2, [pc, #36] ; (80043fc <HAL_RNG_MspInit+0x3c>)
80043d8: f043 0340 orr.w r3, r3, #64 ; 0x40
80043dc: 6353 str r3, [r2, #52] ; 0x34
80043de: 4b07 ldr r3, [pc, #28] ; (80043fc <HAL_RNG_MspInit+0x3c>)
80043e0: 6b5b ldr r3, [r3, #52] ; 0x34
80043e2: f003 0340 and.w r3, r3, #64 ; 0x40
80043e6: 60fb str r3, [r7, #12]
80043e8: 68fb ldr r3, [r7, #12]
/* USER CODE BEGIN RNG_MspInit 1 */
/* USER CODE END RNG_MspInit 1 */
}
}
80043ea: bf00 nop
80043ec: 3714 adds r7, #20
80043ee: 46bd mov sp, r7
80043f0: f85d 7b04 ldr.w r7, [sp], #4
80043f4: 4770 bx lr
80043f6: bf00 nop
80043f8: 50060800 .word 0x50060800
80043fc: 40023800 .word 0x40023800
08004400 <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)
{
8004400: b480 push {r7}
8004402: b083 sub sp, #12
8004404: af00 add r7, sp, #0
8004406: 6078 str r0, [r7, #4]
if(hrtc->Instance==RTC)
8004408: 687b ldr r3, [r7, #4]
800440a: 681b ldr r3, [r3, #0]
800440c: 4a07 ldr r2, [pc, #28] ; (800442c <HAL_RTC_MspInit+0x2c>)
800440e: 4293 cmp r3, r2
8004410: d105 bne.n 800441e <HAL_RTC_MspInit+0x1e>
{
/* USER CODE BEGIN RTC_MspInit 0 */
/* USER CODE END RTC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_RTC_ENABLE();
8004412: 4b07 ldr r3, [pc, #28] ; (8004430 <HAL_RTC_MspInit+0x30>)
8004414: 6f1b ldr r3, [r3, #112] ; 0x70
8004416: 4a06 ldr r2, [pc, #24] ; (8004430 <HAL_RTC_MspInit+0x30>)
8004418: f443 4300 orr.w r3, r3, #32768 ; 0x8000
800441c: 6713 str r3, [r2, #112] ; 0x70
/* USER CODE BEGIN RTC_MspInit 1 */
/* USER CODE END RTC_MspInit 1 */
}
}
800441e: bf00 nop
8004420: 370c adds r7, #12
8004422: 46bd mov sp, r7
8004424: f85d 7b04 ldr.w r7, [sp], #4
8004428: 4770 bx lr
800442a: bf00 nop
800442c: 40002800 .word 0x40002800
8004430: 40023800 .word 0x40023800
08004434 <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)
{
8004434: b580 push {r7, lr}
8004436: b08a sub sp, #40 ; 0x28
8004438: af00 add r7, sp, #0
800443a: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
800443c: f107 0314 add.w r3, r7, #20
8004440: 2200 movs r2, #0
8004442: 601a str r2, [r3, #0]
8004444: 605a str r2, [r3, #4]
8004446: 609a str r2, [r3, #8]
8004448: 60da str r2, [r3, #12]
800444a: 611a str r2, [r3, #16]
if(hspi->Instance==SPI2)
800444c: 687b ldr r3, [r7, #4]
800444e: 681b ldr r3, [r3, #0]
8004450: 4a2d ldr r2, [pc, #180] ; (8004508 <HAL_SPI_MspInit+0xd4>)
8004452: 4293 cmp r3, r2
8004454: d154 bne.n 8004500 <HAL_SPI_MspInit+0xcc>
{
/* USER CODE BEGIN SPI2_MspInit 0 */
/* USER CODE END SPI2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_SPI2_CLK_ENABLE();
8004456: 4b2d ldr r3, [pc, #180] ; (800450c <HAL_SPI_MspInit+0xd8>)
8004458: 6c1b ldr r3, [r3, #64] ; 0x40
800445a: 4a2c ldr r2, [pc, #176] ; (800450c <HAL_SPI_MspInit+0xd8>)
800445c: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8004460: 6413 str r3, [r2, #64] ; 0x40
8004462: 4b2a ldr r3, [pc, #168] ; (800450c <HAL_SPI_MspInit+0xd8>)
8004464: 6c1b ldr r3, [r3, #64] ; 0x40
8004466: f403 4380 and.w r3, r3, #16384 ; 0x4000
800446a: 613b str r3, [r7, #16]
800446c: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOI_CLK_ENABLE();
800446e: 4b27 ldr r3, [pc, #156] ; (800450c <HAL_SPI_MspInit+0xd8>)
8004470: 6b1b ldr r3, [r3, #48] ; 0x30
8004472: 4a26 ldr r2, [pc, #152] ; (800450c <HAL_SPI_MspInit+0xd8>)
8004474: f443 7380 orr.w r3, r3, #256 ; 0x100
8004478: 6313 str r3, [r2, #48] ; 0x30
800447a: 4b24 ldr r3, [pc, #144] ; (800450c <HAL_SPI_MspInit+0xd8>)
800447c: 6b1b ldr r3, [r3, #48] ; 0x30
800447e: f403 7380 and.w r3, r3, #256 ; 0x100
8004482: 60fb str r3, [r7, #12]
8004484: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOB_CLK_ENABLE();
8004486: 4b21 ldr r3, [pc, #132] ; (800450c <HAL_SPI_MspInit+0xd8>)
8004488: 6b1b ldr r3, [r3, #48] ; 0x30
800448a: 4a20 ldr r2, [pc, #128] ; (800450c <HAL_SPI_MspInit+0xd8>)
800448c: f043 0302 orr.w r3, r3, #2
8004490: 6313 str r3, [r2, #48] ; 0x30
8004492: 4b1e ldr r3, [pc, #120] ; (800450c <HAL_SPI_MspInit+0xd8>)
8004494: 6b1b ldr r3, [r3, #48] ; 0x30
8004496: f003 0302 and.w r3, r3, #2
800449a: 60bb str r3, [r7, #8]
800449c: 68bb ldr r3, [r7, #8]
PI1 ------> SPI2_SCK
PI0 ------> SPI2_NSS
PB14 ------> SPI2_MISO
PB15 ------> SPI2_MOSI
*/
GPIO_InitStruct.Pin = ARDUINO_SCK_D13_Pin;
800449e: 2302 movs r3, #2
80044a0: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80044a2: 2302 movs r3, #2
80044a4: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80044a6: 2300 movs r3, #0
80044a8: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80044aa: 2300 movs r3, #0
80044ac: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
80044ae: 2305 movs r3, #5
80044b0: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(ARDUINO_SCK_D13_GPIO_Port, &GPIO_InitStruct);
80044b2: f107 0314 add.w r3, r7, #20
80044b6: 4619 mov r1, r3
80044b8: 4815 ldr r0, [pc, #84] ; (8004510 <HAL_SPI_MspInit+0xdc>)
80044ba: f003 f85f bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_0;
80044be: 2301 movs r3, #1
80044c0: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80044c2: 2302 movs r3, #2
80044c4: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80044c6: 2300 movs r3, #0
80044c8: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80044ca: 2303 movs r3, #3
80044cc: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
80044ce: 2305 movs r3, #5
80044d0: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
80044d2: f107 0314 add.w r3, r7, #20
80044d6: 4619 mov r1, r3
80044d8: 480d ldr r0, [pc, #52] ; (8004510 <HAL_SPI_MspInit+0xdc>)
80044da: f003 f84f bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15;
80044de: f44f 4340 mov.w r3, #49152 ; 0xc000
80044e2: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80044e4: 2302 movs r3, #2
80044e6: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80044e8: 2300 movs r3, #0
80044ea: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80044ec: 2303 movs r3, #3
80044ee: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
80044f0: 2305 movs r3, #5
80044f2: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
80044f4: f107 0314 add.w r3, r7, #20
80044f8: 4619 mov r1, r3
80044fa: 4806 ldr r0, [pc, #24] ; (8004514 <HAL_SPI_MspInit+0xe0>)
80044fc: f003 f83e bl 800757c <HAL_GPIO_Init>
/* USER CODE BEGIN SPI2_MspInit 1 */
/* USER CODE END SPI2_MspInit 1 */
}
}
8004500: bf00 nop
8004502: 3728 adds r7, #40 ; 0x28
8004504: 46bd mov sp, r7
8004506: bd80 pop {r7, pc}
8004508: 40003800 .word 0x40003800
800450c: 40023800 .word 0x40023800
8004510: 40022000 .word 0x40022000
8004514: 40020400 .word 0x40020400
08004518 <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)
{
8004518: b480 push {r7}
800451a: b089 sub sp, #36 ; 0x24
800451c: af00 add r7, sp, #0
800451e: 6078 str r0, [r7, #4]
if(htim_base->Instance==TIM1)
8004520: 687b ldr r3, [r7, #4]
8004522: 681b ldr r3, [r3, #0]
8004524: 4a2e ldr r2, [pc, #184] ; (80045e0 <HAL_TIM_Base_MspInit+0xc8>)
8004526: 4293 cmp r3, r2
8004528: d10c bne.n 8004544 <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();
800452a: 4b2e ldr r3, [pc, #184] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
800452c: 6c5b ldr r3, [r3, #68] ; 0x44
800452e: 4a2d ldr r2, [pc, #180] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
8004530: f043 0301 orr.w r3, r3, #1
8004534: 6453 str r3, [r2, #68] ; 0x44
8004536: 4b2b ldr r3, [pc, #172] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
8004538: 6c5b ldr r3, [r3, #68] ; 0x44
800453a: f003 0301 and.w r3, r3, #1
800453e: 61fb str r3, [r7, #28]
8004540: 69fb ldr r3, [r7, #28]
/* USER CODE BEGIN TIM8_MspInit 1 */
/* USER CODE END TIM8_MspInit 1 */
}
}
8004542: e046 b.n 80045d2 <HAL_TIM_Base_MspInit+0xba>
else if(htim_base->Instance==TIM2)
8004544: 687b ldr r3, [r7, #4]
8004546: 681b ldr r3, [r3, #0]
8004548: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800454c: d10c bne.n 8004568 <HAL_TIM_Base_MspInit+0x50>
__HAL_RCC_TIM2_CLK_ENABLE();
800454e: 4b25 ldr r3, [pc, #148] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
8004550: 6c1b ldr r3, [r3, #64] ; 0x40
8004552: 4a24 ldr r2, [pc, #144] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
8004554: f043 0301 orr.w r3, r3, #1
8004558: 6413 str r3, [r2, #64] ; 0x40
800455a: 4b22 ldr r3, [pc, #136] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
800455c: 6c1b ldr r3, [r3, #64] ; 0x40
800455e: f003 0301 and.w r3, r3, #1
8004562: 61bb str r3, [r7, #24]
8004564: 69bb ldr r3, [r7, #24]
}
8004566: e034 b.n 80045d2 <HAL_TIM_Base_MspInit+0xba>
else if(htim_base->Instance==TIM3)
8004568: 687b ldr r3, [r7, #4]
800456a: 681b ldr r3, [r3, #0]
800456c: 4a1e ldr r2, [pc, #120] ; (80045e8 <HAL_TIM_Base_MspInit+0xd0>)
800456e: 4293 cmp r3, r2
8004570: d10c bne.n 800458c <HAL_TIM_Base_MspInit+0x74>
__HAL_RCC_TIM3_CLK_ENABLE();
8004572: 4b1c ldr r3, [pc, #112] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
8004574: 6c1b ldr r3, [r3, #64] ; 0x40
8004576: 4a1b ldr r2, [pc, #108] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
8004578: f043 0302 orr.w r3, r3, #2
800457c: 6413 str r3, [r2, #64] ; 0x40
800457e: 4b19 ldr r3, [pc, #100] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
8004580: 6c1b ldr r3, [r3, #64] ; 0x40
8004582: f003 0302 and.w r3, r3, #2
8004586: 617b str r3, [r7, #20]
8004588: 697b ldr r3, [r7, #20]
}
800458a: e022 b.n 80045d2 <HAL_TIM_Base_MspInit+0xba>
else if(htim_base->Instance==TIM5)
800458c: 687b ldr r3, [r7, #4]
800458e: 681b ldr r3, [r3, #0]
8004590: 4a16 ldr r2, [pc, #88] ; (80045ec <HAL_TIM_Base_MspInit+0xd4>)
8004592: 4293 cmp r3, r2
8004594: d10c bne.n 80045b0 <HAL_TIM_Base_MspInit+0x98>
__HAL_RCC_TIM5_CLK_ENABLE();
8004596: 4b13 ldr r3, [pc, #76] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
8004598: 6c1b ldr r3, [r3, #64] ; 0x40
800459a: 4a12 ldr r2, [pc, #72] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
800459c: f043 0308 orr.w r3, r3, #8
80045a0: 6413 str r3, [r2, #64] ; 0x40
80045a2: 4b10 ldr r3, [pc, #64] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
80045a4: 6c1b ldr r3, [r3, #64] ; 0x40
80045a6: f003 0308 and.w r3, r3, #8
80045aa: 613b str r3, [r7, #16]
80045ac: 693b ldr r3, [r7, #16]
}
80045ae: e010 b.n 80045d2 <HAL_TIM_Base_MspInit+0xba>
else if(htim_base->Instance==TIM8)
80045b0: 687b ldr r3, [r7, #4]
80045b2: 681b ldr r3, [r3, #0]
80045b4: 4a0e ldr r2, [pc, #56] ; (80045f0 <HAL_TIM_Base_MspInit+0xd8>)
80045b6: 4293 cmp r3, r2
80045b8: d10b bne.n 80045d2 <HAL_TIM_Base_MspInit+0xba>
__HAL_RCC_TIM8_CLK_ENABLE();
80045ba: 4b0a ldr r3, [pc, #40] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
80045bc: 6c5b ldr r3, [r3, #68] ; 0x44
80045be: 4a09 ldr r2, [pc, #36] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
80045c0: f043 0302 orr.w r3, r3, #2
80045c4: 6453 str r3, [r2, #68] ; 0x44
80045c6: 4b07 ldr r3, [pc, #28] ; (80045e4 <HAL_TIM_Base_MspInit+0xcc>)
80045c8: 6c5b ldr r3, [r3, #68] ; 0x44
80045ca: f003 0302 and.w r3, r3, #2
80045ce: 60fb str r3, [r7, #12]
80045d0: 68fb ldr r3, [r7, #12]
}
80045d2: bf00 nop
80045d4: 3724 adds r7, #36 ; 0x24
80045d6: 46bd mov sp, r7
80045d8: f85d 7b04 ldr.w r7, [sp], #4
80045dc: 4770 bx lr
80045de: bf00 nop
80045e0: 40010000 .word 0x40010000
80045e4: 40023800 .word 0x40023800
80045e8: 40000400 .word 0x40000400
80045ec: 40000c00 .word 0x40000c00
80045f0: 40010400 .word 0x40010400
080045f4 <HAL_TIM_MspPostInit>:
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{
80045f4: b580 push {r7, lr}
80045f6: b08a sub sp, #40 ; 0x28
80045f8: af00 add r7, sp, #0
80045fa: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
80045fc: f107 0314 add.w r3, r7, #20
8004600: 2200 movs r2, #0
8004602: 601a str r2, [r3, #0]
8004604: 605a str r2, [r3, #4]
8004606: 609a str r2, [r3, #8]
8004608: 60da str r2, [r3, #12]
800460a: 611a str r2, [r3, #16]
if(htim->Instance==TIM3)
800460c: 687b ldr r3, [r7, #4]
800460e: 681b ldr r3, [r3, #0]
8004610: 4a22 ldr r2, [pc, #136] ; (800469c <HAL_TIM_MspPostInit+0xa8>)
8004612: 4293 cmp r3, r2
8004614: d11c bne.n 8004650 <HAL_TIM_MspPostInit+0x5c>
{
/* USER CODE BEGIN TIM3_MspPostInit 0 */
/* USER CODE END TIM3_MspPostInit 0 */
__HAL_RCC_GPIOB_CLK_ENABLE();
8004616: 4b22 ldr r3, [pc, #136] ; (80046a0 <HAL_TIM_MspPostInit+0xac>)
8004618: 6b1b ldr r3, [r3, #48] ; 0x30
800461a: 4a21 ldr r2, [pc, #132] ; (80046a0 <HAL_TIM_MspPostInit+0xac>)
800461c: f043 0302 orr.w r3, r3, #2
8004620: 6313 str r3, [r2, #48] ; 0x30
8004622: 4b1f ldr r3, [pc, #124] ; (80046a0 <HAL_TIM_MspPostInit+0xac>)
8004624: 6b1b ldr r3, [r3, #48] ; 0x30
8004626: f003 0302 and.w r3, r3, #2
800462a: 613b str r3, [r7, #16]
800462c: 693b ldr r3, [r7, #16]
/**TIM3 GPIO Configuration
PB4 ------> TIM3_CH1
*/
GPIO_InitStruct.Pin = GPIO_PIN_4;
800462e: 2310 movs r3, #16
8004630: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004632: 2302 movs r3, #2
8004634: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004636: 2300 movs r3, #0
8004638: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
800463a: 2300 movs r3, #0
800463c: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
800463e: 2302 movs r3, #2
8004640: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
8004642: f107 0314 add.w r3, r7, #20
8004646: 4619 mov r1, r3
8004648: 4816 ldr r0, [pc, #88] ; (80046a4 <HAL_TIM_MspPostInit+0xb0>)
800464a: f002 ff97 bl 800757c <HAL_GPIO_Init>
/* USER CODE BEGIN TIM8_MspPostInit 1 */
/* USER CODE END TIM8_MspPostInit 1 */
}
}
800464e: e020 b.n 8004692 <HAL_TIM_MspPostInit+0x9e>
else if(htim->Instance==TIM8)
8004650: 687b ldr r3, [r7, #4]
8004652: 681b ldr r3, [r3, #0]
8004654: 4a14 ldr r2, [pc, #80] ; (80046a8 <HAL_TIM_MspPostInit+0xb4>)
8004656: 4293 cmp r3, r2
8004658: d11b bne.n 8004692 <HAL_TIM_MspPostInit+0x9e>
__HAL_RCC_GPIOI_CLK_ENABLE();
800465a: 4b11 ldr r3, [pc, #68] ; (80046a0 <HAL_TIM_MspPostInit+0xac>)
800465c: 6b1b ldr r3, [r3, #48] ; 0x30
800465e: 4a10 ldr r2, [pc, #64] ; (80046a0 <HAL_TIM_MspPostInit+0xac>)
8004660: f443 7380 orr.w r3, r3, #256 ; 0x100
8004664: 6313 str r3, [r2, #48] ; 0x30
8004666: 4b0e ldr r3, [pc, #56] ; (80046a0 <HAL_TIM_MspPostInit+0xac>)
8004668: 6b1b ldr r3, [r3, #48] ; 0x30
800466a: f403 7380 and.w r3, r3, #256 ; 0x100
800466e: 60fb str r3, [r7, #12]
8004670: 68fb ldr r3, [r7, #12]
GPIO_InitStruct.Pin = GPIO_PIN_2;
8004672: 2304 movs r3, #4
8004674: 617b str r3, [r7, #20]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004676: 2302 movs r3, #2
8004678: 61bb str r3, [r7, #24]
GPIO_InitStruct.Pull = GPIO_NOPULL;
800467a: 2300 movs r3, #0
800467c: 61fb str r3, [r7, #28]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
800467e: 2300 movs r3, #0
8004680: 623b str r3, [r7, #32]
GPIO_InitStruct.Alternate = GPIO_AF3_TIM8;
8004682: 2303 movs r3, #3
8004684: 627b str r3, [r7, #36] ; 0x24
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
8004686: f107 0314 add.w r3, r7, #20
800468a: 4619 mov r1, r3
800468c: 4807 ldr r0, [pc, #28] ; (80046ac <HAL_TIM_MspPostInit+0xb8>)
800468e: f002 ff75 bl 800757c <HAL_GPIO_Init>
}
8004692: bf00 nop
8004694: 3728 adds r7, #40 ; 0x28
8004696: 46bd mov sp, r7
8004698: bd80 pop {r7, pc}
800469a: bf00 nop
800469c: 40000400 .word 0x40000400
80046a0: 40023800 .word 0x40023800
80046a4: 40020400 .word 0x40020400
80046a8: 40010400 .word 0x40010400
80046ac: 40022000 .word 0x40022000
080046b0 <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)
{
80046b0: b580 push {r7, lr}
80046b2: b08e sub sp, #56 ; 0x38
80046b4: af00 add r7, sp, #0
80046b6: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
80046b8: f107 0324 add.w r3, r7, #36 ; 0x24
80046bc: 2200 movs r2, #0
80046be: 601a str r2, [r3, #0]
80046c0: 605a str r2, [r3, #4]
80046c2: 609a str r2, [r3, #8]
80046c4: 60da str r2, [r3, #12]
80046c6: 611a str r2, [r3, #16]
if(huart->Instance==UART7)
80046c8: 687b ldr r3, [r7, #4]
80046ca: 681b ldr r3, [r3, #0]
80046cc: 4a53 ldr r2, [pc, #332] ; (800481c <HAL_UART_MspInit+0x16c>)
80046ce: 4293 cmp r3, r2
80046d0: d128 bne.n 8004724 <HAL_UART_MspInit+0x74>
{
/* USER CODE BEGIN UART7_MspInit 0 */
/* USER CODE END UART7_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_UART7_CLK_ENABLE();
80046d2: 4b53 ldr r3, [pc, #332] ; (8004820 <HAL_UART_MspInit+0x170>)
80046d4: 6c1b ldr r3, [r3, #64] ; 0x40
80046d6: 4a52 ldr r2, [pc, #328] ; (8004820 <HAL_UART_MspInit+0x170>)
80046d8: f043 4380 orr.w r3, r3, #1073741824 ; 0x40000000
80046dc: 6413 str r3, [r2, #64] ; 0x40
80046de: 4b50 ldr r3, [pc, #320] ; (8004820 <HAL_UART_MspInit+0x170>)
80046e0: 6c1b ldr r3, [r3, #64] ; 0x40
80046e2: f003 4380 and.w r3, r3, #1073741824 ; 0x40000000
80046e6: 623b str r3, [r7, #32]
80046e8: 6a3b ldr r3, [r7, #32]
__HAL_RCC_GPIOF_CLK_ENABLE();
80046ea: 4b4d ldr r3, [pc, #308] ; (8004820 <HAL_UART_MspInit+0x170>)
80046ec: 6b1b ldr r3, [r3, #48] ; 0x30
80046ee: 4a4c ldr r2, [pc, #304] ; (8004820 <HAL_UART_MspInit+0x170>)
80046f0: f043 0320 orr.w r3, r3, #32
80046f4: 6313 str r3, [r2, #48] ; 0x30
80046f6: 4b4a ldr r3, [pc, #296] ; (8004820 <HAL_UART_MspInit+0x170>)
80046f8: 6b1b ldr r3, [r3, #48] ; 0x30
80046fa: f003 0320 and.w r3, r3, #32
80046fe: 61fb str r3, [r7, #28]
8004700: 69fb ldr r3, [r7, #28]
/**UART7 GPIO Configuration
PF7 ------> UART7_TX
PF6 ------> UART7_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_6;
8004702: 23c0 movs r3, #192 ; 0xc0
8004704: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004706: 2302 movs r3, #2
8004708: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800470a: 2300 movs r3, #0
800470c: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
800470e: 2303 movs r3, #3
8004710: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF8_UART7;
8004712: 2308 movs r3, #8
8004714: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
8004716: f107 0324 add.w r3, r7, #36 ; 0x24
800471a: 4619 mov r1, r3
800471c: 4841 ldr r0, [pc, #260] ; (8004824 <HAL_UART_MspInit+0x174>)
800471e: f002 ff2d bl 800757c <HAL_GPIO_Init>
/* USER CODE BEGIN USART6_MspInit 1 */
/* USER CODE END USART6_MspInit 1 */
}
}
8004722: e077 b.n 8004814 <HAL_UART_MspInit+0x164>
else if(huart->Instance==USART1)
8004724: 687b ldr r3, [r7, #4]
8004726: 681b ldr r3, [r3, #0]
8004728: 4a3f ldr r2, [pc, #252] ; (8004828 <HAL_UART_MspInit+0x178>)
800472a: 4293 cmp r3, r2
800472c: d145 bne.n 80047ba <HAL_UART_MspInit+0x10a>
__HAL_RCC_USART1_CLK_ENABLE();
800472e: 4b3c ldr r3, [pc, #240] ; (8004820 <HAL_UART_MspInit+0x170>)
8004730: 6c5b ldr r3, [r3, #68] ; 0x44
8004732: 4a3b ldr r2, [pc, #236] ; (8004820 <HAL_UART_MspInit+0x170>)
8004734: f043 0310 orr.w r3, r3, #16
8004738: 6453 str r3, [r2, #68] ; 0x44
800473a: 4b39 ldr r3, [pc, #228] ; (8004820 <HAL_UART_MspInit+0x170>)
800473c: 6c5b ldr r3, [r3, #68] ; 0x44
800473e: f003 0310 and.w r3, r3, #16
8004742: 61bb str r3, [r7, #24]
8004744: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOB_CLK_ENABLE();
8004746: 4b36 ldr r3, [pc, #216] ; (8004820 <HAL_UART_MspInit+0x170>)
8004748: 6b1b ldr r3, [r3, #48] ; 0x30
800474a: 4a35 ldr r2, [pc, #212] ; (8004820 <HAL_UART_MspInit+0x170>)
800474c: f043 0302 orr.w r3, r3, #2
8004750: 6313 str r3, [r2, #48] ; 0x30
8004752: 4b33 ldr r3, [pc, #204] ; (8004820 <HAL_UART_MspInit+0x170>)
8004754: 6b1b ldr r3, [r3, #48] ; 0x30
8004756: f003 0302 and.w r3, r3, #2
800475a: 617b str r3, [r7, #20]
800475c: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOA_CLK_ENABLE();
800475e: 4b30 ldr r3, [pc, #192] ; (8004820 <HAL_UART_MspInit+0x170>)
8004760: 6b1b ldr r3, [r3, #48] ; 0x30
8004762: 4a2f ldr r2, [pc, #188] ; (8004820 <HAL_UART_MspInit+0x170>)
8004764: f043 0301 orr.w r3, r3, #1
8004768: 6313 str r3, [r2, #48] ; 0x30
800476a: 4b2d ldr r3, [pc, #180] ; (8004820 <HAL_UART_MspInit+0x170>)
800476c: 6b1b ldr r3, [r3, #48] ; 0x30
800476e: f003 0301 and.w r3, r3, #1
8004772: 613b str r3, [r7, #16]
8004774: 693b ldr r3, [r7, #16]
GPIO_InitStruct.Pin = VCP_RX_Pin;
8004776: 2380 movs r3, #128 ; 0x80
8004778: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800477a: 2302 movs r3, #2
800477c: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800477e: 2300 movs r3, #0
8004780: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
8004782: 2300 movs r3, #0
8004784: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
8004786: 2307 movs r3, #7
8004788: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(VCP_RX_GPIO_Port, &GPIO_InitStruct);
800478a: f107 0324 add.w r3, r7, #36 ; 0x24
800478e: 4619 mov r1, r3
8004790: 4826 ldr r0, [pc, #152] ; (800482c <HAL_UART_MspInit+0x17c>)
8004792: f002 fef3 bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = VCP_TX_Pin;
8004796: f44f 7300 mov.w r3, #512 ; 0x200
800479a: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800479c: 2302 movs r3, #2
800479e: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
80047a0: 2300 movs r3, #0
80047a2: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
80047a4: 2300 movs r3, #0
80047a6: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
80047a8: 2307 movs r3, #7
80047aa: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(VCP_TX_GPIO_Port, &GPIO_InitStruct);
80047ac: f107 0324 add.w r3, r7, #36 ; 0x24
80047b0: 4619 mov r1, r3
80047b2: 481f ldr r0, [pc, #124] ; (8004830 <HAL_UART_MspInit+0x180>)
80047b4: f002 fee2 bl 800757c <HAL_GPIO_Init>
}
80047b8: e02c b.n 8004814 <HAL_UART_MspInit+0x164>
else if(huart->Instance==USART6)
80047ba: 687b ldr r3, [r7, #4]
80047bc: 681b ldr r3, [r3, #0]
80047be: 4a1d ldr r2, [pc, #116] ; (8004834 <HAL_UART_MspInit+0x184>)
80047c0: 4293 cmp r3, r2
80047c2: d127 bne.n 8004814 <HAL_UART_MspInit+0x164>
__HAL_RCC_USART6_CLK_ENABLE();
80047c4: 4b16 ldr r3, [pc, #88] ; (8004820 <HAL_UART_MspInit+0x170>)
80047c6: 6c5b ldr r3, [r3, #68] ; 0x44
80047c8: 4a15 ldr r2, [pc, #84] ; (8004820 <HAL_UART_MspInit+0x170>)
80047ca: f043 0320 orr.w r3, r3, #32
80047ce: 6453 str r3, [r2, #68] ; 0x44
80047d0: 4b13 ldr r3, [pc, #76] ; (8004820 <HAL_UART_MspInit+0x170>)
80047d2: 6c5b ldr r3, [r3, #68] ; 0x44
80047d4: f003 0320 and.w r3, r3, #32
80047d8: 60fb str r3, [r7, #12]
80047da: 68fb ldr r3, [r7, #12]
__HAL_RCC_GPIOC_CLK_ENABLE();
80047dc: 4b10 ldr r3, [pc, #64] ; (8004820 <HAL_UART_MspInit+0x170>)
80047de: 6b1b ldr r3, [r3, #48] ; 0x30
80047e0: 4a0f ldr r2, [pc, #60] ; (8004820 <HAL_UART_MspInit+0x170>)
80047e2: f043 0304 orr.w r3, r3, #4
80047e6: 6313 str r3, [r2, #48] ; 0x30
80047e8: 4b0d ldr r3, [pc, #52] ; (8004820 <HAL_UART_MspInit+0x170>)
80047ea: 6b1b ldr r3, [r3, #48] ; 0x30
80047ec: f003 0304 and.w r3, r3, #4
80047f0: 60bb str r3, [r7, #8]
80047f2: 68bb ldr r3, [r7, #8]
GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_6;
80047f4: 23c0 movs r3, #192 ; 0xc0
80047f6: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80047f8: 2302 movs r3, #2
80047fa: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
80047fc: 2300 movs r3, #0
80047fe: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004800: 2303 movs r3, #3
8004802: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF8_USART6;
8004804: 2308 movs r3, #8
8004806: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8004808: f107 0324 add.w r3, r7, #36 ; 0x24
800480c: 4619 mov r1, r3
800480e: 480a ldr r0, [pc, #40] ; (8004838 <HAL_UART_MspInit+0x188>)
8004810: f002 feb4 bl 800757c <HAL_GPIO_Init>
}
8004814: bf00 nop
8004816: 3738 adds r7, #56 ; 0x38
8004818: 46bd mov sp, r7
800481a: bd80 pop {r7, pc}
800481c: 40007800 .word 0x40007800
8004820: 40023800 .word 0x40023800
8004824: 40021400 .word 0x40021400
8004828: 40011000 .word 0x40011000
800482c: 40020400 .word 0x40020400
8004830: 40020000 .word 0x40020000
8004834: 40011400 .word 0x40011400
8004838: 40020800 .word 0x40020800
0800483c <HAL_FMC_MspInit>:
}
static uint32_t FMC_Initialized = 0;
static void HAL_FMC_MspInit(void){
800483c: b580 push {r7, lr}
800483e: b086 sub sp, #24
8004840: af00 add r7, sp, #0
/* USER CODE BEGIN FMC_MspInit 0 */
/* USER CODE END FMC_MspInit 0 */
GPIO_InitTypeDef GPIO_InitStruct ={0};
8004842: 1d3b adds r3, r7, #4
8004844: 2200 movs r2, #0
8004846: 601a str r2, [r3, #0]
8004848: 605a str r2, [r3, #4]
800484a: 609a str r2, [r3, #8]
800484c: 60da str r2, [r3, #12]
800484e: 611a str r2, [r3, #16]
if (FMC_Initialized) {
8004850: 4b3a ldr r3, [pc, #232] ; (800493c <HAL_FMC_MspInit+0x100>)
8004852: 681b ldr r3, [r3, #0]
8004854: 2b00 cmp r3, #0
8004856: d16d bne.n 8004934 <HAL_FMC_MspInit+0xf8>
return;
}
FMC_Initialized = 1;
8004858: 4b38 ldr r3, [pc, #224] ; (800493c <HAL_FMC_MspInit+0x100>)
800485a: 2201 movs r2, #1
800485c: 601a str r2, [r3, #0]
/* Peripheral clock enable */
__HAL_RCC_FMC_CLK_ENABLE();
800485e: 4b38 ldr r3, [pc, #224] ; (8004940 <HAL_FMC_MspInit+0x104>)
8004860: 6b9b ldr r3, [r3, #56] ; 0x38
8004862: 4a37 ldr r2, [pc, #220] ; (8004940 <HAL_FMC_MspInit+0x104>)
8004864: f043 0301 orr.w r3, r3, #1
8004868: 6393 str r3, [r2, #56] ; 0x38
800486a: 4b35 ldr r3, [pc, #212] ; (8004940 <HAL_FMC_MspInit+0x104>)
800486c: 6b9b ldr r3, [r3, #56] ; 0x38
800486e: f003 0301 and.w r3, r3, #1
8004872: 603b str r3, [r7, #0]
8004874: 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
8004876: f64f 7383 movw r3, #65411 ; 0xff83
800487a: 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;
800487c: 2302 movs r3, #2
800487e: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
8004880: 2300 movs r3, #0
8004882: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004884: 2303 movs r3, #3
8004886: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004888: 230c movs r3, #12
800488a: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
800488c: 1d3b adds r3, r7, #4
800488e: 4619 mov r1, r3
8004890: 482c ldr r0, [pc, #176] ; (8004944 <HAL_FMC_MspInit+0x108>)
8004892: f002 fe73 bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_15|GPIO_PIN_8|GPIO_PIN_1|GPIO_PIN_0
8004896: f248 1333 movw r3, #33075 ; 0x8133
800489a: 607b str r3, [r7, #4]
|GPIO_PIN_5|GPIO_PIN_4;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800489c: 2302 movs r3, #2
800489e: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80048a0: 2300 movs r3, #0
80048a2: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80048a4: 2303 movs r3, #3
80048a6: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
80048a8: 230c movs r3, #12
80048aa: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
80048ac: 1d3b adds r3, r7, #4
80048ae: 4619 mov r1, r3
80048b0: 4825 ldr r0, [pc, #148] ; (8004948 <HAL_FMC_MspInit+0x10c>)
80048b2: f002 fe63 bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_15|GPIO_PIN_10
80048b6: f24c 7303 movw r3, #50947 ; 0xc703
80048ba: 607b str r3, [r7, #4]
|GPIO_PIN_14|GPIO_PIN_9|GPIO_PIN_8;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80048bc: 2302 movs r3, #2
80048be: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80048c0: 2300 movs r3, #0
80048c2: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80048c4: 2303 movs r3, #3
80048c6: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
80048c8: 230c movs r3, #12
80048ca: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
80048cc: 1d3b adds r3, r7, #4
80048ce: 4619 mov r1, r3
80048d0: 481e ldr r0, [pc, #120] ; (800494c <HAL_FMC_MspInit+0x110>)
80048d2: f002 fe53 bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
80048d6: f64f 033f movw r3, #63551 ; 0xf83f
80048da: 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;
80048dc: 2302 movs r3, #2
80048de: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80048e0: 2300 movs r3, #0
80048e2: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
80048e4: 2303 movs r3, #3
80048e6: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
80048e8: 230c movs r3, #12
80048ea: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
80048ec: 1d3b adds r3, r7, #4
80048ee: 4619 mov r1, r3
80048f0: 4817 ldr r0, [pc, #92] ; (8004950 <HAL_FMC_MspInit+0x114>)
80048f2: f002 fe43 bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_3;
80048f6: 2328 movs r3, #40 ; 0x28
80048f8: 607b str r3, [r7, #4]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
80048fa: 2302 movs r3, #2
80048fc: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
80048fe: 2300 movs r3, #0
8004900: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004902: 2303 movs r3, #3
8004904: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004906: 230c movs r3, #12
8004908: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
800490a: 1d3b adds r3, r7, #4
800490c: 4619 mov r1, r3
800490e: 4811 ldr r0, [pc, #68] ; (8004954 <HAL_FMC_MspInit+0x118>)
8004910: f002 fe34 bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_3;
8004914: 2308 movs r3, #8
8004916: 607b str r3, [r7, #4]
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
8004918: 2302 movs r3, #2
800491a: 60bb str r3, [r7, #8]
GPIO_InitStruct.Pull = GPIO_NOPULL;
800491c: 2300 movs r3, #0
800491e: 60fb str r3, [r7, #12]
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
8004920: 2303 movs r3, #3
8004922: 613b str r3, [r7, #16]
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
8004924: 230c movs r3, #12
8004926: 617b str r3, [r7, #20]
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
8004928: 1d3b adds r3, r7, #4
800492a: 4619 mov r1, r3
800492c: 480a ldr r0, [pc, #40] ; (8004958 <HAL_FMC_MspInit+0x11c>)
800492e: f002 fe25 bl 800757c <HAL_GPIO_Init>
8004932: e000 b.n 8004936 <HAL_FMC_MspInit+0xfa>
return;
8004934: bf00 nop
/* USER CODE BEGIN FMC_MspInit 1 */
/* USER CODE END FMC_MspInit 1 */
}
8004936: 3718 adds r7, #24
8004938: 46bd mov sp, r7
800493a: bd80 pop {r7, pc}
800493c: 20000568 .word 0x20000568
8004940: 40023800 .word 0x40023800
8004944: 40021000 .word 0x40021000
8004948: 40021800 .word 0x40021800
800494c: 40020c00 .word 0x40020c00
8004950: 40021400 .word 0x40021400
8004954: 40021c00 .word 0x40021c00
8004958: 40020800 .word 0x40020800
0800495c <HAL_SDRAM_MspInit>:
void HAL_SDRAM_MspInit(SDRAM_HandleTypeDef* hsdram){
800495c: b580 push {r7, lr}
800495e: b082 sub sp, #8
8004960: af00 add r7, sp, #0
8004962: 6078 str r0, [r7, #4]
/* USER CODE BEGIN SDRAM_MspInit 0 */
/* USER CODE END SDRAM_MspInit 0 */
HAL_FMC_MspInit();
8004964: f7ff ff6a bl 800483c <HAL_FMC_MspInit>
/* USER CODE BEGIN SDRAM_MspInit 1 */
/* USER CODE END SDRAM_MspInit 1 */
}
8004968: bf00 nop
800496a: 3708 adds r7, #8
800496c: 46bd mov sp, r7
800496e: bd80 pop {r7, pc}
08004970 <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)
{
8004970: b580 push {r7, lr}
8004972: b08c sub sp, #48 ; 0x30
8004974: af00 add r7, sp, #0
8004976: 6078 str r0, [r7, #4]
RCC_ClkInitTypeDef clkconfig;
uint32_t uwTimclock = 0;
8004978: 2300 movs r3, #0
800497a: 62fb str r3, [r7, #44] ; 0x2c
uint32_t uwPrescalerValue = 0;
800497c: 2300 movs r3, #0
800497e: 62bb str r3, [r7, #40] ; 0x28
uint32_t pFLatency;
/*Configure the TIM6 IRQ priority */
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0);
8004980: 2200 movs r2, #0
8004982: 6879 ldr r1, [r7, #4]
8004984: 2036 movs r0, #54 ; 0x36
8004986: f000 fe49 bl 800561c <HAL_NVIC_SetPriority>
/* Enable the TIM6 global Interrupt */
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
800498a: 2036 movs r0, #54 ; 0x36
800498c: f000 fe62 bl 8005654 <HAL_NVIC_EnableIRQ>
/* Enable TIM6 clock */
__HAL_RCC_TIM6_CLK_ENABLE();
8004990: 4b1f ldr r3, [pc, #124] ; (8004a10 <HAL_InitTick+0xa0>)
8004992: 6c1b ldr r3, [r3, #64] ; 0x40
8004994: 4a1e ldr r2, [pc, #120] ; (8004a10 <HAL_InitTick+0xa0>)
8004996: f043 0310 orr.w r3, r3, #16
800499a: 6413 str r3, [r2, #64] ; 0x40
800499c: 4b1c ldr r3, [pc, #112] ; (8004a10 <HAL_InitTick+0xa0>)
800499e: 6c1b ldr r3, [r3, #64] ; 0x40
80049a0: f003 0310 and.w r3, r3, #16
80049a4: 60fb str r3, [r7, #12]
80049a6: 68fb ldr r3, [r7, #12]
/* Get clock configuration */
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
80049a8: f107 0210 add.w r2, r7, #16
80049ac: f107 0314 add.w r3, r7, #20
80049b0: 4611 mov r1, r2
80049b2: 4618 mov r0, r3
80049b4: f004 fec6 bl 8009744 <HAL_RCC_GetClockConfig>
/* Compute TIM6 clock */
uwTimclock = 2*HAL_RCC_GetPCLK1Freq();
80049b8: f004 fe9c bl 80096f4 <HAL_RCC_GetPCLK1Freq>
80049bc: 4603 mov r3, r0
80049be: 005b lsls r3, r3, #1
80049c0: 62fb str r3, [r7, #44] ; 0x2c
/* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */
uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
80049c2: 6afb ldr r3, [r7, #44] ; 0x2c
80049c4: 4a13 ldr r2, [pc, #76] ; (8004a14 <HAL_InitTick+0xa4>)
80049c6: fba2 2303 umull r2, r3, r2, r3
80049ca: 0c9b lsrs r3, r3, #18
80049cc: 3b01 subs r3, #1
80049ce: 62bb str r3, [r7, #40] ; 0x28
/* Initialize TIM6 */
htim6.Instance = TIM6;
80049d0: 4b11 ldr r3, [pc, #68] ; (8004a18 <HAL_InitTick+0xa8>)
80049d2: 4a12 ldr r2, [pc, #72] ; (8004a1c <HAL_InitTick+0xac>)
80049d4: 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;
80049d6: 4b10 ldr r3, [pc, #64] ; (8004a18 <HAL_InitTick+0xa8>)
80049d8: f240 32e7 movw r2, #999 ; 0x3e7
80049dc: 60da str r2, [r3, #12]
htim6.Init.Prescaler = uwPrescalerValue;
80049de: 4a0e ldr r2, [pc, #56] ; (8004a18 <HAL_InitTick+0xa8>)
80049e0: 6abb ldr r3, [r7, #40] ; 0x28
80049e2: 6053 str r3, [r2, #4]
htim6.Init.ClockDivision = 0;
80049e4: 4b0c ldr r3, [pc, #48] ; (8004a18 <HAL_InitTick+0xa8>)
80049e6: 2200 movs r2, #0
80049e8: 611a str r2, [r3, #16]
htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
80049ea: 4b0b ldr r3, [pc, #44] ; (8004a18 <HAL_InitTick+0xa8>)
80049ec: 2200 movs r2, #0
80049ee: 609a str r2, [r3, #8]
if(HAL_TIM_Base_Init(&htim6) == HAL_OK)
80049f0: 4809 ldr r0, [pc, #36] ; (8004a18 <HAL_InitTick+0xa8>)
80049f2: f005 ffc4 bl 800a97e <HAL_TIM_Base_Init>
80049f6: 4603 mov r3, r0
80049f8: 2b00 cmp r3, #0
80049fa: d104 bne.n 8004a06 <HAL_InitTick+0x96>
{
/* Start the TIM time Base generation in interrupt mode */
return HAL_TIM_Base_Start_IT(&htim6);
80049fc: 4806 ldr r0, [pc, #24] ; (8004a18 <HAL_InitTick+0xa8>)
80049fe: f005 ffe9 bl 800a9d4 <HAL_TIM_Base_Start_IT>
8004a02: 4603 mov r3, r0
8004a04: e000 b.n 8004a08 <HAL_InitTick+0x98>
}
/* Return function status */
return HAL_ERROR;
8004a06: 2301 movs r3, #1
}
8004a08: 4618 mov r0, r3
8004a0a: 3730 adds r7, #48 ; 0x30
8004a0c: 46bd mov sp, r7
8004a0e: bd80 pop {r7, pc}
8004a10: 40023800 .word 0x40023800
8004a14: 431bde83 .word 0x431bde83
8004a18: 20008f38 .word 0x20008f38
8004a1c: 40001000 .word 0x40001000
08004a20 <NMI_Handler>:
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
8004a20: b480 push {r7}
8004a22: 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)
8004a24: e7fe b.n 8004a24 <NMI_Handler+0x4>
08004a26 <HardFault_Handler>:
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
8004a26: b480 push {r7}
8004a28: af00 add r7, sp, #0
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
8004a2a: e7fe b.n 8004a2a <HardFault_Handler+0x4>
08004a2c <MemManage_Handler>:
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
8004a2c: b480 push {r7}
8004a2e: af00 add r7, sp, #0
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
8004a30: e7fe b.n 8004a30 <MemManage_Handler+0x4>
08004a32 <BusFault_Handler>:
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
8004a32: b480 push {r7}
8004a34: af00 add r7, sp, #0
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
8004a36: e7fe b.n 8004a36 <BusFault_Handler+0x4>
08004a38 <UsageFault_Handler>:
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
8004a38: b480 push {r7}
8004a3a: af00 add r7, sp, #0
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
8004a3c: e7fe b.n 8004a3c <UsageFault_Handler+0x4>
08004a3e <DebugMon_Handler>:
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
8004a3e: b480 push {r7}
8004a40: af00 add r7, sp, #0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
8004a42: bf00 nop
8004a44: 46bd mov sp, r7
8004a46: f85d 7b04 ldr.w r7, [sp], #4
8004a4a: 4770 bx lr
08004a4c <TIM6_DAC_IRQHandler>:
/**
* @brief This function handles TIM6 global interrupt, DAC1 and DAC2 underrun error interrupts.
*/
void TIM6_DAC_IRQHandler(void)
{
8004a4c: b580 push {r7, lr}
8004a4e: af00 add r7, sp, #0
/* USER CODE BEGIN TIM6_DAC_IRQn 0 */
/* USER CODE END TIM6_DAC_IRQn 0 */
HAL_DAC_IRQHandler(&hdac);
8004a50: 4803 ldr r0, [pc, #12] ; (8004a60 <TIM6_DAC_IRQHandler+0x14>)
8004a52: f000 ff19 bl 8005888 <HAL_DAC_IRQHandler>
HAL_TIM_IRQHandler(&htim6);
8004a56: 4803 ldr r0, [pc, #12] ; (8004a64 <TIM6_DAC_IRQHandler+0x18>)
8004a58: f006 f81b bl 800aa92 <HAL_TIM_IRQHandler>
/* USER CODE BEGIN TIM6_DAC_IRQn 1 */
/* USER CODE END TIM6_DAC_IRQn 1 */
}
8004a5c: bf00 nop
8004a5e: bd80 pop {r7, pc}
8004a60: 20008c94 .word 0x20008c94
8004a64: 20008f38 .word 0x20008f38
08004a68 <ETH_IRQHandler>:
/**
* @brief This function handles Ethernet global interrupt.
*/
void ETH_IRQHandler(void)
{
8004a68: b580 push {r7, lr}
8004a6a: af00 add r7, sp, #0
/* USER CODE BEGIN ETH_IRQn 0 */
/* USER CODE END ETH_IRQn 0 */
HAL_ETH_IRQHandler(&heth);
8004a6c: 4802 ldr r0, [pc, #8] ; (8004a78 <ETH_IRQHandler+0x10>)
8004a6e: f001 ffe3 bl 8006a38 <HAL_ETH_IRQHandler>
/* USER CODE BEGIN ETH_IRQn 1 */
/* USER CODE END ETH_IRQn 1 */
}
8004a72: bf00 nop
8004a74: bd80 pop {r7, pc}
8004a76: bf00 nop
8004a78: 2000a898 .word 0x2000a898
08004a7c <LTDC_IRQHandler>:
/**
* @brief This function handles LTDC global interrupt.
*/
void LTDC_IRQHandler(void)
{
8004a7c: b580 push {r7, lr}
8004a7e: af00 add r7, sp, #0
/* USER CODE BEGIN LTDC_IRQn 0 */
/* USER CODE END LTDC_IRQn 0 */
HAL_LTDC_IRQHandler(&hltdc);
8004a80: 4802 ldr r0, [pc, #8] ; (8004a8c <LTDC_IRQHandler+0x10>)
8004a82: f003 fee1 bl 8008848 <HAL_LTDC_IRQHandler>
/* USER CODE BEGIN LTDC_IRQn 1 */
/* USER CODE END LTDC_IRQn 1 */
}
8004a86: bf00 nop
8004a88: bd80 pop {r7, pc}
8004a8a: bf00 nop
8004a8c: 20008ad0 .word 0x20008ad0
08004a90 <_read>:
_kill(status, -1);
while (1) {} /* Make sure we hang here */
}
__attribute__((weak)) int _read(int file, char *ptr, int len)
{
8004a90: b580 push {r7, lr}
8004a92: b086 sub sp, #24
8004a94: af00 add r7, sp, #0
8004a96: 60f8 str r0, [r7, #12]
8004a98: 60b9 str r1, [r7, #8]
8004a9a: 607a str r2, [r7, #4]
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
8004a9c: 2300 movs r3, #0
8004a9e: 617b str r3, [r7, #20]
8004aa0: e00a b.n 8004ab8 <_read+0x28>
{
*ptr++ = __io_getchar();
8004aa2: f3af 8000 nop.w
8004aa6: 4601 mov r1, r0
8004aa8: 68bb ldr r3, [r7, #8]
8004aaa: 1c5a adds r2, r3, #1
8004aac: 60ba str r2, [r7, #8]
8004aae: b2ca uxtb r2, r1
8004ab0: 701a strb r2, [r3, #0]
for (DataIdx = 0; DataIdx < len; DataIdx++)
8004ab2: 697b ldr r3, [r7, #20]
8004ab4: 3301 adds r3, #1
8004ab6: 617b str r3, [r7, #20]
8004ab8: 697a ldr r2, [r7, #20]
8004aba: 687b ldr r3, [r7, #4]
8004abc: 429a cmp r2, r3
8004abe: dbf0 blt.n 8004aa2 <_read+0x12>
}
return len;
8004ac0: 687b ldr r3, [r7, #4]
}
8004ac2: 4618 mov r0, r3
8004ac4: 3718 adds r7, #24
8004ac6: 46bd mov sp, r7
8004ac8: bd80 pop {r7, pc}
08004aca <_write>:
__attribute__((weak)) int _write(int file, char *ptr, int len)
{
8004aca: b580 push {r7, lr}
8004acc: b086 sub sp, #24
8004ace: af00 add r7, sp, #0
8004ad0: 60f8 str r0, [r7, #12]
8004ad2: 60b9 str r1, [r7, #8]
8004ad4: 607a str r2, [r7, #4]
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
8004ad6: 2300 movs r3, #0
8004ad8: 617b str r3, [r7, #20]
8004ada: e009 b.n 8004af0 <_write+0x26>
{
__io_putchar(*ptr++);
8004adc: 68bb ldr r3, [r7, #8]
8004ade: 1c5a adds r2, r3, #1
8004ae0: 60ba str r2, [r7, #8]
8004ae2: 781b ldrb r3, [r3, #0]
8004ae4: 4618 mov r0, r3
8004ae6: f3af 8000 nop.w
for (DataIdx = 0; DataIdx < len; DataIdx++)
8004aea: 697b ldr r3, [r7, #20]
8004aec: 3301 adds r3, #1
8004aee: 617b str r3, [r7, #20]
8004af0: 697a ldr r2, [r7, #20]
8004af2: 687b ldr r3, [r7, #4]
8004af4: 429a cmp r2, r3
8004af6: dbf1 blt.n 8004adc <_write+0x12>
}
return len;
8004af8: 687b ldr r3, [r7, #4]
}
8004afa: 4618 mov r0, r3
8004afc: 3718 adds r7, #24
8004afe: 46bd mov sp, r7
8004b00: bd80 pop {r7, pc}
08004b02 <_close>:
int _close(int file)
{
8004b02: b480 push {r7}
8004b04: b083 sub sp, #12
8004b06: af00 add r7, sp, #0
8004b08: 6078 str r0, [r7, #4]
return -1;
8004b0a: f04f 33ff mov.w r3, #4294967295
}
8004b0e: 4618 mov r0, r3
8004b10: 370c adds r7, #12
8004b12: 46bd mov sp, r7
8004b14: f85d 7b04 ldr.w r7, [sp], #4
8004b18: 4770 bx lr
08004b1a <_fstat>:
int _fstat(int file, struct stat *st)
{
8004b1a: b480 push {r7}
8004b1c: b083 sub sp, #12
8004b1e: af00 add r7, sp, #0
8004b20: 6078 str r0, [r7, #4]
8004b22: 6039 str r1, [r7, #0]
st->st_mode = S_IFCHR;
8004b24: 683b ldr r3, [r7, #0]
8004b26: f44f 5200 mov.w r2, #8192 ; 0x2000
8004b2a: 605a str r2, [r3, #4]
return 0;
8004b2c: 2300 movs r3, #0
}
8004b2e: 4618 mov r0, r3
8004b30: 370c adds r7, #12
8004b32: 46bd mov sp, r7
8004b34: f85d 7b04 ldr.w r7, [sp], #4
8004b38: 4770 bx lr
08004b3a <_isatty>:
int _isatty(int file)
{
8004b3a: b480 push {r7}
8004b3c: b083 sub sp, #12
8004b3e: af00 add r7, sp, #0
8004b40: 6078 str r0, [r7, #4]
return 1;
8004b42: 2301 movs r3, #1
}
8004b44: 4618 mov r0, r3
8004b46: 370c adds r7, #12
8004b48: 46bd mov sp, r7
8004b4a: f85d 7b04 ldr.w r7, [sp], #4
8004b4e: 4770 bx lr
08004b50 <_lseek>:
int _lseek(int file, int ptr, int dir)
{
8004b50: b480 push {r7}
8004b52: b085 sub sp, #20
8004b54: af00 add r7, sp, #0
8004b56: 60f8 str r0, [r7, #12]
8004b58: 60b9 str r1, [r7, #8]
8004b5a: 607a str r2, [r7, #4]
return 0;
8004b5c: 2300 movs r3, #0
}
8004b5e: 4618 mov r0, r3
8004b60: 3714 adds r7, #20
8004b62: 46bd mov sp, r7
8004b64: f85d 7b04 ldr.w r7, [sp], #4
8004b68: 4770 bx lr
...
08004b6c <_sbrk>:
*
* @param incr Memory size
* @return Pointer to allocated memory
*/
void *_sbrk(ptrdiff_t incr)
{
8004b6c: b480 push {r7}
8004b6e: b087 sub sp, #28
8004b70: af00 add r7, sp, #0
8004b72: 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;
8004b74: 4a14 ldr r2, [pc, #80] ; (8004bc8 <_sbrk+0x5c>)
8004b76: 4b15 ldr r3, [pc, #84] ; (8004bcc <_sbrk+0x60>)
8004b78: 1ad3 subs r3, r2, r3
8004b7a: 617b str r3, [r7, #20]
const uint8_t *max_heap = (uint8_t *)stack_limit;
8004b7c: 697b ldr r3, [r7, #20]
8004b7e: 613b str r3, [r7, #16]
uint8_t *prev_heap_end;
/* Initialize heap end at first call */
if (NULL == __sbrk_heap_end)
8004b80: 4b13 ldr r3, [pc, #76] ; (8004bd0 <_sbrk+0x64>)
8004b82: 681b ldr r3, [r3, #0]
8004b84: 2b00 cmp r3, #0
8004b86: d102 bne.n 8004b8e <_sbrk+0x22>
{
__sbrk_heap_end = &_end;
8004b88: 4b11 ldr r3, [pc, #68] ; (8004bd0 <_sbrk+0x64>)
8004b8a: 4a12 ldr r2, [pc, #72] ; (8004bd4 <_sbrk+0x68>)
8004b8c: 601a str r2, [r3, #0]
}
/* Protect heap from growing into the reserved MSP stack */
if (__sbrk_heap_end + incr > max_heap)
8004b8e: 4b10 ldr r3, [pc, #64] ; (8004bd0 <_sbrk+0x64>)
8004b90: 681a ldr r2, [r3, #0]
8004b92: 687b ldr r3, [r7, #4]
8004b94: 4413 add r3, r2
8004b96: 693a ldr r2, [r7, #16]
8004b98: 429a cmp r2, r3
8004b9a: d205 bcs.n 8004ba8 <_sbrk+0x3c>
{
errno = ENOMEM;
8004b9c: 4b0e ldr r3, [pc, #56] ; (8004bd8 <_sbrk+0x6c>)
8004b9e: 220c movs r2, #12
8004ba0: 601a str r2, [r3, #0]
return (void *)-1;
8004ba2: f04f 33ff mov.w r3, #4294967295
8004ba6: e009 b.n 8004bbc <_sbrk+0x50>
}
prev_heap_end = __sbrk_heap_end;
8004ba8: 4b09 ldr r3, [pc, #36] ; (8004bd0 <_sbrk+0x64>)
8004baa: 681b ldr r3, [r3, #0]
8004bac: 60fb str r3, [r7, #12]
__sbrk_heap_end += incr;
8004bae: 4b08 ldr r3, [pc, #32] ; (8004bd0 <_sbrk+0x64>)
8004bb0: 681a ldr r2, [r3, #0]
8004bb2: 687b ldr r3, [r7, #4]
8004bb4: 4413 add r3, r2
8004bb6: 4a06 ldr r2, [pc, #24] ; (8004bd0 <_sbrk+0x64>)
8004bb8: 6013 str r3, [r2, #0]
return (void *)prev_heap_end;
8004bba: 68fb ldr r3, [r7, #12]
}
8004bbc: 4618 mov r0, r3
8004bbe: 371c adds r7, #28
8004bc0: 46bd mov sp, r7
8004bc2: f85d 7b04 ldr.w r7, [sp], #4
8004bc6: 4770 bx lr
8004bc8: 20050000 .word 0x20050000
8004bcc: 00000400 .word 0x00000400
8004bd0: 2000056c .word 0x2000056c
8004bd4: 2000f838 .word 0x2000f838
8004bd8: 2000f82c .word 0x2000f82c
08004bdc <SystemInit>:
* SystemFrequency variable.
* @param None
* @retval None
*/
void SystemInit(void)
{
8004bdc: b480 push {r7}
8004bde: 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 */
8004be0: 4b08 ldr r3, [pc, #32] ; (8004c04 <SystemInit+0x28>)
8004be2: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8004be6: 4a07 ldr r2, [pc, #28] ; (8004c04 <SystemInit+0x28>)
8004be8: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
8004bec: 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 */
8004bf0: 4b04 ldr r3, [pc, #16] ; (8004c04 <SystemInit+0x28>)
8004bf2: f04f 6200 mov.w r2, #134217728 ; 0x8000000
8004bf6: 609a str r2, [r3, #8]
#endif
}
8004bf8: bf00 nop
8004bfa: 46bd mov sp, r7
8004bfc: f85d 7b04 ldr.w r7, [sp], #4
8004c00: 4770 bx lr
8004c02: bf00 nop
8004c04: e000ed00 .word 0xe000ed00
08004c08 <Reset_Handler>:
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr sp, =_estack /* set stack pointer */
8004c08: f8df d034 ldr.w sp, [pc, #52] ; 8004c40 <LoopFillZerobss+0x14>
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
8004c0c: 2100 movs r1, #0
b LoopCopyDataInit
8004c0e: e003 b.n 8004c18 <LoopCopyDataInit>
08004c10 <CopyDataInit>:
CopyDataInit:
ldr r3, =_sidata
8004c10: 4b0c ldr r3, [pc, #48] ; (8004c44 <LoopFillZerobss+0x18>)
ldr r3, [r3, r1]
8004c12: 585b ldr r3, [r3, r1]
str r3, [r0, r1]
8004c14: 5043 str r3, [r0, r1]
adds r1, r1, #4
8004c16: 3104 adds r1, #4
08004c18 <LoopCopyDataInit>:
LoopCopyDataInit:
ldr r0, =_sdata
8004c18: 480b ldr r0, [pc, #44] ; (8004c48 <LoopFillZerobss+0x1c>)
ldr r3, =_edata
8004c1a: 4b0c ldr r3, [pc, #48] ; (8004c4c <LoopFillZerobss+0x20>)
adds r2, r0, r1
8004c1c: 1842 adds r2, r0, r1
cmp r2, r3
8004c1e: 429a cmp r2, r3
bcc CopyDataInit
8004c20: d3f6 bcc.n 8004c10 <CopyDataInit>
ldr r2, =_sbss
8004c22: 4a0b ldr r2, [pc, #44] ; (8004c50 <LoopFillZerobss+0x24>)
b LoopFillZerobss
8004c24: e002 b.n 8004c2c <LoopFillZerobss>
08004c26 <FillZerobss>:
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
8004c26: 2300 movs r3, #0
str r3, [r2], #4
8004c28: f842 3b04 str.w r3, [r2], #4
08004c2c <LoopFillZerobss>:
LoopFillZerobss:
ldr r3, = _ebss
8004c2c: 4b09 ldr r3, [pc, #36] ; (8004c54 <LoopFillZerobss+0x28>)
cmp r2, r3
8004c2e: 429a cmp r2, r3
bcc FillZerobss
8004c30: d3f9 bcc.n 8004c26 <FillZerobss>
/* Call the clock system initialization function.*/
bl SystemInit
8004c32: f7ff ffd3 bl 8004bdc <SystemInit>
/* Call static constructors */
bl __libc_init_array
8004c36: f017 fc27 bl 801c488 <__libc_init_array>
/* Call the application's entry point.*/
bl main
8004c3a: f7fb ff8f bl 8000b5c <main>
bx lr
8004c3e: 4770 bx lr
ldr sp, =_estack /* set stack pointer */
8004c40: 20050000 .word 0x20050000
ldr r3, =_sidata
8004c44: 080227b0 .word 0x080227b0
ldr r0, =_sdata
8004c48: 20000000 .word 0x20000000
ldr r3, =_edata
8004c4c: 200000d4 .word 0x200000d4
ldr r2, =_sbss
8004c50: 200000d4 .word 0x200000d4
ldr r3, = _ebss
8004c54: 2000f834 .word 0x2000f834
08004c58 <ADC_IRQHandler>:
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
8004c58: e7fe b.n 8004c58 <ADC_IRQHandler>
08004c5a <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)
{
8004c5a: b580 push {r7, lr}
8004c5c: 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);
8004c5e: 2003 movs r0, #3
8004c60: f000 fcd1 bl 8005606 <HAL_NVIC_SetPriorityGrouping>
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
HAL_InitTick(TICK_INT_PRIORITY);
8004c64: 2000 movs r0, #0
8004c66: f7ff fe83 bl 8004970 <HAL_InitTick>
/* Init the low level hardware */
HAL_MspInit();
8004c6a: f7ff f90f bl 8003e8c <HAL_MspInit>
/* Return function status */
return HAL_OK;
8004c6e: 2300 movs r3, #0
}
8004c70: 4618 mov r0, r3
8004c72: bd80 pop {r7, pc}
08004c74 <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)
{
8004c74: b480 push {r7}
8004c76: af00 add r7, sp, #0
uwTick += uwTickFreq;
8004c78: 4b06 ldr r3, [pc, #24] ; (8004c94 <HAL_IncTick+0x20>)
8004c7a: 781b ldrb r3, [r3, #0]
8004c7c: 461a mov r2, r3
8004c7e: 4b06 ldr r3, [pc, #24] ; (8004c98 <HAL_IncTick+0x24>)
8004c80: 681b ldr r3, [r3, #0]
8004c82: 4413 add r3, r2
8004c84: 4a04 ldr r2, [pc, #16] ; (8004c98 <HAL_IncTick+0x24>)
8004c86: 6013 str r3, [r2, #0]
}
8004c88: bf00 nop
8004c8a: 46bd mov sp, r7
8004c8c: f85d 7b04 ldr.w r7, [sp], #4
8004c90: 4770 bx lr
8004c92: bf00 nop
8004c94: 20000058 .word 0x20000058
8004c98: 20008f78 .word 0x20008f78
08004c9c <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)
{
8004c9c: b480 push {r7}
8004c9e: af00 add r7, sp, #0
return uwTick;
8004ca0: 4b03 ldr r3, [pc, #12] ; (8004cb0 <HAL_GetTick+0x14>)
8004ca2: 681b ldr r3, [r3, #0]
}
8004ca4: 4618 mov r0, r3
8004ca6: 46bd mov sp, r7
8004ca8: f85d 7b04 ldr.w r7, [sp], #4
8004cac: 4770 bx lr
8004cae: bf00 nop
8004cb0: 20008f78 .word 0x20008f78
08004cb4 <HAL_Delay>:
* implementations in user file.
* @param Delay specifies the delay time length, in milliseconds.
* @retval None
*/
__weak void HAL_Delay(uint32_t Delay)
{
8004cb4: b580 push {r7, lr}
8004cb6: b084 sub sp, #16
8004cb8: af00 add r7, sp, #0
8004cba: 6078 str r0, [r7, #4]
uint32_t tickstart = HAL_GetTick();
8004cbc: f7ff ffee bl 8004c9c <HAL_GetTick>
8004cc0: 60b8 str r0, [r7, #8]
uint32_t wait = Delay;
8004cc2: 687b ldr r3, [r7, #4]
8004cc4: 60fb str r3, [r7, #12]
/* Add a freq to guarantee minimum wait */
if (wait < HAL_MAX_DELAY)
8004cc6: 68fb ldr r3, [r7, #12]
8004cc8: f1b3 3fff cmp.w r3, #4294967295
8004ccc: d005 beq.n 8004cda <HAL_Delay+0x26>
{
wait += (uint32_t)(uwTickFreq);
8004cce: 4b09 ldr r3, [pc, #36] ; (8004cf4 <HAL_Delay+0x40>)
8004cd0: 781b ldrb r3, [r3, #0]
8004cd2: 461a mov r2, r3
8004cd4: 68fb ldr r3, [r7, #12]
8004cd6: 4413 add r3, r2
8004cd8: 60fb str r3, [r7, #12]
}
while ((HAL_GetTick() - tickstart) < wait)
8004cda: bf00 nop
8004cdc: f7ff ffde bl 8004c9c <HAL_GetTick>
8004ce0: 4602 mov r2, r0
8004ce2: 68bb ldr r3, [r7, #8]
8004ce4: 1ad3 subs r3, r2, r3
8004ce6: 68fa ldr r2, [r7, #12]
8004ce8: 429a cmp r2, r3
8004cea: d8f7 bhi.n 8004cdc <HAL_Delay+0x28>
{
}
}
8004cec: bf00 nop
8004cee: 3710 adds r7, #16
8004cf0: 46bd mov sp, r7
8004cf2: bd80 pop {r7, pc}
8004cf4: 20000058 .word 0x20000058
08004cf8 <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)
{
8004cf8: b580 push {r7, lr}
8004cfa: b084 sub sp, #16
8004cfc: af00 add r7, sp, #0
8004cfe: 6078 str r0, [r7, #4]
HAL_StatusTypeDef tmp_hal_status = HAL_OK;
8004d00: 2300 movs r3, #0
8004d02: 73fb strb r3, [r7, #15]
/* Check ADC handle */
if(hadc == NULL)
8004d04: 687b ldr r3, [r7, #4]
8004d06: 2b00 cmp r3, #0
8004d08: d101 bne.n 8004d0e <HAL_ADC_Init+0x16>
{
return HAL_ERROR;
8004d0a: 2301 movs r3, #1
8004d0c: e031 b.n 8004d72 <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)
8004d0e: 687b ldr r3, [r7, #4]
8004d10: 6c1b ldr r3, [r3, #64] ; 0x40
8004d12: 2b00 cmp r3, #0
8004d14: d109 bne.n 8004d2a <HAL_ADC_Init+0x32>
/* Init the low level hardware */
hadc->MspInitCallback(hadc);
#else
/* Init the low level hardware */
HAL_ADC_MspInit(hadc);
8004d16: 6878 ldr r0, [r7, #4]
8004d18: f7ff f8e0 bl 8003edc <HAL_ADC_MspInit>
#endif /* USE_HAL_ADC_REGISTER_CALLBACKS */
/* Initialize ADC error code */
ADC_CLEAR_ERRORCODE(hadc);
8004d1c: 687b ldr r3, [r7, #4]
8004d1e: 2200 movs r2, #0
8004d20: 645a str r2, [r3, #68] ; 0x44
/* Allocate lock resource and initialize it */
hadc->Lock = HAL_UNLOCKED;
8004d22: 687b ldr r3, [r7, #4]
8004d24: 2200 movs r2, #0
8004d26: 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))
8004d2a: 687b ldr r3, [r7, #4]
8004d2c: 6c1b ldr r3, [r3, #64] ; 0x40
8004d2e: f003 0310 and.w r3, r3, #16
8004d32: 2b00 cmp r3, #0
8004d34: d116 bne.n 8004d64 <HAL_ADC_Init+0x6c>
{
/* Set ADC state */
ADC_STATE_CLR_SET(hadc->State,
8004d36: 687b ldr r3, [r7, #4]
8004d38: 6c1a ldr r2, [r3, #64] ; 0x40
8004d3a: 4b10 ldr r3, [pc, #64] ; (8004d7c <HAL_ADC_Init+0x84>)
8004d3c: 4013 ands r3, r2
8004d3e: f043 0202 orr.w r2, r3, #2
8004d42: 687b ldr r3, [r7, #4]
8004d44: 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);
8004d46: 6878 ldr r0, [r7, #4]
8004d48: f000 fab6 bl 80052b8 <ADC_Init>
/* Set ADC error code to none */
ADC_CLEAR_ERRORCODE(hadc);
8004d4c: 687b ldr r3, [r7, #4]
8004d4e: 2200 movs r2, #0
8004d50: 645a str r2, [r3, #68] ; 0x44
/* Set the ADC state */
ADC_STATE_CLR_SET(hadc->State,
8004d52: 687b ldr r3, [r7, #4]
8004d54: 6c1b ldr r3, [r3, #64] ; 0x40
8004d56: f023 0303 bic.w r3, r3, #3
8004d5a: f043 0201 orr.w r2, r3, #1
8004d5e: 687b ldr r3, [r7, #4]
8004d60: 641a str r2, [r3, #64] ; 0x40
8004d62: e001 b.n 8004d68 <HAL_ADC_Init+0x70>
HAL_ADC_STATE_BUSY_INTERNAL,
HAL_ADC_STATE_READY);
}
else
{
tmp_hal_status = HAL_ERROR;
8004d64: 2301 movs r3, #1
8004d66: 73fb strb r3, [r7, #15]
}
/* Release Lock */
__HAL_UNLOCK(hadc);
8004d68: 687b ldr r3, [r7, #4]
8004d6a: 2200 movs r2, #0
8004d6c: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Return function status */
return tmp_hal_status;
8004d70: 7bfb ldrb r3, [r7, #15]
}
8004d72: 4618 mov r0, r3
8004d74: 3710 adds r7, #16
8004d76: 46bd mov sp, r7
8004d78: bd80 pop {r7, pc}
8004d7a: bf00 nop
8004d7c: ffffeefd .word 0xffffeefd
08004d80 <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)
{
8004d80: b480 push {r7}
8004d82: b085 sub sp, #20
8004d84: af00 add r7, sp, #0
8004d86: 6078 str r0, [r7, #4]
__IO uint32_t counter = 0;
8004d88: 2300 movs r3, #0
8004d8a: 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);
8004d8c: 687b ldr r3, [r7, #4]
8004d8e: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
8004d92: 2b01 cmp r3, #1
8004d94: d101 bne.n 8004d9a <HAL_ADC_Start+0x1a>
8004d96: 2302 movs r3, #2
8004d98: e0a0 b.n 8004edc <HAL_ADC_Start+0x15c>
8004d9a: 687b ldr r3, [r7, #4]
8004d9c: 2201 movs r2, #1
8004d9e: 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)
8004da2: 687b ldr r3, [r7, #4]
8004da4: 681b ldr r3, [r3, #0]
8004da6: 689b ldr r3, [r3, #8]
8004da8: f003 0301 and.w r3, r3, #1
8004dac: 2b01 cmp r3, #1
8004dae: d018 beq.n 8004de2 <HAL_ADC_Start+0x62>
{
/* Enable the Peripheral */
__HAL_ADC_ENABLE(hadc);
8004db0: 687b ldr r3, [r7, #4]
8004db2: 681b ldr r3, [r3, #0]
8004db4: 689a ldr r2, [r3, #8]
8004db6: 687b ldr r3, [r7, #4]
8004db8: 681b ldr r3, [r3, #0]
8004dba: f042 0201 orr.w r2, r2, #1
8004dbe: 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));
8004dc0: 4b49 ldr r3, [pc, #292] ; (8004ee8 <HAL_ADC_Start+0x168>)
8004dc2: 681b ldr r3, [r3, #0]
8004dc4: 4a49 ldr r2, [pc, #292] ; (8004eec <HAL_ADC_Start+0x16c>)
8004dc6: fba2 2303 umull r2, r3, r2, r3
8004dca: 0c9a lsrs r2, r3, #18
8004dcc: 4613 mov r3, r2
8004dce: 005b lsls r3, r3, #1
8004dd0: 4413 add r3, r2
8004dd2: 60fb str r3, [r7, #12]
while(counter != 0)
8004dd4: e002 b.n 8004ddc <HAL_ADC_Start+0x5c>
{
counter--;
8004dd6: 68fb ldr r3, [r7, #12]
8004dd8: 3b01 subs r3, #1
8004dda: 60fb str r3, [r7, #12]
while(counter != 0)
8004ddc: 68fb ldr r3, [r7, #12]
8004dde: 2b00 cmp r3, #0
8004de0: d1f9 bne.n 8004dd6 <HAL_ADC_Start+0x56>
}
}
/* Start conversion if ADC is effectively enabled */
if(HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_ADON))
8004de2: 687b ldr r3, [r7, #4]
8004de4: 681b ldr r3, [r3, #0]
8004de6: 689b ldr r3, [r3, #8]
8004de8: f003 0301 and.w r3, r3, #1
8004dec: 2b01 cmp r3, #1
8004dee: d174 bne.n 8004eda <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,
8004df0: 687b ldr r3, [r7, #4]
8004df2: 6c1a ldr r2, [r3, #64] ; 0x40
8004df4: 4b3e ldr r3, [pc, #248] ; (8004ef0 <HAL_ADC_Start+0x170>)
8004df6: 4013 ands r3, r2
8004df8: f443 7280 orr.w r2, r3, #256 ; 0x100
8004dfc: 687b ldr r3, [r7, #4]
8004dfe: 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)
8004e00: 687b ldr r3, [r7, #4]
8004e02: 681b ldr r3, [r3, #0]
8004e04: 685b ldr r3, [r3, #4]
8004e06: f403 6380 and.w r3, r3, #1024 ; 0x400
8004e0a: 2b00 cmp r3, #0
8004e0c: d007 beq.n 8004e1e <HAL_ADC_Start+0x9e>
{
ADC_STATE_CLR_SET(hadc->State, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_INJ_BUSY);
8004e0e: 687b ldr r3, [r7, #4]
8004e10: 6c1b ldr r3, [r3, #64] ; 0x40
8004e12: f423 5340 bic.w r3, r3, #12288 ; 0x3000
8004e16: f443 5280 orr.w r2, r3, #4096 ; 0x1000
8004e1a: 687b ldr r3, [r7, #4]
8004e1c: 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))
8004e1e: 687b ldr r3, [r7, #4]
8004e20: 6c1b ldr r3, [r3, #64] ; 0x40
8004e22: f403 5380 and.w r3, r3, #4096 ; 0x1000
8004e26: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
8004e2a: d106 bne.n 8004e3a <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));
8004e2c: 687b ldr r3, [r7, #4]
8004e2e: 6c5b ldr r3, [r3, #68] ; 0x44
8004e30: f023 0206 bic.w r2, r3, #6
8004e34: 687b ldr r3, [r7, #4]
8004e36: 645a str r2, [r3, #68] ; 0x44
8004e38: e002 b.n 8004e40 <HAL_ADC_Start+0xc0>
}
else
{
/* Reset ADC all error code fields */
ADC_CLEAR_ERRORCODE(hadc);
8004e3a: 687b ldr r3, [r7, #4]
8004e3c: 2200 movs r2, #0
8004e3e: 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);
8004e40: 687b ldr r3, [r7, #4]
8004e42: 2200 movs r2, #0
8004e44: 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);
8004e48: 687b ldr r3, [r7, #4]
8004e4a: 681b ldr r3, [r3, #0]
8004e4c: f06f 0222 mvn.w r2, #34 ; 0x22
8004e50: 601a str r2, [r3, #0]
/* Check if Multimode enabled */
if(HAL_IS_BIT_CLR(ADC->CCR, ADC_CCR_MULTI))
8004e52: 4b28 ldr r3, [pc, #160] ; (8004ef4 <HAL_ADC_Start+0x174>)
8004e54: 685b ldr r3, [r3, #4]
8004e56: f003 031f and.w r3, r3, #31
8004e5a: 2b00 cmp r3, #0
8004e5c: d10f bne.n 8004e7e <HAL_ADC_Start+0xfe>
{
/* if no external trigger present enable software conversion of regular channels */
if((hadc->Instance->CR2 & ADC_CR2_EXTEN) == RESET)
8004e5e: 687b ldr r3, [r7, #4]
8004e60: 681b ldr r3, [r3, #0]
8004e62: 689b ldr r3, [r3, #8]
8004e64: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
8004e68: 2b00 cmp r3, #0
8004e6a: d136 bne.n 8004eda <HAL_ADC_Start+0x15a>
{
/* Enable the selected ADC software conversion for regular group */
hadc->Instance->CR2 |= (uint32_t)ADC_CR2_SWSTART;
8004e6c: 687b ldr r3, [r7, #4]
8004e6e: 681b ldr r3, [r3, #0]
8004e70: 689a ldr r2, [r3, #8]
8004e72: 687b ldr r3, [r7, #4]
8004e74: 681b ldr r3, [r3, #0]
8004e76: f042 4280 orr.w r2, r2, #1073741824 ; 0x40000000
8004e7a: 609a str r2, [r3, #8]
8004e7c: e02d b.n 8004eda <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))
8004e7e: 687b ldr r3, [r7, #4]
8004e80: 681b ldr r3, [r3, #0]
8004e82: 4a1d ldr r2, [pc, #116] ; (8004ef8 <HAL_ADC_Start+0x178>)
8004e84: 4293 cmp r3, r2
8004e86: d10e bne.n 8004ea6 <HAL_ADC_Start+0x126>
8004e88: 687b ldr r3, [r7, #4]
8004e8a: 681b ldr r3, [r3, #0]
8004e8c: 689b ldr r3, [r3, #8]
8004e8e: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
8004e92: 2b00 cmp r3, #0
8004e94: d107 bne.n 8004ea6 <HAL_ADC_Start+0x126>
{
/* Enable the selected ADC software conversion for regular group */
hadc->Instance->CR2 |= (uint32_t)ADC_CR2_SWSTART;
8004e96: 687b ldr r3, [r7, #4]
8004e98: 681b ldr r3, [r3, #0]
8004e9a: 689a ldr r2, [r3, #8]
8004e9c: 687b ldr r3, [r7, #4]
8004e9e: 681b ldr r3, [r3, #0]
8004ea0: f042 4280 orr.w r2, r2, #1073741824 ; 0x40000000
8004ea4: 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) )
8004ea6: 4b13 ldr r3, [pc, #76] ; (8004ef4 <HAL_ADC_Start+0x174>)
8004ea8: 685b ldr r3, [r3, #4]
8004eaa: f003 0310 and.w r3, r3, #16
8004eae: 2b00 cmp r3, #0
8004eb0: d113 bne.n 8004eda <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))
8004eb2: 687b ldr r3, [r7, #4]
8004eb4: 681b ldr r3, [r3, #0]
8004eb6: 4a11 ldr r2, [pc, #68] ; (8004efc <HAL_ADC_Start+0x17c>)
8004eb8: 4293 cmp r3, r2
8004eba: d10e bne.n 8004eda <HAL_ADC_Start+0x15a>
8004ebc: 687b ldr r3, [r7, #4]
8004ebe: 681b ldr r3, [r3, #0]
8004ec0: 689b ldr r3, [r3, #8]
8004ec2: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
8004ec6: 2b00 cmp r3, #0
8004ec8: d107 bne.n 8004eda <HAL_ADC_Start+0x15a>
{
/* Enable the selected ADC software conversion for regular group */
hadc->Instance->CR2 |= (uint32_t)ADC_CR2_SWSTART;
8004eca: 687b ldr r3, [r7, #4]
8004ecc: 681b ldr r3, [r3, #0]
8004ece: 689a ldr r2, [r3, #8]
8004ed0: 687b ldr r3, [r7, #4]
8004ed2: 681b ldr r3, [r3, #0]
8004ed4: f042 4280 orr.w r2, r2, #1073741824 ; 0x40000000
8004ed8: 609a str r2, [r3, #8]
}
}
}
/* Return function status */
return HAL_OK;
8004eda: 2300 movs r3, #0
}
8004edc: 4618 mov r0, r3
8004ede: 3714 adds r7, #20
8004ee0: 46bd mov sp, r7
8004ee2: f85d 7b04 ldr.w r7, [sp], #4
8004ee6: 4770 bx lr
8004ee8: 20000050 .word 0x20000050
8004eec: 431bde83 .word 0x431bde83
8004ef0: fffff8fe .word 0xfffff8fe
8004ef4: 40012300 .word 0x40012300
8004ef8: 40012000 .word 0x40012000
8004efc: 40012200 .word 0x40012200
08004f00 <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)
{
8004f00: b580 push {r7, lr}
8004f02: b084 sub sp, #16
8004f04: af00 add r7, sp, #0
8004f06: 6078 str r0, [r7, #4]
8004f08: 6039 str r1, [r7, #0]
uint32_t tickstart = 0;
8004f0a: 2300 movs r3, #0
8004f0c: 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) &&
8004f0e: 687b ldr r3, [r7, #4]
8004f10: 681b ldr r3, [r3, #0]
8004f12: 689b ldr r3, [r3, #8]
8004f14: f403 6380 and.w r3, r3, #1024 ; 0x400
8004f18: f5b3 6f80 cmp.w r3, #1024 ; 0x400
8004f1c: d113 bne.n 8004f46 <HAL_ADC_PollForConversion+0x46>
HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_DMA) )
8004f1e: 687b ldr r3, [r7, #4]
8004f20: 681b ldr r3, [r3, #0]
8004f22: 689b ldr r3, [r3, #8]
8004f24: f403 7380 and.w r3, r3, #256 ; 0x100
if (HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_EOCS) &&
8004f28: f5b3 7f80 cmp.w r3, #256 ; 0x100
8004f2c: d10b bne.n 8004f46 <HAL_ADC_PollForConversion+0x46>
{
/* Update ADC state machine to error */
SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
8004f2e: 687b ldr r3, [r7, #4]
8004f30: 6c1b ldr r3, [r3, #64] ; 0x40
8004f32: f043 0220 orr.w r2, r3, #32
8004f36: 687b ldr r3, [r7, #4]
8004f38: 641a str r2, [r3, #64] ; 0x40
/* Process unlocked */
__HAL_UNLOCK(hadc);
8004f3a: 687b ldr r3, [r7, #4]
8004f3c: 2200 movs r2, #0
8004f3e: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_ERROR;
8004f42: 2301 movs r3, #1
8004f44: e05c b.n 8005000 <HAL_ADC_PollForConversion+0x100>
}
/* Get tick */
tickstart = HAL_GetTick();
8004f46: f7ff fea9 bl 8004c9c <HAL_GetTick>
8004f4a: 60f8 str r0, [r7, #12]
/* Check End of conversion flag */
while(!(__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_EOC)))
8004f4c: e01a b.n 8004f84 <HAL_ADC_PollForConversion+0x84>
{
/* Check if timeout is disabled (set to infinite wait) */
if(Timeout != HAL_MAX_DELAY)
8004f4e: 683b ldr r3, [r7, #0]
8004f50: f1b3 3fff cmp.w r3, #4294967295
8004f54: d016 beq.n 8004f84 <HAL_ADC_PollForConversion+0x84>
{
if((Timeout == 0) || ((HAL_GetTick() - tickstart ) > Timeout))
8004f56: 683b ldr r3, [r7, #0]
8004f58: 2b00 cmp r3, #0
8004f5a: d007 beq.n 8004f6c <HAL_ADC_PollForConversion+0x6c>
8004f5c: f7ff fe9e bl 8004c9c <HAL_GetTick>
8004f60: 4602 mov r2, r0
8004f62: 68fb ldr r3, [r7, #12]
8004f64: 1ad3 subs r3, r2, r3
8004f66: 683a ldr r2, [r7, #0]
8004f68: 429a cmp r2, r3
8004f6a: d20b bcs.n 8004f84 <HAL_ADC_PollForConversion+0x84>
{
/* Update ADC state machine to timeout */
SET_BIT(hadc->State, HAL_ADC_STATE_TIMEOUT);
8004f6c: 687b ldr r3, [r7, #4]
8004f6e: 6c1b ldr r3, [r3, #64] ; 0x40
8004f70: f043 0204 orr.w r2, r3, #4
8004f74: 687b ldr r3, [r7, #4]
8004f76: 641a str r2, [r3, #64] ; 0x40
/* Process unlocked */
__HAL_UNLOCK(hadc);
8004f78: 687b ldr r3, [r7, #4]
8004f7a: 2200 movs r2, #0
8004f7c: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_TIMEOUT;
8004f80: 2303 movs r3, #3
8004f82: e03d b.n 8005000 <HAL_ADC_PollForConversion+0x100>
while(!(__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_EOC)))
8004f84: 687b ldr r3, [r7, #4]
8004f86: 681b ldr r3, [r3, #0]
8004f88: 681b ldr r3, [r3, #0]
8004f8a: f003 0302 and.w r3, r3, #2
8004f8e: 2b02 cmp r3, #2
8004f90: d1dd bne.n 8004f4e <HAL_ADC_PollForConversion+0x4e>
}
}
}
/* Clear regular group conversion flag */
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_STRT | ADC_FLAG_EOC);
8004f92: 687b ldr r3, [r7, #4]
8004f94: 681b ldr r3, [r3, #0]
8004f96: f06f 0212 mvn.w r2, #18
8004f9a: 601a str r2, [r3, #0]
/* Update ADC state machine */
SET_BIT(hadc->State, HAL_ADC_STATE_REG_EOC);
8004f9c: 687b ldr r3, [r7, #4]
8004f9e: 6c1b ldr r3, [r3, #64] ; 0x40
8004fa0: f443 7200 orr.w r2, r3, #512 ; 0x200
8004fa4: 687b ldr r3, [r7, #4]
8004fa6: 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) &&
8004fa8: 687b ldr r3, [r7, #4]
8004faa: 681b ldr r3, [r3, #0]
8004fac: 689b ldr r3, [r3, #8]
8004fae: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
8004fb2: 2b00 cmp r3, #0
8004fb4: d123 bne.n 8004ffe <HAL_ADC_PollForConversion+0xfe>
(hadc->Init.ContinuousConvMode == DISABLE) &&
8004fb6: 687b ldr r3, [r7, #4]
8004fb8: 699b ldr r3, [r3, #24]
if(ADC_IS_SOFTWARE_START_REGULAR(hadc) &&
8004fba: 2b00 cmp r3, #0
8004fbc: d11f bne.n 8004ffe <HAL_ADC_PollForConversion+0xfe>
(HAL_IS_BIT_CLR(hadc->Instance->SQR1, ADC_SQR1_L) ||
8004fbe: 687b ldr r3, [r7, #4]
8004fc0: 681b ldr r3, [r3, #0]
8004fc2: 6adb ldr r3, [r3, #44] ; 0x2c
8004fc4: f403 0370 and.w r3, r3, #15728640 ; 0xf00000
(hadc->Init.ContinuousConvMode == DISABLE) &&
8004fc8: 2b00 cmp r3, #0
8004fca: d006 beq.n 8004fda <HAL_ADC_PollForConversion+0xda>
HAL_IS_BIT_CLR(hadc->Instance->CR2, ADC_CR2_EOCS) ) )
8004fcc: 687b ldr r3, [r7, #4]
8004fce: 681b ldr r3, [r3, #0]
8004fd0: 689b ldr r3, [r3, #8]
8004fd2: f403 6380 and.w r3, r3, #1024 ; 0x400
(HAL_IS_BIT_CLR(hadc->Instance->SQR1, ADC_SQR1_L) ||
8004fd6: 2b00 cmp r3, #0
8004fd8: d111 bne.n 8004ffe <HAL_ADC_PollForConversion+0xfe>
{
/* Set ADC state */
CLEAR_BIT(hadc->State, HAL_ADC_STATE_REG_BUSY);
8004fda: 687b ldr r3, [r7, #4]
8004fdc: 6c1b ldr r3, [r3, #64] ; 0x40
8004fde: f423 7280 bic.w r2, r3, #256 ; 0x100
8004fe2: 687b ldr r3, [r7, #4]
8004fe4: 641a str r2, [r3, #64] ; 0x40
if (HAL_IS_BIT_CLR(hadc->State, HAL_ADC_STATE_INJ_BUSY))
8004fe6: 687b ldr r3, [r7, #4]
8004fe8: 6c1b ldr r3, [r3, #64] ; 0x40
8004fea: f403 5380 and.w r3, r3, #4096 ; 0x1000
8004fee: 2b00 cmp r3, #0
8004ff0: d105 bne.n 8004ffe <HAL_ADC_PollForConversion+0xfe>
{
SET_BIT(hadc->State, HAL_ADC_STATE_READY);
8004ff2: 687b ldr r3, [r7, #4]
8004ff4: 6c1b ldr r3, [r3, #64] ; 0x40
8004ff6: f043 0201 orr.w r2, r3, #1
8004ffa: 687b ldr r3, [r7, #4]
8004ffc: 641a str r2, [r3, #64] ; 0x40
}
}
/* Return ADC state */
return HAL_OK;
8004ffe: 2300 movs r3, #0
}
8005000: 4618 mov r0, r3
8005002: 3710 adds r7, #16
8005004: 46bd mov sp, r7
8005006: bd80 pop {r7, pc}
08005008 <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)
{
8005008: b480 push {r7}
800500a: b083 sub sp, #12
800500c: af00 add r7, sp, #0
800500e: 6078 str r0, [r7, #4]
/* Return the selected ADC converted value */
return hadc->Instance->DR;
8005010: 687b ldr r3, [r7, #4]
8005012: 681b ldr r3, [r3, #0]
8005014: 6cdb ldr r3, [r3, #76] ; 0x4c
}
8005016: 4618 mov r0, r3
8005018: 370c adds r7, #12
800501a: 46bd mov sp, r7
800501c: f85d 7b04 ldr.w r7, [sp], #4
8005020: 4770 bx lr
...
08005024 <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)
{
8005024: b480 push {r7}
8005026: b085 sub sp, #20
8005028: af00 add r7, sp, #0
800502a: 6078 str r0, [r7, #4]
800502c: 6039 str r1, [r7, #0]
__IO uint32_t counter = 0;
800502e: 2300 movs r3, #0
8005030: 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);
8005032: 687b ldr r3, [r7, #4]
8005034: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
8005038: 2b01 cmp r3, #1
800503a: d101 bne.n 8005040 <HAL_ADC_ConfigChannel+0x1c>
800503c: 2302 movs r3, #2
800503e: e12a b.n 8005296 <HAL_ADC_ConfigChannel+0x272>
8005040: 687b ldr r3, [r7, #4]
8005042: 2201 movs r2, #1
8005044: 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))
8005048: 683b ldr r3, [r7, #0]
800504a: 681b ldr r3, [r3, #0]
800504c: 2b09 cmp r3, #9
800504e: d93a bls.n 80050c6 <HAL_ADC_ConfigChannel+0xa2>
8005050: 683b ldr r3, [r7, #0]
8005052: 681b ldr r3, [r3, #0]
8005054: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
8005058: d035 beq.n 80050c6 <HAL_ADC_ConfigChannel+0xa2>
{
/* Clear the old sample time */
hadc->Instance->SMPR1 &= ~ADC_SMPR1(ADC_SMPR1_SMP10, sConfig->Channel);
800505a: 687b ldr r3, [r7, #4]
800505c: 681b ldr r3, [r3, #0]
800505e: 68d9 ldr r1, [r3, #12]
8005060: 683b ldr r3, [r7, #0]
8005062: 681b ldr r3, [r3, #0]
8005064: b29b uxth r3, r3
8005066: 461a mov r2, r3
8005068: 4613 mov r3, r2
800506a: 005b lsls r3, r3, #1
800506c: 4413 add r3, r2
800506e: 3b1e subs r3, #30
8005070: 2207 movs r2, #7
8005072: fa02 f303 lsl.w r3, r2, r3
8005076: 43da mvns r2, r3
8005078: 687b ldr r3, [r7, #4]
800507a: 681b ldr r3, [r3, #0]
800507c: 400a ands r2, r1
800507e: 60da str r2, [r3, #12]
if (sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
8005080: 683b ldr r3, [r7, #0]
8005082: 681b ldr r3, [r3, #0]
8005084: 4a87 ldr r2, [pc, #540] ; (80052a4 <HAL_ADC_ConfigChannel+0x280>)
8005086: 4293 cmp r3, r2
8005088: d10a bne.n 80050a0 <HAL_ADC_ConfigChannel+0x7c>
{
/* Set the new sample time */
hadc->Instance->SMPR1 |= ADC_SMPR1(sConfig->SamplingTime, ADC_CHANNEL_18);
800508a: 687b ldr r3, [r7, #4]
800508c: 681b ldr r3, [r3, #0]
800508e: 68d9 ldr r1, [r3, #12]
8005090: 683b ldr r3, [r7, #0]
8005092: 689b ldr r3, [r3, #8]
8005094: 061a lsls r2, r3, #24
8005096: 687b ldr r3, [r7, #4]
8005098: 681b ldr r3, [r3, #0]
800509a: 430a orrs r2, r1
800509c: 60da str r2, [r3, #12]
if (sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
800509e: e035 b.n 800510c <HAL_ADC_ConfigChannel+0xe8>
}
else
{
/* Set the new sample time */
hadc->Instance->SMPR1 |= ADC_SMPR1(sConfig->SamplingTime, sConfig->Channel);
80050a0: 687b ldr r3, [r7, #4]
80050a2: 681b ldr r3, [r3, #0]
80050a4: 68d9 ldr r1, [r3, #12]
80050a6: 683b ldr r3, [r7, #0]
80050a8: 689a ldr r2, [r3, #8]
80050aa: 683b ldr r3, [r7, #0]
80050ac: 681b ldr r3, [r3, #0]
80050ae: b29b uxth r3, r3
80050b0: 4618 mov r0, r3
80050b2: 4603 mov r3, r0
80050b4: 005b lsls r3, r3, #1
80050b6: 4403 add r3, r0
80050b8: 3b1e subs r3, #30
80050ba: 409a lsls r2, r3
80050bc: 687b ldr r3, [r7, #4]
80050be: 681b ldr r3, [r3, #0]
80050c0: 430a orrs r2, r1
80050c2: 60da str r2, [r3, #12]
if (sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
80050c4: e022 b.n 800510c <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);
80050c6: 687b ldr r3, [r7, #4]
80050c8: 681b ldr r3, [r3, #0]
80050ca: 6919 ldr r1, [r3, #16]
80050cc: 683b ldr r3, [r7, #0]
80050ce: 681b ldr r3, [r3, #0]
80050d0: b29b uxth r3, r3
80050d2: 461a mov r2, r3
80050d4: 4613 mov r3, r2
80050d6: 005b lsls r3, r3, #1
80050d8: 4413 add r3, r2
80050da: 2207 movs r2, #7
80050dc: fa02 f303 lsl.w r3, r2, r3
80050e0: 43da mvns r2, r3
80050e2: 687b ldr r3, [r7, #4]
80050e4: 681b ldr r3, [r3, #0]
80050e6: 400a ands r2, r1
80050e8: 611a str r2, [r3, #16]
/* Set the new sample time */
hadc->Instance->SMPR2 |= ADC_SMPR2(sConfig->SamplingTime, sConfig->Channel);
80050ea: 687b ldr r3, [r7, #4]
80050ec: 681b ldr r3, [r3, #0]
80050ee: 6919 ldr r1, [r3, #16]
80050f0: 683b ldr r3, [r7, #0]
80050f2: 689a ldr r2, [r3, #8]
80050f4: 683b ldr r3, [r7, #0]
80050f6: 681b ldr r3, [r3, #0]
80050f8: b29b uxth r3, r3
80050fa: 4618 mov r0, r3
80050fc: 4603 mov r3, r0
80050fe: 005b lsls r3, r3, #1
8005100: 4403 add r3, r0
8005102: 409a lsls r2, r3
8005104: 687b ldr r3, [r7, #4]
8005106: 681b ldr r3, [r3, #0]
8005108: 430a orrs r2, r1
800510a: 611a str r2, [r3, #16]
}
/* For Rank 1 to 6 */
if (sConfig->Rank < 7)
800510c: 683b ldr r3, [r7, #0]
800510e: 685b ldr r3, [r3, #4]
8005110: 2b06 cmp r3, #6
8005112: d824 bhi.n 800515e <HAL_ADC_ConfigChannel+0x13a>
{
/* Clear the old SQx bits for the selected rank */
hadc->Instance->SQR3 &= ~ADC_SQR3_RK(ADC_SQR3_SQ1, sConfig->Rank);
8005114: 687b ldr r3, [r7, #4]
8005116: 681b ldr r3, [r3, #0]
8005118: 6b59 ldr r1, [r3, #52] ; 0x34
800511a: 683b ldr r3, [r7, #0]
800511c: 685a ldr r2, [r3, #4]
800511e: 4613 mov r3, r2
8005120: 009b lsls r3, r3, #2
8005122: 4413 add r3, r2
8005124: 3b05 subs r3, #5
8005126: 221f movs r2, #31
8005128: fa02 f303 lsl.w r3, r2, r3
800512c: 43da mvns r2, r3
800512e: 687b ldr r3, [r7, #4]
8005130: 681b ldr r3, [r3, #0]
8005132: 400a ands r2, r1
8005134: 635a str r2, [r3, #52] ; 0x34
/* Set the SQx bits for the selected rank */
hadc->Instance->SQR3 |= ADC_SQR3_RK(sConfig->Channel, sConfig->Rank);
8005136: 687b ldr r3, [r7, #4]
8005138: 681b ldr r3, [r3, #0]
800513a: 6b59 ldr r1, [r3, #52] ; 0x34
800513c: 683b ldr r3, [r7, #0]
800513e: 681b ldr r3, [r3, #0]
8005140: b29b uxth r3, r3
8005142: 4618 mov r0, r3
8005144: 683b ldr r3, [r7, #0]
8005146: 685a ldr r2, [r3, #4]
8005148: 4613 mov r3, r2
800514a: 009b lsls r3, r3, #2
800514c: 4413 add r3, r2
800514e: 3b05 subs r3, #5
8005150: fa00 f203 lsl.w r2, r0, r3
8005154: 687b ldr r3, [r7, #4]
8005156: 681b ldr r3, [r3, #0]
8005158: 430a orrs r2, r1
800515a: 635a str r2, [r3, #52] ; 0x34
800515c: e04c b.n 80051f8 <HAL_ADC_ConfigChannel+0x1d4>
}
/* For Rank 7 to 12 */
else if (sConfig->Rank < 13)
800515e: 683b ldr r3, [r7, #0]
8005160: 685b ldr r3, [r3, #4]
8005162: 2b0c cmp r3, #12
8005164: d824 bhi.n 80051b0 <HAL_ADC_ConfigChannel+0x18c>
{
/* Clear the old SQx bits for the selected rank */
hadc->Instance->SQR2 &= ~ADC_SQR2_RK(ADC_SQR2_SQ7, sConfig->Rank);
8005166: 687b ldr r3, [r7, #4]
8005168: 681b ldr r3, [r3, #0]
800516a: 6b19 ldr r1, [r3, #48] ; 0x30
800516c: 683b ldr r3, [r7, #0]
800516e: 685a ldr r2, [r3, #4]
8005170: 4613 mov r3, r2
8005172: 009b lsls r3, r3, #2
8005174: 4413 add r3, r2
8005176: 3b23 subs r3, #35 ; 0x23
8005178: 221f movs r2, #31
800517a: fa02 f303 lsl.w r3, r2, r3
800517e: 43da mvns r2, r3
8005180: 687b ldr r3, [r7, #4]
8005182: 681b ldr r3, [r3, #0]
8005184: 400a ands r2, r1
8005186: 631a str r2, [r3, #48] ; 0x30
/* Set the SQx bits for the selected rank */
hadc->Instance->SQR2 |= ADC_SQR2_RK(sConfig->Channel, sConfig->Rank);
8005188: 687b ldr r3, [r7, #4]
800518a: 681b ldr r3, [r3, #0]
800518c: 6b19 ldr r1, [r3, #48] ; 0x30
800518e: 683b ldr r3, [r7, #0]
8005190: 681b ldr r3, [r3, #0]
8005192: b29b uxth r3, r3
8005194: 4618 mov r0, r3
8005196: 683b ldr r3, [r7, #0]
8005198: 685a ldr r2, [r3, #4]
800519a: 4613 mov r3, r2
800519c: 009b lsls r3, r3, #2
800519e: 4413 add r3, r2
80051a0: 3b23 subs r3, #35 ; 0x23
80051a2: fa00 f203 lsl.w r2, r0, r3
80051a6: 687b ldr r3, [r7, #4]
80051a8: 681b ldr r3, [r3, #0]
80051aa: 430a orrs r2, r1
80051ac: 631a str r2, [r3, #48] ; 0x30
80051ae: e023 b.n 80051f8 <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);
80051b0: 687b ldr r3, [r7, #4]
80051b2: 681b ldr r3, [r3, #0]
80051b4: 6ad9 ldr r1, [r3, #44] ; 0x2c
80051b6: 683b ldr r3, [r7, #0]
80051b8: 685a ldr r2, [r3, #4]
80051ba: 4613 mov r3, r2
80051bc: 009b lsls r3, r3, #2
80051be: 4413 add r3, r2
80051c0: 3b41 subs r3, #65 ; 0x41
80051c2: 221f movs r2, #31
80051c4: fa02 f303 lsl.w r3, r2, r3
80051c8: 43da mvns r2, r3
80051ca: 687b ldr r3, [r7, #4]
80051cc: 681b ldr r3, [r3, #0]
80051ce: 400a ands r2, r1
80051d0: 62da str r2, [r3, #44] ; 0x2c
/* Set the SQx bits for the selected rank */
hadc->Instance->SQR1 |= ADC_SQR1_RK(sConfig->Channel, sConfig->Rank);
80051d2: 687b ldr r3, [r7, #4]
80051d4: 681b ldr r3, [r3, #0]
80051d6: 6ad9 ldr r1, [r3, #44] ; 0x2c
80051d8: 683b ldr r3, [r7, #0]
80051da: 681b ldr r3, [r3, #0]
80051dc: b29b uxth r3, r3
80051de: 4618 mov r0, r3
80051e0: 683b ldr r3, [r7, #0]
80051e2: 685a ldr r2, [r3, #4]
80051e4: 4613 mov r3, r2
80051e6: 009b lsls r3, r3, #2
80051e8: 4413 add r3, r2
80051ea: 3b41 subs r3, #65 ; 0x41
80051ec: fa00 f203 lsl.w r2, r0, r3
80051f0: 687b ldr r3, [r7, #4]
80051f2: 681b ldr r3, [r3, #0]
80051f4: 430a orrs r2, r1
80051f6: 62da str r2, [r3, #44] ; 0x2c
}
/* if no internal channel selected */
if ((hadc->Instance == ADC1) && (sConfig->Channel == ADC_INTERNAL_NONE))
80051f8: 687b ldr r3, [r7, #4]
80051fa: 681b ldr r3, [r3, #0]
80051fc: 4a2a ldr r2, [pc, #168] ; (80052a8 <HAL_ADC_ConfigChannel+0x284>)
80051fe: 4293 cmp r3, r2
8005200: d10a bne.n 8005218 <HAL_ADC_ConfigChannel+0x1f4>
8005202: 683b ldr r3, [r7, #0]
8005204: 681b ldr r3, [r3, #0]
8005206: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
800520a: d105 bne.n 8005218 <HAL_ADC_ConfigChannel+0x1f4>
{
/* Disable the VBAT & TSVREFE channel*/
ADC->CCR &= ~(ADC_CCR_VBATE | ADC_CCR_TSVREFE);
800520c: 4b27 ldr r3, [pc, #156] ; (80052ac <HAL_ADC_ConfigChannel+0x288>)
800520e: 685b ldr r3, [r3, #4]
8005210: 4a26 ldr r2, [pc, #152] ; (80052ac <HAL_ADC_ConfigChannel+0x288>)
8005212: f423 0340 bic.w r3, r3, #12582912 ; 0xc00000
8005216: 6053 str r3, [r2, #4]
}
/* if ADC1 Channel_18 is selected enable VBAT Channel */
if ((hadc->Instance == ADC1) && (sConfig->Channel == ADC_CHANNEL_VBAT))
8005218: 687b ldr r3, [r7, #4]
800521a: 681b ldr r3, [r3, #0]
800521c: 4a22 ldr r2, [pc, #136] ; (80052a8 <HAL_ADC_ConfigChannel+0x284>)
800521e: 4293 cmp r3, r2
8005220: d109 bne.n 8005236 <HAL_ADC_ConfigChannel+0x212>
8005222: 683b ldr r3, [r7, #0]
8005224: 681b ldr r3, [r3, #0]
8005226: 2b12 cmp r3, #18
8005228: d105 bne.n 8005236 <HAL_ADC_ConfigChannel+0x212>
{
/* Enable the VBAT channel*/
ADC->CCR |= ADC_CCR_VBATE;
800522a: 4b20 ldr r3, [pc, #128] ; (80052ac <HAL_ADC_ConfigChannel+0x288>)
800522c: 685b ldr r3, [r3, #4]
800522e: 4a1f ldr r2, [pc, #124] ; (80052ac <HAL_ADC_ConfigChannel+0x288>)
8005230: f443 0380 orr.w r3, r3, #4194304 ; 0x400000
8005234: 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)))
8005236: 687b ldr r3, [r7, #4]
8005238: 681b ldr r3, [r3, #0]
800523a: 4a1b ldr r2, [pc, #108] ; (80052a8 <HAL_ADC_ConfigChannel+0x284>)
800523c: 4293 cmp r3, r2
800523e: d125 bne.n 800528c <HAL_ADC_ConfigChannel+0x268>
8005240: 683b ldr r3, [r7, #0]
8005242: 681b ldr r3, [r3, #0]
8005244: 4a17 ldr r2, [pc, #92] ; (80052a4 <HAL_ADC_ConfigChannel+0x280>)
8005246: 4293 cmp r3, r2
8005248: d003 beq.n 8005252 <HAL_ADC_ConfigChannel+0x22e>
800524a: 683b ldr r3, [r7, #0]
800524c: 681b ldr r3, [r3, #0]
800524e: 2b11 cmp r3, #17
8005250: d11c bne.n 800528c <HAL_ADC_ConfigChannel+0x268>
{
/* Enable the TSVREFE channel*/
ADC->CCR |= ADC_CCR_TSVREFE;
8005252: 4b16 ldr r3, [pc, #88] ; (80052ac <HAL_ADC_ConfigChannel+0x288>)
8005254: 685b ldr r3, [r3, #4]
8005256: 4a15 ldr r2, [pc, #84] ; (80052ac <HAL_ADC_ConfigChannel+0x288>)
8005258: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
800525c: 6053 str r3, [r2, #4]
if(sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
800525e: 683b ldr r3, [r7, #0]
8005260: 681b ldr r3, [r3, #0]
8005262: 4a10 ldr r2, [pc, #64] ; (80052a4 <HAL_ADC_ConfigChannel+0x280>)
8005264: 4293 cmp r3, r2
8005266: d111 bne.n 800528c <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));
8005268: 4b11 ldr r3, [pc, #68] ; (80052b0 <HAL_ADC_ConfigChannel+0x28c>)
800526a: 681b ldr r3, [r3, #0]
800526c: 4a11 ldr r2, [pc, #68] ; (80052b4 <HAL_ADC_ConfigChannel+0x290>)
800526e: fba2 2303 umull r2, r3, r2, r3
8005272: 0c9a lsrs r2, r3, #18
8005274: 4613 mov r3, r2
8005276: 009b lsls r3, r3, #2
8005278: 4413 add r3, r2
800527a: 005b lsls r3, r3, #1
800527c: 60fb str r3, [r7, #12]
while(counter != 0)
800527e: e002 b.n 8005286 <HAL_ADC_ConfigChannel+0x262>
{
counter--;
8005280: 68fb ldr r3, [r7, #12]
8005282: 3b01 subs r3, #1
8005284: 60fb str r3, [r7, #12]
while(counter != 0)
8005286: 68fb ldr r3, [r7, #12]
8005288: 2b00 cmp r3, #0
800528a: d1f9 bne.n 8005280 <HAL_ADC_ConfigChannel+0x25c>
}
}
}
/* Process unlocked */
__HAL_UNLOCK(hadc);
800528c: 687b ldr r3, [r7, #4]
800528e: 2200 movs r2, #0
8005290: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Return function status */
return HAL_OK;
8005294: 2300 movs r3, #0
}
8005296: 4618 mov r0, r3
8005298: 3714 adds r7, #20
800529a: 46bd mov sp, r7
800529c: f85d 7b04 ldr.w r7, [sp], #4
80052a0: 4770 bx lr
80052a2: bf00 nop
80052a4: 10000012 .word 0x10000012
80052a8: 40012000 .word 0x40012000
80052ac: 40012300 .word 0x40012300
80052b0: 20000050 .word 0x20000050
80052b4: 431bde83 .word 0x431bde83
080052b8 <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)
{
80052b8: b480 push {r7}
80052ba: b083 sub sp, #12
80052bc: af00 add r7, sp, #0
80052be: 6078 str r0, [r7, #4]
/* Set ADC parameters */
/* Set the ADC clock prescaler */
ADC->CCR &= ~(ADC_CCR_ADCPRE);
80052c0: 4b78 ldr r3, [pc, #480] ; (80054a4 <ADC_Init+0x1ec>)
80052c2: 685b ldr r3, [r3, #4]
80052c4: 4a77 ldr r2, [pc, #476] ; (80054a4 <ADC_Init+0x1ec>)
80052c6: f423 3340 bic.w r3, r3, #196608 ; 0x30000
80052ca: 6053 str r3, [r2, #4]
ADC->CCR |= hadc->Init.ClockPrescaler;
80052cc: 4b75 ldr r3, [pc, #468] ; (80054a4 <ADC_Init+0x1ec>)
80052ce: 685a ldr r2, [r3, #4]
80052d0: 687b ldr r3, [r7, #4]
80052d2: 685b ldr r3, [r3, #4]
80052d4: 4973 ldr r1, [pc, #460] ; (80054a4 <ADC_Init+0x1ec>)
80052d6: 4313 orrs r3, r2
80052d8: 604b str r3, [r1, #4]
/* Set ADC scan mode */
hadc->Instance->CR1 &= ~(ADC_CR1_SCAN);
80052da: 687b ldr r3, [r7, #4]
80052dc: 681b ldr r3, [r3, #0]
80052de: 685a ldr r2, [r3, #4]
80052e0: 687b ldr r3, [r7, #4]
80052e2: 681b ldr r3, [r3, #0]
80052e4: f422 7280 bic.w r2, r2, #256 ; 0x100
80052e8: 605a str r2, [r3, #4]
hadc->Instance->CR1 |= ADC_CR1_SCANCONV(hadc->Init.ScanConvMode);
80052ea: 687b ldr r3, [r7, #4]
80052ec: 681b ldr r3, [r3, #0]
80052ee: 6859 ldr r1, [r3, #4]
80052f0: 687b ldr r3, [r7, #4]
80052f2: 691b ldr r3, [r3, #16]
80052f4: 021a lsls r2, r3, #8
80052f6: 687b ldr r3, [r7, #4]
80052f8: 681b ldr r3, [r3, #0]
80052fa: 430a orrs r2, r1
80052fc: 605a str r2, [r3, #4]
/* Set ADC resolution */
hadc->Instance->CR1 &= ~(ADC_CR1_RES);
80052fe: 687b ldr r3, [r7, #4]
8005300: 681b ldr r3, [r3, #0]
8005302: 685a ldr r2, [r3, #4]
8005304: 687b ldr r3, [r7, #4]
8005306: 681b ldr r3, [r3, #0]
8005308: f022 7240 bic.w r2, r2, #50331648 ; 0x3000000
800530c: 605a str r2, [r3, #4]
hadc->Instance->CR1 |= hadc->Init.Resolution;
800530e: 687b ldr r3, [r7, #4]
8005310: 681b ldr r3, [r3, #0]
8005312: 6859 ldr r1, [r3, #4]
8005314: 687b ldr r3, [r7, #4]
8005316: 689a ldr r2, [r3, #8]
8005318: 687b ldr r3, [r7, #4]
800531a: 681b ldr r3, [r3, #0]
800531c: 430a orrs r2, r1
800531e: 605a str r2, [r3, #4]
/* Set ADC data alignment */
hadc->Instance->CR2 &= ~(ADC_CR2_ALIGN);
8005320: 687b ldr r3, [r7, #4]
8005322: 681b ldr r3, [r3, #0]
8005324: 689a ldr r2, [r3, #8]
8005326: 687b ldr r3, [r7, #4]
8005328: 681b ldr r3, [r3, #0]
800532a: f422 6200 bic.w r2, r2, #2048 ; 0x800
800532e: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= hadc->Init.DataAlign;
8005330: 687b ldr r3, [r7, #4]
8005332: 681b ldr r3, [r3, #0]
8005334: 6899 ldr r1, [r3, #8]
8005336: 687b ldr r3, [r7, #4]
8005338: 68da ldr r2, [r3, #12]
800533a: 687b ldr r3, [r7, #4]
800533c: 681b ldr r3, [r3, #0]
800533e: 430a orrs r2, r1
8005340: 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)
8005342: 687b ldr r3, [r7, #4]
8005344: 6a9b ldr r3, [r3, #40] ; 0x28
8005346: 4a58 ldr r2, [pc, #352] ; (80054a8 <ADC_Init+0x1f0>)
8005348: 4293 cmp r3, r2
800534a: d022 beq.n 8005392 <ADC_Init+0xda>
{
/* Select external trigger to start conversion */
hadc->Instance->CR2 &= ~(ADC_CR2_EXTSEL);
800534c: 687b ldr r3, [r7, #4]
800534e: 681b ldr r3, [r3, #0]
8005350: 689a ldr r2, [r3, #8]
8005352: 687b ldr r3, [r7, #4]
8005354: 681b ldr r3, [r3, #0]
8005356: f022 6270 bic.w r2, r2, #251658240 ; 0xf000000
800535a: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= hadc->Init.ExternalTrigConv;
800535c: 687b ldr r3, [r7, #4]
800535e: 681b ldr r3, [r3, #0]
8005360: 6899 ldr r1, [r3, #8]
8005362: 687b ldr r3, [r7, #4]
8005364: 6a9a ldr r2, [r3, #40] ; 0x28
8005366: 687b ldr r3, [r7, #4]
8005368: 681b ldr r3, [r3, #0]
800536a: 430a orrs r2, r1
800536c: 609a str r2, [r3, #8]
/* Select external trigger polarity */
hadc->Instance->CR2 &= ~(ADC_CR2_EXTEN);
800536e: 687b ldr r3, [r7, #4]
8005370: 681b ldr r3, [r3, #0]
8005372: 689a ldr r2, [r3, #8]
8005374: 687b ldr r3, [r7, #4]
8005376: 681b ldr r3, [r3, #0]
8005378: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000
800537c: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= hadc->Init.ExternalTrigConvEdge;
800537e: 687b ldr r3, [r7, #4]
8005380: 681b ldr r3, [r3, #0]
8005382: 6899 ldr r1, [r3, #8]
8005384: 687b ldr r3, [r7, #4]
8005386: 6ada ldr r2, [r3, #44] ; 0x2c
8005388: 687b ldr r3, [r7, #4]
800538a: 681b ldr r3, [r3, #0]
800538c: 430a orrs r2, r1
800538e: 609a str r2, [r3, #8]
8005390: e00f b.n 80053b2 <ADC_Init+0xfa>
}
else
{
/* Reset the external trigger */
hadc->Instance->CR2 &= ~(ADC_CR2_EXTSEL);
8005392: 687b ldr r3, [r7, #4]
8005394: 681b ldr r3, [r3, #0]
8005396: 689a ldr r2, [r3, #8]
8005398: 687b ldr r3, [r7, #4]
800539a: 681b ldr r3, [r3, #0]
800539c: f022 6270 bic.w r2, r2, #251658240 ; 0xf000000
80053a0: 609a str r2, [r3, #8]
hadc->Instance->CR2 &= ~(ADC_CR2_EXTEN);
80053a2: 687b ldr r3, [r7, #4]
80053a4: 681b ldr r3, [r3, #0]
80053a6: 689a ldr r2, [r3, #8]
80053a8: 687b ldr r3, [r7, #4]
80053aa: 681b ldr r3, [r3, #0]
80053ac: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000
80053b0: 609a str r2, [r3, #8]
}
/* Enable or disable ADC continuous conversion mode */
hadc->Instance->CR2 &= ~(ADC_CR2_CONT);
80053b2: 687b ldr r3, [r7, #4]
80053b4: 681b ldr r3, [r3, #0]
80053b6: 689a ldr r2, [r3, #8]
80053b8: 687b ldr r3, [r7, #4]
80053ba: 681b ldr r3, [r3, #0]
80053bc: f022 0202 bic.w r2, r2, #2
80053c0: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= ADC_CR2_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode);
80053c2: 687b ldr r3, [r7, #4]
80053c4: 681b ldr r3, [r3, #0]
80053c6: 6899 ldr r1, [r3, #8]
80053c8: 687b ldr r3, [r7, #4]
80053ca: 699b ldr r3, [r3, #24]
80053cc: 005a lsls r2, r3, #1
80053ce: 687b ldr r3, [r7, #4]
80053d0: 681b ldr r3, [r3, #0]
80053d2: 430a orrs r2, r1
80053d4: 609a str r2, [r3, #8]
if(hadc->Init.DiscontinuousConvMode != DISABLE)
80053d6: 687b ldr r3, [r7, #4]
80053d8: f893 3020 ldrb.w r3, [r3, #32]
80053dc: 2b00 cmp r3, #0
80053de: d01b beq.n 8005418 <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;
80053e0: 687b ldr r3, [r7, #4]
80053e2: 681b ldr r3, [r3, #0]
80053e4: 685a ldr r2, [r3, #4]
80053e6: 687b ldr r3, [r7, #4]
80053e8: 681b ldr r3, [r3, #0]
80053ea: f442 6200 orr.w r2, r2, #2048 ; 0x800
80053ee: 605a str r2, [r3, #4]
/* Set the number of channels to be converted in discontinuous mode */
hadc->Instance->CR1 &= ~(ADC_CR1_DISCNUM);
80053f0: 687b ldr r3, [r7, #4]
80053f2: 681b ldr r3, [r3, #0]
80053f4: 685a ldr r2, [r3, #4]
80053f6: 687b ldr r3, [r7, #4]
80053f8: 681b ldr r3, [r3, #0]
80053fa: f422 4260 bic.w r2, r2, #57344 ; 0xe000
80053fe: 605a str r2, [r3, #4]
hadc->Instance->CR1 |= ADC_CR1_DISCONTINUOUS(hadc->Init.NbrOfDiscConversion);
8005400: 687b ldr r3, [r7, #4]
8005402: 681b ldr r3, [r3, #0]
8005404: 6859 ldr r1, [r3, #4]
8005406: 687b ldr r3, [r7, #4]
8005408: 6a5b ldr r3, [r3, #36] ; 0x24
800540a: 3b01 subs r3, #1
800540c: 035a lsls r2, r3, #13
800540e: 687b ldr r3, [r7, #4]
8005410: 681b ldr r3, [r3, #0]
8005412: 430a orrs r2, r1
8005414: 605a str r2, [r3, #4]
8005416: e007 b.n 8005428 <ADC_Init+0x170>
}
else
{
/* Disable the selected ADC regular discontinuous mode */
hadc->Instance->CR1 &= ~(ADC_CR1_DISCEN);
8005418: 687b ldr r3, [r7, #4]
800541a: 681b ldr r3, [r3, #0]
800541c: 685a ldr r2, [r3, #4]
800541e: 687b ldr r3, [r7, #4]
8005420: 681b ldr r3, [r3, #0]
8005422: f422 6200 bic.w r2, r2, #2048 ; 0x800
8005426: 605a str r2, [r3, #4]
}
/* Set ADC number of conversion */
hadc->Instance->SQR1 &= ~(ADC_SQR1_L);
8005428: 687b ldr r3, [r7, #4]
800542a: 681b ldr r3, [r3, #0]
800542c: 6ada ldr r2, [r3, #44] ; 0x2c
800542e: 687b ldr r3, [r7, #4]
8005430: 681b ldr r3, [r3, #0]
8005432: f422 0270 bic.w r2, r2, #15728640 ; 0xf00000
8005436: 62da str r2, [r3, #44] ; 0x2c
hadc->Instance->SQR1 |= ADC_SQR1(hadc->Init.NbrOfConversion);
8005438: 687b ldr r3, [r7, #4]
800543a: 681b ldr r3, [r3, #0]
800543c: 6ad9 ldr r1, [r3, #44] ; 0x2c
800543e: 687b ldr r3, [r7, #4]
8005440: 69db ldr r3, [r3, #28]
8005442: 3b01 subs r3, #1
8005444: 051a lsls r2, r3, #20
8005446: 687b ldr r3, [r7, #4]
8005448: 681b ldr r3, [r3, #0]
800544a: 430a orrs r2, r1
800544c: 62da str r2, [r3, #44] ; 0x2c
/* Enable or disable ADC DMA continuous request */
hadc->Instance->CR2 &= ~(ADC_CR2_DDS);
800544e: 687b ldr r3, [r7, #4]
8005450: 681b ldr r3, [r3, #0]
8005452: 689a ldr r2, [r3, #8]
8005454: 687b ldr r3, [r7, #4]
8005456: 681b ldr r3, [r3, #0]
8005458: f422 7200 bic.w r2, r2, #512 ; 0x200
800545c: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= ADC_CR2_DMAContReq((uint32_t)hadc->Init.DMAContinuousRequests);
800545e: 687b ldr r3, [r7, #4]
8005460: 681b ldr r3, [r3, #0]
8005462: 6899 ldr r1, [r3, #8]
8005464: 687b ldr r3, [r7, #4]
8005466: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
800546a: 025a lsls r2, r3, #9
800546c: 687b ldr r3, [r7, #4]
800546e: 681b ldr r3, [r3, #0]
8005470: 430a orrs r2, r1
8005472: 609a str r2, [r3, #8]
/* Enable or disable ADC end of conversion selection */
hadc->Instance->CR2 &= ~(ADC_CR2_EOCS);
8005474: 687b ldr r3, [r7, #4]
8005476: 681b ldr r3, [r3, #0]
8005478: 689a ldr r2, [r3, #8]
800547a: 687b ldr r3, [r7, #4]
800547c: 681b ldr r3, [r3, #0]
800547e: f422 6280 bic.w r2, r2, #1024 ; 0x400
8005482: 609a str r2, [r3, #8]
hadc->Instance->CR2 |= ADC_CR2_EOCSelection(hadc->Init.EOCSelection);
8005484: 687b ldr r3, [r7, #4]
8005486: 681b ldr r3, [r3, #0]
8005488: 6899 ldr r1, [r3, #8]
800548a: 687b ldr r3, [r7, #4]
800548c: 695b ldr r3, [r3, #20]
800548e: 029a lsls r2, r3, #10
8005490: 687b ldr r3, [r7, #4]
8005492: 681b ldr r3, [r3, #0]
8005494: 430a orrs r2, r1
8005496: 609a str r2, [r3, #8]
}
8005498: bf00 nop
800549a: 370c adds r7, #12
800549c: 46bd mov sp, r7
800549e: f85d 7b04 ldr.w r7, [sp], #4
80054a2: 4770 bx lr
80054a4: 40012300 .word 0x40012300
80054a8: 0f000001 .word 0x0f000001
080054ac <__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)
{
80054ac: b480 push {r7}
80054ae: b085 sub sp, #20
80054b0: af00 add r7, sp, #0
80054b2: 6078 str r0, [r7, #4]
uint32_t reg_value;
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
80054b4: 687b ldr r3, [r7, #4]
80054b6: f003 0307 and.w r3, r3, #7
80054ba: 60fb str r3, [r7, #12]
reg_value = SCB->AIRCR; /* read old register configuration */
80054bc: 4b0b ldr r3, [pc, #44] ; (80054ec <__NVIC_SetPriorityGrouping+0x40>)
80054be: 68db ldr r3, [r3, #12]
80054c0: 60bb str r3, [r7, #8]
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
80054c2: 68ba ldr r2, [r7, #8]
80054c4: f64f 03ff movw r3, #63743 ; 0xf8ff
80054c8: 4013 ands r3, r2
80054ca: 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 */
80054cc: 68fb ldr r3, [r7, #12]
80054ce: 021a lsls r2, r3, #8
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
80054d0: 68bb ldr r3, [r7, #8]
80054d2: 431a orrs r2, r3
reg_value = (reg_value |
80054d4: 4b06 ldr r3, [pc, #24] ; (80054f0 <__NVIC_SetPriorityGrouping+0x44>)
80054d6: 4313 orrs r3, r2
80054d8: 60bb str r3, [r7, #8]
SCB->AIRCR = reg_value;
80054da: 4a04 ldr r2, [pc, #16] ; (80054ec <__NVIC_SetPriorityGrouping+0x40>)
80054dc: 68bb ldr r3, [r7, #8]
80054de: 60d3 str r3, [r2, #12]
}
80054e0: bf00 nop
80054e2: 3714 adds r7, #20
80054e4: 46bd mov sp, r7
80054e6: f85d 7b04 ldr.w r7, [sp], #4
80054ea: 4770 bx lr
80054ec: e000ed00 .word 0xe000ed00
80054f0: 05fa0000 .word 0x05fa0000
080054f4 <__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)
{
80054f4: b480 push {r7}
80054f6: af00 add r7, sp, #0
return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
80054f8: 4b04 ldr r3, [pc, #16] ; (800550c <__NVIC_GetPriorityGrouping+0x18>)
80054fa: 68db ldr r3, [r3, #12]
80054fc: 0a1b lsrs r3, r3, #8
80054fe: f003 0307 and.w r3, r3, #7
}
8005502: 4618 mov r0, r3
8005504: 46bd mov sp, r7
8005506: f85d 7b04 ldr.w r7, [sp], #4
800550a: 4770 bx lr
800550c: e000ed00 .word 0xe000ed00
08005510 <__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)
{
8005510: b480 push {r7}
8005512: b083 sub sp, #12
8005514: af00 add r7, sp, #0
8005516: 4603 mov r3, r0
8005518: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
800551a: f997 3007 ldrsb.w r3, [r7, #7]
800551e: 2b00 cmp r3, #0
8005520: db0b blt.n 800553a <__NVIC_EnableIRQ+0x2a>
{
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
8005522: 79fb ldrb r3, [r7, #7]
8005524: f003 021f and.w r2, r3, #31
8005528: 4907 ldr r1, [pc, #28] ; (8005548 <__NVIC_EnableIRQ+0x38>)
800552a: f997 3007 ldrsb.w r3, [r7, #7]
800552e: 095b lsrs r3, r3, #5
8005530: 2001 movs r0, #1
8005532: fa00 f202 lsl.w r2, r0, r2
8005536: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
800553a: bf00 nop
800553c: 370c adds r7, #12
800553e: 46bd mov sp, r7
8005540: f85d 7b04 ldr.w r7, [sp], #4
8005544: 4770 bx lr
8005546: bf00 nop
8005548: e000e100 .word 0xe000e100
0800554c <__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)
{
800554c: b480 push {r7}
800554e: b083 sub sp, #12
8005550: af00 add r7, sp, #0
8005552: 4603 mov r3, r0
8005554: 6039 str r1, [r7, #0]
8005556: 71fb strb r3, [r7, #7]
if ((int32_t)(IRQn) >= 0)
8005558: f997 3007 ldrsb.w r3, [r7, #7]
800555c: 2b00 cmp r3, #0
800555e: db0a blt.n 8005576 <__NVIC_SetPriority+0x2a>
{
NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8005560: 683b ldr r3, [r7, #0]
8005562: b2da uxtb r2, r3
8005564: 490c ldr r1, [pc, #48] ; (8005598 <__NVIC_SetPriority+0x4c>)
8005566: f997 3007 ldrsb.w r3, [r7, #7]
800556a: 0112 lsls r2, r2, #4
800556c: b2d2 uxtb r2, r2
800556e: 440b add r3, r1
8005570: 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);
}
}
8005574: e00a b.n 800558c <__NVIC_SetPriority+0x40>
SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
8005576: 683b ldr r3, [r7, #0]
8005578: b2da uxtb r2, r3
800557a: 4908 ldr r1, [pc, #32] ; (800559c <__NVIC_SetPriority+0x50>)
800557c: 79fb ldrb r3, [r7, #7]
800557e: f003 030f and.w r3, r3, #15
8005582: 3b04 subs r3, #4
8005584: 0112 lsls r2, r2, #4
8005586: b2d2 uxtb r2, r2
8005588: 440b add r3, r1
800558a: 761a strb r2, [r3, #24]
}
800558c: bf00 nop
800558e: 370c adds r7, #12
8005590: 46bd mov sp, r7
8005592: f85d 7b04 ldr.w r7, [sp], #4
8005596: 4770 bx lr
8005598: e000e100 .word 0xe000e100
800559c: e000ed00 .word 0xe000ed00
080055a0 <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)
{
80055a0: b480 push {r7}
80055a2: b089 sub sp, #36 ; 0x24
80055a4: af00 add r7, sp, #0
80055a6: 60f8 str r0, [r7, #12]
80055a8: 60b9 str r1, [r7, #8]
80055aa: 607a str r2, [r7, #4]
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
80055ac: 68fb ldr r3, [r7, #12]
80055ae: f003 0307 and.w r3, r3, #7
80055b2: 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);
80055b4: 69fb ldr r3, [r7, #28]
80055b6: f1c3 0307 rsb r3, r3, #7
80055ba: 2b04 cmp r3, #4
80055bc: bf28 it cs
80055be: 2304 movcs r3, #4
80055c0: 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));
80055c2: 69fb ldr r3, [r7, #28]
80055c4: 3304 adds r3, #4
80055c6: 2b06 cmp r3, #6
80055c8: d902 bls.n 80055d0 <NVIC_EncodePriority+0x30>
80055ca: 69fb ldr r3, [r7, #28]
80055cc: 3b03 subs r3, #3
80055ce: e000 b.n 80055d2 <NVIC_EncodePriority+0x32>
80055d0: 2300 movs r3, #0
80055d2: 617b str r3, [r7, #20]
return (
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
80055d4: f04f 32ff mov.w r2, #4294967295
80055d8: 69bb ldr r3, [r7, #24]
80055da: fa02 f303 lsl.w r3, r2, r3
80055de: 43da mvns r2, r3
80055e0: 68bb ldr r3, [r7, #8]
80055e2: 401a ands r2, r3
80055e4: 697b ldr r3, [r7, #20]
80055e6: 409a lsls r2, r3
((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
80055e8: f04f 31ff mov.w r1, #4294967295
80055ec: 697b ldr r3, [r7, #20]
80055ee: fa01 f303 lsl.w r3, r1, r3
80055f2: 43d9 mvns r1, r3
80055f4: 687b ldr r3, [r7, #4]
80055f6: 400b ands r3, r1
((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
80055f8: 4313 orrs r3, r2
);
}
80055fa: 4618 mov r0, r3
80055fc: 3724 adds r7, #36 ; 0x24
80055fe: 46bd mov sp, r7
8005600: f85d 7b04 ldr.w r7, [sp], #4
8005604: 4770 bx lr
08005606 <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)
{
8005606: b580 push {r7, lr}
8005608: b082 sub sp, #8
800560a: af00 add r7, sp, #0
800560c: 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);
800560e: 6878 ldr r0, [r7, #4]
8005610: f7ff ff4c bl 80054ac <__NVIC_SetPriorityGrouping>
}
8005614: bf00 nop
8005616: 3708 adds r7, #8
8005618: 46bd mov sp, r7
800561a: bd80 pop {r7, pc}
0800561c <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)
{
800561c: b580 push {r7, lr}
800561e: b086 sub sp, #24
8005620: af00 add r7, sp, #0
8005622: 4603 mov r3, r0
8005624: 60b9 str r1, [r7, #8]
8005626: 607a str r2, [r7, #4]
8005628: 73fb strb r3, [r7, #15]
uint32_t prioritygroup = 0x00;
800562a: 2300 movs r3, #0
800562c: 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();
800562e: f7ff ff61 bl 80054f4 <__NVIC_GetPriorityGrouping>
8005632: 6178 str r0, [r7, #20]
NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
8005634: 687a ldr r2, [r7, #4]
8005636: 68b9 ldr r1, [r7, #8]
8005638: 6978 ldr r0, [r7, #20]
800563a: f7ff ffb1 bl 80055a0 <NVIC_EncodePriority>
800563e: 4602 mov r2, r0
8005640: f997 300f ldrsb.w r3, [r7, #15]
8005644: 4611 mov r1, r2
8005646: 4618 mov r0, r3
8005648: f7ff ff80 bl 800554c <__NVIC_SetPriority>
}
800564c: bf00 nop
800564e: 3718 adds r7, #24
8005650: 46bd mov sp, r7
8005652: bd80 pop {r7, pc}
08005654 <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)
{
8005654: b580 push {r7, lr}
8005656: b082 sub sp, #8
8005658: af00 add r7, sp, #0
800565a: 4603 mov r3, r0
800565c: 71fb strb r3, [r7, #7]
/* Check the parameters */
assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
/* Enable interrupt */
NVIC_EnableIRQ(IRQn);
800565e: f997 3007 ldrsb.w r3, [r7, #7]
8005662: 4618 mov r0, r3
8005664: f7ff ff54 bl 8005510 <__NVIC_EnableIRQ>
}
8005668: bf00 nop
800566a: 3708 adds r7, #8
800566c: 46bd mov sp, r7
800566e: bd80 pop {r7, pc}
08005670 <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)
{
8005670: b580 push {r7, lr}
8005672: b082 sub sp, #8
8005674: af00 add r7, sp, #0
8005676: 6078 str r0, [r7, #4]
/* Check the CRC handle allocation */
if (hcrc == NULL)
8005678: 687b ldr r3, [r7, #4]
800567a: 2b00 cmp r3, #0
800567c: d101 bne.n 8005682 <HAL_CRC_Init+0x12>
{
return HAL_ERROR;
800567e: 2301 movs r3, #1
8005680: e054 b.n 800572c <HAL_CRC_Init+0xbc>
}
/* Check the parameters */
assert_param(IS_CRC_ALL_INSTANCE(hcrc->Instance));
if (hcrc->State == HAL_CRC_STATE_RESET)
8005682: 687b ldr r3, [r7, #4]
8005684: 7f5b ldrb r3, [r3, #29]
8005686: b2db uxtb r3, r3
8005688: 2b00 cmp r3, #0
800568a: d105 bne.n 8005698 <HAL_CRC_Init+0x28>
{
/* Allocate lock resource and initialize it */
hcrc->Lock = HAL_UNLOCKED;
800568c: 687b ldr r3, [r7, #4]
800568e: 2200 movs r2, #0
8005690: 771a strb r2, [r3, #28]
/* Init the low level hardware */
HAL_CRC_MspInit(hcrc);
8005692: 6878 ldr r0, [r7, #4]
8005694: f7fe fc90 bl 8003fb8 <HAL_CRC_MspInit>
}
hcrc->State = HAL_CRC_STATE_BUSY;
8005698: 687b ldr r3, [r7, #4]
800569a: 2202 movs r2, #2
800569c: 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)
800569e: 687b ldr r3, [r7, #4]
80056a0: 791b ldrb r3, [r3, #4]
80056a2: 2b00 cmp r3, #0
80056a4: d10c bne.n 80056c0 <HAL_CRC_Init+0x50>
{
/* initialize peripheral with default generating polynomial */
WRITE_REG(hcrc->Instance->POL, DEFAULT_CRC32_POLY);
80056a6: 687b ldr r3, [r7, #4]
80056a8: 681b ldr r3, [r3, #0]
80056aa: 4a22 ldr r2, [pc, #136] ; (8005734 <HAL_CRC_Init+0xc4>)
80056ac: 615a str r2, [r3, #20]
MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, CRC_POLYLENGTH_32B);
80056ae: 687b ldr r3, [r7, #4]
80056b0: 681b ldr r3, [r3, #0]
80056b2: 689a ldr r2, [r3, #8]
80056b4: 687b ldr r3, [r7, #4]
80056b6: 681b ldr r3, [r3, #0]
80056b8: f022 0218 bic.w r2, r2, #24
80056bc: 609a str r2, [r3, #8]
80056be: e00c b.n 80056da <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)
80056c0: 687b ldr r3, [r7, #4]
80056c2: 6899 ldr r1, [r3, #8]
80056c4: 687b ldr r3, [r7, #4]
80056c6: 68db ldr r3, [r3, #12]
80056c8: 461a mov r2, r3
80056ca: 6878 ldr r0, [r7, #4]
80056cc: f000 f834 bl 8005738 <HAL_CRCEx_Polynomial_Set>
80056d0: 4603 mov r3, r0
80056d2: 2b00 cmp r3, #0
80056d4: d001 beq.n 80056da <HAL_CRC_Init+0x6a>
{
return HAL_ERROR;
80056d6: 2301 movs r3, #1
80056d8: e028 b.n 800572c <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)
80056da: 687b ldr r3, [r7, #4]
80056dc: 795b ldrb r3, [r3, #5]
80056de: 2b00 cmp r3, #0
80056e0: d105 bne.n 80056ee <HAL_CRC_Init+0x7e>
{
WRITE_REG(hcrc->Instance->INIT, DEFAULT_CRC_INITVALUE);
80056e2: 687b ldr r3, [r7, #4]
80056e4: 681b ldr r3, [r3, #0]
80056e6: f04f 32ff mov.w r2, #4294967295
80056ea: 611a str r2, [r3, #16]
80056ec: e004 b.n 80056f8 <HAL_CRC_Init+0x88>
}
else
{
WRITE_REG(hcrc->Instance->INIT, hcrc->Init.InitValue);
80056ee: 687b ldr r3, [r7, #4]
80056f0: 681b ldr r3, [r3, #0]
80056f2: 687a ldr r2, [r7, #4]
80056f4: 6912 ldr r2, [r2, #16]
80056f6: 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);
80056f8: 687b ldr r3, [r7, #4]
80056fa: 681b ldr r3, [r3, #0]
80056fc: 689b ldr r3, [r3, #8]
80056fe: f023 0160 bic.w r1, r3, #96 ; 0x60
8005702: 687b ldr r3, [r7, #4]
8005704: 695a ldr r2, [r3, #20]
8005706: 687b ldr r3, [r7, #4]
8005708: 681b ldr r3, [r3, #0]
800570a: 430a orrs r2, r1
800570c: 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);
800570e: 687b ldr r3, [r7, #4]
8005710: 681b ldr r3, [r3, #0]
8005712: 689b ldr r3, [r3, #8]
8005714: f023 0180 bic.w r1, r3, #128 ; 0x80
8005718: 687b ldr r3, [r7, #4]
800571a: 699a ldr r2, [r3, #24]
800571c: 687b ldr r3, [r7, #4]
800571e: 681b ldr r3, [r3, #0]
8005720: 430a orrs r2, r1
8005722: 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;
8005724: 687b ldr r3, [r7, #4]
8005726: 2201 movs r2, #1
8005728: 775a strb r2, [r3, #29]
/* Return function status */
return HAL_OK;
800572a: 2300 movs r3, #0
}
800572c: 4618 mov r0, r3
800572e: 3708 adds r7, #8
8005730: 46bd mov sp, r7
8005732: bd80 pop {r7, pc}
8005734: 04c11db7 .word 0x04c11db7
08005738 <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)
{
8005738: b480 push {r7}
800573a: b087 sub sp, #28
800573c: af00 add r7, sp, #0
800573e: 60f8 str r0, [r7, #12]
8005740: 60b9 str r1, [r7, #8]
8005742: 607a str r2, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8005744: 2300 movs r3, #0
8005746: 75fb strb r3, [r7, #23]
uint32_t msb = 31U; /* polynomial degree is 32 at most, so msb is initialized to max value */
8005748: 231f movs r3, #31
800574a: 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))
800574c: bf00 nop
800574e: 693b ldr r3, [r7, #16]
8005750: 1e5a subs r2, r3, #1
8005752: 613a str r2, [r7, #16]
8005754: 2b00 cmp r3, #0
8005756: d009 beq.n 800576c <HAL_CRCEx_Polynomial_Set+0x34>
8005758: 693b ldr r3, [r7, #16]
800575a: f003 031f and.w r3, r3, #31
800575e: 68ba ldr r2, [r7, #8]
8005760: fa22 f303 lsr.w r3, r2, r3
8005764: f003 0301 and.w r3, r3, #1
8005768: 2b00 cmp r3, #0
800576a: d0f0 beq.n 800574e <HAL_CRCEx_Polynomial_Set+0x16>
{
}
switch (PolyLength)
800576c: 687b ldr r3, [r7, #4]
800576e: 2b18 cmp r3, #24
8005770: d846 bhi.n 8005800 <HAL_CRCEx_Polynomial_Set+0xc8>
8005772: a201 add r2, pc, #4 ; (adr r2, 8005778 <HAL_CRCEx_Polynomial_Set+0x40>)
8005774: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8005778: 08005807 .word 0x08005807
800577c: 08005801 .word 0x08005801
8005780: 08005801 .word 0x08005801
8005784: 08005801 .word 0x08005801
8005788: 08005801 .word 0x08005801
800578c: 08005801 .word 0x08005801
8005790: 08005801 .word 0x08005801
8005794: 08005801 .word 0x08005801
8005798: 080057f5 .word 0x080057f5
800579c: 08005801 .word 0x08005801
80057a0: 08005801 .word 0x08005801
80057a4: 08005801 .word 0x08005801
80057a8: 08005801 .word 0x08005801
80057ac: 08005801 .word 0x08005801
80057b0: 08005801 .word 0x08005801
80057b4: 08005801 .word 0x08005801
80057b8: 080057e9 .word 0x080057e9
80057bc: 08005801 .word 0x08005801
80057c0: 08005801 .word 0x08005801
80057c4: 08005801 .word 0x08005801
80057c8: 08005801 .word 0x08005801
80057cc: 08005801 .word 0x08005801
80057d0: 08005801 .word 0x08005801
80057d4: 08005801 .word 0x08005801
80057d8: 080057dd .word 0x080057dd
{
case CRC_POLYLENGTH_7B:
if (msb >= HAL_CRC_LENGTH_7B)
80057dc: 693b ldr r3, [r7, #16]
80057de: 2b06 cmp r3, #6
80057e0: d913 bls.n 800580a <HAL_CRCEx_Polynomial_Set+0xd2>
{
status = HAL_ERROR;
80057e2: 2301 movs r3, #1
80057e4: 75fb strb r3, [r7, #23]
}
break;
80057e6: e010 b.n 800580a <HAL_CRCEx_Polynomial_Set+0xd2>
case CRC_POLYLENGTH_8B:
if (msb >= HAL_CRC_LENGTH_8B)
80057e8: 693b ldr r3, [r7, #16]
80057ea: 2b07 cmp r3, #7
80057ec: d90f bls.n 800580e <HAL_CRCEx_Polynomial_Set+0xd6>
{
status = HAL_ERROR;
80057ee: 2301 movs r3, #1
80057f0: 75fb strb r3, [r7, #23]
}
break;
80057f2: e00c b.n 800580e <HAL_CRCEx_Polynomial_Set+0xd6>
case CRC_POLYLENGTH_16B:
if (msb >= HAL_CRC_LENGTH_16B)
80057f4: 693b ldr r3, [r7, #16]
80057f6: 2b0f cmp r3, #15
80057f8: d90b bls.n 8005812 <HAL_CRCEx_Polynomial_Set+0xda>
{
status = HAL_ERROR;
80057fa: 2301 movs r3, #1
80057fc: 75fb strb r3, [r7, #23]
}
break;
80057fe: e008 b.n 8005812 <HAL_CRCEx_Polynomial_Set+0xda>
case CRC_POLYLENGTH_32B:
/* no polynomial definition vs. polynomial length issue possible */
break;
default:
status = HAL_ERROR;
8005800: 2301 movs r3, #1
8005802: 75fb strb r3, [r7, #23]
break;
8005804: e006 b.n 8005814 <HAL_CRCEx_Polynomial_Set+0xdc>
break;
8005806: bf00 nop
8005808: e004 b.n 8005814 <HAL_CRCEx_Polynomial_Set+0xdc>
break;
800580a: bf00 nop
800580c: e002 b.n 8005814 <HAL_CRCEx_Polynomial_Set+0xdc>
break;
800580e: bf00 nop
8005810: e000 b.n 8005814 <HAL_CRCEx_Polynomial_Set+0xdc>
break;
8005812: bf00 nop
}
if (status == HAL_OK)
8005814: 7dfb ldrb r3, [r7, #23]
8005816: 2b00 cmp r3, #0
8005818: d10d bne.n 8005836 <HAL_CRCEx_Polynomial_Set+0xfe>
{
/* set generating polynomial */
WRITE_REG(hcrc->Instance->POL, Pol);
800581a: 68fb ldr r3, [r7, #12]
800581c: 681b ldr r3, [r3, #0]
800581e: 68ba ldr r2, [r7, #8]
8005820: 615a str r2, [r3, #20]
/* set generating polynomial size */
MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, PolyLength);
8005822: 68fb ldr r3, [r7, #12]
8005824: 681b ldr r3, [r3, #0]
8005826: 689b ldr r3, [r3, #8]
8005828: f023 0118 bic.w r1, r3, #24
800582c: 68fb ldr r3, [r7, #12]
800582e: 681b ldr r3, [r3, #0]
8005830: 687a ldr r2, [r7, #4]
8005832: 430a orrs r2, r1
8005834: 609a str r2, [r3, #8]
}
/* Return function status */
return status;
8005836: 7dfb ldrb r3, [r7, #23]
}
8005838: 4618 mov r0, r3
800583a: 371c adds r7, #28
800583c: 46bd mov sp, r7
800583e: f85d 7b04 ldr.w r7, [sp], #4
8005842: 4770 bx lr
08005844 <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)
{
8005844: b580 push {r7, lr}
8005846: b082 sub sp, #8
8005848: af00 add r7, sp, #0
800584a: 6078 str r0, [r7, #4]
/* Check DAC handle */
if(hdac == NULL)
800584c: 687b ldr r3, [r7, #4]
800584e: 2b00 cmp r3, #0
8005850: d101 bne.n 8005856 <HAL_DAC_Init+0x12>
{
return HAL_ERROR;
8005852: 2301 movs r3, #1
8005854: e014 b.n 8005880 <HAL_DAC_Init+0x3c>
}
/* Check the parameters */
assert_param(IS_DAC_ALL_INSTANCE(hdac->Instance));
if(hdac->State == HAL_DAC_STATE_RESET)
8005856: 687b ldr r3, [r7, #4]
8005858: 791b ldrb r3, [r3, #4]
800585a: b2db uxtb r3, r3
800585c: 2b00 cmp r3, #0
800585e: d105 bne.n 800586c <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;
8005860: 687b ldr r3, [r7, #4]
8005862: 2200 movs r2, #0
8005864: 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);
8005866: 6878 ldr r0, [r7, #4]
8005868: f7fe fbc6 bl 8003ff8 <HAL_DAC_MspInit>
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
}
/* Initialize the DAC state*/
hdac->State = HAL_DAC_STATE_BUSY;
800586c: 687b ldr r3, [r7, #4]
800586e: 2202 movs r2, #2
8005870: 711a strb r2, [r3, #4]
/* Set DAC error code to none */
hdac->ErrorCode = HAL_DAC_ERROR_NONE;
8005872: 687b ldr r3, [r7, #4]
8005874: 2200 movs r2, #0
8005876: 611a str r2, [r3, #16]
/* Initialize the DAC state*/
hdac->State = HAL_DAC_STATE_READY;
8005878: 687b ldr r3, [r7, #4]
800587a: 2201 movs r2, #1
800587c: 711a strb r2, [r3, #4]
/* Return function status */
return HAL_OK;
800587e: 2300 movs r3, #0
}
8005880: 4618 mov r0, r3
8005882: 3708 adds r7, #8
8005884: 46bd mov sp, r7
8005886: bd80 pop {r7, pc}
08005888 <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)
{
8005888: b580 push {r7, lr}
800588a: b082 sub sp, #8
800588c: af00 add r7, sp, #0
800588e: 6078 str r0, [r7, #4]
/* Check underrun channel 1 flag */
if(__HAL_DAC_GET_FLAG(hdac, DAC_FLAG_DMAUDR1))
8005890: 687b ldr r3, [r7, #4]
8005892: 681b ldr r3, [r3, #0]
8005894: 6b5b ldr r3, [r3, #52] ; 0x34
8005896: f403 5300 and.w r3, r3, #8192 ; 0x2000
800589a: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
800589e: d118 bne.n 80058d2 <HAL_DAC_IRQHandler+0x4a>
{
/* Change DAC state to error state */
hdac->State = HAL_DAC_STATE_ERROR;
80058a0: 687b ldr r3, [r7, #4]
80058a2: 2204 movs r2, #4
80058a4: 711a strb r2, [r3, #4]
/* Set DAC error code to channel1 DMA underrun error */
hdac->ErrorCode |= HAL_DAC_ERROR_DMAUNDERRUNCH1;
80058a6: 687b ldr r3, [r7, #4]
80058a8: 691b ldr r3, [r3, #16]
80058aa: f043 0201 orr.w r2, r3, #1
80058ae: 687b ldr r3, [r7, #4]
80058b0: 611a str r2, [r3, #16]
/* Clear the underrun flag */
__HAL_DAC_CLEAR_FLAG(hdac,DAC_FLAG_DMAUDR1);
80058b2: 687b ldr r3, [r7, #4]
80058b4: 681b ldr r3, [r3, #0]
80058b6: f44f 5200 mov.w r2, #8192 ; 0x2000
80058ba: 635a str r2, [r3, #52] ; 0x34
/* Disable the selected DAC channel1 DMA request */
hdac->Instance->CR &= ~DAC_CR_DMAEN1;
80058bc: 687b ldr r3, [r7, #4]
80058be: 681b ldr r3, [r3, #0]
80058c0: 681a ldr r2, [r3, #0]
80058c2: 687b ldr r3, [r7, #4]
80058c4: 681b ldr r3, [r3, #0]
80058c6: f422 5280 bic.w r2, r2, #4096 ; 0x1000
80058ca: 601a str r2, [r3, #0]
/* Error callback */
#if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
hdac->DMAUnderrunCallbackCh1(hdac);
#else
HAL_DAC_DMAUnderrunCallbackCh1(hdac);
80058cc: 6878 ldr r0, [r7, #4]
80058ce: f000 f825 bl 800591c <HAL_DAC_DMAUnderrunCallbackCh1>
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
}
/* Check underrun channel 2 flag */
if(__HAL_DAC_GET_FLAG(hdac, DAC_FLAG_DMAUDR2))
80058d2: 687b ldr r3, [r7, #4]
80058d4: 681b ldr r3, [r3, #0]
80058d6: 6b5b ldr r3, [r3, #52] ; 0x34
80058d8: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
80058dc: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
80058e0: d118 bne.n 8005914 <HAL_DAC_IRQHandler+0x8c>
{
/* Change DAC state to error state */
hdac->State = HAL_DAC_STATE_ERROR;
80058e2: 687b ldr r3, [r7, #4]
80058e4: 2204 movs r2, #4
80058e6: 711a strb r2, [r3, #4]
/* Set DAC error code to channel2 DMA underrun error */
hdac->ErrorCode |= HAL_DAC_ERROR_DMAUNDERRUNCH2;
80058e8: 687b ldr r3, [r7, #4]
80058ea: 691b ldr r3, [r3, #16]
80058ec: f043 0202 orr.w r2, r3, #2
80058f0: 687b ldr r3, [r7, #4]
80058f2: 611a str r2, [r3, #16]
/* Clear the underrun flag */
__HAL_DAC_CLEAR_FLAG(hdac,DAC_FLAG_DMAUDR2);
80058f4: 687b ldr r3, [r7, #4]
80058f6: 681b ldr r3, [r3, #0]
80058f8: f04f 5200 mov.w r2, #536870912 ; 0x20000000
80058fc: 635a str r2, [r3, #52] ; 0x34
/* Disable the selected DAC channel1 DMA request */
hdac->Instance->CR &= ~DAC_CR_DMAEN2;
80058fe: 687b ldr r3, [r7, #4]
8005900: 681b ldr r3, [r3, #0]
8005902: 681a ldr r2, [r3, #0]
8005904: 687b ldr r3, [r7, #4]
8005906: 681b ldr r3, [r3, #0]
8005908: f022 5280 bic.w r2, r2, #268435456 ; 0x10000000
800590c: 601a str r2, [r3, #0]
/* Error callback */
#if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
hdac->DMAUnderrunCallbackCh2(hdac);
#else
HAL_DACEx_DMAUnderrunCallbackCh2(hdac);
800590e: 6878 ldr r0, [r7, #4]
8005910: f000 f85b bl 80059ca <HAL_DACEx_DMAUnderrunCallbackCh2>
#endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
}
}
8005914: bf00 nop
8005916: 3708 adds r7, #8
8005918: 46bd mov sp, r7
800591a: bd80 pop {r7, pc}
0800591c <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)
{
800591c: b480 push {r7}
800591e: b083 sub sp, #12
8005920: af00 add r7, sp, #0
8005922: 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
*/
}
8005924: bf00 nop
8005926: 370c adds r7, #12
8005928: 46bd mov sp, r7
800592a: f85d 7b04 ldr.w r7, [sp], #4
800592e: 4770 bx lr
08005930 <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)
{
8005930: b480 push {r7}
8005932: b087 sub sp, #28
8005934: af00 add r7, sp, #0
8005936: 60f8 str r0, [r7, #12]
8005938: 60b9 str r1, [r7, #8]
800593a: 607a str r2, [r7, #4]
uint32_t tmpreg1 = 0, tmpreg2 = 0;
800593c: 2300 movs r3, #0
800593e: 617b str r3, [r7, #20]
8005940: 2300 movs r3, #0
8005942: 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);
8005944: 68fb ldr r3, [r7, #12]
8005946: 795b ldrb r3, [r3, #5]
8005948: 2b01 cmp r3, #1
800594a: d101 bne.n 8005950 <HAL_DAC_ConfigChannel+0x20>
800594c: 2302 movs r3, #2
800594e: e036 b.n 80059be <HAL_DAC_ConfigChannel+0x8e>
8005950: 68fb ldr r3, [r7, #12]
8005952: 2201 movs r2, #1
8005954: 715a strb r2, [r3, #5]
/* Change DAC state */
hdac->State = HAL_DAC_STATE_BUSY;
8005956: 68fb ldr r3, [r7, #12]
8005958: 2202 movs r2, #2
800595a: 711a strb r2, [r3, #4]
/* Get the DAC CR value */
tmpreg1 = hdac->Instance->CR;
800595c: 68fb ldr r3, [r7, #12]
800595e: 681b ldr r3, [r3, #0]
8005960: 681b ldr r3, [r3, #0]
8005962: 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);
8005964: f640 72fe movw r2, #4094 ; 0xffe
8005968: 687b ldr r3, [r7, #4]
800596a: fa02 f303 lsl.w r3, r2, r3
800596e: 43db mvns r3, r3
8005970: 697a ldr r2, [r7, #20]
8005972: 4013 ands r3, r2
8005974: 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);
8005976: 68bb ldr r3, [r7, #8]
8005978: 681a ldr r2, [r3, #0]
800597a: 68bb ldr r3, [r7, #8]
800597c: 685b ldr r3, [r3, #4]
800597e: 4313 orrs r3, r2
8005980: 613b str r3, [r7, #16]
/* Calculate CR register value depending on DAC_Channel */
tmpreg1 |= tmpreg2 << Channel;
8005982: 693a ldr r2, [r7, #16]
8005984: 687b ldr r3, [r7, #4]
8005986: fa02 f303 lsl.w r3, r2, r3
800598a: 697a ldr r2, [r7, #20]
800598c: 4313 orrs r3, r2
800598e: 617b str r3, [r7, #20]
/* Write to DAC CR */
hdac->Instance->CR = tmpreg1;
8005990: 68fb ldr r3, [r7, #12]
8005992: 681b ldr r3, [r3, #0]
8005994: 697a ldr r2, [r7, #20]
8005996: 601a str r2, [r3, #0]
/* Disable wave generation */
hdac->Instance->CR &= ~(DAC_CR_WAVE1 << Channel);
8005998: 68fb ldr r3, [r7, #12]
800599a: 681b ldr r3, [r3, #0]
800599c: 6819 ldr r1, [r3, #0]
800599e: 22c0 movs r2, #192 ; 0xc0
80059a0: 687b ldr r3, [r7, #4]
80059a2: fa02 f303 lsl.w r3, r2, r3
80059a6: 43da mvns r2, r3
80059a8: 68fb ldr r3, [r7, #12]
80059aa: 681b ldr r3, [r3, #0]
80059ac: 400a ands r2, r1
80059ae: 601a str r2, [r3, #0]
/* Change DAC state */
hdac->State = HAL_DAC_STATE_READY;
80059b0: 68fb ldr r3, [r7, #12]
80059b2: 2201 movs r2, #1
80059b4: 711a strb r2, [r3, #4]
/* Process unlocked */
__HAL_UNLOCK(hdac);
80059b6: 68fb ldr r3, [r7, #12]
80059b8: 2200 movs r2, #0
80059ba: 715a strb r2, [r3, #5]
/* Return function status */
return HAL_OK;
80059bc: 2300 movs r3, #0
}
80059be: 4618 mov r0, r3
80059c0: 371c adds r7, #28
80059c2: 46bd mov sp, r7
80059c4: f85d 7b04 ldr.w r7, [sp], #4
80059c8: 4770 bx lr
080059ca <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)
{
80059ca: b480 push {r7}
80059cc: b083 sub sp, #12
80059ce: af00 add r7, sp, #0
80059d0: 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
*/
}
80059d2: bf00 nop
80059d4: 370c adds r7, #12
80059d6: 46bd mov sp, r7
80059d8: f85d 7b04 ldr.w r7, [sp], #4
80059dc: 4770 bx lr
...
080059e0 <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)
{
80059e0: b580 push {r7, lr}
80059e2: b086 sub sp, #24
80059e4: af00 add r7, sp, #0
80059e6: 6078 str r0, [r7, #4]
uint32_t tmp = 0U;
80059e8: 2300 movs r3, #0
80059ea: 617b str r3, [r7, #20]
uint32_t tickstart = HAL_GetTick();
80059ec: f7ff f956 bl 8004c9c <HAL_GetTick>
80059f0: 6138 str r0, [r7, #16]
DMA_Base_Registers *regs;
/* Check the DMA peripheral state */
if(hdma == NULL)
80059f2: 687b ldr r3, [r7, #4]
80059f4: 2b00 cmp r3, #0
80059f6: d101 bne.n 80059fc <HAL_DMA_Init+0x1c>
{
return HAL_ERROR;
80059f8: 2301 movs r3, #1
80059fa: e099 b.n 8005b30 <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);
80059fc: 687b ldr r3, [r7, #4]
80059fe: 2200 movs r2, #0
8005a00: f883 2034 strb.w r2, [r3, #52] ; 0x34
/* Change DMA peripheral state */
hdma->State = HAL_DMA_STATE_BUSY;
8005a04: 687b ldr r3, [r7, #4]
8005a06: 2202 movs r2, #2
8005a08: f883 2035 strb.w r2, [r3, #53] ; 0x35
/* Disable the peripheral */
__HAL_DMA_DISABLE(hdma);
8005a0c: 687b ldr r3, [r7, #4]
8005a0e: 681b ldr r3, [r3, #0]
8005a10: 681a ldr r2, [r3, #0]
8005a12: 687b ldr r3, [r7, #4]
8005a14: 681b ldr r3, [r3, #0]
8005a16: f022 0201 bic.w r2, r2, #1
8005a1a: 601a str r2, [r3, #0]
/* Check if the DMA Stream is effectively disabled */
while((hdma->Instance->CR & DMA_SxCR_EN) != RESET)
8005a1c: e00f b.n 8005a3e <HAL_DMA_Init+0x5e>
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DMA_ABORT)
8005a1e: f7ff f93d bl 8004c9c <HAL_GetTick>
8005a22: 4602 mov r2, r0
8005a24: 693b ldr r3, [r7, #16]
8005a26: 1ad3 subs r3, r2, r3
8005a28: 2b05 cmp r3, #5
8005a2a: d908 bls.n 8005a3e <HAL_DMA_Init+0x5e>
{
/* Update error code */
hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT;
8005a2c: 687b ldr r3, [r7, #4]
8005a2e: 2220 movs r2, #32
8005a30: 655a str r2, [r3, #84] ; 0x54
/* Change the DMA state */
hdma->State = HAL_DMA_STATE_TIMEOUT;
8005a32: 687b ldr r3, [r7, #4]
8005a34: 2203 movs r2, #3
8005a36: f883 2035 strb.w r2, [r3, #53] ; 0x35
return HAL_TIMEOUT;
8005a3a: 2303 movs r3, #3
8005a3c: e078 b.n 8005b30 <HAL_DMA_Init+0x150>
while((hdma->Instance->CR & DMA_SxCR_EN) != RESET)
8005a3e: 687b ldr r3, [r7, #4]
8005a40: 681b ldr r3, [r3, #0]
8005a42: 681b ldr r3, [r3, #0]
8005a44: f003 0301 and.w r3, r3, #1
8005a48: 2b00 cmp r3, #0
8005a4a: d1e8 bne.n 8005a1e <HAL_DMA_Init+0x3e>
}
}
/* Get the CR register value */
tmp = hdma->Instance->CR;
8005a4c: 687b ldr r3, [r7, #4]
8005a4e: 681b ldr r3, [r3, #0]
8005a50: 681b ldr r3, [r3, #0]
8005a52: 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 | \
8005a54: 697a ldr r2, [r7, #20]
8005a56: 4b38 ldr r3, [pc, #224] ; (8005b38 <HAL_DMA_Init+0x158>)
8005a58: 4013 ands r3, r2
8005a5a: 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 |
8005a5c: 687b ldr r3, [r7, #4]
8005a5e: 685a ldr r2, [r3, #4]
8005a60: 687b ldr r3, [r7, #4]
8005a62: 689b ldr r3, [r3, #8]
8005a64: 431a orrs r2, r3
hdma->Init.PeriphInc | hdma->Init.MemInc |
8005a66: 687b ldr r3, [r7, #4]
8005a68: 68db ldr r3, [r3, #12]
tmp |= hdma->Init.Channel | hdma->Init.Direction |
8005a6a: 431a orrs r2, r3
hdma->Init.PeriphInc | hdma->Init.MemInc |
8005a6c: 687b ldr r3, [r7, #4]
8005a6e: 691b ldr r3, [r3, #16]
8005a70: 431a orrs r2, r3
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
8005a72: 687b ldr r3, [r7, #4]
8005a74: 695b ldr r3, [r3, #20]
hdma->Init.PeriphInc | hdma->Init.MemInc |
8005a76: 431a orrs r2, r3
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
8005a78: 687b ldr r3, [r7, #4]
8005a7a: 699b ldr r3, [r3, #24]
8005a7c: 431a orrs r2, r3
hdma->Init.Mode | hdma->Init.Priority;
8005a7e: 687b ldr r3, [r7, #4]
8005a80: 69db ldr r3, [r3, #28]
hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment |
8005a82: 431a orrs r2, r3
hdma->Init.Mode | hdma->Init.Priority;
8005a84: 687b ldr r3, [r7, #4]
8005a86: 6a1b ldr r3, [r3, #32]
8005a88: 4313 orrs r3, r2
tmp |= hdma->Init.Channel | hdma->Init.Direction |
8005a8a: 697a ldr r2, [r7, #20]
8005a8c: 4313 orrs r3, r2
8005a8e: 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)
8005a90: 687b ldr r3, [r7, #4]
8005a92: 6a5b ldr r3, [r3, #36] ; 0x24
8005a94: 2b04 cmp r3, #4
8005a96: d107 bne.n 8005aa8 <HAL_DMA_Init+0xc8>
{
/* Get memory burst and peripheral burst */
tmp |= hdma->Init.MemBurst | hdma->Init.PeriphBurst;
8005a98: 687b ldr r3, [r7, #4]
8005a9a: 6ada ldr r2, [r3, #44] ; 0x2c
8005a9c: 687b ldr r3, [r7, #4]
8005a9e: 6b1b ldr r3, [r3, #48] ; 0x30
8005aa0: 4313 orrs r3, r2
8005aa2: 697a ldr r2, [r7, #20]
8005aa4: 4313 orrs r3, r2
8005aa6: 617b str r3, [r7, #20]
}
/* Write to DMA Stream CR register */
hdma->Instance->CR = tmp;
8005aa8: 687b ldr r3, [r7, #4]
8005aaa: 681b ldr r3, [r3, #0]
8005aac: 697a ldr r2, [r7, #20]
8005aae: 601a str r2, [r3, #0]
/* Get the FCR register value */
tmp = hdma->Instance->FCR;
8005ab0: 687b ldr r3, [r7, #4]
8005ab2: 681b ldr r3, [r3, #0]
8005ab4: 695b ldr r3, [r3, #20]
8005ab6: 617b str r3, [r7, #20]
/* Clear Direct mode and FIFO threshold bits */
tmp &= (uint32_t)~(DMA_SxFCR_DMDIS | DMA_SxFCR_FTH);
8005ab8: 697b ldr r3, [r7, #20]
8005aba: f023 0307 bic.w r3, r3, #7
8005abe: 617b str r3, [r7, #20]
/* Prepare the DMA Stream FIFO configuration */
tmp |= hdma->Init.FIFOMode;
8005ac0: 687b ldr r3, [r7, #4]
8005ac2: 6a5b ldr r3, [r3, #36] ; 0x24
8005ac4: 697a ldr r2, [r7, #20]
8005ac6: 4313 orrs r3, r2
8005ac8: 617b str r3, [r7, #20]
/* The FIFO threshold is not used when the FIFO mode is disabled */
if(hdma->Init.FIFOMode == DMA_FIFOMODE_ENABLE)
8005aca: 687b ldr r3, [r7, #4]
8005acc: 6a5b ldr r3, [r3, #36] ; 0x24
8005ace: 2b04 cmp r3, #4
8005ad0: d117 bne.n 8005b02 <HAL_DMA_Init+0x122>
{
/* Get the FIFO threshold */
tmp |= hdma->Init.FIFOThreshold;
8005ad2: 687b ldr r3, [r7, #4]
8005ad4: 6a9b ldr r3, [r3, #40] ; 0x28
8005ad6: 697a ldr r2, [r7, #20]
8005ad8: 4313 orrs r3, r2
8005ada: 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)
8005adc: 687b ldr r3, [r7, #4]
8005ade: 6adb ldr r3, [r3, #44] ; 0x2c
8005ae0: 2b00 cmp r3, #0
8005ae2: d00e beq.n 8005b02 <HAL_DMA_Init+0x122>
{
if (DMA_CheckFifoParam(hdma) != HAL_OK)
8005ae4: 6878 ldr r0, [r7, #4]
8005ae6: f000 f8bd bl 8005c64 <DMA_CheckFifoParam>
8005aea: 4603 mov r3, r0
8005aec: 2b00 cmp r3, #0
8005aee: d008 beq.n 8005b02 <HAL_DMA_Init+0x122>
{
/* Update error code */
hdma->ErrorCode = HAL_DMA_ERROR_PARAM;
8005af0: 687b ldr r3, [r7, #4]
8005af2: 2240 movs r2, #64 ; 0x40
8005af4: 655a str r2, [r3, #84] ; 0x54
/* Change the DMA state */
hdma->State = HAL_DMA_STATE_READY;
8005af6: 687b ldr r3, [r7, #4]
8005af8: 2201 movs r2, #1
8005afa: f883 2035 strb.w r2, [r3, #53] ; 0x35
return HAL_ERROR;
8005afe: 2301 movs r3, #1
8005b00: e016 b.n 8005b30 <HAL_DMA_Init+0x150>
}
}
}
/* Write to DMA Stream FCR */
hdma->Instance->FCR = tmp;
8005b02: 687b ldr r3, [r7, #4]
8005b04: 681b ldr r3, [r3, #0]
8005b06: 697a ldr r2, [r7, #20]
8005b08: 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);
8005b0a: 6878 ldr r0, [r7, #4]
8005b0c: f000 f874 bl 8005bf8 <DMA_CalcBaseAndBitshift>
8005b10: 4603 mov r3, r0
8005b12: 60fb str r3, [r7, #12]
/* Clear all interrupt flags */
regs->IFCR = 0x3FU << hdma->StreamIndex;
8005b14: 687b ldr r3, [r7, #4]
8005b16: 6ddb ldr r3, [r3, #92] ; 0x5c
8005b18: 223f movs r2, #63 ; 0x3f
8005b1a: 409a lsls r2, r3
8005b1c: 68fb ldr r3, [r7, #12]
8005b1e: 609a str r2, [r3, #8]
/* Initialize the error code */
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
8005b20: 687b ldr r3, [r7, #4]
8005b22: 2200 movs r2, #0
8005b24: 655a str r2, [r3, #84] ; 0x54
/* Initialize the DMA state */
hdma->State = HAL_DMA_STATE_READY;
8005b26: 687b ldr r3, [r7, #4]
8005b28: 2201 movs r2, #1
8005b2a: f883 2035 strb.w r2, [r3, #53] ; 0x35
return HAL_OK;
8005b2e: 2300 movs r3, #0
}
8005b30: 4618 mov r0, r3
8005b32: 3718 adds r7, #24
8005b34: 46bd mov sp, r7
8005b36: bd80 pop {r7, pc}
8005b38: f010803f .word 0xf010803f
08005b3c <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)
{
8005b3c: b580 push {r7, lr}
8005b3e: b084 sub sp, #16
8005b40: af00 add r7, sp, #0
8005b42: 6078 str r0, [r7, #4]
DMA_Base_Registers *regs;
/* Check the DMA peripheral state */
if(hdma == NULL)
8005b44: 687b ldr r3, [r7, #4]
8005b46: 2b00 cmp r3, #0
8005b48: d101 bne.n 8005b4e <HAL_DMA_DeInit+0x12>
{
return HAL_ERROR;
8005b4a: 2301 movs r3, #1
8005b4c: e050 b.n 8005bf0 <HAL_DMA_DeInit+0xb4>
}
/* Check the DMA peripheral state */
if(hdma->State == HAL_DMA_STATE_BUSY)
8005b4e: 687b ldr r3, [r7, #4]
8005b50: f893 3035 ldrb.w r3, [r3, #53] ; 0x35
8005b54: b2db uxtb r3, r3
8005b56: 2b02 cmp r3, #2
8005b58: d101 bne.n 8005b5e <HAL_DMA_DeInit+0x22>
{
/* Return error status */
return HAL_BUSY;
8005b5a: 2302 movs r3, #2
8005b5c: e048 b.n 8005bf0 <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);
8005b5e: 687b ldr r3, [r7, #4]
8005b60: 681b ldr r3, [r3, #0]
8005b62: 681a ldr r2, [r3, #0]
8005b64: 687b ldr r3, [r7, #4]
8005b66: 681b ldr r3, [r3, #0]
8005b68: f022 0201 bic.w r2, r2, #1
8005b6c: 601a str r2, [r3, #0]
/* Reset DMA Streamx control register */
hdma->Instance->CR = 0U;
8005b6e: 687b ldr r3, [r7, #4]
8005b70: 681b ldr r3, [r3, #0]
8005b72: 2200 movs r2, #0
8005b74: 601a str r2, [r3, #0]
/* Reset DMA Streamx number of data to transfer register */
hdma->Instance->NDTR = 0U;
8005b76: 687b ldr r3, [r7, #4]
8005b78: 681b ldr r3, [r3, #0]
8005b7a: 2200 movs r2, #0
8005b7c: 605a str r2, [r3, #4]
/* Reset DMA Streamx peripheral address register */
hdma->Instance->PAR = 0U;
8005b7e: 687b ldr r3, [r7, #4]
8005b80: 681b ldr r3, [r3, #0]
8005b82: 2200 movs r2, #0
8005b84: 609a str r2, [r3, #8]
/* Reset DMA Streamx memory 0 address register */
hdma->Instance->M0AR = 0U;
8005b86: 687b ldr r3, [r7, #4]
8005b88: 681b ldr r3, [r3, #0]
8005b8a: 2200 movs r2, #0
8005b8c: 60da str r2, [r3, #12]
/* Reset DMA Streamx memory 1 address register */
hdma->Instance->M1AR = 0U;
8005b8e: 687b ldr r3, [r7, #4]
8005b90: 681b ldr r3, [r3, #0]
8005b92: 2200 movs r2, #0
8005b94: 611a str r2, [r3, #16]
/* Reset DMA Streamx FIFO control register */
hdma->Instance->FCR = (uint32_t)0x00000021U;
8005b96: 687b ldr r3, [r7, #4]
8005b98: 681b ldr r3, [r3, #0]
8005b9a: 2221 movs r2, #33 ; 0x21
8005b9c: 615a str r2, [r3, #20]
/* Get DMA steam Base Address */
regs = (DMA_Base_Registers *)DMA_CalcBaseAndBitshift(hdma);
8005b9e: 6878 ldr r0, [r7, #4]
8005ba0: f000 f82a bl 8005bf8 <DMA_CalcBaseAndBitshift>
8005ba4: 4603 mov r3, r0
8005ba6: 60fb str r3, [r7, #12]
/* Clear all interrupt flags at correct offset within the register */
regs->IFCR = 0x3FU << hdma->StreamIndex;
8005ba8: 687b ldr r3, [r7, #4]
8005baa: 6ddb ldr r3, [r3, #92] ; 0x5c
8005bac: 223f movs r2, #63 ; 0x3f
8005bae: 409a lsls r2, r3
8005bb0: 68fb ldr r3, [r7, #12]
8005bb2: 609a str r2, [r3, #8]
/* Clean all callbacks */
hdma->XferCpltCallback = NULL;
8005bb4: 687b ldr r3, [r7, #4]
8005bb6: 2200 movs r2, #0
8005bb8: 63da str r2, [r3, #60] ; 0x3c
hdma->XferHalfCpltCallback = NULL;
8005bba: 687b ldr r3, [r7, #4]
8005bbc: 2200 movs r2, #0
8005bbe: 641a str r2, [r3, #64] ; 0x40
hdma->XferM1CpltCallback = NULL;
8005bc0: 687b ldr r3, [r7, #4]
8005bc2: 2200 movs r2, #0
8005bc4: 645a str r2, [r3, #68] ; 0x44
hdma->XferM1HalfCpltCallback = NULL;
8005bc6: 687b ldr r3, [r7, #4]
8005bc8: 2200 movs r2, #0
8005bca: 649a str r2, [r3, #72] ; 0x48
hdma->XferErrorCallback = NULL;
8005bcc: 687b ldr r3, [r7, #4]
8005bce: 2200 movs r2, #0
8005bd0: 64da str r2, [r3, #76] ; 0x4c
hdma->XferAbortCallback = NULL;
8005bd2: 687b ldr r3, [r7, #4]
8005bd4: 2200 movs r2, #0
8005bd6: 651a str r2, [r3, #80] ; 0x50
/* Reset the error code */
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
8005bd8: 687b ldr r3, [r7, #4]
8005bda: 2200 movs r2, #0
8005bdc: 655a str r2, [r3, #84] ; 0x54
/* Reset the DMA state */
hdma->State = HAL_DMA_STATE_RESET;
8005bde: 687b ldr r3, [r7, #4]
8005be0: 2200 movs r2, #0
8005be2: f883 2035 strb.w r2, [r3, #53] ; 0x35
/* Release Lock */
__HAL_UNLOCK(hdma);
8005be6: 687b ldr r3, [r7, #4]
8005be8: 2200 movs r2, #0
8005bea: f883 2034 strb.w r2, [r3, #52] ; 0x34
return HAL_OK;
8005bee: 2300 movs r3, #0
}
8005bf0: 4618 mov r0, r3
8005bf2: 3710 adds r7, #16
8005bf4: 46bd mov sp, r7
8005bf6: bd80 pop {r7, pc}
08005bf8 <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)
{
8005bf8: b480 push {r7}
8005bfa: b085 sub sp, #20
8005bfc: af00 add r7, sp, #0
8005bfe: 6078 str r0, [r7, #4]
uint32_t stream_number = (((uint32_t)hdma->Instance & 0xFFU) - 16U) / 24U;
8005c00: 687b ldr r3, [r7, #4]
8005c02: 681b ldr r3, [r3, #0]
8005c04: b2db uxtb r3, r3
8005c06: 3b10 subs r3, #16
8005c08: 4a13 ldr r2, [pc, #76] ; (8005c58 <DMA_CalcBaseAndBitshift+0x60>)
8005c0a: fba2 2303 umull r2, r3, r2, r3
8005c0e: 091b lsrs r3, r3, #4
8005c10: 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];
8005c12: 4a12 ldr r2, [pc, #72] ; (8005c5c <DMA_CalcBaseAndBitshift+0x64>)
8005c14: 68fb ldr r3, [r7, #12]
8005c16: 4413 add r3, r2
8005c18: 781b ldrb r3, [r3, #0]
8005c1a: 461a mov r2, r3
8005c1c: 687b ldr r3, [r7, #4]
8005c1e: 65da str r2, [r3, #92] ; 0x5c
if (stream_number > 3U)
8005c20: 68fb ldr r3, [r7, #12]
8005c22: 2b03 cmp r3, #3
8005c24: d908 bls.n 8005c38 <DMA_CalcBaseAndBitshift+0x40>
{
/* return pointer to HISR and HIFCR */
hdma->StreamBaseAddress = (((uint32_t)hdma->Instance & (uint32_t)(~0x3FFU)) + 4U);
8005c26: 687b ldr r3, [r7, #4]
8005c28: 681b ldr r3, [r3, #0]
8005c2a: 461a mov r2, r3
8005c2c: 4b0c ldr r3, [pc, #48] ; (8005c60 <DMA_CalcBaseAndBitshift+0x68>)
8005c2e: 4013 ands r3, r2
8005c30: 1d1a adds r2, r3, #4
8005c32: 687b ldr r3, [r7, #4]
8005c34: 659a str r2, [r3, #88] ; 0x58
8005c36: e006 b.n 8005c46 <DMA_CalcBaseAndBitshift+0x4e>
}
else
{
/* return pointer to LISR and LIFCR */
hdma->StreamBaseAddress = ((uint32_t)hdma->Instance & (uint32_t)(~0x3FFU));
8005c38: 687b ldr r3, [r7, #4]
8005c3a: 681b ldr r3, [r3, #0]
8005c3c: 461a mov r2, r3
8005c3e: 4b08 ldr r3, [pc, #32] ; (8005c60 <DMA_CalcBaseAndBitshift+0x68>)
8005c40: 4013 ands r3, r2
8005c42: 687a ldr r2, [r7, #4]
8005c44: 6593 str r3, [r2, #88] ; 0x58
}
return hdma->StreamBaseAddress;
8005c46: 687b ldr r3, [r7, #4]
8005c48: 6d9b ldr r3, [r3, #88] ; 0x58
}
8005c4a: 4618 mov r0, r3
8005c4c: 3714 adds r7, #20
8005c4e: 46bd mov sp, r7
8005c50: f85d 7b04 ldr.w r7, [sp], #4
8005c54: 4770 bx lr
8005c56: bf00 nop
8005c58: aaaaaaab .word 0xaaaaaaab
8005c5c: 080225c0 .word 0x080225c0
8005c60: fffffc00 .word 0xfffffc00
08005c64 <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)
{
8005c64: b480 push {r7}
8005c66: b085 sub sp, #20
8005c68: af00 add r7, sp, #0
8005c6a: 6078 str r0, [r7, #4]
HAL_StatusTypeDef status = HAL_OK;
8005c6c: 2300 movs r3, #0
8005c6e: 73fb strb r3, [r7, #15]
uint32_t tmp = hdma->Init.FIFOThreshold;
8005c70: 687b ldr r3, [r7, #4]
8005c72: 6a9b ldr r3, [r3, #40] ; 0x28
8005c74: 60bb str r3, [r7, #8]
/* Memory Data size equal to Byte */
if(hdma->Init.MemDataAlignment == DMA_MDATAALIGN_BYTE)
8005c76: 687b ldr r3, [r7, #4]
8005c78: 699b ldr r3, [r3, #24]
8005c7a: 2b00 cmp r3, #0
8005c7c: d11f bne.n 8005cbe <DMA_CheckFifoParam+0x5a>
{
switch (tmp)
8005c7e: 68bb ldr r3, [r7, #8]
8005c80: 2b03 cmp r3, #3
8005c82: d855 bhi.n 8005d30 <DMA_CheckFifoParam+0xcc>
8005c84: a201 add r2, pc, #4 ; (adr r2, 8005c8c <DMA_CheckFifoParam+0x28>)
8005c86: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8005c8a: bf00 nop
8005c8c: 08005c9d .word 0x08005c9d
8005c90: 08005caf .word 0x08005caf
8005c94: 08005c9d .word 0x08005c9d
8005c98: 08005d31 .word 0x08005d31
{
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
8005c9c: 687b ldr r3, [r7, #4]
8005c9e: 6adb ldr r3, [r3, #44] ; 0x2c
8005ca0: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
8005ca4: 2b00 cmp r3, #0
8005ca6: d045 beq.n 8005d34 <DMA_CheckFifoParam+0xd0>
{
status = HAL_ERROR;
8005ca8: 2301 movs r3, #1
8005caa: 73fb strb r3, [r7, #15]
}
break;
8005cac: e042 b.n 8005d34 <DMA_CheckFifoParam+0xd0>
case DMA_FIFO_THRESHOLD_HALFFULL:
if (hdma->Init.MemBurst == DMA_MBURST_INC16)
8005cae: 687b ldr r3, [r7, #4]
8005cb0: 6adb ldr r3, [r3, #44] ; 0x2c
8005cb2: f1b3 7fc0 cmp.w r3, #25165824 ; 0x1800000
8005cb6: d13f bne.n 8005d38 <DMA_CheckFifoParam+0xd4>
{
status = HAL_ERROR;
8005cb8: 2301 movs r3, #1
8005cba: 73fb strb r3, [r7, #15]
}
break;
8005cbc: e03c b.n 8005d38 <DMA_CheckFifoParam+0xd4>
break;
}
}
/* Memory Data size equal to Half-Word */
else if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_HALFWORD)
8005cbe: 687b ldr r3, [r7, #4]
8005cc0: 699b ldr r3, [r3, #24]
8005cc2: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
8005cc6: d121 bne.n 8005d0c <DMA_CheckFifoParam+0xa8>
{
switch (tmp)
8005cc8: 68bb ldr r3, [r7, #8]
8005cca: 2b03 cmp r3, #3
8005ccc: d836 bhi.n 8005d3c <DMA_CheckFifoParam+0xd8>
8005cce: a201 add r2, pc, #4 ; (adr r2, 8005cd4 <DMA_CheckFifoParam+0x70>)
8005cd0: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8005cd4: 08005ce5 .word 0x08005ce5
8005cd8: 08005ceb .word 0x08005ceb
8005cdc: 08005ce5 .word 0x08005ce5
8005ce0: 08005cfd .word 0x08005cfd
{
case DMA_FIFO_THRESHOLD_1QUARTERFULL:
case DMA_FIFO_THRESHOLD_3QUARTERSFULL:
status = HAL_ERROR;
8005ce4: 2301 movs r3, #1
8005ce6: 73fb strb r3, [r7, #15]
break;
8005ce8: e02f b.n 8005d4a <DMA_CheckFifoParam+0xe6>
case DMA_FIFO_THRESHOLD_HALFFULL:
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
8005cea: 687b ldr r3, [r7, #4]
8005cec: 6adb ldr r3, [r3, #44] ; 0x2c
8005cee: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
8005cf2: 2b00 cmp r3, #0
8005cf4: d024 beq.n 8005d40 <DMA_CheckFifoParam+0xdc>
{
status = HAL_ERROR;
8005cf6: 2301 movs r3, #1
8005cf8: 73fb strb r3, [r7, #15]
}
break;
8005cfa: e021 b.n 8005d40 <DMA_CheckFifoParam+0xdc>
case DMA_FIFO_THRESHOLD_FULL:
if (hdma->Init.MemBurst == DMA_MBURST_INC16)
8005cfc: 687b ldr r3, [r7, #4]
8005cfe: 6adb ldr r3, [r3, #44] ; 0x2c
8005d00: f1b3 7fc0 cmp.w r3, #25165824 ; 0x1800000
8005d04: d11e bne.n 8005d44 <DMA_CheckFifoParam+0xe0>
{
status = HAL_ERROR;
8005d06: 2301 movs r3, #1
8005d08: 73fb strb r3, [r7, #15]
}
break;
8005d0a: e01b b.n 8005d44 <DMA_CheckFifoParam+0xe0>
}
/* Memory Data size equal to Word */
else
{
switch (tmp)
8005d0c: 68bb ldr r3, [r7, #8]
8005d0e: 2b02 cmp r3, #2
8005d10: d902 bls.n 8005d18 <DMA_CheckFifoParam+0xb4>
8005d12: 2b03 cmp r3, #3
8005d14: d003 beq.n 8005d1e <DMA_CheckFifoParam+0xba>
{
status = HAL_ERROR;
}
break;
default:
break;
8005d16: e018 b.n 8005d4a <DMA_CheckFifoParam+0xe6>
status = HAL_ERROR;
8005d18: 2301 movs r3, #1
8005d1a: 73fb strb r3, [r7, #15]
break;
8005d1c: e015 b.n 8005d4a <DMA_CheckFifoParam+0xe6>
if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1)
8005d1e: 687b ldr r3, [r7, #4]
8005d20: 6adb ldr r3, [r3, #44] ; 0x2c
8005d22: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
8005d26: 2b00 cmp r3, #0
8005d28: d00e beq.n 8005d48 <DMA_CheckFifoParam+0xe4>
status = HAL_ERROR;
8005d2a: 2301 movs r3, #1
8005d2c: 73fb strb r3, [r7, #15]
break;
8005d2e: e00b b.n 8005d48 <DMA_CheckFifoParam+0xe4>
break;
8005d30: bf00 nop
8005d32: e00a b.n 8005d4a <DMA_CheckFifoParam+0xe6>
break;
8005d34: bf00 nop
8005d36: e008 b.n 8005d4a <DMA_CheckFifoParam+0xe6>
break;
8005d38: bf00 nop
8005d3a: e006 b.n 8005d4a <DMA_CheckFifoParam+0xe6>
break;
8005d3c: bf00 nop
8005d3e: e004 b.n 8005d4a <DMA_CheckFifoParam+0xe6>
break;
8005d40: bf00 nop
8005d42: e002 b.n 8005d4a <DMA_CheckFifoParam+0xe6>
break;
8005d44: bf00 nop
8005d46: e000 b.n 8005d4a <DMA_CheckFifoParam+0xe6>
break;
8005d48: bf00 nop
}
}
return status;
8005d4a: 7bfb ldrb r3, [r7, #15]
}
8005d4c: 4618 mov r0, r3
8005d4e: 3714 adds r7, #20
8005d50: 46bd mov sp, r7
8005d52: f85d 7b04 ldr.w r7, [sp], #4
8005d56: 4770 bx lr
08005d58 <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)
{
8005d58: b580 push {r7, lr}
8005d5a: b082 sub sp, #8
8005d5c: af00 add r7, sp, #0
8005d5e: 6078 str r0, [r7, #4]
/* Check the DMA2D peripheral state */
if(hdma2d == NULL)
8005d60: 687b ldr r3, [r7, #4]
8005d62: 2b00 cmp r3, #0
8005d64: d101 bne.n 8005d6a <HAL_DMA2D_Init+0x12>
{
return HAL_ERROR;
8005d66: 2301 movs r3, #1
8005d68: e039 b.n 8005dde <HAL_DMA2D_Init+0x86>
/* Init the low level hardware */
hdma2d->MspInitCallback(hdma2d);
}
#else
if(hdma2d->State == HAL_DMA2D_STATE_RESET)
8005d6a: 687b ldr r3, [r7, #4]
8005d6c: f893 3039 ldrb.w r3, [r3, #57] ; 0x39
8005d70: b2db uxtb r3, r3
8005d72: 2b00 cmp r3, #0
8005d74: d106 bne.n 8005d84 <HAL_DMA2D_Init+0x2c>
{
/* Allocate lock resource and initialize it */
hdma2d->Lock = HAL_UNLOCKED;
8005d76: 687b ldr r3, [r7, #4]
8005d78: 2200 movs r2, #0
8005d7a: f883 2038 strb.w r2, [r3, #56] ; 0x38
/* Init the low level hardware */
HAL_DMA2D_MspInit(hdma2d);
8005d7e: 6878 ldr r0, [r7, #4]
8005d80: f7fe f982 bl 8004088 <HAL_DMA2D_MspInit>
}
#endif /* (USE_HAL_DMA2D_REGISTER_CALLBACKS) */
/* Change DMA2D peripheral state */
hdma2d->State = HAL_DMA2D_STATE_BUSY;
8005d84: 687b ldr r3, [r7, #4]
8005d86: 2202 movs r2, #2
8005d88: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* DMA2D CR register configuration -------------------------------------------*/
MODIFY_REG(hdma2d->Instance->CR, DMA2D_CR_MODE, hdma2d->Init.Mode);
8005d8c: 687b ldr r3, [r7, #4]
8005d8e: 681b ldr r3, [r3, #0]
8005d90: 681b ldr r3, [r3, #0]
8005d92: f423 3140 bic.w r1, r3, #196608 ; 0x30000
8005d96: 687b ldr r3, [r7, #4]
8005d98: 685a ldr r2, [r3, #4]
8005d9a: 687b ldr r3, [r7, #4]
8005d9c: 681b ldr r3, [r3, #0]
8005d9e: 430a orrs r2, r1
8005da0: 601a str r2, [r3, #0]
/* DMA2D OPFCCR register configuration ---------------------------------------*/
MODIFY_REG(hdma2d->Instance->OPFCCR, DMA2D_OPFCCR_CM, hdma2d->Init.ColorMode);
8005da2: 687b ldr r3, [r7, #4]
8005da4: 681b ldr r3, [r3, #0]
8005da6: 6b5b ldr r3, [r3, #52] ; 0x34
8005da8: f023 0107 bic.w r1, r3, #7
8005dac: 687b ldr r3, [r7, #4]
8005dae: 689a ldr r2, [r3, #8]
8005db0: 687b ldr r3, [r7, #4]
8005db2: 681b ldr r3, [r3, #0]
8005db4: 430a orrs r2, r1
8005db6: 635a str r2, [r3, #52] ; 0x34
/* DMA2D OOR register configuration ------------------------------------------*/
MODIFY_REG(hdma2d->Instance->OOR, DMA2D_OOR_LO, hdma2d->Init.OutputOffset);
8005db8: 687b ldr r3, [r7, #4]
8005dba: 681b ldr r3, [r3, #0]
8005dbc: 6c1a ldr r2, [r3, #64] ; 0x40
8005dbe: 4b0a ldr r3, [pc, #40] ; (8005de8 <HAL_DMA2D_Init+0x90>)
8005dc0: 4013 ands r3, r2
8005dc2: 687a ldr r2, [r7, #4]
8005dc4: 68d1 ldr r1, [r2, #12]
8005dc6: 687a ldr r2, [r7, #4]
8005dc8: 6812 ldr r2, [r2, #0]
8005dca: 430b orrs r3, r1
8005dcc: 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;
8005dce: 687b ldr r3, [r7, #4]
8005dd0: 2200 movs r2, #0
8005dd2: 63da str r2, [r3, #60] ; 0x3c
/* Initialize the DMA2D state*/
hdma2d->State = HAL_DMA2D_STATE_READY;
8005dd4: 687b ldr r3, [r7, #4]
8005dd6: 2201 movs r2, #1
8005dd8: f883 2039 strb.w r2, [r3, #57] ; 0x39
return HAL_OK;
8005ddc: 2300 movs r3, #0
}
8005dde: 4618 mov r0, r3
8005de0: 3708 adds r7, #8
8005de2: 46bd mov sp, r7
8005de4: bd80 pop {r7, pc}
8005de6: bf00 nop
8005de8: ffffc000 .word 0xffffc000
08005dec <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)
{
8005dec: b580 push {r7, lr}
8005dee: b086 sub sp, #24
8005df0: af02 add r7, sp, #8
8005df2: 60f8 str r0, [r7, #12]
8005df4: 60b9 str r1, [r7, #8]
8005df6: 607a str r2, [r7, #4]
8005df8: 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);
8005dfa: 68fb ldr r3, [r7, #12]
8005dfc: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
8005e00: 2b01 cmp r3, #1
8005e02: d101 bne.n 8005e08 <HAL_DMA2D_Start+0x1c>
8005e04: 2302 movs r3, #2
8005e06: e018 b.n 8005e3a <HAL_DMA2D_Start+0x4e>
8005e08: 68fb ldr r3, [r7, #12]
8005e0a: 2201 movs r2, #1
8005e0c: f883 2038 strb.w r2, [r3, #56] ; 0x38
/* Change DMA2D peripheral state */
hdma2d->State = HAL_DMA2D_STATE_BUSY;
8005e10: 68fb ldr r3, [r7, #12]
8005e12: 2202 movs r2, #2
8005e14: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Configure the source, destination address and the data size */
DMA2D_SetConfig(hdma2d, pdata, DstAddress, Width, Height);
8005e18: 69bb ldr r3, [r7, #24]
8005e1a: 9300 str r3, [sp, #0]
8005e1c: 683b ldr r3, [r7, #0]
8005e1e: 687a ldr r2, [r7, #4]
8005e20: 68b9 ldr r1, [r7, #8]
8005e22: 68f8 ldr r0, [r7, #12]
8005e24: f000 f988 bl 8006138 <DMA2D_SetConfig>
/* Enable the Peripheral */
__HAL_DMA2D_ENABLE(hdma2d);
8005e28: 68fb ldr r3, [r7, #12]
8005e2a: 681b ldr r3, [r3, #0]
8005e2c: 681a ldr r2, [r3, #0]
8005e2e: 68fb ldr r3, [r7, #12]
8005e30: 681b ldr r3, [r3, #0]
8005e32: f042 0201 orr.w r2, r2, #1
8005e36: 601a str r2, [r3, #0]
return HAL_OK;
8005e38: 2300 movs r3, #0
}
8005e3a: 4618 mov r0, r3
8005e3c: 3710 adds r7, #16
8005e3e: 46bd mov sp, r7
8005e40: bd80 pop {r7, pc}
08005e42 <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)
{
8005e42: b580 push {r7, lr}
8005e44: b086 sub sp, #24
8005e46: af00 add r7, sp, #0
8005e48: 6078 str r0, [r7, #4]
8005e4a: 6039 str r1, [r7, #0]
uint32_t tickstart;
uint32_t layer_start;
__IO uint32_t isrflags = 0x0U;
8005e4c: 2300 movs r3, #0
8005e4e: 60fb str r3, [r7, #12]
/* Polling for DMA2D transfer */
if((hdma2d->Instance->CR & DMA2D_CR_START) != 0U)
8005e50: 687b ldr r3, [r7, #4]
8005e52: 681b ldr r3, [r3, #0]
8005e54: 681b ldr r3, [r3, #0]
8005e56: f003 0301 and.w r3, r3, #1
8005e5a: 2b00 cmp r3, #0
8005e5c: d056 beq.n 8005f0c <HAL_DMA2D_PollForTransfer+0xca>
{
/* Get tick */
tickstart = HAL_GetTick();
8005e5e: f7fe ff1d bl 8004c9c <HAL_GetTick>
8005e62: 6178 str r0, [r7, #20]
while(__HAL_DMA2D_GET_FLAG(hdma2d, DMA2D_FLAG_TC) == 0U)
8005e64: e04b b.n 8005efe <HAL_DMA2D_PollForTransfer+0xbc>
{
isrflags = READ_REG(hdma2d->Instance->ISR);
8005e66: 687b ldr r3, [r7, #4]
8005e68: 681b ldr r3, [r3, #0]
8005e6a: 685b ldr r3, [r3, #4]
8005e6c: 60fb str r3, [r7, #12]
if ((isrflags & (DMA2D_FLAG_CE|DMA2D_FLAG_TE)) != 0U)
8005e6e: 68fb ldr r3, [r7, #12]
8005e70: f003 0321 and.w r3, r3, #33 ; 0x21
8005e74: 2b00 cmp r3, #0
8005e76: d023 beq.n 8005ec0 <HAL_DMA2D_PollForTransfer+0x7e>
{
if ((isrflags & DMA2D_FLAG_CE) != 0U)
8005e78: 68fb ldr r3, [r7, #12]
8005e7a: f003 0320 and.w r3, r3, #32
8005e7e: 2b00 cmp r3, #0
8005e80: d005 beq.n 8005e8e <HAL_DMA2D_PollForTransfer+0x4c>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_CE;
8005e82: 687b ldr r3, [r7, #4]
8005e84: 6bdb ldr r3, [r3, #60] ; 0x3c
8005e86: f043 0202 orr.w r2, r3, #2
8005e8a: 687b ldr r3, [r7, #4]
8005e8c: 63da str r2, [r3, #60] ; 0x3c
}
if ((isrflags & DMA2D_FLAG_TE) != 0U)
8005e8e: 68fb ldr r3, [r7, #12]
8005e90: f003 0301 and.w r3, r3, #1
8005e94: 2b00 cmp r3, #0
8005e96: d005 beq.n 8005ea4 <HAL_DMA2D_PollForTransfer+0x62>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_TE;
8005e98: 687b ldr r3, [r7, #4]
8005e9a: 6bdb ldr r3, [r3, #60] ; 0x3c
8005e9c: f043 0201 orr.w r2, r3, #1
8005ea0: 687b ldr r3, [r7, #4]
8005ea2: 63da str r2, [r3, #60] ; 0x3c
}
/* Clear the transfer and configuration error flags */
__HAL_DMA2D_CLEAR_FLAG(hdma2d, DMA2D_FLAG_CE | DMA2D_FLAG_TE);
8005ea4: 687b ldr r3, [r7, #4]
8005ea6: 681b ldr r3, [r3, #0]
8005ea8: 2221 movs r2, #33 ; 0x21
8005eaa: 609a str r2, [r3, #8]
/* Change DMA2D state */
hdma2d->State = HAL_DMA2D_STATE_ERROR;
8005eac: 687b ldr r3, [r7, #4]
8005eae: 2204 movs r2, #4
8005eb0: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
8005eb4: 687b ldr r3, [r7, #4]
8005eb6: 2200 movs r2, #0
8005eb8: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_ERROR;
8005ebc: 2301 movs r3, #1
8005ebe: e0a5 b.n 800600c <HAL_DMA2D_PollForTransfer+0x1ca>
}
/* Check for the Timeout */
if(Timeout != HAL_MAX_DELAY)
8005ec0: 683b ldr r3, [r7, #0]
8005ec2: f1b3 3fff cmp.w r3, #4294967295
8005ec6: d01a beq.n 8005efe <HAL_DMA2D_PollForTransfer+0xbc>
{
if(((HAL_GetTick() - tickstart ) > Timeout)||(Timeout == 0U))
8005ec8: f7fe fee8 bl 8004c9c <HAL_GetTick>
8005ecc: 4602 mov r2, r0
8005ece: 697b ldr r3, [r7, #20]
8005ed0: 1ad3 subs r3, r2, r3
8005ed2: 683a ldr r2, [r7, #0]
8005ed4: 429a cmp r2, r3
8005ed6: d302 bcc.n 8005ede <HAL_DMA2D_PollForTransfer+0x9c>
8005ed8: 683b ldr r3, [r7, #0]
8005eda: 2b00 cmp r3, #0
8005edc: d10f bne.n 8005efe <HAL_DMA2D_PollForTransfer+0xbc>
{
/* Update error code */
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_TIMEOUT;
8005ede: 687b ldr r3, [r7, #4]
8005ee0: 6bdb ldr r3, [r3, #60] ; 0x3c
8005ee2: f043 0220 orr.w r2, r3, #32
8005ee6: 687b ldr r3, [r7, #4]
8005ee8: 63da str r2, [r3, #60] ; 0x3c
/* Change the DMA2D state */
hdma2d->State = HAL_DMA2D_STATE_TIMEOUT;
8005eea: 687b ldr r3, [r7, #4]
8005eec: 2203 movs r2, #3
8005eee: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
8005ef2: 687b ldr r3, [r7, #4]
8005ef4: 2200 movs r2, #0
8005ef6: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_TIMEOUT;
8005efa: 2303 movs r3, #3
8005efc: e086 b.n 800600c <HAL_DMA2D_PollForTransfer+0x1ca>
while(__HAL_DMA2D_GET_FLAG(hdma2d, DMA2D_FLAG_TC) == 0U)
8005efe: 687b ldr r3, [r7, #4]
8005f00: 681b ldr r3, [r3, #0]
8005f02: 685b ldr r3, [r3, #4]
8005f04: f003 0302 and.w r3, r3, #2
8005f08: 2b00 cmp r3, #0
8005f0a: d0ac beq.n 8005e66 <HAL_DMA2D_PollForTransfer+0x24>
}
}
}
}
/* Polling for CLUT loading (foreground or background) */
layer_start = hdma2d->Instance->FGPFCCR & DMA2D_FGPFCCR_START;
8005f0c: 687b ldr r3, [r7, #4]
8005f0e: 681b ldr r3, [r3, #0]
8005f10: 69db ldr r3, [r3, #28]
8005f12: f003 0320 and.w r3, r3, #32
8005f16: 613b str r3, [r7, #16]
layer_start |= hdma2d->Instance->BGPFCCR & DMA2D_BGPFCCR_START;
8005f18: 687b ldr r3, [r7, #4]
8005f1a: 681b ldr r3, [r3, #0]
8005f1c: 6a5b ldr r3, [r3, #36] ; 0x24
8005f1e: f003 0320 and.w r3, r3, #32
8005f22: 693a ldr r2, [r7, #16]
8005f24: 4313 orrs r3, r2
8005f26: 613b str r3, [r7, #16]
if (layer_start != 0U)
8005f28: 693b ldr r3, [r7, #16]
8005f2a: 2b00 cmp r3, #0
8005f2c: d061 beq.n 8005ff2 <HAL_DMA2D_PollForTransfer+0x1b0>
{
/* Get tick */
tickstart = HAL_GetTick();
8005f2e: f7fe feb5 bl 8004c9c <HAL_GetTick>
8005f32: 6178 str r0, [r7, #20]
while(__HAL_DMA2D_GET_FLAG(hdma2d, DMA2D_FLAG_CTC) == 0U)
8005f34: e056 b.n 8005fe4 <HAL_DMA2D_PollForTransfer+0x1a2>
{
isrflags = READ_REG(hdma2d->Instance->ISR);
8005f36: 687b ldr r3, [r7, #4]
8005f38: 681b ldr r3, [r3, #0]
8005f3a: 685b ldr r3, [r3, #4]
8005f3c: 60fb str r3, [r7, #12]
if ((isrflags & (DMA2D_FLAG_CAE|DMA2D_FLAG_CE|DMA2D_FLAG_TE)) != 0U)
8005f3e: 68fb ldr r3, [r7, #12]
8005f40: f003 0329 and.w r3, r3, #41 ; 0x29
8005f44: 2b00 cmp r3, #0
8005f46: d02e beq.n 8005fa6 <HAL_DMA2D_PollForTransfer+0x164>
{
if ((isrflags & DMA2D_FLAG_CAE) != 0U)
8005f48: 68fb ldr r3, [r7, #12]
8005f4a: f003 0308 and.w r3, r3, #8
8005f4e: 2b00 cmp r3, #0
8005f50: d005 beq.n 8005f5e <HAL_DMA2D_PollForTransfer+0x11c>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_CAE;
8005f52: 687b ldr r3, [r7, #4]
8005f54: 6bdb ldr r3, [r3, #60] ; 0x3c
8005f56: f043 0204 orr.w r2, r3, #4
8005f5a: 687b ldr r3, [r7, #4]
8005f5c: 63da str r2, [r3, #60] ; 0x3c
}
if ((isrflags & DMA2D_FLAG_CE) != 0U)
8005f5e: 68fb ldr r3, [r7, #12]
8005f60: f003 0320 and.w r3, r3, #32
8005f64: 2b00 cmp r3, #0
8005f66: d005 beq.n 8005f74 <HAL_DMA2D_PollForTransfer+0x132>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_CE;
8005f68: 687b ldr r3, [r7, #4]
8005f6a: 6bdb ldr r3, [r3, #60] ; 0x3c
8005f6c: f043 0202 orr.w r2, r3, #2
8005f70: 687b ldr r3, [r7, #4]
8005f72: 63da str r2, [r3, #60] ; 0x3c
}
if ((isrflags & DMA2D_FLAG_TE) != 0U)
8005f74: 68fb ldr r3, [r7, #12]
8005f76: f003 0301 and.w r3, r3, #1
8005f7a: 2b00 cmp r3, #0
8005f7c: d005 beq.n 8005f8a <HAL_DMA2D_PollForTransfer+0x148>
{
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_TE;
8005f7e: 687b ldr r3, [r7, #4]
8005f80: 6bdb ldr r3, [r3, #60] ; 0x3c
8005f82: f043 0201 orr.w r2, r3, #1
8005f86: 687b ldr r3, [r7, #4]
8005f88: 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);
8005f8a: 687b ldr r3, [r7, #4]
8005f8c: 681b ldr r3, [r3, #0]
8005f8e: 2229 movs r2, #41 ; 0x29
8005f90: 609a str r2, [r3, #8]
/* Change DMA2D state */
hdma2d->State= HAL_DMA2D_STATE_ERROR;
8005f92: 687b ldr r3, [r7, #4]
8005f94: 2204 movs r2, #4
8005f96: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
8005f9a: 687b ldr r3, [r7, #4]
8005f9c: 2200 movs r2, #0
8005f9e: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_ERROR;
8005fa2: 2301 movs r3, #1
8005fa4: e032 b.n 800600c <HAL_DMA2D_PollForTransfer+0x1ca>
}
/* Check for the Timeout */
if(Timeout != HAL_MAX_DELAY)
8005fa6: 683b ldr r3, [r7, #0]
8005fa8: f1b3 3fff cmp.w r3, #4294967295
8005fac: d01a beq.n 8005fe4 <HAL_DMA2D_PollForTransfer+0x1a2>
{
if(((HAL_GetTick() - tickstart ) > Timeout)||(Timeout == 0U))
8005fae: f7fe fe75 bl 8004c9c <HAL_GetTick>
8005fb2: 4602 mov r2, r0
8005fb4: 697b ldr r3, [r7, #20]
8005fb6: 1ad3 subs r3, r2, r3
8005fb8: 683a ldr r2, [r7, #0]
8005fba: 429a cmp r2, r3
8005fbc: d302 bcc.n 8005fc4 <HAL_DMA2D_PollForTransfer+0x182>
8005fbe: 683b ldr r3, [r7, #0]
8005fc0: 2b00 cmp r3, #0
8005fc2: d10f bne.n 8005fe4 <HAL_DMA2D_PollForTransfer+0x1a2>
{
/* Update error code */
hdma2d->ErrorCode |= HAL_DMA2D_ERROR_TIMEOUT;
8005fc4: 687b ldr r3, [r7, #4]
8005fc6: 6bdb ldr r3, [r3, #60] ; 0x3c
8005fc8: f043 0220 orr.w r2, r3, #32
8005fcc: 687b ldr r3, [r7, #4]
8005fce: 63da str r2, [r3, #60] ; 0x3c
/* Change the DMA2D state */
hdma2d->State= HAL_DMA2D_STATE_TIMEOUT;
8005fd0: 687b ldr r3, [r7, #4]
8005fd2: 2203 movs r2, #3
8005fd4: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
8005fd8: 687b ldr r3, [r7, #4]
8005fda: 2200 movs r2, #0
8005fdc: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_TIMEOUT;
8005fe0: 2303 movs r3, #3
8005fe2: e013 b.n 800600c <HAL_DMA2D_PollForTransfer+0x1ca>
while(__HAL_DMA2D_GET_FLAG(hdma2d, DMA2D_FLAG_CTC) == 0U)
8005fe4: 687b ldr r3, [r7, #4]
8005fe6: 681b ldr r3, [r3, #0]
8005fe8: 685b ldr r3, [r3, #4]
8005fea: f003 0310 and.w r3, r3, #16
8005fee: 2b00 cmp r3, #0
8005ff0: d0a1 beq.n 8005f36 <HAL_DMA2D_PollForTransfer+0xf4>
}
}
}
/* Clear the transfer complete and CLUT loading flags */
__HAL_DMA2D_CLEAR_FLAG(hdma2d, DMA2D_FLAG_TC|DMA2D_FLAG_CTC);
8005ff2: 687b ldr r3, [r7, #4]
8005ff4: 681b ldr r3, [r3, #0]
8005ff6: 2212 movs r2, #18
8005ff8: 609a str r2, [r3, #8]
/* Change DMA2D state */
hdma2d->State = HAL_DMA2D_STATE_READY;
8005ffa: 687b ldr r3, [r7, #4]
8005ffc: 2201 movs r2, #1
8005ffe: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
8006002: 687b ldr r3, [r7, #4]
8006004: 2200 movs r2, #0
8006006: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_OK;
800600a: 2300 movs r3, #0
}
800600c: 4618 mov r0, r3
800600e: 3718 adds r7, #24
8006010: 46bd mov sp, r7
8006012: bd80 pop {r7, pc}
08006014 <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)
{
8006014: b480 push {r7}
8006016: b087 sub sp, #28
8006018: af00 add r7, sp, #0
800601a: 6078 str r0, [r7, #4]
800601c: 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)
800601e: 687b ldr r3, [r7, #4]
8006020: 685b ldr r3, [r3, #4]
8006022: 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);
8006026: 687b ldr r3, [r7, #4]
8006028: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
800602c: 2b01 cmp r3, #1
800602e: d101 bne.n 8006034 <HAL_DMA2D_ConfigLayer+0x20>
8006030: 2302 movs r3, #2
8006032: e079 b.n 8006128 <HAL_DMA2D_ConfigLayer+0x114>
8006034: 687b ldr r3, [r7, #4]
8006036: 2201 movs r2, #1
8006038: f883 2038 strb.w r2, [r3, #56] ; 0x38
/* Change DMA2D peripheral state */
hdma2d->State = HAL_DMA2D_STATE_BUSY;
800603c: 687b ldr r3, [r7, #4]
800603e: 2202 movs r2, #2
8006040: f883 2039 strb.w r2, [r3, #57] ; 0x39
pLayerCfg = &hdma2d->LayerCfg[LayerIdx];
8006044: 683b ldr r3, [r7, #0]
8006046: 011b lsls r3, r3, #4
8006048: 3318 adds r3, #24
800604a: 687a ldr r2, [r7, #4]
800604c: 4413 add r3, r2
800604e: 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);
8006050: 693b ldr r3, [r7, #16]
8006052: 685a ldr r2, [r3, #4]
8006054: 693b ldr r3, [r7, #16]
8006056: 689b ldr r3, [r3, #8]
8006058: 041b lsls r3, r3, #16
800605a: 4313 orrs r3, r2
800605c: 617b str r3, [r7, #20]
regMask = DMA2D_BGPFCCR_CM | DMA2D_BGPFCCR_AM | DMA2D_BGPFCCR_ALPHA;
800605e: 4b35 ldr r3, [pc, #212] ; (8006134 <HAL_DMA2D_ConfigLayer+0x120>)
8006060: 60fb str r3, [r7, #12]
#endif /* DMA2D_ALPHA_INV_RB_SWAP_SUPPORT */
if ((pLayerCfg->InputColorMode == DMA2D_INPUT_A4) || (pLayerCfg->InputColorMode == DMA2D_INPUT_A8))
8006062: 693b ldr r3, [r7, #16]
8006064: 685b ldr r3, [r3, #4]
8006066: 2b0a cmp r3, #10
8006068: d003 beq.n 8006072 <HAL_DMA2D_ConfigLayer+0x5e>
800606a: 693b ldr r3, [r7, #16]
800606c: 685b ldr r3, [r3, #4]
800606e: 2b09 cmp r3, #9
8006070: d107 bne.n 8006082 <HAL_DMA2D_ConfigLayer+0x6e>
{
regValue |= (pLayerCfg->InputAlpha & DMA2D_BGPFCCR_ALPHA);
8006072: 693b ldr r3, [r7, #16]
8006074: 68db ldr r3, [r3, #12]
8006076: f003 437f and.w r3, r3, #4278190080 ; 0xff000000
800607a: 697a ldr r2, [r7, #20]
800607c: 4313 orrs r3, r2
800607e: 617b str r3, [r7, #20]
8006080: e005 b.n 800608e <HAL_DMA2D_ConfigLayer+0x7a>
}
else
{
regValue |= (pLayerCfg->InputAlpha << DMA2D_BGPFCCR_ALPHA_Pos);
8006082: 693b ldr r3, [r7, #16]
8006084: 68db ldr r3, [r3, #12]
8006086: 061b lsls r3, r3, #24
8006088: 697a ldr r2, [r7, #20]
800608a: 4313 orrs r3, r2
800608c: 617b str r3, [r7, #20]
}
/* Configure the background DMA2D layer */
if(LayerIdx == DMA2D_BACKGROUND_LAYER)
800608e: 683b ldr r3, [r7, #0]
8006090: 2b00 cmp r3, #0
8006092: d120 bne.n 80060d6 <HAL_DMA2D_ConfigLayer+0xc2>
{
/* Write DMA2D BGPFCCR register */
MODIFY_REG(hdma2d->Instance->BGPFCCR, regMask, regValue);
8006094: 687b ldr r3, [r7, #4]
8006096: 681b ldr r3, [r3, #0]
8006098: 6a5a ldr r2, [r3, #36] ; 0x24
800609a: 68fb ldr r3, [r7, #12]
800609c: 43db mvns r3, r3
800609e: ea02 0103 and.w r1, r2, r3
80060a2: 687b ldr r3, [r7, #4]
80060a4: 681b ldr r3, [r3, #0]
80060a6: 697a ldr r2, [r7, #20]
80060a8: 430a orrs r2, r1
80060aa: 625a str r2, [r3, #36] ; 0x24
/* DMA2D BGOR register configuration -------------------------------------*/
WRITE_REG(hdma2d->Instance->BGOR, pLayerCfg->InputOffset);
80060ac: 687b ldr r3, [r7, #4]
80060ae: 681b ldr r3, [r3, #0]
80060b0: 693a ldr r2, [r7, #16]
80060b2: 6812 ldr r2, [r2, #0]
80060b4: 619a str r2, [r3, #24]
/* DMA2D BGCOLR register configuration -------------------------------------*/
if ((pLayerCfg->InputColorMode == DMA2D_INPUT_A4) || (pLayerCfg->InputColorMode == DMA2D_INPUT_A8))
80060b6: 693b ldr r3, [r7, #16]
80060b8: 685b ldr r3, [r3, #4]
80060ba: 2b0a cmp r3, #10
80060bc: d003 beq.n 80060c6 <HAL_DMA2D_ConfigLayer+0xb2>
80060be: 693b ldr r3, [r7, #16]
80060c0: 685b ldr r3, [r3, #4]
80060c2: 2b09 cmp r3, #9
80060c4: d127 bne.n 8006116 <HAL_DMA2D_ConfigLayer+0x102>
{
WRITE_REG(hdma2d->Instance->BGCOLR, pLayerCfg->InputAlpha & (DMA2D_BGCOLR_BLUE|DMA2D_BGCOLR_GREEN|DMA2D_BGCOLR_RED));
80060c6: 693b ldr r3, [r7, #16]
80060c8: 68da ldr r2, [r3, #12]
80060ca: 687b ldr r3, [r7, #4]
80060cc: 681b ldr r3, [r3, #0]
80060ce: f022 427f bic.w r2, r2, #4278190080 ; 0xff000000
80060d2: 629a str r2, [r3, #40] ; 0x28
80060d4: e01f b.n 8006116 <HAL_DMA2D_ConfigLayer+0x102>
else
{
/* Write DMA2D FGPFCCR register */
MODIFY_REG(hdma2d->Instance->FGPFCCR, regMask, regValue);
80060d6: 687b ldr r3, [r7, #4]
80060d8: 681b ldr r3, [r3, #0]
80060da: 69da ldr r2, [r3, #28]
80060dc: 68fb ldr r3, [r7, #12]
80060de: 43db mvns r3, r3
80060e0: ea02 0103 and.w r1, r2, r3
80060e4: 687b ldr r3, [r7, #4]
80060e6: 681b ldr r3, [r3, #0]
80060e8: 697a ldr r2, [r7, #20]
80060ea: 430a orrs r2, r1
80060ec: 61da str r2, [r3, #28]
/* DMA2D FGOR register configuration -------------------------------------*/
WRITE_REG(hdma2d->Instance->FGOR, pLayerCfg->InputOffset);
80060ee: 687b ldr r3, [r7, #4]
80060f0: 681b ldr r3, [r3, #0]
80060f2: 693a ldr r2, [r7, #16]
80060f4: 6812 ldr r2, [r2, #0]
80060f6: 611a str r2, [r3, #16]
/* DMA2D FGCOLR register configuration -------------------------------------*/
if ((pLayerCfg->InputColorMode == DMA2D_INPUT_A4) || (pLayerCfg->InputColorMode == DMA2D_INPUT_A8))
80060f8: 693b ldr r3, [r7, #16]
80060fa: 685b ldr r3, [r3, #4]
80060fc: 2b0a cmp r3, #10
80060fe: d003 beq.n 8006108 <HAL_DMA2D_ConfigLayer+0xf4>
8006100: 693b ldr r3, [r7, #16]
8006102: 685b ldr r3, [r3, #4]
8006104: 2b09 cmp r3, #9
8006106: d106 bne.n 8006116 <HAL_DMA2D_ConfigLayer+0x102>
{
WRITE_REG(hdma2d->Instance->FGCOLR, pLayerCfg->InputAlpha & (DMA2D_FGCOLR_BLUE|DMA2D_FGCOLR_GREEN|DMA2D_FGCOLR_RED));
8006108: 693b ldr r3, [r7, #16]
800610a: 68da ldr r2, [r3, #12]
800610c: 687b ldr r3, [r7, #4]
800610e: 681b ldr r3, [r3, #0]
8006110: f022 427f bic.w r2, r2, #4278190080 ; 0xff000000
8006114: 621a str r2, [r3, #32]
}
}
/* Initialize the DMA2D state*/
hdma2d->State = HAL_DMA2D_STATE_READY;
8006116: 687b ldr r3, [r7, #4]
8006118: 2201 movs r2, #1
800611a: f883 2039 strb.w r2, [r3, #57] ; 0x39
/* Process unlocked */
__HAL_UNLOCK(hdma2d);
800611e: 687b ldr r3, [r7, #4]
8006120: 2200 movs r2, #0
8006122: f883 2038 strb.w r2, [r3, #56] ; 0x38
return HAL_OK;
8006126: 2300 movs r3, #0
}
8006128: 4618 mov r0, r3
800612a: 371c adds r7, #28
800612c: 46bd mov sp, r7
800612e: f85d 7b04 ldr.w r7, [sp], #4
8006132: 4770 bx lr
8006134: ff03000f .word 0xff03000f
08006138 <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)
{
8006138: b480 push {r7}
800613a: b08b sub sp, #44 ; 0x2c
800613c: af00 add r7, sp, #0
800613e: 60f8 str r0, [r7, #12]
8006140: 60b9 str r1, [r7, #8]
8006142: 607a str r2, [r7, #4]
8006144: 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)));
8006146: 68fb ldr r3, [r7, #12]
8006148: 681b ldr r3, [r3, #0]
800614a: 6c5b ldr r3, [r3, #68] ; 0x44
800614c: f003 4140 and.w r1, r3, #3221225472 ; 0xc0000000
8006150: 683b ldr r3, [r7, #0]
8006152: 041a lsls r2, r3, #16
8006154: 6b3b ldr r3, [r7, #48] ; 0x30
8006156: 431a orrs r2, r3
8006158: 68fb ldr r3, [r7, #12]
800615a: 681b ldr r3, [r3, #0]
800615c: 430a orrs r2, r1
800615e: 645a str r2, [r3, #68] ; 0x44
/* Configure DMA2D destination address */
WRITE_REG(hdma2d->Instance->OMAR, DstAddress);
8006160: 68fb ldr r3, [r7, #12]
8006162: 681b ldr r3, [r3, #0]
8006164: 687a ldr r2, [r7, #4]
8006166: 63da str r2, [r3, #60] ; 0x3c
/* Register to memory DMA2D mode selected */
if (hdma2d->Init.Mode == DMA2D_R2M)
8006168: 68fb ldr r3, [r7, #12]
800616a: 685b ldr r3, [r3, #4]
800616c: f5b3 3f40 cmp.w r3, #196608 ; 0x30000
8006170: d174 bne.n 800625c <DMA2D_SetConfig+0x124>
{
tmp1 = pdata & DMA2D_OCOLR_ALPHA_1;
8006172: 68bb ldr r3, [r7, #8]
8006174: f003 437f and.w r3, r3, #4278190080 ; 0xff000000
8006178: 623b str r3, [r7, #32]
tmp2 = pdata & DMA2D_OCOLR_RED_1;
800617a: 68bb ldr r3, [r7, #8]
800617c: f403 037f and.w r3, r3, #16711680 ; 0xff0000
8006180: 61fb str r3, [r7, #28]
tmp3 = pdata & DMA2D_OCOLR_GREEN_1;
8006182: 68bb ldr r3, [r7, #8]
8006184: f403 437f and.w r3, r3, #65280 ; 0xff00
8006188: 61bb str r3, [r7, #24]
tmp4 = pdata & DMA2D_OCOLR_BLUE_1;
800618a: 68bb ldr r3, [r7, #8]
800618c: b2db uxtb r3, r3
800618e: 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)
8006190: 68fb ldr r3, [r7, #12]
8006192: 689b ldr r3, [r3, #8]
8006194: 2b00 cmp r3, #0
8006196: d108 bne.n 80061aa <DMA2D_SetConfig+0x72>
{
tmp = (tmp3 | tmp2 | tmp1| tmp4);
8006198: 69ba ldr r2, [r7, #24]
800619a: 69fb ldr r3, [r7, #28]
800619c: 431a orrs r2, r3
800619e: 6a3b ldr r3, [r7, #32]
80061a0: 4313 orrs r3, r2
80061a2: 697a ldr r2, [r7, #20]
80061a4: 4313 orrs r3, r2
80061a6: 627b str r3, [r7, #36] ; 0x24
80061a8: e053 b.n 8006252 <DMA2D_SetConfig+0x11a>
}
else if (hdma2d->Init.ColorMode == DMA2D_OUTPUT_RGB888)
80061aa: 68fb ldr r3, [r7, #12]
80061ac: 689b ldr r3, [r3, #8]
80061ae: 2b01 cmp r3, #1
80061b0: d106 bne.n 80061c0 <DMA2D_SetConfig+0x88>
{
tmp = (tmp3 | tmp2 | tmp4);
80061b2: 69ba ldr r2, [r7, #24]
80061b4: 69fb ldr r3, [r7, #28]
80061b6: 4313 orrs r3, r2
80061b8: 697a ldr r2, [r7, #20]
80061ba: 4313 orrs r3, r2
80061bc: 627b str r3, [r7, #36] ; 0x24
80061be: e048 b.n 8006252 <DMA2D_SetConfig+0x11a>
}
else if (hdma2d->Init.ColorMode == DMA2D_OUTPUT_RGB565)
80061c0: 68fb ldr r3, [r7, #12]
80061c2: 689b ldr r3, [r3, #8]
80061c4: 2b02 cmp r3, #2
80061c6: d111 bne.n 80061ec <DMA2D_SetConfig+0xb4>
{
tmp2 = (tmp2 >> 19U);
80061c8: 69fb ldr r3, [r7, #28]
80061ca: 0cdb lsrs r3, r3, #19
80061cc: 61fb str r3, [r7, #28]
tmp3 = (tmp3 >> 10U);
80061ce: 69bb ldr r3, [r7, #24]
80061d0: 0a9b lsrs r3, r3, #10
80061d2: 61bb str r3, [r7, #24]
tmp4 = (tmp4 >> 3U );
80061d4: 697b ldr r3, [r7, #20]
80061d6: 08db lsrs r3, r3, #3
80061d8: 617b str r3, [r7, #20]
tmp = ((tmp3 << 5U) | (tmp2 << 11U) | tmp4);
80061da: 69bb ldr r3, [r7, #24]
80061dc: 015a lsls r2, r3, #5
80061de: 69fb ldr r3, [r7, #28]
80061e0: 02db lsls r3, r3, #11
80061e2: 4313 orrs r3, r2
80061e4: 697a ldr r2, [r7, #20]
80061e6: 4313 orrs r3, r2
80061e8: 627b str r3, [r7, #36] ; 0x24
80061ea: e032 b.n 8006252 <DMA2D_SetConfig+0x11a>
}
else if (hdma2d->Init.ColorMode == DMA2D_OUTPUT_ARGB1555)
80061ec: 68fb ldr r3, [r7, #12]
80061ee: 689b ldr r3, [r3, #8]
80061f0: 2b03 cmp r3, #3
80061f2: d117 bne.n 8006224 <DMA2D_SetConfig+0xec>
{
tmp1 = (tmp1 >> 31U);
80061f4: 6a3b ldr r3, [r7, #32]
80061f6: 0fdb lsrs r3, r3, #31
80061f8: 623b str r3, [r7, #32]
tmp2 = (tmp2 >> 19U);
80061fa: 69fb ldr r3, [r7, #28]
80061fc: 0cdb lsrs r3, r3, #19
80061fe: 61fb str r3, [r7, #28]
tmp3 = (tmp3 >> 11U);
8006200: 69bb ldr r3, [r7, #24]
8006202: 0adb lsrs r3, r3, #11
8006204: 61bb str r3, [r7, #24]
tmp4 = (tmp4 >> 3U );
8006206: 697b ldr r3, [r7, #20]
8006208: 08db lsrs r3, r3, #3
800620a: 617b str r3, [r7, #20]
tmp = ((tmp3 << 5U) | (tmp2 << 10U) | (tmp1 << 15U) | tmp4);
800620c: 69bb ldr r3, [r7, #24]
800620e: 015a lsls r2, r3, #5
8006210: 69fb ldr r3, [r7, #28]
8006212: 029b lsls r3, r3, #10
8006214: 431a orrs r2, r3
8006216: 6a3b ldr r3, [r7, #32]
8006218: 03db lsls r3, r3, #15
800621a: 4313 orrs r3, r2
800621c: 697a ldr r2, [r7, #20]
800621e: 4313 orrs r3, r2
8006220: 627b str r3, [r7, #36] ; 0x24
8006222: e016 b.n 8006252 <DMA2D_SetConfig+0x11a>
}
else /* Dhdma2d->Init.ColorMode = DMA2D_OUTPUT_ARGB4444 */
{
tmp1 = (tmp1 >> 28U);
8006224: 6a3b ldr r3, [r7, #32]
8006226: 0f1b lsrs r3, r3, #28
8006228: 623b str r3, [r7, #32]
tmp2 = (tmp2 >> 20U);
800622a: 69fb ldr r3, [r7, #28]
800622c: 0d1b lsrs r3, r3, #20
800622e: 61fb str r3, [r7, #28]
tmp3 = (tmp3 >> 12U);
8006230: 69bb ldr r3, [r7, #24]
8006232: 0b1b lsrs r3, r3, #12
8006234: 61bb str r3, [r7, #24]
tmp4 = (tmp4 >> 4U );
8006236: 697b ldr r3, [r7, #20]
8006238: 091b lsrs r3, r3, #4
800623a: 617b str r3, [r7, #20]
tmp = ((tmp3 << 4U) | (tmp2 << 8U) | (tmp1 << 12U) | tmp4);
800623c: 69bb ldr r3, [r7, #24]
800623e: 011a lsls r2, r3, #4
8006240: 69fb ldr r3, [r7, #28]
8006242: 021b lsls r3, r3, #8
8006244: 431a orrs r2, r3
8006246: 6a3b ldr r3, [r7, #32]
8006248: 031b lsls r3, r3, #12
800624a: 4313 orrs r3, r2
800624c: 697a ldr r2, [r7, #20]
800624e: 4313 orrs r3, r2
8006250: 627b str r3, [r7, #36] ; 0x24
}
/* Write to DMA2D OCOLR register */
WRITE_REG(hdma2d->Instance->OCOLR, tmp);
8006252: 68fb ldr r3, [r7, #12]
8006254: 681b ldr r3, [r3, #0]
8006256: 6a7a ldr r2, [r7, #36] ; 0x24
8006258: 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);
}
}
800625a: e003 b.n 8006264 <DMA2D_SetConfig+0x12c>
WRITE_REG(hdma2d->Instance->FGMAR, pdata);
800625c: 68fb ldr r3, [r7, #12]
800625e: 681b ldr r3, [r3, #0]
8006260: 68ba ldr r2, [r7, #8]
8006262: 60da str r2, [r3, #12]
}
8006264: bf00 nop
8006266: 372c adds r7, #44 ; 0x2c
8006268: 46bd mov sp, r7
800626a: f85d 7b04 ldr.w r7, [sp], #4
800626e: 4770 bx lr
08006270 <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)
{
8006270: b580 push {r7, lr}
8006272: b088 sub sp, #32
8006274: af00 add r7, sp, #0
8006276: 6078 str r0, [r7, #4]
uint32_t tempreg = 0, phyreg = 0;
8006278: 2300 movs r3, #0
800627a: 61fb str r3, [r7, #28]
800627c: 2300 movs r3, #0
800627e: 60fb str r3, [r7, #12]
uint32_t hclk = 60000000;
8006280: 4ba9 ldr r3, [pc, #676] ; (8006528 <HAL_ETH_Init+0x2b8>)
8006282: 61bb str r3, [r7, #24]
uint32_t tickstart = 0;
8006284: 2300 movs r3, #0
8006286: 617b str r3, [r7, #20]
uint32_t err = ETH_SUCCESS;
8006288: 2300 movs r3, #0
800628a: 613b str r3, [r7, #16]
/* Check the ETH peripheral state */
if(heth == NULL)
800628c: 687b ldr r3, [r7, #4]
800628e: 2b00 cmp r3, #0
8006290: d101 bne.n 8006296 <HAL_ETH_Init+0x26>
{
return HAL_ERROR;
8006292: 2301 movs r3, #1
8006294: e183 b.n 800659e <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)
8006296: 687b ldr r3, [r7, #4]
8006298: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800629c: b2db uxtb r3, r3
800629e: 2b00 cmp r3, #0
80062a0: d106 bne.n 80062b0 <HAL_ETH_Init+0x40>
{
/* Allocate lock resource and initialize it */
heth->Lock = HAL_UNLOCKED;
80062a2: 687b ldr r3, [r7, #4]
80062a4: 2200 movs r2, #0
80062a6: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
heth->MspInitCallback(heth);
#else
/* Init the low level hardware : GPIO, CLOCK, NVIC. */
HAL_ETH_MspInit(heth);
80062aa: 6878 ldr r0, [r7, #4]
80062ac: f006 fa70 bl 800c790 <HAL_ETH_MspInit>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
}
/* Enable SYSCFG Clock */
__HAL_RCC_SYSCFG_CLK_ENABLE();
80062b0: 4b9e ldr r3, [pc, #632] ; (800652c <HAL_ETH_Init+0x2bc>)
80062b2: 6c5b ldr r3, [r3, #68] ; 0x44
80062b4: 4a9d ldr r2, [pc, #628] ; (800652c <HAL_ETH_Init+0x2bc>)
80062b6: f443 4380 orr.w r3, r3, #16384 ; 0x4000
80062ba: 6453 str r3, [r2, #68] ; 0x44
80062bc: 4b9b ldr r3, [pc, #620] ; (800652c <HAL_ETH_Init+0x2bc>)
80062be: 6c5b ldr r3, [r3, #68] ; 0x44
80062c0: f403 4380 and.w r3, r3, #16384 ; 0x4000
80062c4: 60bb str r3, [r7, #8]
80062c6: 68bb ldr r3, [r7, #8]
/* Select MII or RMII Mode*/
SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL);
80062c8: 4b99 ldr r3, [pc, #612] ; (8006530 <HAL_ETH_Init+0x2c0>)
80062ca: 685b ldr r3, [r3, #4]
80062cc: 4a98 ldr r2, [pc, #608] ; (8006530 <HAL_ETH_Init+0x2c0>)
80062ce: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
80062d2: 6053 str r3, [r2, #4]
SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface;
80062d4: 4b96 ldr r3, [pc, #600] ; (8006530 <HAL_ETH_Init+0x2c0>)
80062d6: 685a ldr r2, [r3, #4]
80062d8: 687b ldr r3, [r7, #4]
80062da: 6a1b ldr r3, [r3, #32]
80062dc: 4994 ldr r1, [pc, #592] ; (8006530 <HAL_ETH_Init+0x2c0>)
80062de: 4313 orrs r3, r2
80062e0: 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;
80062e2: 687b ldr r3, [r7, #4]
80062e4: 681b ldr r3, [r3, #0]
80062e6: f503 5380 add.w r3, r3, #4096 ; 0x1000
80062ea: 681a ldr r2, [r3, #0]
80062ec: 687b ldr r3, [r7, #4]
80062ee: 681b ldr r3, [r3, #0]
80062f0: f042 0201 orr.w r2, r2, #1
80062f4: f503 5380 add.w r3, r3, #4096 ; 0x1000
80062f8: 601a str r2, [r3, #0]
/* Get tick */
tickstart = HAL_GetTick();
80062fa: f7fe fccf bl 8004c9c <HAL_GetTick>
80062fe: 6178 str r0, [r7, #20]
/* Wait for software reset */
while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET)
8006300: e011 b.n 8006326 <HAL_ETH_Init+0xb6>
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_SWRESET)
8006302: f7fe fccb bl 8004c9c <HAL_GetTick>
8006306: 4602 mov r2, r0
8006308: 697b ldr r3, [r7, #20]
800630a: 1ad3 subs r3, r2, r3
800630c: f5b3 7ffa cmp.w r3, #500 ; 0x1f4
8006310: d909 bls.n 8006326 <HAL_ETH_Init+0xb6>
{
heth->State= HAL_ETH_STATE_TIMEOUT;
8006312: 687b ldr r3, [r7, #4]
8006314: 2203 movs r2, #3
8006316: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
800631a: 687b ldr r3, [r7, #4]
800631c: 2200 movs r2, #0
800631e: 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;
8006322: 2303 movs r3, #3
8006324: e13b b.n 800659e <HAL_ETH_Init+0x32e>
while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET)
8006326: 687b ldr r3, [r7, #4]
8006328: 681b ldr r3, [r3, #0]
800632a: f503 5380 add.w r3, r3, #4096 ; 0x1000
800632e: 681b ldr r3, [r3, #0]
8006330: f003 0301 and.w r3, r3, #1
8006334: 2b00 cmp r3, #0
8006336: d1e4 bne.n 8006302 <HAL_ETH_Init+0x92>
}
}
/*-------------------------------- MAC Initialization ----------------------*/
/* Get the ETHERNET MACMIIAR value */
tempreg = (heth->Instance)->MACMIIAR;
8006338: 687b ldr r3, [r7, #4]
800633a: 681b ldr r3, [r3, #0]
800633c: 691b ldr r3, [r3, #16]
800633e: 61fb str r3, [r7, #28]
/* Clear CSR Clock Range CR[2:0] bits */
tempreg &= ETH_MACMIIAR_CR_MASK;
8006340: 69fb ldr r3, [r7, #28]
8006342: f023 031c bic.w r3, r3, #28
8006346: 61fb str r3, [r7, #28]
/* Get hclk frequency value */
hclk = HAL_RCC_GetHCLKFreq();
8006348: f003 f9c8 bl 80096dc <HAL_RCC_GetHCLKFreq>
800634c: 61b8 str r0, [r7, #24]
/* Set CR bits depending on hclk value */
if((hclk >= 20000000)&&(hclk < 35000000))
800634e: 69bb ldr r3, [r7, #24]
8006350: 4a78 ldr r2, [pc, #480] ; (8006534 <HAL_ETH_Init+0x2c4>)
8006352: 4293 cmp r3, r2
8006354: d908 bls.n 8006368 <HAL_ETH_Init+0xf8>
8006356: 69bb ldr r3, [r7, #24]
8006358: 4a77 ldr r2, [pc, #476] ; (8006538 <HAL_ETH_Init+0x2c8>)
800635a: 4293 cmp r3, r2
800635c: d804 bhi.n 8006368 <HAL_ETH_Init+0xf8>
{
/* CSR Clock Range between 20-35 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div16;
800635e: 69fb ldr r3, [r7, #28]
8006360: f043 0308 orr.w r3, r3, #8
8006364: 61fb str r3, [r7, #28]
8006366: e027 b.n 80063b8 <HAL_ETH_Init+0x148>
}
else if((hclk >= 35000000)&&(hclk < 60000000))
8006368: 69bb ldr r3, [r7, #24]
800636a: 4a73 ldr r2, [pc, #460] ; (8006538 <HAL_ETH_Init+0x2c8>)
800636c: 4293 cmp r3, r2
800636e: d908 bls.n 8006382 <HAL_ETH_Init+0x112>
8006370: 69bb ldr r3, [r7, #24]
8006372: 4a72 ldr r2, [pc, #456] ; (800653c <HAL_ETH_Init+0x2cc>)
8006374: 4293 cmp r3, r2
8006376: d804 bhi.n 8006382 <HAL_ETH_Init+0x112>
{
/* CSR Clock Range between 35-60 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div26;
8006378: 69fb ldr r3, [r7, #28]
800637a: f043 030c orr.w r3, r3, #12
800637e: 61fb str r3, [r7, #28]
8006380: e01a b.n 80063b8 <HAL_ETH_Init+0x148>
}
else if((hclk >= 60000000)&&(hclk < 100000000))
8006382: 69bb ldr r3, [r7, #24]
8006384: 4a6d ldr r2, [pc, #436] ; (800653c <HAL_ETH_Init+0x2cc>)
8006386: 4293 cmp r3, r2
8006388: d903 bls.n 8006392 <HAL_ETH_Init+0x122>
800638a: 69bb ldr r3, [r7, #24]
800638c: 4a6c ldr r2, [pc, #432] ; (8006540 <HAL_ETH_Init+0x2d0>)
800638e: 4293 cmp r3, r2
8006390: d911 bls.n 80063b6 <HAL_ETH_Init+0x146>
{
/* CSR Clock Range between 60-100 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
}
else if((hclk >= 100000000)&&(hclk < 150000000))
8006392: 69bb ldr r3, [r7, #24]
8006394: 4a6a ldr r2, [pc, #424] ; (8006540 <HAL_ETH_Init+0x2d0>)
8006396: 4293 cmp r3, r2
8006398: d908 bls.n 80063ac <HAL_ETH_Init+0x13c>
800639a: 69bb ldr r3, [r7, #24]
800639c: 4a69 ldr r2, [pc, #420] ; (8006544 <HAL_ETH_Init+0x2d4>)
800639e: 4293 cmp r3, r2
80063a0: d804 bhi.n 80063ac <HAL_ETH_Init+0x13c>
{
/* CSR Clock Range between 100-150 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div62;
80063a2: 69fb ldr r3, [r7, #28]
80063a4: f043 0304 orr.w r3, r3, #4
80063a8: 61fb str r3, [r7, #28]
80063aa: e005 b.n 80063b8 <HAL_ETH_Init+0x148>
}
else /* ((hclk >= 150000000)&&(hclk <= 216000000)) */
{
/* CSR Clock Range between 150-216 MHz */
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div102;
80063ac: 69fb ldr r3, [r7, #28]
80063ae: f043 0310 orr.w r3, r3, #16
80063b2: 61fb str r3, [r7, #28]
80063b4: e000 b.n 80063b8 <HAL_ETH_Init+0x148>
tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div42;
80063b6: bf00 nop
}
/* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */
(heth->Instance)->MACMIIAR = (uint32_t)tempreg;
80063b8: 687b ldr r3, [r7, #4]
80063ba: 681b ldr r3, [r3, #0]
80063bc: 69fa ldr r2, [r7, #28]
80063be: 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)
80063c0: f44f 4200 mov.w r2, #32768 ; 0x8000
80063c4: 2100 movs r1, #0
80063c6: 6878 ldr r0, [r7, #4]
80063c8: f000 fc19 bl 8006bfe <HAL_ETH_WritePHYRegister>
80063cc: 4603 mov r3, r0
80063ce: 2b00 cmp r3, #0
80063d0: d00b beq.n 80063ea <HAL_ETH_Init+0x17a>
{
/* In case of write timeout */
err = ETH_ERROR;
80063d2: 2301 movs r3, #1
80063d4: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
80063d6: 6939 ldr r1, [r7, #16]
80063d8: 6878 ldr r0, [r7, #4]
80063da: f000 fdcf bl 8006f7c <ETH_MACDMAConfig>
/* Set the ETH peripheral state to READY */
heth->State = HAL_ETH_STATE_READY;
80063de: 687b ldr r3, [r7, #4]
80063e0: 2201 movs r2, #1
80063e2: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return HAL_ERROR */
return HAL_ERROR;
80063e6: 2301 movs r3, #1
80063e8: e0d9 b.n 800659e <HAL_ETH_Init+0x32e>
}
/* Delay to assure PHY reset */
HAL_Delay(PHY_RESET_DELAY);
80063ea: 20ff movs r0, #255 ; 0xff
80063ec: f7fe fc62 bl 8004cb4 <HAL_Delay>
if((heth->Init).AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE)
80063f0: 687b ldr r3, [r7, #4]
80063f2: 685b ldr r3, [r3, #4]
80063f4: 2b00 cmp r3, #0
80063f6: f000 80a7 beq.w 8006548 <HAL_ETH_Init+0x2d8>
{
/* Get tick */
tickstart = HAL_GetTick();
80063fa: f7fe fc4f bl 8004c9c <HAL_GetTick>
80063fe: 6178 str r0, [r7, #20]
/* We wait for linked status */
do
{
HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg);
8006400: f107 030c add.w r3, r7, #12
8006404: 461a mov r2, r3
8006406: 2101 movs r1, #1
8006408: 6878 ldr r0, [r7, #4]
800640a: f000 fb90 bl 8006b2e <HAL_ETH_ReadPHYRegister>
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_LINKED_STATE)
800640e: f7fe fc45 bl 8004c9c <HAL_GetTick>
8006412: 4602 mov r2, r0
8006414: 697b ldr r3, [r7, #20]
8006416: 1ad3 subs r3, r2, r3
8006418: f241 3288 movw r2, #5000 ; 0x1388
800641c: 4293 cmp r3, r2
800641e: d90f bls.n 8006440 <HAL_ETH_Init+0x1d0>
{
/* In case of write timeout */
err = ETH_ERROR;
8006420: 2301 movs r3, #1
8006422: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006424: 6939 ldr r1, [r7, #16]
8006426: 6878 ldr r0, [r7, #4]
8006428: f000 fda8 bl 8006f7c <ETH_MACDMAConfig>
heth->State= HAL_ETH_STATE_READY;
800642c: 687b ldr r3, [r7, #4]
800642e: 2201 movs r2, #1
8006430: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006434: 687b ldr r3, [r7, #4]
8006436: 2200 movs r2, #0
8006438: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_TIMEOUT;
800643c: 2303 movs r3, #3
800643e: e0ae b.n 800659e <HAL_ETH_Init+0x32e>
}
} while (((phyreg & PHY_LINKED_STATUS) != PHY_LINKED_STATUS));
8006440: 68fb ldr r3, [r7, #12]
8006442: f003 0304 and.w r3, r3, #4
8006446: 2b00 cmp r3, #0
8006448: d0da beq.n 8006400 <HAL_ETH_Init+0x190>
/* Enable Auto-Negotiation */
if((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_AUTONEGOTIATION)) != HAL_OK)
800644a: f44f 5280 mov.w r2, #4096 ; 0x1000
800644e: 2100 movs r1, #0
8006450: 6878 ldr r0, [r7, #4]
8006452: f000 fbd4 bl 8006bfe <HAL_ETH_WritePHYRegister>
8006456: 4603 mov r3, r0
8006458: 2b00 cmp r3, #0
800645a: d00b beq.n 8006474 <HAL_ETH_Init+0x204>
{
/* In case of write timeout */
err = ETH_ERROR;
800645c: 2301 movs r3, #1
800645e: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006460: 6939 ldr r1, [r7, #16]
8006462: 6878 ldr r0, [r7, #4]
8006464: f000 fd8a bl 8006f7c <ETH_MACDMAConfig>
/* Set the ETH peripheral state to READY */
heth->State = HAL_ETH_STATE_READY;
8006468: 687b ldr r3, [r7, #4]
800646a: 2201 movs r2, #1
800646c: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return HAL_ERROR */
return HAL_ERROR;
8006470: 2301 movs r3, #1
8006472: e094 b.n 800659e <HAL_ETH_Init+0x32e>
}
/* Get tick */
tickstart = HAL_GetTick();
8006474: f7fe fc12 bl 8004c9c <HAL_GetTick>
8006478: 6178 str r0, [r7, #20]
/* Wait until the auto-negotiation will be completed */
do
{
HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg);
800647a: f107 030c add.w r3, r7, #12
800647e: 461a mov r2, r3
8006480: 2101 movs r1, #1
8006482: 6878 ldr r0, [r7, #4]
8006484: f000 fb53 bl 8006b2e <HAL_ETH_ReadPHYRegister>
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_AUTONEGO_COMPLETED)
8006488: f7fe fc08 bl 8004c9c <HAL_GetTick>
800648c: 4602 mov r2, r0
800648e: 697b ldr r3, [r7, #20]
8006490: 1ad3 subs r3, r2, r3
8006492: f241 3288 movw r2, #5000 ; 0x1388
8006496: 4293 cmp r3, r2
8006498: d90f bls.n 80064ba <HAL_ETH_Init+0x24a>
{
/* In case of write timeout */
err = ETH_ERROR;
800649a: 2301 movs r3, #1
800649c: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
800649e: 6939 ldr r1, [r7, #16]
80064a0: 6878 ldr r0, [r7, #4]
80064a2: f000 fd6b bl 8006f7c <ETH_MACDMAConfig>
heth->State= HAL_ETH_STATE_READY;
80064a6: 687b ldr r3, [r7, #4]
80064a8: 2201 movs r2, #1
80064aa: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
80064ae: 687b ldr r3, [r7, #4]
80064b0: 2200 movs r2, #0
80064b2: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_TIMEOUT;
80064b6: 2303 movs r3, #3
80064b8: e071 b.n 800659e <HAL_ETH_Init+0x32e>
}
} while (((phyreg & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE));
80064ba: 68fb ldr r3, [r7, #12]
80064bc: f003 0320 and.w r3, r3, #32
80064c0: 2b00 cmp r3, #0
80064c2: d0da beq.n 800647a <HAL_ETH_Init+0x20a>
/* Read the result of the auto-negotiation */
if((HAL_ETH_ReadPHYRegister(heth, PHY_SR, &phyreg)) != HAL_OK)
80064c4: f107 030c add.w r3, r7, #12
80064c8: 461a mov r2, r3
80064ca: 211f movs r1, #31
80064cc: 6878 ldr r0, [r7, #4]
80064ce: f000 fb2e bl 8006b2e <HAL_ETH_ReadPHYRegister>
80064d2: 4603 mov r3, r0
80064d4: 2b00 cmp r3, #0
80064d6: d00b beq.n 80064f0 <HAL_ETH_Init+0x280>
{
/* In case of write timeout */
err = ETH_ERROR;
80064d8: 2301 movs r3, #1
80064da: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
80064dc: 6939 ldr r1, [r7, #16]
80064de: 6878 ldr r0, [r7, #4]
80064e0: f000 fd4c bl 8006f7c <ETH_MACDMAConfig>
/* Set the ETH peripheral state to READY */
heth->State = HAL_ETH_STATE_READY;
80064e4: 687b ldr r3, [r7, #4]
80064e6: 2201 movs r2, #1
80064e8: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return HAL_ERROR */
return HAL_ERROR;
80064ec: 2301 movs r3, #1
80064ee: e056 b.n 800659e <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)
80064f0: 68fb ldr r3, [r7, #12]
80064f2: f003 0310 and.w r3, r3, #16
80064f6: 2b00 cmp r3, #0
80064f8: d004 beq.n 8006504 <HAL_ETH_Init+0x294>
{
/* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */
(heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX;
80064fa: 687b ldr r3, [r7, #4]
80064fc: f44f 6200 mov.w r2, #2048 ; 0x800
8006500: 60da str r2, [r3, #12]
8006502: e002 b.n 800650a <HAL_ETH_Init+0x29a>
}
else
{
/* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */
(heth->Init).DuplexMode = ETH_MODE_HALFDUPLEX;
8006504: 687b ldr r3, [r7, #4]
8006506: 2200 movs r2, #0
8006508: 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)
800650a: 68fb ldr r3, [r7, #12]
800650c: f003 0304 and.w r3, r3, #4
8006510: 2b00 cmp r3, #0
8006512: d003 beq.n 800651c <HAL_ETH_Init+0x2ac>
{
/* Set Ethernet speed to 10M following the auto-negotiation */
(heth->Init).Speed = ETH_SPEED_10M;
8006514: 687b ldr r3, [r7, #4]
8006516: 2200 movs r2, #0
8006518: 609a str r2, [r3, #8]
800651a: e037 b.n 800658c <HAL_ETH_Init+0x31c>
}
else
{
/* Set Ethernet speed to 100M following the auto-negotiation */
(heth->Init).Speed = ETH_SPEED_100M;
800651c: 687b ldr r3, [r7, #4]
800651e: f44f 4280 mov.w r2, #16384 ; 0x4000
8006522: 609a str r2, [r3, #8]
8006524: e032 b.n 800658c <HAL_ETH_Init+0x31c>
8006526: bf00 nop
8006528: 03938700 .word 0x03938700
800652c: 40023800 .word 0x40023800
8006530: 40013800 .word 0x40013800
8006534: 01312cff .word 0x01312cff
8006538: 02160ebf .word 0x02160ebf
800653c: 039386ff .word 0x039386ff
8006540: 05f5e0ff .word 0x05f5e0ff
8006544: 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) |
8006548: 687b ldr r3, [r7, #4]
800654a: 68db ldr r3, [r3, #12]
800654c: 08db lsrs r3, r3, #3
800654e: b29a uxth r2, r3
(uint16_t)((heth->Init).Speed >> 1))) != HAL_OK)
8006550: 687b ldr r3, [r7, #4]
8006552: 689b ldr r3, [r3, #8]
8006554: 085b lsrs r3, r3, #1
8006556: b29b uxth r3, r3
if(HAL_ETH_WritePHYRegister(heth, PHY_BCR, ((uint16_t)((heth->Init).DuplexMode >> 3) |
8006558: 4313 orrs r3, r2
800655a: b29b uxth r3, r3
800655c: 461a mov r2, r3
800655e: 2100 movs r1, #0
8006560: 6878 ldr r0, [r7, #4]
8006562: f000 fb4c bl 8006bfe <HAL_ETH_WritePHYRegister>
8006566: 4603 mov r3, r0
8006568: 2b00 cmp r3, #0
800656a: d00b beq.n 8006584 <HAL_ETH_Init+0x314>
{
/* In case of write timeout */
err = ETH_ERROR;
800656c: 2301 movs r3, #1
800656e: 613b str r3, [r7, #16]
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
8006570: 6939 ldr r1, [r7, #16]
8006572: 6878 ldr r0, [r7, #4]
8006574: f000 fd02 bl 8006f7c <ETH_MACDMAConfig>
/* Set the ETH peripheral state to READY */
heth->State = HAL_ETH_STATE_READY;
8006578: 687b ldr r3, [r7, #4]
800657a: 2201 movs r2, #1
800657c: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return HAL_ERROR */
return HAL_ERROR;
8006580: 2301 movs r3, #1
8006582: e00c b.n 800659e <HAL_ETH_Init+0x32e>
}
/* Delay to assure PHY configuration */
HAL_Delay(PHY_CONFIG_DELAY);
8006584: f640 70ff movw r0, #4095 ; 0xfff
8006588: f7fe fb94 bl 8004cb4 <HAL_Delay>
}
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
800658c: 6939 ldr r1, [r7, #16]
800658e: 6878 ldr r0, [r7, #4]
8006590: f000 fcf4 bl 8006f7c <ETH_MACDMAConfig>
/* Set ETH HAL State to Ready */
heth->State= HAL_ETH_STATE_READY;
8006594: 687b ldr r3, [r7, #4]
8006596: 2201 movs r2, #1
8006598: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return function status */
return HAL_OK;
800659c: 2300 movs r3, #0
}
800659e: 4618 mov r0, r3
80065a0: 3720 adds r7, #32
80065a2: 46bd mov sp, r7
80065a4: bd80 pop {r7, pc}
80065a6: bf00 nop
080065a8 <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)
{
80065a8: b480 push {r7}
80065aa: b087 sub sp, #28
80065ac: af00 add r7, sp, #0
80065ae: 60f8 str r0, [r7, #12]
80065b0: 60b9 str r1, [r7, #8]
80065b2: 607a str r2, [r7, #4]
80065b4: 603b str r3, [r7, #0]
uint32_t i = 0;
80065b6: 2300 movs r3, #0
80065b8: 617b str r3, [r7, #20]
ETH_DMADescTypeDef *dmatxdesc;
/* Process Locked */
__HAL_LOCK(heth);
80065ba: 68fb ldr r3, [r7, #12]
80065bc: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
80065c0: 2b01 cmp r3, #1
80065c2: d101 bne.n 80065c8 <HAL_ETH_DMATxDescListInit+0x20>
80065c4: 2302 movs r3, #2
80065c6: e052 b.n 800666e <HAL_ETH_DMATxDescListInit+0xc6>
80065c8: 68fb ldr r3, [r7, #12]
80065ca: 2201 movs r2, #1
80065cc: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
80065d0: 68fb ldr r3, [r7, #12]
80065d2: 2202 movs r2, #2
80065d4: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */
heth->TxDesc = DMATxDescTab;
80065d8: 68fb ldr r3, [r7, #12]
80065da: 68ba ldr r2, [r7, #8]
80065dc: 62da str r2, [r3, #44] ; 0x2c
/* Fill each DMATxDesc descriptor with the right values */
for(i=0; i < TxBuffCount; i++)
80065de: 2300 movs r3, #0
80065e0: 617b str r3, [r7, #20]
80065e2: e030 b.n 8006646 <HAL_ETH_DMATxDescListInit+0x9e>
{
/* Get the pointer on the ith member of the Tx Desc list */
dmatxdesc = DMATxDescTab + i;
80065e4: 697b ldr r3, [r7, #20]
80065e6: 015b lsls r3, r3, #5
80065e8: 68ba ldr r2, [r7, #8]
80065ea: 4413 add r3, r2
80065ec: 613b str r3, [r7, #16]
/* Set Second Address Chained bit */
dmatxdesc->Status = ETH_DMATXDESC_TCH;
80065ee: 693b ldr r3, [r7, #16]
80065f0: f44f 1280 mov.w r2, #1048576 ; 0x100000
80065f4: 601a str r2, [r3, #0]
/* Set Buffer1 address pointer */
dmatxdesc->Buffer1Addr = (uint32_t)(&TxBuff[i*ETH_TX_BUF_SIZE]);
80065f6: 697b ldr r3, [r7, #20]
80065f8: f240 52f4 movw r2, #1524 ; 0x5f4
80065fc: fb02 f303 mul.w r3, r2, r3
8006600: 687a ldr r2, [r7, #4]
8006602: 4413 add r3, r2
8006604: 461a mov r2, r3
8006606: 693b ldr r3, [r7, #16]
8006608: 609a str r2, [r3, #8]
if ((heth->Init).ChecksumMode == ETH_CHECKSUM_BY_HARDWARE)
800660a: 68fb ldr r3, [r7, #12]
800660c: 69db ldr r3, [r3, #28]
800660e: 2b00 cmp r3, #0
8006610: d105 bne.n 800661e <HAL_ETH_DMATxDescListInit+0x76>
{
/* Set the DMA Tx descriptors checksum insertion */
dmatxdesc->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL;
8006612: 693b ldr r3, [r7, #16]
8006614: 681b ldr r3, [r3, #0]
8006616: f443 0240 orr.w r2, r3, #12582912 ; 0xc00000
800661a: 693b ldr r3, [r7, #16]
800661c: 601a str r2, [r3, #0]
}
/* Initialize the next descriptor with the Next Descriptor Polling Enable */
if(i < (TxBuffCount-1))
800661e: 683b ldr r3, [r7, #0]
8006620: 3b01 subs r3, #1
8006622: 697a ldr r2, [r7, #20]
8006624: 429a cmp r2, r3
8006626: d208 bcs.n 800663a <HAL_ETH_DMATxDescListInit+0x92>
{
/* Set next descriptor address register with next descriptor base address */
dmatxdesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab+i+1);
8006628: 697b ldr r3, [r7, #20]
800662a: 3301 adds r3, #1
800662c: 015b lsls r3, r3, #5
800662e: 68ba ldr r2, [r7, #8]
8006630: 4413 add r3, r2
8006632: 461a mov r2, r3
8006634: 693b ldr r3, [r7, #16]
8006636: 60da str r2, [r3, #12]
8006638: e002 b.n 8006640 <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;
800663a: 68ba ldr r2, [r7, #8]
800663c: 693b ldr r3, [r7, #16]
800663e: 60da str r2, [r3, #12]
for(i=0; i < TxBuffCount; i++)
8006640: 697b ldr r3, [r7, #20]
8006642: 3301 adds r3, #1
8006644: 617b str r3, [r7, #20]
8006646: 697a ldr r2, [r7, #20]
8006648: 683b ldr r3, [r7, #0]
800664a: 429a cmp r2, r3
800664c: d3ca bcc.n 80065e4 <HAL_ETH_DMATxDescListInit+0x3c>
}
}
/* Set Transmit Descriptor List Address Register */
(heth->Instance)->DMATDLAR = (uint32_t) DMATxDescTab;
800664e: 68fb ldr r3, [r7, #12]
8006650: 6819 ldr r1, [r3, #0]
8006652: 68ba ldr r2, [r7, #8]
8006654: f241 0310 movw r3, #4112 ; 0x1010
8006658: 440b add r3, r1
800665a: 601a str r2, [r3, #0]
/* Set ETH HAL State to Ready */
heth->State= HAL_ETH_STATE_READY;
800665c: 68fb ldr r3, [r7, #12]
800665e: 2201 movs r2, #1
8006660: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006664: 68fb ldr r3, [r7, #12]
8006666: 2200 movs r2, #0
8006668: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
800666c: 2300 movs r3, #0
}
800666e: 4618 mov r0, r3
8006670: 371c adds r7, #28
8006672: 46bd mov sp, r7
8006674: f85d 7b04 ldr.w r7, [sp], #4
8006678: 4770 bx lr
0800667a <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)
{
800667a: b480 push {r7}
800667c: b087 sub sp, #28
800667e: af00 add r7, sp, #0
8006680: 60f8 str r0, [r7, #12]
8006682: 60b9 str r1, [r7, #8]
8006684: 607a str r2, [r7, #4]
8006686: 603b str r3, [r7, #0]
uint32_t i = 0;
8006688: 2300 movs r3, #0
800668a: 617b str r3, [r7, #20]
ETH_DMADescTypeDef *DMARxDesc;
/* Process Locked */
__HAL_LOCK(heth);
800668c: 68fb ldr r3, [r7, #12]
800668e: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006692: 2b01 cmp r3, #1
8006694: d101 bne.n 800669a <HAL_ETH_DMARxDescListInit+0x20>
8006696: 2302 movs r3, #2
8006698: e056 b.n 8006748 <HAL_ETH_DMARxDescListInit+0xce>
800669a: 68fb ldr r3, [r7, #12]
800669c: 2201 movs r2, #1
800669e: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
80066a2: 68fb ldr r3, [r7, #12]
80066a4: 2202 movs r2, #2
80066a6: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Set the Ethernet RxDesc pointer with the first one of the DMARxDescTab list */
heth->RxDesc = DMARxDescTab;
80066aa: 68fb ldr r3, [r7, #12]
80066ac: 68ba ldr r2, [r7, #8]
80066ae: 629a str r2, [r3, #40] ; 0x28
/* Fill each DMARxDesc descriptor with the right values */
for(i=0; i < RxBuffCount; i++)
80066b0: 2300 movs r3, #0
80066b2: 617b str r3, [r7, #20]
80066b4: e034 b.n 8006720 <HAL_ETH_DMARxDescListInit+0xa6>
{
/* Get the pointer on the ith member of the Rx Desc list */
DMARxDesc = DMARxDescTab+i;
80066b6: 697b ldr r3, [r7, #20]
80066b8: 015b lsls r3, r3, #5
80066ba: 68ba ldr r2, [r7, #8]
80066bc: 4413 add r3, r2
80066be: 613b str r3, [r7, #16]
/* Set Own bit of the Rx descriptor Status */
DMARxDesc->Status = ETH_DMARXDESC_OWN;
80066c0: 693b ldr r3, [r7, #16]
80066c2: f04f 4200 mov.w r2, #2147483648 ; 0x80000000
80066c6: 601a str r2, [r3, #0]
/* Set Buffer1 size and Second Address Chained bit */
DMARxDesc->ControlBufferSize = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE;
80066c8: 693b ldr r3, [r7, #16]
80066ca: f244 52f4 movw r2, #17908 ; 0x45f4
80066ce: 605a str r2, [r3, #4]
/* Set Buffer1 address pointer */
DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i*ETH_RX_BUF_SIZE]);
80066d0: 697b ldr r3, [r7, #20]
80066d2: f240 52f4 movw r2, #1524 ; 0x5f4
80066d6: fb02 f303 mul.w r3, r2, r3
80066da: 687a ldr r2, [r7, #4]
80066dc: 4413 add r3, r2
80066de: 461a mov r2, r3
80066e0: 693b ldr r3, [r7, #16]
80066e2: 609a str r2, [r3, #8]
if((heth->Init).RxMode == ETH_RXINTERRUPT_MODE)
80066e4: 68fb ldr r3, [r7, #12]
80066e6: 699b ldr r3, [r3, #24]
80066e8: 2b01 cmp r3, #1
80066ea: d105 bne.n 80066f8 <HAL_ETH_DMARxDescListInit+0x7e>
{
/* Enable Ethernet DMA Rx Descriptor interrupt */
DMARxDesc->ControlBufferSize &= ~ETH_DMARXDESC_DIC;
80066ec: 693b ldr r3, [r7, #16]
80066ee: 685b ldr r3, [r3, #4]
80066f0: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000
80066f4: 693b ldr r3, [r7, #16]
80066f6: 605a str r2, [r3, #4]
}
/* Initialize the next descriptor with the Next Descriptor Polling Enable */
if(i < (RxBuffCount-1))
80066f8: 683b ldr r3, [r7, #0]
80066fa: 3b01 subs r3, #1
80066fc: 697a ldr r2, [r7, #20]
80066fe: 429a cmp r2, r3
8006700: d208 bcs.n 8006714 <HAL_ETH_DMARxDescListInit+0x9a>
{
/* Set next descriptor address register with next descriptor base address */
DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab+i+1);
8006702: 697b ldr r3, [r7, #20]
8006704: 3301 adds r3, #1
8006706: 015b lsls r3, r3, #5
8006708: 68ba ldr r2, [r7, #8]
800670a: 4413 add r3, r2
800670c: 461a mov r2, r3
800670e: 693b ldr r3, [r7, #16]
8006710: 60da str r2, [r3, #12]
8006712: e002 b.n 800671a <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);
8006714: 68ba ldr r2, [r7, #8]
8006716: 693b ldr r3, [r7, #16]
8006718: 60da str r2, [r3, #12]
for(i=0; i < RxBuffCount; i++)
800671a: 697b ldr r3, [r7, #20]
800671c: 3301 adds r3, #1
800671e: 617b str r3, [r7, #20]
8006720: 697a ldr r2, [r7, #20]
8006722: 683b ldr r3, [r7, #0]
8006724: 429a cmp r2, r3
8006726: d3c6 bcc.n 80066b6 <HAL_ETH_DMARxDescListInit+0x3c>
}
}
/* Set Receive Descriptor List Address Register */
(heth->Instance)->DMARDLAR = (uint32_t) DMARxDescTab;
8006728: 68fb ldr r3, [r7, #12]
800672a: 6819 ldr r1, [r3, #0]
800672c: 68ba ldr r2, [r7, #8]
800672e: f241 030c movw r3, #4108 ; 0x100c
8006732: 440b add r3, r1
8006734: 601a str r2, [r3, #0]
/* Set ETH HAL State to Ready */
heth->State= HAL_ETH_STATE_READY;
8006736: 68fb ldr r3, [r7, #12]
8006738: 2201 movs r2, #1
800673a: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
800673e: 68fb ldr r3, [r7, #12]
8006740: 2200 movs r2, #0
8006742: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006746: 2300 movs r3, #0
}
8006748: 4618 mov r0, r3
800674a: 371c adds r7, #28
800674c: 46bd mov sp, r7
800674e: f85d 7b04 ldr.w r7, [sp], #4
8006752: 4770 bx lr
08006754 <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)
{
8006754: b480 push {r7}
8006756: b087 sub sp, #28
8006758: af00 add r7, sp, #0
800675a: 6078 str r0, [r7, #4]
800675c: 6039 str r1, [r7, #0]
uint32_t bufcount = 0, size = 0, i = 0;
800675e: 2300 movs r3, #0
8006760: 617b str r3, [r7, #20]
8006762: 2300 movs r3, #0
8006764: 60fb str r3, [r7, #12]
8006766: 2300 movs r3, #0
8006768: 613b str r3, [r7, #16]
/* Process Locked */
__HAL_LOCK(heth);
800676a: 687b ldr r3, [r7, #4]
800676c: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006770: 2b01 cmp r3, #1
8006772: d101 bne.n 8006778 <HAL_ETH_TransmitFrame+0x24>
8006774: 2302 movs r3, #2
8006776: e0cd b.n 8006914 <HAL_ETH_TransmitFrame+0x1c0>
8006778: 687b ldr r3, [r7, #4]
800677a: 2201 movs r2, #1
800677c: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
8006780: 687b ldr r3, [r7, #4]
8006782: 2202 movs r2, #2
8006784: f883 2044 strb.w r2, [r3, #68] ; 0x44
if (FrameLength == 0)
8006788: 683b ldr r3, [r7, #0]
800678a: 2b00 cmp r3, #0
800678c: d109 bne.n 80067a2 <HAL_ETH_TransmitFrame+0x4e>
{
/* Set ETH HAL state to READY */
heth->State = HAL_ETH_STATE_READY;
800678e: 687b ldr r3, [r7, #4]
8006790: 2201 movs r2, #1
8006792: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006796: 687b ldr r3, [r7, #4]
8006798: 2200 movs r2, #0
800679a: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_ERROR;
800679e: 2301 movs r3, #1
80067a0: e0b8 b.n 8006914 <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)
80067a2: 687b ldr r3, [r7, #4]
80067a4: 6adb ldr r3, [r3, #44] ; 0x2c
80067a6: 681b ldr r3, [r3, #0]
80067a8: 2b00 cmp r3, #0
80067aa: da09 bge.n 80067c0 <HAL_ETH_TransmitFrame+0x6c>
{
/* OWN bit set */
heth->State = HAL_ETH_STATE_BUSY_TX;
80067ac: 687b ldr r3, [r7, #4]
80067ae: 2212 movs r2, #18
80067b0: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
80067b4: 687b ldr r3, [r7, #4]
80067b6: 2200 movs r2, #0
80067b8: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_ERROR;
80067bc: 2301 movs r3, #1
80067be: e0a9 b.n 8006914 <HAL_ETH_TransmitFrame+0x1c0>
}
/* Get the number of needed Tx buffers for the current frame */
if (FrameLength > ETH_TX_BUF_SIZE)
80067c0: 683b ldr r3, [r7, #0]
80067c2: f240 52f4 movw r2, #1524 ; 0x5f4
80067c6: 4293 cmp r3, r2
80067c8: d915 bls.n 80067f6 <HAL_ETH_TransmitFrame+0xa2>
{
bufcount = FrameLength/ETH_TX_BUF_SIZE;
80067ca: 683b ldr r3, [r7, #0]
80067cc: 4a54 ldr r2, [pc, #336] ; (8006920 <HAL_ETH_TransmitFrame+0x1cc>)
80067ce: fba2 2303 umull r2, r3, r2, r3
80067d2: 0a9b lsrs r3, r3, #10
80067d4: 617b str r3, [r7, #20]
if (FrameLength % ETH_TX_BUF_SIZE)
80067d6: 683a ldr r2, [r7, #0]
80067d8: 4b51 ldr r3, [pc, #324] ; (8006920 <HAL_ETH_TransmitFrame+0x1cc>)
80067da: fba3 1302 umull r1, r3, r3, r2
80067de: 0a9b lsrs r3, r3, #10
80067e0: f240 51f4 movw r1, #1524 ; 0x5f4
80067e4: fb01 f303 mul.w r3, r1, r3
80067e8: 1ad3 subs r3, r2, r3
80067ea: 2b00 cmp r3, #0
80067ec: d005 beq.n 80067fa <HAL_ETH_TransmitFrame+0xa6>
{
bufcount++;
80067ee: 697b ldr r3, [r7, #20]
80067f0: 3301 adds r3, #1
80067f2: 617b str r3, [r7, #20]
80067f4: e001 b.n 80067fa <HAL_ETH_TransmitFrame+0xa6>
}
}
else
{
bufcount = 1;
80067f6: 2301 movs r3, #1
80067f8: 617b str r3, [r7, #20]
}
if (bufcount == 1)
80067fa: 697b ldr r3, [r7, #20]
80067fc: 2b01 cmp r3, #1
80067fe: d11c bne.n 800683a <HAL_ETH_TransmitFrame+0xe6>
{
/* Set LAST and FIRST segment */
heth->TxDesc->Status |=ETH_DMATXDESC_FS|ETH_DMATXDESC_LS;
8006800: 687b ldr r3, [r7, #4]
8006802: 6adb ldr r3, [r3, #44] ; 0x2c
8006804: 681a ldr r2, [r3, #0]
8006806: 687b ldr r3, [r7, #4]
8006808: 6adb ldr r3, [r3, #44] ; 0x2c
800680a: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000
800680e: 601a str r2, [r3, #0]
/* Set frame size */
heth->TxDesc->ControlBufferSize = (FrameLength & ETH_DMATXDESC_TBS1);
8006810: 687b ldr r3, [r7, #4]
8006812: 6adb ldr r3, [r3, #44] ; 0x2c
8006814: 683a ldr r2, [r7, #0]
8006816: f3c2 020c ubfx r2, r2, #0, #13
800681a: 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;
800681c: 687b ldr r3, [r7, #4]
800681e: 6adb ldr r3, [r3, #44] ; 0x2c
8006820: 681a ldr r2, [r3, #0]
8006822: 687b ldr r3, [r7, #4]
8006824: 6adb ldr r3, [r3, #44] ; 0x2c
8006826: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000
800682a: 601a str r2, [r3, #0]
/* Point to next descriptor */
heth->TxDesc= (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr);
800682c: 687b ldr r3, [r7, #4]
800682e: 6adb ldr r3, [r3, #44] ; 0x2c
8006830: 68db ldr r3, [r3, #12]
8006832: 461a mov r2, r3
8006834: 687b ldr r3, [r7, #4]
8006836: 62da str r2, [r3, #44] ; 0x2c
8006838: e04b b.n 80068d2 <HAL_ETH_TransmitFrame+0x17e>
}
else
{
for (i=0; i< bufcount; i++)
800683a: 2300 movs r3, #0
800683c: 613b str r3, [r7, #16]
800683e: e044 b.n 80068ca <HAL_ETH_TransmitFrame+0x176>
{
/* Clear FIRST and LAST segment bits */
heth->TxDesc->Status &= ~(ETH_DMATXDESC_FS | ETH_DMATXDESC_LS);
8006840: 687b ldr r3, [r7, #4]
8006842: 6adb ldr r3, [r3, #44] ; 0x2c
8006844: 681a ldr r2, [r3, #0]
8006846: 687b ldr r3, [r7, #4]
8006848: 6adb ldr r3, [r3, #44] ; 0x2c
800684a: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000
800684e: 601a str r2, [r3, #0]
if (i == 0)
8006850: 693b ldr r3, [r7, #16]
8006852: 2b00 cmp r3, #0
8006854: d107 bne.n 8006866 <HAL_ETH_TransmitFrame+0x112>
{
/* Setting the first segment bit */
heth->TxDesc->Status |= ETH_DMATXDESC_FS;
8006856: 687b ldr r3, [r7, #4]
8006858: 6adb ldr r3, [r3, #44] ; 0x2c
800685a: 681a ldr r2, [r3, #0]
800685c: 687b ldr r3, [r7, #4]
800685e: 6adb ldr r3, [r3, #44] ; 0x2c
8006860: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000
8006864: 601a str r2, [r3, #0]
}
/* Program size */
heth->TxDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATXDESC_TBS1);
8006866: 687b ldr r3, [r7, #4]
8006868: 6adb ldr r3, [r3, #44] ; 0x2c
800686a: f240 52f4 movw r2, #1524 ; 0x5f4
800686e: 605a str r2, [r3, #4]
if (i == (bufcount-1))
8006870: 697b ldr r3, [r7, #20]
8006872: 3b01 subs r3, #1
8006874: 693a ldr r2, [r7, #16]
8006876: 429a cmp r2, r3
8006878: d116 bne.n 80068a8 <HAL_ETH_TransmitFrame+0x154>
{
/* Setting the last segment bit */
heth->TxDesc->Status |= ETH_DMATXDESC_LS;
800687a: 687b ldr r3, [r7, #4]
800687c: 6adb ldr r3, [r3, #44] ; 0x2c
800687e: 681a ldr r2, [r3, #0]
8006880: 687b ldr r3, [r7, #4]
8006882: 6adb ldr r3, [r3, #44] ; 0x2c
8006884: f042 5200 orr.w r2, r2, #536870912 ; 0x20000000
8006888: 601a str r2, [r3, #0]
size = FrameLength - (bufcount-1)*ETH_TX_BUF_SIZE;
800688a: 697b ldr r3, [r7, #20]
800688c: 4a25 ldr r2, [pc, #148] ; (8006924 <HAL_ETH_TransmitFrame+0x1d0>)
800688e: fb02 f203 mul.w r2, r2, r3
8006892: 683b ldr r3, [r7, #0]
8006894: 4413 add r3, r2
8006896: f203 53f4 addw r3, r3, #1524 ; 0x5f4
800689a: 60fb str r3, [r7, #12]
heth->TxDesc->ControlBufferSize = (size & ETH_DMATXDESC_TBS1);
800689c: 687b ldr r3, [r7, #4]
800689e: 6adb ldr r3, [r3, #44] ; 0x2c
80068a0: 68fa ldr r2, [r7, #12]
80068a2: f3c2 020c ubfx r2, r2, #0, #13
80068a6: 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;
80068a8: 687b ldr r3, [r7, #4]
80068aa: 6adb ldr r3, [r3, #44] ; 0x2c
80068ac: 681a ldr r2, [r3, #0]
80068ae: 687b ldr r3, [r7, #4]
80068b0: 6adb ldr r3, [r3, #44] ; 0x2c
80068b2: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000
80068b6: 601a str r2, [r3, #0]
/* point to next descriptor */
heth->TxDesc = (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr);
80068b8: 687b ldr r3, [r7, #4]
80068ba: 6adb ldr r3, [r3, #44] ; 0x2c
80068bc: 68db ldr r3, [r3, #12]
80068be: 461a mov r2, r3
80068c0: 687b ldr r3, [r7, #4]
80068c2: 62da str r2, [r3, #44] ; 0x2c
for (i=0; i< bufcount; i++)
80068c4: 693b ldr r3, [r7, #16]
80068c6: 3301 adds r3, #1
80068c8: 613b str r3, [r7, #16]
80068ca: 693a ldr r2, [r7, #16]
80068cc: 697b ldr r3, [r7, #20]
80068ce: 429a cmp r2, r3
80068d0: d3b6 bcc.n 8006840 <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)
80068d2: 687b ldr r3, [r7, #4]
80068d4: 681a ldr r2, [r3, #0]
80068d6: f241 0314 movw r3, #4116 ; 0x1014
80068da: 4413 add r3, r2
80068dc: 681b ldr r3, [r3, #0]
80068de: f003 0304 and.w r3, r3, #4
80068e2: 2b00 cmp r3, #0
80068e4: d00d beq.n 8006902 <HAL_ETH_TransmitFrame+0x1ae>
{
/* Clear TBUS ETHERNET DMA flag */
(heth->Instance)->DMASR = ETH_DMASR_TBUS;
80068e6: 687b ldr r3, [r7, #4]
80068e8: 681a ldr r2, [r3, #0]
80068ea: f241 0314 movw r3, #4116 ; 0x1014
80068ee: 4413 add r3, r2
80068f0: 2204 movs r2, #4
80068f2: 601a str r2, [r3, #0]
/* Resume DMA transmission*/
(heth->Instance)->DMATPDR = 0;
80068f4: 687b ldr r3, [r7, #4]
80068f6: 681a ldr r2, [r3, #0]
80068f8: f241 0304 movw r3, #4100 ; 0x1004
80068fc: 4413 add r3, r2
80068fe: 2200 movs r2, #0
8006900: 601a str r2, [r3, #0]
}
/* Set ETH HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
8006902: 687b ldr r3, [r7, #4]
8006904: 2201 movs r2, #1
8006906: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
800690a: 687b ldr r3, [r7, #4]
800690c: 2200 movs r2, #0
800690e: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006912: 2300 movs r3, #0
}
8006914: 4618 mov r0, r3
8006916: 371c adds r7, #28
8006918: 46bd mov sp, r7
800691a: f85d 7b04 ldr.w r7, [sp], #4
800691e: 4770 bx lr
8006920: ac02b00b .word 0xac02b00b
8006924: fffffa0c .word 0xfffffa0c
08006928 <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)
{
8006928: b480 push {r7}
800692a: b085 sub sp, #20
800692c: af00 add r7, sp, #0
800692e: 6078 str r0, [r7, #4]
uint32_t descriptorscancounter = 0;
8006930: 2300 movs r3, #0
8006932: 60fb str r3, [r7, #12]
/* Process Locked */
__HAL_LOCK(heth);
8006934: 687b ldr r3, [r7, #4]
8006936: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800693a: 2b01 cmp r3, #1
800693c: d101 bne.n 8006942 <HAL_ETH_GetReceivedFrame_IT+0x1a>
800693e: 2302 movs r3, #2
8006940: e074 b.n 8006a2c <HAL_ETH_GetReceivedFrame_IT+0x104>
8006942: 687b ldr r3, [r7, #4]
8006944: 2201 movs r2, #1
8006946: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set ETH HAL State to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
800694a: 687b ldr r3, [r7, #4]
800694c: 2202 movs r2, #2
800694e: 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))
8006952: e05a b.n 8006a0a <HAL_ETH_GetReceivedFrame_IT+0xe2>
{
/* Just for security */
descriptorscancounter++;
8006954: 68fb ldr r3, [r7, #12]
8006956: 3301 adds r3, #1
8006958: 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)
800695a: 687b ldr r3, [r7, #4]
800695c: 6a9b ldr r3, [r3, #40] ; 0x28
800695e: 681b ldr r3, [r3, #0]
8006960: f403 7340 and.w r3, r3, #768 ; 0x300
8006964: f5b3 7f00 cmp.w r3, #512 ; 0x200
8006968: d10d bne.n 8006986 <HAL_ETH_GetReceivedFrame_IT+0x5e>
{
heth->RxFrameInfos.FSRxDesc = heth->RxDesc;
800696a: 687b ldr r3, [r7, #4]
800696c: 6a9a ldr r2, [r3, #40] ; 0x28
800696e: 687b ldr r3, [r7, #4]
8006970: 631a str r2, [r3, #48] ; 0x30
heth->RxFrameInfos.SegCount = 1;
8006972: 687b ldr r3, [r7, #4]
8006974: 2201 movs r2, #1
8006976: 639a str r2, [r3, #56] ; 0x38
/* Point to next descriptor */
heth->RxDesc = (ETH_DMADescTypeDef*) (heth->RxDesc->Buffer2NextDescAddr);
8006978: 687b ldr r3, [r7, #4]
800697a: 6a9b ldr r3, [r3, #40] ; 0x28
800697c: 68db ldr r3, [r3, #12]
800697e: 461a mov r2, r3
8006980: 687b ldr r3, [r7, #4]
8006982: 629a str r2, [r3, #40] ; 0x28
8006984: e041 b.n 8006a0a <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)
8006986: 687b ldr r3, [r7, #4]
8006988: 6a9b ldr r3, [r3, #40] ; 0x28
800698a: 681b ldr r3, [r3, #0]
800698c: f403 7340 and.w r3, r3, #768 ; 0x300
8006990: 2b00 cmp r3, #0
8006992: d10b bne.n 80069ac <HAL_ETH_GetReceivedFrame_IT+0x84>
{
/* Increment segment count */
(heth->RxFrameInfos.SegCount)++;
8006994: 687b ldr r3, [r7, #4]
8006996: 6b9b ldr r3, [r3, #56] ; 0x38
8006998: 1c5a adds r2, r3, #1
800699a: 687b ldr r3, [r7, #4]
800699c: 639a str r2, [r3, #56] ; 0x38
/* Point to next descriptor */
heth->RxDesc = (ETH_DMADescTypeDef*)(heth->RxDesc->Buffer2NextDescAddr);
800699e: 687b ldr r3, [r7, #4]
80069a0: 6a9b ldr r3, [r3, #40] ; 0x28
80069a2: 68db ldr r3, [r3, #12]
80069a4: 461a mov r2, r3
80069a6: 687b ldr r3, [r7, #4]
80069a8: 629a str r2, [r3, #40] ; 0x28
80069aa: e02e b.n 8006a0a <HAL_ETH_GetReceivedFrame_IT+0xe2>
}
/* Should be last segment */
else
{
/* Last segment */
heth->RxFrameInfos.LSRxDesc = heth->RxDesc;
80069ac: 687b ldr r3, [r7, #4]
80069ae: 6a9a ldr r2, [r3, #40] ; 0x28
80069b0: 687b ldr r3, [r7, #4]
80069b2: 635a str r2, [r3, #52] ; 0x34
/* Increment segment count */
(heth->RxFrameInfos.SegCount)++;
80069b4: 687b ldr r3, [r7, #4]
80069b6: 6b9b ldr r3, [r3, #56] ; 0x38
80069b8: 1c5a adds r2, r3, #1
80069ba: 687b ldr r3, [r7, #4]
80069bc: 639a str r2, [r3, #56] ; 0x38
/* Check if last segment is first segment: one segment contains the frame */
if ((heth->RxFrameInfos.SegCount) == 1)
80069be: 687b ldr r3, [r7, #4]
80069c0: 6b9b ldr r3, [r3, #56] ; 0x38
80069c2: 2b01 cmp r3, #1
80069c4: d103 bne.n 80069ce <HAL_ETH_GetReceivedFrame_IT+0xa6>
{
heth->RxFrameInfos.FSRxDesc = heth->RxDesc;
80069c6: 687b ldr r3, [r7, #4]
80069c8: 6a9a ldr r2, [r3, #40] ; 0x28
80069ca: 687b ldr r3, [r7, #4]
80069cc: 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;
80069ce: 687b ldr r3, [r7, #4]
80069d0: 6a9b ldr r3, [r3, #40] ; 0x28
80069d2: 681b ldr r3, [r3, #0]
80069d4: 0c1b lsrs r3, r3, #16
80069d6: f3c3 030d ubfx r3, r3, #0, #14
80069da: 1f1a subs r2, r3, #4
80069dc: 687b ldr r3, [r7, #4]
80069de: 63da str r2, [r3, #60] ; 0x3c
/* Get the address of the buffer start address */
heth->RxFrameInfos.buffer =((heth->RxFrameInfos).FSRxDesc)->Buffer1Addr;
80069e0: 687b ldr r3, [r7, #4]
80069e2: 6b1b ldr r3, [r3, #48] ; 0x30
80069e4: 689a ldr r2, [r3, #8]
80069e6: 687b ldr r3, [r7, #4]
80069e8: 641a str r2, [r3, #64] ; 0x40
/* Point to next descriptor */
heth->RxDesc = (ETH_DMADescTypeDef*) (heth->RxDesc->Buffer2NextDescAddr);
80069ea: 687b ldr r3, [r7, #4]
80069ec: 6a9b ldr r3, [r3, #40] ; 0x28
80069ee: 68db ldr r3, [r3, #12]
80069f0: 461a mov r2, r3
80069f2: 687b ldr r3, [r7, #4]
80069f4: 629a str r2, [r3, #40] ; 0x28
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
80069f6: 687b ldr r3, [r7, #4]
80069f8: 2201 movs r2, #1
80069fa: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
80069fe: 687b ldr r3, [r7, #4]
8006a00: 2200 movs r2, #0
8006a02: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006a06: 2300 movs r3, #0
8006a08: e010 b.n 8006a2c <HAL_ETH_GetReceivedFrame_IT+0x104>
while (((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (descriptorscancounter < ETH_RXBUFNB))
8006a0a: 687b ldr r3, [r7, #4]
8006a0c: 6a9b ldr r3, [r3, #40] ; 0x28
8006a0e: 681b ldr r3, [r3, #0]
8006a10: 2b00 cmp r3, #0
8006a12: db02 blt.n 8006a1a <HAL_ETH_GetReceivedFrame_IT+0xf2>
8006a14: 68fb ldr r3, [r7, #12]
8006a16: 2b03 cmp r3, #3
8006a18: d99c bls.n 8006954 <HAL_ETH_GetReceivedFrame_IT+0x2c>
}
}
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
8006a1a: 687b ldr r3, [r7, #4]
8006a1c: 2201 movs r2, #1
8006a1e: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006a22: 687b ldr r3, [r7, #4]
8006a24: 2200 movs r2, #0
8006a26: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_ERROR;
8006a2a: 2301 movs r3, #1
}
8006a2c: 4618 mov r0, r3
8006a2e: 3714 adds r7, #20
8006a30: 46bd mov sp, r7
8006a32: f85d 7b04 ldr.w r7, [sp], #4
8006a36: 4770 bx lr
08006a38 <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)
{
8006a38: b580 push {r7, lr}
8006a3a: b082 sub sp, #8
8006a3c: af00 add r7, sp, #0
8006a3e: 6078 str r0, [r7, #4]
/* Frame received */
if (__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_R))
8006a40: 687b ldr r3, [r7, #4]
8006a42: 681a ldr r2, [r3, #0]
8006a44: f241 0314 movw r3, #4116 ; 0x1014
8006a48: 4413 add r3, r2
8006a4a: 681b ldr r3, [r3, #0]
8006a4c: f003 0340 and.w r3, r3, #64 ; 0x40
8006a50: 2b40 cmp r3, #64 ; 0x40
8006a52: d112 bne.n 8006a7a <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);
8006a54: 6878 ldr r0, [r7, #4]
8006a56: f005 ff3d bl 800c8d4 <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);
8006a5a: 687b ldr r3, [r7, #4]
8006a5c: 681a ldr r2, [r3, #0]
8006a5e: f241 0314 movw r3, #4116 ; 0x1014
8006a62: 4413 add r3, r2
8006a64: 2240 movs r2, #64 ; 0x40
8006a66: 601a str r2, [r3, #0]
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
8006a68: 687b ldr r3, [r7, #4]
8006a6a: 2201 movs r2, #1
8006a6c: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006a70: 687b ldr r3, [r7, #4]
8006a72: 2200 movs r2, #0
8006a74: f883 2045 strb.w r2, [r3, #69] ; 0x45
8006a78: e01b b.n 8006ab2 <HAL_ETH_IRQHandler+0x7a>
}
/* Frame transmitted */
else if (__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_T))
8006a7a: 687b ldr r3, [r7, #4]
8006a7c: 681a ldr r2, [r3, #0]
8006a7e: f241 0314 movw r3, #4116 ; 0x1014
8006a82: 4413 add r3, r2
8006a84: 681b ldr r3, [r3, #0]
8006a86: f003 0301 and.w r3, r3, #1
8006a8a: 2b01 cmp r3, #1
8006a8c: d111 bne.n 8006ab2 <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);
8006a8e: 6878 ldr r0, [r7, #4]
8006a90: f000 f839 bl 8006b06 <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);
8006a94: 687b ldr r3, [r7, #4]
8006a96: 681a ldr r2, [r3, #0]
8006a98: f241 0314 movw r3, #4116 ; 0x1014
8006a9c: 4413 add r3, r2
8006a9e: 2201 movs r2, #1
8006aa0: 601a str r2, [r3, #0]
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
8006aa2: 687b ldr r3, [r7, #4]
8006aa4: 2201 movs r2, #1
8006aa6: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006aaa: 687b ldr r3, [r7, #4]
8006aac: 2200 movs r2, #0
8006aae: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
/* Clear the interrupt flags */
__HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_NIS);
8006ab2: 687b ldr r3, [r7, #4]
8006ab4: 681a ldr r2, [r3, #0]
8006ab6: f241 0314 movw r3, #4116 ; 0x1014
8006aba: 4413 add r3, r2
8006abc: f44f 3280 mov.w r2, #65536 ; 0x10000
8006ac0: 601a str r2, [r3, #0]
/* ETH DMA Error */
if(__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_AIS))
8006ac2: 687b ldr r3, [r7, #4]
8006ac4: 681a ldr r2, [r3, #0]
8006ac6: f241 0314 movw r3, #4116 ; 0x1014
8006aca: 4413 add r3, r2
8006acc: 681b ldr r3, [r3, #0]
8006ace: f403 4300 and.w r3, r3, #32768 ; 0x8000
8006ad2: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
8006ad6: d112 bne.n 8006afe <HAL_ETH_IRQHandler+0xc6>
{
#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
heth->DMAErrorCallback(heth);
#else
/* Ethernet Error callback */
HAL_ETH_ErrorCallback(heth);
8006ad8: 6878 ldr r0, [r7, #4]
8006ada: f000 f81e bl 8006b1a <HAL_ETH_ErrorCallback>
#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
/* Clear the interrupt flags */
__HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_FLAG_AIS);
8006ade: 687b ldr r3, [r7, #4]
8006ae0: 681a ldr r2, [r3, #0]
8006ae2: f241 0314 movw r3, #4116 ; 0x1014
8006ae6: 4413 add r3, r2
8006ae8: f44f 4200 mov.w r2, #32768 ; 0x8000
8006aec: 601a str r2, [r3, #0]
/* Set HAL State to Ready */
heth->State = HAL_ETH_STATE_READY;
8006aee: 687b ldr r3, [r7, #4]
8006af0: 2201 movs r2, #1
8006af2: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006af6: 687b ldr r3, [r7, #4]
8006af8: 2200 movs r2, #0
8006afa: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
}
8006afe: bf00 nop
8006b00: 3708 adds r7, #8
8006b02: 46bd mov sp, r7
8006b04: bd80 pop {r7, pc}
08006b06 <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)
{
8006b06: b480 push {r7}
8006b08: b083 sub sp, #12
8006b0a: af00 add r7, sp, #0
8006b0c: 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
*/
}
8006b0e: bf00 nop
8006b10: 370c adds r7, #12
8006b12: 46bd mov sp, r7
8006b14: f85d 7b04 ldr.w r7, [sp], #4
8006b18: 4770 bx lr
08006b1a <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)
{
8006b1a: b480 push {r7}
8006b1c: b083 sub sp, #12
8006b1e: af00 add r7, sp, #0
8006b20: 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
*/
}
8006b22: bf00 nop
8006b24: 370c adds r7, #12
8006b26: 46bd mov sp, r7
8006b28: f85d 7b04 ldr.w r7, [sp], #4
8006b2c: 4770 bx lr
08006b2e <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)
{
8006b2e: b580 push {r7, lr}
8006b30: b086 sub sp, #24
8006b32: af00 add r7, sp, #0
8006b34: 60f8 str r0, [r7, #12]
8006b36: 460b mov r3, r1
8006b38: 607a str r2, [r7, #4]
8006b3a: 817b strh r3, [r7, #10]
uint32_t tmpreg = 0;
8006b3c: 2300 movs r3, #0
8006b3e: 617b str r3, [r7, #20]
uint32_t tickstart = 0;
8006b40: 2300 movs r3, #0
8006b42: 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)
8006b44: 68fb ldr r3, [r7, #12]
8006b46: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
8006b4a: b2db uxtb r3, r3
8006b4c: 2b82 cmp r3, #130 ; 0x82
8006b4e: d101 bne.n 8006b54 <HAL_ETH_ReadPHYRegister+0x26>
{
return HAL_BUSY;
8006b50: 2302 movs r3, #2
8006b52: e050 b.n 8006bf6 <HAL_ETH_ReadPHYRegister+0xc8>
}
/* Set ETH HAL State to BUSY_RD */
heth->State = HAL_ETH_STATE_BUSY_RD;
8006b54: 68fb ldr r3, [r7, #12]
8006b56: 2282 movs r2, #130 ; 0x82
8006b58: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Get the ETHERNET MACMIIAR value */
tmpreg = heth->Instance->MACMIIAR;
8006b5c: 68fb ldr r3, [r7, #12]
8006b5e: 681b ldr r3, [r3, #0]
8006b60: 691b ldr r3, [r3, #16]
8006b62: 617b str r3, [r7, #20]
/* Keep only the CSR Clock Range CR[2:0] bits value */
tmpreg &= ~ETH_MACMIIAR_CR_MASK;
8006b64: 697b ldr r3, [r7, #20]
8006b66: f003 031c and.w r3, r3, #28
8006b6a: 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 */
8006b6c: 68fb ldr r3, [r7, #12]
8006b6e: 8a1b ldrh r3, [r3, #16]
8006b70: 02db lsls r3, r3, #11
8006b72: b29b uxth r3, r3
8006b74: 697a ldr r2, [r7, #20]
8006b76: 4313 orrs r3, r2
8006b78: 617b str r3, [r7, #20]
tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */
8006b7a: 897b ldrh r3, [r7, #10]
8006b7c: 019b lsls r3, r3, #6
8006b7e: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
8006b82: 697a ldr r2, [r7, #20]
8006b84: 4313 orrs r3, r2
8006b86: 617b str r3, [r7, #20]
tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */
8006b88: 697b ldr r3, [r7, #20]
8006b8a: f023 0302 bic.w r3, r3, #2
8006b8e: 617b str r3, [r7, #20]
tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
8006b90: 697b ldr r3, [r7, #20]
8006b92: f043 0301 orr.w r3, r3, #1
8006b96: 617b str r3, [r7, #20]
/* Write the result value into the MII Address register */
heth->Instance->MACMIIAR = tmpreg;
8006b98: 68fb ldr r3, [r7, #12]
8006b9a: 681b ldr r3, [r3, #0]
8006b9c: 697a ldr r2, [r7, #20]
8006b9e: 611a str r2, [r3, #16]
/* Get tick */
tickstart = HAL_GetTick();
8006ba0: f7fe f87c bl 8004c9c <HAL_GetTick>
8006ba4: 6138 str r0, [r7, #16]
/* Check for the Busy flag */
while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8006ba6: e015 b.n 8006bd4 <HAL_ETH_ReadPHYRegister+0xa6>
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > PHY_READ_TO)
8006ba8: f7fe f878 bl 8004c9c <HAL_GetTick>
8006bac: 4602 mov r2, r0
8006bae: 693b ldr r3, [r7, #16]
8006bb0: 1ad3 subs r3, r2, r3
8006bb2: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8006bb6: d309 bcc.n 8006bcc <HAL_ETH_ReadPHYRegister+0x9e>
{
heth->State= HAL_ETH_STATE_READY;
8006bb8: 68fb ldr r3, [r7, #12]
8006bba: 2201 movs r2, #1
8006bbc: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006bc0: 68fb ldr r3, [r7, #12]
8006bc2: 2200 movs r2, #0
8006bc4: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_TIMEOUT;
8006bc8: 2303 movs r3, #3
8006bca: e014 b.n 8006bf6 <HAL_ETH_ReadPHYRegister+0xc8>
}
tmpreg = heth->Instance->MACMIIAR;
8006bcc: 68fb ldr r3, [r7, #12]
8006bce: 681b ldr r3, [r3, #0]
8006bd0: 691b ldr r3, [r3, #16]
8006bd2: 617b str r3, [r7, #20]
while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8006bd4: 697b ldr r3, [r7, #20]
8006bd6: f003 0301 and.w r3, r3, #1
8006bda: 2b00 cmp r3, #0
8006bdc: d1e4 bne.n 8006ba8 <HAL_ETH_ReadPHYRegister+0x7a>
}
/* Get MACMIIDR value */
*RegValue = (uint16_t)(heth->Instance->MACMIIDR);
8006bde: 68fb ldr r3, [r7, #12]
8006be0: 681b ldr r3, [r3, #0]
8006be2: 695b ldr r3, [r3, #20]
8006be4: b29b uxth r3, r3
8006be6: 461a mov r2, r3
8006be8: 687b ldr r3, [r7, #4]
8006bea: 601a str r2, [r3, #0]
/* Set ETH HAL State to READY */
heth->State = HAL_ETH_STATE_READY;
8006bec: 68fb ldr r3, [r7, #12]
8006bee: 2201 movs r2, #1
8006bf0: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return function status */
return HAL_OK;
8006bf4: 2300 movs r3, #0
}
8006bf6: 4618 mov r0, r3
8006bf8: 3718 adds r7, #24
8006bfa: 46bd mov sp, r7
8006bfc: bd80 pop {r7, pc}
08006bfe <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)
{
8006bfe: b580 push {r7, lr}
8006c00: b086 sub sp, #24
8006c02: af00 add r7, sp, #0
8006c04: 60f8 str r0, [r7, #12]
8006c06: 460b mov r3, r1
8006c08: 607a str r2, [r7, #4]
8006c0a: 817b strh r3, [r7, #10]
uint32_t tmpreg = 0;
8006c0c: 2300 movs r3, #0
8006c0e: 617b str r3, [r7, #20]
uint32_t tickstart = 0;
8006c10: 2300 movs r3, #0
8006c12: 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)
8006c14: 68fb ldr r3, [r7, #12]
8006c16: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
8006c1a: b2db uxtb r3, r3
8006c1c: 2b42 cmp r3, #66 ; 0x42
8006c1e: d101 bne.n 8006c24 <HAL_ETH_WritePHYRegister+0x26>
{
return HAL_BUSY;
8006c20: 2302 movs r3, #2
8006c22: e04e b.n 8006cc2 <HAL_ETH_WritePHYRegister+0xc4>
}
/* Set ETH HAL State to BUSY_WR */
heth->State = HAL_ETH_STATE_BUSY_WR;
8006c24: 68fb ldr r3, [r7, #12]
8006c26: 2242 movs r2, #66 ; 0x42
8006c28: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Get the ETHERNET MACMIIAR value */
tmpreg = heth->Instance->MACMIIAR;
8006c2c: 68fb ldr r3, [r7, #12]
8006c2e: 681b ldr r3, [r3, #0]
8006c30: 691b ldr r3, [r3, #16]
8006c32: 617b str r3, [r7, #20]
/* Keep only the CSR Clock Range CR[2:0] bits value */
tmpreg &= ~ETH_MACMIIAR_CR_MASK;
8006c34: 697b ldr r3, [r7, #20]
8006c36: f003 031c and.w r3, r3, #28
8006c3a: 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 */
8006c3c: 68fb ldr r3, [r7, #12]
8006c3e: 8a1b ldrh r3, [r3, #16]
8006c40: 02db lsls r3, r3, #11
8006c42: b29b uxth r3, r3
8006c44: 697a ldr r2, [r7, #20]
8006c46: 4313 orrs r3, r2
8006c48: 617b str r3, [r7, #20]
tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */
8006c4a: 897b ldrh r3, [r7, #10]
8006c4c: 019b lsls r3, r3, #6
8006c4e: f403 63f8 and.w r3, r3, #1984 ; 0x7c0
8006c52: 697a ldr r2, [r7, #20]
8006c54: 4313 orrs r3, r2
8006c56: 617b str r3, [r7, #20]
tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */
8006c58: 697b ldr r3, [r7, #20]
8006c5a: f043 0302 orr.w r3, r3, #2
8006c5e: 617b str r3, [r7, #20]
tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */
8006c60: 697b ldr r3, [r7, #20]
8006c62: f043 0301 orr.w r3, r3, #1
8006c66: 617b str r3, [r7, #20]
/* Give the value to the MII data register */
heth->Instance->MACMIIDR = (uint16_t)RegValue;
8006c68: 687b ldr r3, [r7, #4]
8006c6a: b29a uxth r2, r3
8006c6c: 68fb ldr r3, [r7, #12]
8006c6e: 681b ldr r3, [r3, #0]
8006c70: 615a str r2, [r3, #20]
/* Write the result value into the MII Address register */
heth->Instance->MACMIIAR = tmpreg;
8006c72: 68fb ldr r3, [r7, #12]
8006c74: 681b ldr r3, [r3, #0]
8006c76: 697a ldr r2, [r7, #20]
8006c78: 611a str r2, [r3, #16]
/* Get tick */
tickstart = HAL_GetTick();
8006c7a: f7fe f80f bl 8004c9c <HAL_GetTick>
8006c7e: 6138 str r0, [r7, #16]
/* Check for the Busy flag */
while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8006c80: e015 b.n 8006cae <HAL_ETH_WritePHYRegister+0xb0>
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > PHY_WRITE_TO)
8006c82: f7fe f80b bl 8004c9c <HAL_GetTick>
8006c86: 4602 mov r2, r0
8006c88: 693b ldr r3, [r7, #16]
8006c8a: 1ad3 subs r3, r2, r3
8006c8c: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8006c90: d309 bcc.n 8006ca6 <HAL_ETH_WritePHYRegister+0xa8>
{
heth->State= HAL_ETH_STATE_READY;
8006c92: 68fb ldr r3, [r7, #12]
8006c94: 2201 movs r2, #1
8006c96: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006c9a: 68fb ldr r3, [r7, #12]
8006c9c: 2200 movs r2, #0
8006c9e: f883 2045 strb.w r2, [r3, #69] ; 0x45
return HAL_TIMEOUT;
8006ca2: 2303 movs r3, #3
8006ca4: e00d b.n 8006cc2 <HAL_ETH_WritePHYRegister+0xc4>
}
tmpreg = heth->Instance->MACMIIAR;
8006ca6: 68fb ldr r3, [r7, #12]
8006ca8: 681b ldr r3, [r3, #0]
8006caa: 691b ldr r3, [r3, #16]
8006cac: 617b str r3, [r7, #20]
while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB)
8006cae: 697b ldr r3, [r7, #20]
8006cb0: f003 0301 and.w r3, r3, #1
8006cb4: 2b00 cmp r3, #0
8006cb6: d1e4 bne.n 8006c82 <HAL_ETH_WritePHYRegister+0x84>
}
/* Set ETH HAL State to READY */
heth->State = HAL_ETH_STATE_READY;
8006cb8: 68fb ldr r3, [r7, #12]
8006cba: 2201 movs r2, #1
8006cbc: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Return function status */
return HAL_OK;
8006cc0: 2300 movs r3, #0
}
8006cc2: 4618 mov r0, r3
8006cc4: 3718 adds r7, #24
8006cc6: 46bd mov sp, r7
8006cc8: bd80 pop {r7, pc}
08006cca <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)
{
8006cca: b580 push {r7, lr}
8006ccc: b082 sub sp, #8
8006cce: af00 add r7, sp, #0
8006cd0: 6078 str r0, [r7, #4]
/* Process Locked */
__HAL_LOCK(heth);
8006cd2: 687b ldr r3, [r7, #4]
8006cd4: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006cd8: 2b01 cmp r3, #1
8006cda: d101 bne.n 8006ce0 <HAL_ETH_Start+0x16>
8006cdc: 2302 movs r3, #2
8006cde: e01f b.n 8006d20 <HAL_ETH_Start+0x56>
8006ce0: 687b ldr r3, [r7, #4]
8006ce2: 2201 movs r2, #1
8006ce4: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
8006ce8: 687b ldr r3, [r7, #4]
8006cea: 2202 movs r2, #2
8006cec: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Enable transmit state machine of the MAC for transmission on the MII */
ETH_MACTransmissionEnable(heth);
8006cf0: 6878 ldr r0, [r7, #4]
8006cf2: f000 fb45 bl 8007380 <ETH_MACTransmissionEnable>
/* Enable receive state machine of the MAC for reception from the MII */
ETH_MACReceptionEnable(heth);
8006cf6: 6878 ldr r0, [r7, #4]
8006cf8: f000 fb7c bl 80073f4 <ETH_MACReceptionEnable>
/* Flush Transmit FIFO */
ETH_FlushTransmitFIFO(heth);
8006cfc: 6878 ldr r0, [r7, #4]
8006cfe: f000 fc13 bl 8007528 <ETH_FlushTransmitFIFO>
/* Start DMA transmission */
ETH_DMATransmissionEnable(heth);
8006d02: 6878 ldr r0, [r7, #4]
8006d04: f000 fbb0 bl 8007468 <ETH_DMATransmissionEnable>
/* Start DMA reception */
ETH_DMAReceptionEnable(heth);
8006d08: 6878 ldr r0, [r7, #4]
8006d0a: f000 fbdd bl 80074c8 <ETH_DMAReceptionEnable>
/* Set the ETH state to READY*/
heth->State= HAL_ETH_STATE_READY;
8006d0e: 687b ldr r3, [r7, #4]
8006d10: 2201 movs r2, #1
8006d12: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006d16: 687b ldr r3, [r7, #4]
8006d18: 2200 movs r2, #0
8006d1a: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006d1e: 2300 movs r3, #0
}
8006d20: 4618 mov r0, r3
8006d22: 3708 adds r7, #8
8006d24: 46bd mov sp, r7
8006d26: bd80 pop {r7, pc}
08006d28 <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)
{
8006d28: b580 push {r7, lr}
8006d2a: b082 sub sp, #8
8006d2c: af00 add r7, sp, #0
8006d2e: 6078 str r0, [r7, #4]
/* Process Locked */
__HAL_LOCK(heth);
8006d30: 687b ldr r3, [r7, #4]
8006d32: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006d36: 2b01 cmp r3, #1
8006d38: d101 bne.n 8006d3e <HAL_ETH_Stop+0x16>
8006d3a: 2302 movs r3, #2
8006d3c: e01f b.n 8006d7e <HAL_ETH_Stop+0x56>
8006d3e: 687b ldr r3, [r7, #4]
8006d40: 2201 movs r2, #1
8006d42: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State = HAL_ETH_STATE_BUSY;
8006d46: 687b ldr r3, [r7, #4]
8006d48: 2202 movs r2, #2
8006d4a: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Stop DMA transmission */
ETH_DMATransmissionDisable(heth);
8006d4e: 6878 ldr r0, [r7, #4]
8006d50: f000 fba2 bl 8007498 <ETH_DMATransmissionDisable>
/* Stop DMA reception */
ETH_DMAReceptionDisable(heth);
8006d54: 6878 ldr r0, [r7, #4]
8006d56: f000 fbcf bl 80074f8 <ETH_DMAReceptionDisable>
/* Disable receive state machine of the MAC for reception from the MII */
ETH_MACReceptionDisable(heth);
8006d5a: 6878 ldr r0, [r7, #4]
8006d5c: f000 fb67 bl 800742e <ETH_MACReceptionDisable>
/* Flush Transmit FIFO */
ETH_FlushTransmitFIFO(heth);
8006d60: 6878 ldr r0, [r7, #4]
8006d62: f000 fbe1 bl 8007528 <ETH_FlushTransmitFIFO>
/* Disable transmit state machine of the MAC for transmission on the MII */
ETH_MACTransmissionDisable(heth);
8006d66: 6878 ldr r0, [r7, #4]
8006d68: f000 fb27 bl 80073ba <ETH_MACTransmissionDisable>
/* Set the ETH state*/
heth->State = HAL_ETH_STATE_READY;
8006d6c: 687b ldr r3, [r7, #4]
8006d6e: 2201 movs r2, #1
8006d70: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006d74: 687b ldr r3, [r7, #4]
8006d76: 2200 movs r2, #0
8006d78: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006d7c: 2300 movs r3, #0
}
8006d7e: 4618 mov r0, r3
8006d80: 3708 adds r7, #8
8006d82: 46bd mov sp, r7
8006d84: bd80 pop {r7, pc}
...
08006d88 <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)
{
8006d88: b580 push {r7, lr}
8006d8a: b084 sub sp, #16
8006d8c: af00 add r7, sp, #0
8006d8e: 6078 str r0, [r7, #4]
8006d90: 6039 str r1, [r7, #0]
uint32_t tmpreg = 0;
8006d92: 2300 movs r3, #0
8006d94: 60fb str r3, [r7, #12]
/* Process Locked */
__HAL_LOCK(heth);
8006d96: 687b ldr r3, [r7, #4]
8006d98: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
8006d9c: 2b01 cmp r3, #1
8006d9e: d101 bne.n 8006da4 <HAL_ETH_ConfigMAC+0x1c>
8006da0: 2302 movs r3, #2
8006da2: e0e4 b.n 8006f6e <HAL_ETH_ConfigMAC+0x1e6>
8006da4: 687b ldr r3, [r7, #4]
8006da6: 2201 movs r2, #1
8006da8: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Set the ETH peripheral state to BUSY */
heth->State= HAL_ETH_STATE_BUSY;
8006dac: 687b ldr r3, [r7, #4]
8006dae: 2202 movs r2, #2
8006db0: 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)
8006db4: 683b ldr r3, [r7, #0]
8006db6: 2b00 cmp r3, #0
8006db8: f000 80b1 beq.w 8006f1e <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;
8006dbc: 687b ldr r3, [r7, #4]
8006dbe: 681b ldr r3, [r3, #0]
8006dc0: 681b ldr r3, [r3, #0]
8006dc2: 60fb str r3, [r7, #12]
/* Clear WD, PCE, PS, TE and RE bits */
tmpreg &= ETH_MACCR_CLEAR_MASK;
8006dc4: 68fa ldr r2, [r7, #12]
8006dc6: 4b6c ldr r3, [pc, #432] ; (8006f78 <HAL_ETH_ConfigMAC+0x1f0>)
8006dc8: 4013 ands r3, r2
8006dca: 60fb str r3, [r7, #12]
tmpreg |= (uint32_t)(macconf->Watchdog |
8006dcc: 683b ldr r3, [r7, #0]
8006dce: 681a ldr r2, [r3, #0]
macconf->Jabber |
8006dd0: 683b ldr r3, [r7, #0]
8006dd2: 685b ldr r3, [r3, #4]
tmpreg |= (uint32_t)(macconf->Watchdog |
8006dd4: 431a orrs r2, r3
macconf->InterFrameGap |
8006dd6: 683b ldr r3, [r7, #0]
8006dd8: 689b ldr r3, [r3, #8]
macconf->Jabber |
8006dda: 431a orrs r2, r3
macconf->CarrierSense |
8006ddc: 683b ldr r3, [r7, #0]
8006dde: 68db ldr r3, [r3, #12]
macconf->InterFrameGap |
8006de0: 431a orrs r2, r3
(heth->Init).Speed |
8006de2: 687b ldr r3, [r7, #4]
8006de4: 689b ldr r3, [r3, #8]
macconf->CarrierSense |
8006de6: 431a orrs r2, r3
macconf->ReceiveOwn |
8006de8: 683b ldr r3, [r7, #0]
8006dea: 691b ldr r3, [r3, #16]
(heth->Init).Speed |
8006dec: 431a orrs r2, r3
macconf->LoopbackMode |
8006dee: 683b ldr r3, [r7, #0]
8006df0: 695b ldr r3, [r3, #20]
macconf->ReceiveOwn |
8006df2: 431a orrs r2, r3
(heth->Init).DuplexMode |
8006df4: 687b ldr r3, [r7, #4]
8006df6: 68db ldr r3, [r3, #12]
macconf->LoopbackMode |
8006df8: 431a orrs r2, r3
macconf->ChecksumOffload |
8006dfa: 683b ldr r3, [r7, #0]
8006dfc: 699b ldr r3, [r3, #24]
(heth->Init).DuplexMode |
8006dfe: 431a orrs r2, r3
macconf->RetryTransmission |
8006e00: 683b ldr r3, [r7, #0]
8006e02: 69db ldr r3, [r3, #28]
macconf->ChecksumOffload |
8006e04: 431a orrs r2, r3
macconf->AutomaticPadCRCStrip |
8006e06: 683b ldr r3, [r7, #0]
8006e08: 6a1b ldr r3, [r3, #32]
macconf->RetryTransmission |
8006e0a: 431a orrs r2, r3
macconf->BackOffLimit |
8006e0c: 683b ldr r3, [r7, #0]
8006e0e: 6a5b ldr r3, [r3, #36] ; 0x24
macconf->AutomaticPadCRCStrip |
8006e10: 431a orrs r2, r3
macconf->DeferralCheck);
8006e12: 683b ldr r3, [r7, #0]
8006e14: 6a9b ldr r3, [r3, #40] ; 0x28
macconf->BackOffLimit |
8006e16: 4313 orrs r3, r2
tmpreg |= (uint32_t)(macconf->Watchdog |
8006e18: 68fa ldr r2, [r7, #12]
8006e1a: 4313 orrs r3, r2
8006e1c: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACCR */
(heth->Instance)->MACCR = (uint32_t)tmpreg;
8006e1e: 687b ldr r3, [r7, #4]
8006e20: 681b ldr r3, [r3, #0]
8006e22: 68fa ldr r2, [r7, #12]
8006e24: 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;
8006e26: 687b ldr r3, [r7, #4]
8006e28: 681b ldr r3, [r3, #0]
8006e2a: 681b ldr r3, [r3, #0]
8006e2c: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8006e2e: 2001 movs r0, #1
8006e30: f7fd ff40 bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
8006e34: 687b ldr r3, [r7, #4]
8006e36: 681b ldr r3, [r3, #0]
8006e38: 68fa ldr r2, [r7, #12]
8006e3a: 601a str r2, [r3, #0]
/*----------------------- ETHERNET MACFFR Configuration --------------------*/
/* Write to ETHERNET MACFFR */
(heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll |
8006e3c: 683b ldr r3, [r7, #0]
8006e3e: 6ada ldr r2, [r3, #44] ; 0x2c
macconf->SourceAddrFilter |
8006e40: 683b ldr r3, [r7, #0]
8006e42: 6b1b ldr r3, [r3, #48] ; 0x30
(heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll |
8006e44: 431a orrs r2, r3
macconf->PassControlFrames |
8006e46: 683b ldr r3, [r7, #0]
8006e48: 6b5b ldr r3, [r3, #52] ; 0x34
macconf->SourceAddrFilter |
8006e4a: 431a orrs r2, r3
macconf->BroadcastFramesReception |
8006e4c: 683b ldr r3, [r7, #0]
8006e4e: 6b9b ldr r3, [r3, #56] ; 0x38
macconf->PassControlFrames |
8006e50: 431a orrs r2, r3
macconf->DestinationAddrFilter |
8006e52: 683b ldr r3, [r7, #0]
8006e54: 6bdb ldr r3, [r3, #60] ; 0x3c
macconf->BroadcastFramesReception |
8006e56: 431a orrs r2, r3
macconf->PromiscuousMode |
8006e58: 683b ldr r3, [r7, #0]
8006e5a: 6c1b ldr r3, [r3, #64] ; 0x40
macconf->DestinationAddrFilter |
8006e5c: 431a orrs r2, r3
macconf->MulticastFramesFilter |
8006e5e: 683b ldr r3, [r7, #0]
8006e60: 6c5b ldr r3, [r3, #68] ; 0x44
macconf->PromiscuousMode |
8006e62: ea42 0103 orr.w r1, r2, r3
macconf->UnicastFramesFilter);
8006e66: 683b ldr r3, [r7, #0]
8006e68: 6c9a ldr r2, [r3, #72] ; 0x48
(heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll |
8006e6a: 687b ldr r3, [r7, #4]
8006e6c: 681b ldr r3, [r3, #0]
macconf->MulticastFramesFilter |
8006e6e: 430a orrs r2, r1
(heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll |
8006e70: 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;
8006e72: 687b ldr r3, [r7, #4]
8006e74: 681b ldr r3, [r3, #0]
8006e76: 685b ldr r3, [r3, #4]
8006e78: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8006e7a: 2001 movs r0, #1
8006e7c: f7fd ff1a bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACFFR = tmpreg;
8006e80: 687b ldr r3, [r7, #4]
8006e82: 681b ldr r3, [r3, #0]
8006e84: 68fa ldr r2, [r7, #12]
8006e86: 605a str r2, [r3, #4]
/*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/
/* Write to ETHERNET MACHTHR */
(heth->Instance)->MACHTHR = (uint32_t)macconf->HashTableHigh;
8006e88: 687b ldr r3, [r7, #4]
8006e8a: 681b ldr r3, [r3, #0]
8006e8c: 683a ldr r2, [r7, #0]
8006e8e: 6cd2 ldr r2, [r2, #76] ; 0x4c
8006e90: 609a str r2, [r3, #8]
/* Write to ETHERNET MACHTLR */
(heth->Instance)->MACHTLR = (uint32_t)macconf->HashTableLow;
8006e92: 687b ldr r3, [r7, #4]
8006e94: 681b ldr r3, [r3, #0]
8006e96: 683a ldr r2, [r7, #0]
8006e98: 6d12 ldr r2, [r2, #80] ; 0x50
8006e9a: 60da str r2, [r3, #12]
/*----------------------- ETHERNET MACFCR Configuration --------------------*/
/* Get the ETHERNET MACFCR value */
tmpreg = (heth->Instance)->MACFCR;
8006e9c: 687b ldr r3, [r7, #4]
8006e9e: 681b ldr r3, [r3, #0]
8006ea0: 699b ldr r3, [r3, #24]
8006ea2: 60fb str r3, [r7, #12]
/* Clear xx bits */
tmpreg &= ETH_MACFCR_CLEAR_MASK;
8006ea4: 68fa ldr r2, [r7, #12]
8006ea6: f64f 7341 movw r3, #65345 ; 0xff41
8006eaa: 4013 ands r3, r2
8006eac: 60fb str r3, [r7, #12]
tmpreg |= (uint32_t)((macconf->PauseTime << 16) |
8006eae: 683b ldr r3, [r7, #0]
8006eb0: 6d5b ldr r3, [r3, #84] ; 0x54
8006eb2: 041a lsls r2, r3, #16
macconf->ZeroQuantaPause |
8006eb4: 683b ldr r3, [r7, #0]
8006eb6: 6d9b ldr r3, [r3, #88] ; 0x58
tmpreg |= (uint32_t)((macconf->PauseTime << 16) |
8006eb8: 431a orrs r2, r3
macconf->PauseLowThreshold |
8006eba: 683b ldr r3, [r7, #0]
8006ebc: 6ddb ldr r3, [r3, #92] ; 0x5c
macconf->ZeroQuantaPause |
8006ebe: 431a orrs r2, r3
macconf->UnicastPauseFrameDetect |
8006ec0: 683b ldr r3, [r7, #0]
8006ec2: 6e1b ldr r3, [r3, #96] ; 0x60
macconf->PauseLowThreshold |
8006ec4: 431a orrs r2, r3
macconf->ReceiveFlowControl |
8006ec6: 683b ldr r3, [r7, #0]
8006ec8: 6e5b ldr r3, [r3, #100] ; 0x64
macconf->UnicastPauseFrameDetect |
8006eca: 431a orrs r2, r3
macconf->TransmitFlowControl);
8006ecc: 683b ldr r3, [r7, #0]
8006ece: 6e9b ldr r3, [r3, #104] ; 0x68
macconf->ReceiveFlowControl |
8006ed0: 4313 orrs r3, r2
tmpreg |= (uint32_t)((macconf->PauseTime << 16) |
8006ed2: 68fa ldr r2, [r7, #12]
8006ed4: 4313 orrs r3, r2
8006ed6: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACFCR */
(heth->Instance)->MACFCR = (uint32_t)tmpreg;
8006ed8: 687b ldr r3, [r7, #4]
8006eda: 681b ldr r3, [r3, #0]
8006edc: 68fa ldr r2, [r7, #12]
8006ede: 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;
8006ee0: 687b ldr r3, [r7, #4]
8006ee2: 681b ldr r3, [r3, #0]
8006ee4: 699b ldr r3, [r3, #24]
8006ee6: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8006ee8: 2001 movs r0, #1
8006eea: f7fd fee3 bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACFCR = tmpreg;
8006eee: 687b ldr r3, [r7, #4]
8006ef0: 681b ldr r3, [r3, #0]
8006ef2: 68fa ldr r2, [r7, #12]
8006ef4: 619a str r2, [r3, #24]
/*----------------------- ETHERNET MACVLANTR Configuration -----------------*/
(heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison |
8006ef6: 683b ldr r3, [r7, #0]
8006ef8: 6ed9 ldr r1, [r3, #108] ; 0x6c
macconf->VLANTagIdentifier);
8006efa: 683b ldr r3, [r7, #0]
8006efc: 6f1a ldr r2, [r3, #112] ; 0x70
(heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison |
8006efe: 687b ldr r3, [r7, #4]
8006f00: 681b ldr r3, [r3, #0]
8006f02: 430a orrs r2, r1
8006f04: 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;
8006f06: 687b ldr r3, [r7, #4]
8006f08: 681b ldr r3, [r3, #0]
8006f0a: 69db ldr r3, [r3, #28]
8006f0c: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8006f0e: 2001 movs r0, #1
8006f10: f7fd fed0 bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACVLANTR = tmpreg;
8006f14: 687b ldr r3, [r7, #4]
8006f16: 681b ldr r3, [r3, #0]
8006f18: 68fa ldr r2, [r7, #12]
8006f1a: 61da str r2, [r3, #28]
8006f1c: e01e b.n 8006f5c <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;
8006f1e: 687b ldr r3, [r7, #4]
8006f20: 681b ldr r3, [r3, #0]
8006f22: 681b ldr r3, [r3, #0]
8006f24: 60fb str r3, [r7, #12]
/* Clear FES and DM bits */
tmpreg &= ~((uint32_t)0x00004800);
8006f26: 68fb ldr r3, [r7, #12]
8006f28: f423 4390 bic.w r3, r3, #18432 ; 0x4800
8006f2c: 60fb str r3, [r7, #12]
tmpreg |= (uint32_t)(heth->Init.Speed | heth->Init.DuplexMode);
8006f2e: 687b ldr r3, [r7, #4]
8006f30: 689a ldr r2, [r3, #8]
8006f32: 687b ldr r3, [r7, #4]
8006f34: 68db ldr r3, [r3, #12]
8006f36: 4313 orrs r3, r2
8006f38: 68fa ldr r2, [r7, #12]
8006f3a: 4313 orrs r3, r2
8006f3c: 60fb str r3, [r7, #12]
/* Write to ETHERNET MACCR */
(heth->Instance)->MACCR = (uint32_t)tmpreg;
8006f3e: 687b ldr r3, [r7, #4]
8006f40: 681b ldr r3, [r3, #0]
8006f42: 68fa ldr r2, [r7, #12]
8006f44: 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;
8006f46: 687b ldr r3, [r7, #4]
8006f48: 681b ldr r3, [r3, #0]
8006f4a: 681b ldr r3, [r3, #0]
8006f4c: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8006f4e: 2001 movs r0, #1
8006f50: f7fd feb0 bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
8006f54: 687b ldr r3, [r7, #4]
8006f56: 681b ldr r3, [r3, #0]
8006f58: 68fa ldr r2, [r7, #12]
8006f5a: 601a str r2, [r3, #0]
}
/* Set the ETH state to Ready */
heth->State= HAL_ETH_STATE_READY;
8006f5c: 687b ldr r3, [r7, #4]
8006f5e: 2201 movs r2, #1
8006f60: f883 2044 strb.w r2, [r3, #68] ; 0x44
/* Process Unlocked */
__HAL_UNLOCK(heth);
8006f64: 687b ldr r3, [r7, #4]
8006f66: 2200 movs r2, #0
8006f68: f883 2045 strb.w r2, [r3, #69] ; 0x45
/* Return function status */
return HAL_OK;
8006f6c: 2300 movs r3, #0
}
8006f6e: 4618 mov r0, r3
8006f70: 3710 adds r7, #16
8006f72: 46bd mov sp, r7
8006f74: bd80 pop {r7, pc}
8006f76: bf00 nop
8006f78: ff20810f .word 0xff20810f
08006f7c <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)
{
8006f7c: b580 push {r7, lr}
8006f7e: b0b0 sub sp, #192 ; 0xc0
8006f80: af00 add r7, sp, #0
8006f82: 6078 str r0, [r7, #4]
8006f84: 6039 str r1, [r7, #0]
ETH_MACInitTypeDef macinit;
ETH_DMAInitTypeDef dmainit;
uint32_t tmpreg = 0;
8006f86: 2300 movs r3, #0
8006f88: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
if (err != ETH_SUCCESS) /* Auto-negotiation failed */
8006f8c: 683b ldr r3, [r7, #0]
8006f8e: 2b00 cmp r3, #0
8006f90: d007 beq.n 8006fa2 <ETH_MACDMAConfig+0x26>
{
/* Set Ethernet duplex mode to Full-duplex */
(heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX;
8006f92: 687b ldr r3, [r7, #4]
8006f94: f44f 6200 mov.w r2, #2048 ; 0x800
8006f98: 60da str r2, [r3, #12]
/* Set Ethernet speed to 100M */
(heth->Init).Speed = ETH_SPEED_100M;
8006f9a: 687b ldr r3, [r7, #4]
8006f9c: f44f 4280 mov.w r2, #16384 ; 0x4000
8006fa0: 609a str r2, [r3, #8]
}
/* Ethernet MAC default initialization **************************************/
macinit.Watchdog = ETH_WATCHDOG_ENABLE;
8006fa2: 2300 movs r3, #0
8006fa4: 64bb str r3, [r7, #72] ; 0x48
macinit.Jabber = ETH_JABBER_ENABLE;
8006fa6: 2300 movs r3, #0
8006fa8: 64fb str r3, [r7, #76] ; 0x4c
macinit.InterFrameGap = ETH_INTERFRAMEGAP_96BIT;
8006faa: 2300 movs r3, #0
8006fac: 653b str r3, [r7, #80] ; 0x50
macinit.CarrierSense = ETH_CARRIERSENCE_ENABLE;
8006fae: 2300 movs r3, #0
8006fb0: 657b str r3, [r7, #84] ; 0x54
macinit.ReceiveOwn = ETH_RECEIVEOWN_ENABLE;
8006fb2: 2300 movs r3, #0
8006fb4: 65bb str r3, [r7, #88] ; 0x58
macinit.LoopbackMode = ETH_LOOPBACKMODE_DISABLE;
8006fb6: 2300 movs r3, #0
8006fb8: 65fb str r3, [r7, #92] ; 0x5c
if(heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE)
8006fba: 687b ldr r3, [r7, #4]
8006fbc: 69db ldr r3, [r3, #28]
8006fbe: 2b00 cmp r3, #0
8006fc0: d103 bne.n 8006fca <ETH_MACDMAConfig+0x4e>
{
macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_ENABLE;
8006fc2: f44f 6380 mov.w r3, #1024 ; 0x400
8006fc6: 663b str r3, [r7, #96] ; 0x60
8006fc8: e001 b.n 8006fce <ETH_MACDMAConfig+0x52>
}
else
{
macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_DISABLE;
8006fca: 2300 movs r3, #0
8006fcc: 663b str r3, [r7, #96] ; 0x60
}
macinit.RetryTransmission = ETH_RETRYTRANSMISSION_DISABLE;
8006fce: f44f 7300 mov.w r3, #512 ; 0x200
8006fd2: 667b str r3, [r7, #100] ; 0x64
macinit.AutomaticPadCRCStrip = ETH_AUTOMATICPADCRCSTRIP_DISABLE;
8006fd4: 2300 movs r3, #0
8006fd6: 66bb str r3, [r7, #104] ; 0x68
macinit.BackOffLimit = ETH_BACKOFFLIMIT_10;
8006fd8: 2300 movs r3, #0
8006fda: 66fb str r3, [r7, #108] ; 0x6c
macinit.DeferralCheck = ETH_DEFFERRALCHECK_DISABLE;
8006fdc: 2300 movs r3, #0
8006fde: 673b str r3, [r7, #112] ; 0x70
macinit.ReceiveAll = ETH_RECEIVEAll_DISABLE;
8006fe0: 2300 movs r3, #0
8006fe2: 677b str r3, [r7, #116] ; 0x74
macinit.SourceAddrFilter = ETH_SOURCEADDRFILTER_DISABLE;
8006fe4: 2300 movs r3, #0
8006fe6: 67bb str r3, [r7, #120] ; 0x78
macinit.PassControlFrames = ETH_PASSCONTROLFRAMES_BLOCKALL;
8006fe8: 2340 movs r3, #64 ; 0x40
8006fea: 67fb str r3, [r7, #124] ; 0x7c
macinit.BroadcastFramesReception = ETH_BROADCASTFRAMESRECEPTION_ENABLE;
8006fec: 2300 movs r3, #0
8006fee: f8c7 3080 str.w r3, [r7, #128] ; 0x80
macinit.DestinationAddrFilter = ETH_DESTINATIONADDRFILTER_NORMAL;
8006ff2: 2300 movs r3, #0
8006ff4: f8c7 3084 str.w r3, [r7, #132] ; 0x84
macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE;
8006ff8: 2300 movs r3, #0
8006ffa: f8c7 3088 str.w r3, [r7, #136] ; 0x88
macinit.MulticastFramesFilter = ETH_MULTICASTFRAMESFILTER_PERFECT;
8006ffe: 2300 movs r3, #0
8007000: f8c7 308c str.w r3, [r7, #140] ; 0x8c
macinit.UnicastFramesFilter = ETH_UNICASTFRAMESFILTER_PERFECT;
8007004: 2300 movs r3, #0
8007006: f8c7 3090 str.w r3, [r7, #144] ; 0x90
macinit.HashTableHigh = 0x0;
800700a: 2300 movs r3, #0
800700c: f8c7 3094 str.w r3, [r7, #148] ; 0x94
macinit.HashTableLow = 0x0;
8007010: 2300 movs r3, #0
8007012: f8c7 3098 str.w r3, [r7, #152] ; 0x98
macinit.PauseTime = 0x0;
8007016: 2300 movs r3, #0
8007018: f8c7 309c str.w r3, [r7, #156] ; 0x9c
macinit.ZeroQuantaPause = ETH_ZEROQUANTAPAUSE_DISABLE;
800701c: 2380 movs r3, #128 ; 0x80
800701e: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0
macinit.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4;
8007022: 2300 movs r3, #0
8007024: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4
macinit.UnicastPauseFrameDetect = ETH_UNICASTPAUSEFRAMEDETECT_DISABLE;
8007028: 2300 movs r3, #0
800702a: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8
macinit.ReceiveFlowControl = ETH_RECEIVEFLOWCONTROL_DISABLE;
800702e: 2300 movs r3, #0
8007030: f8c7 30ac str.w r3, [r7, #172] ; 0xac
macinit.TransmitFlowControl = ETH_TRANSMITFLOWCONTROL_DISABLE;
8007034: 2300 movs r3, #0
8007036: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0
macinit.VLANTagComparison = ETH_VLANTAGCOMPARISON_16BIT;
800703a: 2300 movs r3, #0
800703c: f8c7 30b4 str.w r3, [r7, #180] ; 0xb4
macinit.VLANTagIdentifier = 0x0;
8007040: 2300 movs r3, #0
8007042: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8
/*------------------------ ETHERNET MACCR Configuration --------------------*/
/* Get the ETHERNET MACCR value */
tmpreg = (heth->Instance)->MACCR;
8007046: 687b ldr r3, [r7, #4]
8007048: 681b ldr r3, [r3, #0]
800704a: 681b ldr r3, [r3, #0]
800704c: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Clear WD, PCE, PS, TE and RE bits */
tmpreg &= ETH_MACCR_CLEAR_MASK;
8007050: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007054: 4bab ldr r3, [pc, #684] ; (8007304 <ETH_MACDMAConfig+0x388>)
8007056: 4013 ands r3, r2
8007058: 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 |
800705c: 6cba ldr r2, [r7, #72] ; 0x48
macinit.Jabber |
800705e: 6cfb ldr r3, [r7, #76] ; 0x4c
tmpreg |= (uint32_t)(macinit.Watchdog |
8007060: 431a orrs r2, r3
macinit.InterFrameGap |
8007062: 6d3b ldr r3, [r7, #80] ; 0x50
macinit.Jabber |
8007064: 431a orrs r2, r3
macinit.CarrierSense |
8007066: 6d7b ldr r3, [r7, #84] ; 0x54
macinit.InterFrameGap |
8007068: 431a orrs r2, r3
(heth->Init).Speed |
800706a: 687b ldr r3, [r7, #4]
800706c: 689b ldr r3, [r3, #8]
macinit.CarrierSense |
800706e: 431a orrs r2, r3
macinit.ReceiveOwn |
8007070: 6dbb ldr r3, [r7, #88] ; 0x58
(heth->Init).Speed |
8007072: 431a orrs r2, r3
macinit.LoopbackMode |
8007074: 6dfb ldr r3, [r7, #92] ; 0x5c
macinit.ReceiveOwn |
8007076: 431a orrs r2, r3
(heth->Init).DuplexMode |
8007078: 687b ldr r3, [r7, #4]
800707a: 68db ldr r3, [r3, #12]
macinit.LoopbackMode |
800707c: 431a orrs r2, r3
macinit.ChecksumOffload |
800707e: 6e3b ldr r3, [r7, #96] ; 0x60
(heth->Init).DuplexMode |
8007080: 431a orrs r2, r3
macinit.RetryTransmission |
8007082: 6e7b ldr r3, [r7, #100] ; 0x64
macinit.ChecksumOffload |
8007084: 431a orrs r2, r3
macinit.AutomaticPadCRCStrip |
8007086: 6ebb ldr r3, [r7, #104] ; 0x68
macinit.RetryTransmission |
8007088: 431a orrs r2, r3
macinit.BackOffLimit |
800708a: 6efb ldr r3, [r7, #108] ; 0x6c
macinit.AutomaticPadCRCStrip |
800708c: 431a orrs r2, r3
macinit.DeferralCheck);
800708e: 6f3b ldr r3, [r7, #112] ; 0x70
macinit.BackOffLimit |
8007090: 4313 orrs r3, r2
tmpreg |= (uint32_t)(macinit.Watchdog |
8007092: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007096: 4313 orrs r3, r2
8007098: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Write to ETHERNET MACCR */
(heth->Instance)->MACCR = (uint32_t)tmpreg;
800709c: 687b ldr r3, [r7, #4]
800709e: 681b ldr r3, [r3, #0]
80070a0: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80070a4: 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;
80070a6: 687b ldr r3, [r7, #4]
80070a8: 681b ldr r3, [r3, #0]
80070aa: 681b ldr r3, [r3, #0]
80070ac: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
80070b0: 2001 movs r0, #1
80070b2: f7fd fdff bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
80070b6: 687b ldr r3, [r7, #4]
80070b8: 681b ldr r3, [r3, #0]
80070ba: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80070be: 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 |
80070c0: 6f7a ldr r2, [r7, #116] ; 0x74
macinit.SourceAddrFilter |
80070c2: 6fbb ldr r3, [r7, #120] ; 0x78
(heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll |
80070c4: 431a orrs r2, r3
macinit.PassControlFrames |
80070c6: 6ffb ldr r3, [r7, #124] ; 0x7c
macinit.SourceAddrFilter |
80070c8: 431a orrs r2, r3
macinit.BroadcastFramesReception |
80070ca: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80
macinit.PassControlFrames |
80070ce: 431a orrs r2, r3
macinit.DestinationAddrFilter |
80070d0: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84
macinit.BroadcastFramesReception |
80070d4: 431a orrs r2, r3
macinit.PromiscuousMode |
80070d6: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88
macinit.DestinationAddrFilter |
80070da: 431a orrs r2, r3
macinit.MulticastFramesFilter |
80070dc: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c
macinit.PromiscuousMode |
80070e0: ea42 0103 orr.w r1, r2, r3
macinit.UnicastFramesFilter);
80070e4: f8d7 2090 ldr.w r2, [r7, #144] ; 0x90
(heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll |
80070e8: 687b ldr r3, [r7, #4]
80070ea: 681b ldr r3, [r3, #0]
macinit.MulticastFramesFilter |
80070ec: 430a orrs r2, r1
(heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll |
80070ee: 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;
80070f0: 687b ldr r3, [r7, #4]
80070f2: 681b ldr r3, [r3, #0]
80070f4: 685b ldr r3, [r3, #4]
80070f6: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
80070fa: 2001 movs r0, #1
80070fc: f7fd fdda bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACFFR = tmpreg;
8007100: 687b ldr r3, [r7, #4]
8007102: 681b ldr r3, [r3, #0]
8007104: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007108: 605a str r2, [r3, #4]
/*--------------- ETHERNET MACHTHR and MACHTLR Configuration --------------*/
/* Write to ETHERNET MACHTHR */
(heth->Instance)->MACHTHR = (uint32_t)macinit.HashTableHigh;
800710a: 687b ldr r3, [r7, #4]
800710c: 681b ldr r3, [r3, #0]
800710e: f8d7 2094 ldr.w r2, [r7, #148] ; 0x94
8007112: 609a str r2, [r3, #8]
/* Write to ETHERNET MACHTLR */
(heth->Instance)->MACHTLR = (uint32_t)macinit.HashTableLow;
8007114: 687b ldr r3, [r7, #4]
8007116: 681b ldr r3, [r3, #0]
8007118: f8d7 2098 ldr.w r2, [r7, #152] ; 0x98
800711c: 60da str r2, [r3, #12]
/*----------------------- ETHERNET MACFCR Configuration -------------------*/
/* Get the ETHERNET MACFCR value */
tmpreg = (heth->Instance)->MACFCR;
800711e: 687b ldr r3, [r7, #4]
8007120: 681b ldr r3, [r3, #0]
8007122: 699b ldr r3, [r3, #24]
8007124: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Clear xx bits */
tmpreg &= ETH_MACFCR_CLEAR_MASK;
8007128: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
800712c: f64f 7341 movw r3, #65345 ; 0xff41
8007130: 4013 ands r3, r2
8007132: 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) |
8007136: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c
800713a: 041a lsls r2, r3, #16
macinit.ZeroQuantaPause |
800713c: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0
tmpreg |= (uint32_t)((macinit.PauseTime << 16) |
8007140: 431a orrs r2, r3
macinit.PauseLowThreshold |
8007142: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
macinit.ZeroQuantaPause |
8007146: 431a orrs r2, r3
macinit.UnicastPauseFrameDetect |
8007148: f8d7 30a8 ldr.w r3, [r7, #168] ; 0xa8
macinit.PauseLowThreshold |
800714c: 431a orrs r2, r3
macinit.ReceiveFlowControl |
800714e: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac
macinit.UnicastPauseFrameDetect |
8007152: 431a orrs r2, r3
macinit.TransmitFlowControl);
8007154: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0
macinit.ReceiveFlowControl |
8007158: 4313 orrs r3, r2
tmpreg |= (uint32_t)((macinit.PauseTime << 16) |
800715a: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
800715e: 4313 orrs r3, r2
8007160: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Write to ETHERNET MACFCR */
(heth->Instance)->MACFCR = (uint32_t)tmpreg;
8007164: 687b ldr r3, [r7, #4]
8007166: 681b ldr r3, [r3, #0]
8007168: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
800716c: 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;
800716e: 687b ldr r3, [r7, #4]
8007170: 681b ldr r3, [r3, #0]
8007172: 699b ldr r3, [r3, #24]
8007174: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
8007178: 2001 movs r0, #1
800717a: f7fd fd9b bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACFCR = tmpreg;
800717e: 687b ldr r3, [r7, #4]
8007180: 681b ldr r3, [r3, #0]
8007182: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007186: 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 |
8007188: f8d7 10b4 ldr.w r1, [r7, #180] ; 0xb4
macinit.VLANTagIdentifier);
800718c: f8d7 20b8 ldr.w r2, [r7, #184] ; 0xb8
(heth->Instance)->MACVLANTR = (uint32_t)(macinit.VLANTagComparison |
8007190: 687b ldr r3, [r7, #4]
8007192: 681b ldr r3, [r3, #0]
8007194: 430a orrs r2, r1
8007196: 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;
8007198: 687b ldr r3, [r7, #4]
800719a: 681b ldr r3, [r3, #0]
800719c: 69db ldr r3, [r3, #28]
800719e: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
80071a2: 2001 movs r0, #1
80071a4: f7fd fd86 bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACVLANTR = tmpreg;
80071a8: 687b ldr r3, [r7, #4]
80071aa: 681b ldr r3, [r3, #0]
80071ac: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80071b0: 61da str r2, [r3, #28]
/* Ethernet DMA default initialization ************************************/
dmainit.DropTCPIPChecksumErrorFrame = ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE;
80071b2: 2300 movs r3, #0
80071b4: 60bb str r3, [r7, #8]
dmainit.ReceiveStoreForward = ETH_RECEIVESTOREFORWARD_ENABLE;
80071b6: f04f 7300 mov.w r3, #33554432 ; 0x2000000
80071ba: 60fb str r3, [r7, #12]
dmainit.FlushReceivedFrame = ETH_FLUSHRECEIVEDFRAME_ENABLE;
80071bc: 2300 movs r3, #0
80071be: 613b str r3, [r7, #16]
dmainit.TransmitStoreForward = ETH_TRANSMITSTOREFORWARD_ENABLE;
80071c0: f44f 1300 mov.w r3, #2097152 ; 0x200000
80071c4: 617b str r3, [r7, #20]
dmainit.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES;
80071c6: 2300 movs r3, #0
80071c8: 61bb str r3, [r7, #24]
dmainit.ForwardErrorFrames = ETH_FORWARDERRORFRAMES_DISABLE;
80071ca: 2300 movs r3, #0
80071cc: 61fb str r3, [r7, #28]
dmainit.ForwardUndersizedGoodFrames = ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE;
80071ce: 2300 movs r3, #0
80071d0: 623b str r3, [r7, #32]
dmainit.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES;
80071d2: 2300 movs r3, #0
80071d4: 627b str r3, [r7, #36] ; 0x24
dmainit.SecondFrameOperate = ETH_SECONDFRAMEOPERARTE_ENABLE;
80071d6: 2304 movs r3, #4
80071d8: 62bb str r3, [r7, #40] ; 0x28
dmainit.AddressAlignedBeats = ETH_ADDRESSALIGNEDBEATS_ENABLE;
80071da: f04f 7300 mov.w r3, #33554432 ; 0x2000000
80071de: 62fb str r3, [r7, #44] ; 0x2c
dmainit.FixedBurst = ETH_FIXEDBURST_ENABLE;
80071e0: f44f 3380 mov.w r3, #65536 ; 0x10000
80071e4: 633b str r3, [r7, #48] ; 0x30
dmainit.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT;
80071e6: f44f 0380 mov.w r3, #4194304 ; 0x400000
80071ea: 637b str r3, [r7, #52] ; 0x34
dmainit.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT;
80071ec: f44f 5300 mov.w r3, #8192 ; 0x2000
80071f0: 63bb str r3, [r7, #56] ; 0x38
dmainit.EnhancedDescriptorFormat = ETH_DMAENHANCEDDESCRIPTOR_ENABLE;
80071f2: 2380 movs r3, #128 ; 0x80
80071f4: 63fb str r3, [r7, #60] ; 0x3c
dmainit.DescriptorSkipLength = 0x0;
80071f6: 2300 movs r3, #0
80071f8: 643b str r3, [r7, #64] ; 0x40
dmainit.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1;
80071fa: 2300 movs r3, #0
80071fc: 647b str r3, [r7, #68] ; 0x44
/* Get the ETHERNET DMAOMR value */
tmpreg = (heth->Instance)->DMAOMR;
80071fe: 687b ldr r3, [r7, #4]
8007200: 681a ldr r2, [r3, #0]
8007202: f241 0318 movw r3, #4120 ; 0x1018
8007206: 4413 add r3, r2
8007208: 681b ldr r3, [r3, #0]
800720a: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Clear xx bits */
tmpreg &= ETH_DMAOMR_CLEAR_MASK;
800720e: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007212: 4b3d ldr r3, [pc, #244] ; (8007308 <ETH_MACDMAConfig+0x38c>)
8007214: 4013 ands r3, r2
8007216: 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 |
800721a: 68ba ldr r2, [r7, #8]
dmainit.ReceiveStoreForward |
800721c: 68fb ldr r3, [r7, #12]
tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame |
800721e: 431a orrs r2, r3
dmainit.FlushReceivedFrame |
8007220: 693b ldr r3, [r7, #16]
dmainit.ReceiveStoreForward |
8007222: 431a orrs r2, r3
dmainit.TransmitStoreForward |
8007224: 697b ldr r3, [r7, #20]
dmainit.FlushReceivedFrame |
8007226: 431a orrs r2, r3
dmainit.TransmitThresholdControl |
8007228: 69bb ldr r3, [r7, #24]
dmainit.TransmitStoreForward |
800722a: 431a orrs r2, r3
dmainit.ForwardErrorFrames |
800722c: 69fb ldr r3, [r7, #28]
dmainit.TransmitThresholdControl |
800722e: 431a orrs r2, r3
dmainit.ForwardUndersizedGoodFrames |
8007230: 6a3b ldr r3, [r7, #32]
dmainit.ForwardErrorFrames |
8007232: 431a orrs r2, r3
dmainit.ReceiveThresholdControl |
8007234: 6a7b ldr r3, [r7, #36] ; 0x24
dmainit.ForwardUndersizedGoodFrames |
8007236: 431a orrs r2, r3
dmainit.SecondFrameOperate);
8007238: 6abb ldr r3, [r7, #40] ; 0x28
dmainit.ReceiveThresholdControl |
800723a: 4313 orrs r3, r2
tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame |
800723c: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007240: 4313 orrs r3, r2
8007242: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
/* Write to ETHERNET DMAOMR */
(heth->Instance)->DMAOMR = (uint32_t)tmpreg;
8007246: 687b ldr r3, [r7, #4]
8007248: 681a ldr r2, [r3, #0]
800724a: f241 0318 movw r3, #4120 ; 0x1018
800724e: 4413 add r3, r2
8007250: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
8007254: 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;
8007256: 687b ldr r3, [r7, #4]
8007258: 681a ldr r2, [r3, #0]
800725a: f241 0318 movw r3, #4120 ; 0x1018
800725e: 4413 add r3, r2
8007260: 681b ldr r3, [r3, #0]
8007262: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
8007266: 2001 movs r0, #1
8007268: f7fd fd24 bl 8004cb4 <HAL_Delay>
(heth->Instance)->DMAOMR = tmpreg;
800726c: 687b ldr r3, [r7, #4]
800726e: 681a ldr r2, [r3, #0]
8007270: f241 0318 movw r3, #4120 ; 0x1018
8007274: 4413 add r3, r2
8007276: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
800727a: 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 |
800727c: 6afa ldr r2, [r7, #44] ; 0x2c
dmainit.FixedBurst |
800727e: 6b3b ldr r3, [r7, #48] ; 0x30
(heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats |
8007280: 431a orrs r2, r3
dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */
8007282: 6b7b ldr r3, [r7, #52] ; 0x34
dmainit.FixedBurst |
8007284: 431a orrs r2, r3
dmainit.TxDMABurstLength |
8007286: 6bbb ldr r3, [r7, #56] ; 0x38
dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */
8007288: 431a orrs r2, r3
dmainit.EnhancedDescriptorFormat |
800728a: 6bfb ldr r3, [r7, #60] ; 0x3c
dmainit.TxDMABurstLength |
800728c: 431a orrs r2, r3
(dmainit.DescriptorSkipLength << 2) |
800728e: 6c3b ldr r3, [r7, #64] ; 0x40
8007290: 009b lsls r3, r3, #2
dmainit.EnhancedDescriptorFormat |
8007292: 431a orrs r2, r3
dmainit.DMAArbitration |
8007294: 6c7b ldr r3, [r7, #68] ; 0x44
(dmainit.DescriptorSkipLength << 2) |
8007296: 431a orrs r2, r3
(heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats |
8007298: 687b ldr r3, [r7, #4]
800729a: 681b ldr r3, [r3, #0]
800729c: f442 0200 orr.w r2, r2, #8388608 ; 0x800000
80072a0: f503 5380 add.w r3, r3, #4096 ; 0x1000
80072a4: 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;
80072a6: 687b ldr r3, [r7, #4]
80072a8: 681b ldr r3, [r3, #0]
80072aa: f503 5380 add.w r3, r3, #4096 ; 0x1000
80072ae: 681b ldr r3, [r3, #0]
80072b0: f8c7 30bc str.w r3, [r7, #188] ; 0xbc
HAL_Delay(ETH_REG_WRITE_DELAY);
80072b4: 2001 movs r0, #1
80072b6: f7fd fcfd bl 8004cb4 <HAL_Delay>
(heth->Instance)->DMABMR = tmpreg;
80072ba: 687b ldr r3, [r7, #4]
80072bc: 681b ldr r3, [r3, #0]
80072be: f503 5380 add.w r3, r3, #4096 ; 0x1000
80072c2: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc
80072c6: 601a str r2, [r3, #0]
if((heth->Init).RxMode == ETH_RXINTERRUPT_MODE)
80072c8: 687b ldr r3, [r7, #4]
80072ca: 699b ldr r3, [r3, #24]
80072cc: 2b01 cmp r3, #1
80072ce: d10d bne.n 80072ec <ETH_MACDMAConfig+0x370>
{
/* Enable the Ethernet Rx Interrupt */
__HAL_ETH_DMA_ENABLE_IT((heth), ETH_DMA_IT_NIS | ETH_DMA_IT_R);
80072d0: 687b ldr r3, [r7, #4]
80072d2: 681a ldr r2, [r3, #0]
80072d4: f241 031c movw r3, #4124 ; 0x101c
80072d8: 4413 add r3, r2
80072da: 681b ldr r3, [r3, #0]
80072dc: 687a ldr r2, [r7, #4]
80072de: 6811 ldr r1, [r2, #0]
80072e0: 4a0a ldr r2, [pc, #40] ; (800730c <ETH_MACDMAConfig+0x390>)
80072e2: 431a orrs r2, r3
80072e4: f241 031c movw r3, #4124 ; 0x101c
80072e8: 440b add r3, r1
80072ea: 601a str r2, [r3, #0]
}
/* Initialize MAC address in ethernet MAC */
ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr);
80072ec: 687b ldr r3, [r7, #4]
80072ee: 695b ldr r3, [r3, #20]
80072f0: 461a mov r2, r3
80072f2: 2100 movs r1, #0
80072f4: 6878 ldr r0, [r7, #4]
80072f6: f000 f80b bl 8007310 <ETH_MACAddressConfig>
}
80072fa: bf00 nop
80072fc: 37c0 adds r7, #192 ; 0xc0
80072fe: 46bd mov sp, r7
8007300: bd80 pop {r7, pc}
8007302: bf00 nop
8007304: ff20810f .word 0xff20810f
8007308: f8de3f23 .word 0xf8de3f23
800730c: 00010040 .word 0x00010040
08007310 <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)
{
8007310: b480 push {r7}
8007312: b087 sub sp, #28
8007314: af00 add r7, sp, #0
8007316: 60f8 str r0, [r7, #12]
8007318: 60b9 str r1, [r7, #8]
800731a: 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];
800731c: 687b ldr r3, [r7, #4]
800731e: 3305 adds r3, #5
8007320: 781b ldrb r3, [r3, #0]
8007322: 021b lsls r3, r3, #8
8007324: 687a ldr r2, [r7, #4]
8007326: 3204 adds r2, #4
8007328: 7812 ldrb r2, [r2, #0]
800732a: 4313 orrs r3, r2
800732c: 617b str r3, [r7, #20]
/* Load the selected MAC address high register */
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_HBASE + MacAddr))) = tmpreg;
800732e: 68ba ldr r2, [r7, #8]
8007330: 4b11 ldr r3, [pc, #68] ; (8007378 <ETH_MACAddressConfig+0x68>)
8007332: 4413 add r3, r2
8007334: 461a mov r2, r3
8007336: 697b ldr r3, [r7, #20]
8007338: 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];
800733a: 687b ldr r3, [r7, #4]
800733c: 3303 adds r3, #3
800733e: 781b ldrb r3, [r3, #0]
8007340: 061a lsls r2, r3, #24
8007342: 687b ldr r3, [r7, #4]
8007344: 3302 adds r3, #2
8007346: 781b ldrb r3, [r3, #0]
8007348: 041b lsls r3, r3, #16
800734a: 431a orrs r2, r3
800734c: 687b ldr r3, [r7, #4]
800734e: 3301 adds r3, #1
8007350: 781b ldrb r3, [r3, #0]
8007352: 021b lsls r3, r3, #8
8007354: 4313 orrs r3, r2
8007356: 687a ldr r2, [r7, #4]
8007358: 7812 ldrb r2, [r2, #0]
800735a: 4313 orrs r3, r2
800735c: 617b str r3, [r7, #20]
/* Load the selected MAC address low register */
(*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_LBASE + MacAddr))) = tmpreg;
800735e: 68ba ldr r2, [r7, #8]
8007360: 4b06 ldr r3, [pc, #24] ; (800737c <ETH_MACAddressConfig+0x6c>)
8007362: 4413 add r3, r2
8007364: 461a mov r2, r3
8007366: 697b ldr r3, [r7, #20]
8007368: 6013 str r3, [r2, #0]
}
800736a: bf00 nop
800736c: 371c adds r7, #28
800736e: 46bd mov sp, r7
8007370: f85d 7b04 ldr.w r7, [sp], #4
8007374: 4770 bx lr
8007376: bf00 nop
8007378: 40028040 .word 0x40028040
800737c: 40028044 .word 0x40028044
08007380 <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)
{
8007380: b580 push {r7, lr}
8007382: b084 sub sp, #16
8007384: af00 add r7, sp, #0
8007386: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8007388: 2300 movs r3, #0
800738a: 60fb str r3, [r7, #12]
/* Enable the MAC transmission */
(heth->Instance)->MACCR |= ETH_MACCR_TE;
800738c: 687b ldr r3, [r7, #4]
800738e: 681b ldr r3, [r3, #0]
8007390: 681a ldr r2, [r3, #0]
8007392: 687b ldr r3, [r7, #4]
8007394: 681b ldr r3, [r3, #0]
8007396: f042 0208 orr.w r2, r2, #8
800739a: 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;
800739c: 687b ldr r3, [r7, #4]
800739e: 681b ldr r3, [r3, #0]
80073a0: 681b ldr r3, [r3, #0]
80073a2: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80073a4: 2001 movs r0, #1
80073a6: f7fd fc85 bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
80073aa: 687b ldr r3, [r7, #4]
80073ac: 681b ldr r3, [r3, #0]
80073ae: 68fa ldr r2, [r7, #12]
80073b0: 601a str r2, [r3, #0]
}
80073b2: bf00 nop
80073b4: 3710 adds r7, #16
80073b6: 46bd mov sp, r7
80073b8: bd80 pop {r7, pc}
080073ba <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)
{
80073ba: b580 push {r7, lr}
80073bc: b084 sub sp, #16
80073be: af00 add r7, sp, #0
80073c0: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
80073c2: 2300 movs r3, #0
80073c4: 60fb str r3, [r7, #12]
/* Disable the MAC transmission */
(heth->Instance)->MACCR &= ~ETH_MACCR_TE;
80073c6: 687b ldr r3, [r7, #4]
80073c8: 681b ldr r3, [r3, #0]
80073ca: 681a ldr r2, [r3, #0]
80073cc: 687b ldr r3, [r7, #4]
80073ce: 681b ldr r3, [r3, #0]
80073d0: f022 0208 bic.w r2, r2, #8
80073d4: 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;
80073d6: 687b ldr r3, [r7, #4]
80073d8: 681b ldr r3, [r3, #0]
80073da: 681b ldr r3, [r3, #0]
80073dc: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
80073de: 2001 movs r0, #1
80073e0: f7fd fc68 bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
80073e4: 687b ldr r3, [r7, #4]
80073e6: 681b ldr r3, [r3, #0]
80073e8: 68fa ldr r2, [r7, #12]
80073ea: 601a str r2, [r3, #0]
}
80073ec: bf00 nop
80073ee: 3710 adds r7, #16
80073f0: 46bd mov sp, r7
80073f2: bd80 pop {r7, pc}
080073f4 <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)
{
80073f4: b580 push {r7, lr}
80073f6: b084 sub sp, #16
80073f8: af00 add r7, sp, #0
80073fa: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
80073fc: 2300 movs r3, #0
80073fe: 60fb str r3, [r7, #12]
/* Enable the MAC reception */
(heth->Instance)->MACCR |= ETH_MACCR_RE;
8007400: 687b ldr r3, [r7, #4]
8007402: 681b ldr r3, [r3, #0]
8007404: 681a ldr r2, [r3, #0]
8007406: 687b ldr r3, [r7, #4]
8007408: 681b ldr r3, [r3, #0]
800740a: f042 0204 orr.w r2, r2, #4
800740e: 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;
8007410: 687b ldr r3, [r7, #4]
8007412: 681b ldr r3, [r3, #0]
8007414: 681b ldr r3, [r3, #0]
8007416: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8007418: 2001 movs r0, #1
800741a: f7fd fc4b bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
800741e: 687b ldr r3, [r7, #4]
8007420: 681b ldr r3, [r3, #0]
8007422: 68fa ldr r2, [r7, #12]
8007424: 601a str r2, [r3, #0]
}
8007426: bf00 nop
8007428: 3710 adds r7, #16
800742a: 46bd mov sp, r7
800742c: bd80 pop {r7, pc}
0800742e <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)
{
800742e: b580 push {r7, lr}
8007430: b084 sub sp, #16
8007432: af00 add r7, sp, #0
8007434: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8007436: 2300 movs r3, #0
8007438: 60fb str r3, [r7, #12]
/* Disable the MAC reception */
(heth->Instance)->MACCR &= ~ETH_MACCR_RE;
800743a: 687b ldr r3, [r7, #4]
800743c: 681b ldr r3, [r3, #0]
800743e: 681a ldr r2, [r3, #0]
8007440: 687b ldr r3, [r7, #4]
8007442: 681b ldr r3, [r3, #0]
8007444: f022 0204 bic.w r2, r2, #4
8007448: 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;
800744a: 687b ldr r3, [r7, #4]
800744c: 681b ldr r3, [r3, #0]
800744e: 681b ldr r3, [r3, #0]
8007450: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
8007452: 2001 movs r0, #1
8007454: f7fd fc2e bl 8004cb4 <HAL_Delay>
(heth->Instance)->MACCR = tmpreg;
8007458: 687b ldr r3, [r7, #4]
800745a: 681b ldr r3, [r3, #0]
800745c: 68fa ldr r2, [r7, #12]
800745e: 601a str r2, [r3, #0]
}
8007460: bf00 nop
8007462: 3710 adds r7, #16
8007464: 46bd mov sp, r7
8007466: bd80 pop {r7, pc}
08007468 <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)
{
8007468: b480 push {r7}
800746a: b083 sub sp, #12
800746c: af00 add r7, sp, #0
800746e: 6078 str r0, [r7, #4]
/* Enable the DMA transmission */
(heth->Instance)->DMAOMR |= ETH_DMAOMR_ST;
8007470: 687b ldr r3, [r7, #4]
8007472: 681a ldr r2, [r3, #0]
8007474: f241 0318 movw r3, #4120 ; 0x1018
8007478: 4413 add r3, r2
800747a: 681b ldr r3, [r3, #0]
800747c: 687a ldr r2, [r7, #4]
800747e: 6811 ldr r1, [r2, #0]
8007480: f443 5200 orr.w r2, r3, #8192 ; 0x2000
8007484: f241 0318 movw r3, #4120 ; 0x1018
8007488: 440b add r3, r1
800748a: 601a str r2, [r3, #0]
}
800748c: bf00 nop
800748e: 370c adds r7, #12
8007490: 46bd mov sp, r7
8007492: f85d 7b04 ldr.w r7, [sp], #4
8007496: 4770 bx lr
08007498 <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)
{
8007498: b480 push {r7}
800749a: b083 sub sp, #12
800749c: af00 add r7, sp, #0
800749e: 6078 str r0, [r7, #4]
/* Disable the DMA transmission */
(heth->Instance)->DMAOMR &= ~ETH_DMAOMR_ST;
80074a0: 687b ldr r3, [r7, #4]
80074a2: 681a ldr r2, [r3, #0]
80074a4: f241 0318 movw r3, #4120 ; 0x1018
80074a8: 4413 add r3, r2
80074aa: 681b ldr r3, [r3, #0]
80074ac: 687a ldr r2, [r7, #4]
80074ae: 6811 ldr r1, [r2, #0]
80074b0: f423 5200 bic.w r2, r3, #8192 ; 0x2000
80074b4: f241 0318 movw r3, #4120 ; 0x1018
80074b8: 440b add r3, r1
80074ba: 601a str r2, [r3, #0]
}
80074bc: bf00 nop
80074be: 370c adds r7, #12
80074c0: 46bd mov sp, r7
80074c2: f85d 7b04 ldr.w r7, [sp], #4
80074c6: 4770 bx lr
080074c8 <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)
{
80074c8: b480 push {r7}
80074ca: b083 sub sp, #12
80074cc: af00 add r7, sp, #0
80074ce: 6078 str r0, [r7, #4]
/* Enable the DMA reception */
(heth->Instance)->DMAOMR |= ETH_DMAOMR_SR;
80074d0: 687b ldr r3, [r7, #4]
80074d2: 681a ldr r2, [r3, #0]
80074d4: f241 0318 movw r3, #4120 ; 0x1018
80074d8: 4413 add r3, r2
80074da: 681b ldr r3, [r3, #0]
80074dc: 687a ldr r2, [r7, #4]
80074de: 6811 ldr r1, [r2, #0]
80074e0: f043 0202 orr.w r2, r3, #2
80074e4: f241 0318 movw r3, #4120 ; 0x1018
80074e8: 440b add r3, r1
80074ea: 601a str r2, [r3, #0]
}
80074ec: bf00 nop
80074ee: 370c adds r7, #12
80074f0: 46bd mov sp, r7
80074f2: f85d 7b04 ldr.w r7, [sp], #4
80074f6: 4770 bx lr
080074f8 <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)
{
80074f8: b480 push {r7}
80074fa: b083 sub sp, #12
80074fc: af00 add r7, sp, #0
80074fe: 6078 str r0, [r7, #4]
/* Disable the DMA reception */
(heth->Instance)->DMAOMR &= ~ETH_DMAOMR_SR;
8007500: 687b ldr r3, [r7, #4]
8007502: 681a ldr r2, [r3, #0]
8007504: f241 0318 movw r3, #4120 ; 0x1018
8007508: 4413 add r3, r2
800750a: 681b ldr r3, [r3, #0]
800750c: 687a ldr r2, [r7, #4]
800750e: 6811 ldr r1, [r2, #0]
8007510: f023 0202 bic.w r2, r3, #2
8007514: f241 0318 movw r3, #4120 ; 0x1018
8007518: 440b add r3, r1
800751a: 601a str r2, [r3, #0]
}
800751c: bf00 nop
800751e: 370c adds r7, #12
8007520: 46bd mov sp, r7
8007522: f85d 7b04 ldr.w r7, [sp], #4
8007526: 4770 bx lr
08007528 <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)
{
8007528: b580 push {r7, lr}
800752a: b084 sub sp, #16
800752c: af00 add r7, sp, #0
800752e: 6078 str r0, [r7, #4]
__IO uint32_t tmpreg = 0;
8007530: 2300 movs r3, #0
8007532: 60fb str r3, [r7, #12]
/* Set the Flush Transmit FIFO bit */
(heth->Instance)->DMAOMR |= ETH_DMAOMR_FTF;
8007534: 687b ldr r3, [r7, #4]
8007536: 681a ldr r2, [r3, #0]
8007538: f241 0318 movw r3, #4120 ; 0x1018
800753c: 4413 add r3, r2
800753e: 681b ldr r3, [r3, #0]
8007540: 687a ldr r2, [r7, #4]
8007542: 6811 ldr r1, [r2, #0]
8007544: f443 1280 orr.w r2, r3, #1048576 ; 0x100000
8007548: f241 0318 movw r3, #4120 ; 0x1018
800754c: 440b add r3, r1
800754e: 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;
8007550: 687b ldr r3, [r7, #4]
8007552: 681a ldr r2, [r3, #0]
8007554: f241 0318 movw r3, #4120 ; 0x1018
8007558: 4413 add r3, r2
800755a: 681b ldr r3, [r3, #0]
800755c: 60fb str r3, [r7, #12]
HAL_Delay(ETH_REG_WRITE_DELAY);
800755e: 2001 movs r0, #1
8007560: f7fd fba8 bl 8004cb4 <HAL_Delay>
(heth->Instance)->DMAOMR = tmpreg;
8007564: 687b ldr r3, [r7, #4]
8007566: 6819 ldr r1, [r3, #0]
8007568: 68fa ldr r2, [r7, #12]
800756a: f241 0318 movw r3, #4120 ; 0x1018
800756e: 440b add r3, r1
8007570: 601a str r2, [r3, #0]
}
8007572: bf00 nop
8007574: 3710 adds r7, #16
8007576: 46bd mov sp, r7
8007578: bd80 pop {r7, pc}
...
0800757c <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)
{
800757c: b480 push {r7}
800757e: b089 sub sp, #36 ; 0x24
8007580: af00 add r7, sp, #0
8007582: 6078 str r0, [r7, #4]
8007584: 6039 str r1, [r7, #0]
uint32_t position = 0x00;
8007586: 2300 movs r3, #0
8007588: 61fb str r3, [r7, #28]
uint32_t ioposition = 0x00;
800758a: 2300 movs r3, #0
800758c: 617b str r3, [r7, #20]
uint32_t iocurrent = 0x00;
800758e: 2300 movs r3, #0
8007590: 613b str r3, [r7, #16]
uint32_t temp = 0x00;
8007592: 2300 movs r3, #0
8007594: 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++)
8007596: 2300 movs r3, #0
8007598: 61fb str r3, [r7, #28]
800759a: e175 b.n 8007888 <HAL_GPIO_Init+0x30c>
{
/* Get the IO position */
ioposition = ((uint32_t)0x01) << position;
800759c: 2201 movs r2, #1
800759e: 69fb ldr r3, [r7, #28]
80075a0: fa02 f303 lsl.w r3, r2, r3
80075a4: 617b str r3, [r7, #20]
/* Get the current IO position */
iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
80075a6: 683b ldr r3, [r7, #0]
80075a8: 681b ldr r3, [r3, #0]
80075aa: 697a ldr r2, [r7, #20]
80075ac: 4013 ands r3, r2
80075ae: 613b str r3, [r7, #16]
if(iocurrent == ioposition)
80075b0: 693a ldr r2, [r7, #16]
80075b2: 697b ldr r3, [r7, #20]
80075b4: 429a cmp r2, r3
80075b6: f040 8164 bne.w 8007882 <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) ||
80075ba: 683b ldr r3, [r7, #0]
80075bc: 685b ldr r3, [r3, #4]
80075be: 2b01 cmp r3, #1
80075c0: d00b beq.n 80075da <HAL_GPIO_Init+0x5e>
80075c2: 683b ldr r3, [r7, #0]
80075c4: 685b ldr r3, [r3, #4]
80075c6: 2b02 cmp r3, #2
80075c8: d007 beq.n 80075da <HAL_GPIO_Init+0x5e>
(GPIO_Init->Mode == GPIO_MODE_OUTPUT_OD) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
80075ca: 683b ldr r3, [r7, #0]
80075cc: 685b ldr r3, [r3, #4]
if((GPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_PP) ||
80075ce: 2b11 cmp r3, #17
80075d0: d003 beq.n 80075da <HAL_GPIO_Init+0x5e>
(GPIO_Init->Mode == GPIO_MODE_OUTPUT_OD) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
80075d2: 683b ldr r3, [r7, #0]
80075d4: 685b ldr r3, [r3, #4]
80075d6: 2b12 cmp r3, #18
80075d8: d130 bne.n 800763c <HAL_GPIO_Init+0xc0>
{
/* Check the Speed parameter */
assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
/* Configure the IO Speed */
temp = GPIOx->OSPEEDR;
80075da: 687b ldr r3, [r7, #4]
80075dc: 689b ldr r3, [r3, #8]
80075de: 61bb str r3, [r7, #24]
temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2));
80075e0: 69fb ldr r3, [r7, #28]
80075e2: 005b lsls r3, r3, #1
80075e4: 2203 movs r2, #3
80075e6: fa02 f303 lsl.w r3, r2, r3
80075ea: 43db mvns r3, r3
80075ec: 69ba ldr r2, [r7, #24]
80075ee: 4013 ands r3, r2
80075f0: 61bb str r3, [r7, #24]
temp |= (GPIO_Init->Speed << (position * 2));
80075f2: 683b ldr r3, [r7, #0]
80075f4: 68da ldr r2, [r3, #12]
80075f6: 69fb ldr r3, [r7, #28]
80075f8: 005b lsls r3, r3, #1
80075fa: fa02 f303 lsl.w r3, r2, r3
80075fe: 69ba ldr r2, [r7, #24]
8007600: 4313 orrs r3, r2
8007602: 61bb str r3, [r7, #24]
GPIOx->OSPEEDR = temp;
8007604: 687b ldr r3, [r7, #4]
8007606: 69ba ldr r2, [r7, #24]
8007608: 609a str r2, [r3, #8]
/* Configure the IO Output Type */
temp = GPIOx->OTYPER;
800760a: 687b ldr r3, [r7, #4]
800760c: 685b ldr r3, [r3, #4]
800760e: 61bb str r3, [r7, #24]
temp &= ~(GPIO_OTYPER_OT_0 << position) ;
8007610: 2201 movs r2, #1
8007612: 69fb ldr r3, [r7, #28]
8007614: fa02 f303 lsl.w r3, r2, r3
8007618: 43db mvns r3, r3
800761a: 69ba ldr r2, [r7, #24]
800761c: 4013 ands r3, r2
800761e: 61bb str r3, [r7, #24]
temp |= (((GPIO_Init->Mode & GPIO_OUTPUT_TYPE) >> 4) << position);
8007620: 683b ldr r3, [r7, #0]
8007622: 685b ldr r3, [r3, #4]
8007624: 091b lsrs r3, r3, #4
8007626: f003 0201 and.w r2, r3, #1
800762a: 69fb ldr r3, [r7, #28]
800762c: fa02 f303 lsl.w r3, r2, r3
8007630: 69ba ldr r2, [r7, #24]
8007632: 4313 orrs r3, r2
8007634: 61bb str r3, [r7, #24]
GPIOx->OTYPER = temp;
8007636: 687b ldr r3, [r7, #4]
8007638: 69ba ldr r2, [r7, #24]
800763a: 605a str r2, [r3, #4]
}
/* Activate the Pull-up or Pull down resistor for the current IO */
temp = GPIOx->PUPDR;
800763c: 687b ldr r3, [r7, #4]
800763e: 68db ldr r3, [r3, #12]
8007640: 61bb str r3, [r7, #24]
temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2));
8007642: 69fb ldr r3, [r7, #28]
8007644: 005b lsls r3, r3, #1
8007646: 2203 movs r2, #3
8007648: fa02 f303 lsl.w r3, r2, r3
800764c: 43db mvns r3, r3
800764e: 69ba ldr r2, [r7, #24]
8007650: 4013 ands r3, r2
8007652: 61bb str r3, [r7, #24]
temp |= ((GPIO_Init->Pull) << (position * 2));
8007654: 683b ldr r3, [r7, #0]
8007656: 689a ldr r2, [r3, #8]
8007658: 69fb ldr r3, [r7, #28]
800765a: 005b lsls r3, r3, #1
800765c: fa02 f303 lsl.w r3, r2, r3
8007660: 69ba ldr r2, [r7, #24]
8007662: 4313 orrs r3, r2
8007664: 61bb str r3, [r7, #24]
GPIOx->PUPDR = temp;
8007666: 687b ldr r3, [r7, #4]
8007668: 69ba ldr r2, [r7, #24]
800766a: 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))
800766c: 683b ldr r3, [r7, #0]
800766e: 685b ldr r3, [r3, #4]
8007670: 2b02 cmp r3, #2
8007672: d003 beq.n 800767c <HAL_GPIO_Init+0x100>
8007674: 683b ldr r3, [r7, #0]
8007676: 685b ldr r3, [r3, #4]
8007678: 2b12 cmp r3, #18
800767a: d123 bne.n 80076c4 <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];
800767c: 69fb ldr r3, [r7, #28]
800767e: 08da lsrs r2, r3, #3
8007680: 687b ldr r3, [r7, #4]
8007682: 3208 adds r2, #8
8007684: f853 3022 ldr.w r3, [r3, r2, lsl #2]
8007688: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)0xF << ((uint32_t)(position & (uint32_t)0x07) * 4)) ;
800768a: 69fb ldr r3, [r7, #28]
800768c: f003 0307 and.w r3, r3, #7
8007690: 009b lsls r3, r3, #2
8007692: 220f movs r2, #15
8007694: fa02 f303 lsl.w r3, r2, r3
8007698: 43db mvns r3, r3
800769a: 69ba ldr r2, [r7, #24]
800769c: 4013 ands r3, r2
800769e: 61bb str r3, [r7, #24]
temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & (uint32_t)0x07) * 4));
80076a0: 683b ldr r3, [r7, #0]
80076a2: 691a ldr r2, [r3, #16]
80076a4: 69fb ldr r3, [r7, #28]
80076a6: f003 0307 and.w r3, r3, #7
80076aa: 009b lsls r3, r3, #2
80076ac: fa02 f303 lsl.w r3, r2, r3
80076b0: 69ba ldr r2, [r7, #24]
80076b2: 4313 orrs r3, r2
80076b4: 61bb str r3, [r7, #24]
GPIOx->AFR[position >> 3] = temp;
80076b6: 69fb ldr r3, [r7, #28]
80076b8: 08da lsrs r2, r3, #3
80076ba: 687b ldr r3, [r7, #4]
80076bc: 3208 adds r2, #8
80076be: 69b9 ldr r1, [r7, #24]
80076c0: f843 1022 str.w r1, [r3, r2, lsl #2]
}
/* Configure IO Direction mode (Input, Output, Alternate or Analog) */
temp = GPIOx->MODER;
80076c4: 687b ldr r3, [r7, #4]
80076c6: 681b ldr r3, [r3, #0]
80076c8: 61bb str r3, [r7, #24]
temp &= ~(GPIO_MODER_MODER0 << (position * 2));
80076ca: 69fb ldr r3, [r7, #28]
80076cc: 005b lsls r3, r3, #1
80076ce: 2203 movs r2, #3
80076d0: fa02 f303 lsl.w r3, r2, r3
80076d4: 43db mvns r3, r3
80076d6: 69ba ldr r2, [r7, #24]
80076d8: 4013 ands r3, r2
80076da: 61bb str r3, [r7, #24]
temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2));
80076dc: 683b ldr r3, [r7, #0]
80076de: 685b ldr r3, [r3, #4]
80076e0: f003 0203 and.w r2, r3, #3
80076e4: 69fb ldr r3, [r7, #28]
80076e6: 005b lsls r3, r3, #1
80076e8: fa02 f303 lsl.w r3, r2, r3
80076ec: 69ba ldr r2, [r7, #24]
80076ee: 4313 orrs r3, r2
80076f0: 61bb str r3, [r7, #24]
GPIOx->MODER = temp;
80076f2: 687b ldr r3, [r7, #4]
80076f4: 69ba ldr r2, [r7, #24]
80076f6: 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)
80076f8: 683b ldr r3, [r7, #0]
80076fa: 685b ldr r3, [r3, #4]
80076fc: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8007700: 2b00 cmp r3, #0
8007702: f000 80be beq.w 8007882 <HAL_GPIO_Init+0x306>
{
/* Enable SYSCFG Clock */
__HAL_RCC_SYSCFG_CLK_ENABLE();
8007706: 4b65 ldr r3, [pc, #404] ; (800789c <HAL_GPIO_Init+0x320>)
8007708: 6c5b ldr r3, [r3, #68] ; 0x44
800770a: 4a64 ldr r2, [pc, #400] ; (800789c <HAL_GPIO_Init+0x320>)
800770c: f443 4380 orr.w r3, r3, #16384 ; 0x4000
8007710: 6453 str r3, [r2, #68] ; 0x44
8007712: 4b62 ldr r3, [pc, #392] ; (800789c <HAL_GPIO_Init+0x320>)
8007714: 6c5b ldr r3, [r3, #68] ; 0x44
8007716: f403 4380 and.w r3, r3, #16384 ; 0x4000
800771a: 60fb str r3, [r7, #12]
800771c: 68fb ldr r3, [r7, #12]
temp = SYSCFG->EXTICR[position >> 2];
800771e: 4a60 ldr r2, [pc, #384] ; (80078a0 <HAL_GPIO_Init+0x324>)
8007720: 69fb ldr r3, [r7, #28]
8007722: 089b lsrs r3, r3, #2
8007724: 3302 adds r3, #2
8007726: f852 3023 ldr.w r3, [r2, r3, lsl #2]
800772a: 61bb str r3, [r7, #24]
temp &= ~(((uint32_t)0x0F) << (4 * (position & 0x03)));
800772c: 69fb ldr r3, [r7, #28]
800772e: f003 0303 and.w r3, r3, #3
8007732: 009b lsls r3, r3, #2
8007734: 220f movs r2, #15
8007736: fa02 f303 lsl.w r3, r2, r3
800773a: 43db mvns r3, r3
800773c: 69ba ldr r2, [r7, #24]
800773e: 4013 ands r3, r2
8007740: 61bb str r3, [r7, #24]
temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4 * (position & 0x03)));
8007742: 687b ldr r3, [r7, #4]
8007744: 4a57 ldr r2, [pc, #348] ; (80078a4 <HAL_GPIO_Init+0x328>)
8007746: 4293 cmp r3, r2
8007748: d037 beq.n 80077ba <HAL_GPIO_Init+0x23e>
800774a: 687b ldr r3, [r7, #4]
800774c: 4a56 ldr r2, [pc, #344] ; (80078a8 <HAL_GPIO_Init+0x32c>)
800774e: 4293 cmp r3, r2
8007750: d031 beq.n 80077b6 <HAL_GPIO_Init+0x23a>
8007752: 687b ldr r3, [r7, #4]
8007754: 4a55 ldr r2, [pc, #340] ; (80078ac <HAL_GPIO_Init+0x330>)
8007756: 4293 cmp r3, r2
8007758: d02b beq.n 80077b2 <HAL_GPIO_Init+0x236>
800775a: 687b ldr r3, [r7, #4]
800775c: 4a54 ldr r2, [pc, #336] ; (80078b0 <HAL_GPIO_Init+0x334>)
800775e: 4293 cmp r3, r2
8007760: d025 beq.n 80077ae <HAL_GPIO_Init+0x232>
8007762: 687b ldr r3, [r7, #4]
8007764: 4a53 ldr r2, [pc, #332] ; (80078b4 <HAL_GPIO_Init+0x338>)
8007766: 4293 cmp r3, r2
8007768: d01f beq.n 80077aa <HAL_GPIO_Init+0x22e>
800776a: 687b ldr r3, [r7, #4]
800776c: 4a52 ldr r2, [pc, #328] ; (80078b8 <HAL_GPIO_Init+0x33c>)
800776e: 4293 cmp r3, r2
8007770: d019 beq.n 80077a6 <HAL_GPIO_Init+0x22a>
8007772: 687b ldr r3, [r7, #4]
8007774: 4a51 ldr r2, [pc, #324] ; (80078bc <HAL_GPIO_Init+0x340>)
8007776: 4293 cmp r3, r2
8007778: d013 beq.n 80077a2 <HAL_GPIO_Init+0x226>
800777a: 687b ldr r3, [r7, #4]
800777c: 4a50 ldr r2, [pc, #320] ; (80078c0 <HAL_GPIO_Init+0x344>)
800777e: 4293 cmp r3, r2
8007780: d00d beq.n 800779e <HAL_GPIO_Init+0x222>
8007782: 687b ldr r3, [r7, #4]
8007784: 4a4f ldr r2, [pc, #316] ; (80078c4 <HAL_GPIO_Init+0x348>)
8007786: 4293 cmp r3, r2
8007788: d007 beq.n 800779a <HAL_GPIO_Init+0x21e>
800778a: 687b ldr r3, [r7, #4]
800778c: 4a4e ldr r2, [pc, #312] ; (80078c8 <HAL_GPIO_Init+0x34c>)
800778e: 4293 cmp r3, r2
8007790: d101 bne.n 8007796 <HAL_GPIO_Init+0x21a>
8007792: 2309 movs r3, #9
8007794: e012 b.n 80077bc <HAL_GPIO_Init+0x240>
8007796: 230a movs r3, #10
8007798: e010 b.n 80077bc <HAL_GPIO_Init+0x240>
800779a: 2308 movs r3, #8
800779c: e00e b.n 80077bc <HAL_GPIO_Init+0x240>
800779e: 2307 movs r3, #7
80077a0: e00c b.n 80077bc <HAL_GPIO_Init+0x240>
80077a2: 2306 movs r3, #6
80077a4: e00a b.n 80077bc <HAL_GPIO_Init+0x240>
80077a6: 2305 movs r3, #5
80077a8: e008 b.n 80077bc <HAL_GPIO_Init+0x240>
80077aa: 2304 movs r3, #4
80077ac: e006 b.n 80077bc <HAL_GPIO_Init+0x240>
80077ae: 2303 movs r3, #3
80077b0: e004 b.n 80077bc <HAL_GPIO_Init+0x240>
80077b2: 2302 movs r3, #2
80077b4: e002 b.n 80077bc <HAL_GPIO_Init+0x240>
80077b6: 2301 movs r3, #1
80077b8: e000 b.n 80077bc <HAL_GPIO_Init+0x240>
80077ba: 2300 movs r3, #0
80077bc: 69fa ldr r2, [r7, #28]
80077be: f002 0203 and.w r2, r2, #3
80077c2: 0092 lsls r2, r2, #2
80077c4: 4093 lsls r3, r2
80077c6: 69ba ldr r2, [r7, #24]
80077c8: 4313 orrs r3, r2
80077ca: 61bb str r3, [r7, #24]
SYSCFG->EXTICR[position >> 2] = temp;
80077cc: 4934 ldr r1, [pc, #208] ; (80078a0 <HAL_GPIO_Init+0x324>)
80077ce: 69fb ldr r3, [r7, #28]
80077d0: 089b lsrs r3, r3, #2
80077d2: 3302 adds r3, #2
80077d4: 69ba ldr r2, [r7, #24]
80077d6: f841 2023 str.w r2, [r1, r3, lsl #2]
/* Clear EXTI line configuration */
temp = EXTI->IMR;
80077da: 4b3c ldr r3, [pc, #240] ; (80078cc <HAL_GPIO_Init+0x350>)
80077dc: 681b ldr r3, [r3, #0]
80077de: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
80077e0: 693b ldr r3, [r7, #16]
80077e2: 43db mvns r3, r3
80077e4: 69ba ldr r2, [r7, #24]
80077e6: 4013 ands r3, r2
80077e8: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT)
80077ea: 683b ldr r3, [r7, #0]
80077ec: 685b ldr r3, [r3, #4]
80077ee: f403 3380 and.w r3, r3, #65536 ; 0x10000
80077f2: 2b00 cmp r3, #0
80077f4: d003 beq.n 80077fe <HAL_GPIO_Init+0x282>
{
temp |= iocurrent;
80077f6: 69ba ldr r2, [r7, #24]
80077f8: 693b ldr r3, [r7, #16]
80077fa: 4313 orrs r3, r2
80077fc: 61bb str r3, [r7, #24]
}
EXTI->IMR = temp;
80077fe: 4a33 ldr r2, [pc, #204] ; (80078cc <HAL_GPIO_Init+0x350>)
8007800: 69bb ldr r3, [r7, #24]
8007802: 6013 str r3, [r2, #0]
temp = EXTI->EMR;
8007804: 4b31 ldr r3, [pc, #196] ; (80078cc <HAL_GPIO_Init+0x350>)
8007806: 685b ldr r3, [r3, #4]
8007808: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
800780a: 693b ldr r3, [r7, #16]
800780c: 43db mvns r3, r3
800780e: 69ba ldr r2, [r7, #24]
8007810: 4013 ands r3, r2
8007812: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT)
8007814: 683b ldr r3, [r7, #0]
8007816: 685b ldr r3, [r3, #4]
8007818: f403 3300 and.w r3, r3, #131072 ; 0x20000
800781c: 2b00 cmp r3, #0
800781e: d003 beq.n 8007828 <HAL_GPIO_Init+0x2ac>
{
temp |= iocurrent;
8007820: 69ba ldr r2, [r7, #24]
8007822: 693b ldr r3, [r7, #16]
8007824: 4313 orrs r3, r2
8007826: 61bb str r3, [r7, #24]
}
EXTI->EMR = temp;
8007828: 4a28 ldr r2, [pc, #160] ; (80078cc <HAL_GPIO_Init+0x350>)
800782a: 69bb ldr r3, [r7, #24]
800782c: 6053 str r3, [r2, #4]
/* Clear Rising Falling edge configuration */
temp = EXTI->RTSR;
800782e: 4b27 ldr r3, [pc, #156] ; (80078cc <HAL_GPIO_Init+0x350>)
8007830: 689b ldr r3, [r3, #8]
8007832: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
8007834: 693b ldr r3, [r7, #16]
8007836: 43db mvns r3, r3
8007838: 69ba ldr r2, [r7, #24]
800783a: 4013 ands r3, r2
800783c: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & RISING_EDGE) == RISING_EDGE)
800783e: 683b ldr r3, [r7, #0]
8007840: 685b ldr r3, [r3, #4]
8007842: f403 1380 and.w r3, r3, #1048576 ; 0x100000
8007846: 2b00 cmp r3, #0
8007848: d003 beq.n 8007852 <HAL_GPIO_Init+0x2d6>
{
temp |= iocurrent;
800784a: 69ba ldr r2, [r7, #24]
800784c: 693b ldr r3, [r7, #16]
800784e: 4313 orrs r3, r2
8007850: 61bb str r3, [r7, #24]
}
EXTI->RTSR = temp;
8007852: 4a1e ldr r2, [pc, #120] ; (80078cc <HAL_GPIO_Init+0x350>)
8007854: 69bb ldr r3, [r7, #24]
8007856: 6093 str r3, [r2, #8]
temp = EXTI->FTSR;
8007858: 4b1c ldr r3, [pc, #112] ; (80078cc <HAL_GPIO_Init+0x350>)
800785a: 68db ldr r3, [r3, #12]
800785c: 61bb str r3, [r7, #24]
temp &= ~((uint32_t)iocurrent);
800785e: 693b ldr r3, [r7, #16]
8007860: 43db mvns r3, r3
8007862: 69ba ldr r2, [r7, #24]
8007864: 4013 ands r3, r2
8007866: 61bb str r3, [r7, #24]
if((GPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE)
8007868: 683b ldr r3, [r7, #0]
800786a: 685b ldr r3, [r3, #4]
800786c: f403 1300 and.w r3, r3, #2097152 ; 0x200000
8007870: 2b00 cmp r3, #0
8007872: d003 beq.n 800787c <HAL_GPIO_Init+0x300>
{
temp |= iocurrent;
8007874: 69ba ldr r2, [r7, #24]
8007876: 693b ldr r3, [r7, #16]
8007878: 4313 orrs r3, r2
800787a: 61bb str r3, [r7, #24]
}
EXTI->FTSR = temp;
800787c: 4a13 ldr r2, [pc, #76] ; (80078cc <HAL_GPIO_Init+0x350>)
800787e: 69bb ldr r3, [r7, #24]
8007880: 60d3 str r3, [r2, #12]
for(position = 0; position < GPIO_NUMBER; position++)
8007882: 69fb ldr r3, [r7, #28]
8007884: 3301 adds r3, #1
8007886: 61fb str r3, [r7, #28]
8007888: 69fb ldr r3, [r7, #28]
800788a: 2b0f cmp r3, #15
800788c: f67f ae86 bls.w 800759c <HAL_GPIO_Init+0x20>
}
}
}
}
8007890: bf00 nop
8007892: 3724 adds r7, #36 ; 0x24
8007894: 46bd mov sp, r7
8007896: f85d 7b04 ldr.w r7, [sp], #4
800789a: 4770 bx lr
800789c: 40023800 .word 0x40023800
80078a0: 40013800 .word 0x40013800
80078a4: 40020000 .word 0x40020000
80078a8: 40020400 .word 0x40020400
80078ac: 40020800 .word 0x40020800
80078b0: 40020c00 .word 0x40020c00
80078b4: 40021000 .word 0x40021000
80078b8: 40021400 .word 0x40021400
80078bc: 40021800 .word 0x40021800
80078c0: 40021c00 .word 0x40021c00
80078c4: 40022000 .word 0x40022000
80078c8: 40022400 .word 0x40022400
80078cc: 40013c00 .word 0x40013c00
080078d0 <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)
{
80078d0: b480 push {r7}
80078d2: b087 sub sp, #28
80078d4: af00 add r7, sp, #0
80078d6: 6078 str r0, [r7, #4]
80078d8: 6039 str r1, [r7, #0]
uint32_t position;
uint32_t ioposition = 0x00;
80078da: 2300 movs r3, #0
80078dc: 613b str r3, [r7, #16]
uint32_t iocurrent = 0x00;
80078de: 2300 movs r3, #0
80078e0: 60fb str r3, [r7, #12]
uint32_t tmp = 0x00;
80078e2: 2300 movs r3, #0
80078e4: 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++)
80078e6: 2300 movs r3, #0
80078e8: 617b str r3, [r7, #20]
80078ea: e0d9 b.n 8007aa0 <HAL_GPIO_DeInit+0x1d0>
{
/* Get the IO position */
ioposition = ((uint32_t)0x01) << position;
80078ec: 2201 movs r2, #1
80078ee: 697b ldr r3, [r7, #20]
80078f0: fa02 f303 lsl.w r3, r2, r3
80078f4: 613b str r3, [r7, #16]
/* Get the current IO position */
iocurrent = (GPIO_Pin) & ioposition;
80078f6: 683a ldr r2, [r7, #0]
80078f8: 693b ldr r3, [r7, #16]
80078fa: 4013 ands r3, r2
80078fc: 60fb str r3, [r7, #12]
if(iocurrent == ioposition)
80078fe: 68fa ldr r2, [r7, #12]
8007900: 693b ldr r3, [r7, #16]
8007902: 429a cmp r2, r3
8007904: f040 80c9 bne.w 8007a9a <HAL_GPIO_DeInit+0x1ca>
{
/*------------------------- EXTI Mode Configuration --------------------*/
tmp = SYSCFG->EXTICR[position >> 2];
8007908: 4a6a ldr r2, [pc, #424] ; (8007ab4 <HAL_GPIO_DeInit+0x1e4>)
800790a: 697b ldr r3, [r7, #20]
800790c: 089b lsrs r3, r3, #2
800790e: 3302 adds r3, #2
8007910: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8007914: 60bb str r3, [r7, #8]
tmp &= (((uint32_t)0x0F) << (4 * (position & 0x03)));
8007916: 697b ldr r3, [r7, #20]
8007918: f003 0303 and.w r3, r3, #3
800791c: 009b lsls r3, r3, #2
800791e: 220f movs r2, #15
8007920: fa02 f303 lsl.w r3, r2, r3
8007924: 68ba ldr r2, [r7, #8]
8007926: 4013 ands r3, r2
8007928: 60bb str r3, [r7, #8]
if(tmp == ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4 * (position & 0x03))))
800792a: 687b ldr r3, [r7, #4]
800792c: 4a62 ldr r2, [pc, #392] ; (8007ab8 <HAL_GPIO_DeInit+0x1e8>)
800792e: 4293 cmp r3, r2
8007930: d037 beq.n 80079a2 <HAL_GPIO_DeInit+0xd2>
8007932: 687b ldr r3, [r7, #4]
8007934: 4a61 ldr r2, [pc, #388] ; (8007abc <HAL_GPIO_DeInit+0x1ec>)
8007936: 4293 cmp r3, r2
8007938: d031 beq.n 800799e <HAL_GPIO_DeInit+0xce>
800793a: 687b ldr r3, [r7, #4]
800793c: 4a60 ldr r2, [pc, #384] ; (8007ac0 <HAL_GPIO_DeInit+0x1f0>)
800793e: 4293 cmp r3, r2
8007940: d02b beq.n 800799a <HAL_GPIO_DeInit+0xca>
8007942: 687b ldr r3, [r7, #4]
8007944: 4a5f ldr r2, [pc, #380] ; (8007ac4 <HAL_GPIO_DeInit+0x1f4>)
8007946: 4293 cmp r3, r2
8007948: d025 beq.n 8007996 <HAL_GPIO_DeInit+0xc6>
800794a: 687b ldr r3, [r7, #4]
800794c: 4a5e ldr r2, [pc, #376] ; (8007ac8 <HAL_GPIO_DeInit+0x1f8>)
800794e: 4293 cmp r3, r2
8007950: d01f beq.n 8007992 <HAL_GPIO_DeInit+0xc2>
8007952: 687b ldr r3, [r7, #4]
8007954: 4a5d ldr r2, [pc, #372] ; (8007acc <HAL_GPIO_DeInit+0x1fc>)
8007956: 4293 cmp r3, r2
8007958: d019 beq.n 800798e <HAL_GPIO_DeInit+0xbe>
800795a: 687b ldr r3, [r7, #4]
800795c: 4a5c ldr r2, [pc, #368] ; (8007ad0 <HAL_GPIO_DeInit+0x200>)
800795e: 4293 cmp r3, r2
8007960: d013 beq.n 800798a <HAL_GPIO_DeInit+0xba>
8007962: 687b ldr r3, [r7, #4]
8007964: 4a5b ldr r2, [pc, #364] ; (8007ad4 <HAL_GPIO_DeInit+0x204>)
8007966: 4293 cmp r3, r2
8007968: d00d beq.n 8007986 <HAL_GPIO_DeInit+0xb6>
800796a: 687b ldr r3, [r7, #4]
800796c: 4a5a ldr r2, [pc, #360] ; (8007ad8 <HAL_GPIO_DeInit+0x208>)
800796e: 4293 cmp r3, r2
8007970: d007 beq.n 8007982 <HAL_GPIO_DeInit+0xb2>
8007972: 687b ldr r3, [r7, #4]
8007974: 4a59 ldr r2, [pc, #356] ; (8007adc <HAL_GPIO_DeInit+0x20c>)
8007976: 4293 cmp r3, r2
8007978: d101 bne.n 800797e <HAL_GPIO_DeInit+0xae>
800797a: 2309 movs r3, #9
800797c: e012 b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
800797e: 230a movs r3, #10
8007980: e010 b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
8007982: 2308 movs r3, #8
8007984: e00e b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
8007986: 2307 movs r3, #7
8007988: e00c b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
800798a: 2306 movs r3, #6
800798c: e00a b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
800798e: 2305 movs r3, #5
8007990: e008 b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
8007992: 2304 movs r3, #4
8007994: e006 b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
8007996: 2303 movs r3, #3
8007998: e004 b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
800799a: 2302 movs r3, #2
800799c: e002 b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
800799e: 2301 movs r3, #1
80079a0: e000 b.n 80079a4 <HAL_GPIO_DeInit+0xd4>
80079a2: 2300 movs r3, #0
80079a4: 697a ldr r2, [r7, #20]
80079a6: f002 0203 and.w r2, r2, #3
80079aa: 0092 lsls r2, r2, #2
80079ac: 4093 lsls r3, r2
80079ae: 68ba ldr r2, [r7, #8]
80079b0: 429a cmp r2, r3
80079b2: d132 bne.n 8007a1a <HAL_GPIO_DeInit+0x14a>
{
/* Clear EXTI line configuration */
EXTI->IMR &= ~((uint32_t)iocurrent);
80079b4: 4b4a ldr r3, [pc, #296] ; (8007ae0 <HAL_GPIO_DeInit+0x210>)
80079b6: 681a ldr r2, [r3, #0]
80079b8: 68fb ldr r3, [r7, #12]
80079ba: 43db mvns r3, r3
80079bc: 4948 ldr r1, [pc, #288] ; (8007ae0 <HAL_GPIO_DeInit+0x210>)
80079be: 4013 ands r3, r2
80079c0: 600b str r3, [r1, #0]
EXTI->EMR &= ~((uint32_t)iocurrent);
80079c2: 4b47 ldr r3, [pc, #284] ; (8007ae0 <HAL_GPIO_DeInit+0x210>)
80079c4: 685a ldr r2, [r3, #4]
80079c6: 68fb ldr r3, [r7, #12]
80079c8: 43db mvns r3, r3
80079ca: 4945 ldr r1, [pc, #276] ; (8007ae0 <HAL_GPIO_DeInit+0x210>)
80079cc: 4013 ands r3, r2
80079ce: 604b str r3, [r1, #4]
/* Clear Rising Falling edge configuration */
EXTI->RTSR &= ~((uint32_t)iocurrent);
80079d0: 4b43 ldr r3, [pc, #268] ; (8007ae0 <HAL_GPIO_DeInit+0x210>)
80079d2: 689a ldr r2, [r3, #8]
80079d4: 68fb ldr r3, [r7, #12]
80079d6: 43db mvns r3, r3
80079d8: 4941 ldr r1, [pc, #260] ; (8007ae0 <HAL_GPIO_DeInit+0x210>)
80079da: 4013 ands r3, r2
80079dc: 608b str r3, [r1, #8]
EXTI->FTSR &= ~((uint32_t)iocurrent);
80079de: 4b40 ldr r3, [pc, #256] ; (8007ae0 <HAL_GPIO_DeInit+0x210>)
80079e0: 68da ldr r2, [r3, #12]
80079e2: 68fb ldr r3, [r7, #12]
80079e4: 43db mvns r3, r3
80079e6: 493e ldr r1, [pc, #248] ; (8007ae0 <HAL_GPIO_DeInit+0x210>)
80079e8: 4013 ands r3, r2
80079ea: 60cb str r3, [r1, #12]
/* Configure the External Interrupt or event for the current IO */
tmp = ((uint32_t)0x0F) << (4 * (position & 0x03));
80079ec: 697b ldr r3, [r7, #20]
80079ee: f003 0303 and.w r3, r3, #3
80079f2: 009b lsls r3, r3, #2
80079f4: 220f movs r2, #15
80079f6: fa02 f303 lsl.w r3, r2, r3
80079fa: 60bb str r3, [r7, #8]
SYSCFG->EXTICR[position >> 2] &= ~tmp;
80079fc: 4a2d ldr r2, [pc, #180] ; (8007ab4 <HAL_GPIO_DeInit+0x1e4>)
80079fe: 697b ldr r3, [r7, #20]
8007a00: 089b lsrs r3, r3, #2
8007a02: 3302 adds r3, #2
8007a04: f852 1023 ldr.w r1, [r2, r3, lsl #2]
8007a08: 68bb ldr r3, [r7, #8]
8007a0a: 43da mvns r2, r3
8007a0c: 4829 ldr r0, [pc, #164] ; (8007ab4 <HAL_GPIO_DeInit+0x1e4>)
8007a0e: 697b ldr r3, [r7, #20]
8007a10: 089b lsrs r3, r3, #2
8007a12: 400a ands r2, r1
8007a14: 3302 adds r3, #2
8007a16: 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));
8007a1a: 687b ldr r3, [r7, #4]
8007a1c: 681a ldr r2, [r3, #0]
8007a1e: 697b ldr r3, [r7, #20]
8007a20: 005b lsls r3, r3, #1
8007a22: 2103 movs r1, #3
8007a24: fa01 f303 lsl.w r3, r1, r3
8007a28: 43db mvns r3, r3
8007a2a: 401a ands r2, r3
8007a2c: 687b ldr r3, [r7, #4]
8007a2e: 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)) ;
8007a30: 697b ldr r3, [r7, #20]
8007a32: 08da lsrs r2, r3, #3
8007a34: 687b ldr r3, [r7, #4]
8007a36: 3208 adds r2, #8
8007a38: f853 1022 ldr.w r1, [r3, r2, lsl #2]
8007a3c: 697b ldr r3, [r7, #20]
8007a3e: f003 0307 and.w r3, r3, #7
8007a42: 009b lsls r3, r3, #2
8007a44: 220f movs r2, #15
8007a46: fa02 f303 lsl.w r3, r2, r3
8007a4a: 43db mvns r3, r3
8007a4c: 697a ldr r2, [r7, #20]
8007a4e: 08d2 lsrs r2, r2, #3
8007a50: 4019 ands r1, r3
8007a52: 687b ldr r3, [r7, #4]
8007a54: 3208 adds r2, #8
8007a56: 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));
8007a5a: 687b ldr r3, [r7, #4]
8007a5c: 68da ldr r2, [r3, #12]
8007a5e: 697b ldr r3, [r7, #20]
8007a60: 005b lsls r3, r3, #1
8007a62: 2103 movs r1, #3
8007a64: fa01 f303 lsl.w r3, r1, r3
8007a68: 43db mvns r3, r3
8007a6a: 401a ands r2, r3
8007a6c: 687b ldr r3, [r7, #4]
8007a6e: 60da str r2, [r3, #12]
/* Configure the default value IO Output Type */
GPIOx->OTYPER &= ~(GPIO_OTYPER_OT_0 << position) ;
8007a70: 687b ldr r3, [r7, #4]
8007a72: 685a ldr r2, [r3, #4]
8007a74: 2101 movs r1, #1
8007a76: 697b ldr r3, [r7, #20]
8007a78: fa01 f303 lsl.w r3, r1, r3
8007a7c: 43db mvns r3, r3
8007a7e: 401a ands r2, r3
8007a80: 687b ldr r3, [r7, #4]
8007a82: 605a str r2, [r3, #4]
/* Configure the default value for IO Speed */
GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2));
8007a84: 687b ldr r3, [r7, #4]
8007a86: 689a ldr r2, [r3, #8]
8007a88: 697b ldr r3, [r7, #20]
8007a8a: 005b lsls r3, r3, #1
8007a8c: 2103 movs r1, #3
8007a8e: fa01 f303 lsl.w r3, r1, r3
8007a92: 43db mvns r3, r3
8007a94: 401a ands r2, r3
8007a96: 687b ldr r3, [r7, #4]
8007a98: 609a str r2, [r3, #8]
for(position = 0; position < GPIO_NUMBER; position++)
8007a9a: 697b ldr r3, [r7, #20]
8007a9c: 3301 adds r3, #1
8007a9e: 617b str r3, [r7, #20]
8007aa0: 697b ldr r3, [r7, #20]
8007aa2: 2b0f cmp r3, #15
8007aa4: f67f af22 bls.w 80078ec <HAL_GPIO_DeInit+0x1c>
}
}
}
8007aa8: bf00 nop
8007aaa: 371c adds r7, #28
8007aac: 46bd mov sp, r7
8007aae: f85d 7b04 ldr.w r7, [sp], #4
8007ab2: 4770 bx lr
8007ab4: 40013800 .word 0x40013800
8007ab8: 40020000 .word 0x40020000
8007abc: 40020400 .word 0x40020400
8007ac0: 40020800 .word 0x40020800
8007ac4: 40020c00 .word 0x40020c00
8007ac8: 40021000 .word 0x40021000
8007acc: 40021400 .word 0x40021400
8007ad0: 40021800 .word 0x40021800
8007ad4: 40021c00 .word 0x40021c00
8007ad8: 40022000 .word 0x40022000
8007adc: 40022400 .word 0x40022400
8007ae0: 40013c00 .word 0x40013c00
08007ae4 <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)
{
8007ae4: b480 push {r7}
8007ae6: b085 sub sp, #20
8007ae8: af00 add r7, sp, #0
8007aea: 6078 str r0, [r7, #4]
8007aec: 460b mov r3, r1
8007aee: 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)
8007af0: 687b ldr r3, [r7, #4]
8007af2: 691a ldr r2, [r3, #16]
8007af4: 887b ldrh r3, [r7, #2]
8007af6: 4013 ands r3, r2
8007af8: 2b00 cmp r3, #0
8007afa: d002 beq.n 8007b02 <HAL_GPIO_ReadPin+0x1e>
{
bitstatus = GPIO_PIN_SET;
8007afc: 2301 movs r3, #1
8007afe: 73fb strb r3, [r7, #15]
8007b00: e001 b.n 8007b06 <HAL_GPIO_ReadPin+0x22>
}
else
{
bitstatus = GPIO_PIN_RESET;
8007b02: 2300 movs r3, #0
8007b04: 73fb strb r3, [r7, #15]
}
return bitstatus;
8007b06: 7bfb ldrb r3, [r7, #15]
}
8007b08: 4618 mov r0, r3
8007b0a: 3714 adds r7, #20
8007b0c: 46bd mov sp, r7
8007b0e: f85d 7b04 ldr.w r7, [sp], #4
8007b12: 4770 bx lr
08007b14 <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)
{
8007b14: b480 push {r7}
8007b16: b083 sub sp, #12
8007b18: af00 add r7, sp, #0
8007b1a: 6078 str r0, [r7, #4]
8007b1c: 460b mov r3, r1
8007b1e: 807b strh r3, [r7, #2]
8007b20: 4613 mov r3, r2
8007b22: 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)
8007b24: 787b ldrb r3, [r7, #1]
8007b26: 2b00 cmp r3, #0
8007b28: d003 beq.n 8007b32 <HAL_GPIO_WritePin+0x1e>
{
GPIOx->BSRR = GPIO_Pin;
8007b2a: 887a ldrh r2, [r7, #2]
8007b2c: 687b ldr r3, [r7, #4]
8007b2e: 619a str r2, [r3, #24]
}
else
{
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16;
}
}
8007b30: e003 b.n 8007b3a <HAL_GPIO_WritePin+0x26>
GPIOx->BSRR = (uint32_t)GPIO_Pin << 16;
8007b32: 887b ldrh r3, [r7, #2]
8007b34: 041a lsls r2, r3, #16
8007b36: 687b ldr r3, [r7, #4]
8007b38: 619a str r2, [r3, #24]
}
8007b3a: bf00 nop
8007b3c: 370c adds r7, #12
8007b3e: 46bd mov sp, r7
8007b40: f85d 7b04 ldr.w r7, [sp], #4
8007b44: 4770 bx lr
...
08007b48 <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)
{
8007b48: b580 push {r7, lr}
8007b4a: b082 sub sp, #8
8007b4c: af00 add r7, sp, #0
8007b4e: 6078 str r0, [r7, #4]
/* Check the I2C handle allocation */
if (hi2c == NULL)
8007b50: 687b ldr r3, [r7, #4]
8007b52: 2b00 cmp r3, #0
8007b54: d101 bne.n 8007b5a <HAL_I2C_Init+0x12>
{
return HAL_ERROR;
8007b56: 2301 movs r3, #1
8007b58: e07f b.n 8007c5a <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)
8007b5a: 687b ldr r3, [r7, #4]
8007b5c: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
8007b60: b2db uxtb r3, r3
8007b62: 2b00 cmp r3, #0
8007b64: d106 bne.n 8007b74 <HAL_I2C_Init+0x2c>
{
/* Allocate lock resource and initialize it */
hi2c->Lock = HAL_UNLOCKED;
8007b66: 687b ldr r3, [r7, #4]
8007b68: 2200 movs r2, #0
8007b6a: 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);
8007b6e: 6878 ldr r0, [r7, #4]
8007b70: f7fc faaa bl 80040c8 <HAL_I2C_MspInit>
#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */
}
hi2c->State = HAL_I2C_STATE_BUSY;
8007b74: 687b ldr r3, [r7, #4]
8007b76: 2224 movs r2, #36 ; 0x24
8007b78: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
8007b7c: 687b ldr r3, [r7, #4]
8007b7e: 681b ldr r3, [r3, #0]
8007b80: 681a ldr r2, [r3, #0]
8007b82: 687b ldr r3, [r7, #4]
8007b84: 681b ldr r3, [r3, #0]
8007b86: f022 0201 bic.w r2, r2, #1
8007b8a: 601a str r2, [r3, #0]
/*---------------------------- I2Cx TIMINGR Configuration ------------------*/
/* Configure I2Cx: Frequency range */
hi2c->Instance->TIMINGR = hi2c->Init.Timing & TIMING_CLEAR_MASK;
8007b8c: 687b ldr r3, [r7, #4]
8007b8e: 685a ldr r2, [r3, #4]
8007b90: 687b ldr r3, [r7, #4]
8007b92: 681b ldr r3, [r3, #0]
8007b94: f022 6270 bic.w r2, r2, #251658240 ; 0xf000000
8007b98: 611a str r2, [r3, #16]
/*---------------------------- I2Cx OAR1 Configuration ---------------------*/
/* Disable Own Address1 before set the Own Address1 configuration */
hi2c->Instance->OAR1 &= ~I2C_OAR1_OA1EN;
8007b9a: 687b ldr r3, [r7, #4]
8007b9c: 681b ldr r3, [r3, #0]
8007b9e: 689a ldr r2, [r3, #8]
8007ba0: 687b ldr r3, [r7, #4]
8007ba2: 681b ldr r3, [r3, #0]
8007ba4: f422 4200 bic.w r2, r2, #32768 ; 0x8000
8007ba8: 609a str r2, [r3, #8]
/* Configure I2Cx: Own Address1 and ack own address1 mode */
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_7BIT)
8007baa: 687b ldr r3, [r7, #4]
8007bac: 68db ldr r3, [r3, #12]
8007bae: 2b01 cmp r3, #1
8007bb0: d107 bne.n 8007bc2 <HAL_I2C_Init+0x7a>
{
hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | hi2c->Init.OwnAddress1);
8007bb2: 687b ldr r3, [r7, #4]
8007bb4: 689a ldr r2, [r3, #8]
8007bb6: 687b ldr r3, [r7, #4]
8007bb8: 681b ldr r3, [r3, #0]
8007bba: f442 4200 orr.w r2, r2, #32768 ; 0x8000
8007bbe: 609a str r2, [r3, #8]
8007bc0: e006 b.n 8007bd0 <HAL_I2C_Init+0x88>
}
else /* I2C_ADDRESSINGMODE_10BIT */
{
hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | I2C_OAR1_OA1MODE | hi2c->Init.OwnAddress1);
8007bc2: 687b ldr r3, [r7, #4]
8007bc4: 689a ldr r2, [r3, #8]
8007bc6: 687b ldr r3, [r7, #4]
8007bc8: 681b ldr r3, [r3, #0]
8007bca: f442 4204 orr.w r2, r2, #33792 ; 0x8400
8007bce: 609a str r2, [r3, #8]
}
/*---------------------------- I2Cx CR2 Configuration ----------------------*/
/* Configure I2Cx: Addressing Master mode */
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT)
8007bd0: 687b ldr r3, [r7, #4]
8007bd2: 68db ldr r3, [r3, #12]
8007bd4: 2b02 cmp r3, #2
8007bd6: d104 bne.n 8007be2 <HAL_I2C_Init+0x9a>
{
hi2c->Instance->CR2 = (I2C_CR2_ADD10);
8007bd8: 687b ldr r3, [r7, #4]
8007bda: 681b ldr r3, [r3, #0]
8007bdc: f44f 6200 mov.w r2, #2048 ; 0x800
8007be0: 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);
8007be2: 687b ldr r3, [r7, #4]
8007be4: 681b ldr r3, [r3, #0]
8007be6: 6859 ldr r1, [r3, #4]
8007be8: 687b ldr r3, [r7, #4]
8007bea: 681a ldr r2, [r3, #0]
8007bec: 4b1d ldr r3, [pc, #116] ; (8007c64 <HAL_I2C_Init+0x11c>)
8007bee: 430b orrs r3, r1
8007bf0: 6053 str r3, [r2, #4]
/*---------------------------- I2Cx OAR2 Configuration ---------------------*/
/* Disable Own Address2 before set the Own Address2 configuration */
hi2c->Instance->OAR2 &= ~I2C_DUALADDRESS_ENABLE;
8007bf2: 687b ldr r3, [r7, #4]
8007bf4: 681b ldr r3, [r3, #0]
8007bf6: 68da ldr r2, [r3, #12]
8007bf8: 687b ldr r3, [r7, #4]
8007bfa: 681b ldr r3, [r3, #0]
8007bfc: f422 4200 bic.w r2, r2, #32768 ; 0x8000
8007c00: 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));
8007c02: 687b ldr r3, [r7, #4]
8007c04: 691a ldr r2, [r3, #16]
8007c06: 687b ldr r3, [r7, #4]
8007c08: 695b ldr r3, [r3, #20]
8007c0a: ea42 0103 orr.w r1, r2, r3
8007c0e: 687b ldr r3, [r7, #4]
8007c10: 699b ldr r3, [r3, #24]
8007c12: 021a lsls r2, r3, #8
8007c14: 687b ldr r3, [r7, #4]
8007c16: 681b ldr r3, [r3, #0]
8007c18: 430a orrs r2, r1
8007c1a: 60da str r2, [r3, #12]
/*---------------------------- I2Cx CR1 Configuration ----------------------*/
/* Configure I2Cx: Generalcall and NoStretch mode */
hi2c->Instance->CR1 = (hi2c->Init.GeneralCallMode | hi2c->Init.NoStretchMode);
8007c1c: 687b ldr r3, [r7, #4]
8007c1e: 69d9 ldr r1, [r3, #28]
8007c20: 687b ldr r3, [r7, #4]
8007c22: 6a1a ldr r2, [r3, #32]
8007c24: 687b ldr r3, [r7, #4]
8007c26: 681b ldr r3, [r3, #0]
8007c28: 430a orrs r2, r1
8007c2a: 601a str r2, [r3, #0]
/* Enable the selected I2C peripheral */
__HAL_I2C_ENABLE(hi2c);
8007c2c: 687b ldr r3, [r7, #4]
8007c2e: 681b ldr r3, [r3, #0]
8007c30: 681a ldr r2, [r3, #0]
8007c32: 687b ldr r3, [r7, #4]
8007c34: 681b ldr r3, [r3, #0]
8007c36: f042 0201 orr.w r2, r2, #1
8007c3a: 601a str r2, [r3, #0]
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
8007c3c: 687b ldr r3, [r7, #4]
8007c3e: 2200 movs r2, #0
8007c40: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8007c42: 687b ldr r3, [r7, #4]
8007c44: 2220 movs r2, #32
8007c46: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->PreviousState = I2C_STATE_NONE;
8007c4a: 687b ldr r3, [r7, #4]
8007c4c: 2200 movs r2, #0
8007c4e: 631a str r2, [r3, #48] ; 0x30
hi2c->Mode = HAL_I2C_MODE_NONE;
8007c50: 687b ldr r3, [r7, #4]
8007c52: 2200 movs r2, #0
8007c54: f883 2042 strb.w r2, [r3, #66] ; 0x42
return HAL_OK;
8007c58: 2300 movs r3, #0
}
8007c5a: 4618 mov r0, r3
8007c5c: 3708 adds r7, #8
8007c5e: 46bd mov sp, r7
8007c60: bd80 pop {r7, pc}
8007c62: bf00 nop
8007c64: 02008000 .word 0x02008000
08007c68 <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)
{
8007c68: b580 push {r7, lr}
8007c6a: b082 sub sp, #8
8007c6c: af00 add r7, sp, #0
8007c6e: 6078 str r0, [r7, #4]
/* Check the I2C handle allocation */
if (hi2c == NULL)
8007c70: 687b ldr r3, [r7, #4]
8007c72: 2b00 cmp r3, #0
8007c74: d101 bne.n 8007c7a <HAL_I2C_DeInit+0x12>
{
return HAL_ERROR;
8007c76: 2301 movs r3, #1
8007c78: e021 b.n 8007cbe <HAL_I2C_DeInit+0x56>
}
/* Check the parameters */
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
hi2c->State = HAL_I2C_STATE_BUSY;
8007c7a: 687b ldr r3, [r7, #4]
8007c7c: 2224 movs r2, #36 ; 0x24
8007c7e: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Disable the I2C Peripheral Clock */
__HAL_I2C_DISABLE(hi2c);
8007c82: 687b ldr r3, [r7, #4]
8007c84: 681b ldr r3, [r3, #0]
8007c86: 681a ldr r2, [r3, #0]
8007c88: 687b ldr r3, [r7, #4]
8007c8a: 681b ldr r3, [r3, #0]
8007c8c: f022 0201 bic.w r2, r2, #1
8007c90: 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);
8007c92: 6878 ldr r0, [r7, #4]
8007c94: f7fc fa90 bl 80041b8 <HAL_I2C_MspDeInit>
#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
8007c98: 687b ldr r3, [r7, #4]
8007c9a: 2200 movs r2, #0
8007c9c: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_RESET;
8007c9e: 687b ldr r3, [r7, #4]
8007ca0: 2200 movs r2, #0
8007ca2: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->PreviousState = I2C_STATE_NONE;
8007ca6: 687b ldr r3, [r7, #4]
8007ca8: 2200 movs r2, #0
8007caa: 631a str r2, [r3, #48] ; 0x30
hi2c->Mode = HAL_I2C_MODE_NONE;
8007cac: 687b ldr r3, [r7, #4]
8007cae: 2200 movs r2, #0
8007cb0: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Release Lock */
__HAL_UNLOCK(hi2c);
8007cb4: 687b ldr r3, [r7, #4]
8007cb6: 2200 movs r2, #0
8007cb8: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
8007cbc: 2300 movs r3, #0
}
8007cbe: 4618 mov r0, r3
8007cc0: 3708 adds r7, #8
8007cc2: 46bd mov sp, r7
8007cc4: bd80 pop {r7, pc}
...
08007cc8 <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)
{
8007cc8: b580 push {r7, lr}
8007cca: b088 sub sp, #32
8007ccc: af02 add r7, sp, #8
8007cce: 60f8 str r0, [r7, #12]
8007cd0: 4608 mov r0, r1
8007cd2: 4611 mov r1, r2
8007cd4: 461a mov r2, r3
8007cd6: 4603 mov r3, r0
8007cd8: 817b strh r3, [r7, #10]
8007cda: 460b mov r3, r1
8007cdc: 813b strh r3, [r7, #8]
8007cde: 4613 mov r3, r2
8007ce0: 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)
8007ce2: 68fb ldr r3, [r7, #12]
8007ce4: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
8007ce8: b2db uxtb r3, r3
8007cea: 2b20 cmp r3, #32
8007cec: f040 80f9 bne.w 8007ee2 <HAL_I2C_Mem_Write+0x21a>
{
if ((pData == NULL) || (Size == 0U))
8007cf0: 6a3b ldr r3, [r7, #32]
8007cf2: 2b00 cmp r3, #0
8007cf4: d002 beq.n 8007cfc <HAL_I2C_Mem_Write+0x34>
8007cf6: 8cbb ldrh r3, [r7, #36] ; 0x24
8007cf8: 2b00 cmp r3, #0
8007cfa: d105 bne.n 8007d08 <HAL_I2C_Mem_Write+0x40>
{
hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM;
8007cfc: 68fb ldr r3, [r7, #12]
8007cfe: f44f 7200 mov.w r2, #512 ; 0x200
8007d02: 645a str r2, [r3, #68] ; 0x44
return HAL_ERROR;
8007d04: 2301 movs r3, #1
8007d06: e0ed b.n 8007ee4 <HAL_I2C_Mem_Write+0x21c>
}
/* Process Locked */
__HAL_LOCK(hi2c);
8007d08: 68fb ldr r3, [r7, #12]
8007d0a: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
8007d0e: 2b01 cmp r3, #1
8007d10: d101 bne.n 8007d16 <HAL_I2C_Mem_Write+0x4e>
8007d12: 2302 movs r3, #2
8007d14: e0e6 b.n 8007ee4 <HAL_I2C_Mem_Write+0x21c>
8007d16: 68fb ldr r3, [r7, #12]
8007d18: 2201 movs r2, #1
8007d1a: f883 2040 strb.w r2, [r3, #64] ; 0x40
/* Init tickstart for timeout management*/
tickstart = HAL_GetTick();
8007d1e: f7fc ffbd bl 8004c9c <HAL_GetTick>
8007d22: 6178 str r0, [r7, #20]
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK)
8007d24: 697b ldr r3, [r7, #20]
8007d26: 9300 str r3, [sp, #0]
8007d28: 2319 movs r3, #25
8007d2a: 2201 movs r2, #1
8007d2c: f44f 4100 mov.w r1, #32768 ; 0x8000
8007d30: 68f8 ldr r0, [r7, #12]
8007d32: f000 fad1 bl 80082d8 <I2C_WaitOnFlagUntilTimeout>
8007d36: 4603 mov r3, r0
8007d38: 2b00 cmp r3, #0
8007d3a: d001 beq.n 8007d40 <HAL_I2C_Mem_Write+0x78>
{
return HAL_ERROR;
8007d3c: 2301 movs r3, #1
8007d3e: e0d1 b.n 8007ee4 <HAL_I2C_Mem_Write+0x21c>
}
hi2c->State = HAL_I2C_STATE_BUSY_TX;
8007d40: 68fb ldr r3, [r7, #12]
8007d42: 2221 movs r2, #33 ; 0x21
8007d44: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_MEM;
8007d48: 68fb ldr r3, [r7, #12]
8007d4a: 2240 movs r2, #64 ; 0x40
8007d4c: f883 2042 strb.w r2, [r3, #66] ; 0x42
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
8007d50: 68fb ldr r3, [r7, #12]
8007d52: 2200 movs r2, #0
8007d54: 645a str r2, [r3, #68] ; 0x44
/* Prepare transfer parameters */
hi2c->pBuffPtr = pData;
8007d56: 68fb ldr r3, [r7, #12]
8007d58: 6a3a ldr r2, [r7, #32]
8007d5a: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount = Size;
8007d5c: 68fb ldr r3, [r7, #12]
8007d5e: 8cba ldrh r2, [r7, #36] ; 0x24
8007d60: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferISR = NULL;
8007d62: 68fb ldr r3, [r7, #12]
8007d64: 2200 movs r2, #0
8007d66: 635a str r2, [r3, #52] ; 0x34
/* Send Slave Address and Memory Address */
if (I2C_RequestMemoryWrite(hi2c, DevAddress, MemAddress, MemAddSize, Timeout, tickstart) != HAL_OK)
8007d68: 88f8 ldrh r0, [r7, #6]
8007d6a: 893a ldrh r2, [r7, #8]
8007d6c: 8979 ldrh r1, [r7, #10]
8007d6e: 697b ldr r3, [r7, #20]
8007d70: 9301 str r3, [sp, #4]
8007d72: 6abb ldr r3, [r7, #40] ; 0x28
8007d74: 9300 str r3, [sp, #0]
8007d76: 4603 mov r3, r0
8007d78: 68f8 ldr r0, [r7, #12]
8007d7a: f000 f9e1 bl 8008140 <I2C_RequestMemoryWrite>
8007d7e: 4603 mov r3, r0
8007d80: 2b00 cmp r3, #0
8007d82: d005 beq.n 8007d90 <HAL_I2C_Mem_Write+0xc8>
{
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8007d84: 68fb ldr r3, [r7, #12]
8007d86: 2200 movs r2, #0
8007d88: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8007d8c: 2301 movs r3, #1
8007d8e: e0a9 b.n 8007ee4 <HAL_I2C_Mem_Write+0x21c>
}
/* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE */
if (hi2c->XferCount > MAX_NBYTE_SIZE)
8007d90: 68fb ldr r3, [r7, #12]
8007d92: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007d94: b29b uxth r3, r3
8007d96: 2bff cmp r3, #255 ; 0xff
8007d98: d90e bls.n 8007db8 <HAL_I2C_Mem_Write+0xf0>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8007d9a: 68fb ldr r3, [r7, #12]
8007d9c: 22ff movs r2, #255 ; 0xff
8007d9e: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP);
8007da0: 68fb ldr r3, [r7, #12]
8007da2: 8d1b ldrh r3, [r3, #40] ; 0x28
8007da4: b2da uxtb r2, r3
8007da6: 8979 ldrh r1, [r7, #10]
8007da8: 2300 movs r3, #0
8007daa: 9300 str r3, [sp, #0]
8007dac: f04f 7380 mov.w r3, #16777216 ; 0x1000000
8007db0: 68f8 ldr r0, [r7, #12]
8007db2: f000 fbb3 bl 800851c <I2C_TransferConfig>
8007db6: e00f b.n 8007dd8 <HAL_I2C_Mem_Write+0x110>
}
else
{
hi2c->XferSize = hi2c->XferCount;
8007db8: 68fb ldr r3, [r7, #12]
8007dba: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007dbc: b29a uxth r2, r3
8007dbe: 68fb ldr r3, [r7, #12]
8007dc0: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_NO_STARTSTOP);
8007dc2: 68fb ldr r3, [r7, #12]
8007dc4: 8d1b ldrh r3, [r3, #40] ; 0x28
8007dc6: b2da uxtb r2, r3
8007dc8: 8979 ldrh r1, [r7, #10]
8007dca: 2300 movs r3, #0
8007dcc: 9300 str r3, [sp, #0]
8007dce: f04f 7300 mov.w r3, #33554432 ; 0x2000000
8007dd2: 68f8 ldr r0, [r7, #12]
8007dd4: f000 fba2 bl 800851c <I2C_TransferConfig>
}
do
{
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)
8007dd8: 697a ldr r2, [r7, #20]
8007dda: 6ab9 ldr r1, [r7, #40] ; 0x28
8007ddc: 68f8 ldr r0, [r7, #12]
8007dde: f000 fabb bl 8008358 <I2C_WaitOnTXISFlagUntilTimeout>
8007de2: 4603 mov r3, r0
8007de4: 2b00 cmp r3, #0
8007de6: d001 beq.n 8007dec <HAL_I2C_Mem_Write+0x124>
{
return HAL_ERROR;
8007de8: 2301 movs r3, #1
8007dea: e07b b.n 8007ee4 <HAL_I2C_Mem_Write+0x21c>
}
/* Write data to TXDR */
hi2c->Instance->TXDR = *hi2c->pBuffPtr;
8007dec: 68fb ldr r3, [r7, #12]
8007dee: 6a5b ldr r3, [r3, #36] ; 0x24
8007df0: 781a ldrb r2, [r3, #0]
8007df2: 68fb ldr r3, [r7, #12]
8007df4: 681b ldr r3, [r3, #0]
8007df6: 629a str r2, [r3, #40] ; 0x28
/* Increment Buffer pointer */
hi2c->pBuffPtr++;
8007df8: 68fb ldr r3, [r7, #12]
8007dfa: 6a5b ldr r3, [r3, #36] ; 0x24
8007dfc: 1c5a adds r2, r3, #1
8007dfe: 68fb ldr r3, [r7, #12]
8007e00: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount--;
8007e02: 68fb ldr r3, [r7, #12]
8007e04: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007e06: b29b uxth r3, r3
8007e08: 3b01 subs r3, #1
8007e0a: b29a uxth r2, r3
8007e0c: 68fb ldr r3, [r7, #12]
8007e0e: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferSize--;
8007e10: 68fb ldr r3, [r7, #12]
8007e12: 8d1b ldrh r3, [r3, #40] ; 0x28
8007e14: 3b01 subs r3, #1
8007e16: b29a uxth r2, r3
8007e18: 68fb ldr r3, [r7, #12]
8007e1a: 851a strh r2, [r3, #40] ; 0x28
if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U))
8007e1c: 68fb ldr r3, [r7, #12]
8007e1e: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007e20: b29b uxth r3, r3
8007e22: 2b00 cmp r3, #0
8007e24: d034 beq.n 8007e90 <HAL_I2C_Mem_Write+0x1c8>
8007e26: 68fb ldr r3, [r7, #12]
8007e28: 8d1b ldrh r3, [r3, #40] ; 0x28
8007e2a: 2b00 cmp r3, #0
8007e2c: d130 bne.n 8007e90 <HAL_I2C_Mem_Write+0x1c8>
{
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK)
8007e2e: 697b ldr r3, [r7, #20]
8007e30: 9300 str r3, [sp, #0]
8007e32: 6abb ldr r3, [r7, #40] ; 0x28
8007e34: 2200 movs r2, #0
8007e36: 2180 movs r1, #128 ; 0x80
8007e38: 68f8 ldr r0, [r7, #12]
8007e3a: f000 fa4d bl 80082d8 <I2C_WaitOnFlagUntilTimeout>
8007e3e: 4603 mov r3, r0
8007e40: 2b00 cmp r3, #0
8007e42: d001 beq.n 8007e48 <HAL_I2C_Mem_Write+0x180>
{
return HAL_ERROR;
8007e44: 2301 movs r3, #1
8007e46: e04d b.n 8007ee4 <HAL_I2C_Mem_Write+0x21c>
}
if (hi2c->XferCount > MAX_NBYTE_SIZE)
8007e48: 68fb ldr r3, [r7, #12]
8007e4a: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007e4c: b29b uxth r3, r3
8007e4e: 2bff cmp r3, #255 ; 0xff
8007e50: d90e bls.n 8007e70 <HAL_I2C_Mem_Write+0x1a8>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8007e52: 68fb ldr r3, [r7, #12]
8007e54: 22ff movs r2, #255 ; 0xff
8007e56: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP);
8007e58: 68fb ldr r3, [r7, #12]
8007e5a: 8d1b ldrh r3, [r3, #40] ; 0x28
8007e5c: b2da uxtb r2, r3
8007e5e: 8979 ldrh r1, [r7, #10]
8007e60: 2300 movs r3, #0
8007e62: 9300 str r3, [sp, #0]
8007e64: f04f 7380 mov.w r3, #16777216 ; 0x1000000
8007e68: 68f8 ldr r0, [r7, #12]
8007e6a: f000 fb57 bl 800851c <I2C_TransferConfig>
8007e6e: e00f b.n 8007e90 <HAL_I2C_Mem_Write+0x1c8>
}
else
{
hi2c->XferSize = hi2c->XferCount;
8007e70: 68fb ldr r3, [r7, #12]
8007e72: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007e74: b29a uxth r2, r3
8007e76: 68fb ldr r3, [r7, #12]
8007e78: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_NO_STARTSTOP);
8007e7a: 68fb ldr r3, [r7, #12]
8007e7c: 8d1b ldrh r3, [r3, #40] ; 0x28
8007e7e: b2da uxtb r2, r3
8007e80: 8979 ldrh r1, [r7, #10]
8007e82: 2300 movs r3, #0
8007e84: 9300 str r3, [sp, #0]
8007e86: f04f 7300 mov.w r3, #33554432 ; 0x2000000
8007e8a: 68f8 ldr r0, [r7, #12]
8007e8c: f000 fb46 bl 800851c <I2C_TransferConfig>
}
}
}
while (hi2c->XferCount > 0U);
8007e90: 68fb ldr r3, [r7, #12]
8007e92: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007e94: b29b uxth r3, r3
8007e96: 2b00 cmp r3, #0
8007e98: d19e bne.n 8007dd8 <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)
8007e9a: 697a ldr r2, [r7, #20]
8007e9c: 6ab9 ldr r1, [r7, #40] ; 0x28
8007e9e: 68f8 ldr r0, [r7, #12]
8007ea0: f000 fa9a bl 80083d8 <I2C_WaitOnSTOPFlagUntilTimeout>
8007ea4: 4603 mov r3, r0
8007ea6: 2b00 cmp r3, #0
8007ea8: d001 beq.n 8007eae <HAL_I2C_Mem_Write+0x1e6>
{
return HAL_ERROR;
8007eaa: 2301 movs r3, #1
8007eac: e01a b.n 8007ee4 <HAL_I2C_Mem_Write+0x21c>
}
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
8007eae: 68fb ldr r3, [r7, #12]
8007eb0: 681b ldr r3, [r3, #0]
8007eb2: 2220 movs r2, #32
8007eb4: 61da str r2, [r3, #28]
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
8007eb6: 68fb ldr r3, [r7, #12]
8007eb8: 681b ldr r3, [r3, #0]
8007eba: 6859 ldr r1, [r3, #4]
8007ebc: 68fb ldr r3, [r7, #12]
8007ebe: 681a ldr r2, [r3, #0]
8007ec0: 4b0a ldr r3, [pc, #40] ; (8007eec <HAL_I2C_Mem_Write+0x224>)
8007ec2: 400b ands r3, r1
8007ec4: 6053 str r3, [r2, #4]
hi2c->State = HAL_I2C_STATE_READY;
8007ec6: 68fb ldr r3, [r7, #12]
8007ec8: 2220 movs r2, #32
8007eca: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
8007ece: 68fb ldr r3, [r7, #12]
8007ed0: 2200 movs r2, #0
8007ed2: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8007ed6: 68fb ldr r3, [r7, #12]
8007ed8: 2200 movs r2, #0
8007eda: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
8007ede: 2300 movs r3, #0
8007ee0: e000 b.n 8007ee4 <HAL_I2C_Mem_Write+0x21c>
}
else
{
return HAL_BUSY;
8007ee2: 2302 movs r3, #2
}
}
8007ee4: 4618 mov r0, r3
8007ee6: 3718 adds r7, #24
8007ee8: 46bd mov sp, r7
8007eea: bd80 pop {r7, pc}
8007eec: fe00e800 .word 0xfe00e800
08007ef0 <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)
{
8007ef0: b580 push {r7, lr}
8007ef2: b088 sub sp, #32
8007ef4: af02 add r7, sp, #8
8007ef6: 60f8 str r0, [r7, #12]
8007ef8: 4608 mov r0, r1
8007efa: 4611 mov r1, r2
8007efc: 461a mov r2, r3
8007efe: 4603 mov r3, r0
8007f00: 817b strh r3, [r7, #10]
8007f02: 460b mov r3, r1
8007f04: 813b strh r3, [r7, #8]
8007f06: 4613 mov r3, r2
8007f08: 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)
8007f0a: 68fb ldr r3, [r7, #12]
8007f0c: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
8007f10: b2db uxtb r3, r3
8007f12: 2b20 cmp r3, #32
8007f14: f040 80fd bne.w 8008112 <HAL_I2C_Mem_Read+0x222>
{
if ((pData == NULL) || (Size == 0U))
8007f18: 6a3b ldr r3, [r7, #32]
8007f1a: 2b00 cmp r3, #0
8007f1c: d002 beq.n 8007f24 <HAL_I2C_Mem_Read+0x34>
8007f1e: 8cbb ldrh r3, [r7, #36] ; 0x24
8007f20: 2b00 cmp r3, #0
8007f22: d105 bne.n 8007f30 <HAL_I2C_Mem_Read+0x40>
{
hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM;
8007f24: 68fb ldr r3, [r7, #12]
8007f26: f44f 7200 mov.w r2, #512 ; 0x200
8007f2a: 645a str r2, [r3, #68] ; 0x44
return HAL_ERROR;
8007f2c: 2301 movs r3, #1
8007f2e: e0f1 b.n 8008114 <HAL_I2C_Mem_Read+0x224>
}
/* Process Locked */
__HAL_LOCK(hi2c);
8007f30: 68fb ldr r3, [r7, #12]
8007f32: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
8007f36: 2b01 cmp r3, #1
8007f38: d101 bne.n 8007f3e <HAL_I2C_Mem_Read+0x4e>
8007f3a: 2302 movs r3, #2
8007f3c: e0ea b.n 8008114 <HAL_I2C_Mem_Read+0x224>
8007f3e: 68fb ldr r3, [r7, #12]
8007f40: 2201 movs r2, #1
8007f42: f883 2040 strb.w r2, [r3, #64] ; 0x40
/* Init tickstart for timeout management*/
tickstart = HAL_GetTick();
8007f46: f7fc fea9 bl 8004c9c <HAL_GetTick>
8007f4a: 6178 str r0, [r7, #20]
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK)
8007f4c: 697b ldr r3, [r7, #20]
8007f4e: 9300 str r3, [sp, #0]
8007f50: 2319 movs r3, #25
8007f52: 2201 movs r2, #1
8007f54: f44f 4100 mov.w r1, #32768 ; 0x8000
8007f58: 68f8 ldr r0, [r7, #12]
8007f5a: f000 f9bd bl 80082d8 <I2C_WaitOnFlagUntilTimeout>
8007f5e: 4603 mov r3, r0
8007f60: 2b00 cmp r3, #0
8007f62: d001 beq.n 8007f68 <HAL_I2C_Mem_Read+0x78>
{
return HAL_ERROR;
8007f64: 2301 movs r3, #1
8007f66: e0d5 b.n 8008114 <HAL_I2C_Mem_Read+0x224>
}
hi2c->State = HAL_I2C_STATE_BUSY_RX;
8007f68: 68fb ldr r3, [r7, #12]
8007f6a: 2222 movs r2, #34 ; 0x22
8007f6c: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_MEM;
8007f70: 68fb ldr r3, [r7, #12]
8007f72: 2240 movs r2, #64 ; 0x40
8007f74: f883 2042 strb.w r2, [r3, #66] ; 0x42
hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
8007f78: 68fb ldr r3, [r7, #12]
8007f7a: 2200 movs r2, #0
8007f7c: 645a str r2, [r3, #68] ; 0x44
/* Prepare transfer parameters */
hi2c->pBuffPtr = pData;
8007f7e: 68fb ldr r3, [r7, #12]
8007f80: 6a3a ldr r2, [r7, #32]
8007f82: 625a str r2, [r3, #36] ; 0x24
hi2c->XferCount = Size;
8007f84: 68fb ldr r3, [r7, #12]
8007f86: 8cba ldrh r2, [r7, #36] ; 0x24
8007f88: 855a strh r2, [r3, #42] ; 0x2a
hi2c->XferISR = NULL;
8007f8a: 68fb ldr r3, [r7, #12]
8007f8c: 2200 movs r2, #0
8007f8e: 635a str r2, [r3, #52] ; 0x34
/* Send Slave Address and Memory Address */
if (I2C_RequestMemoryRead(hi2c, DevAddress, MemAddress, MemAddSize, Timeout, tickstart) != HAL_OK)
8007f90: 88f8 ldrh r0, [r7, #6]
8007f92: 893a ldrh r2, [r7, #8]
8007f94: 8979 ldrh r1, [r7, #10]
8007f96: 697b ldr r3, [r7, #20]
8007f98: 9301 str r3, [sp, #4]
8007f9a: 6abb ldr r3, [r7, #40] ; 0x28
8007f9c: 9300 str r3, [sp, #0]
8007f9e: 4603 mov r3, r0
8007fa0: 68f8 ldr r0, [r7, #12]
8007fa2: f000 f921 bl 80081e8 <I2C_RequestMemoryRead>
8007fa6: 4603 mov r3, r0
8007fa8: 2b00 cmp r3, #0
8007faa: d005 beq.n 8007fb8 <HAL_I2C_Mem_Read+0xc8>
{
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8007fac: 68fb ldr r3, [r7, #12]
8007fae: 2200 movs r2, #0
8007fb0: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8007fb4: 2301 movs r3, #1
8007fb6: e0ad b.n 8008114 <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)
8007fb8: 68fb ldr r3, [r7, #12]
8007fba: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007fbc: b29b uxth r3, r3
8007fbe: 2bff cmp r3, #255 ; 0xff
8007fc0: d90e bls.n 8007fe0 <HAL_I2C_Mem_Read+0xf0>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8007fc2: 68fb ldr r3, [r7, #12]
8007fc4: 22ff movs r2, #255 ; 0xff
8007fc6: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_GENERATE_START_READ);
8007fc8: 68fb ldr r3, [r7, #12]
8007fca: 8d1b ldrh r3, [r3, #40] ; 0x28
8007fcc: b2da uxtb r2, r3
8007fce: 8979 ldrh r1, [r7, #10]
8007fd0: 4b52 ldr r3, [pc, #328] ; (800811c <HAL_I2C_Mem_Read+0x22c>)
8007fd2: 9300 str r3, [sp, #0]
8007fd4: f04f 7380 mov.w r3, #16777216 ; 0x1000000
8007fd8: 68f8 ldr r0, [r7, #12]
8007fda: f000 fa9f bl 800851c <I2C_TransferConfig>
8007fde: e00f b.n 8008000 <HAL_I2C_Mem_Read+0x110>
}
else
{
hi2c->XferSize = hi2c->XferCount;
8007fe0: 68fb ldr r3, [r7, #12]
8007fe2: 8d5b ldrh r3, [r3, #42] ; 0x2a
8007fe4: b29a uxth r2, r3
8007fe6: 68fb ldr r3, [r7, #12]
8007fe8: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_GENERATE_START_READ);
8007fea: 68fb ldr r3, [r7, #12]
8007fec: 8d1b ldrh r3, [r3, #40] ; 0x28
8007fee: b2da uxtb r2, r3
8007ff0: 8979 ldrh r1, [r7, #10]
8007ff2: 4b4a ldr r3, [pc, #296] ; (800811c <HAL_I2C_Mem_Read+0x22c>)
8007ff4: 9300 str r3, [sp, #0]
8007ff6: f04f 7300 mov.w r3, #33554432 ; 0x2000000
8007ffa: 68f8 ldr r0, [r7, #12]
8007ffc: f000 fa8e bl 800851c <I2C_TransferConfig>
}
do
{
/* Wait until RXNE flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_RXNE, RESET, Timeout, tickstart) != HAL_OK)
8008000: 697b ldr r3, [r7, #20]
8008002: 9300 str r3, [sp, #0]
8008004: 6abb ldr r3, [r7, #40] ; 0x28
8008006: 2200 movs r2, #0
8008008: 2104 movs r1, #4
800800a: 68f8 ldr r0, [r7, #12]
800800c: f000 f964 bl 80082d8 <I2C_WaitOnFlagUntilTimeout>
8008010: 4603 mov r3, r0
8008012: 2b00 cmp r3, #0
8008014: d001 beq.n 800801a <HAL_I2C_Mem_Read+0x12a>
{
return HAL_ERROR;
8008016: 2301 movs r3, #1
8008018: e07c b.n 8008114 <HAL_I2C_Mem_Read+0x224>
}
/* Read data from RXDR */
*hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR;
800801a: 68fb ldr r3, [r7, #12]
800801c: 681b ldr r3, [r3, #0]
800801e: 6a5a ldr r2, [r3, #36] ; 0x24
8008020: 68fb ldr r3, [r7, #12]
8008022: 6a5b ldr r3, [r3, #36] ; 0x24
8008024: b2d2 uxtb r2, r2
8008026: 701a strb r2, [r3, #0]
/* Increment Buffer pointer */
hi2c->pBuffPtr++;
8008028: 68fb ldr r3, [r7, #12]
800802a: 6a5b ldr r3, [r3, #36] ; 0x24
800802c: 1c5a adds r2, r3, #1
800802e: 68fb ldr r3, [r7, #12]
8008030: 625a str r2, [r3, #36] ; 0x24
hi2c->XferSize--;
8008032: 68fb ldr r3, [r7, #12]
8008034: 8d1b ldrh r3, [r3, #40] ; 0x28
8008036: 3b01 subs r3, #1
8008038: b29a uxth r2, r3
800803a: 68fb ldr r3, [r7, #12]
800803c: 851a strh r2, [r3, #40] ; 0x28
hi2c->XferCount--;
800803e: 68fb ldr r3, [r7, #12]
8008040: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008042: b29b uxth r3, r3
8008044: 3b01 subs r3, #1
8008046: b29a uxth r2, r3
8008048: 68fb ldr r3, [r7, #12]
800804a: 855a strh r2, [r3, #42] ; 0x2a
if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U))
800804c: 68fb ldr r3, [r7, #12]
800804e: 8d5b ldrh r3, [r3, #42] ; 0x2a
8008050: b29b uxth r3, r3
8008052: 2b00 cmp r3, #0
8008054: d034 beq.n 80080c0 <HAL_I2C_Mem_Read+0x1d0>
8008056: 68fb ldr r3, [r7, #12]
8008058: 8d1b ldrh r3, [r3, #40] ; 0x28
800805a: 2b00 cmp r3, #0
800805c: d130 bne.n 80080c0 <HAL_I2C_Mem_Read+0x1d0>
{
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK)
800805e: 697b ldr r3, [r7, #20]
8008060: 9300 str r3, [sp, #0]
8008062: 6abb ldr r3, [r7, #40] ; 0x28
8008064: 2200 movs r2, #0
8008066: 2180 movs r1, #128 ; 0x80
8008068: 68f8 ldr r0, [r7, #12]
800806a: f000 f935 bl 80082d8 <I2C_WaitOnFlagUntilTimeout>
800806e: 4603 mov r3, r0
8008070: 2b00 cmp r3, #0
8008072: d001 beq.n 8008078 <HAL_I2C_Mem_Read+0x188>
{
return HAL_ERROR;
8008074: 2301 movs r3, #1
8008076: e04d b.n 8008114 <HAL_I2C_Mem_Read+0x224>
}
if (hi2c->XferCount > MAX_NBYTE_SIZE)
8008078: 68fb ldr r3, [r7, #12]
800807a: 8d5b ldrh r3, [r3, #42] ; 0x2a
800807c: b29b uxth r3, r3
800807e: 2bff cmp r3, #255 ; 0xff
8008080: d90e bls.n 80080a0 <HAL_I2C_Mem_Read+0x1b0>
{
hi2c->XferSize = MAX_NBYTE_SIZE;
8008082: 68fb ldr r3, [r7, #12]
8008084: 22ff movs r2, #255 ; 0xff
8008086: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t) hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP);
8008088: 68fb ldr r3, [r7, #12]
800808a: 8d1b ldrh r3, [r3, #40] ; 0x28
800808c: b2da uxtb r2, r3
800808e: 8979 ldrh r1, [r7, #10]
8008090: 2300 movs r3, #0
8008092: 9300 str r3, [sp, #0]
8008094: f04f 7380 mov.w r3, #16777216 ; 0x1000000
8008098: 68f8 ldr r0, [r7, #12]
800809a: f000 fa3f bl 800851c <I2C_TransferConfig>
800809e: e00f b.n 80080c0 <HAL_I2C_Mem_Read+0x1d0>
}
else
{
hi2c->XferSize = hi2c->XferCount;
80080a0: 68fb ldr r3, [r7, #12]
80080a2: 8d5b ldrh r3, [r3, #42] ; 0x2a
80080a4: b29a uxth r2, r3
80080a6: 68fb ldr r3, [r7, #12]
80080a8: 851a strh r2, [r3, #40] ; 0x28
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_NO_STARTSTOP);
80080aa: 68fb ldr r3, [r7, #12]
80080ac: 8d1b ldrh r3, [r3, #40] ; 0x28
80080ae: b2da uxtb r2, r3
80080b0: 8979 ldrh r1, [r7, #10]
80080b2: 2300 movs r3, #0
80080b4: 9300 str r3, [sp, #0]
80080b6: f04f 7300 mov.w r3, #33554432 ; 0x2000000
80080ba: 68f8 ldr r0, [r7, #12]
80080bc: f000 fa2e bl 800851c <I2C_TransferConfig>
}
}
}
while (hi2c->XferCount > 0U);
80080c0: 68fb ldr r3, [r7, #12]
80080c2: 8d5b ldrh r3, [r3, #42] ; 0x2a
80080c4: b29b uxth r3, r3
80080c6: 2b00 cmp r3, #0
80080c8: d19a bne.n 8008000 <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)
80080ca: 697a ldr r2, [r7, #20]
80080cc: 6ab9 ldr r1, [r7, #40] ; 0x28
80080ce: 68f8 ldr r0, [r7, #12]
80080d0: f000 f982 bl 80083d8 <I2C_WaitOnSTOPFlagUntilTimeout>
80080d4: 4603 mov r3, r0
80080d6: 2b00 cmp r3, #0
80080d8: d001 beq.n 80080de <HAL_I2C_Mem_Read+0x1ee>
{
return HAL_ERROR;
80080da: 2301 movs r3, #1
80080dc: e01a b.n 8008114 <HAL_I2C_Mem_Read+0x224>
}
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
80080de: 68fb ldr r3, [r7, #12]
80080e0: 681b ldr r3, [r3, #0]
80080e2: 2220 movs r2, #32
80080e4: 61da str r2, [r3, #28]
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
80080e6: 68fb ldr r3, [r7, #12]
80080e8: 681b ldr r3, [r3, #0]
80080ea: 6859 ldr r1, [r3, #4]
80080ec: 68fb ldr r3, [r7, #12]
80080ee: 681a ldr r2, [r3, #0]
80080f0: 4b0b ldr r3, [pc, #44] ; (8008120 <HAL_I2C_Mem_Read+0x230>)
80080f2: 400b ands r3, r1
80080f4: 6053 str r3, [r2, #4]
hi2c->State = HAL_I2C_STATE_READY;
80080f6: 68fb ldr r3, [r7, #12]
80080f8: 2220 movs r2, #32
80080fa: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
80080fe: 68fb ldr r3, [r7, #12]
8008100: 2200 movs r2, #0
8008102: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008106: 68fb ldr r3, [r7, #12]
8008108: 2200 movs r2, #0
800810a: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
800810e: 2300 movs r3, #0
8008110: e000 b.n 8008114 <HAL_I2C_Mem_Read+0x224>
}
else
{
return HAL_BUSY;
8008112: 2302 movs r3, #2
}
}
8008114: 4618 mov r0, r3
8008116: 3718 adds r7, #24
8008118: 46bd mov sp, r7
800811a: bd80 pop {r7, pc}
800811c: 80002400 .word 0x80002400
8008120: fe00e800 .word 0xfe00e800
08008124 <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)
{
8008124: b480 push {r7}
8008126: b083 sub sp, #12
8008128: af00 add r7, sp, #0
800812a: 6078 str r0, [r7, #4]
/* Return I2C handle state */
return hi2c->State;
800812c: 687b ldr r3, [r7, #4]
800812e: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
8008132: b2db uxtb r3, r3
}
8008134: 4618 mov r0, r3
8008136: 370c adds r7, #12
8008138: 46bd mov sp, r7
800813a: f85d 7b04 ldr.w r7, [sp], #4
800813e: 4770 bx lr
08008140 <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)
{
8008140: b580 push {r7, lr}
8008142: b086 sub sp, #24
8008144: af02 add r7, sp, #8
8008146: 60f8 str r0, [r7, #12]
8008148: 4608 mov r0, r1
800814a: 4611 mov r1, r2
800814c: 461a mov r2, r3
800814e: 4603 mov r3, r0
8008150: 817b strh r3, [r7, #10]
8008152: 460b mov r3, r1
8008154: 813b strh r3, [r7, #8]
8008156: 4613 mov r3, r2
8008158: 80fb strh r3, [r7, #6]
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_RELOAD_MODE, I2C_GENERATE_START_WRITE);
800815a: 88fb ldrh r3, [r7, #6]
800815c: b2da uxtb r2, r3
800815e: 8979 ldrh r1, [r7, #10]
8008160: 4b20 ldr r3, [pc, #128] ; (80081e4 <I2C_RequestMemoryWrite+0xa4>)
8008162: 9300 str r3, [sp, #0]
8008164: f04f 7380 mov.w r3, #16777216 ; 0x1000000
8008168: 68f8 ldr r0, [r7, #12]
800816a: f000 f9d7 bl 800851c <I2C_TransferConfig>
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
800816e: 69fa ldr r2, [r7, #28]
8008170: 69b9 ldr r1, [r7, #24]
8008172: 68f8 ldr r0, [r7, #12]
8008174: f000 f8f0 bl 8008358 <I2C_WaitOnTXISFlagUntilTimeout>
8008178: 4603 mov r3, r0
800817a: 2b00 cmp r3, #0
800817c: d001 beq.n 8008182 <I2C_RequestMemoryWrite+0x42>
{
return HAL_ERROR;
800817e: 2301 movs r3, #1
8008180: e02c b.n 80081dc <I2C_RequestMemoryWrite+0x9c>
}
/* If Memory address size is 8Bit */
if (MemAddSize == I2C_MEMADD_SIZE_8BIT)
8008182: 88fb ldrh r3, [r7, #6]
8008184: 2b01 cmp r3, #1
8008186: d105 bne.n 8008194 <I2C_RequestMemoryWrite+0x54>
{
/* Send Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
8008188: 893b ldrh r3, [r7, #8]
800818a: b2da uxtb r2, r3
800818c: 68fb ldr r3, [r7, #12]
800818e: 681b ldr r3, [r3, #0]
8008190: 629a str r2, [r3, #40] ; 0x28
8008192: e015 b.n 80081c0 <I2C_RequestMemoryWrite+0x80>
}
/* If Memory address size is 16Bit */
else
{
/* Send MSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress);
8008194: 893b ldrh r3, [r7, #8]
8008196: 0a1b lsrs r3, r3, #8
8008198: b29b uxth r3, r3
800819a: b2da uxtb r2, r3
800819c: 68fb ldr r3, [r7, #12]
800819e: 681b ldr r3, [r3, #0]
80081a0: 629a str r2, [r3, #40] ; 0x28
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
80081a2: 69fa ldr r2, [r7, #28]
80081a4: 69b9 ldr r1, [r7, #24]
80081a6: 68f8 ldr r0, [r7, #12]
80081a8: f000 f8d6 bl 8008358 <I2C_WaitOnTXISFlagUntilTimeout>
80081ac: 4603 mov r3, r0
80081ae: 2b00 cmp r3, #0
80081b0: d001 beq.n 80081b6 <I2C_RequestMemoryWrite+0x76>
{
return HAL_ERROR;
80081b2: 2301 movs r3, #1
80081b4: e012 b.n 80081dc <I2C_RequestMemoryWrite+0x9c>
}
/* Send LSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
80081b6: 893b ldrh r3, [r7, #8]
80081b8: b2da uxtb r2, r3
80081ba: 68fb ldr r3, [r7, #12]
80081bc: 681b ldr r3, [r3, #0]
80081be: 629a str r2, [r3, #40] ; 0x28
}
/* Wait until TCR flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, Tickstart) != HAL_OK)
80081c0: 69fb ldr r3, [r7, #28]
80081c2: 9300 str r3, [sp, #0]
80081c4: 69bb ldr r3, [r7, #24]
80081c6: 2200 movs r2, #0
80081c8: 2180 movs r1, #128 ; 0x80
80081ca: 68f8 ldr r0, [r7, #12]
80081cc: f000 f884 bl 80082d8 <I2C_WaitOnFlagUntilTimeout>
80081d0: 4603 mov r3, r0
80081d2: 2b00 cmp r3, #0
80081d4: d001 beq.n 80081da <I2C_RequestMemoryWrite+0x9a>
{
return HAL_ERROR;
80081d6: 2301 movs r3, #1
80081d8: e000 b.n 80081dc <I2C_RequestMemoryWrite+0x9c>
}
return HAL_OK;
80081da: 2300 movs r3, #0
}
80081dc: 4618 mov r0, r3
80081de: 3710 adds r7, #16
80081e0: 46bd mov sp, r7
80081e2: bd80 pop {r7, pc}
80081e4: 80002000 .word 0x80002000
080081e8 <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)
{
80081e8: b580 push {r7, lr}
80081ea: b086 sub sp, #24
80081ec: af02 add r7, sp, #8
80081ee: 60f8 str r0, [r7, #12]
80081f0: 4608 mov r0, r1
80081f2: 4611 mov r1, r2
80081f4: 461a mov r2, r3
80081f6: 4603 mov r3, r0
80081f8: 817b strh r3, [r7, #10]
80081fa: 460b mov r3, r1
80081fc: 813b strh r3, [r7, #8]
80081fe: 4613 mov r3, r2
8008200: 80fb strh r3, [r7, #6]
I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_SOFTEND_MODE, I2C_GENERATE_START_WRITE);
8008202: 88fb ldrh r3, [r7, #6]
8008204: b2da uxtb r2, r3
8008206: 8979 ldrh r1, [r7, #10]
8008208: 4b20 ldr r3, [pc, #128] ; (800828c <I2C_RequestMemoryRead+0xa4>)
800820a: 9300 str r3, [sp, #0]
800820c: 2300 movs r3, #0
800820e: 68f8 ldr r0, [r7, #12]
8008210: f000 f984 bl 800851c <I2C_TransferConfig>
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
8008214: 69fa ldr r2, [r7, #28]
8008216: 69b9 ldr r1, [r7, #24]
8008218: 68f8 ldr r0, [r7, #12]
800821a: f000 f89d bl 8008358 <I2C_WaitOnTXISFlagUntilTimeout>
800821e: 4603 mov r3, r0
8008220: 2b00 cmp r3, #0
8008222: d001 beq.n 8008228 <I2C_RequestMemoryRead+0x40>
{
return HAL_ERROR;
8008224: 2301 movs r3, #1
8008226: e02c b.n 8008282 <I2C_RequestMemoryRead+0x9a>
}
/* If Memory address size is 8Bit */
if (MemAddSize == I2C_MEMADD_SIZE_8BIT)
8008228: 88fb ldrh r3, [r7, #6]
800822a: 2b01 cmp r3, #1
800822c: d105 bne.n 800823a <I2C_RequestMemoryRead+0x52>
{
/* Send Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
800822e: 893b ldrh r3, [r7, #8]
8008230: b2da uxtb r2, r3
8008232: 68fb ldr r3, [r7, #12]
8008234: 681b ldr r3, [r3, #0]
8008236: 629a str r2, [r3, #40] ; 0x28
8008238: e015 b.n 8008266 <I2C_RequestMemoryRead+0x7e>
}
/* If Memory address size is 16Bit */
else
{
/* Send MSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress);
800823a: 893b ldrh r3, [r7, #8]
800823c: 0a1b lsrs r3, r3, #8
800823e: b29b uxth r3, r3
8008240: b2da uxtb r2, r3
8008242: 68fb ldr r3, [r7, #12]
8008244: 681b ldr r3, [r3, #0]
8008246: 629a str r2, [r3, #40] ; 0x28
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
8008248: 69fa ldr r2, [r7, #28]
800824a: 69b9 ldr r1, [r7, #24]
800824c: 68f8 ldr r0, [r7, #12]
800824e: f000 f883 bl 8008358 <I2C_WaitOnTXISFlagUntilTimeout>
8008252: 4603 mov r3, r0
8008254: 2b00 cmp r3, #0
8008256: d001 beq.n 800825c <I2C_RequestMemoryRead+0x74>
{
return HAL_ERROR;
8008258: 2301 movs r3, #1
800825a: e012 b.n 8008282 <I2C_RequestMemoryRead+0x9a>
}
/* Send LSB of Memory Address */
hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress);
800825c: 893b ldrh r3, [r7, #8]
800825e: b2da uxtb r2, r3
8008260: 68fb ldr r3, [r7, #12]
8008262: 681b ldr r3, [r3, #0]
8008264: 629a str r2, [r3, #40] ; 0x28
}
/* Wait until TC flag is set */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TC, RESET, Timeout, Tickstart) != HAL_OK)
8008266: 69fb ldr r3, [r7, #28]
8008268: 9300 str r3, [sp, #0]
800826a: 69bb ldr r3, [r7, #24]
800826c: 2200 movs r2, #0
800826e: 2140 movs r1, #64 ; 0x40
8008270: 68f8 ldr r0, [r7, #12]
8008272: f000 f831 bl 80082d8 <I2C_WaitOnFlagUntilTimeout>
8008276: 4603 mov r3, r0
8008278: 2b00 cmp r3, #0
800827a: d001 beq.n 8008280 <I2C_RequestMemoryRead+0x98>
{
return HAL_ERROR;
800827c: 2301 movs r3, #1
800827e: e000 b.n 8008282 <I2C_RequestMemoryRead+0x9a>
}
return HAL_OK;
8008280: 2300 movs r3, #0
}
8008282: 4618 mov r0, r3
8008284: 3710 adds r7, #16
8008286: 46bd mov sp, r7
8008288: bd80 pop {r7, pc}
800828a: bf00 nop
800828c: 80002000 .word 0x80002000
08008290 <I2C_Flush_TXDR>:
* @brief I2C Tx data register flush process.
* @param hi2c I2C handle.
* @retval None
*/
static void I2C_Flush_TXDR(I2C_HandleTypeDef *hi2c)
{
8008290: b480 push {r7}
8008292: b083 sub sp, #12
8008294: af00 add r7, sp, #0
8008296: 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)
8008298: 687b ldr r3, [r7, #4]
800829a: 681b ldr r3, [r3, #0]
800829c: 699b ldr r3, [r3, #24]
800829e: f003 0302 and.w r3, r3, #2
80082a2: 2b02 cmp r3, #2
80082a4: d103 bne.n 80082ae <I2C_Flush_TXDR+0x1e>
{
hi2c->Instance->TXDR = 0x00U;
80082a6: 687b ldr r3, [r7, #4]
80082a8: 681b ldr r3, [r3, #0]
80082aa: 2200 movs r2, #0
80082ac: 629a str r2, [r3, #40] ; 0x28
}
/* Flush TX register if not empty */
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXE) == RESET)
80082ae: 687b ldr r3, [r7, #4]
80082b0: 681b ldr r3, [r3, #0]
80082b2: 699b ldr r3, [r3, #24]
80082b4: f003 0301 and.w r3, r3, #1
80082b8: 2b01 cmp r3, #1
80082ba: d007 beq.n 80082cc <I2C_Flush_TXDR+0x3c>
{
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_TXE);
80082bc: 687b ldr r3, [r7, #4]
80082be: 681b ldr r3, [r3, #0]
80082c0: 699a ldr r2, [r3, #24]
80082c2: 687b ldr r3, [r7, #4]
80082c4: 681b ldr r3, [r3, #0]
80082c6: f042 0201 orr.w r2, r2, #1
80082ca: 619a str r2, [r3, #24]
}
}
80082cc: bf00 nop
80082ce: 370c adds r7, #12
80082d0: 46bd mov sp, r7
80082d2: f85d 7b04 ldr.w r7, [sp], #4
80082d6: 4770 bx lr
080082d8 <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)
{
80082d8: b580 push {r7, lr}
80082da: b084 sub sp, #16
80082dc: af00 add r7, sp, #0
80082de: 60f8 str r0, [r7, #12]
80082e0: 60b9 str r1, [r7, #8]
80082e2: 603b str r3, [r7, #0]
80082e4: 4613 mov r3, r2
80082e6: 71fb strb r3, [r7, #7]
while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)
80082e8: e022 b.n 8008330 <I2C_WaitOnFlagUntilTimeout+0x58>
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
80082ea: 683b ldr r3, [r7, #0]
80082ec: f1b3 3fff cmp.w r3, #4294967295
80082f0: d01e beq.n 8008330 <I2C_WaitOnFlagUntilTimeout+0x58>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
80082f2: f7fc fcd3 bl 8004c9c <HAL_GetTick>
80082f6: 4602 mov r2, r0
80082f8: 69bb ldr r3, [r7, #24]
80082fa: 1ad3 subs r3, r2, r3
80082fc: 683a ldr r2, [r7, #0]
80082fe: 429a cmp r2, r3
8008300: d302 bcc.n 8008308 <I2C_WaitOnFlagUntilTimeout+0x30>
8008302: 683b ldr r3, [r7, #0]
8008304: 2b00 cmp r3, #0
8008306: d113 bne.n 8008330 <I2C_WaitOnFlagUntilTimeout+0x58>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
8008308: 68fb ldr r3, [r7, #12]
800830a: 6c5b ldr r3, [r3, #68] ; 0x44
800830c: f043 0220 orr.w r2, r3, #32
8008310: 68fb ldr r3, [r7, #12]
8008312: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8008314: 68fb ldr r3, [r7, #12]
8008316: 2220 movs r2, #32
8008318: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
800831c: 68fb ldr r3, [r7, #12]
800831e: 2200 movs r2, #0
8008320: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008324: 68fb ldr r3, [r7, #12]
8008326: 2200 movs r2, #0
8008328: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
800832c: 2301 movs r3, #1
800832e: e00f b.n 8008350 <I2C_WaitOnFlagUntilTimeout+0x78>
while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)
8008330: 68fb ldr r3, [r7, #12]
8008332: 681b ldr r3, [r3, #0]
8008334: 699a ldr r2, [r3, #24]
8008336: 68bb ldr r3, [r7, #8]
8008338: 4013 ands r3, r2
800833a: 68ba ldr r2, [r7, #8]
800833c: 429a cmp r2, r3
800833e: bf0c ite eq
8008340: 2301 moveq r3, #1
8008342: 2300 movne r3, #0
8008344: b2db uxtb r3, r3
8008346: 461a mov r2, r3
8008348: 79fb ldrb r3, [r7, #7]
800834a: 429a cmp r2, r3
800834c: d0cd beq.n 80082ea <I2C_WaitOnFlagUntilTimeout+0x12>
}
}
}
return HAL_OK;
800834e: 2300 movs r3, #0
}
8008350: 4618 mov r0, r3
8008352: 3710 adds r7, #16
8008354: 46bd mov sp, r7
8008356: bd80 pop {r7, pc}
08008358 <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)
{
8008358: b580 push {r7, lr}
800835a: b084 sub sp, #16
800835c: af00 add r7, sp, #0
800835e: 60f8 str r0, [r7, #12]
8008360: 60b9 str r1, [r7, #8]
8008362: 607a str r2, [r7, #4]
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) == RESET)
8008364: e02c b.n 80083c0 <I2C_WaitOnTXISFlagUntilTimeout+0x68>
{
/* Check if a NACK is detected */
if (I2C_IsAcknowledgeFailed(hi2c, Timeout, Tickstart) != HAL_OK)
8008366: 687a ldr r2, [r7, #4]
8008368: 68b9 ldr r1, [r7, #8]
800836a: 68f8 ldr r0, [r7, #12]
800836c: f000 f870 bl 8008450 <I2C_IsAcknowledgeFailed>
8008370: 4603 mov r3, r0
8008372: 2b00 cmp r3, #0
8008374: d001 beq.n 800837a <I2C_WaitOnTXISFlagUntilTimeout+0x22>
{
return HAL_ERROR;
8008376: 2301 movs r3, #1
8008378: e02a b.n 80083d0 <I2C_WaitOnTXISFlagUntilTimeout+0x78>
}
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
800837a: 68bb ldr r3, [r7, #8]
800837c: f1b3 3fff cmp.w r3, #4294967295
8008380: d01e beq.n 80083c0 <I2C_WaitOnTXISFlagUntilTimeout+0x68>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
8008382: f7fc fc8b bl 8004c9c <HAL_GetTick>
8008386: 4602 mov r2, r0
8008388: 687b ldr r3, [r7, #4]
800838a: 1ad3 subs r3, r2, r3
800838c: 68ba ldr r2, [r7, #8]
800838e: 429a cmp r2, r3
8008390: d302 bcc.n 8008398 <I2C_WaitOnTXISFlagUntilTimeout+0x40>
8008392: 68bb ldr r3, [r7, #8]
8008394: 2b00 cmp r3, #0
8008396: d113 bne.n 80083c0 <I2C_WaitOnTXISFlagUntilTimeout+0x68>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
8008398: 68fb ldr r3, [r7, #12]
800839a: 6c5b ldr r3, [r3, #68] ; 0x44
800839c: f043 0220 orr.w r2, r3, #32
80083a0: 68fb ldr r3, [r7, #12]
80083a2: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
80083a4: 68fb ldr r3, [r7, #12]
80083a6: 2220 movs r2, #32
80083a8: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
80083ac: 68fb ldr r3, [r7, #12]
80083ae: 2200 movs r2, #0
80083b0: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
80083b4: 68fb ldr r3, [r7, #12]
80083b6: 2200 movs r2, #0
80083b8: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
80083bc: 2301 movs r3, #1
80083be: e007 b.n 80083d0 <I2C_WaitOnTXISFlagUntilTimeout+0x78>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) == RESET)
80083c0: 68fb ldr r3, [r7, #12]
80083c2: 681b ldr r3, [r3, #0]
80083c4: 699b ldr r3, [r3, #24]
80083c6: f003 0302 and.w r3, r3, #2
80083ca: 2b02 cmp r3, #2
80083cc: d1cb bne.n 8008366 <I2C_WaitOnTXISFlagUntilTimeout+0xe>
}
}
}
return HAL_OK;
80083ce: 2300 movs r3, #0
}
80083d0: 4618 mov r0, r3
80083d2: 3710 adds r7, #16
80083d4: 46bd mov sp, r7
80083d6: bd80 pop {r7, pc}
080083d8 <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)
{
80083d8: b580 push {r7, lr}
80083da: b084 sub sp, #16
80083dc: af00 add r7, sp, #0
80083de: 60f8 str r0, [r7, #12]
80083e0: 60b9 str r1, [r7, #8]
80083e2: 607a str r2, [r7, #4]
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
80083e4: e028 b.n 8008438 <I2C_WaitOnSTOPFlagUntilTimeout+0x60>
{
/* Check if a NACK is detected */
if (I2C_IsAcknowledgeFailed(hi2c, Timeout, Tickstart) != HAL_OK)
80083e6: 687a ldr r2, [r7, #4]
80083e8: 68b9 ldr r1, [r7, #8]
80083ea: 68f8 ldr r0, [r7, #12]
80083ec: f000 f830 bl 8008450 <I2C_IsAcknowledgeFailed>
80083f0: 4603 mov r3, r0
80083f2: 2b00 cmp r3, #0
80083f4: d001 beq.n 80083fa <I2C_WaitOnSTOPFlagUntilTimeout+0x22>
{
return HAL_ERROR;
80083f6: 2301 movs r3, #1
80083f8: e026 b.n 8008448 <I2C_WaitOnSTOPFlagUntilTimeout+0x70>
}
/* Check for the Timeout */
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
80083fa: f7fc fc4f bl 8004c9c <HAL_GetTick>
80083fe: 4602 mov r2, r0
8008400: 687b ldr r3, [r7, #4]
8008402: 1ad3 subs r3, r2, r3
8008404: 68ba ldr r2, [r7, #8]
8008406: 429a cmp r2, r3
8008408: d302 bcc.n 8008410 <I2C_WaitOnSTOPFlagUntilTimeout+0x38>
800840a: 68bb ldr r3, [r7, #8]
800840c: 2b00 cmp r3, #0
800840e: d113 bne.n 8008438 <I2C_WaitOnSTOPFlagUntilTimeout+0x60>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
8008410: 68fb ldr r3, [r7, #12]
8008412: 6c5b ldr r3, [r3, #68] ; 0x44
8008414: f043 0220 orr.w r2, r3, #32
8008418: 68fb ldr r3, [r7, #12]
800841a: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
800841c: 68fb ldr r3, [r7, #12]
800841e: 2220 movs r2, #32
8008420: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
8008424: 68fb ldr r3, [r7, #12]
8008426: 2200 movs r2, #0
8008428: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
800842c: 68fb ldr r3, [r7, #12]
800842e: 2200 movs r2, #0
8008430: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
8008434: 2301 movs r3, #1
8008436: e007 b.n 8008448 <I2C_WaitOnSTOPFlagUntilTimeout+0x70>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
8008438: 68fb ldr r3, [r7, #12]
800843a: 681b ldr r3, [r3, #0]
800843c: 699b ldr r3, [r3, #24]
800843e: f003 0320 and.w r3, r3, #32
8008442: 2b20 cmp r3, #32
8008444: d1cf bne.n 80083e6 <I2C_WaitOnSTOPFlagUntilTimeout+0xe>
}
}
return HAL_OK;
8008446: 2300 movs r3, #0
}
8008448: 4618 mov r0, r3
800844a: 3710 adds r7, #16
800844c: 46bd mov sp, r7
800844e: bd80 pop {r7, pc}
08008450 <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)
{
8008450: b580 push {r7, lr}
8008452: b084 sub sp, #16
8008454: af00 add r7, sp, #0
8008456: 60f8 str r0, [r7, #12]
8008458: 60b9 str r1, [r7, #8]
800845a: 607a str r2, [r7, #4]
if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF) == SET)
800845c: 68fb ldr r3, [r7, #12]
800845e: 681b ldr r3, [r3, #0]
8008460: 699b ldr r3, [r3, #24]
8008462: f003 0310 and.w r3, r3, #16
8008466: 2b10 cmp r3, #16
8008468: d151 bne.n 800850e <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)
800846a: e022 b.n 80084b2 <I2C_IsAcknowledgeFailed+0x62>
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
800846c: 68bb ldr r3, [r7, #8]
800846e: f1b3 3fff cmp.w r3, #4294967295
8008472: d01e beq.n 80084b2 <I2C_IsAcknowledgeFailed+0x62>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
8008474: f7fc fc12 bl 8004c9c <HAL_GetTick>
8008478: 4602 mov r2, r0
800847a: 687b ldr r3, [r7, #4]
800847c: 1ad3 subs r3, r2, r3
800847e: 68ba ldr r2, [r7, #8]
8008480: 429a cmp r2, r3
8008482: d302 bcc.n 800848a <I2C_IsAcknowledgeFailed+0x3a>
8008484: 68bb ldr r3, [r7, #8]
8008486: 2b00 cmp r3, #0
8008488: d113 bne.n 80084b2 <I2C_IsAcknowledgeFailed+0x62>
{
hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT;
800848a: 68fb ldr r3, [r7, #12]
800848c: 6c5b ldr r3, [r3, #68] ; 0x44
800848e: f043 0220 orr.w r2, r3, #32
8008492: 68fb ldr r3, [r7, #12]
8008494: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
8008496: 68fb ldr r3, [r7, #12]
8008498: 2220 movs r2, #32
800849a: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
800849e: 68fb ldr r3, [r7, #12]
80084a0: 2200 movs r2, #0
80084a2: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
80084a6: 68fb ldr r3, [r7, #12]
80084a8: 2200 movs r2, #0
80084aa: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
80084ae: 2301 movs r3, #1
80084b0: e02e b.n 8008510 <I2C_IsAcknowledgeFailed+0xc0>
while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET)
80084b2: 68fb ldr r3, [r7, #12]
80084b4: 681b ldr r3, [r3, #0]
80084b6: 699b ldr r3, [r3, #24]
80084b8: f003 0320 and.w r3, r3, #32
80084bc: 2b20 cmp r3, #32
80084be: d1d5 bne.n 800846c <I2C_IsAcknowledgeFailed+0x1c>
}
}
}
/* Clear NACKF Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF);
80084c0: 68fb ldr r3, [r7, #12]
80084c2: 681b ldr r3, [r3, #0]
80084c4: 2210 movs r2, #16
80084c6: 61da str r2, [r3, #28]
/* Clear STOP Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
80084c8: 68fb ldr r3, [r7, #12]
80084ca: 681b ldr r3, [r3, #0]
80084cc: 2220 movs r2, #32
80084ce: 61da str r2, [r3, #28]
/* Flush TX register */
I2C_Flush_TXDR(hi2c);
80084d0: 68f8 ldr r0, [r7, #12]
80084d2: f7ff fedd bl 8008290 <I2C_Flush_TXDR>
/* Clear Configuration Register 2 */
I2C_RESET_CR2(hi2c);
80084d6: 68fb ldr r3, [r7, #12]
80084d8: 681b ldr r3, [r3, #0]
80084da: 6859 ldr r1, [r3, #4]
80084dc: 68fb ldr r3, [r7, #12]
80084de: 681a ldr r2, [r3, #0]
80084e0: 4b0d ldr r3, [pc, #52] ; (8008518 <I2C_IsAcknowledgeFailed+0xc8>)
80084e2: 400b ands r3, r1
80084e4: 6053 str r3, [r2, #4]
hi2c->ErrorCode |= HAL_I2C_ERROR_AF;
80084e6: 68fb ldr r3, [r7, #12]
80084e8: 6c5b ldr r3, [r3, #68] ; 0x44
80084ea: f043 0204 orr.w r2, r3, #4
80084ee: 68fb ldr r3, [r7, #12]
80084f0: 645a str r2, [r3, #68] ; 0x44
hi2c->State = HAL_I2C_STATE_READY;
80084f2: 68fb ldr r3, [r7, #12]
80084f4: 2220 movs r2, #32
80084f6: f883 2041 strb.w r2, [r3, #65] ; 0x41
hi2c->Mode = HAL_I2C_MODE_NONE;
80084fa: 68fb ldr r3, [r7, #12]
80084fc: 2200 movs r2, #0
80084fe: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
8008502: 68fb ldr r3, [r7, #12]
8008504: 2200 movs r2, #0
8008506: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_ERROR;
800850a: 2301 movs r3, #1
800850c: e000 b.n 8008510 <I2C_IsAcknowledgeFailed+0xc0>
}
return HAL_OK;
800850e: 2300 movs r3, #0
}
8008510: 4618 mov r0, r3
8008512: 3710 adds r7, #16
8008514: 46bd mov sp, r7
8008516: bd80 pop {r7, pc}
8008518: fe00e800 .word 0xfe00e800
0800851c <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)
{
800851c: b480 push {r7}
800851e: b085 sub sp, #20
8008520: af00 add r7, sp, #0
8008522: 60f8 str r0, [r7, #12]
8008524: 607b str r3, [r7, #4]
8008526: 460b mov r3, r1
8008528: 817b strh r3, [r7, #10]
800852a: 4613 mov r3, r2
800852c: 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)), \
800852e: 68fb ldr r3, [r7, #12]
8008530: 681b ldr r3, [r3, #0]
8008532: 685a ldr r2, [r3, #4]
8008534: 69bb ldr r3, [r7, #24]
8008536: 0d5b lsrs r3, r3, #21
8008538: f403 6180 and.w r1, r3, #1024 ; 0x400
800853c: 4b0d ldr r3, [pc, #52] ; (8008574 <I2C_TransferConfig+0x58>)
800853e: 430b orrs r3, r1
8008540: 43db mvns r3, r3
8008542: ea02 0103 and.w r1, r2, r3
8008546: 897b ldrh r3, [r7, #10]
8008548: f3c3 0209 ubfx r2, r3, #0, #10
800854c: 7a7b ldrb r3, [r7, #9]
800854e: 041b lsls r3, r3, #16
8008550: f403 037f and.w r3, r3, #16711680 ; 0xff0000
8008554: 431a orrs r2, r3
8008556: 687b ldr r3, [r7, #4]
8008558: 431a orrs r2, r3
800855a: 69bb ldr r3, [r7, #24]
800855c: 431a orrs r2, r3
800855e: 68fb ldr r3, [r7, #12]
8008560: 681b ldr r3, [r3, #0]
8008562: 430a orrs r2, r1
8008564: 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));
}
8008566: bf00 nop
8008568: 3714 adds r7, #20
800856a: 46bd mov sp, r7
800856c: f85d 7b04 ldr.w r7, [sp], #4
8008570: 4770 bx lr
8008572: bf00 nop
8008574: 03ff63ff .word 0x03ff63ff
08008578 <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)
{
8008578: b480 push {r7}
800857a: b083 sub sp, #12
800857c: af00 add r7, sp, #0
800857e: 6078 str r0, [r7, #4]
8008580: 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)
8008582: 687b ldr r3, [r7, #4]
8008584: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
8008588: b2db uxtb r3, r3
800858a: 2b20 cmp r3, #32
800858c: d138 bne.n 8008600 <HAL_I2CEx_ConfigAnalogFilter+0x88>
{
/* Process Locked */
__HAL_LOCK(hi2c);
800858e: 687b ldr r3, [r7, #4]
8008590: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
8008594: 2b01 cmp r3, #1
8008596: d101 bne.n 800859c <HAL_I2CEx_ConfigAnalogFilter+0x24>
8008598: 2302 movs r3, #2
800859a: e032 b.n 8008602 <HAL_I2CEx_ConfigAnalogFilter+0x8a>
800859c: 687b ldr r3, [r7, #4]
800859e: 2201 movs r2, #1
80085a0: f883 2040 strb.w r2, [r3, #64] ; 0x40
hi2c->State = HAL_I2C_STATE_BUSY;
80085a4: 687b ldr r3, [r7, #4]
80085a6: 2224 movs r2, #36 ; 0x24
80085a8: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
80085ac: 687b ldr r3, [r7, #4]
80085ae: 681b ldr r3, [r3, #0]
80085b0: 681a ldr r2, [r3, #0]
80085b2: 687b ldr r3, [r7, #4]
80085b4: 681b ldr r3, [r3, #0]
80085b6: f022 0201 bic.w r2, r2, #1
80085ba: 601a str r2, [r3, #0]
/* Reset I2Cx ANOFF bit */
hi2c->Instance->CR1 &= ~(I2C_CR1_ANFOFF);
80085bc: 687b ldr r3, [r7, #4]
80085be: 681b ldr r3, [r3, #0]
80085c0: 681a ldr r2, [r3, #0]
80085c2: 687b ldr r3, [r7, #4]
80085c4: 681b ldr r3, [r3, #0]
80085c6: f422 5280 bic.w r2, r2, #4096 ; 0x1000
80085ca: 601a str r2, [r3, #0]
/* Set analog filter bit*/
hi2c->Instance->CR1 |= AnalogFilter;
80085cc: 687b ldr r3, [r7, #4]
80085ce: 681b ldr r3, [r3, #0]
80085d0: 6819 ldr r1, [r3, #0]
80085d2: 687b ldr r3, [r7, #4]
80085d4: 681b ldr r3, [r3, #0]
80085d6: 683a ldr r2, [r7, #0]
80085d8: 430a orrs r2, r1
80085da: 601a str r2, [r3, #0]
__HAL_I2C_ENABLE(hi2c);
80085dc: 687b ldr r3, [r7, #4]
80085de: 681b ldr r3, [r3, #0]
80085e0: 681a ldr r2, [r3, #0]
80085e2: 687b ldr r3, [r7, #4]
80085e4: 681b ldr r3, [r3, #0]
80085e6: f042 0201 orr.w r2, r2, #1
80085ea: 601a str r2, [r3, #0]
hi2c->State = HAL_I2C_STATE_READY;
80085ec: 687b ldr r3, [r7, #4]
80085ee: 2220 movs r2, #32
80085f0: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
80085f4: 687b ldr r3, [r7, #4]
80085f6: 2200 movs r2, #0
80085f8: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
80085fc: 2300 movs r3, #0
80085fe: e000 b.n 8008602 <HAL_I2CEx_ConfigAnalogFilter+0x8a>
}
else
{
return HAL_BUSY;
8008600: 2302 movs r3, #2
}
}
8008602: 4618 mov r0, r3
8008604: 370c adds r7, #12
8008606: 46bd mov sp, r7
8008608: f85d 7b04 ldr.w r7, [sp], #4
800860c: 4770 bx lr
0800860e <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)
{
800860e: b480 push {r7}
8008610: b085 sub sp, #20
8008612: af00 add r7, sp, #0
8008614: 6078 str r0, [r7, #4]
8008616: 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)
8008618: 687b ldr r3, [r7, #4]
800861a: f893 3041 ldrb.w r3, [r3, #65] ; 0x41
800861e: b2db uxtb r3, r3
8008620: 2b20 cmp r3, #32
8008622: d139 bne.n 8008698 <HAL_I2CEx_ConfigDigitalFilter+0x8a>
{
/* Process Locked */
__HAL_LOCK(hi2c);
8008624: 687b ldr r3, [r7, #4]
8008626: f893 3040 ldrb.w r3, [r3, #64] ; 0x40
800862a: 2b01 cmp r3, #1
800862c: d101 bne.n 8008632 <HAL_I2CEx_ConfigDigitalFilter+0x24>
800862e: 2302 movs r3, #2
8008630: e033 b.n 800869a <HAL_I2CEx_ConfigDigitalFilter+0x8c>
8008632: 687b ldr r3, [r7, #4]
8008634: 2201 movs r2, #1
8008636: f883 2040 strb.w r2, [r3, #64] ; 0x40
hi2c->State = HAL_I2C_STATE_BUSY;
800863a: 687b ldr r3, [r7, #4]
800863c: 2224 movs r2, #36 ; 0x24
800863e: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Disable the selected I2C peripheral */
__HAL_I2C_DISABLE(hi2c);
8008642: 687b ldr r3, [r7, #4]
8008644: 681b ldr r3, [r3, #0]
8008646: 681a ldr r2, [r3, #0]
8008648: 687b ldr r3, [r7, #4]
800864a: 681b ldr r3, [r3, #0]
800864c: f022 0201 bic.w r2, r2, #1
8008650: 601a str r2, [r3, #0]
/* Get the old register value */
tmpreg = hi2c->Instance->CR1;
8008652: 687b ldr r3, [r7, #4]
8008654: 681b ldr r3, [r3, #0]
8008656: 681b ldr r3, [r3, #0]
8008658: 60fb str r3, [r7, #12]
/* Reset I2Cx DNF bits [11:8] */
tmpreg &= ~(I2C_CR1_DNF);
800865a: 68fb ldr r3, [r7, #12]
800865c: f423 6370 bic.w r3, r3, #3840 ; 0xf00
8008660: 60fb str r3, [r7, #12]
/* Set I2Cx DNF coefficient */
tmpreg |= DigitalFilter << 8U;
8008662: 683b ldr r3, [r7, #0]
8008664: 021b lsls r3, r3, #8
8008666: 68fa ldr r2, [r7, #12]
8008668: 4313 orrs r3, r2
800866a: 60fb str r3, [r7, #12]
/* Store the new register value */
hi2c->Instance->CR1 = tmpreg;
800866c: 687b ldr r3, [r7, #4]
800866e: 681b ldr r3, [r3, #0]
8008670: 68fa ldr r2, [r7, #12]
8008672: 601a str r2, [r3, #0]
__HAL_I2C_ENABLE(hi2c);
8008674: 687b ldr r3, [r7, #4]
8008676: 681b ldr r3, [r3, #0]
8008678: 681a ldr r2, [r3, #0]
800867a: 687b ldr r3, [r7, #4]
800867c: 681b ldr r3, [r3, #0]
800867e: f042 0201 orr.w r2, r2, #1
8008682: 601a str r2, [r3, #0]
hi2c->State = HAL_I2C_STATE_READY;
8008684: 687b ldr r3, [r7, #4]
8008686: 2220 movs r2, #32
8008688: f883 2041 strb.w r2, [r3, #65] ; 0x41
/* Process Unlocked */
__HAL_UNLOCK(hi2c);
800868c: 687b ldr r3, [r7, #4]
800868e: 2200 movs r2, #0
8008690: f883 2040 strb.w r2, [r3, #64] ; 0x40
return HAL_OK;
8008694: 2300 movs r3, #0
8008696: e000 b.n 800869a <HAL_I2CEx_ConfigDigitalFilter+0x8c>
}
else
{
return HAL_BUSY;
8008698: 2302 movs r3, #2
}
}
800869a: 4618 mov r0, r3
800869c: 3714 adds r7, #20
800869e: 46bd mov sp, r7
80086a0: f85d 7b04 ldr.w r7, [sp], #4
80086a4: 4770 bx lr
...
080086a8 <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)
{
80086a8: b580 push {r7, lr}
80086aa: b084 sub sp, #16
80086ac: af00 add r7, sp, #0
80086ae: 6078 str r0, [r7, #4]
uint32_t tmp, tmp1;
/* Check the LTDC peripheral state */
if (hltdc == NULL)
80086b0: 687b ldr r3, [r7, #4]
80086b2: 2b00 cmp r3, #0
80086b4: d101 bne.n 80086ba <HAL_LTDC_Init+0x12>
{
return HAL_ERROR;
80086b6: 2301 movs r3, #1
80086b8: e0bf b.n 800883a <HAL_LTDC_Init+0x192>
}
/* Init the low level hardware */
hltdc->MspInitCallback(hltdc);
}
#else
if (hltdc->State == HAL_LTDC_STATE_RESET)
80086ba: 687b ldr r3, [r7, #4]
80086bc: f893 30a1 ldrb.w r3, [r3, #161] ; 0xa1
80086c0: b2db uxtb r3, r3
80086c2: 2b00 cmp r3, #0
80086c4: d106 bne.n 80086d4 <HAL_LTDC_Init+0x2c>
{
/* Allocate lock resource and initialize it */
hltdc->Lock = HAL_UNLOCKED;
80086c6: 687b ldr r3, [r7, #4]
80086c8: 2200 movs r2, #0
80086ca: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
/* Init the low level hardware */
HAL_LTDC_MspInit(hltdc);
80086ce: 6878 ldr r0, [r7, #4]
80086d0: f7fb fdae bl 8004230 <HAL_LTDC_MspInit>
}
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
/* Change LTDC peripheral state */
hltdc->State = HAL_LTDC_STATE_BUSY;
80086d4: 687b ldr r3, [r7, #4]
80086d6: 2202 movs r2, #2
80086d8: 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);
80086dc: 687b ldr r3, [r7, #4]
80086de: 681b ldr r3, [r3, #0]
80086e0: 699a ldr r2, [r3, #24]
80086e2: 687b ldr r3, [r7, #4]
80086e4: 681b ldr r3, [r3, #0]
80086e6: f022 4270 bic.w r2, r2, #4026531840 ; 0xf0000000
80086ea: 619a str r2, [r3, #24]
hltdc->Instance->GCR |= (uint32_t)(hltdc->Init.HSPolarity | hltdc->Init.VSPolarity | \
80086ec: 687b ldr r3, [r7, #4]
80086ee: 681b ldr r3, [r3, #0]
80086f0: 6999 ldr r1, [r3, #24]
80086f2: 687b ldr r3, [r7, #4]
80086f4: 685a ldr r2, [r3, #4]
80086f6: 687b ldr r3, [r7, #4]
80086f8: 689b ldr r3, [r3, #8]
80086fa: 431a orrs r2, r3
hltdc->Init.DEPolarity | hltdc->Init.PCPolarity);
80086fc: 687b ldr r3, [r7, #4]
80086fe: 68db ldr r3, [r3, #12]
hltdc->Instance->GCR |= (uint32_t)(hltdc->Init.HSPolarity | hltdc->Init.VSPolarity | \
8008700: 431a orrs r2, r3
hltdc->Init.DEPolarity | hltdc->Init.PCPolarity);
8008702: 687b ldr r3, [r7, #4]
8008704: 691b ldr r3, [r3, #16]
8008706: 431a orrs r2, r3
hltdc->Instance->GCR |= (uint32_t)(hltdc->Init.HSPolarity | hltdc->Init.VSPolarity | \
8008708: 687b ldr r3, [r7, #4]
800870a: 681b ldr r3, [r3, #0]
800870c: 430a orrs r2, r1
800870e: 619a str r2, [r3, #24]
/* Set Synchronization size */
hltdc->Instance->SSCR &= ~(LTDC_SSCR_VSH | LTDC_SSCR_HSW);
8008710: 687b ldr r3, [r7, #4]
8008712: 681b ldr r3, [r3, #0]
8008714: 6899 ldr r1, [r3, #8]
8008716: 687b ldr r3, [r7, #4]
8008718: 681a ldr r2, [r3, #0]
800871a: 4b4a ldr r3, [pc, #296] ; (8008844 <HAL_LTDC_Init+0x19c>)
800871c: 400b ands r3, r1
800871e: 6093 str r3, [r2, #8]
tmp = (hltdc->Init.HorizontalSync << 16U);
8008720: 687b ldr r3, [r7, #4]
8008722: 695b ldr r3, [r3, #20]
8008724: 041b lsls r3, r3, #16
8008726: 60fb str r3, [r7, #12]
hltdc->Instance->SSCR |= (tmp | hltdc->Init.VerticalSync);
8008728: 687b ldr r3, [r7, #4]
800872a: 681b ldr r3, [r3, #0]
800872c: 6899 ldr r1, [r3, #8]
800872e: 687b ldr r3, [r7, #4]
8008730: 699a ldr r2, [r3, #24]
8008732: 68fb ldr r3, [r7, #12]
8008734: 431a orrs r2, r3
8008736: 687b ldr r3, [r7, #4]
8008738: 681b ldr r3, [r3, #0]
800873a: 430a orrs r2, r1
800873c: 609a str r2, [r3, #8]
/* Set Accumulated Back porch */
hltdc->Instance->BPCR &= ~(LTDC_BPCR_AVBP | LTDC_BPCR_AHBP);
800873e: 687b ldr r3, [r7, #4]
8008740: 681b ldr r3, [r3, #0]
8008742: 68d9 ldr r1, [r3, #12]
8008744: 687b ldr r3, [r7, #4]
8008746: 681a ldr r2, [r3, #0]
8008748: 4b3e ldr r3, [pc, #248] ; (8008844 <HAL_LTDC_Init+0x19c>)
800874a: 400b ands r3, r1
800874c: 60d3 str r3, [r2, #12]
tmp = (hltdc->Init.AccumulatedHBP << 16U);
800874e: 687b ldr r3, [r7, #4]
8008750: 69db ldr r3, [r3, #28]
8008752: 041b lsls r3, r3, #16
8008754: 60fb str r3, [r7, #12]
hltdc->Instance->BPCR |= (tmp | hltdc->Init.AccumulatedVBP);
8008756: 687b ldr r3, [r7, #4]
8008758: 681b ldr r3, [r3, #0]
800875a: 68d9 ldr r1, [r3, #12]
800875c: 687b ldr r3, [r7, #4]
800875e: 6a1a ldr r2, [r3, #32]
8008760: 68fb ldr r3, [r7, #12]
8008762: 431a orrs r2, r3
8008764: 687b ldr r3, [r7, #4]
8008766: 681b ldr r3, [r3, #0]
8008768: 430a orrs r2, r1
800876a: 60da str r2, [r3, #12]
/* Set Accumulated Active Width */
hltdc->Instance->AWCR &= ~(LTDC_AWCR_AAH | LTDC_AWCR_AAW);
800876c: 687b ldr r3, [r7, #4]
800876e: 681b ldr r3, [r3, #0]
8008770: 6919 ldr r1, [r3, #16]
8008772: 687b ldr r3, [r7, #4]
8008774: 681a ldr r2, [r3, #0]
8008776: 4b33 ldr r3, [pc, #204] ; (8008844 <HAL_LTDC_Init+0x19c>)
8008778: 400b ands r3, r1
800877a: 6113 str r3, [r2, #16]
tmp = (hltdc->Init.AccumulatedActiveW << 16U);
800877c: 687b ldr r3, [r7, #4]
800877e: 6a5b ldr r3, [r3, #36] ; 0x24
8008780: 041b lsls r3, r3, #16
8008782: 60fb str r3, [r7, #12]
hltdc->Instance->AWCR |= (tmp | hltdc->Init.AccumulatedActiveH);
8008784: 687b ldr r3, [r7, #4]
8008786: 681b ldr r3, [r3, #0]
8008788: 6919 ldr r1, [r3, #16]
800878a: 687b ldr r3, [r7, #4]
800878c: 6a9a ldr r2, [r3, #40] ; 0x28
800878e: 68fb ldr r3, [r7, #12]
8008790: 431a orrs r2, r3
8008792: 687b ldr r3, [r7, #4]
8008794: 681b ldr r3, [r3, #0]
8008796: 430a orrs r2, r1
8008798: 611a str r2, [r3, #16]
/* Set Total Width */
hltdc->Instance->TWCR &= ~(LTDC_TWCR_TOTALH | LTDC_TWCR_TOTALW);
800879a: 687b ldr r3, [r7, #4]
800879c: 681b ldr r3, [r3, #0]
800879e: 6959 ldr r1, [r3, #20]
80087a0: 687b ldr r3, [r7, #4]
80087a2: 681a ldr r2, [r3, #0]
80087a4: 4b27 ldr r3, [pc, #156] ; (8008844 <HAL_LTDC_Init+0x19c>)
80087a6: 400b ands r3, r1
80087a8: 6153 str r3, [r2, #20]
tmp = (hltdc->Init.TotalWidth << 16U);
80087aa: 687b ldr r3, [r7, #4]
80087ac: 6adb ldr r3, [r3, #44] ; 0x2c
80087ae: 041b lsls r3, r3, #16
80087b0: 60fb str r3, [r7, #12]
hltdc->Instance->TWCR |= (tmp | hltdc->Init.TotalHeigh);
80087b2: 687b ldr r3, [r7, #4]
80087b4: 681b ldr r3, [r3, #0]
80087b6: 6959 ldr r1, [r3, #20]
80087b8: 687b ldr r3, [r7, #4]
80087ba: 6b1a ldr r2, [r3, #48] ; 0x30
80087bc: 68fb ldr r3, [r7, #12]
80087be: 431a orrs r2, r3
80087c0: 687b ldr r3, [r7, #4]
80087c2: 681b ldr r3, [r3, #0]
80087c4: 430a orrs r2, r1
80087c6: 615a str r2, [r3, #20]
/* Set the background color value */
tmp = ((uint32_t)(hltdc->Init.Backcolor.Green) << 8U);
80087c8: 687b ldr r3, [r7, #4]
80087ca: f893 3035 ldrb.w r3, [r3, #53] ; 0x35
80087ce: 021b lsls r3, r3, #8
80087d0: 60fb str r3, [r7, #12]
tmp1 = ((uint32_t)(hltdc->Init.Backcolor.Red) << 16U);
80087d2: 687b ldr r3, [r7, #4]
80087d4: f893 3036 ldrb.w r3, [r3, #54] ; 0x36
80087d8: 041b lsls r3, r3, #16
80087da: 60bb str r3, [r7, #8]
hltdc->Instance->BCCR &= ~(LTDC_BCCR_BCBLUE | LTDC_BCCR_BCGREEN | LTDC_BCCR_BCRED);
80087dc: 687b ldr r3, [r7, #4]
80087de: 681b ldr r3, [r3, #0]
80087e0: 6ada ldr r2, [r3, #44] ; 0x2c
80087e2: 687b ldr r3, [r7, #4]
80087e4: 681b ldr r3, [r3, #0]
80087e6: f002 427f and.w r2, r2, #4278190080 ; 0xff000000
80087ea: 62da str r2, [r3, #44] ; 0x2c
hltdc->Instance->BCCR |= (tmp1 | tmp | hltdc->Init.Backcolor.Blue);
80087ec: 687b ldr r3, [r7, #4]
80087ee: 681b ldr r3, [r3, #0]
80087f0: 6ad9 ldr r1, [r3, #44] ; 0x2c
80087f2: 68ba ldr r2, [r7, #8]
80087f4: 68fb ldr r3, [r7, #12]
80087f6: 4313 orrs r3, r2
80087f8: 687a ldr r2, [r7, #4]
80087fa: f892 2034 ldrb.w r2, [r2, #52] ; 0x34
80087fe: 431a orrs r2, r3
8008800: 687b ldr r3, [r7, #4]
8008802: 681b ldr r3, [r3, #0]
8008804: 430a orrs r2, r1
8008806: 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);
8008808: 687b ldr r3, [r7, #4]
800880a: 681b ldr r3, [r3, #0]
800880c: 6b5a ldr r2, [r3, #52] ; 0x34
800880e: 687b ldr r3, [r7, #4]
8008810: 681b ldr r3, [r3, #0]
8008812: f042 0206 orr.w r2, r2, #6
8008816: 635a str r2, [r3, #52] ; 0x34
/* Enable LTDC by setting LTDCEN bit */
__HAL_LTDC_ENABLE(hltdc);
8008818: 687b ldr r3, [r7, #4]
800881a: 681b ldr r3, [r3, #0]
800881c: 699a ldr r2, [r3, #24]
800881e: 687b ldr r3, [r7, #4]
8008820: 681b ldr r3, [r3, #0]
8008822: f042 0201 orr.w r2, r2, #1
8008826: 619a str r2, [r3, #24]
/* Initialize the error code */
hltdc->ErrorCode = HAL_LTDC_ERROR_NONE;
8008828: 687b ldr r3, [r7, #4]
800882a: 2200 movs r2, #0
800882c: f8c3 20a4 str.w r2, [r3, #164] ; 0xa4
/* Initialize the LTDC state*/
hltdc->State = HAL_LTDC_STATE_READY;
8008830: 687b ldr r3, [r7, #4]
8008832: 2201 movs r2, #1
8008834: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
return HAL_OK;
8008838: 2300 movs r3, #0
}
800883a: 4618 mov r0, r3
800883c: 3710 adds r7, #16
800883e: 46bd mov sp, r7
8008840: bd80 pop {r7, pc}
8008842: bf00 nop
8008844: f000f800 .word 0xf000f800
08008848 <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)
{
8008848: b580 push {r7, lr}
800884a: b084 sub sp, #16
800884c: af00 add r7, sp, #0
800884e: 6078 str r0, [r7, #4]
uint32_t isrflags = READ_REG(hltdc->Instance->ISR);
8008850: 687b ldr r3, [r7, #4]
8008852: 681b ldr r3, [r3, #0]
8008854: 6b9b ldr r3, [r3, #56] ; 0x38
8008856: 60fb str r3, [r7, #12]
uint32_t itsources = READ_REG(hltdc->Instance->IER);
8008858: 687b ldr r3, [r7, #4]
800885a: 681b ldr r3, [r3, #0]
800885c: 6b5b ldr r3, [r3, #52] ; 0x34
800885e: 60bb str r3, [r7, #8]
/* Transfer Error Interrupt management ***************************************/
if (((isrflags & LTDC_ISR_TERRIF) != 0U) && ((itsources & LTDC_IER_TERRIE) != 0U))
8008860: 68fb ldr r3, [r7, #12]
8008862: f003 0304 and.w r3, r3, #4
8008866: 2b00 cmp r3, #0
8008868: d023 beq.n 80088b2 <HAL_LTDC_IRQHandler+0x6a>
800886a: 68bb ldr r3, [r7, #8]
800886c: f003 0304 and.w r3, r3, #4
8008870: 2b00 cmp r3, #0
8008872: d01e beq.n 80088b2 <HAL_LTDC_IRQHandler+0x6a>
{
/* Disable the transfer Error interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_TE);
8008874: 687b ldr r3, [r7, #4]
8008876: 681b ldr r3, [r3, #0]
8008878: 6b5a ldr r2, [r3, #52] ; 0x34
800887a: 687b ldr r3, [r7, #4]
800887c: 681b ldr r3, [r3, #0]
800887e: f022 0204 bic.w r2, r2, #4
8008882: 635a str r2, [r3, #52] ; 0x34
/* Clear the transfer error flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_TE);
8008884: 687b ldr r3, [r7, #4]
8008886: 681b ldr r3, [r3, #0]
8008888: 2204 movs r2, #4
800888a: 63da str r2, [r3, #60] ; 0x3c
/* Update error code */
hltdc->ErrorCode |= HAL_LTDC_ERROR_TE;
800888c: 687b ldr r3, [r7, #4]
800888e: f8d3 30a4 ldr.w r3, [r3, #164] ; 0xa4
8008892: f043 0201 orr.w r2, r3, #1
8008896: 687b ldr r3, [r7, #4]
8008898: f8c3 20a4 str.w r2, [r3, #164] ; 0xa4
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_ERROR;
800889c: 687b ldr r3, [r7, #4]
800889e: 2204 movs r2, #4
80088a0: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
80088a4: 687b ldr r3, [r7, #4]
80088a6: 2200 movs r2, #0
80088a8: 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);
80088ac: 6878 ldr r0, [r7, #4]
80088ae: f000 f86f bl 8008990 <HAL_LTDC_ErrorCallback>
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
}
/* FIFO underrun Interrupt management ***************************************/
if (((isrflags & LTDC_ISR_FUIF) != 0U) && ((itsources & LTDC_IER_FUIE) != 0U))
80088b2: 68fb ldr r3, [r7, #12]
80088b4: f003 0302 and.w r3, r3, #2
80088b8: 2b00 cmp r3, #0
80088ba: d023 beq.n 8008904 <HAL_LTDC_IRQHandler+0xbc>
80088bc: 68bb ldr r3, [r7, #8]
80088be: f003 0302 and.w r3, r3, #2
80088c2: 2b00 cmp r3, #0
80088c4: d01e beq.n 8008904 <HAL_LTDC_IRQHandler+0xbc>
{
/* Disable the FIFO underrun interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_FU);
80088c6: 687b ldr r3, [r7, #4]
80088c8: 681b ldr r3, [r3, #0]
80088ca: 6b5a ldr r2, [r3, #52] ; 0x34
80088cc: 687b ldr r3, [r7, #4]
80088ce: 681b ldr r3, [r3, #0]
80088d0: f022 0202 bic.w r2, r2, #2
80088d4: 635a str r2, [r3, #52] ; 0x34
/* Clear the FIFO underrun flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_FU);
80088d6: 687b ldr r3, [r7, #4]
80088d8: 681b ldr r3, [r3, #0]
80088da: 2202 movs r2, #2
80088dc: 63da str r2, [r3, #60] ; 0x3c
/* Update error code */
hltdc->ErrorCode |= HAL_LTDC_ERROR_FU;
80088de: 687b ldr r3, [r7, #4]
80088e0: f8d3 30a4 ldr.w r3, [r3, #164] ; 0xa4
80088e4: f043 0202 orr.w r2, r3, #2
80088e8: 687b ldr r3, [r7, #4]
80088ea: f8c3 20a4 str.w r2, [r3, #164] ; 0xa4
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_ERROR;
80088ee: 687b ldr r3, [r7, #4]
80088f0: 2204 movs r2, #4
80088f2: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
80088f6: 687b ldr r3, [r7, #4]
80088f8: 2200 movs r2, #0
80088fa: 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);
80088fe: 6878 ldr r0, [r7, #4]
8008900: f000 f846 bl 8008990 <HAL_LTDC_ErrorCallback>
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
}
/* Line Interrupt management ************************************************/
if (((isrflags & LTDC_ISR_LIF) != 0U) && ((itsources & LTDC_IER_LIE) != 0U))
8008904: 68fb ldr r3, [r7, #12]
8008906: f003 0301 and.w r3, r3, #1
800890a: 2b00 cmp r3, #0
800890c: d01b beq.n 8008946 <HAL_LTDC_IRQHandler+0xfe>
800890e: 68bb ldr r3, [r7, #8]
8008910: f003 0301 and.w r3, r3, #1
8008914: 2b00 cmp r3, #0
8008916: d016 beq.n 8008946 <HAL_LTDC_IRQHandler+0xfe>
{
/* Disable the Line interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_LI);
8008918: 687b ldr r3, [r7, #4]
800891a: 681b ldr r3, [r3, #0]
800891c: 6b5a ldr r2, [r3, #52] ; 0x34
800891e: 687b ldr r3, [r7, #4]
8008920: 681b ldr r3, [r3, #0]
8008922: f022 0201 bic.w r2, r2, #1
8008926: 635a str r2, [r3, #52] ; 0x34
/* Clear the Line interrupt flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_LI);
8008928: 687b ldr r3, [r7, #4]
800892a: 681b ldr r3, [r3, #0]
800892c: 2201 movs r2, #1
800892e: 63da str r2, [r3, #60] ; 0x3c
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_READY;
8008930: 687b ldr r3, [r7, #4]
8008932: 2201 movs r2, #1
8008934: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
8008938: 687b ldr r3, [r7, #4]
800893a: 2200 movs r2, #0
800893c: 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);
8008940: 6878 ldr r0, [r7, #4]
8008942: f000 f82f bl 80089a4 <HAL_LTDC_LineEventCallback>
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
}
/* Register reload Interrupt management ***************************************/
if (((isrflags & LTDC_ISR_RRIF) != 0U) && ((itsources & LTDC_IER_RRIE) != 0U))
8008946: 68fb ldr r3, [r7, #12]
8008948: f003 0308 and.w r3, r3, #8
800894c: 2b00 cmp r3, #0
800894e: d01b beq.n 8008988 <HAL_LTDC_IRQHandler+0x140>
8008950: 68bb ldr r3, [r7, #8]
8008952: f003 0308 and.w r3, r3, #8
8008956: 2b00 cmp r3, #0
8008958: d016 beq.n 8008988 <HAL_LTDC_IRQHandler+0x140>
{
/* Disable the register reload interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_RR);
800895a: 687b ldr r3, [r7, #4]
800895c: 681b ldr r3, [r3, #0]
800895e: 6b5a ldr r2, [r3, #52] ; 0x34
8008960: 687b ldr r3, [r7, #4]
8008962: 681b ldr r3, [r3, #0]
8008964: f022 0208 bic.w r2, r2, #8
8008968: 635a str r2, [r3, #52] ; 0x34
/* Clear the register reload flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_RR);
800896a: 687b ldr r3, [r7, #4]
800896c: 681b ldr r3, [r3, #0]
800896e: 2208 movs r2, #8
8008970: 63da str r2, [r3, #60] ; 0x3c
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_READY;
8008972: 687b ldr r3, [r7, #4]
8008974: 2201 movs r2, #1
8008976: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
800897a: 687b ldr r3, [r7, #4]
800897c: 2200 movs r2, #0
800897e: 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);
8008982: 6878 ldr r0, [r7, #4]
8008984: f000 f818 bl 80089b8 <HAL_LTDC_ReloadEventCallback>
#endif /* USE_HAL_LTDC_REGISTER_CALLBACKS */
}
}
8008988: bf00 nop
800898a: 3710 adds r7, #16
800898c: 46bd mov sp, r7
800898e: bd80 pop {r7, pc}
08008990 <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)
{
8008990: b480 push {r7}
8008992: b083 sub sp, #12
8008994: af00 add r7, sp, #0
8008996: 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
*/
}
8008998: bf00 nop
800899a: 370c adds r7, #12
800899c: 46bd mov sp, r7
800899e: f85d 7b04 ldr.w r7, [sp], #4
80089a2: 4770 bx lr
080089a4 <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)
{
80089a4: b480 push {r7}
80089a6: b083 sub sp, #12
80089a8: af00 add r7, sp, #0
80089aa: 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
*/
}
80089ac: bf00 nop
80089ae: 370c adds r7, #12
80089b0: 46bd mov sp, r7
80089b2: f85d 7b04 ldr.w r7, [sp], #4
80089b6: 4770 bx lr
080089b8 <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)
{
80089b8: b480 push {r7}
80089ba: b083 sub sp, #12
80089bc: af00 add r7, sp, #0
80089be: 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
*/
}
80089c0: bf00 nop
80089c2: 370c adds r7, #12
80089c4: 46bd mov sp, r7
80089c6: f85d 7b04 ldr.w r7, [sp], #4
80089ca: 4770 bx lr
080089cc <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)
{
80089cc: b5b0 push {r4, r5, r7, lr}
80089ce: b084 sub sp, #16
80089d0: af00 add r7, sp, #0
80089d2: 60f8 str r0, [r7, #12]
80089d4: 60b9 str r1, [r7, #8]
80089d6: 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);
80089d8: 68fb ldr r3, [r7, #12]
80089da: f893 30a0 ldrb.w r3, [r3, #160] ; 0xa0
80089de: 2b01 cmp r3, #1
80089e0: d101 bne.n 80089e6 <HAL_LTDC_ConfigLayer+0x1a>
80089e2: 2302 movs r3, #2
80089e4: e02c b.n 8008a40 <HAL_LTDC_ConfigLayer+0x74>
80089e6: 68fb ldr r3, [r7, #12]
80089e8: 2201 movs r2, #1
80089ea: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
/* Change LTDC peripheral state */
hltdc->State = HAL_LTDC_STATE_BUSY;
80089ee: 68fb ldr r3, [r7, #12]
80089f0: 2202 movs r2, #2
80089f2: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Copy new layer configuration into handle structure */
hltdc->LayerCfg[LayerIdx] = *pLayerCfg;
80089f6: 68fa ldr r2, [r7, #12]
80089f8: 687b ldr r3, [r7, #4]
80089fa: 2134 movs r1, #52 ; 0x34
80089fc: fb01 f303 mul.w r3, r1, r3
8008a00: 4413 add r3, r2
8008a02: f103 0238 add.w r2, r3, #56 ; 0x38
8008a06: 68bb ldr r3, [r7, #8]
8008a08: 4614 mov r4, r2
8008a0a: 461d mov r5, r3
8008a0c: cd0f ldmia r5!, {r0, r1, r2, r3}
8008a0e: c40f stmia r4!, {r0, r1, r2, r3}
8008a10: cd0f ldmia r5!, {r0, r1, r2, r3}
8008a12: c40f stmia r4!, {r0, r1, r2, r3}
8008a14: cd0f ldmia r5!, {r0, r1, r2, r3}
8008a16: c40f stmia r4!, {r0, r1, r2, r3}
8008a18: 682b ldr r3, [r5, #0]
8008a1a: 6023 str r3, [r4, #0]
/* Configure the LTDC Layer */
LTDC_SetConfig(hltdc, pLayerCfg, LayerIdx);
8008a1c: 687a ldr r2, [r7, #4]
8008a1e: 68b9 ldr r1, [r7, #8]
8008a20: 68f8 ldr r0, [r7, #12]
8008a22: f000 f81f bl 8008a64 <LTDC_SetConfig>
/* Set the Immediate Reload type */
hltdc->Instance->SRCR = LTDC_SRCR_IMR;
8008a26: 68fb ldr r3, [r7, #12]
8008a28: 681b ldr r3, [r3, #0]
8008a2a: 2201 movs r2, #1
8008a2c: 625a str r2, [r3, #36] ; 0x24
/* Initialize the LTDC state*/
hltdc->State = HAL_LTDC_STATE_READY;
8008a2e: 68fb ldr r3, [r7, #12]
8008a30: 2201 movs r2, #1
8008a32: f883 20a1 strb.w r2, [r3, #161] ; 0xa1
/* Process unlocked */
__HAL_UNLOCK(hltdc);
8008a36: 68fb ldr r3, [r7, #12]
8008a38: 2200 movs r2, #0
8008a3a: f883 20a0 strb.w r2, [r3, #160] ; 0xa0
return HAL_OK;
8008a3e: 2300 movs r3, #0
}
8008a40: 4618 mov r0, r3
8008a42: 3710 adds r7, #16
8008a44: 46bd mov sp, r7
8008a46: bdb0 pop {r4, r5, r7, pc}
08008a48 <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)
{
8008a48: b480 push {r7}
8008a4a: b083 sub sp, #12
8008a4c: af00 add r7, sp, #0
8008a4e: 6078 str r0, [r7, #4]
return hltdc->State;
8008a50: 687b ldr r3, [r7, #4]
8008a52: f893 30a1 ldrb.w r3, [r3, #161] ; 0xa1
8008a56: b2db uxtb r3, r3
}
8008a58: 4618 mov r0, r3
8008a5a: 370c adds r7, #12
8008a5c: 46bd mov sp, r7
8008a5e: f85d 7b04 ldr.w r7, [sp], #4
8008a62: 4770 bx lr
08008a64 <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)
{
8008a64: b480 push {r7}
8008a66: b089 sub sp, #36 ; 0x24
8008a68: af00 add r7, sp, #0
8008a6a: 60f8 str r0, [r7, #12]
8008a6c: 60b9 str r1, [r7, #8]
8008a6e: 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);
8008a70: 68bb ldr r3, [r7, #8]
8008a72: 685a ldr r2, [r3, #4]
8008a74: 68fb ldr r3, [r7, #12]
8008a76: 681b ldr r3, [r3, #0]
8008a78: 68db ldr r3, [r3, #12]
8008a7a: 0c1b lsrs r3, r3, #16
8008a7c: f3c3 030b ubfx r3, r3, #0, #12
8008a80: 4413 add r3, r2
8008a82: 041b lsls r3, r3, #16
8008a84: 61fb str r3, [r7, #28]
LTDC_LAYER(hltdc, LayerIdx)->WHPCR &= ~(LTDC_LxWHPCR_WHSTPOS | LTDC_LxWHPCR_WHSPPOS);
8008a86: 68fb ldr r3, [r7, #12]
8008a88: 681b ldr r3, [r3, #0]
8008a8a: 461a mov r2, r3
8008a8c: 687b ldr r3, [r7, #4]
8008a8e: 01db lsls r3, r3, #7
8008a90: 4413 add r3, r2
8008a92: 3384 adds r3, #132 ; 0x84
8008a94: 685b ldr r3, [r3, #4]
8008a96: 68fa ldr r2, [r7, #12]
8008a98: 6812 ldr r2, [r2, #0]
8008a9a: 4611 mov r1, r2
8008a9c: 687a ldr r2, [r7, #4]
8008a9e: 01d2 lsls r2, r2, #7
8008aa0: 440a add r2, r1
8008aa2: 3284 adds r2, #132 ; 0x84
8008aa4: f403 4370 and.w r3, r3, #61440 ; 0xf000
8008aa8: 6053 str r3, [r2, #4]
LTDC_LAYER(hltdc, LayerIdx)->WHPCR = ((pLayerCfg->WindowX0 + ((hltdc->Instance->BPCR & LTDC_BPCR_AHBP) >> 16U) + 1U) | tmp);
8008aaa: 68bb ldr r3, [r7, #8]
8008aac: 681a ldr r2, [r3, #0]
8008aae: 68fb ldr r3, [r7, #12]
8008ab0: 681b ldr r3, [r3, #0]
8008ab2: 68db ldr r3, [r3, #12]
8008ab4: 0c1b lsrs r3, r3, #16
8008ab6: f3c3 030b ubfx r3, r3, #0, #12
8008aba: 4413 add r3, r2
8008abc: 1c5a adds r2, r3, #1
8008abe: 68fb ldr r3, [r7, #12]
8008ac0: 681b ldr r3, [r3, #0]
8008ac2: 4619 mov r1, r3
8008ac4: 687b ldr r3, [r7, #4]
8008ac6: 01db lsls r3, r3, #7
8008ac8: 440b add r3, r1
8008aca: 3384 adds r3, #132 ; 0x84
8008acc: 4619 mov r1, r3
8008ace: 69fb ldr r3, [r7, #28]
8008ad0: 4313 orrs r3, r2
8008ad2: 604b str r3, [r1, #4]
/* Configure the vertical start and stop position */
tmp = ((pLayerCfg->WindowY1 + (hltdc->Instance->BPCR & LTDC_BPCR_AVBP)) << 16U);
8008ad4: 68bb ldr r3, [r7, #8]
8008ad6: 68da ldr r2, [r3, #12]
8008ad8: 68fb ldr r3, [r7, #12]
8008ada: 681b ldr r3, [r3, #0]
8008adc: 68db ldr r3, [r3, #12]
8008ade: f3c3 030a ubfx r3, r3, #0, #11
8008ae2: 4413 add r3, r2
8008ae4: 041b lsls r3, r3, #16
8008ae6: 61fb str r3, [r7, #28]
LTDC_LAYER(hltdc, LayerIdx)->WVPCR &= ~(LTDC_LxWVPCR_WVSTPOS | LTDC_LxWVPCR_WVSPPOS);
8008ae8: 68fb ldr r3, [r7, #12]
8008aea: 681b ldr r3, [r3, #0]
8008aec: 461a mov r2, r3
8008aee: 687b ldr r3, [r7, #4]
8008af0: 01db lsls r3, r3, #7
8008af2: 4413 add r3, r2
8008af4: 3384 adds r3, #132 ; 0x84
8008af6: 689b ldr r3, [r3, #8]
8008af8: 68fa ldr r2, [r7, #12]
8008afa: 6812 ldr r2, [r2, #0]
8008afc: 4611 mov r1, r2
8008afe: 687a ldr r2, [r7, #4]
8008b00: 01d2 lsls r2, r2, #7
8008b02: 440a add r2, r1
8008b04: 3284 adds r2, #132 ; 0x84
8008b06: f403 4370 and.w r3, r3, #61440 ; 0xf000
8008b0a: 6093 str r3, [r2, #8]
LTDC_LAYER(hltdc, LayerIdx)->WVPCR = ((pLayerCfg->WindowY0 + (hltdc->Instance->BPCR & LTDC_BPCR_AVBP) + 1U) | tmp);
8008b0c: 68bb ldr r3, [r7, #8]
8008b0e: 689a ldr r2, [r3, #8]
8008b10: 68fb ldr r3, [r7, #12]
8008b12: 681b ldr r3, [r3, #0]
8008b14: 68db ldr r3, [r3, #12]
8008b16: f3c3 030a ubfx r3, r3, #0, #11
8008b1a: 4413 add r3, r2
8008b1c: 1c5a adds r2, r3, #1
8008b1e: 68fb ldr r3, [r7, #12]
8008b20: 681b ldr r3, [r3, #0]
8008b22: 4619 mov r1, r3
8008b24: 687b ldr r3, [r7, #4]
8008b26: 01db lsls r3, r3, #7
8008b28: 440b add r3, r1
8008b2a: 3384 adds r3, #132 ; 0x84
8008b2c: 4619 mov r1, r3
8008b2e: 69fb ldr r3, [r7, #28]
8008b30: 4313 orrs r3, r2
8008b32: 608b str r3, [r1, #8]
/* Specifies the pixel format */
LTDC_LAYER(hltdc, LayerIdx)->PFCR &= ~(LTDC_LxPFCR_PF);
8008b34: 68fb ldr r3, [r7, #12]
8008b36: 681b ldr r3, [r3, #0]
8008b38: 461a mov r2, r3
8008b3a: 687b ldr r3, [r7, #4]
8008b3c: 01db lsls r3, r3, #7
8008b3e: 4413 add r3, r2
8008b40: 3384 adds r3, #132 ; 0x84
8008b42: 691b ldr r3, [r3, #16]
8008b44: 68fa ldr r2, [r7, #12]
8008b46: 6812 ldr r2, [r2, #0]
8008b48: 4611 mov r1, r2
8008b4a: 687a ldr r2, [r7, #4]
8008b4c: 01d2 lsls r2, r2, #7
8008b4e: 440a add r2, r1
8008b50: 3284 adds r2, #132 ; 0x84
8008b52: f023 0307 bic.w r3, r3, #7
8008b56: 6113 str r3, [r2, #16]
LTDC_LAYER(hltdc, LayerIdx)->PFCR = (pLayerCfg->PixelFormat);
8008b58: 68fb ldr r3, [r7, #12]
8008b5a: 681b ldr r3, [r3, #0]
8008b5c: 461a mov r2, r3
8008b5e: 687b ldr r3, [r7, #4]
8008b60: 01db lsls r3, r3, #7
8008b62: 4413 add r3, r2
8008b64: 3384 adds r3, #132 ; 0x84
8008b66: 461a mov r2, r3
8008b68: 68bb ldr r3, [r7, #8]
8008b6a: 691b ldr r3, [r3, #16]
8008b6c: 6113 str r3, [r2, #16]
/* Configure the default color values */
tmp = ((uint32_t)(pLayerCfg->Backcolor.Green) << 8U);
8008b6e: 68bb ldr r3, [r7, #8]
8008b70: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8008b74: 021b lsls r3, r3, #8
8008b76: 61fb str r3, [r7, #28]
tmp1 = ((uint32_t)(pLayerCfg->Backcolor.Red) << 16U);
8008b78: 68bb ldr r3, [r7, #8]
8008b7a: f893 3032 ldrb.w r3, [r3, #50] ; 0x32
8008b7e: 041b lsls r3, r3, #16
8008b80: 61bb str r3, [r7, #24]
tmp2 = (pLayerCfg->Alpha0 << 24U);
8008b82: 68bb ldr r3, [r7, #8]
8008b84: 699b ldr r3, [r3, #24]
8008b86: 061b lsls r3, r3, #24
8008b88: 617b str r3, [r7, #20]
LTDC_LAYER(hltdc, LayerIdx)->DCCR &= ~(LTDC_LxDCCR_DCBLUE | LTDC_LxDCCR_DCGREEN | LTDC_LxDCCR_DCRED | LTDC_LxDCCR_DCALPHA);
8008b8a: 68fb ldr r3, [r7, #12]
8008b8c: 681b ldr r3, [r3, #0]
8008b8e: 461a mov r2, r3
8008b90: 687b ldr r3, [r7, #4]
8008b92: 01db lsls r3, r3, #7
8008b94: 4413 add r3, r2
8008b96: 3384 adds r3, #132 ; 0x84
8008b98: 699b ldr r3, [r3, #24]
8008b9a: 68fb ldr r3, [r7, #12]
8008b9c: 681b ldr r3, [r3, #0]
8008b9e: 461a mov r2, r3
8008ba0: 687b ldr r3, [r7, #4]
8008ba2: 01db lsls r3, r3, #7
8008ba4: 4413 add r3, r2
8008ba6: 3384 adds r3, #132 ; 0x84
8008ba8: 461a mov r2, r3
8008baa: 2300 movs r3, #0
8008bac: 6193 str r3, [r2, #24]
LTDC_LAYER(hltdc, LayerIdx)->DCCR = (pLayerCfg->Backcolor.Blue | tmp | tmp1 | tmp2);
8008bae: 68bb ldr r3, [r7, #8]
8008bb0: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
8008bb4: 461a mov r2, r3
8008bb6: 69fb ldr r3, [r7, #28]
8008bb8: 431a orrs r2, r3
8008bba: 69bb ldr r3, [r7, #24]
8008bbc: 431a orrs r2, r3
8008bbe: 68fb ldr r3, [r7, #12]
8008bc0: 681b ldr r3, [r3, #0]
8008bc2: 4619 mov r1, r3
8008bc4: 687b ldr r3, [r7, #4]
8008bc6: 01db lsls r3, r3, #7
8008bc8: 440b add r3, r1
8008bca: 3384 adds r3, #132 ; 0x84
8008bcc: 4619 mov r1, r3
8008bce: 697b ldr r3, [r7, #20]
8008bd0: 4313 orrs r3, r2
8008bd2: 618b str r3, [r1, #24]
/* Specifies the constant alpha value */
LTDC_LAYER(hltdc, LayerIdx)->CACR &= ~(LTDC_LxCACR_CONSTA);
8008bd4: 68fb ldr r3, [r7, #12]
8008bd6: 681b ldr r3, [r3, #0]
8008bd8: 461a mov r2, r3
8008bda: 687b ldr r3, [r7, #4]
8008bdc: 01db lsls r3, r3, #7
8008bde: 4413 add r3, r2
8008be0: 3384 adds r3, #132 ; 0x84
8008be2: 695b ldr r3, [r3, #20]
8008be4: 68fa ldr r2, [r7, #12]
8008be6: 6812 ldr r2, [r2, #0]
8008be8: 4611 mov r1, r2
8008bea: 687a ldr r2, [r7, #4]
8008bec: 01d2 lsls r2, r2, #7
8008bee: 440a add r2, r1
8008bf0: 3284 adds r2, #132 ; 0x84
8008bf2: f023 03ff bic.w r3, r3, #255 ; 0xff
8008bf6: 6153 str r3, [r2, #20]
LTDC_LAYER(hltdc, LayerIdx)->CACR = (pLayerCfg->Alpha);
8008bf8: 68fb ldr r3, [r7, #12]
8008bfa: 681b ldr r3, [r3, #0]
8008bfc: 461a mov r2, r3
8008bfe: 687b ldr r3, [r7, #4]
8008c00: 01db lsls r3, r3, #7
8008c02: 4413 add r3, r2
8008c04: 3384 adds r3, #132 ; 0x84
8008c06: 461a mov r2, r3
8008c08: 68bb ldr r3, [r7, #8]
8008c0a: 695b ldr r3, [r3, #20]
8008c0c: 6153 str r3, [r2, #20]
/* Specifies the blending factors */
LTDC_LAYER(hltdc, LayerIdx)->BFCR &= ~(LTDC_LxBFCR_BF2 | LTDC_LxBFCR_BF1);
8008c0e: 68fb ldr r3, [r7, #12]
8008c10: 681b ldr r3, [r3, #0]
8008c12: 461a mov r2, r3
8008c14: 687b ldr r3, [r7, #4]
8008c16: 01db lsls r3, r3, #7
8008c18: 4413 add r3, r2
8008c1a: 3384 adds r3, #132 ; 0x84
8008c1c: 69da ldr r2, [r3, #28]
8008c1e: 68fb ldr r3, [r7, #12]
8008c20: 681b ldr r3, [r3, #0]
8008c22: 4619 mov r1, r3
8008c24: 687b ldr r3, [r7, #4]
8008c26: 01db lsls r3, r3, #7
8008c28: 440b add r3, r1
8008c2a: 3384 adds r3, #132 ; 0x84
8008c2c: 4619 mov r1, r3
8008c2e: 4b58 ldr r3, [pc, #352] ; (8008d90 <LTDC_SetConfig+0x32c>)
8008c30: 4013 ands r3, r2
8008c32: 61cb str r3, [r1, #28]
LTDC_LAYER(hltdc, LayerIdx)->BFCR = (pLayerCfg->BlendingFactor1 | pLayerCfg->BlendingFactor2);
8008c34: 68bb ldr r3, [r7, #8]
8008c36: 69da ldr r2, [r3, #28]
8008c38: 68bb ldr r3, [r7, #8]
8008c3a: 6a1b ldr r3, [r3, #32]
8008c3c: 68f9 ldr r1, [r7, #12]
8008c3e: 6809 ldr r1, [r1, #0]
8008c40: 4608 mov r0, r1
8008c42: 6879 ldr r1, [r7, #4]
8008c44: 01c9 lsls r1, r1, #7
8008c46: 4401 add r1, r0
8008c48: 3184 adds r1, #132 ; 0x84
8008c4a: 4313 orrs r3, r2
8008c4c: 61cb str r3, [r1, #28]
/* Configure the color frame buffer start address */
LTDC_LAYER(hltdc, LayerIdx)->CFBAR &= ~(LTDC_LxCFBAR_CFBADD);
8008c4e: 68fb ldr r3, [r7, #12]
8008c50: 681b ldr r3, [r3, #0]
8008c52: 461a mov r2, r3
8008c54: 687b ldr r3, [r7, #4]
8008c56: 01db lsls r3, r3, #7
8008c58: 4413 add r3, r2
8008c5a: 3384 adds r3, #132 ; 0x84
8008c5c: 6a9b ldr r3, [r3, #40] ; 0x28
8008c5e: 68fb ldr r3, [r7, #12]
8008c60: 681b ldr r3, [r3, #0]
8008c62: 461a mov r2, r3
8008c64: 687b ldr r3, [r7, #4]
8008c66: 01db lsls r3, r3, #7
8008c68: 4413 add r3, r2
8008c6a: 3384 adds r3, #132 ; 0x84
8008c6c: 461a mov r2, r3
8008c6e: 2300 movs r3, #0
8008c70: 6293 str r3, [r2, #40] ; 0x28
LTDC_LAYER(hltdc, LayerIdx)->CFBAR = (pLayerCfg->FBStartAdress);
8008c72: 68fb ldr r3, [r7, #12]
8008c74: 681b ldr r3, [r3, #0]
8008c76: 461a mov r2, r3
8008c78: 687b ldr r3, [r7, #4]
8008c7a: 01db lsls r3, r3, #7
8008c7c: 4413 add r3, r2
8008c7e: 3384 adds r3, #132 ; 0x84
8008c80: 461a mov r2, r3
8008c82: 68bb ldr r3, [r7, #8]
8008c84: 6a5b ldr r3, [r3, #36] ; 0x24
8008c86: 6293 str r3, [r2, #40] ; 0x28
if (pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB8888)
8008c88: 68bb ldr r3, [r7, #8]
8008c8a: 691b ldr r3, [r3, #16]
8008c8c: 2b00 cmp r3, #0
8008c8e: d102 bne.n 8008c96 <LTDC_SetConfig+0x232>
{
tmp = 4U;
8008c90: 2304 movs r3, #4
8008c92: 61fb str r3, [r7, #28]
8008c94: e01b b.n 8008cce <LTDC_SetConfig+0x26a>
}
else if (pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_RGB888)
8008c96: 68bb ldr r3, [r7, #8]
8008c98: 691b ldr r3, [r3, #16]
8008c9a: 2b01 cmp r3, #1
8008c9c: d102 bne.n 8008ca4 <LTDC_SetConfig+0x240>
{
tmp = 3U;
8008c9e: 2303 movs r3, #3
8008ca0: 61fb str r3, [r7, #28]
8008ca2: e014 b.n 8008cce <LTDC_SetConfig+0x26a>
}
else if ((pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB4444) || \
8008ca4: 68bb ldr r3, [r7, #8]
8008ca6: 691b ldr r3, [r3, #16]
8008ca8: 2b04 cmp r3, #4
8008caa: d00b beq.n 8008cc4 <LTDC_SetConfig+0x260>
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_RGB565) || \
8008cac: 68bb ldr r3, [r7, #8]
8008cae: 691b ldr r3, [r3, #16]
else if ((pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB4444) || \
8008cb0: 2b02 cmp r3, #2
8008cb2: d007 beq.n 8008cc4 <LTDC_SetConfig+0x260>
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB1555) || \
8008cb4: 68bb ldr r3, [r7, #8]
8008cb6: 691b ldr r3, [r3, #16]
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_RGB565) || \
8008cb8: 2b03 cmp r3, #3
8008cba: d003 beq.n 8008cc4 <LTDC_SetConfig+0x260>
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_AL88))
8008cbc: 68bb ldr r3, [r7, #8]
8008cbe: 691b ldr r3, [r3, #16]
(pLayerCfg->PixelFormat == LTDC_PIXEL_FORMAT_ARGB1555) || \
8008cc0: 2b07 cmp r3, #7
8008cc2: d102 bne.n 8008cca <LTDC_SetConfig+0x266>
{
tmp = 2U;
8008cc4: 2302 movs r3, #2
8008cc6: 61fb str r3, [r7, #28]
8008cc8: e001 b.n 8008cce <LTDC_SetConfig+0x26a>
}
else
{
tmp = 1U;
8008cca: 2301 movs r3, #1
8008ccc: 61fb str r3, [r7, #28]
}
/* Configure the color frame buffer pitch in byte */
LTDC_LAYER(hltdc, LayerIdx)->CFBLR &= ~(LTDC_LxCFBLR_CFBLL | LTDC_LxCFBLR_CFBP);
8008cce: 68fb ldr r3, [r7, #12]
8008cd0: 681b ldr r3, [r3, #0]
8008cd2: 461a mov r2, r3
8008cd4: 687b ldr r3, [r7, #4]
8008cd6: 01db lsls r3, r3, #7
8008cd8: 4413 add r3, r2
8008cda: 3384 adds r3, #132 ; 0x84
8008cdc: 6adb ldr r3, [r3, #44] ; 0x2c
8008cde: 68fa ldr r2, [r7, #12]
8008ce0: 6812 ldr r2, [r2, #0]
8008ce2: 4611 mov r1, r2
8008ce4: 687a ldr r2, [r7, #4]
8008ce6: 01d2 lsls r2, r2, #7
8008ce8: 440a add r2, r1
8008cea: 3284 adds r2, #132 ; 0x84
8008cec: f003 23e0 and.w r3, r3, #3758153728 ; 0xe000e000
8008cf0: 62d3 str r3, [r2, #44] ; 0x2c
LTDC_LAYER(hltdc, LayerIdx)->CFBLR = (((pLayerCfg->ImageWidth * tmp) << 16U) | (((pLayerCfg->WindowX1 - pLayerCfg->WindowX0) * tmp) + 3U));
8008cf2: 68bb ldr r3, [r7, #8]
8008cf4: 6a9b ldr r3, [r3, #40] ; 0x28
8008cf6: 69fa ldr r2, [r7, #28]
8008cf8: fb02 f303 mul.w r3, r2, r3
8008cfc: 041a lsls r2, r3, #16
8008cfe: 68bb ldr r3, [r7, #8]
8008d00: 6859 ldr r1, [r3, #4]
8008d02: 68bb ldr r3, [r7, #8]
8008d04: 681b ldr r3, [r3, #0]
8008d06: 1acb subs r3, r1, r3
8008d08: 69f9 ldr r1, [r7, #28]
8008d0a: fb01 f303 mul.w r3, r1, r3
8008d0e: 3303 adds r3, #3
8008d10: 68f9 ldr r1, [r7, #12]
8008d12: 6809 ldr r1, [r1, #0]
8008d14: 4608 mov r0, r1
8008d16: 6879 ldr r1, [r7, #4]
8008d18: 01c9 lsls r1, r1, #7
8008d1a: 4401 add r1, r0
8008d1c: 3184 adds r1, #132 ; 0x84
8008d1e: 4313 orrs r3, r2
8008d20: 62cb str r3, [r1, #44] ; 0x2c
/* Configure the frame buffer line number */
LTDC_LAYER(hltdc, LayerIdx)->CFBLNR &= ~(LTDC_LxCFBLNR_CFBLNBR);
8008d22: 68fb ldr r3, [r7, #12]
8008d24: 681b ldr r3, [r3, #0]
8008d26: 461a mov r2, r3
8008d28: 687b ldr r3, [r7, #4]
8008d2a: 01db lsls r3, r3, #7
8008d2c: 4413 add r3, r2
8008d2e: 3384 adds r3, #132 ; 0x84
8008d30: 6b1a ldr r2, [r3, #48] ; 0x30
8008d32: 68fb ldr r3, [r7, #12]
8008d34: 681b ldr r3, [r3, #0]
8008d36: 4619 mov r1, r3
8008d38: 687b ldr r3, [r7, #4]
8008d3a: 01db lsls r3, r3, #7
8008d3c: 440b add r3, r1
8008d3e: 3384 adds r3, #132 ; 0x84
8008d40: 4619 mov r1, r3
8008d42: 4b14 ldr r3, [pc, #80] ; (8008d94 <LTDC_SetConfig+0x330>)
8008d44: 4013 ands r3, r2
8008d46: 630b str r3, [r1, #48] ; 0x30
LTDC_LAYER(hltdc, LayerIdx)->CFBLNR = (pLayerCfg->ImageHeight);
8008d48: 68fb ldr r3, [r7, #12]
8008d4a: 681b ldr r3, [r3, #0]
8008d4c: 461a mov r2, r3
8008d4e: 687b ldr r3, [r7, #4]
8008d50: 01db lsls r3, r3, #7
8008d52: 4413 add r3, r2
8008d54: 3384 adds r3, #132 ; 0x84
8008d56: 461a mov r2, r3
8008d58: 68bb ldr r3, [r7, #8]
8008d5a: 6adb ldr r3, [r3, #44] ; 0x2c
8008d5c: 6313 str r3, [r2, #48] ; 0x30
/* Enable LTDC_Layer by setting LEN bit */
LTDC_LAYER(hltdc, LayerIdx)->CR |= (uint32_t)LTDC_LxCR_LEN;
8008d5e: 68fb ldr r3, [r7, #12]
8008d60: 681b ldr r3, [r3, #0]
8008d62: 461a mov r2, r3
8008d64: 687b ldr r3, [r7, #4]
8008d66: 01db lsls r3, r3, #7
8008d68: 4413 add r3, r2
8008d6a: 3384 adds r3, #132 ; 0x84
8008d6c: 681b ldr r3, [r3, #0]
8008d6e: 68fa ldr r2, [r7, #12]
8008d70: 6812 ldr r2, [r2, #0]
8008d72: 4611 mov r1, r2
8008d74: 687a ldr r2, [r7, #4]
8008d76: 01d2 lsls r2, r2, #7
8008d78: 440a add r2, r1
8008d7a: 3284 adds r2, #132 ; 0x84
8008d7c: f043 0301 orr.w r3, r3, #1
8008d80: 6013 str r3, [r2, #0]
}
8008d82: bf00 nop
8008d84: 3724 adds r7, #36 ; 0x24
8008d86: 46bd mov sp, r7
8008d88: f85d 7b04 ldr.w r7, [sp], #4
8008d8c: 4770 bx lr
8008d8e: bf00 nop
8008d90: fffff8f8 .word 0xfffff8f8
8008d94: fffff800 .word 0xfffff800
08008d98 <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)
{
8008d98: b480 push {r7}
8008d9a: af00 add r7, sp, #0
/* Enable access to RTC and backup registers */
SET_BIT(PWR->CR1, PWR_CR1_DBP);
8008d9c: 4b05 ldr r3, [pc, #20] ; (8008db4 <HAL_PWR_EnableBkUpAccess+0x1c>)
8008d9e: 681b ldr r3, [r3, #0]
8008da0: 4a04 ldr r2, [pc, #16] ; (8008db4 <HAL_PWR_EnableBkUpAccess+0x1c>)
8008da2: f443 7380 orr.w r3, r3, #256 ; 0x100
8008da6: 6013 str r3, [r2, #0]
}
8008da8: bf00 nop
8008daa: 46bd mov sp, r7
8008dac: f85d 7b04 ldr.w r7, [sp], #4
8008db0: 4770 bx lr
8008db2: bf00 nop
8008db4: 40007000 .word 0x40007000
08008db8 <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)
{
8008db8: b580 push {r7, lr}
8008dba: b082 sub sp, #8
8008dbc: af00 add r7, sp, #0
uint32_t tickstart = 0;
8008dbe: 2300 movs r3, #0
8008dc0: 607b str r3, [r7, #4]
__HAL_RCC_PWR_CLK_ENABLE();
8008dc2: 4b23 ldr r3, [pc, #140] ; (8008e50 <HAL_PWREx_EnableOverDrive+0x98>)
8008dc4: 6c1b ldr r3, [r3, #64] ; 0x40
8008dc6: 4a22 ldr r2, [pc, #136] ; (8008e50 <HAL_PWREx_EnableOverDrive+0x98>)
8008dc8: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8008dcc: 6413 str r3, [r2, #64] ; 0x40
8008dce: 4b20 ldr r3, [pc, #128] ; (8008e50 <HAL_PWREx_EnableOverDrive+0x98>)
8008dd0: 6c1b ldr r3, [r3, #64] ; 0x40
8008dd2: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8008dd6: 603b str r3, [r7, #0]
8008dd8: 683b ldr r3, [r7, #0]
/* Enable the Over-drive to extend the clock frequency to 216 MHz */
__HAL_PWR_OVERDRIVE_ENABLE();
8008dda: 4b1e ldr r3, [pc, #120] ; (8008e54 <HAL_PWREx_EnableOverDrive+0x9c>)
8008ddc: 681b ldr r3, [r3, #0]
8008dde: 4a1d ldr r2, [pc, #116] ; (8008e54 <HAL_PWREx_EnableOverDrive+0x9c>)
8008de0: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8008de4: 6013 str r3, [r2, #0]
/* Get tick */
tickstart = HAL_GetTick();
8008de6: f7fb ff59 bl 8004c9c <HAL_GetTick>
8008dea: 6078 str r0, [r7, #4]
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODRDY))
8008dec: e009 b.n 8008e02 <HAL_PWREx_EnableOverDrive+0x4a>
{
if((HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)
8008dee: f7fb ff55 bl 8004c9c <HAL_GetTick>
8008df2: 4602 mov r2, r0
8008df4: 687b ldr r3, [r7, #4]
8008df6: 1ad3 subs r3, r2, r3
8008df8: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
8008dfc: d901 bls.n 8008e02 <HAL_PWREx_EnableOverDrive+0x4a>
{
return HAL_TIMEOUT;
8008dfe: 2303 movs r3, #3
8008e00: e022 b.n 8008e48 <HAL_PWREx_EnableOverDrive+0x90>
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODRDY))
8008e02: 4b14 ldr r3, [pc, #80] ; (8008e54 <HAL_PWREx_EnableOverDrive+0x9c>)
8008e04: 685b ldr r3, [r3, #4]
8008e06: f403 3380 and.w r3, r3, #65536 ; 0x10000
8008e0a: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8008e0e: d1ee bne.n 8008dee <HAL_PWREx_EnableOverDrive+0x36>
}
}
/* Enable the Over-drive switch */
__HAL_PWR_OVERDRIVESWITCHING_ENABLE();
8008e10: 4b10 ldr r3, [pc, #64] ; (8008e54 <HAL_PWREx_EnableOverDrive+0x9c>)
8008e12: 681b ldr r3, [r3, #0]
8008e14: 4a0f ldr r2, [pc, #60] ; (8008e54 <HAL_PWREx_EnableOverDrive+0x9c>)
8008e16: f443 3300 orr.w r3, r3, #131072 ; 0x20000
8008e1a: 6013 str r3, [r2, #0]
/* Get tick */
tickstart = HAL_GetTick();
8008e1c: f7fb ff3e bl 8004c9c <HAL_GetTick>
8008e20: 6078 str r0, [r7, #4]
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODSWRDY))
8008e22: e009 b.n 8008e38 <HAL_PWREx_EnableOverDrive+0x80>
{
if((HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)
8008e24: f7fb ff3a bl 8004c9c <HAL_GetTick>
8008e28: 4602 mov r2, r0
8008e2a: 687b ldr r3, [r7, #4]
8008e2c: 1ad3 subs r3, r2, r3
8008e2e: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
8008e32: d901 bls.n 8008e38 <HAL_PWREx_EnableOverDrive+0x80>
{
return HAL_TIMEOUT;
8008e34: 2303 movs r3, #3
8008e36: e007 b.n 8008e48 <HAL_PWREx_EnableOverDrive+0x90>
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODSWRDY))
8008e38: 4b06 ldr r3, [pc, #24] ; (8008e54 <HAL_PWREx_EnableOverDrive+0x9c>)
8008e3a: 685b ldr r3, [r3, #4]
8008e3c: f403 3300 and.w r3, r3, #131072 ; 0x20000
8008e40: f5b3 3f00 cmp.w r3, #131072 ; 0x20000
8008e44: d1ee bne.n 8008e24 <HAL_PWREx_EnableOverDrive+0x6c>
}
}
return HAL_OK;
8008e46: 2300 movs r3, #0
}
8008e48: 4618 mov r0, r3
8008e4a: 3708 adds r7, #8
8008e4c: 46bd mov sp, r7
8008e4e: bd80 pop {r7, pc}
8008e50: 40023800 .word 0x40023800
8008e54: 40007000 .word 0x40007000
08008e58 <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)
{
8008e58: b580 push {r7, lr}
8008e5a: b086 sub sp, #24
8008e5c: af00 add r7, sp, #0
8008e5e: 6078 str r0, [r7, #4]
uint32_t tickstart;
uint32_t pll_config;
FlagStatus pwrclkchanged = RESET;
8008e60: 2300 movs r3, #0
8008e62: 75fb strb r3, [r7, #23]
/* Check Null pointer */
if (RCC_OscInitStruct == NULL)
8008e64: 687b ldr r3, [r7, #4]
8008e66: 2b00 cmp r3, #0
8008e68: d101 bne.n 8008e6e <HAL_RCC_OscConfig+0x16>
{
return HAL_ERROR;
8008e6a: 2301 movs r3, #1
8008e6c: e291 b.n 8009392 <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)
8008e6e: 687b ldr r3, [r7, #4]
8008e70: 681b ldr r3, [r3, #0]
8008e72: f003 0301 and.w r3, r3, #1
8008e76: 2b00 cmp r3, #0
8008e78: f000 8087 beq.w 8008f8a <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)
8008e7c: 4b96 ldr r3, [pc, #600] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008e7e: 689b ldr r3, [r3, #8]
8008e80: f003 030c and.w r3, r3, #12
8008e84: 2b04 cmp r3, #4
8008e86: d00c beq.n 8008ea2 <HAL_RCC_OscConfig+0x4a>
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
8008e88: 4b93 ldr r3, [pc, #588] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008e8a: 689b ldr r3, [r3, #8]
8008e8c: f003 030c and.w r3, r3, #12
8008e90: 2b08 cmp r3, #8
8008e92: d112 bne.n 8008eba <HAL_RCC_OscConfig+0x62>
8008e94: 4b90 ldr r3, [pc, #576] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008e96: 685b ldr r3, [r3, #4]
8008e98: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8008e9c: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
8008ea0: d10b bne.n 8008eba <HAL_RCC_OscConfig+0x62>
{
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
8008ea2: 4b8d ldr r3, [pc, #564] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008ea4: 681b ldr r3, [r3, #0]
8008ea6: f403 3300 and.w r3, r3, #131072 ; 0x20000
8008eaa: 2b00 cmp r3, #0
8008eac: d06c beq.n 8008f88 <HAL_RCC_OscConfig+0x130>
8008eae: 687b ldr r3, [r7, #4]
8008eb0: 685b ldr r3, [r3, #4]
8008eb2: 2b00 cmp r3, #0
8008eb4: d168 bne.n 8008f88 <HAL_RCC_OscConfig+0x130>
{
return HAL_ERROR;
8008eb6: 2301 movs r3, #1
8008eb8: e26b b.n 8009392 <HAL_RCC_OscConfig+0x53a>
}
}
else
{
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
8008eba: 687b ldr r3, [r7, #4]
8008ebc: 685b ldr r3, [r3, #4]
8008ebe: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8008ec2: d106 bne.n 8008ed2 <HAL_RCC_OscConfig+0x7a>
8008ec4: 4b84 ldr r3, [pc, #528] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008ec6: 681b ldr r3, [r3, #0]
8008ec8: 4a83 ldr r2, [pc, #524] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008eca: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8008ece: 6013 str r3, [r2, #0]
8008ed0: e02e b.n 8008f30 <HAL_RCC_OscConfig+0xd8>
8008ed2: 687b ldr r3, [r7, #4]
8008ed4: 685b ldr r3, [r3, #4]
8008ed6: 2b00 cmp r3, #0
8008ed8: d10c bne.n 8008ef4 <HAL_RCC_OscConfig+0x9c>
8008eda: 4b7f ldr r3, [pc, #508] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008edc: 681b ldr r3, [r3, #0]
8008ede: 4a7e ldr r2, [pc, #504] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008ee0: f423 3380 bic.w r3, r3, #65536 ; 0x10000
8008ee4: 6013 str r3, [r2, #0]
8008ee6: 4b7c ldr r3, [pc, #496] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008ee8: 681b ldr r3, [r3, #0]
8008eea: 4a7b ldr r2, [pc, #492] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008eec: f423 2380 bic.w r3, r3, #262144 ; 0x40000
8008ef0: 6013 str r3, [r2, #0]
8008ef2: e01d b.n 8008f30 <HAL_RCC_OscConfig+0xd8>
8008ef4: 687b ldr r3, [r7, #4]
8008ef6: 685b ldr r3, [r3, #4]
8008ef8: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
8008efc: d10c bne.n 8008f18 <HAL_RCC_OscConfig+0xc0>
8008efe: 4b76 ldr r3, [pc, #472] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f00: 681b ldr r3, [r3, #0]
8008f02: 4a75 ldr r2, [pc, #468] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f04: f443 2380 orr.w r3, r3, #262144 ; 0x40000
8008f08: 6013 str r3, [r2, #0]
8008f0a: 4b73 ldr r3, [pc, #460] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f0c: 681b ldr r3, [r3, #0]
8008f0e: 4a72 ldr r2, [pc, #456] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f10: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8008f14: 6013 str r3, [r2, #0]
8008f16: e00b b.n 8008f30 <HAL_RCC_OscConfig+0xd8>
8008f18: 4b6f ldr r3, [pc, #444] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f1a: 681b ldr r3, [r3, #0]
8008f1c: 4a6e ldr r2, [pc, #440] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f1e: f423 3380 bic.w r3, r3, #65536 ; 0x10000
8008f22: 6013 str r3, [r2, #0]
8008f24: 4b6c ldr r3, [pc, #432] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f26: 681b ldr r3, [r3, #0]
8008f28: 4a6b ldr r2, [pc, #428] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f2a: f423 2380 bic.w r3, r3, #262144 ; 0x40000
8008f2e: 6013 str r3, [r2, #0]
/* Check the HSE State */
if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
8008f30: 687b ldr r3, [r7, #4]
8008f32: 685b ldr r3, [r3, #4]
8008f34: 2b00 cmp r3, #0
8008f36: d013 beq.n 8008f60 <HAL_RCC_OscConfig+0x108>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8008f38: f7fb feb0 bl 8004c9c <HAL_GetTick>
8008f3c: 6138 str r0, [r7, #16]
/* Wait till HSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8008f3e: e008 b.n 8008f52 <HAL_RCC_OscConfig+0xfa>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
8008f40: f7fb feac bl 8004c9c <HAL_GetTick>
8008f44: 4602 mov r2, r0
8008f46: 693b ldr r3, [r7, #16]
8008f48: 1ad3 subs r3, r2, r3
8008f4a: 2b64 cmp r3, #100 ; 0x64
8008f4c: d901 bls.n 8008f52 <HAL_RCC_OscConfig+0xfa>
{
return HAL_TIMEOUT;
8008f4e: 2303 movs r3, #3
8008f50: e21f b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
8008f52: 4b61 ldr r3, [pc, #388] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f54: 681b ldr r3, [r3, #0]
8008f56: f403 3300 and.w r3, r3, #131072 ; 0x20000
8008f5a: 2b00 cmp r3, #0
8008f5c: d0f0 beq.n 8008f40 <HAL_RCC_OscConfig+0xe8>
8008f5e: e014 b.n 8008f8a <HAL_RCC_OscConfig+0x132>
}
}
else
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8008f60: f7fb fe9c bl 8004c9c <HAL_GetTick>
8008f64: 6138 str r0, [r7, #16]
/* Wait till HSE is bypassed or disabled */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
8008f66: e008 b.n 8008f7a <HAL_RCC_OscConfig+0x122>
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
8008f68: f7fb fe98 bl 8004c9c <HAL_GetTick>
8008f6c: 4602 mov r2, r0
8008f6e: 693b ldr r3, [r7, #16]
8008f70: 1ad3 subs r3, r2, r3
8008f72: 2b64 cmp r3, #100 ; 0x64
8008f74: d901 bls.n 8008f7a <HAL_RCC_OscConfig+0x122>
{
return HAL_TIMEOUT;
8008f76: 2303 movs r3, #3
8008f78: e20b b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
8008f7a: 4b57 ldr r3, [pc, #348] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f7c: 681b ldr r3, [r3, #0]
8008f7e: f403 3300 and.w r3, r3, #131072 ; 0x20000
8008f82: 2b00 cmp r3, #0
8008f84: d1f0 bne.n 8008f68 <HAL_RCC_OscConfig+0x110>
8008f86: e000 b.n 8008f8a <HAL_RCC_OscConfig+0x132>
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
8008f88: bf00 nop
}
}
}
}
/*----------------------------- HSI Configuration --------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
8008f8a: 687b ldr r3, [r7, #4]
8008f8c: 681b ldr r3, [r3, #0]
8008f8e: f003 0302 and.w r3, r3, #2
8008f92: 2b00 cmp r3, #0
8008f94: d069 beq.n 800906a <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)
8008f96: 4b50 ldr r3, [pc, #320] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008f98: 689b ldr r3, [r3, #8]
8008f9a: f003 030c and.w r3, r3, #12
8008f9e: 2b00 cmp r3, #0
8008fa0: d00b beq.n 8008fba <HAL_RCC_OscConfig+0x162>
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
8008fa2: 4b4d ldr r3, [pc, #308] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008fa4: 689b ldr r3, [r3, #8]
8008fa6: f003 030c and.w r3, r3, #12
8008faa: 2b08 cmp r3, #8
8008fac: d11c bne.n 8008fe8 <HAL_RCC_OscConfig+0x190>
8008fae: 4b4a ldr r3, [pc, #296] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008fb0: 685b ldr r3, [r3, #4]
8008fb2: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8008fb6: 2b00 cmp r3, #0
8008fb8: d116 bne.n 8008fe8 <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))
8008fba: 4b47 ldr r3, [pc, #284] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008fbc: 681b ldr r3, [r3, #0]
8008fbe: f003 0302 and.w r3, r3, #2
8008fc2: 2b00 cmp r3, #0
8008fc4: d005 beq.n 8008fd2 <HAL_RCC_OscConfig+0x17a>
8008fc6: 687b ldr r3, [r7, #4]
8008fc8: 68db ldr r3, [r3, #12]
8008fca: 2b01 cmp r3, #1
8008fcc: d001 beq.n 8008fd2 <HAL_RCC_OscConfig+0x17a>
{
return HAL_ERROR;
8008fce: 2301 movs r3, #1
8008fd0: e1df b.n 8009392 <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);
8008fd2: 4b41 ldr r3, [pc, #260] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008fd4: 681b ldr r3, [r3, #0]
8008fd6: f023 02f8 bic.w r2, r3, #248 ; 0xf8
8008fda: 687b ldr r3, [r7, #4]
8008fdc: 691b ldr r3, [r3, #16]
8008fde: 00db lsls r3, r3, #3
8008fe0: 493d ldr r1, [pc, #244] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008fe2: 4313 orrs r3, r2
8008fe4: 600b str r3, [r1, #0]
if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
8008fe6: e040 b.n 800906a <HAL_RCC_OscConfig+0x212>
}
}
else
{
/* Check the HSI State */
if ((RCC_OscInitStruct->HSIState) != RCC_HSI_OFF)
8008fe8: 687b ldr r3, [r7, #4]
8008fea: 68db ldr r3, [r3, #12]
8008fec: 2b00 cmp r3, #0
8008fee: d023 beq.n 8009038 <HAL_RCC_OscConfig+0x1e0>
{
/* Enable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_ENABLE();
8008ff0: 4b39 ldr r3, [pc, #228] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008ff2: 681b ldr r3, [r3, #0]
8008ff4: 4a38 ldr r2, [pc, #224] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8008ff6: f043 0301 orr.w r3, r3, #1
8008ffa: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8008ffc: f7fb fe4e bl 8004c9c <HAL_GetTick>
8009000: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8009002: e008 b.n 8009016 <HAL_RCC_OscConfig+0x1be>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
8009004: f7fb fe4a bl 8004c9c <HAL_GetTick>
8009008: 4602 mov r2, r0
800900a: 693b ldr r3, [r7, #16]
800900c: 1ad3 subs r3, r2, r3
800900e: 2b02 cmp r3, #2
8009010: d901 bls.n 8009016 <HAL_RCC_OscConfig+0x1be>
{
return HAL_TIMEOUT;
8009012: 2303 movs r3, #3
8009014: e1bd b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
8009016: 4b30 ldr r3, [pc, #192] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8009018: 681b ldr r3, [r3, #0]
800901a: f003 0302 and.w r3, r3, #2
800901e: 2b00 cmp r3, #0
8009020: d0f0 beq.n 8009004 <HAL_RCC_OscConfig+0x1ac>
}
}
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
__HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
8009022: 4b2d ldr r3, [pc, #180] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8009024: 681b ldr r3, [r3, #0]
8009026: f023 02f8 bic.w r2, r3, #248 ; 0xf8
800902a: 687b ldr r3, [r7, #4]
800902c: 691b ldr r3, [r3, #16]
800902e: 00db lsls r3, r3, #3
8009030: 4929 ldr r1, [pc, #164] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8009032: 4313 orrs r3, r2
8009034: 600b str r3, [r1, #0]
8009036: e018 b.n 800906a <HAL_RCC_OscConfig+0x212>
}
else
{
/* Disable the Internal High Speed oscillator (HSI). */
__HAL_RCC_HSI_DISABLE();
8009038: 4b27 ldr r3, [pc, #156] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
800903a: 681b ldr r3, [r3, #0]
800903c: 4a26 ldr r2, [pc, #152] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
800903e: f023 0301 bic.w r3, r3, #1
8009042: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009044: f7fb fe2a bl 8004c9c <HAL_GetTick>
8009048: 6138 str r0, [r7, #16]
/* Wait till HSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
800904a: e008 b.n 800905e <HAL_RCC_OscConfig+0x206>
{
if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
800904c: f7fb fe26 bl 8004c9c <HAL_GetTick>
8009050: 4602 mov r2, r0
8009052: 693b ldr r3, [r7, #16]
8009054: 1ad3 subs r3, r2, r3
8009056: 2b02 cmp r3, #2
8009058: d901 bls.n 800905e <HAL_RCC_OscConfig+0x206>
{
return HAL_TIMEOUT;
800905a: 2303 movs r3, #3
800905c: e199 b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
800905e: 4b1e ldr r3, [pc, #120] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8009060: 681b ldr r3, [r3, #0]
8009062: f003 0302 and.w r3, r3, #2
8009066: 2b00 cmp r3, #0
8009068: d1f0 bne.n 800904c <HAL_RCC_OscConfig+0x1f4>
}
}
}
}
/*------------------------------ LSI Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
800906a: 687b ldr r3, [r7, #4]
800906c: 681b ldr r3, [r3, #0]
800906e: f003 0308 and.w r3, r3, #8
8009072: 2b00 cmp r3, #0
8009074: d038 beq.n 80090e8 <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)
8009076: 687b ldr r3, [r7, #4]
8009078: 695b ldr r3, [r3, #20]
800907a: 2b00 cmp r3, #0
800907c: d019 beq.n 80090b2 <HAL_RCC_OscConfig+0x25a>
{
/* Enable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_ENABLE();
800907e: 4b16 ldr r3, [pc, #88] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8009080: 6f5b ldr r3, [r3, #116] ; 0x74
8009082: 4a15 ldr r2, [pc, #84] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
8009084: f043 0301 orr.w r3, r3, #1
8009088: 6753 str r3, [r2, #116] ; 0x74
/* Get Start Tick*/
tickstart = HAL_GetTick();
800908a: f7fb fe07 bl 8004c9c <HAL_GetTick>
800908e: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
8009090: e008 b.n 80090a4 <HAL_RCC_OscConfig+0x24c>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
8009092: f7fb fe03 bl 8004c9c <HAL_GetTick>
8009096: 4602 mov r2, r0
8009098: 693b ldr r3, [r7, #16]
800909a: 1ad3 subs r3, r2, r3
800909c: 2b02 cmp r3, #2
800909e: d901 bls.n 80090a4 <HAL_RCC_OscConfig+0x24c>
{
return HAL_TIMEOUT;
80090a0: 2303 movs r3, #3
80090a2: e176 b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
80090a4: 4b0c ldr r3, [pc, #48] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
80090a6: 6f5b ldr r3, [r3, #116] ; 0x74
80090a8: f003 0302 and.w r3, r3, #2
80090ac: 2b00 cmp r3, #0
80090ae: d0f0 beq.n 8009092 <HAL_RCC_OscConfig+0x23a>
80090b0: e01a b.n 80090e8 <HAL_RCC_OscConfig+0x290>
}
}
else
{
/* Disable the Internal Low Speed oscillator (LSI). */
__HAL_RCC_LSI_DISABLE();
80090b2: 4b09 ldr r3, [pc, #36] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
80090b4: 6f5b ldr r3, [r3, #116] ; 0x74
80090b6: 4a08 ldr r2, [pc, #32] ; (80090d8 <HAL_RCC_OscConfig+0x280>)
80090b8: f023 0301 bic.w r3, r3, #1
80090bc: 6753 str r3, [r2, #116] ; 0x74
/* Get Start Tick*/
tickstart = HAL_GetTick();
80090be: f7fb fded bl 8004c9c <HAL_GetTick>
80090c2: 6138 str r0, [r7, #16]
/* Wait till LSI is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
80090c4: e00a b.n 80090dc <HAL_RCC_OscConfig+0x284>
{
if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
80090c6: f7fb fde9 bl 8004c9c <HAL_GetTick>
80090ca: 4602 mov r2, r0
80090cc: 693b ldr r3, [r7, #16]
80090ce: 1ad3 subs r3, r2, r3
80090d0: 2b02 cmp r3, #2
80090d2: d903 bls.n 80090dc <HAL_RCC_OscConfig+0x284>
{
return HAL_TIMEOUT;
80090d4: 2303 movs r3, #3
80090d6: e15c b.n 8009392 <HAL_RCC_OscConfig+0x53a>
80090d8: 40023800 .word 0x40023800
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
80090dc: 4b91 ldr r3, [pc, #580] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80090de: 6f5b ldr r3, [r3, #116] ; 0x74
80090e0: f003 0302 and.w r3, r3, #2
80090e4: 2b00 cmp r3, #0
80090e6: d1ee bne.n 80090c6 <HAL_RCC_OscConfig+0x26e>
}
}
}
}
/*------------------------------ LSE Configuration -------------------------*/
if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
80090e8: 687b ldr r3, [r7, #4]
80090ea: 681b ldr r3, [r3, #0]
80090ec: f003 0304 and.w r3, r3, #4
80090f0: 2b00 cmp r3, #0
80090f2: f000 80a4 beq.w 800923e <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())
80090f6: 4b8b ldr r3, [pc, #556] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80090f8: 6c1b ldr r3, [r3, #64] ; 0x40
80090fa: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
80090fe: 2b00 cmp r3, #0
8009100: d10d bne.n 800911e <HAL_RCC_OscConfig+0x2c6>
{
/* Enable Power Clock*/
__HAL_RCC_PWR_CLK_ENABLE();
8009102: 4b88 ldr r3, [pc, #544] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009104: 6c1b ldr r3, [r3, #64] ; 0x40
8009106: 4a87 ldr r2, [pc, #540] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009108: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
800910c: 6413 str r3, [r2, #64] ; 0x40
800910e: 4b85 ldr r3, [pc, #532] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009110: 6c1b ldr r3, [r3, #64] ; 0x40
8009112: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
8009116: 60bb str r3, [r7, #8]
8009118: 68bb ldr r3, [r7, #8]
pwrclkchanged = SET;
800911a: 2301 movs r3, #1
800911c: 75fb strb r3, [r7, #23]
}
if (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
800911e: 4b82 ldr r3, [pc, #520] ; (8009328 <HAL_RCC_OscConfig+0x4d0>)
8009120: 681b ldr r3, [r3, #0]
8009122: f403 7380 and.w r3, r3, #256 ; 0x100
8009126: 2b00 cmp r3, #0
8009128: d118 bne.n 800915c <HAL_RCC_OscConfig+0x304>
{
/* Enable write access to Backup domain */
PWR->CR1 |= PWR_CR1_DBP;
800912a: 4b7f ldr r3, [pc, #508] ; (8009328 <HAL_RCC_OscConfig+0x4d0>)
800912c: 681b ldr r3, [r3, #0]
800912e: 4a7e ldr r2, [pc, #504] ; (8009328 <HAL_RCC_OscConfig+0x4d0>)
8009130: f443 7380 orr.w r3, r3, #256 ; 0x100
8009134: 6013 str r3, [r2, #0]
/* Wait for Backup domain Write protection disable */
tickstart = HAL_GetTick();
8009136: f7fb fdb1 bl 8004c9c <HAL_GetTick>
800913a: 6138 str r0, [r7, #16]
while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
800913c: e008 b.n 8009150 <HAL_RCC_OscConfig+0x2f8>
{
if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
800913e: f7fb fdad bl 8004c9c <HAL_GetTick>
8009142: 4602 mov r2, r0
8009144: 693b ldr r3, [r7, #16]
8009146: 1ad3 subs r3, r2, r3
8009148: 2b64 cmp r3, #100 ; 0x64
800914a: d901 bls.n 8009150 <HAL_RCC_OscConfig+0x2f8>
{
return HAL_TIMEOUT;
800914c: 2303 movs r3, #3
800914e: e120 b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
8009150: 4b75 ldr r3, [pc, #468] ; (8009328 <HAL_RCC_OscConfig+0x4d0>)
8009152: 681b ldr r3, [r3, #0]
8009154: f403 7380 and.w r3, r3, #256 ; 0x100
8009158: 2b00 cmp r3, #0
800915a: d0f0 beq.n 800913e <HAL_RCC_OscConfig+0x2e6>
}
}
}
/* Set the new LSE configuration -----------------------------------------*/
__HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
800915c: 687b ldr r3, [r7, #4]
800915e: 689b ldr r3, [r3, #8]
8009160: 2b01 cmp r3, #1
8009162: d106 bne.n 8009172 <HAL_RCC_OscConfig+0x31a>
8009164: 4b6f ldr r3, [pc, #444] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009166: 6f1b ldr r3, [r3, #112] ; 0x70
8009168: 4a6e ldr r2, [pc, #440] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
800916a: f043 0301 orr.w r3, r3, #1
800916e: 6713 str r3, [r2, #112] ; 0x70
8009170: e02d b.n 80091ce <HAL_RCC_OscConfig+0x376>
8009172: 687b ldr r3, [r7, #4]
8009174: 689b ldr r3, [r3, #8]
8009176: 2b00 cmp r3, #0
8009178: d10c bne.n 8009194 <HAL_RCC_OscConfig+0x33c>
800917a: 4b6a ldr r3, [pc, #424] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
800917c: 6f1b ldr r3, [r3, #112] ; 0x70
800917e: 4a69 ldr r2, [pc, #420] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009180: f023 0301 bic.w r3, r3, #1
8009184: 6713 str r3, [r2, #112] ; 0x70
8009186: 4b67 ldr r3, [pc, #412] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009188: 6f1b ldr r3, [r3, #112] ; 0x70
800918a: 4a66 ldr r2, [pc, #408] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
800918c: f023 0304 bic.w r3, r3, #4
8009190: 6713 str r3, [r2, #112] ; 0x70
8009192: e01c b.n 80091ce <HAL_RCC_OscConfig+0x376>
8009194: 687b ldr r3, [r7, #4]
8009196: 689b ldr r3, [r3, #8]
8009198: 2b05 cmp r3, #5
800919a: d10c bne.n 80091b6 <HAL_RCC_OscConfig+0x35e>
800919c: 4b61 ldr r3, [pc, #388] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
800919e: 6f1b ldr r3, [r3, #112] ; 0x70
80091a0: 4a60 ldr r2, [pc, #384] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80091a2: f043 0304 orr.w r3, r3, #4
80091a6: 6713 str r3, [r2, #112] ; 0x70
80091a8: 4b5e ldr r3, [pc, #376] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80091aa: 6f1b ldr r3, [r3, #112] ; 0x70
80091ac: 4a5d ldr r2, [pc, #372] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80091ae: f043 0301 orr.w r3, r3, #1
80091b2: 6713 str r3, [r2, #112] ; 0x70
80091b4: e00b b.n 80091ce <HAL_RCC_OscConfig+0x376>
80091b6: 4b5b ldr r3, [pc, #364] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80091b8: 6f1b ldr r3, [r3, #112] ; 0x70
80091ba: 4a5a ldr r2, [pc, #360] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80091bc: f023 0301 bic.w r3, r3, #1
80091c0: 6713 str r3, [r2, #112] ; 0x70
80091c2: 4b58 ldr r3, [pc, #352] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80091c4: 6f1b ldr r3, [r3, #112] ; 0x70
80091c6: 4a57 ldr r2, [pc, #348] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80091c8: f023 0304 bic.w r3, r3, #4
80091cc: 6713 str r3, [r2, #112] ; 0x70
/* Check the LSE State */
if ((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
80091ce: 687b ldr r3, [r7, #4]
80091d0: 689b ldr r3, [r3, #8]
80091d2: 2b00 cmp r3, #0
80091d4: d015 beq.n 8009202 <HAL_RCC_OscConfig+0x3aa>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
80091d6: f7fb fd61 bl 8004c9c <HAL_GetTick>
80091da: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
80091dc: e00a b.n 80091f4 <HAL_RCC_OscConfig+0x39c>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
80091de: f7fb fd5d bl 8004c9c <HAL_GetTick>
80091e2: 4602 mov r2, r0
80091e4: 693b ldr r3, [r7, #16]
80091e6: 1ad3 subs r3, r2, r3
80091e8: f241 3288 movw r2, #5000 ; 0x1388
80091ec: 4293 cmp r3, r2
80091ee: d901 bls.n 80091f4 <HAL_RCC_OscConfig+0x39c>
{
return HAL_TIMEOUT;
80091f0: 2303 movs r3, #3
80091f2: e0ce b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
80091f4: 4b4b ldr r3, [pc, #300] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80091f6: 6f1b ldr r3, [r3, #112] ; 0x70
80091f8: f003 0302 and.w r3, r3, #2
80091fc: 2b00 cmp r3, #0
80091fe: d0ee beq.n 80091de <HAL_RCC_OscConfig+0x386>
8009200: e014 b.n 800922c <HAL_RCC_OscConfig+0x3d4>
}
}
else
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009202: f7fb fd4b bl 8004c9c <HAL_GetTick>
8009206: 6138 str r0, [r7, #16]
/* Wait till LSE is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
8009208: e00a b.n 8009220 <HAL_RCC_OscConfig+0x3c8>
{
if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
800920a: f7fb fd47 bl 8004c9c <HAL_GetTick>
800920e: 4602 mov r2, r0
8009210: 693b ldr r3, [r7, #16]
8009212: 1ad3 subs r3, r2, r3
8009214: f241 3288 movw r2, #5000 ; 0x1388
8009218: 4293 cmp r3, r2
800921a: d901 bls.n 8009220 <HAL_RCC_OscConfig+0x3c8>
{
return HAL_TIMEOUT;
800921c: 2303 movs r3, #3
800921e: e0b8 b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
8009220: 4b40 ldr r3, [pc, #256] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009222: 6f1b ldr r3, [r3, #112] ; 0x70
8009224: f003 0302 and.w r3, r3, #2
8009228: 2b00 cmp r3, #0
800922a: d1ee bne.n 800920a <HAL_RCC_OscConfig+0x3b2>
}
}
}
/* Restore clock configuration if changed */
if (pwrclkchanged == SET)
800922c: 7dfb ldrb r3, [r7, #23]
800922e: 2b01 cmp r3, #1
8009230: d105 bne.n 800923e <HAL_RCC_OscConfig+0x3e6>
{
__HAL_RCC_PWR_CLK_DISABLE();
8009232: 4b3c ldr r3, [pc, #240] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009234: 6c1b ldr r3, [r3, #64] ; 0x40
8009236: 4a3b ldr r2, [pc, #236] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009238: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
800923c: 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)
800923e: 687b ldr r3, [r7, #4]
8009240: 699b ldr r3, [r3, #24]
8009242: 2b00 cmp r3, #0
8009244: f000 80a4 beq.w 8009390 <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)
8009248: 4b36 ldr r3, [pc, #216] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
800924a: 689b ldr r3, [r3, #8]
800924c: f003 030c and.w r3, r3, #12
8009250: 2b08 cmp r3, #8
8009252: d06b beq.n 800932c <HAL_RCC_OscConfig+0x4d4>
{
if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
8009254: 687b ldr r3, [r7, #4]
8009256: 699b ldr r3, [r3, #24]
8009258: 2b02 cmp r3, #2
800925a: d149 bne.n 80092f0 <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();
800925c: 4b31 ldr r3, [pc, #196] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
800925e: 681b ldr r3, [r3, #0]
8009260: 4a30 ldr r2, [pc, #192] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009262: f023 7380 bic.w r3, r3, #16777216 ; 0x1000000
8009266: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009268: f7fb fd18 bl 8004c9c <HAL_GetTick>
800926c: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
800926e: e008 b.n 8009282 <HAL_RCC_OscConfig+0x42a>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8009270: f7fb fd14 bl 8004c9c <HAL_GetTick>
8009274: 4602 mov r2, r0
8009276: 693b ldr r3, [r7, #16]
8009278: 1ad3 subs r3, r2, r3
800927a: 2b02 cmp r3, #2
800927c: d901 bls.n 8009282 <HAL_RCC_OscConfig+0x42a>
{
return HAL_TIMEOUT;
800927e: 2303 movs r3, #3
8009280: e087 b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8009282: 4b28 ldr r3, [pc, #160] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009284: 681b ldr r3, [r3, #0]
8009286: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800928a: 2b00 cmp r3, #0
800928c: d1f0 bne.n 8009270 <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,
800928e: 687b ldr r3, [r7, #4]
8009290: 69da ldr r2, [r3, #28]
8009292: 687b ldr r3, [r7, #4]
8009294: 6a1b ldr r3, [r3, #32]
8009296: 431a orrs r2, r3
8009298: 687b ldr r3, [r7, #4]
800929a: 6a5b ldr r3, [r3, #36] ; 0x24
800929c: 019b lsls r3, r3, #6
800929e: 431a orrs r2, r3
80092a0: 687b ldr r3, [r7, #4]
80092a2: 6a9b ldr r3, [r3, #40] ; 0x28
80092a4: 085b lsrs r3, r3, #1
80092a6: 3b01 subs r3, #1
80092a8: 041b lsls r3, r3, #16
80092aa: 431a orrs r2, r3
80092ac: 687b ldr r3, [r7, #4]
80092ae: 6adb ldr r3, [r3, #44] ; 0x2c
80092b0: 061b lsls r3, r3, #24
80092b2: 4313 orrs r3, r2
80092b4: 4a1b ldr r2, [pc, #108] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80092b6: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
80092ba: 6053 str r3, [r2, #4]
RCC_OscInitStruct->PLL.PLLP,
RCC_OscInitStruct->PLL.PLLQ);
#endif
/* Enable the main PLL. */
__HAL_RCC_PLL_ENABLE();
80092bc: 4b19 ldr r3, [pc, #100] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80092be: 681b ldr r3, [r3, #0]
80092c0: 4a18 ldr r2, [pc, #96] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80092c2: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
80092c6: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
80092c8: f7fb fce8 bl 8004c9c <HAL_GetTick>
80092cc: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
80092ce: e008 b.n 80092e2 <HAL_RCC_OscConfig+0x48a>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
80092d0: f7fb fce4 bl 8004c9c <HAL_GetTick>
80092d4: 4602 mov r2, r0
80092d6: 693b ldr r3, [r7, #16]
80092d8: 1ad3 subs r3, r2, r3
80092da: 2b02 cmp r3, #2
80092dc: d901 bls.n 80092e2 <HAL_RCC_OscConfig+0x48a>
{
return HAL_TIMEOUT;
80092de: 2303 movs r3, #3
80092e0: e057 b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
80092e2: 4b10 ldr r3, [pc, #64] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80092e4: 681b ldr r3, [r3, #0]
80092e6: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
80092ea: 2b00 cmp r3, #0
80092ec: d0f0 beq.n 80092d0 <HAL_RCC_OscConfig+0x478>
80092ee: e04f b.n 8009390 <HAL_RCC_OscConfig+0x538>
}
}
else
{
/* Disable the main PLL. */
__HAL_RCC_PLL_DISABLE();
80092f0: 4b0c ldr r3, [pc, #48] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80092f2: 681b ldr r3, [r3, #0]
80092f4: 4a0b ldr r2, [pc, #44] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
80092f6: f023 7380 bic.w r3, r3, #16777216 ; 0x1000000
80092fa: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
80092fc: f7fb fcce bl 8004c9c <HAL_GetTick>
8009300: 6138 str r0, [r7, #16]
/* Wait till PLL is ready */
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8009302: e008 b.n 8009316 <HAL_RCC_OscConfig+0x4be>
{
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
8009304: f7fb fcca bl 8004c9c <HAL_GetTick>
8009308: 4602 mov r2, r0
800930a: 693b ldr r3, [r7, #16]
800930c: 1ad3 subs r3, r2, r3
800930e: 2b02 cmp r3, #2
8009310: d901 bls.n 8009316 <HAL_RCC_OscConfig+0x4be>
{
return HAL_TIMEOUT;
8009312: 2303 movs r3, #3
8009314: e03d b.n 8009392 <HAL_RCC_OscConfig+0x53a>
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
8009316: 4b03 ldr r3, [pc, #12] ; (8009324 <HAL_RCC_OscConfig+0x4cc>)
8009318: 681b ldr r3, [r3, #0]
800931a: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800931e: 2b00 cmp r3, #0
8009320: d1f0 bne.n 8009304 <HAL_RCC_OscConfig+0x4ac>
8009322: e035 b.n 8009390 <HAL_RCC_OscConfig+0x538>
8009324: 40023800 .word 0x40023800
8009328: 40007000 .word 0x40007000
}
}
else
{
/* Do not return HAL_ERROR if request repeats the current configuration */
pll_config = RCC->PLLCFGR;
800932c: 4b1b ldr r3, [pc, #108] ; (800939c <HAL_RCC_OscConfig+0x544>)
800932e: 685b ldr r3, [r3, #4]
8009330: 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) ||
8009332: 687b ldr r3, [r7, #4]
8009334: 699b ldr r3, [r3, #24]
8009336: 2b01 cmp r3, #1
8009338: d028 beq.n 800938c <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
800933a: 68fb ldr r3, [r7, #12]
800933c: f403 0280 and.w r2, r3, #4194304 ; 0x400000
8009340: 687b ldr r3, [r7, #4]
8009342: 69db ldr r3, [r3, #28]
if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
8009344: 429a cmp r2, r3
8009346: d121 bne.n 800938c <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
8009348: 68fb ldr r3, [r7, #12]
800934a: f003 023f and.w r2, r3, #63 ; 0x3f
800934e: 687b ldr r3, [r7, #4]
8009350: 6a1b ldr r3, [r3, #32]
(READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
8009352: 429a cmp r2, r3
8009354: d11a bne.n 800938c <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
8009356: 68fa ldr r2, [r7, #12]
8009358: f647 73c0 movw r3, #32704 ; 0x7fc0
800935c: 4013 ands r3, r2
800935e: 687a ldr r2, [r7, #4]
8009360: 6a52 ldr r2, [r2, #36] ; 0x24
8009362: 0192 lsls r2, r2, #6
(READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
8009364: 4293 cmp r3, r2
8009366: d111 bne.n 800938c <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != ((((RCC_OscInitStruct->PLL.PLLP) >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos)) ||
8009368: 68fb ldr r3, [r7, #12]
800936a: f403 3240 and.w r2, r3, #196608 ; 0x30000
800936e: 687b ldr r3, [r7, #4]
8009370: 6a9b ldr r3, [r3, #40] ; 0x28
8009372: 085b lsrs r3, r3, #1
8009374: 3b01 subs r3, #1
8009376: 041b lsls r3, r3, #16
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
8009378: 429a cmp r2, r3
800937a: d107 bne.n 800938c <HAL_RCC_OscConfig+0x534>
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
800937c: 68fb ldr r3, [r7, #12]
800937e: f003 6270 and.w r2, r3, #251658240 ; 0xf000000
8009382: 687b ldr r3, [r7, #4]
8009384: 6adb ldr r3, [r3, #44] ; 0x2c
8009386: 061b lsls r3, r3, #24
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != ((((RCC_OscInitStruct->PLL.PLLP) >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos)) ||
8009388: 429a cmp r2, r3
800938a: d001 beq.n 8009390 <HAL_RCC_OscConfig+0x538>
#endif
{
return HAL_ERROR;
800938c: 2301 movs r3, #1
800938e: e000 b.n 8009392 <HAL_RCC_OscConfig+0x53a>
}
}
}
return HAL_OK;
8009390: 2300 movs r3, #0
}
8009392: 4618 mov r0, r3
8009394: 3718 adds r7, #24
8009396: 46bd mov sp, r7
8009398: bd80 pop {r7, pc}
800939a: bf00 nop
800939c: 40023800 .word 0x40023800
080093a0 <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)
{
80093a0: b580 push {r7, lr}
80093a2: b084 sub sp, #16
80093a4: af00 add r7, sp, #0
80093a6: 6078 str r0, [r7, #4]
80093a8: 6039 str r1, [r7, #0]
uint32_t tickstart = 0;
80093aa: 2300 movs r3, #0
80093ac: 60fb str r3, [r7, #12]
/* Check Null pointer */
if (RCC_ClkInitStruct == NULL)
80093ae: 687b ldr r3, [r7, #4]
80093b0: 2b00 cmp r3, #0
80093b2: d101 bne.n 80093b8 <HAL_RCC_ClockConfig+0x18>
{
return HAL_ERROR;
80093b4: 2301 movs r3, #1
80093b6: e0d0 b.n 800955a <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())
80093b8: 4b6a ldr r3, [pc, #424] ; (8009564 <HAL_RCC_ClockConfig+0x1c4>)
80093ba: 681b ldr r3, [r3, #0]
80093bc: f003 030f and.w r3, r3, #15
80093c0: 683a ldr r2, [r7, #0]
80093c2: 429a cmp r2, r3
80093c4: d910 bls.n 80093e8 <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);
80093c6: 4b67 ldr r3, [pc, #412] ; (8009564 <HAL_RCC_ClockConfig+0x1c4>)
80093c8: 681b ldr r3, [r3, #0]
80093ca: f023 020f bic.w r2, r3, #15
80093ce: 4965 ldr r1, [pc, #404] ; (8009564 <HAL_RCC_ClockConfig+0x1c4>)
80093d0: 683b ldr r3, [r7, #0]
80093d2: 4313 orrs r3, r2
80093d4: 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)
80093d6: 4b63 ldr r3, [pc, #396] ; (8009564 <HAL_RCC_ClockConfig+0x1c4>)
80093d8: 681b ldr r3, [r3, #0]
80093da: f003 030f and.w r3, r3, #15
80093de: 683a ldr r2, [r7, #0]
80093e0: 429a cmp r2, r3
80093e2: d001 beq.n 80093e8 <HAL_RCC_ClockConfig+0x48>
{
return HAL_ERROR;
80093e4: 2301 movs r3, #1
80093e6: e0b8 b.n 800955a <HAL_RCC_ClockConfig+0x1ba>
}
}
/*-------------------------- HCLK Configuration --------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
80093e8: 687b ldr r3, [r7, #4]
80093ea: 681b ldr r3, [r3, #0]
80093ec: f003 0302 and.w r3, r3, #2
80093f0: 2b00 cmp r3, #0
80093f2: d020 beq.n 8009436 <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)
80093f4: 687b ldr r3, [r7, #4]
80093f6: 681b ldr r3, [r3, #0]
80093f8: f003 0304 and.w r3, r3, #4
80093fc: 2b00 cmp r3, #0
80093fe: d005 beq.n 800940c <HAL_RCC_ClockConfig+0x6c>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
8009400: 4b59 ldr r3, [pc, #356] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009402: 689b ldr r3, [r3, #8]
8009404: 4a58 ldr r2, [pc, #352] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009406: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00
800940a: 6093 str r3, [r2, #8]
}
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
800940c: 687b ldr r3, [r7, #4]
800940e: 681b ldr r3, [r3, #0]
8009410: f003 0308 and.w r3, r3, #8
8009414: 2b00 cmp r3, #0
8009416: d005 beq.n 8009424 <HAL_RCC_ClockConfig+0x84>
{
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
8009418: 4b53 ldr r3, [pc, #332] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
800941a: 689b ldr r3, [r3, #8]
800941c: 4a52 ldr r2, [pc, #328] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
800941e: f443 4360 orr.w r3, r3, #57344 ; 0xe000
8009422: 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);
8009424: 4b50 ldr r3, [pc, #320] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009426: 689b ldr r3, [r3, #8]
8009428: f023 02f0 bic.w r2, r3, #240 ; 0xf0
800942c: 687b ldr r3, [r7, #4]
800942e: 689b ldr r3, [r3, #8]
8009430: 494d ldr r1, [pc, #308] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009432: 4313 orrs r3, r2
8009434: 608b str r3, [r1, #8]
}
/*------------------------- SYSCLK Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
8009436: 687b ldr r3, [r7, #4]
8009438: 681b ldr r3, [r3, #0]
800943a: f003 0301 and.w r3, r3, #1
800943e: 2b00 cmp r3, #0
8009440: d040 beq.n 80094c4 <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)
8009442: 687b ldr r3, [r7, #4]
8009444: 685b ldr r3, [r3, #4]
8009446: 2b01 cmp r3, #1
8009448: d107 bne.n 800945a <HAL_RCC_ClockConfig+0xba>
{
/* Check the HSE ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
800944a: 4b47 ldr r3, [pc, #284] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
800944c: 681b ldr r3, [r3, #0]
800944e: f403 3300 and.w r3, r3, #131072 ; 0x20000
8009452: 2b00 cmp r3, #0
8009454: d115 bne.n 8009482 <HAL_RCC_ClockConfig+0xe2>
{
return HAL_ERROR;
8009456: 2301 movs r3, #1
8009458: e07f b.n 800955a <HAL_RCC_ClockConfig+0x1ba>
}
}
/* PLL is selected as System Clock Source */
else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
800945a: 687b ldr r3, [r7, #4]
800945c: 685b ldr r3, [r3, #4]
800945e: 2b02 cmp r3, #2
8009460: d107 bne.n 8009472 <HAL_RCC_ClockConfig+0xd2>
{
/* Check the PLL ready flag */
if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
8009462: 4b41 ldr r3, [pc, #260] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009464: 681b ldr r3, [r3, #0]
8009466: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800946a: 2b00 cmp r3, #0
800946c: d109 bne.n 8009482 <HAL_RCC_ClockConfig+0xe2>
{
return HAL_ERROR;
800946e: 2301 movs r3, #1
8009470: e073 b.n 800955a <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)
8009472: 4b3d ldr r3, [pc, #244] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009474: 681b ldr r3, [r3, #0]
8009476: f003 0302 and.w r3, r3, #2
800947a: 2b00 cmp r3, #0
800947c: d101 bne.n 8009482 <HAL_RCC_ClockConfig+0xe2>
{
return HAL_ERROR;
800947e: 2301 movs r3, #1
8009480: e06b b.n 800955a <HAL_RCC_ClockConfig+0x1ba>
}
}
__HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
8009482: 4b39 ldr r3, [pc, #228] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009484: 689b ldr r3, [r3, #8]
8009486: f023 0203 bic.w r2, r3, #3
800948a: 687b ldr r3, [r7, #4]
800948c: 685b ldr r3, [r3, #4]
800948e: 4936 ldr r1, [pc, #216] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009490: 4313 orrs r3, r2
8009492: 608b str r3, [r1, #8]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009494: f7fb fc02 bl 8004c9c <HAL_GetTick>
8009498: 60f8 str r0, [r7, #12]
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
800949a: e00a b.n 80094b2 <HAL_RCC_ClockConfig+0x112>
{
if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
800949c: f7fb fbfe bl 8004c9c <HAL_GetTick>
80094a0: 4602 mov r2, r0
80094a2: 68fb ldr r3, [r7, #12]
80094a4: 1ad3 subs r3, r2, r3
80094a6: f241 3288 movw r2, #5000 ; 0x1388
80094aa: 4293 cmp r3, r2
80094ac: d901 bls.n 80094b2 <HAL_RCC_ClockConfig+0x112>
{
return HAL_TIMEOUT;
80094ae: 2303 movs r3, #3
80094b0: e053 b.n 800955a <HAL_RCC_ClockConfig+0x1ba>
while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
80094b2: 4b2d ldr r3, [pc, #180] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
80094b4: 689b ldr r3, [r3, #8]
80094b6: f003 020c and.w r2, r3, #12
80094ba: 687b ldr r3, [r7, #4]
80094bc: 685b ldr r3, [r3, #4]
80094be: 009b lsls r3, r3, #2
80094c0: 429a cmp r2, r3
80094c2: d1eb bne.n 800949c <HAL_RCC_ClockConfig+0xfc>
}
}
}
/* Decreasing the number of wait states because of lower CPU frequency */
if (FLatency < __HAL_FLASH_GET_LATENCY())
80094c4: 4b27 ldr r3, [pc, #156] ; (8009564 <HAL_RCC_ClockConfig+0x1c4>)
80094c6: 681b ldr r3, [r3, #0]
80094c8: f003 030f and.w r3, r3, #15
80094cc: 683a ldr r2, [r7, #0]
80094ce: 429a cmp r2, r3
80094d0: d210 bcs.n 80094f4 <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);
80094d2: 4b24 ldr r3, [pc, #144] ; (8009564 <HAL_RCC_ClockConfig+0x1c4>)
80094d4: 681b ldr r3, [r3, #0]
80094d6: f023 020f bic.w r2, r3, #15
80094da: 4922 ldr r1, [pc, #136] ; (8009564 <HAL_RCC_ClockConfig+0x1c4>)
80094dc: 683b ldr r3, [r7, #0]
80094de: 4313 orrs r3, r2
80094e0: 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)
80094e2: 4b20 ldr r3, [pc, #128] ; (8009564 <HAL_RCC_ClockConfig+0x1c4>)
80094e4: 681b ldr r3, [r3, #0]
80094e6: f003 030f and.w r3, r3, #15
80094ea: 683a ldr r2, [r7, #0]
80094ec: 429a cmp r2, r3
80094ee: d001 beq.n 80094f4 <HAL_RCC_ClockConfig+0x154>
{
return HAL_ERROR;
80094f0: 2301 movs r3, #1
80094f2: e032 b.n 800955a <HAL_RCC_ClockConfig+0x1ba>
}
}
/*-------------------------- PCLK1 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
80094f4: 687b ldr r3, [r7, #4]
80094f6: 681b ldr r3, [r3, #0]
80094f8: f003 0304 and.w r3, r3, #4
80094fc: 2b00 cmp r3, #0
80094fe: d008 beq.n 8009512 <HAL_RCC_ClockConfig+0x172>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
8009500: 4b19 ldr r3, [pc, #100] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009502: 689b ldr r3, [r3, #8]
8009504: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00
8009508: 687b ldr r3, [r7, #4]
800950a: 68db ldr r3, [r3, #12]
800950c: 4916 ldr r1, [pc, #88] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
800950e: 4313 orrs r3, r2
8009510: 608b str r3, [r1, #8]
}
/*-------------------------- PCLK2 Configuration ---------------------------*/
if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
8009512: 687b ldr r3, [r7, #4]
8009514: 681b ldr r3, [r3, #0]
8009516: f003 0308 and.w r3, r3, #8
800951a: 2b00 cmp r3, #0
800951c: d009 beq.n 8009532 <HAL_RCC_ClockConfig+0x192>
{
assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3));
800951e: 4b12 ldr r3, [pc, #72] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
8009520: 689b ldr r3, [r3, #8]
8009522: f423 4260 bic.w r2, r3, #57344 ; 0xe000
8009526: 687b ldr r3, [r7, #4]
8009528: 691b ldr r3, [r3, #16]
800952a: 00db lsls r3, r3, #3
800952c: 490e ldr r1, [pc, #56] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
800952e: 4313 orrs r3, r2
8009530: 608b str r3, [r1, #8]
}
/* Update the SystemCoreClock global variable */
SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos];
8009532: f000 f821 bl 8009578 <HAL_RCC_GetSysClockFreq>
8009536: 4601 mov r1, r0
8009538: 4b0b ldr r3, [pc, #44] ; (8009568 <HAL_RCC_ClockConfig+0x1c8>)
800953a: 689b ldr r3, [r3, #8]
800953c: 091b lsrs r3, r3, #4
800953e: f003 030f and.w r3, r3, #15
8009542: 4a0a ldr r2, [pc, #40] ; (800956c <HAL_RCC_ClockConfig+0x1cc>)
8009544: 5cd3 ldrb r3, [r2, r3]
8009546: fa21 f303 lsr.w r3, r1, r3
800954a: 4a09 ldr r2, [pc, #36] ; (8009570 <HAL_RCC_ClockConfig+0x1d0>)
800954c: 6013 str r3, [r2, #0]
/* Configure the source of time base considering new system clocks settings*/
HAL_InitTick(uwTickPrio);
800954e: 4b09 ldr r3, [pc, #36] ; (8009574 <HAL_RCC_ClockConfig+0x1d4>)
8009550: 681b ldr r3, [r3, #0]
8009552: 4618 mov r0, r3
8009554: f7fb fa0c bl 8004970 <HAL_InitTick>
return HAL_OK;
8009558: 2300 movs r3, #0
}
800955a: 4618 mov r0, r3
800955c: 3710 adds r7, #16
800955e: 46bd mov sp, r7
8009560: bd80 pop {r7, pc}
8009562: bf00 nop
8009564: 40023c00 .word 0x40023c00
8009568: 40023800 .word 0x40023800
800956c: 080225a8 .word 0x080225a8
8009570: 20000050 .word 0x20000050
8009574: 20000054 .word 0x20000054
08009578 <HAL_RCC_GetSysClockFreq>:
*
*
* @retval SYSCLK frequency
*/
uint32_t HAL_RCC_GetSysClockFreq(void)
{
8009578: b5f0 push {r4, r5, r6, r7, lr}
800957a: b085 sub sp, #20
800957c: af00 add r7, sp, #0
uint32_t pllm = 0, pllvco = 0, pllp = 0;
800957e: 2300 movs r3, #0
8009580: 607b str r3, [r7, #4]
8009582: 2300 movs r3, #0
8009584: 60fb str r3, [r7, #12]
8009586: 2300 movs r3, #0
8009588: 603b str r3, [r7, #0]
uint32_t sysclockfreq = 0;
800958a: 2300 movs r3, #0
800958c: 60bb str r3, [r7, #8]
/* Get SYSCLK source -------------------------------------------------------*/
switch (RCC->CFGR & RCC_CFGR_SWS)
800958e: 4b50 ldr r3, [pc, #320] ; (80096d0 <HAL_RCC_GetSysClockFreq+0x158>)
8009590: 689b ldr r3, [r3, #8]
8009592: f003 030c and.w r3, r3, #12
8009596: 2b04 cmp r3, #4
8009598: d007 beq.n 80095aa <HAL_RCC_GetSysClockFreq+0x32>
800959a: 2b08 cmp r3, #8
800959c: d008 beq.n 80095b0 <HAL_RCC_GetSysClockFreq+0x38>
800959e: 2b00 cmp r3, #0
80095a0: f040 808d bne.w 80096be <HAL_RCC_GetSysClockFreq+0x146>
{
case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */
{
sysclockfreq = HSI_VALUE;
80095a4: 4b4b ldr r3, [pc, #300] ; (80096d4 <HAL_RCC_GetSysClockFreq+0x15c>)
80095a6: 60bb str r3, [r7, #8]
break;
80095a8: e08c b.n 80096c4 <HAL_RCC_GetSysClockFreq+0x14c>
}
case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock source */
{
sysclockfreq = HSE_VALUE;
80095aa: 4b4b ldr r3, [pc, #300] ; (80096d8 <HAL_RCC_GetSysClockFreq+0x160>)
80095ac: 60bb str r3, [r7, #8]
break;
80095ae: e089 b.n 80096c4 <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;
80095b0: 4b47 ldr r3, [pc, #284] ; (80096d0 <HAL_RCC_GetSysClockFreq+0x158>)
80095b2: 685b ldr r3, [r3, #4]
80095b4: f003 033f and.w r3, r3, #63 ; 0x3f
80095b8: 607b str r3, [r7, #4]
if (__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLCFGR_PLLSRC_HSI)
80095ba: 4b45 ldr r3, [pc, #276] ; (80096d0 <HAL_RCC_GetSysClockFreq+0x158>)
80095bc: 685b ldr r3, [r3, #4]
80095be: f403 0380 and.w r3, r3, #4194304 ; 0x400000
80095c2: 2b00 cmp r3, #0
80095c4: d023 beq.n 800960e <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);
80095c6: 4b42 ldr r3, [pc, #264] ; (80096d0 <HAL_RCC_GetSysClockFreq+0x158>)
80095c8: 685b ldr r3, [r3, #4]
80095ca: 099b lsrs r3, r3, #6
80095cc: f04f 0400 mov.w r4, #0
80095d0: f240 11ff movw r1, #511 ; 0x1ff
80095d4: f04f 0200 mov.w r2, #0
80095d8: ea03 0501 and.w r5, r3, r1
80095dc: ea04 0602 and.w r6, r4, r2
80095e0: 4a3d ldr r2, [pc, #244] ; (80096d8 <HAL_RCC_GetSysClockFreq+0x160>)
80095e2: fb02 f106 mul.w r1, r2, r6
80095e6: 2200 movs r2, #0
80095e8: fb02 f205 mul.w r2, r2, r5
80095ec: 440a add r2, r1
80095ee: 493a ldr r1, [pc, #232] ; (80096d8 <HAL_RCC_GetSysClockFreq+0x160>)
80095f0: fba5 0101 umull r0, r1, r5, r1
80095f4: 1853 adds r3, r2, r1
80095f6: 4619 mov r1, r3
80095f8: 687b ldr r3, [r7, #4]
80095fa: f04f 0400 mov.w r4, #0
80095fe: 461a mov r2, r3
8009600: 4623 mov r3, r4
8009602: f7f6 fe55 bl 80002b0 <__aeabi_uldivmod>
8009606: 4603 mov r3, r0
8009608: 460c mov r4, r1
800960a: 60fb str r3, [r7, #12]
800960c: e049 b.n 80096a2 <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);
800960e: 4b30 ldr r3, [pc, #192] ; (80096d0 <HAL_RCC_GetSysClockFreq+0x158>)
8009610: 685b ldr r3, [r3, #4]
8009612: 099b lsrs r3, r3, #6
8009614: f04f 0400 mov.w r4, #0
8009618: f240 11ff movw r1, #511 ; 0x1ff
800961c: f04f 0200 mov.w r2, #0
8009620: ea03 0501 and.w r5, r3, r1
8009624: ea04 0602 and.w r6, r4, r2
8009628: 4629 mov r1, r5
800962a: 4632 mov r2, r6
800962c: f04f 0300 mov.w r3, #0
8009630: f04f 0400 mov.w r4, #0
8009634: 0154 lsls r4, r2, #5
8009636: ea44 64d1 orr.w r4, r4, r1, lsr #27
800963a: 014b lsls r3, r1, #5
800963c: 4619 mov r1, r3
800963e: 4622 mov r2, r4
8009640: 1b49 subs r1, r1, r5
8009642: eb62 0206 sbc.w r2, r2, r6
8009646: f04f 0300 mov.w r3, #0
800964a: f04f 0400 mov.w r4, #0
800964e: 0194 lsls r4, r2, #6
8009650: ea44 6491 orr.w r4, r4, r1, lsr #26
8009654: 018b lsls r3, r1, #6
8009656: 1a5b subs r3, r3, r1
8009658: eb64 0402 sbc.w r4, r4, r2
800965c: f04f 0100 mov.w r1, #0
8009660: f04f 0200 mov.w r2, #0
8009664: 00e2 lsls r2, r4, #3
8009666: ea42 7253 orr.w r2, r2, r3, lsr #29
800966a: 00d9 lsls r1, r3, #3
800966c: 460b mov r3, r1
800966e: 4614 mov r4, r2
8009670: 195b adds r3, r3, r5
8009672: eb44 0406 adc.w r4, r4, r6
8009676: f04f 0100 mov.w r1, #0
800967a: f04f 0200 mov.w r2, #0
800967e: 02a2 lsls r2, r4, #10
8009680: ea42 5293 orr.w r2, r2, r3, lsr #22
8009684: 0299 lsls r1, r3, #10
8009686: 460b mov r3, r1
8009688: 4614 mov r4, r2
800968a: 4618 mov r0, r3
800968c: 4621 mov r1, r4
800968e: 687b ldr r3, [r7, #4]
8009690: f04f 0400 mov.w r4, #0
8009694: 461a mov r2, r3
8009696: 4623 mov r3, r4
8009698: f7f6 fe0a bl 80002b0 <__aeabi_uldivmod>
800969c: 4603 mov r3, r0
800969e: 460c mov r4, r1
80096a0: 60fb str r3, [r7, #12]
}
pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1) * 2);
80096a2: 4b0b ldr r3, [pc, #44] ; (80096d0 <HAL_RCC_GetSysClockFreq+0x158>)
80096a4: 685b ldr r3, [r3, #4]
80096a6: 0c1b lsrs r3, r3, #16
80096a8: f003 0303 and.w r3, r3, #3
80096ac: 3301 adds r3, #1
80096ae: 005b lsls r3, r3, #1
80096b0: 603b str r3, [r7, #0]
sysclockfreq = pllvco / pllp;
80096b2: 68fa ldr r2, [r7, #12]
80096b4: 683b ldr r3, [r7, #0]
80096b6: fbb2 f3f3 udiv r3, r2, r3
80096ba: 60bb str r3, [r7, #8]
break;
80096bc: e002 b.n 80096c4 <HAL_RCC_GetSysClockFreq+0x14c>
}
default:
{
sysclockfreq = HSI_VALUE;
80096be: 4b05 ldr r3, [pc, #20] ; (80096d4 <HAL_RCC_GetSysClockFreq+0x15c>)
80096c0: 60bb str r3, [r7, #8]
break;
80096c2: bf00 nop
}
}
return sysclockfreq;
80096c4: 68bb ldr r3, [r7, #8]
}
80096c6: 4618 mov r0, r3
80096c8: 3714 adds r7, #20
80096ca: 46bd mov sp, r7
80096cc: bdf0 pop {r4, r5, r6, r7, pc}
80096ce: bf00 nop
80096d0: 40023800 .word 0x40023800
80096d4: 00f42400 .word 0x00f42400
80096d8: 017d7840 .word 0x017d7840
080096dc <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)
{
80096dc: b480 push {r7}
80096de: af00 add r7, sp, #0
return SystemCoreClock;
80096e0: 4b03 ldr r3, [pc, #12] ; (80096f0 <HAL_RCC_GetHCLKFreq+0x14>)
80096e2: 681b ldr r3, [r3, #0]
}
80096e4: 4618 mov r0, r3
80096e6: 46bd mov sp, r7
80096e8: f85d 7b04 ldr.w r7, [sp], #4
80096ec: 4770 bx lr
80096ee: bf00 nop
80096f0: 20000050 .word 0x20000050
080096f4 <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)
{
80096f4: b580 push {r7, lr}
80096f6: 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]);
80096f8: f7ff fff0 bl 80096dc <HAL_RCC_GetHCLKFreq>
80096fc: 4601 mov r1, r0
80096fe: 4b05 ldr r3, [pc, #20] ; (8009714 <HAL_RCC_GetPCLK1Freq+0x20>)
8009700: 689b ldr r3, [r3, #8]
8009702: 0a9b lsrs r3, r3, #10
8009704: f003 0307 and.w r3, r3, #7
8009708: 4a03 ldr r2, [pc, #12] ; (8009718 <HAL_RCC_GetPCLK1Freq+0x24>)
800970a: 5cd3 ldrb r3, [r2, r3]
800970c: fa21 f303 lsr.w r3, r1, r3
}
8009710: 4618 mov r0, r3
8009712: bd80 pop {r7, pc}
8009714: 40023800 .word 0x40023800
8009718: 080225b8 .word 0x080225b8
0800971c <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)
{
800971c: b580 push {r7, lr}
800971e: 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]);
8009720: f7ff ffdc bl 80096dc <HAL_RCC_GetHCLKFreq>
8009724: 4601 mov r1, r0
8009726: 4b05 ldr r3, [pc, #20] ; (800973c <HAL_RCC_GetPCLK2Freq+0x20>)
8009728: 689b ldr r3, [r3, #8]
800972a: 0b5b lsrs r3, r3, #13
800972c: f003 0307 and.w r3, r3, #7
8009730: 4a03 ldr r2, [pc, #12] ; (8009740 <HAL_RCC_GetPCLK2Freq+0x24>)
8009732: 5cd3 ldrb r3, [r2, r3]
8009734: fa21 f303 lsr.w r3, r1, r3
}
8009738: 4618 mov r0, r3
800973a: bd80 pop {r7, pc}
800973c: 40023800 .word 0x40023800
8009740: 080225b8 .word 0x080225b8
08009744 <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)
{
8009744: b480 push {r7}
8009746: b083 sub sp, #12
8009748: af00 add r7, sp, #0
800974a: 6078 str r0, [r7, #4]
800974c: 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;
800974e: 687b ldr r3, [r7, #4]
8009750: 220f movs r2, #15
8009752: 601a str r2, [r3, #0]
/* Get the SYSCLK configuration --------------------------------------------*/
RCC_ClkInitStruct->SYSCLKSource = (uint32_t)(RCC->CFGR & RCC_CFGR_SW);
8009754: 4b12 ldr r3, [pc, #72] ; (80097a0 <HAL_RCC_GetClockConfig+0x5c>)
8009756: 689b ldr r3, [r3, #8]
8009758: f003 0203 and.w r2, r3, #3
800975c: 687b ldr r3, [r7, #4]
800975e: 605a str r2, [r3, #4]
/* Get the HCLK configuration ----------------------------------------------*/
RCC_ClkInitStruct->AHBCLKDivider = (uint32_t)(RCC->CFGR & RCC_CFGR_HPRE);
8009760: 4b0f ldr r3, [pc, #60] ; (80097a0 <HAL_RCC_GetClockConfig+0x5c>)
8009762: 689b ldr r3, [r3, #8]
8009764: f003 02f0 and.w r2, r3, #240 ; 0xf0
8009768: 687b ldr r3, [r7, #4]
800976a: 609a str r2, [r3, #8]
/* Get the APB1 configuration ----------------------------------------------*/
RCC_ClkInitStruct->APB1CLKDivider = (uint32_t)(RCC->CFGR & RCC_CFGR_PPRE1);
800976c: 4b0c ldr r3, [pc, #48] ; (80097a0 <HAL_RCC_GetClockConfig+0x5c>)
800976e: 689b ldr r3, [r3, #8]
8009770: f403 52e0 and.w r2, r3, #7168 ; 0x1c00
8009774: 687b ldr r3, [r7, #4]
8009776: 60da str r2, [r3, #12]
/* Get the APB2 configuration ----------------------------------------------*/
RCC_ClkInitStruct->APB2CLKDivider = (uint32_t)((RCC->CFGR & RCC_CFGR_PPRE2) >> 3);
8009778: 4b09 ldr r3, [pc, #36] ; (80097a0 <HAL_RCC_GetClockConfig+0x5c>)
800977a: 689b ldr r3, [r3, #8]
800977c: 08db lsrs r3, r3, #3
800977e: f403 52e0 and.w r2, r3, #7168 ; 0x1c00
8009782: 687b ldr r3, [r7, #4]
8009784: 611a str r2, [r3, #16]
/* Get the Flash Wait State (Latency) configuration ------------------------*/
*pFLatency = (uint32_t)(FLASH->ACR & FLASH_ACR_LATENCY);
8009786: 4b07 ldr r3, [pc, #28] ; (80097a4 <HAL_RCC_GetClockConfig+0x60>)
8009788: 681b ldr r3, [r3, #0]
800978a: f003 020f and.w r2, r3, #15
800978e: 683b ldr r3, [r7, #0]
8009790: 601a str r2, [r3, #0]
}
8009792: bf00 nop
8009794: 370c adds r7, #12
8009796: 46bd mov sp, r7
8009798: f85d 7b04 ldr.w r7, [sp], #4
800979c: 4770 bx lr
800979e: bf00 nop
80097a0: 40023800 .word 0x40023800
80097a4: 40023c00 .word 0x40023c00
080097a8 <HAL_RCCEx_PeriphCLKConfig>:
* the backup registers) are set to their reset values.
*
* @retval HAL status
*/
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
{
80097a8: b580 push {r7, lr}
80097aa: b088 sub sp, #32
80097ac: af00 add r7, sp, #0
80097ae: 6078 str r0, [r7, #4]
uint32_t tickstart = 0;
80097b0: 2300 movs r3, #0
80097b2: 617b str r3, [r7, #20]
uint32_t tmpreg0 = 0;
80097b4: 2300 movs r3, #0
80097b6: 613b str r3, [r7, #16]
uint32_t tmpreg1 = 0;
80097b8: 2300 movs r3, #0
80097ba: 60fb str r3, [r7, #12]
uint32_t plli2sused = 0;
80097bc: 2300 movs r3, #0
80097be: 61fb str r3, [r7, #28]
uint32_t pllsaiused = 0;
80097c0: 2300 movs r3, #0
80097c2: 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))
80097c4: 687b ldr r3, [r7, #4]
80097c6: 681b ldr r3, [r3, #0]
80097c8: f003 0301 and.w r3, r3, #1
80097cc: 2b00 cmp r3, #0
80097ce: d012 beq.n 80097f6 <HAL_RCCEx_PeriphCLKConfig+0x4e>
{
/* Check the parameters */
assert_param(IS_RCC_I2SCLKSOURCE(PeriphClkInit->I2sClockSelection));
/* Configure I2S Clock source */
__HAL_RCC_I2S_CONFIG(PeriphClkInit->I2sClockSelection);
80097d0: 4b69 ldr r3, [pc, #420] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
80097d2: 689b ldr r3, [r3, #8]
80097d4: 4a68 ldr r2, [pc, #416] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
80097d6: f423 0300 bic.w r3, r3, #8388608 ; 0x800000
80097da: 6093 str r3, [r2, #8]
80097dc: 4b66 ldr r3, [pc, #408] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
80097de: 689a ldr r2, [r3, #8]
80097e0: 687b ldr r3, [r7, #4]
80097e2: 6b5b ldr r3, [r3, #52] ; 0x34
80097e4: 4964 ldr r1, [pc, #400] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
80097e6: 4313 orrs r3, r2
80097e8: 608b str r3, [r1, #8]
/* Enable the PLLI2S when it's used as clock source for I2S */
if(PeriphClkInit->I2sClockSelection == RCC_I2SCLKSOURCE_PLLI2S)
80097ea: 687b ldr r3, [r7, #4]
80097ec: 6b5b ldr r3, [r3, #52] ; 0x34
80097ee: 2b00 cmp r3, #0
80097f0: d101 bne.n 80097f6 <HAL_RCCEx_PeriphCLKConfig+0x4e>
{
plli2sused = 1;
80097f2: 2301 movs r3, #1
80097f4: 61fb str r3, [r7, #28]
}
}
/*------------------------------------ SAI1 configuration --------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == (RCC_PERIPHCLK_SAI1))
80097f6: 687b ldr r3, [r7, #4]
80097f8: 681b ldr r3, [r3, #0]
80097fa: f403 2300 and.w r3, r3, #524288 ; 0x80000
80097fe: 2b00 cmp r3, #0
8009800: d017 beq.n 8009832 <HAL_RCCEx_PeriphCLKConfig+0x8a>
{
/* Check the parameters */
assert_param(IS_RCC_SAI1CLKSOURCE(PeriphClkInit->Sai1ClockSelection));
/* Configure SAI1 Clock source */
__HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection);
8009802: 4b5d ldr r3, [pc, #372] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009804: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8009808: f423 1240 bic.w r2, r3, #3145728 ; 0x300000
800980c: 687b ldr r3, [r7, #4]
800980e: 6bdb ldr r3, [r3, #60] ; 0x3c
8009810: 4959 ldr r1, [pc, #356] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009812: 4313 orrs r3, r2
8009814: 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)
8009818: 687b ldr r3, [r7, #4]
800981a: 6bdb ldr r3, [r3, #60] ; 0x3c
800981c: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
8009820: d101 bne.n 8009826 <HAL_RCCEx_PeriphCLKConfig+0x7e>
{
plli2sused = 1;
8009822: 2301 movs r3, #1
8009824: 61fb str r3, [r7, #28]
}
/* Enable the PLLSAI when it's used as clock source for SAI */
if(PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)
8009826: 687b ldr r3, [r7, #4]
8009828: 6bdb ldr r3, [r3, #60] ; 0x3c
800982a: 2b00 cmp r3, #0
800982c: d101 bne.n 8009832 <HAL_RCCEx_PeriphCLKConfig+0x8a>
{
pllsaiused = 1;
800982e: 2301 movs r3, #1
8009830: 61bb str r3, [r7, #24]
}
}
/*------------------------------------ SAI2 configuration --------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == (RCC_PERIPHCLK_SAI2))
8009832: 687b ldr r3, [r7, #4]
8009834: 681b ldr r3, [r3, #0]
8009836: f403 1380 and.w r3, r3, #1048576 ; 0x100000
800983a: 2b00 cmp r3, #0
800983c: d017 beq.n 800986e <HAL_RCCEx_PeriphCLKConfig+0xc6>
{
/* Check the parameters */
assert_param(IS_RCC_SAI2CLKSOURCE(PeriphClkInit->Sai2ClockSelection));
/* Configure SAI2 Clock source */
__HAL_RCC_SAI2_CONFIG(PeriphClkInit->Sai2ClockSelection);
800983e: 4b4e ldr r3, [pc, #312] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009840: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8009844: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
8009848: 687b ldr r3, [r7, #4]
800984a: 6c1b ldr r3, [r3, #64] ; 0x40
800984c: 494a ldr r1, [pc, #296] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
800984e: 4313 orrs r3, r2
8009850: 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)
8009854: 687b ldr r3, [r7, #4]
8009856: 6c1b ldr r3, [r3, #64] ; 0x40
8009858: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
800985c: d101 bne.n 8009862 <HAL_RCCEx_PeriphCLKConfig+0xba>
{
plli2sused = 1;
800985e: 2301 movs r3, #1
8009860: 61fb str r3, [r7, #28]
}
/* Enable the PLLSAI when it's used as clock source for SAI */
if(PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)
8009862: 687b ldr r3, [r7, #4]
8009864: 6c1b ldr r3, [r3, #64] ; 0x40
8009866: 2b00 cmp r3, #0
8009868: d101 bne.n 800986e <HAL_RCCEx_PeriphCLKConfig+0xc6>
{
pllsaiused = 1;
800986a: 2301 movs r3, #1
800986c: 61bb str r3, [r7, #24]
}
}
/*-------------------------------------- SPDIF-RX Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX)
800986e: 687b ldr r3, [r7, #4]
8009870: 681b ldr r3, [r3, #0]
8009872: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
8009876: 2b00 cmp r3, #0
8009878: d001 beq.n 800987e <HAL_RCCEx_PeriphCLKConfig+0xd6>
{
plli2sused = 1;
800987a: 2301 movs r3, #1
800987c: 61fb str r3, [r7, #28]
}
/*------------------------------------ RTC configuration --------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RTC) == (RCC_PERIPHCLK_RTC))
800987e: 687b ldr r3, [r7, #4]
8009880: 681b ldr r3, [r3, #0]
8009882: f003 0320 and.w r3, r3, #32
8009886: 2b00 cmp r3, #0
8009888: f000 808b beq.w 80099a2 <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();
800988c: 4b3a ldr r3, [pc, #232] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
800988e: 6c1b ldr r3, [r3, #64] ; 0x40
8009890: 4a39 ldr r2, [pc, #228] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009892: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8009896: 6413 str r3, [r2, #64] ; 0x40
8009898: 4b37 ldr r3, [pc, #220] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
800989a: 6c1b ldr r3, [r3, #64] ; 0x40
800989c: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
80098a0: 60bb str r3, [r7, #8]
80098a2: 68bb ldr r3, [r7, #8]
/* Enable write access to Backup domain */
PWR->CR1 |= PWR_CR1_DBP;
80098a4: 4b35 ldr r3, [pc, #212] ; (800997c <HAL_RCCEx_PeriphCLKConfig+0x1d4>)
80098a6: 681b ldr r3, [r3, #0]
80098a8: 4a34 ldr r2, [pc, #208] ; (800997c <HAL_RCCEx_PeriphCLKConfig+0x1d4>)
80098aa: f443 7380 orr.w r3, r3, #256 ; 0x100
80098ae: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
80098b0: f7fb f9f4 bl 8004c9c <HAL_GetTick>
80098b4: 6178 str r0, [r7, #20]
/* Wait for Backup domain Write protection disable */
while((PWR->CR1 & PWR_CR1_DBP) == RESET)
80098b6: e008 b.n 80098ca <HAL_RCCEx_PeriphCLKConfig+0x122>
{
if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
80098b8: f7fb f9f0 bl 8004c9c <HAL_GetTick>
80098bc: 4602 mov r2, r0
80098be: 697b ldr r3, [r7, #20]
80098c0: 1ad3 subs r3, r2, r3
80098c2: 2b64 cmp r3, #100 ; 0x64
80098c4: d901 bls.n 80098ca <HAL_RCCEx_PeriphCLKConfig+0x122>
{
return HAL_TIMEOUT;
80098c6: 2303 movs r3, #3
80098c8: e355 b.n 8009f76 <HAL_RCCEx_PeriphCLKConfig+0x7ce>
while((PWR->CR1 & PWR_CR1_DBP) == RESET)
80098ca: 4b2c ldr r3, [pc, #176] ; (800997c <HAL_RCCEx_PeriphCLKConfig+0x1d4>)
80098cc: 681b ldr r3, [r3, #0]
80098ce: f403 7380 and.w r3, r3, #256 ; 0x100
80098d2: 2b00 cmp r3, #0
80098d4: d0f0 beq.n 80098b8 <HAL_RCCEx_PeriphCLKConfig+0x110>
}
}
/* Reset the Backup domain only if the RTC Clock source selection is modified */
tmpreg0 = (RCC->BDCR & RCC_BDCR_RTCSEL);
80098d6: 4b28 ldr r3, [pc, #160] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
80098d8: 6f1b ldr r3, [r3, #112] ; 0x70
80098da: f403 7340 and.w r3, r3, #768 ; 0x300
80098de: 613b str r3, [r7, #16]
if((tmpreg0 != 0x00000000U) && (tmpreg0 != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL)))
80098e0: 693b ldr r3, [r7, #16]
80098e2: 2b00 cmp r3, #0
80098e4: d035 beq.n 8009952 <HAL_RCCEx_PeriphCLKConfig+0x1aa>
80098e6: 687b ldr r3, [r7, #4]
80098e8: 6b1b ldr r3, [r3, #48] ; 0x30
80098ea: f403 7340 and.w r3, r3, #768 ; 0x300
80098ee: 693a ldr r2, [r7, #16]
80098f0: 429a cmp r2, r3
80098f2: d02e beq.n 8009952 <HAL_RCCEx_PeriphCLKConfig+0x1aa>
{
/* Store the content of BDCR register before the reset of Backup Domain */
tmpreg0 = (RCC->BDCR & ~(RCC_BDCR_RTCSEL));
80098f4: 4b20 ldr r3, [pc, #128] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
80098f6: 6f1b ldr r3, [r3, #112] ; 0x70
80098f8: f423 7340 bic.w r3, r3, #768 ; 0x300
80098fc: 613b str r3, [r7, #16]
/* RTC Clock selection can be changed only if the Backup Domain is reset */
__HAL_RCC_BACKUPRESET_FORCE();
80098fe: 4b1e ldr r3, [pc, #120] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009900: 6f1b ldr r3, [r3, #112] ; 0x70
8009902: 4a1d ldr r2, [pc, #116] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009904: f443 3380 orr.w r3, r3, #65536 ; 0x10000
8009908: 6713 str r3, [r2, #112] ; 0x70
__HAL_RCC_BACKUPRESET_RELEASE();
800990a: 4b1b ldr r3, [pc, #108] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
800990c: 6f1b ldr r3, [r3, #112] ; 0x70
800990e: 4a1a ldr r2, [pc, #104] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009910: f423 3380 bic.w r3, r3, #65536 ; 0x10000
8009914: 6713 str r3, [r2, #112] ; 0x70
/* Restore the Content of BDCR register */
RCC->BDCR = tmpreg0;
8009916: 4a18 ldr r2, [pc, #96] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009918: 693b ldr r3, [r7, #16]
800991a: 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))
800991c: 4b16 ldr r3, [pc, #88] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
800991e: 6f1b ldr r3, [r3, #112] ; 0x70
8009920: f003 0301 and.w r3, r3, #1
8009924: 2b01 cmp r3, #1
8009926: d114 bne.n 8009952 <HAL_RCCEx_PeriphCLKConfig+0x1aa>
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009928: f7fb f9b8 bl 8004c9c <HAL_GetTick>
800992c: 6178 str r0, [r7, #20]
/* Wait till LSE is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
800992e: e00a b.n 8009946 <HAL_RCCEx_PeriphCLKConfig+0x19e>
{
if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
8009930: f7fb f9b4 bl 8004c9c <HAL_GetTick>
8009934: 4602 mov r2, r0
8009936: 697b ldr r3, [r7, #20]
8009938: 1ad3 subs r3, r2, r3
800993a: f241 3288 movw r2, #5000 ; 0x1388
800993e: 4293 cmp r3, r2
8009940: d901 bls.n 8009946 <HAL_RCCEx_PeriphCLKConfig+0x19e>
{
return HAL_TIMEOUT;
8009942: 2303 movs r3, #3
8009944: e317 b.n 8009f76 <HAL_RCCEx_PeriphCLKConfig+0x7ce>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
8009946: 4b0c ldr r3, [pc, #48] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009948: 6f1b ldr r3, [r3, #112] ; 0x70
800994a: f003 0302 and.w r3, r3, #2
800994e: 2b00 cmp r3, #0
8009950: d0ee beq.n 8009930 <HAL_RCCEx_PeriphCLKConfig+0x188>
}
}
}
}
__HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection);
8009952: 687b ldr r3, [r7, #4]
8009954: 6b1b ldr r3, [r3, #48] ; 0x30
8009956: f403 7340 and.w r3, r3, #768 ; 0x300
800995a: f5b3 7f40 cmp.w r3, #768 ; 0x300
800995e: d111 bne.n 8009984 <HAL_RCCEx_PeriphCLKConfig+0x1dc>
8009960: 4b05 ldr r3, [pc, #20] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009962: 689b ldr r3, [r3, #8]
8009964: f423 12f8 bic.w r2, r3, #2031616 ; 0x1f0000
8009968: 687b ldr r3, [r7, #4]
800996a: 6b19 ldr r1, [r3, #48] ; 0x30
800996c: 4b04 ldr r3, [pc, #16] ; (8009980 <HAL_RCCEx_PeriphCLKConfig+0x1d8>)
800996e: 400b ands r3, r1
8009970: 4901 ldr r1, [pc, #4] ; (8009978 <HAL_RCCEx_PeriphCLKConfig+0x1d0>)
8009972: 4313 orrs r3, r2
8009974: 608b str r3, [r1, #8]
8009976: e00b b.n 8009990 <HAL_RCCEx_PeriphCLKConfig+0x1e8>
8009978: 40023800 .word 0x40023800
800997c: 40007000 .word 0x40007000
8009980: 0ffffcff .word 0x0ffffcff
8009984: 4bb0 ldr r3, [pc, #704] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009986: 689b ldr r3, [r3, #8]
8009988: 4aaf ldr r2, [pc, #700] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800998a: f423 13f8 bic.w r3, r3, #2031616 ; 0x1f0000
800998e: 6093 str r3, [r2, #8]
8009990: 4bad ldr r3, [pc, #692] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009992: 6f1a ldr r2, [r3, #112] ; 0x70
8009994: 687b ldr r3, [r7, #4]
8009996: 6b1b ldr r3, [r3, #48] ; 0x30
8009998: f3c3 030b ubfx r3, r3, #0, #12
800999c: 49aa ldr r1, [pc, #680] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
800999e: 4313 orrs r3, r2
80099a0: 670b str r3, [r1, #112] ; 0x70
}
/*------------------------------------ TIM configuration --------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_TIM) == (RCC_PERIPHCLK_TIM))
80099a2: 687b ldr r3, [r7, #4]
80099a4: 681b ldr r3, [r3, #0]
80099a6: f003 0310 and.w r3, r3, #16
80099aa: 2b00 cmp r3, #0
80099ac: d010 beq.n 80099d0 <HAL_RCCEx_PeriphCLKConfig+0x228>
{
/* Check the parameters */
assert_param(IS_RCC_TIMPRES(PeriphClkInit->TIMPresSelection));
/* Configure Timer Prescaler */
__HAL_RCC_TIMCLKPRESCALER(PeriphClkInit->TIMPresSelection);
80099ae: 4ba6 ldr r3, [pc, #664] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
80099b0: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
80099b4: 4aa4 ldr r2, [pc, #656] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
80099b6: f023 7380 bic.w r3, r3, #16777216 ; 0x1000000
80099ba: f8c2 308c str.w r3, [r2, #140] ; 0x8c
80099be: 4ba2 ldr r3, [pc, #648] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
80099c0: f8d3 208c ldr.w r2, [r3, #140] ; 0x8c
80099c4: 687b ldr r3, [r7, #4]
80099c6: 6b9b ldr r3, [r3, #56] ; 0x38
80099c8: 499f ldr r1, [pc, #636] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
80099ca: 4313 orrs r3, r2
80099cc: f8c1 308c str.w r3, [r1, #140] ; 0x8c
}
/*-------------------------------------- I2C1 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1)
80099d0: 687b ldr r3, [r7, #4]
80099d2: 681b ldr r3, [r3, #0]
80099d4: f403 4380 and.w r3, r3, #16384 ; 0x4000
80099d8: 2b00 cmp r3, #0
80099da: d00a beq.n 80099f2 <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);
80099dc: 4b9a ldr r3, [pc, #616] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
80099de: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
80099e2: f423 3240 bic.w r2, r3, #196608 ; 0x30000
80099e6: 687b ldr r3, [r7, #4]
80099e8: 6e5b ldr r3, [r3, #100] ; 0x64
80099ea: 4997 ldr r1, [pc, #604] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
80099ec: 4313 orrs r3, r2
80099ee: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- I2C2 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C2) == RCC_PERIPHCLK_I2C2)
80099f2: 687b ldr r3, [r7, #4]
80099f4: 681b ldr r3, [r3, #0]
80099f6: f403 4300 and.w r3, r3, #32768 ; 0x8000
80099fa: 2b00 cmp r3, #0
80099fc: d00a beq.n 8009a14 <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);
80099fe: 4b92 ldr r3, [pc, #584] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a00: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009a04: f423 2240 bic.w r2, r3, #786432 ; 0xc0000
8009a08: 687b ldr r3, [r7, #4]
8009a0a: 6e9b ldr r3, [r3, #104] ; 0x68
8009a0c: 498e ldr r1, [pc, #568] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a0e: 4313 orrs r3, r2
8009a10: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- I2C3 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C3) == RCC_PERIPHCLK_I2C3)
8009a14: 687b ldr r3, [r7, #4]
8009a16: 681b ldr r3, [r3, #0]
8009a18: f403 3380 and.w r3, r3, #65536 ; 0x10000
8009a1c: 2b00 cmp r3, #0
8009a1e: d00a beq.n 8009a36 <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);
8009a20: 4b89 ldr r3, [pc, #548] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a22: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009a26: f423 1240 bic.w r2, r3, #3145728 ; 0x300000
8009a2a: 687b ldr r3, [r7, #4]
8009a2c: 6edb ldr r3, [r3, #108] ; 0x6c
8009a2e: 4986 ldr r1, [pc, #536] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a30: 4313 orrs r3, r2
8009a32: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- I2C4 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C4) == RCC_PERIPHCLK_I2C4)
8009a36: 687b ldr r3, [r7, #4]
8009a38: 681b ldr r3, [r3, #0]
8009a3a: f403 3300 and.w r3, r3, #131072 ; 0x20000
8009a3e: 2b00 cmp r3, #0
8009a40: d00a beq.n 8009a58 <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);
8009a42: 4b81 ldr r3, [pc, #516] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a44: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009a48: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
8009a4c: 687b ldr r3, [r7, #4]
8009a4e: 6f1b ldr r3, [r3, #112] ; 0x70
8009a50: 497d ldr r1, [pc, #500] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a52: 4313 orrs r3, r2
8009a54: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- USART1 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1)
8009a58: 687b ldr r3, [r7, #4]
8009a5a: 681b ldr r3, [r3, #0]
8009a5c: f003 0340 and.w r3, r3, #64 ; 0x40
8009a60: 2b00 cmp r3, #0
8009a62: d00a beq.n 8009a7a <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);
8009a64: 4b78 ldr r3, [pc, #480] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a66: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009a6a: f023 0203 bic.w r2, r3, #3
8009a6e: 687b ldr r3, [r7, #4]
8009a70: 6c5b ldr r3, [r3, #68] ; 0x44
8009a72: 4975 ldr r1, [pc, #468] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a74: 4313 orrs r3, r2
8009a76: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- USART2 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART2) == RCC_PERIPHCLK_USART2)
8009a7a: 687b ldr r3, [r7, #4]
8009a7c: 681b ldr r3, [r3, #0]
8009a7e: f003 0380 and.w r3, r3, #128 ; 0x80
8009a82: 2b00 cmp r3, #0
8009a84: d00a beq.n 8009a9c <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);
8009a86: 4b70 ldr r3, [pc, #448] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a88: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009a8c: f023 020c bic.w r2, r3, #12
8009a90: 687b ldr r3, [r7, #4]
8009a92: 6c9b ldr r3, [r3, #72] ; 0x48
8009a94: 496c ldr r1, [pc, #432] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009a96: 4313 orrs r3, r2
8009a98: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- USART3 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART3) == RCC_PERIPHCLK_USART3)
8009a9c: 687b ldr r3, [r7, #4]
8009a9e: 681b ldr r3, [r3, #0]
8009aa0: f403 7380 and.w r3, r3, #256 ; 0x100
8009aa4: 2b00 cmp r3, #0
8009aa6: d00a beq.n 8009abe <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);
8009aa8: 4b67 ldr r3, [pc, #412] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009aaa: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009aae: f023 0230 bic.w r2, r3, #48 ; 0x30
8009ab2: 687b ldr r3, [r7, #4]
8009ab4: 6cdb ldr r3, [r3, #76] ; 0x4c
8009ab6: 4964 ldr r1, [pc, #400] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009ab8: 4313 orrs r3, r2
8009aba: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- UART4 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART4) == RCC_PERIPHCLK_UART4)
8009abe: 687b ldr r3, [r7, #4]
8009ac0: 681b ldr r3, [r3, #0]
8009ac2: f403 7300 and.w r3, r3, #512 ; 0x200
8009ac6: 2b00 cmp r3, #0
8009ac8: d00a beq.n 8009ae0 <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);
8009aca: 4b5f ldr r3, [pc, #380] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009acc: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009ad0: f023 02c0 bic.w r2, r3, #192 ; 0xc0
8009ad4: 687b ldr r3, [r7, #4]
8009ad6: 6d1b ldr r3, [r3, #80] ; 0x50
8009ad8: 495b ldr r1, [pc, #364] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009ada: 4313 orrs r3, r2
8009adc: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- UART5 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART5) == RCC_PERIPHCLK_UART5)
8009ae0: 687b ldr r3, [r7, #4]
8009ae2: 681b ldr r3, [r3, #0]
8009ae4: f403 6380 and.w r3, r3, #1024 ; 0x400
8009ae8: 2b00 cmp r3, #0
8009aea: d00a beq.n 8009b02 <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);
8009aec: 4b56 ldr r3, [pc, #344] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009aee: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009af2: f423 7240 bic.w r2, r3, #768 ; 0x300
8009af6: 687b ldr r3, [r7, #4]
8009af8: 6d5b ldr r3, [r3, #84] ; 0x54
8009afa: 4953 ldr r1, [pc, #332] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009afc: 4313 orrs r3, r2
8009afe: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- USART6 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART6) == RCC_PERIPHCLK_USART6)
8009b02: 687b ldr r3, [r7, #4]
8009b04: 681b ldr r3, [r3, #0]
8009b06: f403 6300 and.w r3, r3, #2048 ; 0x800
8009b0a: 2b00 cmp r3, #0
8009b0c: d00a beq.n 8009b24 <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);
8009b0e: 4b4e ldr r3, [pc, #312] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b10: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009b14: f423 6240 bic.w r2, r3, #3072 ; 0xc00
8009b18: 687b ldr r3, [r7, #4]
8009b1a: 6d9b ldr r3, [r3, #88] ; 0x58
8009b1c: 494a ldr r1, [pc, #296] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b1e: 4313 orrs r3, r2
8009b20: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- UART7 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART7) == RCC_PERIPHCLK_UART7)
8009b24: 687b ldr r3, [r7, #4]
8009b26: 681b ldr r3, [r3, #0]
8009b28: f403 5380 and.w r3, r3, #4096 ; 0x1000
8009b2c: 2b00 cmp r3, #0
8009b2e: d00a beq.n 8009b46 <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);
8009b30: 4b45 ldr r3, [pc, #276] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b32: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009b36: f423 5240 bic.w r2, r3, #12288 ; 0x3000
8009b3a: 687b ldr r3, [r7, #4]
8009b3c: 6ddb ldr r3, [r3, #92] ; 0x5c
8009b3e: 4942 ldr r1, [pc, #264] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b40: 4313 orrs r3, r2
8009b42: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- UART8 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_UART8) == RCC_PERIPHCLK_UART8)
8009b46: 687b ldr r3, [r7, #4]
8009b48: 681b ldr r3, [r3, #0]
8009b4a: f403 5300 and.w r3, r3, #8192 ; 0x2000
8009b4e: 2b00 cmp r3, #0
8009b50: d00a beq.n 8009b68 <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);
8009b52: 4b3d ldr r3, [pc, #244] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b54: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009b58: f423 4240 bic.w r2, r3, #49152 ; 0xc000
8009b5c: 687b ldr r3, [r7, #4]
8009b5e: 6e1b ldr r3, [r3, #96] ; 0x60
8009b60: 4939 ldr r1, [pc, #228] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b62: 4313 orrs r3, r2
8009b64: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*--------------------------------------- CEC Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC)
8009b68: 687b ldr r3, [r7, #4]
8009b6a: 681b ldr r3, [r3, #0]
8009b6c: f403 0380 and.w r3, r3, #4194304 ; 0x400000
8009b70: 2b00 cmp r3, #0
8009b72: d00a beq.n 8009b8a <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);
8009b74: 4b34 ldr r3, [pc, #208] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b76: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009b7a: f023 6280 bic.w r2, r3, #67108864 ; 0x4000000
8009b7e: 687b ldr r3, [r7, #4]
8009b80: 6f9b ldr r3, [r3, #120] ; 0x78
8009b82: 4931 ldr r1, [pc, #196] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b84: 4313 orrs r3, r2
8009b86: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*-------------------------------------- CK48 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48)
8009b8a: 687b ldr r3, [r7, #4]
8009b8c: 681b ldr r3, [r3, #0]
8009b8e: f403 1300 and.w r3, r3, #2097152 ; 0x200000
8009b92: 2b00 cmp r3, #0
8009b94: d011 beq.n 8009bba <HAL_RCCEx_PeriphCLKConfig+0x412>
{
/* Check the parameters */
assert_param(IS_RCC_CLK48SOURCE(PeriphClkInit->Clk48ClockSelection));
/* Configure the CLK48 source */
__HAL_RCC_CLK48_CONFIG(PeriphClkInit->Clk48ClockSelection);
8009b96: 4b2c ldr r3, [pc, #176] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009b98: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009b9c: f023 6200 bic.w r2, r3, #134217728 ; 0x8000000
8009ba0: 687b ldr r3, [r7, #4]
8009ba2: 6fdb ldr r3, [r3, #124] ; 0x7c
8009ba4: 4928 ldr r1, [pc, #160] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009ba6: 4313 orrs r3, r2
8009ba8: 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)
8009bac: 687b ldr r3, [r7, #4]
8009bae: 6fdb ldr r3, [r3, #124] ; 0x7c
8009bb0: f1b3 6f00 cmp.w r3, #134217728 ; 0x8000000
8009bb4: d101 bne.n 8009bba <HAL_RCCEx_PeriphCLKConfig+0x412>
{
pllsaiused = 1;
8009bb6: 2301 movs r3, #1
8009bb8: 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)
8009bba: 687b ldr r3, [r7, #4]
8009bbc: 681b ldr r3, [r3, #0]
8009bbe: f003 0308 and.w r3, r3, #8
8009bc2: 2b00 cmp r3, #0
8009bc4: d001 beq.n 8009bca <HAL_RCCEx_PeriphCLKConfig+0x422>
{
pllsaiused = 1;
8009bc6: 2301 movs r3, #1
8009bc8: 61bb str r3, [r7, #24]
}
#endif /* STM32F746xx || STM32F756xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx || STM32F750xx */
/*-------------------------------------- LPTIM1 Configuration -----------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == RCC_PERIPHCLK_LPTIM1)
8009bca: 687b ldr r3, [r7, #4]
8009bcc: 681b ldr r3, [r3, #0]
8009bce: f403 2380 and.w r3, r3, #262144 ; 0x40000
8009bd2: 2b00 cmp r3, #0
8009bd4: d00a beq.n 8009bec <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);
8009bd6: 4b1c ldr r3, [pc, #112] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009bd8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009bdc: f023 7240 bic.w r2, r3, #50331648 ; 0x3000000
8009be0: 687b ldr r3, [r7, #4]
8009be2: 6f5b ldr r3, [r3, #116] ; 0x74
8009be4: 4918 ldr r1, [pc, #96] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009be6: 4313 orrs r3, r2
8009be8: f8c1 3090 str.w r3, [r1, #144] ; 0x90
}
/*------------------------------------- SDMMC1 Configuration ------------------------------------*/
if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDMMC1) == RCC_PERIPHCLK_SDMMC1)
8009bec: 687b ldr r3, [r7, #4]
8009bee: 681b ldr r3, [r3, #0]
8009bf0: f403 0300 and.w r3, r3, #8388608 ; 0x800000
8009bf4: 2b00 cmp r3, #0
8009bf6: d00b beq.n 8009c10 <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);
8009bf8: 4b13 ldr r3, [pc, #76] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009bfa: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8009bfe: f023 5280 bic.w r2, r3, #268435456 ; 0x10000000
8009c02: 687b ldr r3, [r7, #4]
8009c04: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
8009c08: 490f ldr r1, [pc, #60] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009c0a: 4313 orrs r3, r2
8009c0c: 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))
8009c10: 69fb ldr r3, [r7, #28]
8009c12: 2b01 cmp r3, #1
8009c14: d005 beq.n 8009c22 <HAL_RCCEx_PeriphCLKConfig+0x47a>
8009c16: 687b ldr r3, [r7, #4]
8009c18: 681b ldr r3, [r3, #0]
8009c1a: f1b3 7f00 cmp.w r3, #33554432 ; 0x2000000
8009c1e: f040 80d8 bne.w 8009dd2 <HAL_RCCEx_PeriphCLKConfig+0x62a>
{
/* Disable the PLLI2S */
__HAL_RCC_PLLI2S_DISABLE();
8009c22: 4b09 ldr r3, [pc, #36] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009c24: 681b ldr r3, [r3, #0]
8009c26: 4a08 ldr r2, [pc, #32] ; (8009c48 <HAL_RCCEx_PeriphCLKConfig+0x4a0>)
8009c28: f023 6380 bic.w r3, r3, #67108864 ; 0x4000000
8009c2c: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009c2e: f7fb f835 bl 8004c9c <HAL_GetTick>
8009c32: 6178 str r0, [r7, #20]
/* Wait till PLLI2S is disabled */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) != RESET)
8009c34: e00a b.n 8009c4c <HAL_RCCEx_PeriphCLKConfig+0x4a4>
{
if((HAL_GetTick() - tickstart) > PLLI2S_TIMEOUT_VALUE)
8009c36: f7fb f831 bl 8004c9c <HAL_GetTick>
8009c3a: 4602 mov r2, r0
8009c3c: 697b ldr r3, [r7, #20]
8009c3e: 1ad3 subs r3, r2, r3
8009c40: 2b64 cmp r3, #100 ; 0x64
8009c42: d903 bls.n 8009c4c <HAL_RCCEx_PeriphCLKConfig+0x4a4>
{
/* return in case of Timeout detected */
return HAL_TIMEOUT;
8009c44: 2303 movs r3, #3
8009c46: e196 b.n 8009f76 <HAL_RCCEx_PeriphCLKConfig+0x7ce>
8009c48: 40023800 .word 0x40023800
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) != RESET)
8009c4c: 4b6c ldr r3, [pc, #432] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009c4e: 681b ldr r3, [r3, #0]
8009c50: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
8009c54: 2b00 cmp r3, #0
8009c56: d1ee bne.n 8009c36 <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)))
8009c58: 687b ldr r3, [r7, #4]
8009c5a: 681b ldr r3, [r3, #0]
8009c5c: f003 0301 and.w r3, r3, #1
8009c60: 2b00 cmp r3, #0
8009c62: d021 beq.n 8009ca8 <HAL_RCCEx_PeriphCLKConfig+0x500>
8009c64: 687b ldr r3, [r7, #4]
8009c66: 6b5b ldr r3, [r3, #52] ; 0x34
8009c68: 2b00 cmp r3, #0
8009c6a: d11d bne.n 8009ca8 <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);
8009c6c: 4b64 ldr r3, [pc, #400] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009c6e: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8009c72: 0c1b lsrs r3, r3, #16
8009c74: f003 0303 and.w r3, r3, #3
8009c78: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SQ) >> RCC_PLLI2SCFGR_PLLI2SQ_Pos);
8009c7a: 4b61 ldr r3, [pc, #388] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009c7c: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8009c80: 0e1b lsrs r3, r3, #24
8009c82: f003 030f and.w r3, r3, #15
8009c86: 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);
8009c88: 687b ldr r3, [r7, #4]
8009c8a: 685b ldr r3, [r3, #4]
8009c8c: 019a lsls r2, r3, #6
8009c8e: 693b ldr r3, [r7, #16]
8009c90: 041b lsls r3, r3, #16
8009c92: 431a orrs r2, r3
8009c94: 68fb ldr r3, [r7, #12]
8009c96: 061b lsls r3, r3, #24
8009c98: 431a orrs r2, r3
8009c9a: 687b ldr r3, [r7, #4]
8009c9c: 689b ldr r3, [r3, #8]
8009c9e: 071b lsls r3, r3, #28
8009ca0: 4957 ldr r1, [pc, #348] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009ca2: 4313 orrs r3, r2
8009ca4: 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)) ||
8009ca8: 687b ldr r3, [r7, #4]
8009caa: 681b ldr r3, [r3, #0]
8009cac: f403 2300 and.w r3, r3, #524288 ; 0x80000
8009cb0: 2b00 cmp r3, #0
8009cb2: d004 beq.n 8009cbe <HAL_RCCEx_PeriphCLKConfig+0x516>
8009cb4: 687b ldr r3, [r7, #4]
8009cb6: 6bdb ldr r3, [r3, #60] ; 0x3c
8009cb8: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
8009cbc: d00a beq.n 8009cd4 <HAL_RCCEx_PeriphCLKConfig+0x52c>
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)))
8009cbe: 687b ldr r3, [r7, #4]
8009cc0: 681b ldr r3, [r3, #0]
8009cc2: f403 1380 and.w r3, r3, #1048576 ; 0x100000
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)) ||
8009cc6: 2b00 cmp r3, #0
8009cc8: d02e beq.n 8009d28 <HAL_RCCEx_PeriphCLKConfig+0x580>
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)))
8009cca: 687b ldr r3, [r7, #4]
8009ccc: 6c1b ldr r3, [r3, #64] ; 0x40
8009cce: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
8009cd2: d129 bne.n 8009d28 <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);
8009cd4: 4b4a ldr r3, [pc, #296] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009cd6: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8009cda: 0c1b lsrs r3, r3, #16
8009cdc: f003 0303 and.w r3, r3, #3
8009ce0: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLI2SCFGR_PLLI2SR_Pos);
8009ce2: 4b47 ldr r3, [pc, #284] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009ce4: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8009ce8: 0f1b lsrs r3, r3, #28
8009cea: f003 0307 and.w r3, r3, #7
8009cee: 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);
8009cf0: 687b ldr r3, [r7, #4]
8009cf2: 685b ldr r3, [r3, #4]
8009cf4: 019a lsls r2, r3, #6
8009cf6: 693b ldr r3, [r7, #16]
8009cf8: 041b lsls r3, r3, #16
8009cfa: 431a orrs r2, r3
8009cfc: 687b ldr r3, [r7, #4]
8009cfe: 68db ldr r3, [r3, #12]
8009d00: 061b lsls r3, r3, #24
8009d02: 431a orrs r2, r3
8009d04: 68fb ldr r3, [r7, #12]
8009d06: 071b lsls r3, r3, #28
8009d08: 493d ldr r1, [pc, #244] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009d0a: 4313 orrs r3, r2
8009d0c: f8c1 3084 str.w r3, [r1, #132] ; 0x84
/* SAI_CLK_x = SAI_CLK(first level)/PLLI2SDIVQ */
__HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLI2SDivQ);
8009d10: 4b3b ldr r3, [pc, #236] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009d12: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8009d16: f023 021f bic.w r2, r3, #31
8009d1a: 687b ldr r3, [r7, #4]
8009d1c: 6a5b ldr r3, [r3, #36] ; 0x24
8009d1e: 3b01 subs r3, #1
8009d20: 4937 ldr r1, [pc, #220] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009d22: 4313 orrs r3, r2
8009d24: 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)
8009d28: 687b ldr r3, [r7, #4]
8009d2a: 681b ldr r3, [r3, #0]
8009d2c: f003 7380 and.w r3, r3, #16777216 ; 0x1000000
8009d30: 2b00 cmp r3, #0
8009d32: d01d beq.n 8009d70 <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);
8009d34: 4b32 ldr r3, [pc, #200] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009d36: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8009d3a: 0e1b lsrs r3, r3, #24
8009d3c: f003 030f and.w r3, r3, #15
8009d40: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLI2SCFGR_PLLI2SR_Pos);
8009d42: 4b2f ldr r3, [pc, #188] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009d44: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8009d48: 0f1b lsrs r3, r3, #28
8009d4a: f003 0307 and.w r3, r3, #7
8009d4e: 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);
8009d50: 687b ldr r3, [r7, #4]
8009d52: 685b ldr r3, [r3, #4]
8009d54: 019a lsls r2, r3, #6
8009d56: 687b ldr r3, [r7, #4]
8009d58: 691b ldr r3, [r3, #16]
8009d5a: 041b lsls r3, r3, #16
8009d5c: 431a orrs r2, r3
8009d5e: 693b ldr r3, [r7, #16]
8009d60: 061b lsls r3, r3, #24
8009d62: 431a orrs r2, r3
8009d64: 68fb ldr r3, [r7, #12]
8009d66: 071b lsls r3, r3, #28
8009d68: 4925 ldr r1, [pc, #148] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009d6a: 4313 orrs r3, r2
8009d6c: f8c1 3084 str.w r3, [r1, #132] ; 0x84
}
/*----------------- In Case of PLLI2S is just selected -----------------*/
if((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_PLLI2S) == RCC_PERIPHCLK_PLLI2S)
8009d70: 687b ldr r3, [r7, #4]
8009d72: 681b ldr r3, [r3, #0]
8009d74: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
8009d78: 2b00 cmp r3, #0
8009d7a: d011 beq.n 8009da0 <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);
8009d7c: 687b ldr r3, [r7, #4]
8009d7e: 685b ldr r3, [r3, #4]
8009d80: 019a lsls r2, r3, #6
8009d82: 687b ldr r3, [r7, #4]
8009d84: 691b ldr r3, [r3, #16]
8009d86: 041b lsls r3, r3, #16
8009d88: 431a orrs r2, r3
8009d8a: 687b ldr r3, [r7, #4]
8009d8c: 68db ldr r3, [r3, #12]
8009d8e: 061b lsls r3, r3, #24
8009d90: 431a orrs r2, r3
8009d92: 687b ldr r3, [r7, #4]
8009d94: 689b ldr r3, [r3, #8]
8009d96: 071b lsls r3, r3, #28
8009d98: 4919 ldr r1, [pc, #100] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009d9a: 4313 orrs r3, r2
8009d9c: f8c1 3084 str.w r3, [r1, #132] ; 0x84
}
/* Enable the PLLI2S */
__HAL_RCC_PLLI2S_ENABLE();
8009da0: 4b17 ldr r3, [pc, #92] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009da2: 681b ldr r3, [r3, #0]
8009da4: 4a16 ldr r2, [pc, #88] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009da6: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
8009daa: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009dac: f7fa ff76 bl 8004c9c <HAL_GetTick>
8009db0: 6178 str r0, [r7, #20]
/* Wait till PLLI2S is ready */
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) == RESET)
8009db2: e008 b.n 8009dc6 <HAL_RCCEx_PeriphCLKConfig+0x61e>
{
if((HAL_GetTick() - tickstart) > PLLI2S_TIMEOUT_VALUE)
8009db4: f7fa ff72 bl 8004c9c <HAL_GetTick>
8009db8: 4602 mov r2, r0
8009dba: 697b ldr r3, [r7, #20]
8009dbc: 1ad3 subs r3, r2, r3
8009dbe: 2b64 cmp r3, #100 ; 0x64
8009dc0: d901 bls.n 8009dc6 <HAL_RCCEx_PeriphCLKConfig+0x61e>
{
/* return in case of Timeout detected */
return HAL_TIMEOUT;
8009dc2: 2303 movs r3, #3
8009dc4: e0d7 b.n 8009f76 <HAL_RCCEx_PeriphCLKConfig+0x7ce>
while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) == RESET)
8009dc6: 4b0e ldr r3, [pc, #56] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009dc8: 681b ldr r3, [r3, #0]
8009dca: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
8009dce: 2b00 cmp r3, #0
8009dd0: d0f0 beq.n 8009db4 <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)
8009dd2: 69bb ldr r3, [r7, #24]
8009dd4: 2b01 cmp r3, #1
8009dd6: f040 80cd bne.w 8009f74 <HAL_RCCEx_PeriphCLKConfig+0x7cc>
{
/* Disable PLLSAI Clock */
__HAL_RCC_PLLSAI_DISABLE();
8009dda: 4b09 ldr r3, [pc, #36] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009ddc: 681b ldr r3, [r3, #0]
8009dde: 4a08 ldr r2, [pc, #32] ; (8009e00 <HAL_RCCEx_PeriphCLKConfig+0x658>)
8009de0: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
8009de4: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009de6: f7fa ff59 bl 8004c9c <HAL_GetTick>
8009dea: 6178 str r0, [r7, #20]
/* Wait till PLLSAI is disabled */
while(__HAL_RCC_PLLSAI_GET_FLAG() != RESET)
8009dec: e00a b.n 8009e04 <HAL_RCCEx_PeriphCLKConfig+0x65c>
{
if((HAL_GetTick() - tickstart) > PLLSAI_TIMEOUT_VALUE)
8009dee: f7fa ff55 bl 8004c9c <HAL_GetTick>
8009df2: 4602 mov r2, r0
8009df4: 697b ldr r3, [r7, #20]
8009df6: 1ad3 subs r3, r2, r3
8009df8: 2b64 cmp r3, #100 ; 0x64
8009dfa: d903 bls.n 8009e04 <HAL_RCCEx_PeriphCLKConfig+0x65c>
{
/* return in case of Timeout detected */
return HAL_TIMEOUT;
8009dfc: 2303 movs r3, #3
8009dfe: e0ba b.n 8009f76 <HAL_RCCEx_PeriphCLKConfig+0x7ce>
8009e00: 40023800 .word 0x40023800
while(__HAL_RCC_PLLSAI_GET_FLAG() != RESET)
8009e04: 4b5e ldr r3, [pc, #376] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009e06: 681b ldr r3, [r3, #0]
8009e08: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
8009e0c: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
8009e10: d0ed beq.n 8009dee <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)) ||\
8009e12: 687b ldr r3, [r7, #4]
8009e14: 681b ldr r3, [r3, #0]
8009e16: f403 2300 and.w r3, r3, #524288 ; 0x80000
8009e1a: 2b00 cmp r3, #0
8009e1c: d003 beq.n 8009e26 <HAL_RCCEx_PeriphCLKConfig+0x67e>
8009e1e: 687b ldr r3, [r7, #4]
8009e20: 6bdb ldr r3, [r3, #60] ; 0x3c
8009e22: 2b00 cmp r3, #0
8009e24: d009 beq.n 8009e3a <HAL_RCCEx_PeriphCLKConfig+0x692>
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)))
8009e26: 687b ldr r3, [r7, #4]
8009e28: 681b ldr r3, [r3, #0]
8009e2a: f403 1380 and.w r3, r3, #1048576 ; 0x100000
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)) ||\
8009e2e: 2b00 cmp r3, #0
8009e30: d02e beq.n 8009e90 <HAL_RCCEx_PeriphCLKConfig+0x6e8>
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)))
8009e32: 687b ldr r3, [r7, #4]
8009e34: 6c1b ldr r3, [r3, #64] ; 0x40
8009e36: 2b00 cmp r3, #0
8009e38: d12a bne.n 8009e90 <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);
8009e3a: 4b51 ldr r3, [pc, #324] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009e3c: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8009e40: 0c1b lsrs r3, r3, #16
8009e42: f003 0303 and.w r3, r3, #3
8009e46: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLSAICFGR & RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLSAICFGR_PLLSAIR_Pos);
8009e48: 4b4d ldr r3, [pc, #308] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009e4a: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8009e4e: 0f1b lsrs r3, r3, #28
8009e50: f003 0307 and.w r3, r3, #7
8009e54: 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);
8009e56: 687b ldr r3, [r7, #4]
8009e58: 695b ldr r3, [r3, #20]
8009e5a: 019a lsls r2, r3, #6
8009e5c: 693b ldr r3, [r7, #16]
8009e5e: 041b lsls r3, r3, #16
8009e60: 431a orrs r2, r3
8009e62: 687b ldr r3, [r7, #4]
8009e64: 699b ldr r3, [r3, #24]
8009e66: 061b lsls r3, r3, #24
8009e68: 431a orrs r2, r3
8009e6a: 68fb ldr r3, [r7, #12]
8009e6c: 071b lsls r3, r3, #28
8009e6e: 4944 ldr r1, [pc, #272] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009e70: 4313 orrs r3, r2
8009e72: f8c1 3088 str.w r3, [r1, #136] ; 0x88
/* SAI_CLK_x = SAI_CLK(first level)/PLLSAIDIVQ */
__HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLSAIDivQ);
8009e76: 4b42 ldr r3, [pc, #264] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009e78: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8009e7c: f423 52f8 bic.w r2, r3, #7936 ; 0x1f00
8009e80: 687b ldr r3, [r7, #4]
8009e82: 6a9b ldr r3, [r3, #40] ; 0x28
8009e84: 3b01 subs r3, #1
8009e86: 021b lsls r3, r3, #8
8009e88: 493d ldr r1, [pc, #244] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009e8a: 4313 orrs r3, r2
8009e8c: 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))
8009e90: 687b ldr r3, [r7, #4]
8009e92: 681b ldr r3, [r3, #0]
8009e94: f403 1300 and.w r3, r3, #2097152 ; 0x200000
8009e98: 2b00 cmp r3, #0
8009e9a: d022 beq.n 8009ee2 <HAL_RCCEx_PeriphCLKConfig+0x73a>
8009e9c: 687b ldr r3, [r7, #4]
8009e9e: 6fdb ldr r3, [r3, #124] ; 0x7c
8009ea0: f1b3 6f00 cmp.w r3, #134217728 ; 0x8000000
8009ea4: d11d bne.n 8009ee2 <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);
8009ea6: 4b36 ldr r3, [pc, #216] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009ea8: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8009eac: 0e1b lsrs r3, r3, #24
8009eae: f003 030f and.w r3, r3, #15
8009eb2: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIR) >> RCC_PLLSAICFGR_PLLSAIR_Pos);
8009eb4: 4b32 ldr r3, [pc, #200] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009eb6: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8009eba: 0f1b lsrs r3, r3, #28
8009ebc: f003 0307 and.w r3, r3, #7
8009ec0: 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);
8009ec2: 687b ldr r3, [r7, #4]
8009ec4: 695b ldr r3, [r3, #20]
8009ec6: 019a lsls r2, r3, #6
8009ec8: 687b ldr r3, [r7, #4]
8009eca: 6a1b ldr r3, [r3, #32]
8009ecc: 041b lsls r3, r3, #16
8009ece: 431a orrs r2, r3
8009ed0: 693b ldr r3, [r7, #16]
8009ed2: 061b lsls r3, r3, #24
8009ed4: 431a orrs r2, r3
8009ed6: 68fb ldr r3, [r7, #12]
8009ed8: 071b lsls r3, r3, #28
8009eda: 4929 ldr r1, [pc, #164] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009edc: 4313 orrs r3, r2
8009ede: 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))
8009ee2: 687b ldr r3, [r7, #4]
8009ee4: 681b ldr r3, [r3, #0]
8009ee6: f003 0308 and.w r3, r3, #8
8009eea: 2b00 cmp r3, #0
8009eec: d028 beq.n 8009f40 <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);
8009eee: 4b24 ldr r3, [pc, #144] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009ef0: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8009ef4: 0e1b lsrs r3, r3, #24
8009ef6: f003 030f and.w r3, r3, #15
8009efa: 613b str r3, [r7, #16]
tmpreg1 = ((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIP) >> RCC_PLLSAICFGR_PLLSAIP_Pos);
8009efc: 4b20 ldr r3, [pc, #128] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009efe: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
8009f02: 0c1b lsrs r3, r3, #16
8009f04: f003 0303 and.w r3, r3, #3
8009f08: 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);
8009f0a: 687b ldr r3, [r7, #4]
8009f0c: 695b ldr r3, [r3, #20]
8009f0e: 019a lsls r2, r3, #6
8009f10: 68fb ldr r3, [r7, #12]
8009f12: 041b lsls r3, r3, #16
8009f14: 431a orrs r2, r3
8009f16: 693b ldr r3, [r7, #16]
8009f18: 061b lsls r3, r3, #24
8009f1a: 431a orrs r2, r3
8009f1c: 687b ldr r3, [r7, #4]
8009f1e: 69db ldr r3, [r3, #28]
8009f20: 071b lsls r3, r3, #28
8009f22: 4917 ldr r1, [pc, #92] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009f24: 4313 orrs r3, r2
8009f26: f8c1 3088 str.w r3, [r1, #136] ; 0x88
/* LTDC_CLK = LTDC_CLK(first level)/PLLSAIDIVR */
__HAL_RCC_PLLSAI_PLLSAICLKDIVR_CONFIG(PeriphClkInit->PLLSAIDivR);
8009f2a: 4b15 ldr r3, [pc, #84] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009f2c: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8009f30: f423 3240 bic.w r2, r3, #196608 ; 0x30000
8009f34: 687b ldr r3, [r7, #4]
8009f36: 6adb ldr r3, [r3, #44] ; 0x2c
8009f38: 4911 ldr r1, [pc, #68] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009f3a: 4313 orrs r3, r2
8009f3c: f8c1 308c str.w r3, [r1, #140] ; 0x8c
}
#endif /* STM32F746xx || STM32F756xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx || STM32F750xx */
/* Enable PLLSAI Clock */
__HAL_RCC_PLLSAI_ENABLE();
8009f40: 4b0f ldr r3, [pc, #60] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009f42: 681b ldr r3, [r3, #0]
8009f44: 4a0e ldr r2, [pc, #56] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009f46: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
8009f4a: 6013 str r3, [r2, #0]
/* Get Start Tick*/
tickstart = HAL_GetTick();
8009f4c: f7fa fea6 bl 8004c9c <HAL_GetTick>
8009f50: 6178 str r0, [r7, #20]
/* Wait till PLLSAI is ready */
while(__HAL_RCC_PLLSAI_GET_FLAG() == RESET)
8009f52: e008 b.n 8009f66 <HAL_RCCEx_PeriphCLKConfig+0x7be>
{
if((HAL_GetTick() - tickstart) > PLLSAI_TIMEOUT_VALUE)
8009f54: f7fa fea2 bl 8004c9c <HAL_GetTick>
8009f58: 4602 mov r2, r0
8009f5a: 697b ldr r3, [r7, #20]
8009f5c: 1ad3 subs r3, r2, r3
8009f5e: 2b64 cmp r3, #100 ; 0x64
8009f60: d901 bls.n 8009f66 <HAL_RCCEx_PeriphCLKConfig+0x7be>
{
/* return in case of Timeout detected */
return HAL_TIMEOUT;
8009f62: 2303 movs r3, #3
8009f64: e007 b.n 8009f76 <HAL_RCCEx_PeriphCLKConfig+0x7ce>
while(__HAL_RCC_PLLSAI_GET_FLAG() == RESET)
8009f66: 4b06 ldr r3, [pc, #24] ; (8009f80 <HAL_RCCEx_PeriphCLKConfig+0x7d8>)
8009f68: 681b ldr r3, [r3, #0]
8009f6a: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
8009f6e: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
8009f72: d1ef bne.n 8009f54 <HAL_RCCEx_PeriphCLKConfig+0x7ac>
}
}
}
return HAL_OK;
8009f74: 2300 movs r3, #0
}
8009f76: 4618 mov r0, r3
8009f78: 3720 adds r7, #32
8009f7a: 46bd mov sp, r7
8009f7c: bd80 pop {r7, pc}
8009f7e: bf00 nop
8009f80: 40023800 .word 0x40023800
08009f84 <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)
{
8009f84: b580 push {r7, lr}
8009f86: b082 sub sp, #8
8009f88: af00 add r7, sp, #0
8009f8a: 6078 str r0, [r7, #4]
/* Check the RNG handle allocation */
if (hrng == NULL)
8009f8c: 687b ldr r3, [r7, #4]
8009f8e: 2b00 cmp r3, #0
8009f90: d101 bne.n 8009f96 <HAL_RNG_Init+0x12>
{
return HAL_ERROR;
8009f92: 2301 movs r3, #1
8009f94: e01c b.n 8009fd0 <HAL_RNG_Init+0x4c>
/* Init the low level hardware */
hrng->MspInitCallback(hrng);
}
#else
if (hrng->State == HAL_RNG_STATE_RESET)
8009f96: 687b ldr r3, [r7, #4]
8009f98: 795b ldrb r3, [r3, #5]
8009f9a: b2db uxtb r3, r3
8009f9c: 2b00 cmp r3, #0
8009f9e: d105 bne.n 8009fac <HAL_RNG_Init+0x28>
{
/* Allocate lock resource and initialize it */
hrng->Lock = HAL_UNLOCKED;
8009fa0: 687b ldr r3, [r7, #4]
8009fa2: 2200 movs r2, #0
8009fa4: 711a strb r2, [r3, #4]
/* Init the low level hardware */
HAL_RNG_MspInit(hrng);
8009fa6: 6878 ldr r0, [r7, #4]
8009fa8: f7fa fa0a bl 80043c0 <HAL_RNG_MspInit>
}
#endif /* USE_HAL_RNG_REGISTER_CALLBACKS */
/* Change RNG peripheral state */
hrng->State = HAL_RNG_STATE_BUSY;
8009fac: 687b ldr r3, [r7, #4]
8009fae: 2202 movs r2, #2
8009fb0: 715a strb r2, [r3, #5]
/* Enable the RNG Peripheral */
__HAL_RNG_ENABLE(hrng);
8009fb2: 687b ldr r3, [r7, #4]
8009fb4: 681b ldr r3, [r3, #0]
8009fb6: 681a ldr r2, [r3, #0]
8009fb8: 687b ldr r3, [r7, #4]
8009fba: 681b ldr r3, [r3, #0]
8009fbc: f042 0204 orr.w r2, r2, #4
8009fc0: 601a str r2, [r3, #0]
/* Initialize the RNG state */
hrng->State = HAL_RNG_STATE_READY;
8009fc2: 687b ldr r3, [r7, #4]
8009fc4: 2201 movs r2, #1
8009fc6: 715a strb r2, [r3, #5]
/* Initialise the error code */
hrng->ErrorCode = HAL_RNG_ERROR_NONE;
8009fc8: 687b ldr r3, [r7, #4]
8009fca: 2200 movs r2, #0
8009fcc: 609a str r2, [r3, #8]
/* Return function status */
return HAL_OK;
8009fce: 2300 movs r3, #0
}
8009fd0: 4618 mov r0, r3
8009fd2: 3708 adds r7, #8
8009fd4: 46bd mov sp, r7
8009fd6: bd80 pop {r7, pc}
08009fd8 <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)
{
8009fd8: b580 push {r7, lr}
8009fda: b082 sub sp, #8
8009fdc: af00 add r7, sp, #0
8009fde: 6078 str r0, [r7, #4]
/* Check the RTC peripheral state */
if(hrtc == NULL)
8009fe0: 687b ldr r3, [r7, #4]
8009fe2: 2b00 cmp r3, #0
8009fe4: d101 bne.n 8009fea <HAL_RTC_Init+0x12>
{
return HAL_ERROR;
8009fe6: 2301 movs r3, #1
8009fe8: e06b b.n 800a0c2 <HAL_RTC_Init+0xea>
{
hrtc->MspDeInitCallback = HAL_RTC_MspDeInit;
}
}
#else
if(hrtc->State == HAL_RTC_STATE_RESET)
8009fea: 687b ldr r3, [r7, #4]
8009fec: 7f5b ldrb r3, [r3, #29]
8009fee: b2db uxtb r3, r3
8009ff0: 2b00 cmp r3, #0
8009ff2: d105 bne.n 800a000 <HAL_RTC_Init+0x28>
{
/* Allocate lock resource and initialize it */
hrtc->Lock = HAL_UNLOCKED;
8009ff4: 687b ldr r3, [r7, #4]
8009ff6: 2200 movs r2, #0
8009ff8: 771a strb r2, [r3, #28]
/* Initialize RTC MSP */
HAL_RTC_MspInit(hrtc);
8009ffa: 6878 ldr r0, [r7, #4]
8009ffc: f7fa fa00 bl 8004400 <HAL_RTC_MspInit>
}
#endif /* (USE_HAL_RTC_REGISTER_CALLBACKS) */
/* Set RTC state */
hrtc->State = HAL_RTC_STATE_BUSY;
800a000: 687b ldr r3, [r7, #4]
800a002: 2202 movs r2, #2
800a004: 775a strb r2, [r3, #29]
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800a006: 687b ldr r3, [r7, #4]
800a008: 681b ldr r3, [r3, #0]
800a00a: 22ca movs r2, #202 ; 0xca
800a00c: 625a str r2, [r3, #36] ; 0x24
800a00e: 687b ldr r3, [r7, #4]
800a010: 681b ldr r3, [r3, #0]
800a012: 2253 movs r2, #83 ; 0x53
800a014: 625a str r2, [r3, #36] ; 0x24
/* Set Initialization mode */
if(RTC_EnterInitMode(hrtc) != HAL_OK)
800a016: 6878 ldr r0, [r7, #4]
800a018: f000 fb00 bl 800a61c <RTC_EnterInitMode>
800a01c: 4603 mov r3, r0
800a01e: 2b00 cmp r3, #0
800a020: d008 beq.n 800a034 <HAL_RTC_Init+0x5c>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a022: 687b ldr r3, [r7, #4]
800a024: 681b ldr r3, [r3, #0]
800a026: 22ff movs r2, #255 ; 0xff
800a028: 625a str r2, [r3, #36] ; 0x24
/* Set RTC state */
hrtc->State = HAL_RTC_STATE_ERROR;
800a02a: 687b ldr r3, [r7, #4]
800a02c: 2204 movs r2, #4
800a02e: 775a strb r2, [r3, #29]
return HAL_ERROR;
800a030: 2301 movs r3, #1
800a032: e046 b.n 800a0c2 <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));
800a034: 687b ldr r3, [r7, #4]
800a036: 681b ldr r3, [r3, #0]
800a038: 6899 ldr r1, [r3, #8]
800a03a: 687b ldr r3, [r7, #4]
800a03c: 681a ldr r2, [r3, #0]
800a03e: 4b23 ldr r3, [pc, #140] ; (800a0cc <HAL_RTC_Init+0xf4>)
800a040: 400b ands r3, r1
800a042: 6093 str r3, [r2, #8]
/* Set RTC_CR register */
hrtc->Instance->CR |= (uint32_t)(hrtc->Init.HourFormat | hrtc->Init.OutPut | hrtc->Init.OutPutPolarity);
800a044: 687b ldr r3, [r7, #4]
800a046: 681b ldr r3, [r3, #0]
800a048: 6899 ldr r1, [r3, #8]
800a04a: 687b ldr r3, [r7, #4]
800a04c: 685a ldr r2, [r3, #4]
800a04e: 687b ldr r3, [r7, #4]
800a050: 691b ldr r3, [r3, #16]
800a052: 431a orrs r2, r3
800a054: 687b ldr r3, [r7, #4]
800a056: 695b ldr r3, [r3, #20]
800a058: 431a orrs r2, r3
800a05a: 687b ldr r3, [r7, #4]
800a05c: 681b ldr r3, [r3, #0]
800a05e: 430a orrs r2, r1
800a060: 609a str r2, [r3, #8]
/* Configure the RTC PRER */
hrtc->Instance->PRER = (uint32_t)(hrtc->Init.SynchPrediv);
800a062: 687b ldr r3, [r7, #4]
800a064: 681b ldr r3, [r3, #0]
800a066: 687a ldr r2, [r7, #4]
800a068: 68d2 ldr r2, [r2, #12]
800a06a: 611a str r2, [r3, #16]
hrtc->Instance->PRER |= (uint32_t)(hrtc->Init.AsynchPrediv << 16);
800a06c: 687b ldr r3, [r7, #4]
800a06e: 681b ldr r3, [r3, #0]
800a070: 6919 ldr r1, [r3, #16]
800a072: 687b ldr r3, [r7, #4]
800a074: 689b ldr r3, [r3, #8]
800a076: 041a lsls r2, r3, #16
800a078: 687b ldr r3, [r7, #4]
800a07a: 681b ldr r3, [r3, #0]
800a07c: 430a orrs r2, r1
800a07e: 611a str r2, [r3, #16]
/* Exit Initialization mode */
hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
800a080: 687b ldr r3, [r7, #4]
800a082: 681b ldr r3, [r3, #0]
800a084: 68da ldr r2, [r3, #12]
800a086: 687b ldr r3, [r7, #4]
800a088: 681b ldr r3, [r3, #0]
800a08a: f022 0280 bic.w r2, r2, #128 ; 0x80
800a08e: 60da str r2, [r3, #12]
hrtc->Instance->OR &= (uint32_t)~RTC_OR_ALARMTYPE;
800a090: 687b ldr r3, [r7, #4]
800a092: 681b ldr r3, [r3, #0]
800a094: 6cda ldr r2, [r3, #76] ; 0x4c
800a096: 687b ldr r3, [r7, #4]
800a098: 681b ldr r3, [r3, #0]
800a09a: f022 0208 bic.w r2, r2, #8
800a09e: 64da str r2, [r3, #76] ; 0x4c
hrtc->Instance->OR |= (uint32_t)(hrtc->Init.OutPutType);
800a0a0: 687b ldr r3, [r7, #4]
800a0a2: 681b ldr r3, [r3, #0]
800a0a4: 6cd9 ldr r1, [r3, #76] ; 0x4c
800a0a6: 687b ldr r3, [r7, #4]
800a0a8: 699a ldr r2, [r3, #24]
800a0aa: 687b ldr r3, [r7, #4]
800a0ac: 681b ldr r3, [r3, #0]
800a0ae: 430a orrs r2, r1
800a0b0: 64da str r2, [r3, #76] ; 0x4c
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a0b2: 687b ldr r3, [r7, #4]
800a0b4: 681b ldr r3, [r3, #0]
800a0b6: 22ff movs r2, #255 ; 0xff
800a0b8: 625a str r2, [r3, #36] ; 0x24
/* Set RTC state */
hrtc->State = HAL_RTC_STATE_READY;
800a0ba: 687b ldr r3, [r7, #4]
800a0bc: 2201 movs r2, #1
800a0be: 775a strb r2, [r3, #29]
return HAL_OK;
800a0c0: 2300 movs r3, #0
}
}
800a0c2: 4618 mov r0, r3
800a0c4: 3708 adds r7, #8
800a0c6: 46bd mov sp, r7
800a0c8: bd80 pop {r7, pc}
800a0ca: bf00 nop
800a0cc: ff8fffbf .word 0xff8fffbf
0800a0d0 <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)
{
800a0d0: b590 push {r4, r7, lr}
800a0d2: b087 sub sp, #28
800a0d4: af00 add r7, sp, #0
800a0d6: 60f8 str r0, [r7, #12]
800a0d8: 60b9 str r1, [r7, #8]
800a0da: 607a str r2, [r7, #4]
uint32_t tmpreg = 0;
800a0dc: 2300 movs r3, #0
800a0de: 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);
800a0e0: 68fb ldr r3, [r7, #12]
800a0e2: 7f1b ldrb r3, [r3, #28]
800a0e4: 2b01 cmp r3, #1
800a0e6: d101 bne.n 800a0ec <HAL_RTC_SetTime+0x1c>
800a0e8: 2302 movs r3, #2
800a0ea: e0a8 b.n 800a23e <HAL_RTC_SetTime+0x16e>
800a0ec: 68fb ldr r3, [r7, #12]
800a0ee: 2201 movs r2, #1
800a0f0: 771a strb r2, [r3, #28]
hrtc->State = HAL_RTC_STATE_BUSY;
800a0f2: 68fb ldr r3, [r7, #12]
800a0f4: 2202 movs r2, #2
800a0f6: 775a strb r2, [r3, #29]
if(Format == RTC_FORMAT_BIN)
800a0f8: 687b ldr r3, [r7, #4]
800a0fa: 2b00 cmp r3, #0
800a0fc: d126 bne.n 800a14c <HAL_RTC_SetTime+0x7c>
{
if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
800a0fe: 68fb ldr r3, [r7, #12]
800a100: 681b ldr r3, [r3, #0]
800a102: 689b ldr r3, [r3, #8]
800a104: f003 0340 and.w r3, r3, #64 ; 0x40
800a108: 2b00 cmp r3, #0
800a10a: d102 bne.n 800a112 <HAL_RTC_SetTime+0x42>
assert_param(IS_RTC_HOUR12(sTime->Hours));
assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat));
}
else
{
sTime->TimeFormat = 0x00;
800a10c: 68bb ldr r3, [r7, #8]
800a10e: 2200 movs r2, #0
800a110: 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) | \
800a112: 68bb ldr r3, [r7, #8]
800a114: 781b ldrb r3, [r3, #0]
800a116: 4618 mov r0, r3
800a118: f000 faac bl 800a674 <RTC_ByteToBcd2>
800a11c: 4603 mov r3, r0
800a11e: 041c lsls r4, r3, #16
((uint32_t)RTC_ByteToBcd2(sTime->Minutes) << 8) | \
800a120: 68bb ldr r3, [r7, #8]
800a122: 785b ldrb r3, [r3, #1]
800a124: 4618 mov r0, r3
800a126: f000 faa5 bl 800a674 <RTC_ByteToBcd2>
800a12a: 4603 mov r3, r0
800a12c: 021b lsls r3, r3, #8
tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(sTime->Hours) << 16) | \
800a12e: 431c orrs r4, r3
((uint32_t)RTC_ByteToBcd2(sTime->Seconds)) | \
800a130: 68bb ldr r3, [r7, #8]
800a132: 789b ldrb r3, [r3, #2]
800a134: 4618 mov r0, r3
800a136: f000 fa9d bl 800a674 <RTC_ByteToBcd2>
800a13a: 4603 mov r3, r0
((uint32_t)RTC_ByteToBcd2(sTime->Minutes) << 8) | \
800a13c: ea44 0203 orr.w r2, r4, r3
(((uint32_t)sTime->TimeFormat) << 16));
800a140: 68bb ldr r3, [r7, #8]
800a142: 7b1b ldrb r3, [r3, #12]
800a144: 041b lsls r3, r3, #16
tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(sTime->Hours) << 16) | \
800a146: 4313 orrs r3, r2
800a148: 617b str r3, [r7, #20]
800a14a: e018 b.n 800a17e <HAL_RTC_SetTime+0xae>
}
else
{
if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
800a14c: 68fb ldr r3, [r7, #12]
800a14e: 681b ldr r3, [r3, #0]
800a150: 689b ldr r3, [r3, #8]
800a152: f003 0340 and.w r3, r3, #64 ; 0x40
800a156: 2b00 cmp r3, #0
800a158: d102 bne.n 800a160 <HAL_RTC_SetTime+0x90>
assert_param(IS_RTC_HOUR12(RTC_Bcd2ToByte(sTime->Hours)));
assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat));
}
else
{
sTime->TimeFormat = 0x00;
800a15a: 68bb ldr r3, [r7, #8]
800a15c: 2200 movs r2, #0
800a15e: 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) | \
800a160: 68bb ldr r3, [r7, #8]
800a162: 781b ldrb r3, [r3, #0]
800a164: 041a lsls r2, r3, #16
((uint32_t)(sTime->Minutes) << 8) | \
800a166: 68bb ldr r3, [r7, #8]
800a168: 785b ldrb r3, [r3, #1]
800a16a: 021b lsls r3, r3, #8
tmpreg = (((uint32_t)(sTime->Hours) << 16) | \
800a16c: 4313 orrs r3, r2
((uint32_t)sTime->Seconds) | \
800a16e: 68ba ldr r2, [r7, #8]
800a170: 7892 ldrb r2, [r2, #2]
((uint32_t)(sTime->Minutes) << 8) | \
800a172: 431a orrs r2, r3
((uint32_t)(sTime->TimeFormat) << 16));
800a174: 68bb ldr r3, [r7, #8]
800a176: 7b1b ldrb r3, [r3, #12]
800a178: 041b lsls r3, r3, #16
tmpreg = (((uint32_t)(sTime->Hours) << 16) | \
800a17a: 4313 orrs r3, r2
800a17c: 617b str r3, [r7, #20]
}
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800a17e: 68fb ldr r3, [r7, #12]
800a180: 681b ldr r3, [r3, #0]
800a182: 22ca movs r2, #202 ; 0xca
800a184: 625a str r2, [r3, #36] ; 0x24
800a186: 68fb ldr r3, [r7, #12]
800a188: 681b ldr r3, [r3, #0]
800a18a: 2253 movs r2, #83 ; 0x53
800a18c: 625a str r2, [r3, #36] ; 0x24
/* Set Initialization mode */
if(RTC_EnterInitMode(hrtc) != HAL_OK)
800a18e: 68f8 ldr r0, [r7, #12]
800a190: f000 fa44 bl 800a61c <RTC_EnterInitMode>
800a194: 4603 mov r3, r0
800a196: 2b00 cmp r3, #0
800a198: d00b beq.n 800a1b2 <HAL_RTC_SetTime+0xe2>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a19a: 68fb ldr r3, [r7, #12]
800a19c: 681b ldr r3, [r3, #0]
800a19e: 22ff movs r2, #255 ; 0xff
800a1a0: 625a str r2, [r3, #36] ; 0x24
/* Set RTC state */
hrtc->State = HAL_RTC_STATE_ERROR;
800a1a2: 68fb ldr r3, [r7, #12]
800a1a4: 2204 movs r2, #4
800a1a6: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a1a8: 68fb ldr r3, [r7, #12]
800a1aa: 2200 movs r2, #0
800a1ac: 771a strb r2, [r3, #28]
return HAL_ERROR;
800a1ae: 2301 movs r3, #1
800a1b0: e045 b.n 800a23e <HAL_RTC_SetTime+0x16e>
}
else
{
/* Set the RTC_TR register */
hrtc->Instance->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK);
800a1b2: 68fb ldr r3, [r7, #12]
800a1b4: 681a ldr r2, [r3, #0]
800a1b6: 6979 ldr r1, [r7, #20]
800a1b8: 4b23 ldr r3, [pc, #140] ; (800a248 <HAL_RTC_SetTime+0x178>)
800a1ba: 400b ands r3, r1
800a1bc: 6013 str r3, [r2, #0]
/* Clear the bits to be configured */
hrtc->Instance->CR &= (uint32_t)~RTC_CR_BKP;
800a1be: 68fb ldr r3, [r7, #12]
800a1c0: 681b ldr r3, [r3, #0]
800a1c2: 689a ldr r2, [r3, #8]
800a1c4: 68fb ldr r3, [r7, #12]
800a1c6: 681b ldr r3, [r3, #0]
800a1c8: f422 2280 bic.w r2, r2, #262144 ; 0x40000
800a1cc: 609a str r2, [r3, #8]
/* Configure the RTC_CR register */
hrtc->Instance->CR |= (uint32_t)(sTime->DayLightSaving | sTime->StoreOperation);
800a1ce: 68fb ldr r3, [r7, #12]
800a1d0: 681b ldr r3, [r3, #0]
800a1d2: 6899 ldr r1, [r3, #8]
800a1d4: 68bb ldr r3, [r7, #8]
800a1d6: 691a ldr r2, [r3, #16]
800a1d8: 68bb ldr r3, [r7, #8]
800a1da: 695b ldr r3, [r3, #20]
800a1dc: 431a orrs r2, r3
800a1de: 68fb ldr r3, [r7, #12]
800a1e0: 681b ldr r3, [r3, #0]
800a1e2: 430a orrs r2, r1
800a1e4: 609a str r2, [r3, #8]
/* Exit Initialization mode */
hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
800a1e6: 68fb ldr r3, [r7, #12]
800a1e8: 681b ldr r3, [r3, #0]
800a1ea: 68da ldr r2, [r3, #12]
800a1ec: 68fb ldr r3, [r7, #12]
800a1ee: 681b ldr r3, [r3, #0]
800a1f0: f022 0280 bic.w r2, r2, #128 ; 0x80
800a1f4: 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)
800a1f6: 68fb ldr r3, [r7, #12]
800a1f8: 681b ldr r3, [r3, #0]
800a1fa: 689b ldr r3, [r3, #8]
800a1fc: f003 0320 and.w r3, r3, #32
800a200: 2b00 cmp r3, #0
800a202: d111 bne.n 800a228 <HAL_RTC_SetTime+0x158>
{
if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK)
800a204: 68f8 ldr r0, [r7, #12]
800a206: f000 f9e1 bl 800a5cc <HAL_RTC_WaitForSynchro>
800a20a: 4603 mov r3, r0
800a20c: 2b00 cmp r3, #0
800a20e: d00b beq.n 800a228 <HAL_RTC_SetTime+0x158>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a210: 68fb ldr r3, [r7, #12]
800a212: 681b ldr r3, [r3, #0]
800a214: 22ff movs r2, #255 ; 0xff
800a216: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_ERROR;
800a218: 68fb ldr r3, [r7, #12]
800a21a: 2204 movs r2, #4
800a21c: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a21e: 68fb ldr r3, [r7, #12]
800a220: 2200 movs r2, #0
800a222: 771a strb r2, [r3, #28]
return HAL_ERROR;
800a224: 2301 movs r3, #1
800a226: e00a b.n 800a23e <HAL_RTC_SetTime+0x16e>
}
}
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a228: 68fb ldr r3, [r7, #12]
800a22a: 681b ldr r3, [r3, #0]
800a22c: 22ff movs r2, #255 ; 0xff
800a22e: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_READY;
800a230: 68fb ldr r3, [r7, #12]
800a232: 2201 movs r2, #1
800a234: 775a strb r2, [r3, #29]
__HAL_UNLOCK(hrtc);
800a236: 68fb ldr r3, [r7, #12]
800a238: 2200 movs r2, #0
800a23a: 771a strb r2, [r3, #28]
return HAL_OK;
800a23c: 2300 movs r3, #0
}
}
800a23e: 4618 mov r0, r3
800a240: 371c adds r7, #28
800a242: 46bd mov sp, r7
800a244: bd90 pop {r4, r7, pc}
800a246: bf00 nop
800a248: 007f7f7f .word 0x007f7f7f
0800a24c <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)
{
800a24c: b590 push {r4, r7, lr}
800a24e: b087 sub sp, #28
800a250: af00 add r7, sp, #0
800a252: 60f8 str r0, [r7, #12]
800a254: 60b9 str r1, [r7, #8]
800a256: 607a str r2, [r7, #4]
uint32_t datetmpreg = 0;
800a258: 2300 movs r3, #0
800a25a: 617b str r3, [r7, #20]
/* Check the parameters */
assert_param(IS_RTC_FORMAT(Format));
/* Process Locked */
__HAL_LOCK(hrtc);
800a25c: 68fb ldr r3, [r7, #12]
800a25e: 7f1b ldrb r3, [r3, #28]
800a260: 2b01 cmp r3, #1
800a262: d101 bne.n 800a268 <HAL_RTC_SetDate+0x1c>
800a264: 2302 movs r3, #2
800a266: e092 b.n 800a38e <HAL_RTC_SetDate+0x142>
800a268: 68fb ldr r3, [r7, #12]
800a26a: 2201 movs r2, #1
800a26c: 771a strb r2, [r3, #28]
hrtc->State = HAL_RTC_STATE_BUSY;
800a26e: 68fb ldr r3, [r7, #12]
800a270: 2202 movs r2, #2
800a272: 775a strb r2, [r3, #29]
if((Format == RTC_FORMAT_BIN) && ((sDate->Month & 0x10U) == 0x10U))
800a274: 687b ldr r3, [r7, #4]
800a276: 2b00 cmp r3, #0
800a278: d10e bne.n 800a298 <HAL_RTC_SetDate+0x4c>
800a27a: 68bb ldr r3, [r7, #8]
800a27c: 785b ldrb r3, [r3, #1]
800a27e: f003 0310 and.w r3, r3, #16
800a282: 2b00 cmp r3, #0
800a284: d008 beq.n 800a298 <HAL_RTC_SetDate+0x4c>
{
sDate->Month = (uint8_t)((sDate->Month & (uint8_t)~(0x10U)) + (uint8_t)0x0AU);
800a286: 68bb ldr r3, [r7, #8]
800a288: 785b ldrb r3, [r3, #1]
800a28a: f023 0310 bic.w r3, r3, #16
800a28e: b2db uxtb r3, r3
800a290: 330a adds r3, #10
800a292: b2da uxtb r2, r3
800a294: 68bb ldr r3, [r7, #8]
800a296: 705a strb r2, [r3, #1]
}
assert_param(IS_RTC_WEEKDAY(sDate->WeekDay));
if(Format == RTC_FORMAT_BIN)
800a298: 687b ldr r3, [r7, #4]
800a29a: 2b00 cmp r3, #0
800a29c: d11c bne.n 800a2d8 <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) | \
800a29e: 68bb ldr r3, [r7, #8]
800a2a0: 78db ldrb r3, [r3, #3]
800a2a2: 4618 mov r0, r3
800a2a4: f000 f9e6 bl 800a674 <RTC_ByteToBcd2>
800a2a8: 4603 mov r3, r0
800a2aa: 041c lsls r4, r3, #16
((uint32_t)RTC_ByteToBcd2(sDate->Month) << 8) | \
800a2ac: 68bb ldr r3, [r7, #8]
800a2ae: 785b ldrb r3, [r3, #1]
800a2b0: 4618 mov r0, r3
800a2b2: f000 f9df bl 800a674 <RTC_ByteToBcd2>
800a2b6: 4603 mov r3, r0
800a2b8: 021b lsls r3, r3, #8
datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << 16) | \
800a2ba: 431c orrs r4, r3
((uint32_t)RTC_ByteToBcd2(sDate->Date)) | \
800a2bc: 68bb ldr r3, [r7, #8]
800a2be: 789b ldrb r3, [r3, #2]
800a2c0: 4618 mov r0, r3
800a2c2: f000 f9d7 bl 800a674 <RTC_ByteToBcd2>
800a2c6: 4603 mov r3, r0
((uint32_t)RTC_ByteToBcd2(sDate->Month) << 8) | \
800a2c8: ea44 0203 orr.w r2, r4, r3
((uint32_t)sDate->WeekDay << 13));
800a2cc: 68bb ldr r3, [r7, #8]
800a2ce: 781b ldrb r3, [r3, #0]
800a2d0: 035b lsls r3, r3, #13
datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << 16) | \
800a2d2: 4313 orrs r3, r2
800a2d4: 617b str r3, [r7, #20]
800a2d6: e00e b.n 800a2f6 <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) | \
800a2d8: 68bb ldr r3, [r7, #8]
800a2da: 78db ldrb r3, [r3, #3]
800a2dc: 041a lsls r2, r3, #16
(((uint32_t)sDate->Month) << 8) | \
800a2de: 68bb ldr r3, [r7, #8]
800a2e0: 785b ldrb r3, [r3, #1]
800a2e2: 021b lsls r3, r3, #8
datetmpreg = ((((uint32_t)sDate->Year) << 16) | \
800a2e4: 4313 orrs r3, r2
((uint32_t)sDate->Date) | \
800a2e6: 68ba ldr r2, [r7, #8]
800a2e8: 7892 ldrb r2, [r2, #2]
(((uint32_t)sDate->Month) << 8) | \
800a2ea: 431a orrs r2, r3
(((uint32_t)sDate->WeekDay) << 13));
800a2ec: 68bb ldr r3, [r7, #8]
800a2ee: 781b ldrb r3, [r3, #0]
800a2f0: 035b lsls r3, r3, #13
datetmpreg = ((((uint32_t)sDate->Year) << 16) | \
800a2f2: 4313 orrs r3, r2
800a2f4: 617b str r3, [r7, #20]
}
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800a2f6: 68fb ldr r3, [r7, #12]
800a2f8: 681b ldr r3, [r3, #0]
800a2fa: 22ca movs r2, #202 ; 0xca
800a2fc: 625a str r2, [r3, #36] ; 0x24
800a2fe: 68fb ldr r3, [r7, #12]
800a300: 681b ldr r3, [r3, #0]
800a302: 2253 movs r2, #83 ; 0x53
800a304: 625a str r2, [r3, #36] ; 0x24
/* Set Initialization mode */
if(RTC_EnterInitMode(hrtc) != HAL_OK)
800a306: 68f8 ldr r0, [r7, #12]
800a308: f000 f988 bl 800a61c <RTC_EnterInitMode>
800a30c: 4603 mov r3, r0
800a30e: 2b00 cmp r3, #0
800a310: d00b beq.n 800a32a <HAL_RTC_SetDate+0xde>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a312: 68fb ldr r3, [r7, #12]
800a314: 681b ldr r3, [r3, #0]
800a316: 22ff movs r2, #255 ; 0xff
800a318: 625a str r2, [r3, #36] ; 0x24
/* Set RTC state*/
hrtc->State = HAL_RTC_STATE_ERROR;
800a31a: 68fb ldr r3, [r7, #12]
800a31c: 2204 movs r2, #4
800a31e: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a320: 68fb ldr r3, [r7, #12]
800a322: 2200 movs r2, #0
800a324: 771a strb r2, [r3, #28]
return HAL_ERROR;
800a326: 2301 movs r3, #1
800a328: e031 b.n 800a38e <HAL_RTC_SetDate+0x142>
}
else
{
/* Set the RTC_DR register */
hrtc->Instance->DR = (uint32_t)(datetmpreg & RTC_DR_RESERVED_MASK);
800a32a: 68fb ldr r3, [r7, #12]
800a32c: 681a ldr r2, [r3, #0]
800a32e: 6979 ldr r1, [r7, #20]
800a330: 4b19 ldr r3, [pc, #100] ; (800a398 <HAL_RTC_SetDate+0x14c>)
800a332: 400b ands r3, r1
800a334: 6053 str r3, [r2, #4]
/* Exit Initialization mode */
hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
800a336: 68fb ldr r3, [r7, #12]
800a338: 681b ldr r3, [r3, #0]
800a33a: 68da ldr r2, [r3, #12]
800a33c: 68fb ldr r3, [r7, #12]
800a33e: 681b ldr r3, [r3, #0]
800a340: f022 0280 bic.w r2, r2, #128 ; 0x80
800a344: 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)
800a346: 68fb ldr r3, [r7, #12]
800a348: 681b ldr r3, [r3, #0]
800a34a: 689b ldr r3, [r3, #8]
800a34c: f003 0320 and.w r3, r3, #32
800a350: 2b00 cmp r3, #0
800a352: d111 bne.n 800a378 <HAL_RTC_SetDate+0x12c>
{
if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK)
800a354: 68f8 ldr r0, [r7, #12]
800a356: f000 f939 bl 800a5cc <HAL_RTC_WaitForSynchro>
800a35a: 4603 mov r3, r0
800a35c: 2b00 cmp r3, #0
800a35e: d00b beq.n 800a378 <HAL_RTC_SetDate+0x12c>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a360: 68fb ldr r3, [r7, #12]
800a362: 681b ldr r3, [r3, #0]
800a364: 22ff movs r2, #255 ; 0xff
800a366: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_ERROR;
800a368: 68fb ldr r3, [r7, #12]
800a36a: 2204 movs r2, #4
800a36c: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a36e: 68fb ldr r3, [r7, #12]
800a370: 2200 movs r2, #0
800a372: 771a strb r2, [r3, #28]
return HAL_ERROR;
800a374: 2301 movs r3, #1
800a376: e00a b.n 800a38e <HAL_RTC_SetDate+0x142>
}
}
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a378: 68fb ldr r3, [r7, #12]
800a37a: 681b ldr r3, [r3, #0]
800a37c: 22ff movs r2, #255 ; 0xff
800a37e: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_READY ;
800a380: 68fb ldr r3, [r7, #12]
800a382: 2201 movs r2, #1
800a384: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a386: 68fb ldr r3, [r7, #12]
800a388: 2200 movs r2, #0
800a38a: 771a strb r2, [r3, #28]
return HAL_OK;
800a38c: 2300 movs r3, #0
}
}
800a38e: 4618 mov r0, r3
800a390: 371c adds r7, #28
800a392: 46bd mov sp, r7
800a394: bd90 pop {r4, r7, pc}
800a396: bf00 nop
800a398: 00ffff3f .word 0x00ffff3f
0800a39c <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)
{
800a39c: b590 push {r4, r7, lr}
800a39e: b089 sub sp, #36 ; 0x24
800a3a0: af00 add r7, sp, #0
800a3a2: 60f8 str r0, [r7, #12]
800a3a4: 60b9 str r1, [r7, #8]
800a3a6: 607a str r2, [r7, #4]
uint32_t tickstart = 0;
800a3a8: 2300 movs r3, #0
800a3aa: 61bb str r3, [r7, #24]
uint32_t tmpreg = 0, subsecondtmpreg = 0;
800a3ac: 2300 movs r3, #0
800a3ae: 61fb str r3, [r7, #28]
800a3b0: 2300 movs r3, #0
800a3b2: 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);
800a3b4: 68fb ldr r3, [r7, #12]
800a3b6: 7f1b ldrb r3, [r3, #28]
800a3b8: 2b01 cmp r3, #1
800a3ba: d101 bne.n 800a3c0 <HAL_RTC_SetAlarm+0x24>
800a3bc: 2302 movs r3, #2
800a3be: e101 b.n 800a5c4 <HAL_RTC_SetAlarm+0x228>
800a3c0: 68fb ldr r3, [r7, #12]
800a3c2: 2201 movs r2, #1
800a3c4: 771a strb r2, [r3, #28]
hrtc->State = HAL_RTC_STATE_BUSY;
800a3c6: 68fb ldr r3, [r7, #12]
800a3c8: 2202 movs r2, #2
800a3ca: 775a strb r2, [r3, #29]
if(Format == RTC_FORMAT_BIN)
800a3cc: 687b ldr r3, [r7, #4]
800a3ce: 2b00 cmp r3, #0
800a3d0: d137 bne.n 800a442 <HAL_RTC_SetAlarm+0xa6>
{
if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
800a3d2: 68fb ldr r3, [r7, #12]
800a3d4: 681b ldr r3, [r3, #0]
800a3d6: 689b ldr r3, [r3, #8]
800a3d8: f003 0340 and.w r3, r3, #64 ; 0x40
800a3dc: 2b00 cmp r3, #0
800a3de: d102 bne.n 800a3e6 <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;
800a3e0: 68bb ldr r3, [r7, #8]
800a3e2: 2200 movs r2, #0
800a3e4: 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) | \
800a3e6: 68bb ldr r3, [r7, #8]
800a3e8: 781b ldrb r3, [r3, #0]
800a3ea: 4618 mov r0, r3
800a3ec: f000 f942 bl 800a674 <RTC_ByteToBcd2>
800a3f0: 4603 mov r3, r0
800a3f2: 041c lsls r4, r3, #16
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Minutes) << 8) | \
800a3f4: 68bb ldr r3, [r7, #8]
800a3f6: 785b ldrb r3, [r3, #1]
800a3f8: 4618 mov r0, r3
800a3fa: f000 f93b bl 800a674 <RTC_ByteToBcd2>
800a3fe: 4603 mov r3, r0
800a400: 021b lsls r3, r3, #8
tmpreg = (((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Hours) << 16) | \
800a402: 431c orrs r4, r3
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Seconds)) | \
800a404: 68bb ldr r3, [r7, #8]
800a406: 789b ldrb r3, [r3, #2]
800a408: 4618 mov r0, r3
800a40a: f000 f933 bl 800a674 <RTC_ByteToBcd2>
800a40e: 4603 mov r3, r0
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Minutes) << 8) | \
800a410: ea44 0203 orr.w r2, r4, r3
((uint32_t)(sAlarm->AlarmTime.TimeFormat) << 16) | \
800a414: 68bb ldr r3, [r7, #8]
800a416: 7b1b ldrb r3, [r3, #12]
800a418: 041b lsls r3, r3, #16
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Seconds)) | \
800a41a: ea42 0403 orr.w r4, r2, r3
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmDateWeekDay) << 24) | \
800a41e: 68bb ldr r3, [r7, #8]
800a420: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
800a424: 4618 mov r0, r3
800a426: f000 f925 bl 800a674 <RTC_ByteToBcd2>
800a42a: 4603 mov r3, r0
800a42c: 061b lsls r3, r3, #24
((uint32_t)(sAlarm->AlarmTime.TimeFormat) << 16) | \
800a42e: ea44 0203 orr.w r2, r4, r3
((uint32_t)sAlarm->AlarmDateWeekDaySel) | \
800a432: 68bb ldr r3, [r7, #8]
800a434: 6a1b ldr r3, [r3, #32]
((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmDateWeekDay) << 24) | \
800a436: 431a orrs r2, r3
((uint32_t)sAlarm->AlarmMask));
800a438: 68bb ldr r3, [r7, #8]
800a43a: 699b ldr r3, [r3, #24]
tmpreg = (((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Hours) << 16) | \
800a43c: 4313 orrs r3, r2
800a43e: 61fb str r3, [r7, #28]
800a440: e023 b.n 800a48a <HAL_RTC_SetAlarm+0xee>
}
else
{
if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
800a442: 68fb ldr r3, [r7, #12]
800a444: 681b ldr r3, [r3, #0]
800a446: 689b ldr r3, [r3, #8]
800a448: f003 0340 and.w r3, r3, #64 ; 0x40
800a44c: 2b00 cmp r3, #0
800a44e: d102 bne.n 800a456 <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;
800a450: 68bb ldr r3, [r7, #8]
800a452: 2200 movs r2, #0
800a454: 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) | \
800a456: 68bb ldr r3, [r7, #8]
800a458: 781b ldrb r3, [r3, #0]
800a45a: 041a lsls r2, r3, #16
((uint32_t)(sAlarm->AlarmTime.Minutes) << 8) | \
800a45c: 68bb ldr r3, [r7, #8]
800a45e: 785b ldrb r3, [r3, #1]
800a460: 021b lsls r3, r3, #8
tmpreg = (((uint32_t)(sAlarm->AlarmTime.Hours) << 16) | \
800a462: 4313 orrs r3, r2
((uint32_t) sAlarm->AlarmTime.Seconds) | \
800a464: 68ba ldr r2, [r7, #8]
800a466: 7892 ldrb r2, [r2, #2]
((uint32_t)(sAlarm->AlarmTime.Minutes) << 8) | \
800a468: 431a orrs r2, r3
((uint32_t)(sAlarm->AlarmTime.TimeFormat) << 16) | \
800a46a: 68bb ldr r3, [r7, #8]
800a46c: 7b1b ldrb r3, [r3, #12]
800a46e: 041b lsls r3, r3, #16
((uint32_t) sAlarm->AlarmTime.Seconds) | \
800a470: 431a orrs r2, r3
((uint32_t)(sAlarm->AlarmDateWeekDay) << 24) | \
800a472: 68bb ldr r3, [r7, #8]
800a474: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
800a478: 061b lsls r3, r3, #24
((uint32_t)(sAlarm->AlarmTime.TimeFormat) << 16) | \
800a47a: 431a orrs r2, r3
((uint32_t)sAlarm->AlarmDateWeekDaySel) | \
800a47c: 68bb ldr r3, [r7, #8]
800a47e: 6a1b ldr r3, [r3, #32]
((uint32_t)(sAlarm->AlarmDateWeekDay) << 24) | \
800a480: 431a orrs r2, r3
((uint32_t)sAlarm->AlarmMask));
800a482: 68bb ldr r3, [r7, #8]
800a484: 699b ldr r3, [r3, #24]
tmpreg = (((uint32_t)(sAlarm->AlarmTime.Hours) << 16) | \
800a486: 4313 orrs r3, r2
800a488: 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));
800a48a: 68bb ldr r3, [r7, #8]
800a48c: 685a ldr r2, [r3, #4]
800a48e: 68bb ldr r3, [r7, #8]
800a490: 69db ldr r3, [r3, #28]
800a492: 4313 orrs r3, r2
800a494: 617b str r3, [r7, #20]
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800a496: 68fb ldr r3, [r7, #12]
800a498: 681b ldr r3, [r3, #0]
800a49a: 22ca movs r2, #202 ; 0xca
800a49c: 625a str r2, [r3, #36] ; 0x24
800a49e: 68fb ldr r3, [r7, #12]
800a4a0: 681b ldr r3, [r3, #0]
800a4a2: 2253 movs r2, #83 ; 0x53
800a4a4: 625a str r2, [r3, #36] ; 0x24
/* Configure the Alarm register */
if(sAlarm->Alarm == RTC_ALARM_A)
800a4a6: 68bb ldr r3, [r7, #8]
800a4a8: 6a9b ldr r3, [r3, #40] ; 0x28
800a4aa: f5b3 7f80 cmp.w r3, #256 ; 0x100
800a4ae: d13f bne.n 800a530 <HAL_RTC_SetAlarm+0x194>
{
/* Disable the Alarm A interrupt */
__HAL_RTC_ALARMA_DISABLE(hrtc);
800a4b0: 68fb ldr r3, [r7, #12]
800a4b2: 681b ldr r3, [r3, #0]
800a4b4: 689a ldr r2, [r3, #8]
800a4b6: 68fb ldr r3, [r7, #12]
800a4b8: 681b ldr r3, [r3, #0]
800a4ba: f422 7280 bic.w r2, r2, #256 ; 0x100
800a4be: 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);
800a4c0: 68fb ldr r3, [r7, #12]
800a4c2: 681b ldr r3, [r3, #0]
800a4c4: 689a ldr r2, [r3, #8]
800a4c6: 68fb ldr r3, [r7, #12]
800a4c8: 681b ldr r3, [r3, #0]
800a4ca: f422 5280 bic.w r2, r2, #4096 ; 0x1000
800a4ce: 609a str r2, [r3, #8]
/* Get tick */
tickstart = HAL_GetTick();
800a4d0: f7fa fbe4 bl 8004c9c <HAL_GetTick>
800a4d4: 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)
800a4d6: e013 b.n 800a500 <HAL_RTC_SetAlarm+0x164>
{
if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
800a4d8: f7fa fbe0 bl 8004c9c <HAL_GetTick>
800a4dc: 4602 mov r2, r0
800a4de: 69bb ldr r3, [r7, #24]
800a4e0: 1ad3 subs r3, r2, r3
800a4e2: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800a4e6: d90b bls.n 800a500 <HAL_RTC_SetAlarm+0x164>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a4e8: 68fb ldr r3, [r7, #12]
800a4ea: 681b ldr r3, [r3, #0]
800a4ec: 22ff movs r2, #255 ; 0xff
800a4ee: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_TIMEOUT;
800a4f0: 68fb ldr r3, [r7, #12]
800a4f2: 2203 movs r2, #3
800a4f4: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a4f6: 68fb ldr r3, [r7, #12]
800a4f8: 2200 movs r2, #0
800a4fa: 771a strb r2, [r3, #28]
return HAL_TIMEOUT;
800a4fc: 2303 movs r3, #3
800a4fe: e061 b.n 800a5c4 <HAL_RTC_SetAlarm+0x228>
while(__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAWF) == RESET)
800a500: 68fb ldr r3, [r7, #12]
800a502: 681b ldr r3, [r3, #0]
800a504: 68db ldr r3, [r3, #12]
800a506: f003 0301 and.w r3, r3, #1
800a50a: 2b00 cmp r3, #0
800a50c: d0e4 beq.n 800a4d8 <HAL_RTC_SetAlarm+0x13c>
}
}
hrtc->Instance->ALRMAR = (uint32_t)tmpreg;
800a50e: 68fb ldr r3, [r7, #12]
800a510: 681b ldr r3, [r3, #0]
800a512: 69fa ldr r2, [r7, #28]
800a514: 61da str r2, [r3, #28]
/* Configure the Alarm A Sub Second register */
hrtc->Instance->ALRMASSR = subsecondtmpreg;
800a516: 68fb ldr r3, [r7, #12]
800a518: 681b ldr r3, [r3, #0]
800a51a: 697a ldr r2, [r7, #20]
800a51c: 645a str r2, [r3, #68] ; 0x44
/* Configure the Alarm state: Enable Alarm */
__HAL_RTC_ALARMA_ENABLE(hrtc);
800a51e: 68fb ldr r3, [r7, #12]
800a520: 681b ldr r3, [r3, #0]
800a522: 689a ldr r2, [r3, #8]
800a524: 68fb ldr r3, [r7, #12]
800a526: 681b ldr r3, [r3, #0]
800a528: f442 7280 orr.w r2, r2, #256 ; 0x100
800a52c: 609a str r2, [r3, #8]
800a52e: e03e b.n 800a5ae <HAL_RTC_SetAlarm+0x212>
}
else
{
/* Disable the Alarm B interrupt */
__HAL_RTC_ALARMB_DISABLE(hrtc);
800a530: 68fb ldr r3, [r7, #12]
800a532: 681b ldr r3, [r3, #0]
800a534: 689a ldr r2, [r3, #8]
800a536: 68fb ldr r3, [r7, #12]
800a538: 681b ldr r3, [r3, #0]
800a53a: f422 7200 bic.w r2, r2, #512 ; 0x200
800a53e: 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);
800a540: 68fb ldr r3, [r7, #12]
800a542: 681b ldr r3, [r3, #0]
800a544: 689a ldr r2, [r3, #8]
800a546: 68fb ldr r3, [r7, #12]
800a548: 681b ldr r3, [r3, #0]
800a54a: f422 5200 bic.w r2, r2, #8192 ; 0x2000
800a54e: 609a str r2, [r3, #8]
/* Get tick */
tickstart = HAL_GetTick();
800a550: f7fa fba4 bl 8004c9c <HAL_GetTick>
800a554: 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)
800a556: e013 b.n 800a580 <HAL_RTC_SetAlarm+0x1e4>
{
if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
800a558: f7fa fba0 bl 8004c9c <HAL_GetTick>
800a55c: 4602 mov r2, r0
800a55e: 69bb ldr r3, [r7, #24]
800a560: 1ad3 subs r3, r2, r3
800a562: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800a566: d90b bls.n 800a580 <HAL_RTC_SetAlarm+0x1e4>
{
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a568: 68fb ldr r3, [r7, #12]
800a56a: 681b ldr r3, [r3, #0]
800a56c: 22ff movs r2, #255 ; 0xff
800a56e: 625a str r2, [r3, #36] ; 0x24
hrtc->State = HAL_RTC_STATE_TIMEOUT;
800a570: 68fb ldr r3, [r7, #12]
800a572: 2203 movs r2, #3
800a574: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a576: 68fb ldr r3, [r7, #12]
800a578: 2200 movs r2, #0
800a57a: 771a strb r2, [r3, #28]
return HAL_TIMEOUT;
800a57c: 2303 movs r3, #3
800a57e: e021 b.n 800a5c4 <HAL_RTC_SetAlarm+0x228>
while(__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBWF) == RESET)
800a580: 68fb ldr r3, [r7, #12]
800a582: 681b ldr r3, [r3, #0]
800a584: 68db ldr r3, [r3, #12]
800a586: f003 0302 and.w r3, r3, #2
800a58a: 2b00 cmp r3, #0
800a58c: d0e4 beq.n 800a558 <HAL_RTC_SetAlarm+0x1bc>
}
}
hrtc->Instance->ALRMBR = (uint32_t)tmpreg;
800a58e: 68fb ldr r3, [r7, #12]
800a590: 681b ldr r3, [r3, #0]
800a592: 69fa ldr r2, [r7, #28]
800a594: 621a str r2, [r3, #32]
/* Configure the Alarm B Sub Second register */
hrtc->Instance->ALRMBSSR = subsecondtmpreg;
800a596: 68fb ldr r3, [r7, #12]
800a598: 681b ldr r3, [r3, #0]
800a59a: 697a ldr r2, [r7, #20]
800a59c: 649a str r2, [r3, #72] ; 0x48
/* Configure the Alarm state: Enable Alarm */
__HAL_RTC_ALARMB_ENABLE(hrtc);
800a59e: 68fb ldr r3, [r7, #12]
800a5a0: 681b ldr r3, [r3, #0]
800a5a2: 689a ldr r2, [r3, #8]
800a5a4: 68fb ldr r3, [r7, #12]
800a5a6: 681b ldr r3, [r3, #0]
800a5a8: f442 7200 orr.w r2, r2, #512 ; 0x200
800a5ac: 609a str r2, [r3, #8]
}
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a5ae: 68fb ldr r3, [r7, #12]
800a5b0: 681b ldr r3, [r3, #0]
800a5b2: 22ff movs r2, #255 ; 0xff
800a5b4: 625a str r2, [r3, #36] ; 0x24
/* Change RTC state */
hrtc->State = HAL_RTC_STATE_READY;
800a5b6: 68fb ldr r3, [r7, #12]
800a5b8: 2201 movs r2, #1
800a5ba: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a5bc: 68fb ldr r3, [r7, #12]
800a5be: 2200 movs r2, #0
800a5c0: 771a strb r2, [r3, #28]
return HAL_OK;
800a5c2: 2300 movs r3, #0
}
800a5c4: 4618 mov r0, r3
800a5c6: 3724 adds r7, #36 ; 0x24
800a5c8: 46bd mov sp, r7
800a5ca: bd90 pop {r4, r7, pc}
0800a5cc <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)
{
800a5cc: b580 push {r7, lr}
800a5ce: b084 sub sp, #16
800a5d0: af00 add r7, sp, #0
800a5d2: 6078 str r0, [r7, #4]
uint32_t tickstart = 0;
800a5d4: 2300 movs r3, #0
800a5d6: 60fb str r3, [r7, #12]
/* Clear RSF flag */
hrtc->Instance->ISR &= (uint32_t)RTC_RSF_MASK;
800a5d8: 687b ldr r3, [r7, #4]
800a5da: 681b ldr r3, [r3, #0]
800a5dc: 68da ldr r2, [r3, #12]
800a5de: 687b ldr r3, [r7, #4]
800a5e0: 681b ldr r3, [r3, #0]
800a5e2: f022 02a0 bic.w r2, r2, #160 ; 0xa0
800a5e6: 60da str r2, [r3, #12]
/* Get tick */
tickstart = HAL_GetTick();
800a5e8: f7fa fb58 bl 8004c9c <HAL_GetTick>
800a5ec: 60f8 str r0, [r7, #12]
/* Wait the registers to be synchronised */
while((hrtc->Instance->ISR & RTC_ISR_RSF) == (uint32_t)RESET)
800a5ee: e009 b.n 800a604 <HAL_RTC_WaitForSynchro+0x38>
{
if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
800a5f0: f7fa fb54 bl 8004c9c <HAL_GetTick>
800a5f4: 4602 mov r2, r0
800a5f6: 68fb ldr r3, [r7, #12]
800a5f8: 1ad3 subs r3, r2, r3
800a5fa: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800a5fe: d901 bls.n 800a604 <HAL_RTC_WaitForSynchro+0x38>
{
return HAL_TIMEOUT;
800a600: 2303 movs r3, #3
800a602: e007 b.n 800a614 <HAL_RTC_WaitForSynchro+0x48>
while((hrtc->Instance->ISR & RTC_ISR_RSF) == (uint32_t)RESET)
800a604: 687b ldr r3, [r7, #4]
800a606: 681b ldr r3, [r3, #0]
800a608: 68db ldr r3, [r3, #12]
800a60a: f003 0320 and.w r3, r3, #32
800a60e: 2b00 cmp r3, #0
800a610: d0ee beq.n 800a5f0 <HAL_RTC_WaitForSynchro+0x24>
}
}
return HAL_OK;
800a612: 2300 movs r3, #0
}
800a614: 4618 mov r0, r3
800a616: 3710 adds r7, #16
800a618: 46bd mov sp, r7
800a61a: bd80 pop {r7, pc}
0800a61c <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)
{
800a61c: b580 push {r7, lr}
800a61e: b084 sub sp, #16
800a620: af00 add r7, sp, #0
800a622: 6078 str r0, [r7, #4]
uint32_t tickstart = 0;
800a624: 2300 movs r3, #0
800a626: 60fb str r3, [r7, #12]
/* Check if the Initialization mode is set */
if((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
800a628: 687b ldr r3, [r7, #4]
800a62a: 681b ldr r3, [r3, #0]
800a62c: 68db ldr r3, [r3, #12]
800a62e: f003 0340 and.w r3, r3, #64 ; 0x40
800a632: 2b00 cmp r3, #0
800a634: d119 bne.n 800a66a <RTC_EnterInitMode+0x4e>
{
/* Set the Initialization mode */
hrtc->Instance->ISR = (uint32_t)RTC_INIT_MASK;
800a636: 687b ldr r3, [r7, #4]
800a638: 681b ldr r3, [r3, #0]
800a63a: f04f 32ff mov.w r2, #4294967295
800a63e: 60da str r2, [r3, #12]
/* Get tick */
tickstart = HAL_GetTick();
800a640: f7fa fb2c bl 8004c9c <HAL_GetTick>
800a644: 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)
800a646: e009 b.n 800a65c <RTC_EnterInitMode+0x40>
{
if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
800a648: f7fa fb28 bl 8004c9c <HAL_GetTick>
800a64c: 4602 mov r2, r0
800a64e: 68fb ldr r3, [r7, #12]
800a650: 1ad3 subs r3, r2, r3
800a652: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800a656: d901 bls.n 800a65c <RTC_EnterInitMode+0x40>
{
return HAL_TIMEOUT;
800a658: 2303 movs r3, #3
800a65a: e007 b.n 800a66c <RTC_EnterInitMode+0x50>
while((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
800a65c: 687b ldr r3, [r7, #4]
800a65e: 681b ldr r3, [r3, #0]
800a660: 68db ldr r3, [r3, #12]
800a662: f003 0340 and.w r3, r3, #64 ; 0x40
800a666: 2b00 cmp r3, #0
800a668: d0ee beq.n 800a648 <RTC_EnterInitMode+0x2c>
}
}
}
return HAL_OK;
800a66a: 2300 movs r3, #0
}
800a66c: 4618 mov r0, r3
800a66e: 3710 adds r7, #16
800a670: 46bd mov sp, r7
800a672: bd80 pop {r7, pc}
0800a674 <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)
{
800a674: b480 push {r7}
800a676: b085 sub sp, #20
800a678: af00 add r7, sp, #0
800a67a: 4603 mov r3, r0
800a67c: 71fb strb r3, [r7, #7]
uint32_t bcdhigh = 0;
800a67e: 2300 movs r3, #0
800a680: 60fb str r3, [r7, #12]
while(Value >= 10)
800a682: e005 b.n 800a690 <RTC_ByteToBcd2+0x1c>
{
bcdhigh++;
800a684: 68fb ldr r3, [r7, #12]
800a686: 3301 adds r3, #1
800a688: 60fb str r3, [r7, #12]
Value -= 10;
800a68a: 79fb ldrb r3, [r7, #7]
800a68c: 3b0a subs r3, #10
800a68e: 71fb strb r3, [r7, #7]
while(Value >= 10)
800a690: 79fb ldrb r3, [r7, #7]
800a692: 2b09 cmp r3, #9
800a694: d8f6 bhi.n 800a684 <RTC_ByteToBcd2+0x10>
}
return ((uint8_t)(bcdhigh << 4) | Value);
800a696: 68fb ldr r3, [r7, #12]
800a698: b2db uxtb r3, r3
800a69a: 011b lsls r3, r3, #4
800a69c: b2da uxtb r2, r3
800a69e: 79fb ldrb r3, [r7, #7]
800a6a0: 4313 orrs r3, r2
800a6a2: b2db uxtb r3, r3
}
800a6a4: 4618 mov r0, r3
800a6a6: 3714 adds r7, #20
800a6a8: 46bd mov sp, r7
800a6aa: f85d 7b04 ldr.w r7, [sp], #4
800a6ae: 4770 bx lr
0800a6b0 <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)
{
800a6b0: b480 push {r7}
800a6b2: b087 sub sp, #28
800a6b4: af00 add r7, sp, #0
800a6b6: 60f8 str r0, [r7, #12]
800a6b8: 60b9 str r1, [r7, #8]
800a6ba: 607a str r2, [r7, #4]
uint32_t tmpreg = 0;
800a6bc: 2300 movs r3, #0
800a6be: 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);
800a6c0: 68fb ldr r3, [r7, #12]
800a6c2: 7f1b ldrb r3, [r3, #28]
800a6c4: 2b01 cmp r3, #1
800a6c6: d101 bne.n 800a6cc <HAL_RTCEx_SetTimeStamp+0x1c>
800a6c8: 2302 movs r3, #2
800a6ca: e03e b.n 800a74a <HAL_RTCEx_SetTimeStamp+0x9a>
800a6cc: 68fb ldr r3, [r7, #12]
800a6ce: 2201 movs r2, #1
800a6d0: 771a strb r2, [r3, #28]
hrtc->State = HAL_RTC_STATE_BUSY;
800a6d2: 68fb ldr r3, [r7, #12]
800a6d4: 2202 movs r2, #2
800a6d6: 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));
800a6d8: 68fb ldr r3, [r7, #12]
800a6da: 681b ldr r3, [r3, #0]
800a6dc: 689a ldr r2, [r3, #8]
800a6de: 4b1e ldr r3, [pc, #120] ; (800a758 <HAL_RTCEx_SetTimeStamp+0xa8>)
800a6e0: 4013 ands r3, r2
800a6e2: 617b str r3, [r7, #20]
tmpreg|= TimeStampEdge;
800a6e4: 697a ldr r2, [r7, #20]
800a6e6: 68bb ldr r3, [r7, #8]
800a6e8: 4313 orrs r3, r2
800a6ea: 617b str r3, [r7, #20]
/* Disable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
800a6ec: 68fb ldr r3, [r7, #12]
800a6ee: 681b ldr r3, [r3, #0]
800a6f0: 22ca movs r2, #202 ; 0xca
800a6f2: 625a str r2, [r3, #36] ; 0x24
800a6f4: 68fb ldr r3, [r7, #12]
800a6f6: 681b ldr r3, [r3, #0]
800a6f8: 2253 movs r2, #83 ; 0x53
800a6fa: 625a str r2, [r3, #36] ; 0x24
hrtc->Instance->OR &= (uint32_t)~RTC_OR_TSINSEL;
800a6fc: 68fb ldr r3, [r7, #12]
800a6fe: 681b ldr r3, [r3, #0]
800a700: 6cda ldr r2, [r3, #76] ; 0x4c
800a702: 68fb ldr r3, [r7, #12]
800a704: 681b ldr r3, [r3, #0]
800a706: f022 0206 bic.w r2, r2, #6
800a70a: 64da str r2, [r3, #76] ; 0x4c
hrtc->Instance->OR |= (uint32_t)(RTC_TimeStampPin);
800a70c: 68fb ldr r3, [r7, #12]
800a70e: 681b ldr r3, [r3, #0]
800a710: 6cd9 ldr r1, [r3, #76] ; 0x4c
800a712: 68fb ldr r3, [r7, #12]
800a714: 681b ldr r3, [r3, #0]
800a716: 687a ldr r2, [r7, #4]
800a718: 430a orrs r2, r1
800a71a: 64da str r2, [r3, #76] ; 0x4c
/* Configure the Time Stamp TSEDGE and Enable bits */
hrtc->Instance->CR = (uint32_t)tmpreg;
800a71c: 68fb ldr r3, [r7, #12]
800a71e: 681b ldr r3, [r3, #0]
800a720: 697a ldr r2, [r7, #20]
800a722: 609a str r2, [r3, #8]
__HAL_RTC_TIMESTAMP_ENABLE(hrtc);
800a724: 68fb ldr r3, [r7, #12]
800a726: 681b ldr r3, [r3, #0]
800a728: 689a ldr r2, [r3, #8]
800a72a: 68fb ldr r3, [r7, #12]
800a72c: 681b ldr r3, [r3, #0]
800a72e: f442 6200 orr.w r2, r2, #2048 ; 0x800
800a732: 609a str r2, [r3, #8]
/* Enable the write protection for RTC registers */
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
800a734: 68fb ldr r3, [r7, #12]
800a736: 681b ldr r3, [r3, #0]
800a738: 22ff movs r2, #255 ; 0xff
800a73a: 625a str r2, [r3, #36] ; 0x24
/* Change RTC state */
hrtc->State = HAL_RTC_STATE_READY;
800a73c: 68fb ldr r3, [r7, #12]
800a73e: 2201 movs r2, #1
800a740: 775a strb r2, [r3, #29]
/* Process Unlocked */
__HAL_UNLOCK(hrtc);
800a742: 68fb ldr r3, [r7, #12]
800a744: 2200 movs r2, #0
800a746: 771a strb r2, [r3, #28]
return HAL_OK;
800a748: 2300 movs r3, #0
}
800a74a: 4618 mov r0, r3
800a74c: 371c adds r7, #28
800a74e: 46bd mov sp, r7
800a750: f85d 7b04 ldr.w r7, [sp], #4
800a754: 4770 bx lr
800a756: bf00 nop
800a758: fffff7f7 .word 0xfffff7f7
0800a75c <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)
{
800a75c: b580 push {r7, lr}
800a75e: b082 sub sp, #8
800a760: af00 add r7, sp, #0
800a762: 6078 str r0, [r7, #4]
800a764: 6039 str r1, [r7, #0]
/* Check the SDRAM handle parameter */
if(hsdram == NULL)
800a766: 687b ldr r3, [r7, #4]
800a768: 2b00 cmp r3, #0
800a76a: d101 bne.n 800a770 <HAL_SDRAM_Init+0x14>
{
return HAL_ERROR;
800a76c: 2301 movs r3, #1
800a76e: e025 b.n 800a7bc <HAL_SDRAM_Init+0x60>
}
if(hsdram->State == HAL_SDRAM_STATE_RESET)
800a770: 687b ldr r3, [r7, #4]
800a772: f893 302c ldrb.w r3, [r3, #44] ; 0x2c
800a776: b2db uxtb r3, r3
800a778: 2b00 cmp r3, #0
800a77a: d106 bne.n 800a78a <HAL_SDRAM_Init+0x2e>
{
/* Allocate lock resource and initialize it */
hsdram->Lock = HAL_UNLOCKED;
800a77c: 687b ldr r3, [r7, #4]
800a77e: 2200 movs r2, #0
800a780: 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);
800a784: 6878 ldr r0, [r7, #4]
800a786: f7fa f8e9 bl 800495c <HAL_SDRAM_MspInit>
#endif
}
/* Initialize the SDRAM controller state */
hsdram->State = HAL_SDRAM_STATE_BUSY;
800a78a: 687b ldr r3, [r7, #4]
800a78c: 2202 movs r2, #2
800a78e: f883 202c strb.w r2, [r3, #44] ; 0x2c
/* Initialize SDRAM control Interface */
FMC_SDRAM_Init(hsdram->Instance, &(hsdram->Init));
800a792: 687b ldr r3, [r7, #4]
800a794: 681a ldr r2, [r3, #0]
800a796: 687b ldr r3, [r7, #4]
800a798: 3304 adds r3, #4
800a79a: 4619 mov r1, r3
800a79c: 4610 mov r0, r2
800a79e: f001 fe61 bl 800c464 <FMC_SDRAM_Init>
/* Initialize SDRAM timing Interface */
FMC_SDRAM_Timing_Init(hsdram->Instance, Timing, hsdram->Init.SDBank);
800a7a2: 687b ldr r3, [r7, #4]
800a7a4: 6818 ldr r0, [r3, #0]
800a7a6: 687b ldr r3, [r7, #4]
800a7a8: 685b ldr r3, [r3, #4]
800a7aa: 461a mov r2, r3
800a7ac: 6839 ldr r1, [r7, #0]
800a7ae: f001 fecb bl 800c548 <FMC_SDRAM_Timing_Init>
/* Update the SDRAM controller state */
hsdram->State = HAL_SDRAM_STATE_READY;
800a7b2: 687b ldr r3, [r7, #4]
800a7b4: 2201 movs r2, #1
800a7b6: f883 202c strb.w r2, [r3, #44] ; 0x2c
return HAL_OK;
800a7ba: 2300 movs r3, #0
}
800a7bc: 4618 mov r0, r3
800a7be: 3708 adds r7, #8
800a7c0: 46bd mov sp, r7
800a7c2: bd80 pop {r7, pc}
0800a7c4 <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)
{
800a7c4: b580 push {r7, lr}
800a7c6: b084 sub sp, #16
800a7c8: af00 add r7, sp, #0
800a7ca: 60f8 str r0, [r7, #12]
800a7cc: 60b9 str r1, [r7, #8]
800a7ce: 607a str r2, [r7, #4]
/* Check the SDRAM controller state */
if(hsdram->State == HAL_SDRAM_STATE_BUSY)
800a7d0: 68fb ldr r3, [r7, #12]
800a7d2: f893 302c ldrb.w r3, [r3, #44] ; 0x2c
800a7d6: b2db uxtb r3, r3
800a7d8: 2b02 cmp r3, #2
800a7da: d101 bne.n 800a7e0 <HAL_SDRAM_SendCommand+0x1c>
{
return HAL_BUSY;
800a7dc: 2302 movs r3, #2
800a7de: e018 b.n 800a812 <HAL_SDRAM_SendCommand+0x4e>
}
/* Update the SDRAM state */
hsdram->State = HAL_SDRAM_STATE_BUSY;
800a7e0: 68fb ldr r3, [r7, #12]
800a7e2: 2202 movs r2, #2
800a7e4: f883 202c strb.w r2, [r3, #44] ; 0x2c
/* Send SDRAM command */
FMC_SDRAM_SendCommand(hsdram->Instance, Command, Timeout);
800a7e8: 68fb ldr r3, [r7, #12]
800a7ea: 681b ldr r3, [r3, #0]
800a7ec: 687a ldr r2, [r7, #4]
800a7ee: 68b9 ldr r1, [r7, #8]
800a7f0: 4618 mov r0, r3
800a7f2: f001 ff29 bl 800c648 <FMC_SDRAM_SendCommand>
/* Update the SDRAM controller state state */
if(Command->CommandMode == FMC_SDRAM_CMD_PALL)
800a7f6: 68bb ldr r3, [r7, #8]
800a7f8: 681b ldr r3, [r3, #0]
800a7fa: 2b02 cmp r3, #2
800a7fc: d104 bne.n 800a808 <HAL_SDRAM_SendCommand+0x44>
{
hsdram->State = HAL_SDRAM_STATE_PRECHARGED;
800a7fe: 68fb ldr r3, [r7, #12]
800a800: 2205 movs r2, #5
800a802: f883 202c strb.w r2, [r3, #44] ; 0x2c
800a806: e003 b.n 800a810 <HAL_SDRAM_SendCommand+0x4c>
}
else
{
hsdram->State = HAL_SDRAM_STATE_READY;
800a808: 68fb ldr r3, [r7, #12]
800a80a: 2201 movs r2, #1
800a80c: f883 202c strb.w r2, [r3, #44] ; 0x2c
}
return HAL_OK;
800a810: 2300 movs r3, #0
}
800a812: 4618 mov r0, r3
800a814: 3710 adds r7, #16
800a816: 46bd mov sp, r7
800a818: bd80 pop {r7, pc}
0800a81a <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)
{
800a81a: b580 push {r7, lr}
800a81c: b082 sub sp, #8
800a81e: af00 add r7, sp, #0
800a820: 6078 str r0, [r7, #4]
800a822: 6039 str r1, [r7, #0]
/* Check the SDRAM controller state */
if(hsdram->State == HAL_SDRAM_STATE_BUSY)
800a824: 687b ldr r3, [r7, #4]
800a826: f893 302c ldrb.w r3, [r3, #44] ; 0x2c
800a82a: b2db uxtb r3, r3
800a82c: 2b02 cmp r3, #2
800a82e: d101 bne.n 800a834 <HAL_SDRAM_ProgramRefreshRate+0x1a>
{
return HAL_BUSY;
800a830: 2302 movs r3, #2
800a832: e00e b.n 800a852 <HAL_SDRAM_ProgramRefreshRate+0x38>
}
/* Update the SDRAM state */
hsdram->State = HAL_SDRAM_STATE_BUSY;
800a834: 687b ldr r3, [r7, #4]
800a836: 2202 movs r2, #2
800a838: f883 202c strb.w r2, [r3, #44] ; 0x2c
/* Program the refresh rate */
FMC_SDRAM_ProgramRefreshRate(hsdram->Instance ,RefreshRate);
800a83c: 687b ldr r3, [r7, #4]
800a83e: 681b ldr r3, [r3, #0]
800a840: 6839 ldr r1, [r7, #0]
800a842: 4618 mov r0, r3
800a844: f001 ff21 bl 800c68a <FMC_SDRAM_ProgramRefreshRate>
/* Update the SDRAM state */
hsdram->State = HAL_SDRAM_STATE_READY;
800a848: 687b ldr r3, [r7, #4]
800a84a: 2201 movs r2, #1
800a84c: f883 202c strb.w r2, [r3, #44] ; 0x2c
return HAL_OK;
800a850: 2300 movs r3, #0
}
800a852: 4618 mov r0, r3
800a854: 3708 adds r7, #8
800a856: 46bd mov sp, r7
800a858: bd80 pop {r7, pc}
0800a85a <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)
{
800a85a: b580 push {r7, lr}
800a85c: b084 sub sp, #16
800a85e: af00 add r7, sp, #0
800a860: 6078 str r0, [r7, #4]
uint32_t frxth;
/* Check the SPI handle allocation */
if (hspi == NULL)
800a862: 687b ldr r3, [r7, #4]
800a864: 2b00 cmp r3, #0
800a866: d101 bne.n 800a86c <HAL_SPI_Init+0x12>
{
return HAL_ERROR;
800a868: 2301 movs r3, #1
800a86a: e084 b.n 800a976 <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;
800a86c: 687b ldr r3, [r7, #4]
800a86e: 2200 movs r2, #0
800a870: 629a str r2, [r3, #40] ; 0x28
#endif /* USE_SPI_CRC */
if (hspi->State == HAL_SPI_STATE_RESET)
800a872: 687b ldr r3, [r7, #4]
800a874: f893 305d ldrb.w r3, [r3, #93] ; 0x5d
800a878: b2db uxtb r3, r3
800a87a: 2b00 cmp r3, #0
800a87c: d106 bne.n 800a88c <HAL_SPI_Init+0x32>
{
/* Allocate lock resource and initialize it */
hspi->Lock = HAL_UNLOCKED;
800a87e: 687b ldr r3, [r7, #4]
800a880: 2200 movs r2, #0
800a882: 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);
800a886: 6878 ldr r0, [r7, #4]
800a888: f7f9 fdd4 bl 8004434 <HAL_SPI_MspInit>
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
}
hspi->State = HAL_SPI_STATE_BUSY;
800a88c: 687b ldr r3, [r7, #4]
800a88e: 2202 movs r2, #2
800a890: f883 205d strb.w r2, [r3, #93] ; 0x5d
/* Disable the selected SPI peripheral */
__HAL_SPI_DISABLE(hspi);
800a894: 687b ldr r3, [r7, #4]
800a896: 681b ldr r3, [r3, #0]
800a898: 681a ldr r2, [r3, #0]
800a89a: 687b ldr r3, [r7, #4]
800a89c: 681b ldr r3, [r3, #0]
800a89e: f022 0240 bic.w r2, r2, #64 ; 0x40
800a8a2: 601a str r2, [r3, #0]
/* Align by default the rs fifo threshold on the data size */
if (hspi->Init.DataSize > SPI_DATASIZE_8BIT)
800a8a4: 687b ldr r3, [r7, #4]
800a8a6: 68db ldr r3, [r3, #12]
800a8a8: f5b3 6fe0 cmp.w r3, #1792 ; 0x700
800a8ac: d902 bls.n 800a8b4 <HAL_SPI_Init+0x5a>
{
frxth = SPI_RXFIFO_THRESHOLD_HF;
800a8ae: 2300 movs r3, #0
800a8b0: 60fb str r3, [r7, #12]
800a8b2: e002 b.n 800a8ba <HAL_SPI_Init+0x60>
}
else
{
frxth = SPI_RXFIFO_THRESHOLD_QF;
800a8b4: f44f 5380 mov.w r3, #4096 ; 0x1000
800a8b8: 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))
800a8ba: 687b ldr r3, [r7, #4]
800a8bc: 68db ldr r3, [r3, #12]
800a8be: f5b3 6f70 cmp.w r3, #3840 ; 0xf00
800a8c2: d007 beq.n 800a8d4 <HAL_SPI_Init+0x7a>
800a8c4: 687b ldr r3, [r7, #4]
800a8c6: 68db ldr r3, [r3, #12]
800a8c8: f5b3 6fe0 cmp.w r3, #1792 ; 0x700
800a8cc: d002 beq.n 800a8d4 <HAL_SPI_Init+0x7a>
{
/* CRC must be disabled */
hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
800a8ce: 687b ldr r3, [r7, #4]
800a8d0: 2200 movs r2, #0
800a8d2: 629a str r2, [r3, #40] ; 0x28
}
/* Align the CRC Length on the data size */
if (hspi->Init.CRCLength == SPI_CRC_LENGTH_DATASIZE)
800a8d4: 687b ldr r3, [r7, #4]
800a8d6: 6b1b ldr r3, [r3, #48] ; 0x30
800a8d8: 2b00 cmp r3, #0
800a8da: d10b bne.n 800a8f4 <HAL_SPI_Init+0x9a>
{
/* CRC Length aligned on the data size : value set by default */
if (hspi->Init.DataSize > SPI_DATASIZE_8BIT)
800a8dc: 687b ldr r3, [r7, #4]
800a8de: 68db ldr r3, [r3, #12]
800a8e0: f5b3 6fe0 cmp.w r3, #1792 ; 0x700
800a8e4: d903 bls.n 800a8ee <HAL_SPI_Init+0x94>
{
hspi->Init.CRCLength = SPI_CRC_LENGTH_16BIT;
800a8e6: 687b ldr r3, [r7, #4]
800a8e8: 2202 movs r2, #2
800a8ea: 631a str r2, [r3, #48] ; 0x30
800a8ec: e002 b.n 800a8f4 <HAL_SPI_Init+0x9a>
}
else
{
hspi->Init.CRCLength = SPI_CRC_LENGTH_8BIT;
800a8ee: 687b ldr r3, [r7, #4]
800a8f0: 2201 movs r2, #1
800a8f2: 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 |
800a8f4: 687b ldr r3, [r7, #4]
800a8f6: 685a ldr r2, [r3, #4]
800a8f8: 687b ldr r3, [r7, #4]
800a8fa: 689b ldr r3, [r3, #8]
800a8fc: 431a orrs r2, r3
800a8fe: 687b ldr r3, [r7, #4]
800a900: 691b ldr r3, [r3, #16]
800a902: 431a orrs r2, r3
800a904: 687b ldr r3, [r7, #4]
800a906: 695b ldr r3, [r3, #20]
800a908: 431a orrs r2, r3
800a90a: 687b ldr r3, [r7, #4]
800a90c: 699b ldr r3, [r3, #24]
800a90e: f403 7300 and.w r3, r3, #512 ; 0x200
800a912: 431a orrs r2, r3
800a914: 687b ldr r3, [r7, #4]
800a916: 69db ldr r3, [r3, #28]
800a918: 431a orrs r2, r3
800a91a: 687b ldr r3, [r7, #4]
800a91c: 6a1b ldr r3, [r3, #32]
800a91e: ea42 0103 orr.w r1, r2, r3
800a922: 687b ldr r3, [r7, #4]
800a924: 6a9a ldr r2, [r3, #40] ; 0x28
800a926: 687b ldr r3, [r7, #4]
800a928: 681b ldr r3, [r3, #0]
800a92a: 430a orrs r2, r1
800a92c: 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 |
800a92e: 687b ldr r3, [r7, #4]
800a930: 699b ldr r3, [r3, #24]
800a932: 0c1b lsrs r3, r3, #16
800a934: f003 0204 and.w r2, r3, #4
800a938: 687b ldr r3, [r7, #4]
800a93a: 6a5b ldr r3, [r3, #36] ; 0x24
800a93c: 431a orrs r2, r3
800a93e: 687b ldr r3, [r7, #4]
800a940: 6b5b ldr r3, [r3, #52] ; 0x34
800a942: 431a orrs r2, r3
800a944: 687b ldr r3, [r7, #4]
800a946: 68db ldr r3, [r3, #12]
800a948: ea42 0103 orr.w r1, r2, r3
800a94c: 687b ldr r3, [r7, #4]
800a94e: 681b ldr r3, [r3, #0]
800a950: 68fa ldr r2, [r7, #12]
800a952: 430a orrs r2, r1
800a954: 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);
800a956: 687b ldr r3, [r7, #4]
800a958: 681b ldr r3, [r3, #0]
800a95a: 69da ldr r2, [r3, #28]
800a95c: 687b ldr r3, [r7, #4]
800a95e: 681b ldr r3, [r3, #0]
800a960: f422 6200 bic.w r2, r2, #2048 ; 0x800
800a964: 61da str r2, [r3, #28]
#endif /* SPI_I2SCFGR_I2SMOD */
hspi->ErrorCode = HAL_SPI_ERROR_NONE;
800a966: 687b ldr r3, [r7, #4]
800a968: 2200 movs r2, #0
800a96a: 661a str r2, [r3, #96] ; 0x60
hspi->State = HAL_SPI_STATE_READY;
800a96c: 687b ldr r3, [r7, #4]
800a96e: 2201 movs r2, #1
800a970: f883 205d strb.w r2, [r3, #93] ; 0x5d
return HAL_OK;
800a974: 2300 movs r3, #0
}
800a976: 4618 mov r0, r3
800a978: 3710 adds r7, #16
800a97a: 46bd mov sp, r7
800a97c: bd80 pop {r7, pc}
0800a97e <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)
{
800a97e: b580 push {r7, lr}
800a980: b082 sub sp, #8
800a982: af00 add r7, sp, #0
800a984: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
800a986: 687b ldr r3, [r7, #4]
800a988: 2b00 cmp r3, #0
800a98a: d101 bne.n 800a990 <HAL_TIM_Base_Init+0x12>
{
return HAL_ERROR;
800a98c: 2301 movs r3, #1
800a98e: e01d b.n 800a9cc <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)
800a990: 687b ldr r3, [r7, #4]
800a992: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
800a996: b2db uxtb r3, r3
800a998: 2b00 cmp r3, #0
800a99a: d106 bne.n 800a9aa <HAL_TIM_Base_Init+0x2c>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
800a99c: 687b ldr r3, [r7, #4]
800a99e: 2200 movs r2, #0
800a9a0: 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);
800a9a4: 6878 ldr r0, [r7, #4]
800a9a6: f7f9 fdb7 bl 8004518 <HAL_TIM_Base_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
800a9aa: 687b ldr r3, [r7, #4]
800a9ac: 2202 movs r2, #2
800a9ae: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Set the Time Base configuration */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
800a9b2: 687b ldr r3, [r7, #4]
800a9b4: 681a ldr r2, [r3, #0]
800a9b6: 687b ldr r3, [r7, #4]
800a9b8: 3304 adds r3, #4
800a9ba: 4619 mov r1, r3
800a9bc: 4610 mov r0, r2
800a9be: f000 fbc3 bl 800b148 <TIM_Base_SetConfig>
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
800a9c2: 687b ldr r3, [r7, #4]
800a9c4: 2201 movs r2, #1
800a9c6: f883 203d strb.w r2, [r3, #61] ; 0x3d
return HAL_OK;
800a9ca: 2300 movs r3, #0
}
800a9cc: 4618 mov r0, r3
800a9ce: 3708 adds r7, #8
800a9d0: 46bd mov sp, r7
800a9d2: bd80 pop {r7, pc}
0800a9d4 <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)
{
800a9d4: b480 push {r7}
800a9d6: b085 sub sp, #20
800a9d8: af00 add r7, sp, #0
800a9da: 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);
800a9dc: 687b ldr r3, [r7, #4]
800a9de: 681b ldr r3, [r3, #0]
800a9e0: 68da ldr r2, [r3, #12]
800a9e2: 687b ldr r3, [r7, #4]
800a9e4: 681b ldr r3, [r3, #0]
800a9e6: f042 0201 orr.w r2, r2, #1
800a9ea: 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;
800a9ec: 687b ldr r3, [r7, #4]
800a9ee: 681b ldr r3, [r3, #0]
800a9f0: 689a ldr r2, [r3, #8]
800a9f2: 4b0c ldr r3, [pc, #48] ; (800aa24 <HAL_TIM_Base_Start_IT+0x50>)
800a9f4: 4013 ands r3, r2
800a9f6: 60fb str r3, [r7, #12]
if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
800a9f8: 68fb ldr r3, [r7, #12]
800a9fa: 2b06 cmp r3, #6
800a9fc: d00b beq.n 800aa16 <HAL_TIM_Base_Start_IT+0x42>
800a9fe: 68fb ldr r3, [r7, #12]
800aa00: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800aa04: d007 beq.n 800aa16 <HAL_TIM_Base_Start_IT+0x42>
{
__HAL_TIM_ENABLE(htim);
800aa06: 687b ldr r3, [r7, #4]
800aa08: 681b ldr r3, [r3, #0]
800aa0a: 681a ldr r2, [r3, #0]
800aa0c: 687b ldr r3, [r7, #4]
800aa0e: 681b ldr r3, [r3, #0]
800aa10: f042 0201 orr.w r2, r2, #1
800aa14: 601a str r2, [r3, #0]
}
/* Return function status */
return HAL_OK;
800aa16: 2300 movs r3, #0
}
800aa18: 4618 mov r0, r3
800aa1a: 3714 adds r7, #20
800aa1c: 46bd mov sp, r7
800aa1e: f85d 7b04 ldr.w r7, [sp], #4
800aa22: 4770 bx lr
800aa24: 00010007 .word 0x00010007
0800aa28 <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)
{
800aa28: b580 push {r7, lr}
800aa2a: b082 sub sp, #8
800aa2c: af00 add r7, sp, #0
800aa2e: 6078 str r0, [r7, #4]
/* Check the TIM handle allocation */
if (htim == NULL)
800aa30: 687b ldr r3, [r7, #4]
800aa32: 2b00 cmp r3, #0
800aa34: d101 bne.n 800aa3a <HAL_TIM_PWM_Init+0x12>
{
return HAL_ERROR;
800aa36: 2301 movs r3, #1
800aa38: e01d b.n 800aa76 <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)
800aa3a: 687b ldr r3, [r7, #4]
800aa3c: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
800aa40: b2db uxtb r3, r3
800aa42: 2b00 cmp r3, #0
800aa44: d106 bne.n 800aa54 <HAL_TIM_PWM_Init+0x2c>
{
/* Allocate lock resource and initialize it */
htim->Lock = HAL_UNLOCKED;
800aa46: 687b ldr r3, [r7, #4]
800aa48: 2200 movs r2, #0
800aa4a: 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);
800aa4e: 6878 ldr r0, [r7, #4]
800aa50: f000 f815 bl 800aa7e <HAL_TIM_PWM_MspInit>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
/* Set the TIM state */
htim->State = HAL_TIM_STATE_BUSY;
800aa54: 687b ldr r3, [r7, #4]
800aa56: 2202 movs r2, #2
800aa58: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Init the base time for the PWM */
TIM_Base_SetConfig(htim->Instance, &htim->Init);
800aa5c: 687b ldr r3, [r7, #4]
800aa5e: 681a ldr r2, [r3, #0]
800aa60: 687b ldr r3, [r7, #4]
800aa62: 3304 adds r3, #4
800aa64: 4619 mov r1, r3
800aa66: 4610 mov r0, r2
800aa68: f000 fb6e bl 800b148 <TIM_Base_SetConfig>
/* Initialize the TIM state*/
htim->State = HAL_TIM_STATE_READY;
800aa6c: 687b ldr r3, [r7, #4]
800aa6e: 2201 movs r2, #1
800aa70: f883 203d strb.w r2, [r3, #61] ; 0x3d
return HAL_OK;
800aa74: 2300 movs r3, #0
}
800aa76: 4618 mov r0, r3
800aa78: 3708 adds r7, #8
800aa7a: 46bd mov sp, r7
800aa7c: bd80 pop {r7, pc}
0800aa7e <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)
{
800aa7e: b480 push {r7}
800aa80: b083 sub sp, #12
800aa82: af00 add r7, sp, #0
800aa84: 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
*/
}
800aa86: bf00 nop
800aa88: 370c adds r7, #12
800aa8a: 46bd mov sp, r7
800aa8c: f85d 7b04 ldr.w r7, [sp], #4
800aa90: 4770 bx lr
0800aa92 <HAL_TIM_IRQHandler>:
* @brief This function handles TIM interrupts requests.
* @param htim TIM handle
* @retval None
*/
void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
{
800aa92: b580 push {r7, lr}
800aa94: b082 sub sp, #8
800aa96: af00 add r7, sp, #0
800aa98: 6078 str r0, [r7, #4]
/* Capture compare 1 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET)
800aa9a: 687b ldr r3, [r7, #4]
800aa9c: 681b ldr r3, [r3, #0]
800aa9e: 691b ldr r3, [r3, #16]
800aaa0: f003 0302 and.w r3, r3, #2
800aaa4: 2b02 cmp r3, #2
800aaa6: d122 bne.n 800aaee <HAL_TIM_IRQHandler+0x5c>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET)
800aaa8: 687b ldr r3, [r7, #4]
800aaaa: 681b ldr r3, [r3, #0]
800aaac: 68db ldr r3, [r3, #12]
800aaae: f003 0302 and.w r3, r3, #2
800aab2: 2b02 cmp r3, #2
800aab4: d11b bne.n 800aaee <HAL_TIM_IRQHandler+0x5c>
{
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1);
800aab6: 687b ldr r3, [r7, #4]
800aab8: 681b ldr r3, [r3, #0]
800aaba: f06f 0202 mvn.w r2, #2
800aabe: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
800aac0: 687b ldr r3, [r7, #4]
800aac2: 2201 movs r2, #1
800aac4: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U)
800aac6: 687b ldr r3, [r7, #4]
800aac8: 681b ldr r3, [r3, #0]
800aaca: 699b ldr r3, [r3, #24]
800aacc: f003 0303 and.w r3, r3, #3
800aad0: 2b00 cmp r3, #0
800aad2: d003 beq.n 800aadc <HAL_TIM_IRQHandler+0x4a>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800aad4: 6878 ldr r0, [r7, #4]
800aad6: f000 fb19 bl 800b10c <HAL_TIM_IC_CaptureCallback>
800aada: e005 b.n 800aae8 <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);
800aadc: 6878 ldr r0, [r7, #4]
800aade: f000 fb0b bl 800b0f8 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800aae2: 6878 ldr r0, [r7, #4]
800aae4: f000 fb1c bl 800b120 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800aae8: 687b ldr r3, [r7, #4]
800aaea: 2200 movs r2, #0
800aaec: 771a strb r2, [r3, #28]
}
}
}
/* Capture compare 2 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET)
800aaee: 687b ldr r3, [r7, #4]
800aaf0: 681b ldr r3, [r3, #0]
800aaf2: 691b ldr r3, [r3, #16]
800aaf4: f003 0304 and.w r3, r3, #4
800aaf8: 2b04 cmp r3, #4
800aafa: d122 bne.n 800ab42 <HAL_TIM_IRQHandler+0xb0>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET)
800aafc: 687b ldr r3, [r7, #4]
800aafe: 681b ldr r3, [r3, #0]
800ab00: 68db ldr r3, [r3, #12]
800ab02: f003 0304 and.w r3, r3, #4
800ab06: 2b04 cmp r3, #4
800ab08: d11b bne.n 800ab42 <HAL_TIM_IRQHandler+0xb0>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2);
800ab0a: 687b ldr r3, [r7, #4]
800ab0c: 681b ldr r3, [r3, #0]
800ab0e: f06f 0204 mvn.w r2, #4
800ab12: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
800ab14: 687b ldr r3, [r7, #4]
800ab16: 2202 movs r2, #2
800ab18: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
800ab1a: 687b ldr r3, [r7, #4]
800ab1c: 681b ldr r3, [r3, #0]
800ab1e: 699b ldr r3, [r3, #24]
800ab20: f403 7340 and.w r3, r3, #768 ; 0x300
800ab24: 2b00 cmp r3, #0
800ab26: d003 beq.n 800ab30 <HAL_TIM_IRQHandler+0x9e>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800ab28: 6878 ldr r0, [r7, #4]
800ab2a: f000 faef bl 800b10c <HAL_TIM_IC_CaptureCallback>
800ab2e: e005 b.n 800ab3c <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);
800ab30: 6878 ldr r0, [r7, #4]
800ab32: f000 fae1 bl 800b0f8 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800ab36: 6878 ldr r0, [r7, #4]
800ab38: f000 faf2 bl 800b120 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800ab3c: 687b ldr r3, [r7, #4]
800ab3e: 2200 movs r2, #0
800ab40: 771a strb r2, [r3, #28]
}
}
/* Capture compare 3 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET)
800ab42: 687b ldr r3, [r7, #4]
800ab44: 681b ldr r3, [r3, #0]
800ab46: 691b ldr r3, [r3, #16]
800ab48: f003 0308 and.w r3, r3, #8
800ab4c: 2b08 cmp r3, #8
800ab4e: d122 bne.n 800ab96 <HAL_TIM_IRQHandler+0x104>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET)
800ab50: 687b ldr r3, [r7, #4]
800ab52: 681b ldr r3, [r3, #0]
800ab54: 68db ldr r3, [r3, #12]
800ab56: f003 0308 and.w r3, r3, #8
800ab5a: 2b08 cmp r3, #8
800ab5c: d11b bne.n 800ab96 <HAL_TIM_IRQHandler+0x104>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3);
800ab5e: 687b ldr r3, [r7, #4]
800ab60: 681b ldr r3, [r3, #0]
800ab62: f06f 0208 mvn.w r2, #8
800ab66: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
800ab68: 687b ldr r3, [r7, #4]
800ab6a: 2204 movs r2, #4
800ab6c: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
800ab6e: 687b ldr r3, [r7, #4]
800ab70: 681b ldr r3, [r3, #0]
800ab72: 69db ldr r3, [r3, #28]
800ab74: f003 0303 and.w r3, r3, #3
800ab78: 2b00 cmp r3, #0
800ab7a: d003 beq.n 800ab84 <HAL_TIM_IRQHandler+0xf2>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800ab7c: 6878 ldr r0, [r7, #4]
800ab7e: f000 fac5 bl 800b10c <HAL_TIM_IC_CaptureCallback>
800ab82: e005 b.n 800ab90 <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);
800ab84: 6878 ldr r0, [r7, #4]
800ab86: f000 fab7 bl 800b0f8 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800ab8a: 6878 ldr r0, [r7, #4]
800ab8c: f000 fac8 bl 800b120 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800ab90: 687b ldr r3, [r7, #4]
800ab92: 2200 movs r2, #0
800ab94: 771a strb r2, [r3, #28]
}
}
/* Capture compare 4 event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET)
800ab96: 687b ldr r3, [r7, #4]
800ab98: 681b ldr r3, [r3, #0]
800ab9a: 691b ldr r3, [r3, #16]
800ab9c: f003 0310 and.w r3, r3, #16
800aba0: 2b10 cmp r3, #16
800aba2: d122 bne.n 800abea <HAL_TIM_IRQHandler+0x158>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET)
800aba4: 687b ldr r3, [r7, #4]
800aba6: 681b ldr r3, [r3, #0]
800aba8: 68db ldr r3, [r3, #12]
800abaa: f003 0310 and.w r3, r3, #16
800abae: 2b10 cmp r3, #16
800abb0: d11b bne.n 800abea <HAL_TIM_IRQHandler+0x158>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4);
800abb2: 687b ldr r3, [r7, #4]
800abb4: 681b ldr r3, [r3, #0]
800abb6: f06f 0210 mvn.w r2, #16
800abba: 611a str r2, [r3, #16]
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
800abbc: 687b ldr r3, [r7, #4]
800abbe: 2208 movs r2, #8
800abc0: 771a strb r2, [r3, #28]
/* Input capture event */
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
800abc2: 687b ldr r3, [r7, #4]
800abc4: 681b ldr r3, [r3, #0]
800abc6: 69db ldr r3, [r3, #28]
800abc8: f403 7340 and.w r3, r3, #768 ; 0x300
800abcc: 2b00 cmp r3, #0
800abce: d003 beq.n 800abd8 <HAL_TIM_IRQHandler+0x146>
{
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->IC_CaptureCallback(htim);
#else
HAL_TIM_IC_CaptureCallback(htim);
800abd0: 6878 ldr r0, [r7, #4]
800abd2: f000 fa9b bl 800b10c <HAL_TIM_IC_CaptureCallback>
800abd6: e005 b.n 800abe4 <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);
800abd8: 6878 ldr r0, [r7, #4]
800abda: f000 fa8d bl 800b0f8 <HAL_TIM_OC_DelayElapsedCallback>
HAL_TIM_PWM_PulseFinishedCallback(htim);
800abde: 6878 ldr r0, [r7, #4]
800abe0: f000 fa9e bl 800b120 <HAL_TIM_PWM_PulseFinishedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
800abe4: 687b ldr r3, [r7, #4]
800abe6: 2200 movs r2, #0
800abe8: 771a strb r2, [r3, #28]
}
}
/* TIM Update event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET)
800abea: 687b ldr r3, [r7, #4]
800abec: 681b ldr r3, [r3, #0]
800abee: 691b ldr r3, [r3, #16]
800abf0: f003 0301 and.w r3, r3, #1
800abf4: 2b01 cmp r3, #1
800abf6: d10e bne.n 800ac16 <HAL_TIM_IRQHandler+0x184>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET)
800abf8: 687b ldr r3, [r7, #4]
800abfa: 681b ldr r3, [r3, #0]
800abfc: 68db ldr r3, [r3, #12]
800abfe: f003 0301 and.w r3, r3, #1
800ac02: 2b01 cmp r3, #1
800ac04: d107 bne.n 800ac16 <HAL_TIM_IRQHandler+0x184>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE);
800ac06: 687b ldr r3, [r7, #4]
800ac08: 681b ldr r3, [r3, #0]
800ac0a: f06f 0201 mvn.w r2, #1
800ac0e: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->PeriodElapsedCallback(htim);
#else
HAL_TIM_PeriodElapsedCallback(htim);
800ac10: 6878 ldr r0, [r7, #4]
800ac12: f7f7 fbf1 bl 80023f8 <HAL_TIM_PeriodElapsedCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Break input event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET)
800ac16: 687b ldr r3, [r7, #4]
800ac18: 681b ldr r3, [r3, #0]
800ac1a: 691b ldr r3, [r3, #16]
800ac1c: f003 0380 and.w r3, r3, #128 ; 0x80
800ac20: 2b80 cmp r3, #128 ; 0x80
800ac22: d10e bne.n 800ac42 <HAL_TIM_IRQHandler+0x1b0>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
800ac24: 687b ldr r3, [r7, #4]
800ac26: 681b ldr r3, [r3, #0]
800ac28: 68db ldr r3, [r3, #12]
800ac2a: f003 0380 and.w r3, r3, #128 ; 0x80
800ac2e: 2b80 cmp r3, #128 ; 0x80
800ac30: d107 bne.n 800ac42 <HAL_TIM_IRQHandler+0x1b0>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK);
800ac32: 687b ldr r3, [r7, #4]
800ac34: 681b ldr r3, [r3, #0]
800ac36: f06f 0280 mvn.w r2, #128 ; 0x80
800ac3a: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->BreakCallback(htim);
#else
HAL_TIMEx_BreakCallback(htim);
800ac3c: 6878 ldr r0, [r7, #4]
800ac3e: f000 ffb9 bl 800bbb4 <HAL_TIMEx_BreakCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Break2 input event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK2) != RESET)
800ac42: 687b ldr r3, [r7, #4]
800ac44: 681b ldr r3, [r3, #0]
800ac46: 691b ldr r3, [r3, #16]
800ac48: f403 7380 and.w r3, r3, #256 ; 0x100
800ac4c: f5b3 7f80 cmp.w r3, #256 ; 0x100
800ac50: d10e bne.n 800ac70 <HAL_TIM_IRQHandler+0x1de>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
800ac52: 687b ldr r3, [r7, #4]
800ac54: 681b ldr r3, [r3, #0]
800ac56: 68db ldr r3, [r3, #12]
800ac58: f003 0380 and.w r3, r3, #128 ; 0x80
800ac5c: 2b80 cmp r3, #128 ; 0x80
800ac5e: d107 bne.n 800ac70 <HAL_TIM_IRQHandler+0x1de>
{
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2);
800ac60: 687b ldr r3, [r7, #4]
800ac62: 681b ldr r3, [r3, #0]
800ac64: f46f 7280 mvn.w r2, #256 ; 0x100
800ac68: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->Break2Callback(htim);
#else
HAL_TIMEx_Break2Callback(htim);
800ac6a: 6878 ldr r0, [r7, #4]
800ac6c: f000 ffac bl 800bbc8 <HAL_TIMEx_Break2Callback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM Trigger detection event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET)
800ac70: 687b ldr r3, [r7, #4]
800ac72: 681b ldr r3, [r3, #0]
800ac74: 691b ldr r3, [r3, #16]
800ac76: f003 0340 and.w r3, r3, #64 ; 0x40
800ac7a: 2b40 cmp r3, #64 ; 0x40
800ac7c: d10e bne.n 800ac9c <HAL_TIM_IRQHandler+0x20a>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET)
800ac7e: 687b ldr r3, [r7, #4]
800ac80: 681b ldr r3, [r3, #0]
800ac82: 68db ldr r3, [r3, #12]
800ac84: f003 0340 and.w r3, r3, #64 ; 0x40
800ac88: 2b40 cmp r3, #64 ; 0x40
800ac8a: d107 bne.n 800ac9c <HAL_TIM_IRQHandler+0x20a>
{
__HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER);
800ac8c: 687b ldr r3, [r7, #4]
800ac8e: 681b ldr r3, [r3, #0]
800ac90: f06f 0240 mvn.w r2, #64 ; 0x40
800ac94: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->TriggerCallback(htim);
#else
HAL_TIM_TriggerCallback(htim);
800ac96: 6878 ldr r0, [r7, #4]
800ac98: f000 fa4c bl 800b134 <HAL_TIM_TriggerCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
/* TIM commutation event */
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET)
800ac9c: 687b ldr r3, [r7, #4]
800ac9e: 681b ldr r3, [r3, #0]
800aca0: 691b ldr r3, [r3, #16]
800aca2: f003 0320 and.w r3, r3, #32
800aca6: 2b20 cmp r3, #32
800aca8: d10e bne.n 800acc8 <HAL_TIM_IRQHandler+0x236>
{
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET)
800acaa: 687b ldr r3, [r7, #4]
800acac: 681b ldr r3, [r3, #0]
800acae: 68db ldr r3, [r3, #12]
800acb0: f003 0320 and.w r3, r3, #32
800acb4: 2b20 cmp r3, #32
800acb6: d107 bne.n 800acc8 <HAL_TIM_IRQHandler+0x236>
{
__HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM);
800acb8: 687b ldr r3, [r7, #4]
800acba: 681b ldr r3, [r3, #0]
800acbc: f06f 0220 mvn.w r2, #32
800acc0: 611a str r2, [r3, #16]
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
htim->CommutationCallback(htim);
#else
HAL_TIMEx_CommutCallback(htim);
800acc2: 6878 ldr r0, [r7, #4]
800acc4: f000 ff6c bl 800bba0 <HAL_TIMEx_CommutCallback>
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
}
800acc8: bf00 nop
800acca: 3708 adds r7, #8
800accc: 46bd mov sp, r7
800acce: bd80 pop {r7, pc}
0800acd0 <HAL_TIM_PWM_ConfigChannel>:
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,
TIM_OC_InitTypeDef *sConfig,
uint32_t Channel)
{
800acd0: b580 push {r7, lr}
800acd2: b084 sub sp, #16
800acd4: af00 add r7, sp, #0
800acd6: 60f8 str r0, [r7, #12]
800acd8: 60b9 str r1, [r7, #8]
800acda: 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);
800acdc: 68fb ldr r3, [r7, #12]
800acde: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800ace2: 2b01 cmp r3, #1
800ace4: d101 bne.n 800acea <HAL_TIM_PWM_ConfigChannel+0x1a>
800ace6: 2302 movs r3, #2
800ace8: e105 b.n 800aef6 <HAL_TIM_PWM_ConfigChannel+0x226>
800acea: 68fb ldr r3, [r7, #12]
800acec: 2201 movs r2, #1
800acee: f883 203c strb.w r2, [r3, #60] ; 0x3c
htim->State = HAL_TIM_STATE_BUSY;
800acf2: 68fb ldr r3, [r7, #12]
800acf4: 2202 movs r2, #2
800acf6: f883 203d strb.w r2, [r3, #61] ; 0x3d
switch (Channel)
800acfa: 687b ldr r3, [r7, #4]
800acfc: 2b14 cmp r3, #20
800acfe: f200 80f0 bhi.w 800aee2 <HAL_TIM_PWM_ConfigChannel+0x212>
800ad02: a201 add r2, pc, #4 ; (adr r2, 800ad08 <HAL_TIM_PWM_ConfigChannel+0x38>)
800ad04: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800ad08: 0800ad5d .word 0x0800ad5d
800ad0c: 0800aee3 .word 0x0800aee3
800ad10: 0800aee3 .word 0x0800aee3
800ad14: 0800aee3 .word 0x0800aee3
800ad18: 0800ad9d .word 0x0800ad9d
800ad1c: 0800aee3 .word 0x0800aee3
800ad20: 0800aee3 .word 0x0800aee3
800ad24: 0800aee3 .word 0x0800aee3
800ad28: 0800addf .word 0x0800addf
800ad2c: 0800aee3 .word 0x0800aee3
800ad30: 0800aee3 .word 0x0800aee3
800ad34: 0800aee3 .word 0x0800aee3
800ad38: 0800ae1f .word 0x0800ae1f
800ad3c: 0800aee3 .word 0x0800aee3
800ad40: 0800aee3 .word 0x0800aee3
800ad44: 0800aee3 .word 0x0800aee3
800ad48: 0800ae61 .word 0x0800ae61
800ad4c: 0800aee3 .word 0x0800aee3
800ad50: 0800aee3 .word 0x0800aee3
800ad54: 0800aee3 .word 0x0800aee3
800ad58: 0800aea1 .word 0x0800aea1
{
/* Check the parameters */
assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
/* Configure the Channel 1 in PWM mode */
TIM_OC1_SetConfig(htim->Instance, sConfig);
800ad5c: 68fb ldr r3, [r7, #12]
800ad5e: 681b ldr r3, [r3, #0]
800ad60: 68b9 ldr r1, [r7, #8]
800ad62: 4618 mov r0, r3
800ad64: f000 fa90 bl 800b288 <TIM_OC1_SetConfig>
/* Set the Preload enable bit for channel1 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC1PE;
800ad68: 68fb ldr r3, [r7, #12]
800ad6a: 681b ldr r3, [r3, #0]
800ad6c: 699a ldr r2, [r3, #24]
800ad6e: 68fb ldr r3, [r7, #12]
800ad70: 681b ldr r3, [r3, #0]
800ad72: f042 0208 orr.w r2, r2, #8
800ad76: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC1FE;
800ad78: 68fb ldr r3, [r7, #12]
800ad7a: 681b ldr r3, [r3, #0]
800ad7c: 699a ldr r2, [r3, #24]
800ad7e: 68fb ldr r3, [r7, #12]
800ad80: 681b ldr r3, [r3, #0]
800ad82: f022 0204 bic.w r2, r2, #4
800ad86: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode;
800ad88: 68fb ldr r3, [r7, #12]
800ad8a: 681b ldr r3, [r3, #0]
800ad8c: 6999 ldr r1, [r3, #24]
800ad8e: 68bb ldr r3, [r7, #8]
800ad90: 691a ldr r2, [r3, #16]
800ad92: 68fb ldr r3, [r7, #12]
800ad94: 681b ldr r3, [r3, #0]
800ad96: 430a orrs r2, r1
800ad98: 619a str r2, [r3, #24]
break;
800ad9a: e0a3 b.n 800aee4 <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);
800ad9c: 68fb ldr r3, [r7, #12]
800ad9e: 681b ldr r3, [r3, #0]
800ada0: 68b9 ldr r1, [r7, #8]
800ada2: 4618 mov r0, r3
800ada4: f000 fae2 bl 800b36c <TIM_OC2_SetConfig>
/* Set the Preload enable bit for channel2 */
htim->Instance->CCMR1 |= TIM_CCMR1_OC2PE;
800ada8: 68fb ldr r3, [r7, #12]
800adaa: 681b ldr r3, [r3, #0]
800adac: 699a ldr r2, [r3, #24]
800adae: 68fb ldr r3, [r7, #12]
800adb0: 681b ldr r3, [r3, #0]
800adb2: f442 6200 orr.w r2, r2, #2048 ; 0x800
800adb6: 619a str r2, [r3, #24]
/* Configure the Output Fast mode */
htim->Instance->CCMR1 &= ~TIM_CCMR1_OC2FE;
800adb8: 68fb ldr r3, [r7, #12]
800adba: 681b ldr r3, [r3, #0]
800adbc: 699a ldr r2, [r3, #24]
800adbe: 68fb ldr r3, [r7, #12]
800adc0: 681b ldr r3, [r3, #0]
800adc2: f422 6280 bic.w r2, r2, #1024 ; 0x400
800adc6: 619a str r2, [r3, #24]
htim->Instance->CCMR1 |= sConfig->OCFastMode << 8U;
800adc8: 68fb ldr r3, [r7, #12]
800adca: 681b ldr r3, [r3, #0]
800adcc: 6999 ldr r1, [r3, #24]
800adce: 68bb ldr r3, [r7, #8]
800add0: 691b ldr r3, [r3, #16]
800add2: 021a lsls r2, r3, #8
800add4: 68fb ldr r3, [r7, #12]
800add6: 681b ldr r3, [r3, #0]
800add8: 430a orrs r2, r1
800adda: 619a str r2, [r3, #24]
break;
800addc: e082 b.n 800aee4 <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);
800adde: 68fb ldr r3, [r7, #12]
800ade0: 681b ldr r3, [r3, #0]
800ade2: 68b9 ldr r1, [r7, #8]
800ade4: 4618 mov r0, r3
800ade6: f000 fb39 bl 800b45c <TIM_OC3_SetConfig>
/* Set the Preload enable bit for channel3 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC3PE;
800adea: 68fb ldr r3, [r7, #12]
800adec: 681b ldr r3, [r3, #0]
800adee: 69da ldr r2, [r3, #28]
800adf0: 68fb ldr r3, [r7, #12]
800adf2: 681b ldr r3, [r3, #0]
800adf4: f042 0208 orr.w r2, r2, #8
800adf8: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC3FE;
800adfa: 68fb ldr r3, [r7, #12]
800adfc: 681b ldr r3, [r3, #0]
800adfe: 69da ldr r2, [r3, #28]
800ae00: 68fb ldr r3, [r7, #12]
800ae02: 681b ldr r3, [r3, #0]
800ae04: f022 0204 bic.w r2, r2, #4
800ae08: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode;
800ae0a: 68fb ldr r3, [r7, #12]
800ae0c: 681b ldr r3, [r3, #0]
800ae0e: 69d9 ldr r1, [r3, #28]
800ae10: 68bb ldr r3, [r7, #8]
800ae12: 691a ldr r2, [r3, #16]
800ae14: 68fb ldr r3, [r7, #12]
800ae16: 681b ldr r3, [r3, #0]
800ae18: 430a orrs r2, r1
800ae1a: 61da str r2, [r3, #28]
break;
800ae1c: e062 b.n 800aee4 <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);
800ae1e: 68fb ldr r3, [r7, #12]
800ae20: 681b ldr r3, [r3, #0]
800ae22: 68b9 ldr r1, [r7, #8]
800ae24: 4618 mov r0, r3
800ae26: f000 fb8f bl 800b548 <TIM_OC4_SetConfig>
/* Set the Preload enable bit for channel4 */
htim->Instance->CCMR2 |= TIM_CCMR2_OC4PE;
800ae2a: 68fb ldr r3, [r7, #12]
800ae2c: 681b ldr r3, [r3, #0]
800ae2e: 69da ldr r2, [r3, #28]
800ae30: 68fb ldr r3, [r7, #12]
800ae32: 681b ldr r3, [r3, #0]
800ae34: f442 6200 orr.w r2, r2, #2048 ; 0x800
800ae38: 61da str r2, [r3, #28]
/* Configure the Output Fast mode */
htim->Instance->CCMR2 &= ~TIM_CCMR2_OC4FE;
800ae3a: 68fb ldr r3, [r7, #12]
800ae3c: 681b ldr r3, [r3, #0]
800ae3e: 69da ldr r2, [r3, #28]
800ae40: 68fb ldr r3, [r7, #12]
800ae42: 681b ldr r3, [r3, #0]
800ae44: f422 6280 bic.w r2, r2, #1024 ; 0x400
800ae48: 61da str r2, [r3, #28]
htim->Instance->CCMR2 |= sConfig->OCFastMode << 8U;
800ae4a: 68fb ldr r3, [r7, #12]
800ae4c: 681b ldr r3, [r3, #0]
800ae4e: 69d9 ldr r1, [r3, #28]
800ae50: 68bb ldr r3, [r7, #8]
800ae52: 691b ldr r3, [r3, #16]
800ae54: 021a lsls r2, r3, #8
800ae56: 68fb ldr r3, [r7, #12]
800ae58: 681b ldr r3, [r3, #0]
800ae5a: 430a orrs r2, r1
800ae5c: 61da str r2, [r3, #28]
break;
800ae5e: e041 b.n 800aee4 <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);
800ae60: 68fb ldr r3, [r7, #12]
800ae62: 681b ldr r3, [r3, #0]
800ae64: 68b9 ldr r1, [r7, #8]
800ae66: 4618 mov r0, r3
800ae68: f000 fbc6 bl 800b5f8 <TIM_OC5_SetConfig>
/* Set the Preload enable bit for channel5*/
htim->Instance->CCMR3 |= TIM_CCMR3_OC5PE;
800ae6c: 68fb ldr r3, [r7, #12]
800ae6e: 681b ldr r3, [r3, #0]
800ae70: 6d5a ldr r2, [r3, #84] ; 0x54
800ae72: 68fb ldr r3, [r7, #12]
800ae74: 681b ldr r3, [r3, #0]
800ae76: f042 0208 orr.w r2, r2, #8
800ae7a: 655a str r2, [r3, #84] ; 0x54
/* Configure the Output Fast mode */
htim->Instance->CCMR3 &= ~TIM_CCMR3_OC5FE;
800ae7c: 68fb ldr r3, [r7, #12]
800ae7e: 681b ldr r3, [r3, #0]
800ae80: 6d5a ldr r2, [r3, #84] ; 0x54
800ae82: 68fb ldr r3, [r7, #12]
800ae84: 681b ldr r3, [r3, #0]
800ae86: f022 0204 bic.w r2, r2, #4
800ae8a: 655a str r2, [r3, #84] ; 0x54
htim->Instance->CCMR3 |= sConfig->OCFastMode;
800ae8c: 68fb ldr r3, [r7, #12]
800ae8e: 681b ldr r3, [r3, #0]
800ae90: 6d59 ldr r1, [r3, #84] ; 0x54
800ae92: 68bb ldr r3, [r7, #8]
800ae94: 691a ldr r2, [r3, #16]
800ae96: 68fb ldr r3, [r7, #12]
800ae98: 681b ldr r3, [r3, #0]
800ae9a: 430a orrs r2, r1
800ae9c: 655a str r2, [r3, #84] ; 0x54
break;
800ae9e: e021 b.n 800aee4 <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);
800aea0: 68fb ldr r3, [r7, #12]
800aea2: 681b ldr r3, [r3, #0]
800aea4: 68b9 ldr r1, [r7, #8]
800aea6: 4618 mov r0, r3
800aea8: f000 fbf8 bl 800b69c <TIM_OC6_SetConfig>
/* Set the Preload enable bit for channel6 */
htim->Instance->CCMR3 |= TIM_CCMR3_OC6PE;
800aeac: 68fb ldr r3, [r7, #12]
800aeae: 681b ldr r3, [r3, #0]
800aeb0: 6d5a ldr r2, [r3, #84] ; 0x54
800aeb2: 68fb ldr r3, [r7, #12]
800aeb4: 681b ldr r3, [r3, #0]
800aeb6: f442 6200 orr.w r2, r2, #2048 ; 0x800
800aeba: 655a str r2, [r3, #84] ; 0x54
/* Configure the Output Fast mode */
htim->Instance->CCMR3 &= ~TIM_CCMR3_OC6FE;
800aebc: 68fb ldr r3, [r7, #12]
800aebe: 681b ldr r3, [r3, #0]
800aec0: 6d5a ldr r2, [r3, #84] ; 0x54
800aec2: 68fb ldr r3, [r7, #12]
800aec4: 681b ldr r3, [r3, #0]
800aec6: f422 6280 bic.w r2, r2, #1024 ; 0x400
800aeca: 655a str r2, [r3, #84] ; 0x54
htim->Instance->CCMR3 |= sConfig->OCFastMode << 8U;
800aecc: 68fb ldr r3, [r7, #12]
800aece: 681b ldr r3, [r3, #0]
800aed0: 6d59 ldr r1, [r3, #84] ; 0x54
800aed2: 68bb ldr r3, [r7, #8]
800aed4: 691b ldr r3, [r3, #16]
800aed6: 021a lsls r2, r3, #8
800aed8: 68fb ldr r3, [r7, #12]
800aeda: 681b ldr r3, [r3, #0]
800aedc: 430a orrs r2, r1
800aede: 655a str r2, [r3, #84] ; 0x54
break;
800aee0: e000 b.n 800aee4 <HAL_TIM_PWM_ConfigChannel+0x214>
}
default:
break;
800aee2: bf00 nop
}
htim->State = HAL_TIM_STATE_READY;
800aee4: 68fb ldr r3, [r7, #12]
800aee6: 2201 movs r2, #1
800aee8: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800aeec: 68fb ldr r3, [r7, #12]
800aeee: 2200 movs r2, #0
800aef0: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800aef4: 2300 movs r3, #0
}
800aef6: 4618 mov r0, r3
800aef8: 3710 adds r7, #16
800aefa: 46bd mov sp, r7
800aefc: bd80 pop {r7, pc}
800aefe: bf00 nop
0800af00 <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)
{
800af00: b580 push {r7, lr}
800af02: b084 sub sp, #16
800af04: af00 add r7, sp, #0
800af06: 6078 str r0, [r7, #4]
800af08: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
/* Process Locked */
__HAL_LOCK(htim);
800af0a: 687b ldr r3, [r7, #4]
800af0c: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800af10: 2b01 cmp r3, #1
800af12: d101 bne.n 800af18 <HAL_TIM_ConfigClockSource+0x18>
800af14: 2302 movs r3, #2
800af16: e0a6 b.n 800b066 <HAL_TIM_ConfigClockSource+0x166>
800af18: 687b ldr r3, [r7, #4]
800af1a: 2201 movs r2, #1
800af1c: f883 203c strb.w r2, [r3, #60] ; 0x3c
htim->State = HAL_TIM_STATE_BUSY;
800af20: 687b ldr r3, [r7, #4]
800af22: 2202 movs r2, #2
800af24: 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;
800af28: 687b ldr r3, [r7, #4]
800af2a: 681b ldr r3, [r3, #0]
800af2c: 689b ldr r3, [r3, #8]
800af2e: 60fb str r3, [r7, #12]
tmpsmcr &= ~(TIM_SMCR_SMS | TIM_SMCR_TS);
800af30: 68fa ldr r2, [r7, #12]
800af32: 4b4f ldr r3, [pc, #316] ; (800b070 <HAL_TIM_ConfigClockSource+0x170>)
800af34: 4013 ands r3, r2
800af36: 60fb str r3, [r7, #12]
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
800af38: 68fb ldr r3, [r7, #12]
800af3a: f423 437f bic.w r3, r3, #65280 ; 0xff00
800af3e: 60fb str r3, [r7, #12]
htim->Instance->SMCR = tmpsmcr;
800af40: 687b ldr r3, [r7, #4]
800af42: 681b ldr r3, [r3, #0]
800af44: 68fa ldr r2, [r7, #12]
800af46: 609a str r2, [r3, #8]
switch (sClockSourceConfig->ClockSource)
800af48: 683b ldr r3, [r7, #0]
800af4a: 681b ldr r3, [r3, #0]
800af4c: 2b40 cmp r3, #64 ; 0x40
800af4e: d067 beq.n 800b020 <HAL_TIM_ConfigClockSource+0x120>
800af50: 2b40 cmp r3, #64 ; 0x40
800af52: d80b bhi.n 800af6c <HAL_TIM_ConfigClockSource+0x6c>
800af54: 2b10 cmp r3, #16
800af56: d073 beq.n 800b040 <HAL_TIM_ConfigClockSource+0x140>
800af58: 2b10 cmp r3, #16
800af5a: d802 bhi.n 800af62 <HAL_TIM_ConfigClockSource+0x62>
800af5c: 2b00 cmp r3, #0
800af5e: d06f beq.n 800b040 <HAL_TIM_ConfigClockSource+0x140>
TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource);
break;
}
default:
break;
800af60: e078 b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
switch (sClockSourceConfig->ClockSource)
800af62: 2b20 cmp r3, #32
800af64: d06c beq.n 800b040 <HAL_TIM_ConfigClockSource+0x140>
800af66: 2b30 cmp r3, #48 ; 0x30
800af68: d06a beq.n 800b040 <HAL_TIM_ConfigClockSource+0x140>
break;
800af6a: e073 b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
switch (sClockSourceConfig->ClockSource)
800af6c: 2b70 cmp r3, #112 ; 0x70
800af6e: d00d beq.n 800af8c <HAL_TIM_ConfigClockSource+0x8c>
800af70: 2b70 cmp r3, #112 ; 0x70
800af72: d804 bhi.n 800af7e <HAL_TIM_ConfigClockSource+0x7e>
800af74: 2b50 cmp r3, #80 ; 0x50
800af76: d033 beq.n 800afe0 <HAL_TIM_ConfigClockSource+0xe0>
800af78: 2b60 cmp r3, #96 ; 0x60
800af7a: d041 beq.n 800b000 <HAL_TIM_ConfigClockSource+0x100>
break;
800af7c: e06a b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
switch (sClockSourceConfig->ClockSource)
800af7e: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
800af82: d066 beq.n 800b052 <HAL_TIM_ConfigClockSource+0x152>
800af84: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
800af88: d017 beq.n 800afba <HAL_TIM_ConfigClockSource+0xba>
break;
800af8a: e063 b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
TIM_ETR_SetConfig(htim->Instance,
800af8c: 687b ldr r3, [r7, #4]
800af8e: 6818 ldr r0, [r3, #0]
800af90: 683b ldr r3, [r7, #0]
800af92: 6899 ldr r1, [r3, #8]
800af94: 683b ldr r3, [r7, #0]
800af96: 685a ldr r2, [r3, #4]
800af98: 683b ldr r3, [r7, #0]
800af9a: 68db ldr r3, [r3, #12]
800af9c: f000 fcd4 bl 800b948 <TIM_ETR_SetConfig>
tmpsmcr = htim->Instance->SMCR;
800afa0: 687b ldr r3, [r7, #4]
800afa2: 681b ldr r3, [r3, #0]
800afa4: 689b ldr r3, [r3, #8]
800afa6: 60fb str r3, [r7, #12]
tmpsmcr |= (TIM_SLAVEMODE_EXTERNAL1 | TIM_CLOCKSOURCE_ETRMODE1);
800afa8: 68fb ldr r3, [r7, #12]
800afaa: f043 0377 orr.w r3, r3, #119 ; 0x77
800afae: 60fb str r3, [r7, #12]
htim->Instance->SMCR = tmpsmcr;
800afb0: 687b ldr r3, [r7, #4]
800afb2: 681b ldr r3, [r3, #0]
800afb4: 68fa ldr r2, [r7, #12]
800afb6: 609a str r2, [r3, #8]
break;
800afb8: e04c b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
TIM_ETR_SetConfig(htim->Instance,
800afba: 687b ldr r3, [r7, #4]
800afbc: 6818 ldr r0, [r3, #0]
800afbe: 683b ldr r3, [r7, #0]
800afc0: 6899 ldr r1, [r3, #8]
800afc2: 683b ldr r3, [r7, #0]
800afc4: 685a ldr r2, [r3, #4]
800afc6: 683b ldr r3, [r7, #0]
800afc8: 68db ldr r3, [r3, #12]
800afca: f000 fcbd bl 800b948 <TIM_ETR_SetConfig>
htim->Instance->SMCR |= TIM_SMCR_ECE;
800afce: 687b ldr r3, [r7, #4]
800afd0: 681b ldr r3, [r3, #0]
800afd2: 689a ldr r2, [r3, #8]
800afd4: 687b ldr r3, [r7, #4]
800afd6: 681b ldr r3, [r3, #0]
800afd8: f442 4280 orr.w r2, r2, #16384 ; 0x4000
800afdc: 609a str r2, [r3, #8]
break;
800afde: e039 b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
TIM_TI1_ConfigInputStage(htim->Instance,
800afe0: 687b ldr r3, [r7, #4]
800afe2: 6818 ldr r0, [r3, #0]
800afe4: 683b ldr r3, [r7, #0]
800afe6: 6859 ldr r1, [r3, #4]
800afe8: 683b ldr r3, [r7, #0]
800afea: 68db ldr r3, [r3, #12]
800afec: 461a mov r2, r3
800afee: f000 fc31 bl 800b854 <TIM_TI1_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1);
800aff2: 687b ldr r3, [r7, #4]
800aff4: 681b ldr r3, [r3, #0]
800aff6: 2150 movs r1, #80 ; 0x50
800aff8: 4618 mov r0, r3
800affa: f000 fc8a bl 800b912 <TIM_ITRx_SetConfig>
break;
800affe: e029 b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
TIM_TI2_ConfigInputStage(htim->Instance,
800b000: 687b ldr r3, [r7, #4]
800b002: 6818 ldr r0, [r3, #0]
800b004: 683b ldr r3, [r7, #0]
800b006: 6859 ldr r1, [r3, #4]
800b008: 683b ldr r3, [r7, #0]
800b00a: 68db ldr r3, [r3, #12]
800b00c: 461a mov r2, r3
800b00e: f000 fc50 bl 800b8b2 <TIM_TI2_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI2);
800b012: 687b ldr r3, [r7, #4]
800b014: 681b ldr r3, [r3, #0]
800b016: 2160 movs r1, #96 ; 0x60
800b018: 4618 mov r0, r3
800b01a: f000 fc7a bl 800b912 <TIM_ITRx_SetConfig>
break;
800b01e: e019 b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
TIM_TI1_ConfigInputStage(htim->Instance,
800b020: 687b ldr r3, [r7, #4]
800b022: 6818 ldr r0, [r3, #0]
800b024: 683b ldr r3, [r7, #0]
800b026: 6859 ldr r1, [r3, #4]
800b028: 683b ldr r3, [r7, #0]
800b02a: 68db ldr r3, [r3, #12]
800b02c: 461a mov r2, r3
800b02e: f000 fc11 bl 800b854 <TIM_TI1_ConfigInputStage>
TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1ED);
800b032: 687b ldr r3, [r7, #4]
800b034: 681b ldr r3, [r3, #0]
800b036: 2140 movs r1, #64 ; 0x40
800b038: 4618 mov r0, r3
800b03a: f000 fc6a bl 800b912 <TIM_ITRx_SetConfig>
break;
800b03e: e009 b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource);
800b040: 687b ldr r3, [r7, #4]
800b042: 681a ldr r2, [r3, #0]
800b044: 683b ldr r3, [r7, #0]
800b046: 681b ldr r3, [r3, #0]
800b048: 4619 mov r1, r3
800b04a: 4610 mov r0, r2
800b04c: f000 fc61 bl 800b912 <TIM_ITRx_SetConfig>
break;
800b050: e000 b.n 800b054 <HAL_TIM_ConfigClockSource+0x154>
break;
800b052: bf00 nop
}
htim->State = HAL_TIM_STATE_READY;
800b054: 687b ldr r3, [r7, #4]
800b056: 2201 movs r2, #1
800b058: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800b05c: 687b ldr r3, [r7, #4]
800b05e: 2200 movs r2, #0
800b060: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800b064: 2300 movs r3, #0
}
800b066: 4618 mov r0, r3
800b068: 3710 adds r7, #16
800b06a: 46bd mov sp, r7
800b06c: bd80 pop {r7, pc}
800b06e: bf00 nop
800b070: fffeff88 .word 0xfffeff88
0800b074 <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)
{
800b074: b580 push {r7, lr}
800b076: b082 sub sp, #8
800b078: af00 add r7, sp, #0
800b07a: 6078 str r0, [r7, #4]
800b07c: 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);
800b07e: 687b ldr r3, [r7, #4]
800b080: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800b084: 2b01 cmp r3, #1
800b086: d101 bne.n 800b08c <HAL_TIM_SlaveConfigSynchro+0x18>
800b088: 2302 movs r3, #2
800b08a: e031 b.n 800b0f0 <HAL_TIM_SlaveConfigSynchro+0x7c>
800b08c: 687b ldr r3, [r7, #4]
800b08e: 2201 movs r2, #1
800b090: f883 203c strb.w r2, [r3, #60] ; 0x3c
htim->State = HAL_TIM_STATE_BUSY;
800b094: 687b ldr r3, [r7, #4]
800b096: 2202 movs r2, #2
800b098: f883 203d strb.w r2, [r3, #61] ; 0x3d
if (TIM_SlaveTimer_SetConfig(htim, sSlaveConfig) != HAL_OK)
800b09c: 6839 ldr r1, [r7, #0]
800b09e: 6878 ldr r0, [r7, #4]
800b0a0: f000 fb50 bl 800b744 <TIM_SlaveTimer_SetConfig>
800b0a4: 4603 mov r3, r0
800b0a6: 2b00 cmp r3, #0
800b0a8: d009 beq.n 800b0be <HAL_TIM_SlaveConfigSynchro+0x4a>
{
htim->State = HAL_TIM_STATE_READY;
800b0aa: 687b ldr r3, [r7, #4]
800b0ac: 2201 movs r2, #1
800b0ae: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800b0b2: 687b ldr r3, [r7, #4]
800b0b4: 2200 movs r2, #0
800b0b6: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_ERROR;
800b0ba: 2301 movs r3, #1
800b0bc: e018 b.n 800b0f0 <HAL_TIM_SlaveConfigSynchro+0x7c>
}
/* Disable Trigger Interrupt */
__HAL_TIM_DISABLE_IT(htim, TIM_IT_TRIGGER);
800b0be: 687b ldr r3, [r7, #4]
800b0c0: 681b ldr r3, [r3, #0]
800b0c2: 68da ldr r2, [r3, #12]
800b0c4: 687b ldr r3, [r7, #4]
800b0c6: 681b ldr r3, [r3, #0]
800b0c8: f022 0240 bic.w r2, r2, #64 ; 0x40
800b0cc: 60da str r2, [r3, #12]
/* Disable Trigger DMA request */
__HAL_TIM_DISABLE_DMA(htim, TIM_DMA_TRIGGER);
800b0ce: 687b ldr r3, [r7, #4]
800b0d0: 681b ldr r3, [r3, #0]
800b0d2: 68da ldr r2, [r3, #12]
800b0d4: 687b ldr r3, [r7, #4]
800b0d6: 681b ldr r3, [r3, #0]
800b0d8: f422 4280 bic.w r2, r2, #16384 ; 0x4000
800b0dc: 60da str r2, [r3, #12]
htim->State = HAL_TIM_STATE_READY;
800b0de: 687b ldr r3, [r7, #4]
800b0e0: 2201 movs r2, #1
800b0e2: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800b0e6: 687b ldr r3, [r7, #4]
800b0e8: 2200 movs r2, #0
800b0ea: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800b0ee: 2300 movs r3, #0
}
800b0f0: 4618 mov r0, r3
800b0f2: 3708 adds r7, #8
800b0f4: 46bd mov sp, r7
800b0f6: bd80 pop {r7, pc}
0800b0f8 <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)
{
800b0f8: b480 push {r7}
800b0fa: b083 sub sp, #12
800b0fc: af00 add r7, sp, #0
800b0fe: 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
*/
}
800b100: bf00 nop
800b102: 370c adds r7, #12
800b104: 46bd mov sp, r7
800b106: f85d 7b04 ldr.w r7, [sp], #4
800b10a: 4770 bx lr
0800b10c <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)
{
800b10c: b480 push {r7}
800b10e: b083 sub sp, #12
800b110: af00 add r7, sp, #0
800b112: 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
*/
}
800b114: bf00 nop
800b116: 370c adds r7, #12
800b118: 46bd mov sp, r7
800b11a: f85d 7b04 ldr.w r7, [sp], #4
800b11e: 4770 bx lr
0800b120 <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)
{
800b120: b480 push {r7}
800b122: b083 sub sp, #12
800b124: af00 add r7, sp, #0
800b126: 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
*/
}
800b128: bf00 nop
800b12a: 370c adds r7, #12
800b12c: 46bd mov sp, r7
800b12e: f85d 7b04 ldr.w r7, [sp], #4
800b132: 4770 bx lr
0800b134 <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)
{
800b134: b480 push {r7}
800b136: b083 sub sp, #12
800b138: af00 add r7, sp, #0
800b13a: 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
*/
}
800b13c: bf00 nop
800b13e: 370c adds r7, #12
800b140: 46bd mov sp, r7
800b142: f85d 7b04 ldr.w r7, [sp], #4
800b146: 4770 bx lr
0800b148 <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)
{
800b148: b480 push {r7}
800b14a: b085 sub sp, #20
800b14c: af00 add r7, sp, #0
800b14e: 6078 str r0, [r7, #4]
800b150: 6039 str r1, [r7, #0]
uint32_t tmpcr1;
tmpcr1 = TIMx->CR1;
800b152: 687b ldr r3, [r7, #4]
800b154: 681b ldr r3, [r3, #0]
800b156: 60fb str r3, [r7, #12]
/* Set TIM Time Base Unit parameters ---------------------------------------*/
if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
800b158: 687b ldr r3, [r7, #4]
800b15a: 4a40 ldr r2, [pc, #256] ; (800b25c <TIM_Base_SetConfig+0x114>)
800b15c: 4293 cmp r3, r2
800b15e: d013 beq.n 800b188 <TIM_Base_SetConfig+0x40>
800b160: 687b ldr r3, [r7, #4]
800b162: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800b166: d00f beq.n 800b188 <TIM_Base_SetConfig+0x40>
800b168: 687b ldr r3, [r7, #4]
800b16a: 4a3d ldr r2, [pc, #244] ; (800b260 <TIM_Base_SetConfig+0x118>)
800b16c: 4293 cmp r3, r2
800b16e: d00b beq.n 800b188 <TIM_Base_SetConfig+0x40>
800b170: 687b ldr r3, [r7, #4]
800b172: 4a3c ldr r2, [pc, #240] ; (800b264 <TIM_Base_SetConfig+0x11c>)
800b174: 4293 cmp r3, r2
800b176: d007 beq.n 800b188 <TIM_Base_SetConfig+0x40>
800b178: 687b ldr r3, [r7, #4]
800b17a: 4a3b ldr r2, [pc, #236] ; (800b268 <TIM_Base_SetConfig+0x120>)
800b17c: 4293 cmp r3, r2
800b17e: d003 beq.n 800b188 <TIM_Base_SetConfig+0x40>
800b180: 687b ldr r3, [r7, #4]
800b182: 4a3a ldr r2, [pc, #232] ; (800b26c <TIM_Base_SetConfig+0x124>)
800b184: 4293 cmp r3, r2
800b186: d108 bne.n 800b19a <TIM_Base_SetConfig+0x52>
{
/* Select the Counter Mode */
tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
800b188: 68fb ldr r3, [r7, #12]
800b18a: f023 0370 bic.w r3, r3, #112 ; 0x70
800b18e: 60fb str r3, [r7, #12]
tmpcr1 |= Structure->CounterMode;
800b190: 683b ldr r3, [r7, #0]
800b192: 685b ldr r3, [r3, #4]
800b194: 68fa ldr r2, [r7, #12]
800b196: 4313 orrs r3, r2
800b198: 60fb str r3, [r7, #12]
}
if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
800b19a: 687b ldr r3, [r7, #4]
800b19c: 4a2f ldr r2, [pc, #188] ; (800b25c <TIM_Base_SetConfig+0x114>)
800b19e: 4293 cmp r3, r2
800b1a0: d02b beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1a2: 687b ldr r3, [r7, #4]
800b1a4: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800b1a8: d027 beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1aa: 687b ldr r3, [r7, #4]
800b1ac: 4a2c ldr r2, [pc, #176] ; (800b260 <TIM_Base_SetConfig+0x118>)
800b1ae: 4293 cmp r3, r2
800b1b0: d023 beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1b2: 687b ldr r3, [r7, #4]
800b1b4: 4a2b ldr r2, [pc, #172] ; (800b264 <TIM_Base_SetConfig+0x11c>)
800b1b6: 4293 cmp r3, r2
800b1b8: d01f beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1ba: 687b ldr r3, [r7, #4]
800b1bc: 4a2a ldr r2, [pc, #168] ; (800b268 <TIM_Base_SetConfig+0x120>)
800b1be: 4293 cmp r3, r2
800b1c0: d01b beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1c2: 687b ldr r3, [r7, #4]
800b1c4: 4a29 ldr r2, [pc, #164] ; (800b26c <TIM_Base_SetConfig+0x124>)
800b1c6: 4293 cmp r3, r2
800b1c8: d017 beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1ca: 687b ldr r3, [r7, #4]
800b1cc: 4a28 ldr r2, [pc, #160] ; (800b270 <TIM_Base_SetConfig+0x128>)
800b1ce: 4293 cmp r3, r2
800b1d0: d013 beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1d2: 687b ldr r3, [r7, #4]
800b1d4: 4a27 ldr r2, [pc, #156] ; (800b274 <TIM_Base_SetConfig+0x12c>)
800b1d6: 4293 cmp r3, r2
800b1d8: d00f beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1da: 687b ldr r3, [r7, #4]
800b1dc: 4a26 ldr r2, [pc, #152] ; (800b278 <TIM_Base_SetConfig+0x130>)
800b1de: 4293 cmp r3, r2
800b1e0: d00b beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1e2: 687b ldr r3, [r7, #4]
800b1e4: 4a25 ldr r2, [pc, #148] ; (800b27c <TIM_Base_SetConfig+0x134>)
800b1e6: 4293 cmp r3, r2
800b1e8: d007 beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1ea: 687b ldr r3, [r7, #4]
800b1ec: 4a24 ldr r2, [pc, #144] ; (800b280 <TIM_Base_SetConfig+0x138>)
800b1ee: 4293 cmp r3, r2
800b1f0: d003 beq.n 800b1fa <TIM_Base_SetConfig+0xb2>
800b1f2: 687b ldr r3, [r7, #4]
800b1f4: 4a23 ldr r2, [pc, #140] ; (800b284 <TIM_Base_SetConfig+0x13c>)
800b1f6: 4293 cmp r3, r2
800b1f8: d108 bne.n 800b20c <TIM_Base_SetConfig+0xc4>
{
/* Set the clock division */
tmpcr1 &= ~TIM_CR1_CKD;
800b1fa: 68fb ldr r3, [r7, #12]
800b1fc: f423 7340 bic.w r3, r3, #768 ; 0x300
800b200: 60fb str r3, [r7, #12]
tmpcr1 |= (uint32_t)Structure->ClockDivision;
800b202: 683b ldr r3, [r7, #0]
800b204: 68db ldr r3, [r3, #12]
800b206: 68fa ldr r2, [r7, #12]
800b208: 4313 orrs r3, r2
800b20a: 60fb str r3, [r7, #12]
}
/* Set the auto-reload preload */
MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
800b20c: 68fb ldr r3, [r7, #12]
800b20e: f023 0280 bic.w r2, r3, #128 ; 0x80
800b212: 683b ldr r3, [r7, #0]
800b214: 695b ldr r3, [r3, #20]
800b216: 4313 orrs r3, r2
800b218: 60fb str r3, [r7, #12]
TIMx->CR1 = tmpcr1;
800b21a: 687b ldr r3, [r7, #4]
800b21c: 68fa ldr r2, [r7, #12]
800b21e: 601a str r2, [r3, #0]
/* Set the Autoreload value */
TIMx->ARR = (uint32_t)Structure->Period ;
800b220: 683b ldr r3, [r7, #0]
800b222: 689a ldr r2, [r3, #8]
800b224: 687b ldr r3, [r7, #4]
800b226: 62da str r2, [r3, #44] ; 0x2c
/* Set the Prescaler value */
TIMx->PSC = Structure->Prescaler;
800b228: 683b ldr r3, [r7, #0]
800b22a: 681a ldr r2, [r3, #0]
800b22c: 687b ldr r3, [r7, #4]
800b22e: 629a str r2, [r3, #40] ; 0x28
if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
800b230: 687b ldr r3, [r7, #4]
800b232: 4a0a ldr r2, [pc, #40] ; (800b25c <TIM_Base_SetConfig+0x114>)
800b234: 4293 cmp r3, r2
800b236: d003 beq.n 800b240 <TIM_Base_SetConfig+0xf8>
800b238: 687b ldr r3, [r7, #4]
800b23a: 4a0c ldr r2, [pc, #48] ; (800b26c <TIM_Base_SetConfig+0x124>)
800b23c: 4293 cmp r3, r2
800b23e: d103 bne.n 800b248 <TIM_Base_SetConfig+0x100>
{
/* Set the Repetition Counter value */
TIMx->RCR = Structure->RepetitionCounter;
800b240: 683b ldr r3, [r7, #0]
800b242: 691a ldr r2, [r3, #16]
800b244: 687b ldr r3, [r7, #4]
800b246: 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;
800b248: 687b ldr r3, [r7, #4]
800b24a: 2201 movs r2, #1
800b24c: 615a str r2, [r3, #20]
}
800b24e: bf00 nop
800b250: 3714 adds r7, #20
800b252: 46bd mov sp, r7
800b254: f85d 7b04 ldr.w r7, [sp], #4
800b258: 4770 bx lr
800b25a: bf00 nop
800b25c: 40010000 .word 0x40010000
800b260: 40000400 .word 0x40000400
800b264: 40000800 .word 0x40000800
800b268: 40000c00 .word 0x40000c00
800b26c: 40010400 .word 0x40010400
800b270: 40014000 .word 0x40014000
800b274: 40014400 .word 0x40014400
800b278: 40014800 .word 0x40014800
800b27c: 40001800 .word 0x40001800
800b280: 40001c00 .word 0x40001c00
800b284: 40002000 .word 0x40002000
0800b288 <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)
{
800b288: b480 push {r7}
800b28a: b087 sub sp, #28
800b28c: af00 add r7, sp, #0
800b28e: 6078 str r0, [r7, #4]
800b290: 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;
800b292: 687b ldr r3, [r7, #4]
800b294: 6a1b ldr r3, [r3, #32]
800b296: f023 0201 bic.w r2, r3, #1
800b29a: 687b ldr r3, [r7, #4]
800b29c: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800b29e: 687b ldr r3, [r7, #4]
800b2a0: 6a1b ldr r3, [r3, #32]
800b2a2: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800b2a4: 687b ldr r3, [r7, #4]
800b2a6: 685b ldr r3, [r3, #4]
800b2a8: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
800b2aa: 687b ldr r3, [r7, #4]
800b2ac: 699b ldr r3, [r3, #24]
800b2ae: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~TIM_CCMR1_OC1M;
800b2b0: 68fa ldr r2, [r7, #12]
800b2b2: 4b2b ldr r3, [pc, #172] ; (800b360 <TIM_OC1_SetConfig+0xd8>)
800b2b4: 4013 ands r3, r2
800b2b6: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC1S;
800b2b8: 68fb ldr r3, [r7, #12]
800b2ba: f023 0303 bic.w r3, r3, #3
800b2be: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
800b2c0: 683b ldr r3, [r7, #0]
800b2c2: 681b ldr r3, [r3, #0]
800b2c4: 68fa ldr r2, [r7, #12]
800b2c6: 4313 orrs r3, r2
800b2c8: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC1P;
800b2ca: 697b ldr r3, [r7, #20]
800b2cc: f023 0302 bic.w r3, r3, #2
800b2d0: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= OC_Config->OCPolarity;
800b2d2: 683b ldr r3, [r7, #0]
800b2d4: 689b ldr r3, [r3, #8]
800b2d6: 697a ldr r2, [r7, #20]
800b2d8: 4313 orrs r3, r2
800b2da: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_1))
800b2dc: 687b ldr r3, [r7, #4]
800b2de: 4a21 ldr r2, [pc, #132] ; (800b364 <TIM_OC1_SetConfig+0xdc>)
800b2e0: 4293 cmp r3, r2
800b2e2: d003 beq.n 800b2ec <TIM_OC1_SetConfig+0x64>
800b2e4: 687b ldr r3, [r7, #4]
800b2e6: 4a20 ldr r2, [pc, #128] ; (800b368 <TIM_OC1_SetConfig+0xe0>)
800b2e8: 4293 cmp r3, r2
800b2ea: d10c bne.n 800b306 <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;
800b2ec: 697b ldr r3, [r7, #20]
800b2ee: f023 0308 bic.w r3, r3, #8
800b2f2: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= OC_Config->OCNPolarity;
800b2f4: 683b ldr r3, [r7, #0]
800b2f6: 68db ldr r3, [r3, #12]
800b2f8: 697a ldr r2, [r7, #20]
800b2fa: 4313 orrs r3, r2
800b2fc: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC1NE;
800b2fe: 697b ldr r3, [r7, #20]
800b300: f023 0304 bic.w r3, r3, #4
800b304: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
800b306: 687b ldr r3, [r7, #4]
800b308: 4a16 ldr r2, [pc, #88] ; (800b364 <TIM_OC1_SetConfig+0xdc>)
800b30a: 4293 cmp r3, r2
800b30c: d003 beq.n 800b316 <TIM_OC1_SetConfig+0x8e>
800b30e: 687b ldr r3, [r7, #4]
800b310: 4a15 ldr r2, [pc, #84] ; (800b368 <TIM_OC1_SetConfig+0xe0>)
800b312: 4293 cmp r3, r2
800b314: d111 bne.n 800b33a <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;
800b316: 693b ldr r3, [r7, #16]
800b318: f423 7380 bic.w r3, r3, #256 ; 0x100
800b31c: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS1N;
800b31e: 693b ldr r3, [r7, #16]
800b320: f423 7300 bic.w r3, r3, #512 ; 0x200
800b324: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= OC_Config->OCIdleState;
800b326: 683b ldr r3, [r7, #0]
800b328: 695b ldr r3, [r3, #20]
800b32a: 693a ldr r2, [r7, #16]
800b32c: 4313 orrs r3, r2
800b32e: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= OC_Config->OCNIdleState;
800b330: 683b ldr r3, [r7, #0]
800b332: 699b ldr r3, [r3, #24]
800b334: 693a ldr r2, [r7, #16]
800b336: 4313 orrs r3, r2
800b338: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800b33a: 687b ldr r3, [r7, #4]
800b33c: 693a ldr r2, [r7, #16]
800b33e: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
800b340: 687b ldr r3, [r7, #4]
800b342: 68fa ldr r2, [r7, #12]
800b344: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR1 = OC_Config->Pulse;
800b346: 683b ldr r3, [r7, #0]
800b348: 685a ldr r2, [r3, #4]
800b34a: 687b ldr r3, [r7, #4]
800b34c: 635a str r2, [r3, #52] ; 0x34
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800b34e: 687b ldr r3, [r7, #4]
800b350: 697a ldr r2, [r7, #20]
800b352: 621a str r2, [r3, #32]
}
800b354: bf00 nop
800b356: 371c adds r7, #28
800b358: 46bd mov sp, r7
800b35a: f85d 7b04 ldr.w r7, [sp], #4
800b35e: 4770 bx lr
800b360: fffeff8f .word 0xfffeff8f
800b364: 40010000 .word 0x40010000
800b368: 40010400 .word 0x40010400
0800b36c <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)
{
800b36c: b480 push {r7}
800b36e: b087 sub sp, #28
800b370: af00 add r7, sp, #0
800b372: 6078 str r0, [r7, #4]
800b374: 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;
800b376: 687b ldr r3, [r7, #4]
800b378: 6a1b ldr r3, [r3, #32]
800b37a: f023 0210 bic.w r2, r3, #16
800b37e: 687b ldr r3, [r7, #4]
800b380: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800b382: 687b ldr r3, [r7, #4]
800b384: 6a1b ldr r3, [r3, #32]
800b386: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800b388: 687b ldr r3, [r7, #4]
800b38a: 685b ldr r3, [r3, #4]
800b38c: 613b str r3, [r7, #16]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
800b38e: 687b ldr r3, [r7, #4]
800b390: 699b ldr r3, [r3, #24]
800b392: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR1_OC2M;
800b394: 68fa ldr r2, [r7, #12]
800b396: 4b2e ldr r3, [pc, #184] ; (800b450 <TIM_OC2_SetConfig+0xe4>)
800b398: 4013 ands r3, r2
800b39a: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR1_CC2S;
800b39c: 68fb ldr r3, [r7, #12]
800b39e: f423 7340 bic.w r3, r3, #768 ; 0x300
800b3a2: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
800b3a4: 683b ldr r3, [r7, #0]
800b3a6: 681b ldr r3, [r3, #0]
800b3a8: 021b lsls r3, r3, #8
800b3aa: 68fa ldr r2, [r7, #12]
800b3ac: 4313 orrs r3, r2
800b3ae: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC2P;
800b3b0: 697b ldr r3, [r7, #20]
800b3b2: f023 0320 bic.w r3, r3, #32
800b3b6: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 4U);
800b3b8: 683b ldr r3, [r7, #0]
800b3ba: 689b ldr r3, [r3, #8]
800b3bc: 011b lsls r3, r3, #4
800b3be: 697a ldr r2, [r7, #20]
800b3c0: 4313 orrs r3, r2
800b3c2: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_2))
800b3c4: 687b ldr r3, [r7, #4]
800b3c6: 4a23 ldr r2, [pc, #140] ; (800b454 <TIM_OC2_SetConfig+0xe8>)
800b3c8: 4293 cmp r3, r2
800b3ca: d003 beq.n 800b3d4 <TIM_OC2_SetConfig+0x68>
800b3cc: 687b ldr r3, [r7, #4]
800b3ce: 4a22 ldr r2, [pc, #136] ; (800b458 <TIM_OC2_SetConfig+0xec>)
800b3d0: 4293 cmp r3, r2
800b3d2: d10d bne.n 800b3f0 <TIM_OC2_SetConfig+0x84>
{
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC2NP;
800b3d4: 697b ldr r3, [r7, #20]
800b3d6: f023 0380 bic.w r3, r3, #128 ; 0x80
800b3da: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= (OC_Config->OCNPolarity << 4U);
800b3dc: 683b ldr r3, [r7, #0]
800b3de: 68db ldr r3, [r3, #12]
800b3e0: 011b lsls r3, r3, #4
800b3e2: 697a ldr r2, [r7, #20]
800b3e4: 4313 orrs r3, r2
800b3e6: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC2NE;
800b3e8: 697b ldr r3, [r7, #20]
800b3ea: f023 0340 bic.w r3, r3, #64 ; 0x40
800b3ee: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
800b3f0: 687b ldr r3, [r7, #4]
800b3f2: 4a18 ldr r2, [pc, #96] ; (800b454 <TIM_OC2_SetConfig+0xe8>)
800b3f4: 4293 cmp r3, r2
800b3f6: d003 beq.n 800b400 <TIM_OC2_SetConfig+0x94>
800b3f8: 687b ldr r3, [r7, #4]
800b3fa: 4a17 ldr r2, [pc, #92] ; (800b458 <TIM_OC2_SetConfig+0xec>)
800b3fc: 4293 cmp r3, r2
800b3fe: d113 bne.n 800b428 <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;
800b400: 693b ldr r3, [r7, #16]
800b402: f423 6380 bic.w r3, r3, #1024 ; 0x400
800b406: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS2N;
800b408: 693b ldr r3, [r7, #16]
800b40a: f423 6300 bic.w r3, r3, #2048 ; 0x800
800b40e: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 2U);
800b410: 683b ldr r3, [r7, #0]
800b412: 695b ldr r3, [r3, #20]
800b414: 009b lsls r3, r3, #2
800b416: 693a ldr r2, [r7, #16]
800b418: 4313 orrs r3, r2
800b41a: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= (OC_Config->OCNIdleState << 2U);
800b41c: 683b ldr r3, [r7, #0]
800b41e: 699b ldr r3, [r3, #24]
800b420: 009b lsls r3, r3, #2
800b422: 693a ldr r2, [r7, #16]
800b424: 4313 orrs r3, r2
800b426: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800b428: 687b ldr r3, [r7, #4]
800b42a: 693a ldr r2, [r7, #16]
800b42c: 605a str r2, [r3, #4]
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
800b42e: 687b ldr r3, [r7, #4]
800b430: 68fa ldr r2, [r7, #12]
800b432: 619a str r2, [r3, #24]
/* Set the Capture Compare Register value */
TIMx->CCR2 = OC_Config->Pulse;
800b434: 683b ldr r3, [r7, #0]
800b436: 685a ldr r2, [r3, #4]
800b438: 687b ldr r3, [r7, #4]
800b43a: 639a str r2, [r3, #56] ; 0x38
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800b43c: 687b ldr r3, [r7, #4]
800b43e: 697a ldr r2, [r7, #20]
800b440: 621a str r2, [r3, #32]
}
800b442: bf00 nop
800b444: 371c adds r7, #28
800b446: 46bd mov sp, r7
800b448: f85d 7b04 ldr.w r7, [sp], #4
800b44c: 4770 bx lr
800b44e: bf00 nop
800b450: feff8fff .word 0xfeff8fff
800b454: 40010000 .word 0x40010000
800b458: 40010400 .word 0x40010400
0800b45c <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)
{
800b45c: b480 push {r7}
800b45e: b087 sub sp, #28
800b460: af00 add r7, sp, #0
800b462: 6078 str r0, [r7, #4]
800b464: 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;
800b466: 687b ldr r3, [r7, #4]
800b468: 6a1b ldr r3, [r3, #32]
800b46a: f423 7280 bic.w r2, r3, #256 ; 0x100
800b46e: 687b ldr r3, [r7, #4]
800b470: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800b472: 687b ldr r3, [r7, #4]
800b474: 6a1b ldr r3, [r3, #32]
800b476: 617b str r3, [r7, #20]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800b478: 687b ldr r3, [r7, #4]
800b47a: 685b ldr r3, [r3, #4]
800b47c: 613b str r3, [r7, #16]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
800b47e: 687b ldr r3, [r7, #4]
800b480: 69db ldr r3, [r3, #28]
800b482: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC3M;
800b484: 68fa ldr r2, [r7, #12]
800b486: 4b2d ldr r3, [pc, #180] ; (800b53c <TIM_OC3_SetConfig+0xe0>)
800b488: 4013 ands r3, r2
800b48a: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC3S;
800b48c: 68fb ldr r3, [r7, #12]
800b48e: f023 0303 bic.w r3, r3, #3
800b492: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
800b494: 683b ldr r3, [r7, #0]
800b496: 681b ldr r3, [r3, #0]
800b498: 68fa ldr r2, [r7, #12]
800b49a: 4313 orrs r3, r2
800b49c: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC3P;
800b49e: 697b ldr r3, [r7, #20]
800b4a0: f423 7300 bic.w r3, r3, #512 ; 0x200
800b4a4: 617b str r3, [r7, #20]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 8U);
800b4a6: 683b ldr r3, [r7, #0]
800b4a8: 689b ldr r3, [r3, #8]
800b4aa: 021b lsls r3, r3, #8
800b4ac: 697a ldr r2, [r7, #20]
800b4ae: 4313 orrs r3, r2
800b4b0: 617b str r3, [r7, #20]
if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_3))
800b4b2: 687b ldr r3, [r7, #4]
800b4b4: 4a22 ldr r2, [pc, #136] ; (800b540 <TIM_OC3_SetConfig+0xe4>)
800b4b6: 4293 cmp r3, r2
800b4b8: d003 beq.n 800b4c2 <TIM_OC3_SetConfig+0x66>
800b4ba: 687b ldr r3, [r7, #4]
800b4bc: 4a21 ldr r2, [pc, #132] ; (800b544 <TIM_OC3_SetConfig+0xe8>)
800b4be: 4293 cmp r3, r2
800b4c0: d10d bne.n 800b4de <TIM_OC3_SetConfig+0x82>
{
assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
/* Reset the Output N Polarity level */
tmpccer &= ~TIM_CCER_CC3NP;
800b4c2: 697b ldr r3, [r7, #20]
800b4c4: f423 6300 bic.w r3, r3, #2048 ; 0x800
800b4c8: 617b str r3, [r7, #20]
/* Set the Output N Polarity */
tmpccer |= (OC_Config->OCNPolarity << 8U);
800b4ca: 683b ldr r3, [r7, #0]
800b4cc: 68db ldr r3, [r3, #12]
800b4ce: 021b lsls r3, r3, #8
800b4d0: 697a ldr r2, [r7, #20]
800b4d2: 4313 orrs r3, r2
800b4d4: 617b str r3, [r7, #20]
/* Reset the Output N State */
tmpccer &= ~TIM_CCER_CC3NE;
800b4d6: 697b ldr r3, [r7, #20]
800b4d8: f423 6380 bic.w r3, r3, #1024 ; 0x400
800b4dc: 617b str r3, [r7, #20]
}
if (IS_TIM_BREAK_INSTANCE(TIMx))
800b4de: 687b ldr r3, [r7, #4]
800b4e0: 4a17 ldr r2, [pc, #92] ; (800b540 <TIM_OC3_SetConfig+0xe4>)
800b4e2: 4293 cmp r3, r2
800b4e4: d003 beq.n 800b4ee <TIM_OC3_SetConfig+0x92>
800b4e6: 687b ldr r3, [r7, #4]
800b4e8: 4a16 ldr r2, [pc, #88] ; (800b544 <TIM_OC3_SetConfig+0xe8>)
800b4ea: 4293 cmp r3, r2
800b4ec: d113 bne.n 800b516 <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;
800b4ee: 693b ldr r3, [r7, #16]
800b4f0: f423 5380 bic.w r3, r3, #4096 ; 0x1000
800b4f4: 613b str r3, [r7, #16]
tmpcr2 &= ~TIM_CR2_OIS3N;
800b4f6: 693b ldr r3, [r7, #16]
800b4f8: f423 5300 bic.w r3, r3, #8192 ; 0x2000
800b4fc: 613b str r3, [r7, #16]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 4U);
800b4fe: 683b ldr r3, [r7, #0]
800b500: 695b ldr r3, [r3, #20]
800b502: 011b lsls r3, r3, #4
800b504: 693a ldr r2, [r7, #16]
800b506: 4313 orrs r3, r2
800b508: 613b str r3, [r7, #16]
/* Set the Output N Idle state */
tmpcr2 |= (OC_Config->OCNIdleState << 4U);
800b50a: 683b ldr r3, [r7, #0]
800b50c: 699b ldr r3, [r3, #24]
800b50e: 011b lsls r3, r3, #4
800b510: 693a ldr r2, [r7, #16]
800b512: 4313 orrs r3, r2
800b514: 613b str r3, [r7, #16]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800b516: 687b ldr r3, [r7, #4]
800b518: 693a ldr r2, [r7, #16]
800b51a: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
800b51c: 687b ldr r3, [r7, #4]
800b51e: 68fa ldr r2, [r7, #12]
800b520: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR3 = OC_Config->Pulse;
800b522: 683b ldr r3, [r7, #0]
800b524: 685a ldr r2, [r3, #4]
800b526: 687b ldr r3, [r7, #4]
800b528: 63da str r2, [r3, #60] ; 0x3c
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800b52a: 687b ldr r3, [r7, #4]
800b52c: 697a ldr r2, [r7, #20]
800b52e: 621a str r2, [r3, #32]
}
800b530: bf00 nop
800b532: 371c adds r7, #28
800b534: 46bd mov sp, r7
800b536: f85d 7b04 ldr.w r7, [sp], #4
800b53a: 4770 bx lr
800b53c: fffeff8f .word 0xfffeff8f
800b540: 40010000 .word 0x40010000
800b544: 40010400 .word 0x40010400
0800b548 <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)
{
800b548: b480 push {r7}
800b54a: b087 sub sp, #28
800b54c: af00 add r7, sp, #0
800b54e: 6078 str r0, [r7, #4]
800b550: 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;
800b552: 687b ldr r3, [r7, #4]
800b554: 6a1b ldr r3, [r3, #32]
800b556: f423 5280 bic.w r2, r3, #4096 ; 0x1000
800b55a: 687b ldr r3, [r7, #4]
800b55c: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800b55e: 687b ldr r3, [r7, #4]
800b560: 6a1b ldr r3, [r3, #32]
800b562: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800b564: 687b ldr r3, [r7, #4]
800b566: 685b ldr r3, [r3, #4]
800b568: 617b str r3, [r7, #20]
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
800b56a: 687b ldr r3, [r7, #4]
800b56c: 69db ldr r3, [r3, #28]
800b56e: 60fb str r3, [r7, #12]
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= ~TIM_CCMR2_OC4M;
800b570: 68fa ldr r2, [r7, #12]
800b572: 4b1e ldr r3, [pc, #120] ; (800b5ec <TIM_OC4_SetConfig+0xa4>)
800b574: 4013 ands r3, r2
800b576: 60fb str r3, [r7, #12]
tmpccmrx &= ~TIM_CCMR2_CC4S;
800b578: 68fb ldr r3, [r7, #12]
800b57a: f423 7340 bic.w r3, r3, #768 ; 0x300
800b57e: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
800b580: 683b ldr r3, [r7, #0]
800b582: 681b ldr r3, [r3, #0]
800b584: 021b lsls r3, r3, #8
800b586: 68fa ldr r2, [r7, #12]
800b588: 4313 orrs r3, r2
800b58a: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC4P;
800b58c: 693b ldr r3, [r7, #16]
800b58e: f423 5300 bic.w r3, r3, #8192 ; 0x2000
800b592: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 12U);
800b594: 683b ldr r3, [r7, #0]
800b596: 689b ldr r3, [r3, #8]
800b598: 031b lsls r3, r3, #12
800b59a: 693a ldr r2, [r7, #16]
800b59c: 4313 orrs r3, r2
800b59e: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
800b5a0: 687b ldr r3, [r7, #4]
800b5a2: 4a13 ldr r2, [pc, #76] ; (800b5f0 <TIM_OC4_SetConfig+0xa8>)
800b5a4: 4293 cmp r3, r2
800b5a6: d003 beq.n 800b5b0 <TIM_OC4_SetConfig+0x68>
800b5a8: 687b ldr r3, [r7, #4]
800b5aa: 4a12 ldr r2, [pc, #72] ; (800b5f4 <TIM_OC4_SetConfig+0xac>)
800b5ac: 4293 cmp r3, r2
800b5ae: d109 bne.n 800b5c4 <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;
800b5b0: 697b ldr r3, [r7, #20]
800b5b2: f423 4380 bic.w r3, r3, #16384 ; 0x4000
800b5b6: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 6U);
800b5b8: 683b ldr r3, [r7, #0]
800b5ba: 695b ldr r3, [r3, #20]
800b5bc: 019b lsls r3, r3, #6
800b5be: 697a ldr r2, [r7, #20]
800b5c0: 4313 orrs r3, r2
800b5c2: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800b5c4: 687b ldr r3, [r7, #4]
800b5c6: 697a ldr r2, [r7, #20]
800b5c8: 605a str r2, [r3, #4]
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
800b5ca: 687b ldr r3, [r7, #4]
800b5cc: 68fa ldr r2, [r7, #12]
800b5ce: 61da str r2, [r3, #28]
/* Set the Capture Compare Register value */
TIMx->CCR4 = OC_Config->Pulse;
800b5d0: 683b ldr r3, [r7, #0]
800b5d2: 685a ldr r2, [r3, #4]
800b5d4: 687b ldr r3, [r7, #4]
800b5d6: 641a str r2, [r3, #64] ; 0x40
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800b5d8: 687b ldr r3, [r7, #4]
800b5da: 693a ldr r2, [r7, #16]
800b5dc: 621a str r2, [r3, #32]
}
800b5de: bf00 nop
800b5e0: 371c adds r7, #28
800b5e2: 46bd mov sp, r7
800b5e4: f85d 7b04 ldr.w r7, [sp], #4
800b5e8: 4770 bx lr
800b5ea: bf00 nop
800b5ec: feff8fff .word 0xfeff8fff
800b5f0: 40010000 .word 0x40010000
800b5f4: 40010400 .word 0x40010400
0800b5f8 <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)
{
800b5f8: b480 push {r7}
800b5fa: b087 sub sp, #28
800b5fc: af00 add r7, sp, #0
800b5fe: 6078 str r0, [r7, #4]
800b600: 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;
800b602: 687b ldr r3, [r7, #4]
800b604: 6a1b ldr r3, [r3, #32]
800b606: f423 3280 bic.w r2, r3, #65536 ; 0x10000
800b60a: 687b ldr r3, [r7, #4]
800b60c: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800b60e: 687b ldr r3, [r7, #4]
800b610: 6a1b ldr r3, [r3, #32]
800b612: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800b614: 687b ldr r3, [r7, #4]
800b616: 685b ldr r3, [r3, #4]
800b618: 617b str r3, [r7, #20]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR3;
800b61a: 687b ldr r3, [r7, #4]
800b61c: 6d5b ldr r3, [r3, #84] ; 0x54
800b61e: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~(TIM_CCMR3_OC5M);
800b620: 68fa ldr r2, [r7, #12]
800b622: 4b1b ldr r3, [pc, #108] ; (800b690 <TIM_OC5_SetConfig+0x98>)
800b624: 4013 ands r3, r2
800b626: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= OC_Config->OCMode;
800b628: 683b ldr r3, [r7, #0]
800b62a: 681b ldr r3, [r3, #0]
800b62c: 68fa ldr r2, [r7, #12]
800b62e: 4313 orrs r3, r2
800b630: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= ~TIM_CCER_CC5P;
800b632: 693b ldr r3, [r7, #16]
800b634: f423 3300 bic.w r3, r3, #131072 ; 0x20000
800b638: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 16U);
800b63a: 683b ldr r3, [r7, #0]
800b63c: 689b ldr r3, [r3, #8]
800b63e: 041b lsls r3, r3, #16
800b640: 693a ldr r2, [r7, #16]
800b642: 4313 orrs r3, r2
800b644: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
800b646: 687b ldr r3, [r7, #4]
800b648: 4a12 ldr r2, [pc, #72] ; (800b694 <TIM_OC5_SetConfig+0x9c>)
800b64a: 4293 cmp r3, r2
800b64c: d003 beq.n 800b656 <TIM_OC5_SetConfig+0x5e>
800b64e: 687b ldr r3, [r7, #4]
800b650: 4a11 ldr r2, [pc, #68] ; (800b698 <TIM_OC5_SetConfig+0xa0>)
800b652: 4293 cmp r3, r2
800b654: d109 bne.n 800b66a <TIM_OC5_SetConfig+0x72>
{
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS5;
800b656: 697b ldr r3, [r7, #20]
800b658: f423 3380 bic.w r3, r3, #65536 ; 0x10000
800b65c: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 8U);
800b65e: 683b ldr r3, [r7, #0]
800b660: 695b ldr r3, [r3, #20]
800b662: 021b lsls r3, r3, #8
800b664: 697a ldr r2, [r7, #20]
800b666: 4313 orrs r3, r2
800b668: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800b66a: 687b ldr r3, [r7, #4]
800b66c: 697a ldr r2, [r7, #20]
800b66e: 605a str r2, [r3, #4]
/* Write to TIMx CCMR3 */
TIMx->CCMR3 = tmpccmrx;
800b670: 687b ldr r3, [r7, #4]
800b672: 68fa ldr r2, [r7, #12]
800b674: 655a str r2, [r3, #84] ; 0x54
/* Set the Capture Compare Register value */
TIMx->CCR5 = OC_Config->Pulse;
800b676: 683b ldr r3, [r7, #0]
800b678: 685a ldr r2, [r3, #4]
800b67a: 687b ldr r3, [r7, #4]
800b67c: 659a str r2, [r3, #88] ; 0x58
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800b67e: 687b ldr r3, [r7, #4]
800b680: 693a ldr r2, [r7, #16]
800b682: 621a str r2, [r3, #32]
}
800b684: bf00 nop
800b686: 371c adds r7, #28
800b688: 46bd mov sp, r7
800b68a: f85d 7b04 ldr.w r7, [sp], #4
800b68e: 4770 bx lr
800b690: fffeff8f .word 0xfffeff8f
800b694: 40010000 .word 0x40010000
800b698: 40010400 .word 0x40010400
0800b69c <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)
{
800b69c: b480 push {r7}
800b69e: b087 sub sp, #28
800b6a0: af00 add r7, sp, #0
800b6a2: 6078 str r0, [r7, #4]
800b6a4: 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;
800b6a6: 687b ldr r3, [r7, #4]
800b6a8: 6a1b ldr r3, [r3, #32]
800b6aa: f423 1280 bic.w r2, r3, #1048576 ; 0x100000
800b6ae: 687b ldr r3, [r7, #4]
800b6b0: 621a str r2, [r3, #32]
/* Get the TIMx CCER register value */
tmpccer = TIMx->CCER;
800b6b2: 687b ldr r3, [r7, #4]
800b6b4: 6a1b ldr r3, [r3, #32]
800b6b6: 613b str r3, [r7, #16]
/* Get the TIMx CR2 register value */
tmpcr2 = TIMx->CR2;
800b6b8: 687b ldr r3, [r7, #4]
800b6ba: 685b ldr r3, [r3, #4]
800b6bc: 617b str r3, [r7, #20]
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR3;
800b6be: 687b ldr r3, [r7, #4]
800b6c0: 6d5b ldr r3, [r3, #84] ; 0x54
800b6c2: 60fb str r3, [r7, #12]
/* Reset the Output Compare Mode Bits */
tmpccmrx &= ~(TIM_CCMR3_OC6M);
800b6c4: 68fa ldr r2, [r7, #12]
800b6c6: 4b1c ldr r3, [pc, #112] ; (800b738 <TIM_OC6_SetConfig+0x9c>)
800b6c8: 4013 ands r3, r2
800b6ca: 60fb str r3, [r7, #12]
/* Select the Output Compare Mode */
tmpccmrx |= (OC_Config->OCMode << 8U);
800b6cc: 683b ldr r3, [r7, #0]
800b6ce: 681b ldr r3, [r3, #0]
800b6d0: 021b lsls r3, r3, #8
800b6d2: 68fa ldr r2, [r7, #12]
800b6d4: 4313 orrs r3, r2
800b6d6: 60fb str r3, [r7, #12]
/* Reset the Output Polarity level */
tmpccer &= (uint32_t)~TIM_CCER_CC6P;
800b6d8: 693b ldr r3, [r7, #16]
800b6da: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
800b6de: 613b str r3, [r7, #16]
/* Set the Output Compare Polarity */
tmpccer |= (OC_Config->OCPolarity << 20U);
800b6e0: 683b ldr r3, [r7, #0]
800b6e2: 689b ldr r3, [r3, #8]
800b6e4: 051b lsls r3, r3, #20
800b6e6: 693a ldr r2, [r7, #16]
800b6e8: 4313 orrs r3, r2
800b6ea: 613b str r3, [r7, #16]
if (IS_TIM_BREAK_INSTANCE(TIMx))
800b6ec: 687b ldr r3, [r7, #4]
800b6ee: 4a13 ldr r2, [pc, #76] ; (800b73c <TIM_OC6_SetConfig+0xa0>)
800b6f0: 4293 cmp r3, r2
800b6f2: d003 beq.n 800b6fc <TIM_OC6_SetConfig+0x60>
800b6f4: 687b ldr r3, [r7, #4]
800b6f6: 4a12 ldr r2, [pc, #72] ; (800b740 <TIM_OC6_SetConfig+0xa4>)
800b6f8: 4293 cmp r3, r2
800b6fa: d109 bne.n 800b710 <TIM_OC6_SetConfig+0x74>
{
/* Reset the Output Compare IDLE State */
tmpcr2 &= ~TIM_CR2_OIS6;
800b6fc: 697b ldr r3, [r7, #20]
800b6fe: f423 2380 bic.w r3, r3, #262144 ; 0x40000
800b702: 617b str r3, [r7, #20]
/* Set the Output Idle state */
tmpcr2 |= (OC_Config->OCIdleState << 10U);
800b704: 683b ldr r3, [r7, #0]
800b706: 695b ldr r3, [r3, #20]
800b708: 029b lsls r3, r3, #10
800b70a: 697a ldr r2, [r7, #20]
800b70c: 4313 orrs r3, r2
800b70e: 617b str r3, [r7, #20]
}
/* Write to TIMx CR2 */
TIMx->CR2 = tmpcr2;
800b710: 687b ldr r3, [r7, #4]
800b712: 697a ldr r2, [r7, #20]
800b714: 605a str r2, [r3, #4]
/* Write to TIMx CCMR3 */
TIMx->CCMR3 = tmpccmrx;
800b716: 687b ldr r3, [r7, #4]
800b718: 68fa ldr r2, [r7, #12]
800b71a: 655a str r2, [r3, #84] ; 0x54
/* Set the Capture Compare Register value */
TIMx->CCR6 = OC_Config->Pulse;
800b71c: 683b ldr r3, [r7, #0]
800b71e: 685a ldr r2, [r3, #4]
800b720: 687b ldr r3, [r7, #4]
800b722: 65da str r2, [r3, #92] ; 0x5c
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
800b724: 687b ldr r3, [r7, #4]
800b726: 693a ldr r2, [r7, #16]
800b728: 621a str r2, [r3, #32]
}
800b72a: bf00 nop
800b72c: 371c adds r7, #28
800b72e: 46bd mov sp, r7
800b730: f85d 7b04 ldr.w r7, [sp], #4
800b734: 4770 bx lr
800b736: bf00 nop
800b738: feff8fff .word 0xfeff8fff
800b73c: 40010000 .word 0x40010000
800b740: 40010400 .word 0x40010400
0800b744 <TIM_SlaveTimer_SetConfig>:
* @param sSlaveConfig Slave timer configuration
* @retval None
*/
static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig(TIM_HandleTypeDef *htim,
TIM_SlaveConfigTypeDef *sSlaveConfig)
{
800b744: b580 push {r7, lr}
800b746: b086 sub sp, #24
800b748: af00 add r7, sp, #0
800b74a: 6078 str r0, [r7, #4]
800b74c: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Get the TIMx SMCR register value */
tmpsmcr = htim->Instance->SMCR;
800b74e: 687b ldr r3, [r7, #4]
800b750: 681b ldr r3, [r3, #0]
800b752: 689b ldr r3, [r3, #8]
800b754: 617b str r3, [r7, #20]
/* Reset the Trigger Selection Bits */
tmpsmcr &= ~TIM_SMCR_TS;
800b756: 697b ldr r3, [r7, #20]
800b758: f023 0370 bic.w r3, r3, #112 ; 0x70
800b75c: 617b str r3, [r7, #20]
/* Set the Input Trigger source */
tmpsmcr |= sSlaveConfig->InputTrigger;
800b75e: 683b ldr r3, [r7, #0]
800b760: 685b ldr r3, [r3, #4]
800b762: 697a ldr r2, [r7, #20]
800b764: 4313 orrs r3, r2
800b766: 617b str r3, [r7, #20]
/* Reset the slave mode Bits */
tmpsmcr &= ~TIM_SMCR_SMS;
800b768: 697a ldr r2, [r7, #20]
800b76a: 4b39 ldr r3, [pc, #228] ; (800b850 <TIM_SlaveTimer_SetConfig+0x10c>)
800b76c: 4013 ands r3, r2
800b76e: 617b str r3, [r7, #20]
/* Set the slave mode */
tmpsmcr |= sSlaveConfig->SlaveMode;
800b770: 683b ldr r3, [r7, #0]
800b772: 681b ldr r3, [r3, #0]
800b774: 697a ldr r2, [r7, #20]
800b776: 4313 orrs r3, r2
800b778: 617b str r3, [r7, #20]
/* Write to TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
800b77a: 687b ldr r3, [r7, #4]
800b77c: 681b ldr r3, [r3, #0]
800b77e: 697a ldr r2, [r7, #20]
800b780: 609a str r2, [r3, #8]
/* Configure the trigger prescaler, filter, and polarity */
switch (sSlaveConfig->InputTrigger)
800b782: 683b ldr r3, [r7, #0]
800b784: 685b ldr r3, [r3, #4]
800b786: 2b30 cmp r3, #48 ; 0x30
800b788: d05c beq.n 800b844 <TIM_SlaveTimer_SetConfig+0x100>
800b78a: 2b30 cmp r3, #48 ; 0x30
800b78c: d806 bhi.n 800b79c <TIM_SlaveTimer_SetConfig+0x58>
800b78e: 2b10 cmp r3, #16
800b790: d058 beq.n 800b844 <TIM_SlaveTimer_SetConfig+0x100>
800b792: 2b20 cmp r3, #32
800b794: d056 beq.n 800b844 <TIM_SlaveTimer_SetConfig+0x100>
800b796: 2b00 cmp r3, #0
800b798: d054 beq.n 800b844 <TIM_SlaveTimer_SetConfig+0x100>
assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
break;
}
default:
break;
800b79a: e054 b.n 800b846 <TIM_SlaveTimer_SetConfig+0x102>
switch (sSlaveConfig->InputTrigger)
800b79c: 2b50 cmp r3, #80 ; 0x50
800b79e: d03d beq.n 800b81c <TIM_SlaveTimer_SetConfig+0xd8>
800b7a0: 2b50 cmp r3, #80 ; 0x50
800b7a2: d802 bhi.n 800b7aa <TIM_SlaveTimer_SetConfig+0x66>
800b7a4: 2b40 cmp r3, #64 ; 0x40
800b7a6: d010 beq.n 800b7ca <TIM_SlaveTimer_SetConfig+0x86>
break;
800b7a8: e04d b.n 800b846 <TIM_SlaveTimer_SetConfig+0x102>
switch (sSlaveConfig->InputTrigger)
800b7aa: 2b60 cmp r3, #96 ; 0x60
800b7ac: d040 beq.n 800b830 <TIM_SlaveTimer_SetConfig+0xec>
800b7ae: 2b70 cmp r3, #112 ; 0x70
800b7b0: d000 beq.n 800b7b4 <TIM_SlaveTimer_SetConfig+0x70>
break;
800b7b2: e048 b.n 800b846 <TIM_SlaveTimer_SetConfig+0x102>
TIM_ETR_SetConfig(htim->Instance,
800b7b4: 687b ldr r3, [r7, #4]
800b7b6: 6818 ldr r0, [r3, #0]
800b7b8: 683b ldr r3, [r7, #0]
800b7ba: 68d9 ldr r1, [r3, #12]
800b7bc: 683b ldr r3, [r7, #0]
800b7be: 689a ldr r2, [r3, #8]
800b7c0: 683b ldr r3, [r7, #0]
800b7c2: 691b ldr r3, [r3, #16]
800b7c4: f000 f8c0 bl 800b948 <TIM_ETR_SetConfig>
break;
800b7c8: e03d b.n 800b846 <TIM_SlaveTimer_SetConfig+0x102>
if(sSlaveConfig->SlaveMode == TIM_SLAVEMODE_GATED)
800b7ca: 683b ldr r3, [r7, #0]
800b7cc: 681b ldr r3, [r3, #0]
800b7ce: 2b05 cmp r3, #5
800b7d0: d101 bne.n 800b7d6 <TIM_SlaveTimer_SetConfig+0x92>
return HAL_ERROR;
800b7d2: 2301 movs r3, #1
800b7d4: e038 b.n 800b848 <TIM_SlaveTimer_SetConfig+0x104>
tmpccer = htim->Instance->CCER;
800b7d6: 687b ldr r3, [r7, #4]
800b7d8: 681b ldr r3, [r3, #0]
800b7da: 6a1b ldr r3, [r3, #32]
800b7dc: 613b str r3, [r7, #16]
htim->Instance->CCER &= ~TIM_CCER_CC1E;
800b7de: 687b ldr r3, [r7, #4]
800b7e0: 681b ldr r3, [r3, #0]
800b7e2: 6a1a ldr r2, [r3, #32]
800b7e4: 687b ldr r3, [r7, #4]
800b7e6: 681b ldr r3, [r3, #0]
800b7e8: f022 0201 bic.w r2, r2, #1
800b7ec: 621a str r2, [r3, #32]
tmpccmr1 = htim->Instance->CCMR1;
800b7ee: 687b ldr r3, [r7, #4]
800b7f0: 681b ldr r3, [r3, #0]
800b7f2: 699b ldr r3, [r3, #24]
800b7f4: 60fb str r3, [r7, #12]
tmpccmr1 &= ~TIM_CCMR1_IC1F;
800b7f6: 68fb ldr r3, [r7, #12]
800b7f8: f023 03f0 bic.w r3, r3, #240 ; 0xf0
800b7fc: 60fb str r3, [r7, #12]
tmpccmr1 |= ((sSlaveConfig->TriggerFilter) << 4U);
800b7fe: 683b ldr r3, [r7, #0]
800b800: 691b ldr r3, [r3, #16]
800b802: 011b lsls r3, r3, #4
800b804: 68fa ldr r2, [r7, #12]
800b806: 4313 orrs r3, r2
800b808: 60fb str r3, [r7, #12]
htim->Instance->CCMR1 = tmpccmr1;
800b80a: 687b ldr r3, [r7, #4]
800b80c: 681b ldr r3, [r3, #0]
800b80e: 68fa ldr r2, [r7, #12]
800b810: 619a str r2, [r3, #24]
htim->Instance->CCER = tmpccer;
800b812: 687b ldr r3, [r7, #4]
800b814: 681b ldr r3, [r3, #0]
800b816: 693a ldr r2, [r7, #16]
800b818: 621a str r2, [r3, #32]
break;
800b81a: e014 b.n 800b846 <TIM_SlaveTimer_SetConfig+0x102>
TIM_TI1_ConfigInputStage(htim->Instance,
800b81c: 687b ldr r3, [r7, #4]
800b81e: 6818 ldr r0, [r3, #0]
800b820: 683b ldr r3, [r7, #0]
800b822: 6899 ldr r1, [r3, #8]
800b824: 683b ldr r3, [r7, #0]
800b826: 691b ldr r3, [r3, #16]
800b828: 461a mov r2, r3
800b82a: f000 f813 bl 800b854 <TIM_TI1_ConfigInputStage>
break;
800b82e: e00a b.n 800b846 <TIM_SlaveTimer_SetConfig+0x102>
TIM_TI2_ConfigInputStage(htim->Instance,
800b830: 687b ldr r3, [r7, #4]
800b832: 6818 ldr r0, [r3, #0]
800b834: 683b ldr r3, [r7, #0]
800b836: 6899 ldr r1, [r3, #8]
800b838: 683b ldr r3, [r7, #0]
800b83a: 691b ldr r3, [r3, #16]
800b83c: 461a mov r2, r3
800b83e: f000 f838 bl 800b8b2 <TIM_TI2_ConfigInputStage>
break;
800b842: e000 b.n 800b846 <TIM_SlaveTimer_SetConfig+0x102>
break;
800b844: bf00 nop
}
return HAL_OK;
800b846: 2300 movs r3, #0
}
800b848: 4618 mov r0, r3
800b84a: 3718 adds r7, #24
800b84c: 46bd mov sp, r7
800b84e: bd80 pop {r7, pc}
800b850: fffefff8 .word 0xfffefff8
0800b854 <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)
{
800b854: b480 push {r7}
800b856: b087 sub sp, #28
800b858: af00 add r7, sp, #0
800b85a: 60f8 str r0, [r7, #12]
800b85c: 60b9 str r1, [r7, #8]
800b85e: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 1: Reset the CC1E Bit */
tmpccer = TIMx->CCER;
800b860: 68fb ldr r3, [r7, #12]
800b862: 6a1b ldr r3, [r3, #32]
800b864: 617b str r3, [r7, #20]
TIMx->CCER &= ~TIM_CCER_CC1E;
800b866: 68fb ldr r3, [r7, #12]
800b868: 6a1b ldr r3, [r3, #32]
800b86a: f023 0201 bic.w r2, r3, #1
800b86e: 68fb ldr r3, [r7, #12]
800b870: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
800b872: 68fb ldr r3, [r7, #12]
800b874: 699b ldr r3, [r3, #24]
800b876: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC1F;
800b878: 693b ldr r3, [r7, #16]
800b87a: f023 03f0 bic.w r3, r3, #240 ; 0xf0
800b87e: 613b str r3, [r7, #16]
tmpccmr1 |= (TIM_ICFilter << 4U);
800b880: 687b ldr r3, [r7, #4]
800b882: 011b lsls r3, r3, #4
800b884: 693a ldr r2, [r7, #16]
800b886: 4313 orrs r3, r2
800b888: 613b str r3, [r7, #16]
/* Select the Polarity and set the CC1E Bit */
tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP);
800b88a: 697b ldr r3, [r7, #20]
800b88c: f023 030a bic.w r3, r3, #10
800b890: 617b str r3, [r7, #20]
tmpccer |= TIM_ICPolarity;
800b892: 697a ldr r2, [r7, #20]
800b894: 68bb ldr r3, [r7, #8]
800b896: 4313 orrs r3, r2
800b898: 617b str r3, [r7, #20]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1;
800b89a: 68fb ldr r3, [r7, #12]
800b89c: 693a ldr r2, [r7, #16]
800b89e: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
800b8a0: 68fb ldr r3, [r7, #12]
800b8a2: 697a ldr r2, [r7, #20]
800b8a4: 621a str r2, [r3, #32]
}
800b8a6: bf00 nop
800b8a8: 371c adds r7, #28
800b8aa: 46bd mov sp, r7
800b8ac: f85d 7b04 ldr.w r7, [sp], #4
800b8b0: 4770 bx lr
0800b8b2 <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)
{
800b8b2: b480 push {r7}
800b8b4: b087 sub sp, #28
800b8b6: af00 add r7, sp, #0
800b8b8: 60f8 str r0, [r7, #12]
800b8ba: 60b9 str r1, [r7, #8]
800b8bc: 607a str r2, [r7, #4]
uint32_t tmpccmr1;
uint32_t tmpccer;
/* Disable the Channel 2: Reset the CC2E Bit */
TIMx->CCER &= ~TIM_CCER_CC2E;
800b8be: 68fb ldr r3, [r7, #12]
800b8c0: 6a1b ldr r3, [r3, #32]
800b8c2: f023 0210 bic.w r2, r3, #16
800b8c6: 68fb ldr r3, [r7, #12]
800b8c8: 621a str r2, [r3, #32]
tmpccmr1 = TIMx->CCMR1;
800b8ca: 68fb ldr r3, [r7, #12]
800b8cc: 699b ldr r3, [r3, #24]
800b8ce: 617b str r3, [r7, #20]
tmpccer = TIMx->CCER;
800b8d0: 68fb ldr r3, [r7, #12]
800b8d2: 6a1b ldr r3, [r3, #32]
800b8d4: 613b str r3, [r7, #16]
/* Set the filter */
tmpccmr1 &= ~TIM_CCMR1_IC2F;
800b8d6: 697b ldr r3, [r7, #20]
800b8d8: f423 4370 bic.w r3, r3, #61440 ; 0xf000
800b8dc: 617b str r3, [r7, #20]
tmpccmr1 |= (TIM_ICFilter << 12U);
800b8de: 687b ldr r3, [r7, #4]
800b8e0: 031b lsls r3, r3, #12
800b8e2: 697a ldr r2, [r7, #20]
800b8e4: 4313 orrs r3, r2
800b8e6: 617b str r3, [r7, #20]
/* Select the Polarity and set the CC2E Bit */
tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP);
800b8e8: 693b ldr r3, [r7, #16]
800b8ea: f023 03a0 bic.w r3, r3, #160 ; 0xa0
800b8ee: 613b str r3, [r7, #16]
tmpccer |= (TIM_ICPolarity << 4U);
800b8f0: 68bb ldr r3, [r7, #8]
800b8f2: 011b lsls r3, r3, #4
800b8f4: 693a ldr r2, [r7, #16]
800b8f6: 4313 orrs r3, r2
800b8f8: 613b str r3, [r7, #16]
/* Write to TIMx CCMR1 and CCER registers */
TIMx->CCMR1 = tmpccmr1 ;
800b8fa: 68fb ldr r3, [r7, #12]
800b8fc: 697a ldr r2, [r7, #20]
800b8fe: 619a str r2, [r3, #24]
TIMx->CCER = tmpccer;
800b900: 68fb ldr r3, [r7, #12]
800b902: 693a ldr r2, [r7, #16]
800b904: 621a str r2, [r3, #32]
}
800b906: bf00 nop
800b908: 371c adds r7, #28
800b90a: 46bd mov sp, r7
800b90c: f85d 7b04 ldr.w r7, [sp], #4
800b910: 4770 bx lr
0800b912 <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)
{
800b912: b480 push {r7}
800b914: b085 sub sp, #20
800b916: af00 add r7, sp, #0
800b918: 6078 str r0, [r7, #4]
800b91a: 6039 str r1, [r7, #0]
uint32_t tmpsmcr;
/* Get the TIMx SMCR register value */
tmpsmcr = TIMx->SMCR;
800b91c: 687b ldr r3, [r7, #4]
800b91e: 689b ldr r3, [r3, #8]
800b920: 60fb str r3, [r7, #12]
/* Reset the TS Bits */
tmpsmcr &= ~TIM_SMCR_TS;
800b922: 68fb ldr r3, [r7, #12]
800b924: f023 0370 bic.w r3, r3, #112 ; 0x70
800b928: 60fb str r3, [r7, #12]
/* Set the Input Trigger source and the slave mode*/
tmpsmcr |= (InputTriggerSource | TIM_SLAVEMODE_EXTERNAL1);
800b92a: 683a ldr r2, [r7, #0]
800b92c: 68fb ldr r3, [r7, #12]
800b92e: 4313 orrs r3, r2
800b930: f043 0307 orr.w r3, r3, #7
800b934: 60fb str r3, [r7, #12]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
800b936: 687b ldr r3, [r7, #4]
800b938: 68fa ldr r2, [r7, #12]
800b93a: 609a str r2, [r3, #8]
}
800b93c: bf00 nop
800b93e: 3714 adds r7, #20
800b940: 46bd mov sp, r7
800b942: f85d 7b04 ldr.w r7, [sp], #4
800b946: 4770 bx lr
0800b948 <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)
{
800b948: b480 push {r7}
800b94a: b087 sub sp, #28
800b94c: af00 add r7, sp, #0
800b94e: 60f8 str r0, [r7, #12]
800b950: 60b9 str r1, [r7, #8]
800b952: 607a str r2, [r7, #4]
800b954: 603b str r3, [r7, #0]
uint32_t tmpsmcr;
tmpsmcr = TIMx->SMCR;
800b956: 68fb ldr r3, [r7, #12]
800b958: 689b ldr r3, [r3, #8]
800b95a: 617b str r3, [r7, #20]
/* Reset the ETR Bits */
tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
800b95c: 697b ldr r3, [r7, #20]
800b95e: f423 437f bic.w r3, r3, #65280 ; 0xff00
800b962: 617b str r3, [r7, #20]
/* Set the Prescaler, the Filter value and the Polarity */
tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U)));
800b964: 683b ldr r3, [r7, #0]
800b966: 021a lsls r2, r3, #8
800b968: 687b ldr r3, [r7, #4]
800b96a: 431a orrs r2, r3
800b96c: 68bb ldr r3, [r7, #8]
800b96e: 4313 orrs r3, r2
800b970: 697a ldr r2, [r7, #20]
800b972: 4313 orrs r3, r2
800b974: 617b str r3, [r7, #20]
/* Write to TIMx SMCR */
TIMx->SMCR = tmpsmcr;
800b976: 68fb ldr r3, [r7, #12]
800b978: 697a ldr r2, [r7, #20]
800b97a: 609a str r2, [r3, #8]
}
800b97c: bf00 nop
800b97e: 371c adds r7, #28
800b980: 46bd mov sp, r7
800b982: f85d 7b04 ldr.w r7, [sp], #4
800b986: 4770 bx lr
0800b988 <HAL_TIMEx_MasterConfigSynchronization>:
* mode.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
TIM_MasterConfigTypeDef *sMasterConfig)
{
800b988: b480 push {r7}
800b98a: b085 sub sp, #20
800b98c: af00 add r7, sp, #0
800b98e: 6078 str r0, [r7, #4]
800b990: 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);
800b992: 687b ldr r3, [r7, #4]
800b994: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800b998: 2b01 cmp r3, #1
800b99a: d101 bne.n 800b9a0 <HAL_TIMEx_MasterConfigSynchronization+0x18>
800b99c: 2302 movs r3, #2
800b99e: e06d b.n 800ba7c <HAL_TIMEx_MasterConfigSynchronization+0xf4>
800b9a0: 687b ldr r3, [r7, #4]
800b9a2: 2201 movs r2, #1
800b9a4: f883 203c strb.w r2, [r3, #60] ; 0x3c
/* Change the handler state */
htim->State = HAL_TIM_STATE_BUSY;
800b9a8: 687b ldr r3, [r7, #4]
800b9aa: 2202 movs r2, #2
800b9ac: f883 203d strb.w r2, [r3, #61] ; 0x3d
/* Get the TIMx CR2 register value */
tmpcr2 = htim->Instance->CR2;
800b9b0: 687b ldr r3, [r7, #4]
800b9b2: 681b ldr r3, [r3, #0]
800b9b4: 685b ldr r3, [r3, #4]
800b9b6: 60fb str r3, [r7, #12]
/* Get the TIMx SMCR register value */
tmpsmcr = htim->Instance->SMCR;
800b9b8: 687b ldr r3, [r7, #4]
800b9ba: 681b ldr r3, [r3, #0]
800b9bc: 689b ldr r3, [r3, #8]
800b9be: 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))
800b9c0: 687b ldr r3, [r7, #4]
800b9c2: 681b ldr r3, [r3, #0]
800b9c4: 4a30 ldr r2, [pc, #192] ; (800ba88 <HAL_TIMEx_MasterConfigSynchronization+0x100>)
800b9c6: 4293 cmp r3, r2
800b9c8: d004 beq.n 800b9d4 <HAL_TIMEx_MasterConfigSynchronization+0x4c>
800b9ca: 687b ldr r3, [r7, #4]
800b9cc: 681b ldr r3, [r3, #0]
800b9ce: 4a2f ldr r2, [pc, #188] ; (800ba8c <HAL_TIMEx_MasterConfigSynchronization+0x104>)
800b9d0: 4293 cmp r3, r2
800b9d2: d108 bne.n 800b9e6 <HAL_TIMEx_MasterConfigSynchronization+0x5e>
{
/* Check the parameters */
assert_param(IS_TIM_TRGO2_SOURCE(sMasterConfig->MasterOutputTrigger2));
/* Clear the MMS2 bits */
tmpcr2 &= ~TIM_CR2_MMS2;
800b9d4: 68fb ldr r3, [r7, #12]
800b9d6: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000
800b9da: 60fb str r3, [r7, #12]
/* Select the TRGO2 source*/
tmpcr2 |= sMasterConfig->MasterOutputTrigger2;
800b9dc: 683b ldr r3, [r7, #0]
800b9de: 685b ldr r3, [r3, #4]
800b9e0: 68fa ldr r2, [r7, #12]
800b9e2: 4313 orrs r3, r2
800b9e4: 60fb str r3, [r7, #12]
}
/* Reset the MMS Bits */
tmpcr2 &= ~TIM_CR2_MMS;
800b9e6: 68fb ldr r3, [r7, #12]
800b9e8: f023 0370 bic.w r3, r3, #112 ; 0x70
800b9ec: 60fb str r3, [r7, #12]
/* Select the TRGO source */
tmpcr2 |= sMasterConfig->MasterOutputTrigger;
800b9ee: 683b ldr r3, [r7, #0]
800b9f0: 681b ldr r3, [r3, #0]
800b9f2: 68fa ldr r2, [r7, #12]
800b9f4: 4313 orrs r3, r2
800b9f6: 60fb str r3, [r7, #12]
/* Update TIMx CR2 */
htim->Instance->CR2 = tmpcr2;
800b9f8: 687b ldr r3, [r7, #4]
800b9fa: 681b ldr r3, [r3, #0]
800b9fc: 68fa ldr r2, [r7, #12]
800b9fe: 605a str r2, [r3, #4]
if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
800ba00: 687b ldr r3, [r7, #4]
800ba02: 681b ldr r3, [r3, #0]
800ba04: 4a20 ldr r2, [pc, #128] ; (800ba88 <HAL_TIMEx_MasterConfigSynchronization+0x100>)
800ba06: 4293 cmp r3, r2
800ba08: d022 beq.n 800ba50 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800ba0a: 687b ldr r3, [r7, #4]
800ba0c: 681b ldr r3, [r3, #0]
800ba0e: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
800ba12: d01d beq.n 800ba50 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800ba14: 687b ldr r3, [r7, #4]
800ba16: 681b ldr r3, [r3, #0]
800ba18: 4a1d ldr r2, [pc, #116] ; (800ba90 <HAL_TIMEx_MasterConfigSynchronization+0x108>)
800ba1a: 4293 cmp r3, r2
800ba1c: d018 beq.n 800ba50 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800ba1e: 687b ldr r3, [r7, #4]
800ba20: 681b ldr r3, [r3, #0]
800ba22: 4a1c ldr r2, [pc, #112] ; (800ba94 <HAL_TIMEx_MasterConfigSynchronization+0x10c>)
800ba24: 4293 cmp r3, r2
800ba26: d013 beq.n 800ba50 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800ba28: 687b ldr r3, [r7, #4]
800ba2a: 681b ldr r3, [r3, #0]
800ba2c: 4a1a ldr r2, [pc, #104] ; (800ba98 <HAL_TIMEx_MasterConfigSynchronization+0x110>)
800ba2e: 4293 cmp r3, r2
800ba30: d00e beq.n 800ba50 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800ba32: 687b ldr r3, [r7, #4]
800ba34: 681b ldr r3, [r3, #0]
800ba36: 4a15 ldr r2, [pc, #84] ; (800ba8c <HAL_TIMEx_MasterConfigSynchronization+0x104>)
800ba38: 4293 cmp r3, r2
800ba3a: d009 beq.n 800ba50 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800ba3c: 687b ldr r3, [r7, #4]
800ba3e: 681b ldr r3, [r3, #0]
800ba40: 4a16 ldr r2, [pc, #88] ; (800ba9c <HAL_TIMEx_MasterConfigSynchronization+0x114>)
800ba42: 4293 cmp r3, r2
800ba44: d004 beq.n 800ba50 <HAL_TIMEx_MasterConfigSynchronization+0xc8>
800ba46: 687b ldr r3, [r7, #4]
800ba48: 681b ldr r3, [r3, #0]
800ba4a: 4a15 ldr r2, [pc, #84] ; (800baa0 <HAL_TIMEx_MasterConfigSynchronization+0x118>)
800ba4c: 4293 cmp r3, r2
800ba4e: d10c bne.n 800ba6a <HAL_TIMEx_MasterConfigSynchronization+0xe2>
{
/* Reset the MSM Bit */
tmpsmcr &= ~TIM_SMCR_MSM;
800ba50: 68bb ldr r3, [r7, #8]
800ba52: f023 0380 bic.w r3, r3, #128 ; 0x80
800ba56: 60bb str r3, [r7, #8]
/* Set master mode */
tmpsmcr |= sMasterConfig->MasterSlaveMode;
800ba58: 683b ldr r3, [r7, #0]
800ba5a: 689b ldr r3, [r3, #8]
800ba5c: 68ba ldr r2, [r7, #8]
800ba5e: 4313 orrs r3, r2
800ba60: 60bb str r3, [r7, #8]
/* Update TIMx SMCR */
htim->Instance->SMCR = tmpsmcr;
800ba62: 687b ldr r3, [r7, #4]
800ba64: 681b ldr r3, [r3, #0]
800ba66: 68ba ldr r2, [r7, #8]
800ba68: 609a str r2, [r3, #8]
}
/* Change the htim state */
htim->State = HAL_TIM_STATE_READY;
800ba6a: 687b ldr r3, [r7, #4]
800ba6c: 2201 movs r2, #1
800ba6e: f883 203d strb.w r2, [r3, #61] ; 0x3d
__HAL_UNLOCK(htim);
800ba72: 687b ldr r3, [r7, #4]
800ba74: 2200 movs r2, #0
800ba76: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800ba7a: 2300 movs r3, #0
}
800ba7c: 4618 mov r0, r3
800ba7e: 3714 adds r7, #20
800ba80: 46bd mov sp, r7
800ba82: f85d 7b04 ldr.w r7, [sp], #4
800ba86: 4770 bx lr
800ba88: 40010000 .word 0x40010000
800ba8c: 40010400 .word 0x40010400
800ba90: 40000400 .word 0x40000400
800ba94: 40000800 .word 0x40000800
800ba98: 40000c00 .word 0x40000c00
800ba9c: 40014000 .word 0x40014000
800baa0: 40001800 .word 0x40001800
0800baa4 <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)
{
800baa4: b480 push {r7}
800baa6: b085 sub sp, #20
800baa8: af00 add r7, sp, #0
800baaa: 6078 str r0, [r7, #4]
800baac: 6039 str r1, [r7, #0]
/* Keep this variable initialized to 0 as it is used to configure BDTR register */
uint32_t tmpbdtr = 0U;
800baae: 2300 movs r3, #0
800bab0: 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);
800bab2: 687b ldr r3, [r7, #4]
800bab4: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
800bab8: 2b01 cmp r3, #1
800baba: d101 bne.n 800bac0 <HAL_TIMEx_ConfigBreakDeadTime+0x1c>
800babc: 2302 movs r3, #2
800babe: e065 b.n 800bb8c <HAL_TIMEx_ConfigBreakDeadTime+0xe8>
800bac0: 687b ldr r3, [r7, #4]
800bac2: 2201 movs r2, #1
800bac4: 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);
800bac8: 68fb ldr r3, [r7, #12]
800baca: f023 02ff bic.w r2, r3, #255 ; 0xff
800bace: 683b ldr r3, [r7, #0]
800bad0: 68db ldr r3, [r3, #12]
800bad2: 4313 orrs r3, r2
800bad4: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_LOCK, sBreakDeadTimeConfig->LockLevel);
800bad6: 68fb ldr r3, [r7, #12]
800bad8: f423 7240 bic.w r2, r3, #768 ; 0x300
800badc: 683b ldr r3, [r7, #0]
800bade: 689b ldr r3, [r3, #8]
800bae0: 4313 orrs r3, r2
800bae2: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_OSSI, sBreakDeadTimeConfig->OffStateIDLEMode);
800bae4: 68fb ldr r3, [r7, #12]
800bae6: f423 6280 bic.w r2, r3, #1024 ; 0x400
800baea: 683b ldr r3, [r7, #0]
800baec: 685b ldr r3, [r3, #4]
800baee: 4313 orrs r3, r2
800baf0: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_OSSR, sBreakDeadTimeConfig->OffStateRunMode);
800baf2: 68fb ldr r3, [r7, #12]
800baf4: f423 6200 bic.w r2, r3, #2048 ; 0x800
800baf8: 683b ldr r3, [r7, #0]
800bafa: 681b ldr r3, [r3, #0]
800bafc: 4313 orrs r3, r2
800bafe: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BKE, sBreakDeadTimeConfig->BreakState);
800bb00: 68fb ldr r3, [r7, #12]
800bb02: f423 5280 bic.w r2, r3, #4096 ; 0x1000
800bb06: 683b ldr r3, [r7, #0]
800bb08: 691b ldr r3, [r3, #16]
800bb0a: 4313 orrs r3, r2
800bb0c: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BKP, sBreakDeadTimeConfig->BreakPolarity);
800bb0e: 68fb ldr r3, [r7, #12]
800bb10: f423 5200 bic.w r2, r3, #8192 ; 0x2000
800bb14: 683b ldr r3, [r7, #0]
800bb16: 695b ldr r3, [r3, #20]
800bb18: 4313 orrs r3, r2
800bb1a: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_AOE, sBreakDeadTimeConfig->AutomaticOutput);
800bb1c: 68fb ldr r3, [r7, #12]
800bb1e: f423 4280 bic.w r2, r3, #16384 ; 0x4000
800bb22: 683b ldr r3, [r7, #0]
800bb24: 6a9b ldr r3, [r3, #40] ; 0x28
800bb26: 4313 orrs r3, r2
800bb28: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BKF, (sBreakDeadTimeConfig->BreakFilter << TIM_BDTR_BKF_Pos));
800bb2a: 68fb ldr r3, [r7, #12]
800bb2c: f423 2270 bic.w r2, r3, #983040 ; 0xf0000
800bb30: 683b ldr r3, [r7, #0]
800bb32: 699b ldr r3, [r3, #24]
800bb34: 041b lsls r3, r3, #16
800bb36: 4313 orrs r3, r2
800bb38: 60fb str r3, [r7, #12]
if (IS_TIM_BKIN2_INSTANCE(htim->Instance))
800bb3a: 687b ldr r3, [r7, #4]
800bb3c: 681b ldr r3, [r3, #0]
800bb3e: 4a16 ldr r2, [pc, #88] ; (800bb98 <HAL_TIMEx_ConfigBreakDeadTime+0xf4>)
800bb40: 4293 cmp r3, r2
800bb42: d004 beq.n 800bb4e <HAL_TIMEx_ConfigBreakDeadTime+0xaa>
800bb44: 687b ldr r3, [r7, #4]
800bb46: 681b ldr r3, [r3, #0]
800bb48: 4a14 ldr r2, [pc, #80] ; (800bb9c <HAL_TIMEx_ConfigBreakDeadTime+0xf8>)
800bb4a: 4293 cmp r3, r2
800bb4c: d115 bne.n 800bb7a <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));
800bb4e: 68fb ldr r3, [r7, #12]
800bb50: f423 0270 bic.w r2, r3, #15728640 ; 0xf00000
800bb54: 683b ldr r3, [r7, #0]
800bb56: 6a5b ldr r3, [r3, #36] ; 0x24
800bb58: 051b lsls r3, r3, #20
800bb5a: 4313 orrs r3, r2
800bb5c: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BK2E, sBreakDeadTimeConfig->Break2State);
800bb5e: 68fb ldr r3, [r7, #12]
800bb60: f023 7280 bic.w r2, r3, #16777216 ; 0x1000000
800bb64: 683b ldr r3, [r7, #0]
800bb66: 69db ldr r3, [r3, #28]
800bb68: 4313 orrs r3, r2
800bb6a: 60fb str r3, [r7, #12]
MODIFY_REG(tmpbdtr, TIM_BDTR_BK2P, sBreakDeadTimeConfig->Break2Polarity);
800bb6c: 68fb ldr r3, [r7, #12]
800bb6e: f023 7200 bic.w r2, r3, #33554432 ; 0x2000000
800bb72: 683b ldr r3, [r7, #0]
800bb74: 6a1b ldr r3, [r3, #32]
800bb76: 4313 orrs r3, r2
800bb78: 60fb str r3, [r7, #12]
}
/* Set TIMx_BDTR */
htim->Instance->BDTR = tmpbdtr;
800bb7a: 687b ldr r3, [r7, #4]
800bb7c: 681b ldr r3, [r3, #0]
800bb7e: 68fa ldr r2, [r7, #12]
800bb80: 645a str r2, [r3, #68] ; 0x44
__HAL_UNLOCK(htim);
800bb82: 687b ldr r3, [r7, #4]
800bb84: 2200 movs r2, #0
800bb86: f883 203c strb.w r2, [r3, #60] ; 0x3c
return HAL_OK;
800bb8a: 2300 movs r3, #0
}
800bb8c: 4618 mov r0, r3
800bb8e: 3714 adds r7, #20
800bb90: 46bd mov sp, r7
800bb92: f85d 7b04 ldr.w r7, [sp], #4
800bb96: 4770 bx lr
800bb98: 40010000 .word 0x40010000
800bb9c: 40010400 .word 0x40010400
0800bba0 <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)
{
800bba0: b480 push {r7}
800bba2: b083 sub sp, #12
800bba4: af00 add r7, sp, #0
800bba6: 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
*/
}
800bba8: bf00 nop
800bbaa: 370c adds r7, #12
800bbac: 46bd mov sp, r7
800bbae: f85d 7b04 ldr.w r7, [sp], #4
800bbb2: 4770 bx lr
0800bbb4 <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)
{
800bbb4: b480 push {r7}
800bbb6: b083 sub sp, #12
800bbb8: af00 add r7, sp, #0
800bbba: 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
*/
}
800bbbc: bf00 nop
800bbbe: 370c adds r7, #12
800bbc0: 46bd mov sp, r7
800bbc2: f85d 7b04 ldr.w r7, [sp], #4
800bbc6: 4770 bx lr
0800bbc8 <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)
{
800bbc8: b480 push {r7}
800bbca: b083 sub sp, #12
800bbcc: af00 add r7, sp, #0
800bbce: 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
*/
}
800bbd0: bf00 nop
800bbd2: 370c adds r7, #12
800bbd4: 46bd mov sp, r7
800bbd6: f85d 7b04 ldr.w r7, [sp], #4
800bbda: 4770 bx lr
0800bbdc <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)
{
800bbdc: b580 push {r7, lr}
800bbde: b082 sub sp, #8
800bbe0: af00 add r7, sp, #0
800bbe2: 6078 str r0, [r7, #4]
/* Check the UART handle allocation */
if (huart == NULL)
800bbe4: 687b ldr r3, [r7, #4]
800bbe6: 2b00 cmp r3, #0
800bbe8: d101 bne.n 800bbee <HAL_UART_Init+0x12>
{
return HAL_ERROR;
800bbea: 2301 movs r3, #1
800bbec: e040 b.n 800bc70 <HAL_UART_Init+0x94>
{
/* Check the parameters */
assert_param(IS_UART_INSTANCE(huart->Instance));
}
if (huart->gState == HAL_UART_STATE_RESET)
800bbee: 687b ldr r3, [r7, #4]
800bbf0: 6f5b ldr r3, [r3, #116] ; 0x74
800bbf2: 2b00 cmp r3, #0
800bbf4: d106 bne.n 800bc04 <HAL_UART_Init+0x28>
{
/* Allocate lock resource and initialize it */
huart->Lock = HAL_UNLOCKED;
800bbf6: 687b ldr r3, [r7, #4]
800bbf8: 2200 movs r2, #0
800bbfa: 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);
800bbfe: 6878 ldr r0, [r7, #4]
800bc00: f7f8 fd56 bl 80046b0 <HAL_UART_MspInit>
#endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
}
huart->gState = HAL_UART_STATE_BUSY;
800bc04: 687b ldr r3, [r7, #4]
800bc06: 2224 movs r2, #36 ; 0x24
800bc08: 675a str r2, [r3, #116] ; 0x74
__HAL_UART_DISABLE(huart);
800bc0a: 687b ldr r3, [r7, #4]
800bc0c: 681b ldr r3, [r3, #0]
800bc0e: 681a ldr r2, [r3, #0]
800bc10: 687b ldr r3, [r7, #4]
800bc12: 681b ldr r3, [r3, #0]
800bc14: f022 0201 bic.w r2, r2, #1
800bc18: 601a str r2, [r3, #0]
/* Set the UART Communication parameters */
if (UART_SetConfig(huart) == HAL_ERROR)
800bc1a: 6878 ldr r0, [r7, #4]
800bc1c: f000 f82c bl 800bc78 <UART_SetConfig>
800bc20: 4603 mov r3, r0
800bc22: 2b01 cmp r3, #1
800bc24: d101 bne.n 800bc2a <HAL_UART_Init+0x4e>
{
return HAL_ERROR;
800bc26: 2301 movs r3, #1
800bc28: e022 b.n 800bc70 <HAL_UART_Init+0x94>
}
if (huart->AdvancedInit.AdvFeatureInit != UART_ADVFEATURE_NO_INIT)
800bc2a: 687b ldr r3, [r7, #4]
800bc2c: 6a5b ldr r3, [r3, #36] ; 0x24
800bc2e: 2b00 cmp r3, #0
800bc30: d002 beq.n 800bc38 <HAL_UART_Init+0x5c>
{
UART_AdvFeatureConfig(huart);
800bc32: 6878 ldr r0, [r7, #4]
800bc34: f000 faca bl 800c1cc <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));
800bc38: 687b ldr r3, [r7, #4]
800bc3a: 681b ldr r3, [r3, #0]
800bc3c: 685a ldr r2, [r3, #4]
800bc3e: 687b ldr r3, [r7, #4]
800bc40: 681b ldr r3, [r3, #0]
800bc42: f422 4290 bic.w r2, r2, #18432 ; 0x4800
800bc46: 605a str r2, [r3, #4]
CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN));
800bc48: 687b ldr r3, [r7, #4]
800bc4a: 681b ldr r3, [r3, #0]
800bc4c: 689a ldr r2, [r3, #8]
800bc4e: 687b ldr r3, [r7, #4]
800bc50: 681b ldr r3, [r3, #0]
800bc52: f022 022a bic.w r2, r2, #42 ; 0x2a
800bc56: 609a str r2, [r3, #8]
__HAL_UART_ENABLE(huart);
800bc58: 687b ldr r3, [r7, #4]
800bc5a: 681b ldr r3, [r3, #0]
800bc5c: 681a ldr r2, [r3, #0]
800bc5e: 687b ldr r3, [r7, #4]
800bc60: 681b ldr r3, [r3, #0]
800bc62: f042 0201 orr.w r2, r2, #1
800bc66: 601a str r2, [r3, #0]
/* TEACK and/or REACK to check before moving huart->gState and huart->RxState to Ready */
return (UART_CheckIdleState(huart));
800bc68: 6878 ldr r0, [r7, #4]
800bc6a: f000 fb51 bl 800c310 <UART_CheckIdleState>
800bc6e: 4603 mov r3, r0
}
800bc70: 4618 mov r0, r3
800bc72: 3708 adds r7, #8
800bc74: 46bd mov sp, r7
800bc76: bd80 pop {r7, pc}
0800bc78 <UART_SetConfig>:
* @brief Configure the UART peripheral.
* @param huart UART handle.
* @retval HAL status
*/
HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart)
{
800bc78: b580 push {r7, lr}
800bc7a: b088 sub sp, #32
800bc7c: af00 add r7, sp, #0
800bc7e: 6078 str r0, [r7, #4]
uint32_t tmpreg;
uint16_t brrtemp;
UART_ClockSourceTypeDef clocksource;
uint32_t usartdiv = 0x00000000U;
800bc80: 2300 movs r3, #0
800bc82: 61bb str r3, [r7, #24]
HAL_StatusTypeDef ret = HAL_OK;
800bc84: 2300 movs r3, #0
800bc86: 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 ;
800bc88: 687b ldr r3, [r7, #4]
800bc8a: 689a ldr r2, [r3, #8]
800bc8c: 687b ldr r3, [r7, #4]
800bc8e: 691b ldr r3, [r3, #16]
800bc90: 431a orrs r2, r3
800bc92: 687b ldr r3, [r7, #4]
800bc94: 695b ldr r3, [r3, #20]
800bc96: 431a orrs r2, r3
800bc98: 687b ldr r3, [r7, #4]
800bc9a: 69db ldr r3, [r3, #28]
800bc9c: 4313 orrs r3, r2
800bc9e: 613b str r3, [r7, #16]
MODIFY_REG(huart->Instance->CR1, USART_CR1_FIELDS, tmpreg);
800bca0: 687b ldr r3, [r7, #4]
800bca2: 681b ldr r3, [r3, #0]
800bca4: 681a ldr r2, [r3, #0]
800bca6: 4bb1 ldr r3, [pc, #708] ; (800bf6c <UART_SetConfig+0x2f4>)
800bca8: 4013 ands r3, r2
800bcaa: 687a ldr r2, [r7, #4]
800bcac: 6812 ldr r2, [r2, #0]
800bcae: 6939 ldr r1, [r7, #16]
800bcb0: 430b orrs r3, r1
800bcb2: 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);
800bcb4: 687b ldr r3, [r7, #4]
800bcb6: 681b ldr r3, [r3, #0]
800bcb8: 685b ldr r3, [r3, #4]
800bcba: f423 5140 bic.w r1, r3, #12288 ; 0x3000
800bcbe: 687b ldr r3, [r7, #4]
800bcc0: 68da ldr r2, [r3, #12]
800bcc2: 687b ldr r3, [r7, #4]
800bcc4: 681b ldr r3, [r3, #0]
800bcc6: 430a orrs r2, r1
800bcc8: 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;
800bcca: 687b ldr r3, [r7, #4]
800bccc: 699b ldr r3, [r3, #24]
800bcce: 613b str r3, [r7, #16]
tmpreg |= huart->Init.OneBitSampling;
800bcd0: 687b ldr r3, [r7, #4]
800bcd2: 6a1b ldr r3, [r3, #32]
800bcd4: 693a ldr r2, [r7, #16]
800bcd6: 4313 orrs r3, r2
800bcd8: 613b str r3, [r7, #16]
MODIFY_REG(huart->Instance->CR3, USART_CR3_FIELDS, tmpreg);
800bcda: 687b ldr r3, [r7, #4]
800bcdc: 681b ldr r3, [r3, #0]
800bcde: 689b ldr r3, [r3, #8]
800bce0: f423 6130 bic.w r1, r3, #2816 ; 0xb00
800bce4: 687b ldr r3, [r7, #4]
800bce6: 681b ldr r3, [r3, #0]
800bce8: 693a ldr r2, [r7, #16]
800bcea: 430a orrs r2, r1
800bcec: 609a str r2, [r3, #8]
/*-------------------------- USART BRR Configuration -----------------------*/
UART_GETCLOCKSOURCE(huart, clocksource);
800bcee: 687b ldr r3, [r7, #4]
800bcf0: 681b ldr r3, [r3, #0]
800bcf2: 4a9f ldr r2, [pc, #636] ; (800bf70 <UART_SetConfig+0x2f8>)
800bcf4: 4293 cmp r3, r2
800bcf6: d121 bne.n 800bd3c <UART_SetConfig+0xc4>
800bcf8: 4b9e ldr r3, [pc, #632] ; (800bf74 <UART_SetConfig+0x2fc>)
800bcfa: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800bcfe: f003 0303 and.w r3, r3, #3
800bd02: 2b03 cmp r3, #3
800bd04: d816 bhi.n 800bd34 <UART_SetConfig+0xbc>
800bd06: a201 add r2, pc, #4 ; (adr r2, 800bd0c <UART_SetConfig+0x94>)
800bd08: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800bd0c: 0800bd1d .word 0x0800bd1d
800bd10: 0800bd29 .word 0x0800bd29
800bd14: 0800bd23 .word 0x0800bd23
800bd18: 0800bd2f .word 0x0800bd2f
800bd1c: 2301 movs r3, #1
800bd1e: 77fb strb r3, [r7, #31]
800bd20: e151 b.n 800bfc6 <UART_SetConfig+0x34e>
800bd22: 2302 movs r3, #2
800bd24: 77fb strb r3, [r7, #31]
800bd26: e14e b.n 800bfc6 <UART_SetConfig+0x34e>
800bd28: 2304 movs r3, #4
800bd2a: 77fb strb r3, [r7, #31]
800bd2c: e14b b.n 800bfc6 <UART_SetConfig+0x34e>
800bd2e: 2308 movs r3, #8
800bd30: 77fb strb r3, [r7, #31]
800bd32: e148 b.n 800bfc6 <UART_SetConfig+0x34e>
800bd34: 2310 movs r3, #16
800bd36: 77fb strb r3, [r7, #31]
800bd38: bf00 nop
800bd3a: e144 b.n 800bfc6 <UART_SetConfig+0x34e>
800bd3c: 687b ldr r3, [r7, #4]
800bd3e: 681b ldr r3, [r3, #0]
800bd40: 4a8d ldr r2, [pc, #564] ; (800bf78 <UART_SetConfig+0x300>)
800bd42: 4293 cmp r3, r2
800bd44: d134 bne.n 800bdb0 <UART_SetConfig+0x138>
800bd46: 4b8b ldr r3, [pc, #556] ; (800bf74 <UART_SetConfig+0x2fc>)
800bd48: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800bd4c: f003 030c and.w r3, r3, #12
800bd50: 2b0c cmp r3, #12
800bd52: d829 bhi.n 800bda8 <UART_SetConfig+0x130>
800bd54: a201 add r2, pc, #4 ; (adr r2, 800bd5c <UART_SetConfig+0xe4>)
800bd56: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800bd5a: bf00 nop
800bd5c: 0800bd91 .word 0x0800bd91
800bd60: 0800bda9 .word 0x0800bda9
800bd64: 0800bda9 .word 0x0800bda9
800bd68: 0800bda9 .word 0x0800bda9
800bd6c: 0800bd9d .word 0x0800bd9d
800bd70: 0800bda9 .word 0x0800bda9
800bd74: 0800bda9 .word 0x0800bda9
800bd78: 0800bda9 .word 0x0800bda9
800bd7c: 0800bd97 .word 0x0800bd97
800bd80: 0800bda9 .word 0x0800bda9
800bd84: 0800bda9 .word 0x0800bda9
800bd88: 0800bda9 .word 0x0800bda9
800bd8c: 0800bda3 .word 0x0800bda3
800bd90: 2300 movs r3, #0
800bd92: 77fb strb r3, [r7, #31]
800bd94: e117 b.n 800bfc6 <UART_SetConfig+0x34e>
800bd96: 2302 movs r3, #2
800bd98: 77fb strb r3, [r7, #31]
800bd9a: e114 b.n 800bfc6 <UART_SetConfig+0x34e>
800bd9c: 2304 movs r3, #4
800bd9e: 77fb strb r3, [r7, #31]
800bda0: e111 b.n 800bfc6 <UART_SetConfig+0x34e>
800bda2: 2308 movs r3, #8
800bda4: 77fb strb r3, [r7, #31]
800bda6: e10e b.n 800bfc6 <UART_SetConfig+0x34e>
800bda8: 2310 movs r3, #16
800bdaa: 77fb strb r3, [r7, #31]
800bdac: bf00 nop
800bdae: e10a b.n 800bfc6 <UART_SetConfig+0x34e>
800bdb0: 687b ldr r3, [r7, #4]
800bdb2: 681b ldr r3, [r3, #0]
800bdb4: 4a71 ldr r2, [pc, #452] ; (800bf7c <UART_SetConfig+0x304>)
800bdb6: 4293 cmp r3, r2
800bdb8: d120 bne.n 800bdfc <UART_SetConfig+0x184>
800bdba: 4b6e ldr r3, [pc, #440] ; (800bf74 <UART_SetConfig+0x2fc>)
800bdbc: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800bdc0: f003 0330 and.w r3, r3, #48 ; 0x30
800bdc4: 2b10 cmp r3, #16
800bdc6: d00f beq.n 800bde8 <UART_SetConfig+0x170>
800bdc8: 2b10 cmp r3, #16
800bdca: d802 bhi.n 800bdd2 <UART_SetConfig+0x15a>
800bdcc: 2b00 cmp r3, #0
800bdce: d005 beq.n 800bddc <UART_SetConfig+0x164>
800bdd0: e010 b.n 800bdf4 <UART_SetConfig+0x17c>
800bdd2: 2b20 cmp r3, #32
800bdd4: d005 beq.n 800bde2 <UART_SetConfig+0x16a>
800bdd6: 2b30 cmp r3, #48 ; 0x30
800bdd8: d009 beq.n 800bdee <UART_SetConfig+0x176>
800bdda: e00b b.n 800bdf4 <UART_SetConfig+0x17c>
800bddc: 2300 movs r3, #0
800bdde: 77fb strb r3, [r7, #31]
800bde0: e0f1 b.n 800bfc6 <UART_SetConfig+0x34e>
800bde2: 2302 movs r3, #2
800bde4: 77fb strb r3, [r7, #31]
800bde6: e0ee b.n 800bfc6 <UART_SetConfig+0x34e>
800bde8: 2304 movs r3, #4
800bdea: 77fb strb r3, [r7, #31]
800bdec: e0eb b.n 800bfc6 <UART_SetConfig+0x34e>
800bdee: 2308 movs r3, #8
800bdf0: 77fb strb r3, [r7, #31]
800bdf2: e0e8 b.n 800bfc6 <UART_SetConfig+0x34e>
800bdf4: 2310 movs r3, #16
800bdf6: 77fb strb r3, [r7, #31]
800bdf8: bf00 nop
800bdfa: e0e4 b.n 800bfc6 <UART_SetConfig+0x34e>
800bdfc: 687b ldr r3, [r7, #4]
800bdfe: 681b ldr r3, [r3, #0]
800be00: 4a5f ldr r2, [pc, #380] ; (800bf80 <UART_SetConfig+0x308>)
800be02: 4293 cmp r3, r2
800be04: d120 bne.n 800be48 <UART_SetConfig+0x1d0>
800be06: 4b5b ldr r3, [pc, #364] ; (800bf74 <UART_SetConfig+0x2fc>)
800be08: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800be0c: f003 03c0 and.w r3, r3, #192 ; 0xc0
800be10: 2b40 cmp r3, #64 ; 0x40
800be12: d00f beq.n 800be34 <UART_SetConfig+0x1bc>
800be14: 2b40 cmp r3, #64 ; 0x40
800be16: d802 bhi.n 800be1e <UART_SetConfig+0x1a6>
800be18: 2b00 cmp r3, #0
800be1a: d005 beq.n 800be28 <UART_SetConfig+0x1b0>
800be1c: e010 b.n 800be40 <UART_SetConfig+0x1c8>
800be1e: 2b80 cmp r3, #128 ; 0x80
800be20: d005 beq.n 800be2e <UART_SetConfig+0x1b6>
800be22: 2bc0 cmp r3, #192 ; 0xc0
800be24: d009 beq.n 800be3a <UART_SetConfig+0x1c2>
800be26: e00b b.n 800be40 <UART_SetConfig+0x1c8>
800be28: 2300 movs r3, #0
800be2a: 77fb strb r3, [r7, #31]
800be2c: e0cb b.n 800bfc6 <UART_SetConfig+0x34e>
800be2e: 2302 movs r3, #2
800be30: 77fb strb r3, [r7, #31]
800be32: e0c8 b.n 800bfc6 <UART_SetConfig+0x34e>
800be34: 2304 movs r3, #4
800be36: 77fb strb r3, [r7, #31]
800be38: e0c5 b.n 800bfc6 <UART_SetConfig+0x34e>
800be3a: 2308 movs r3, #8
800be3c: 77fb strb r3, [r7, #31]
800be3e: e0c2 b.n 800bfc6 <UART_SetConfig+0x34e>
800be40: 2310 movs r3, #16
800be42: 77fb strb r3, [r7, #31]
800be44: bf00 nop
800be46: e0be b.n 800bfc6 <UART_SetConfig+0x34e>
800be48: 687b ldr r3, [r7, #4]
800be4a: 681b ldr r3, [r3, #0]
800be4c: 4a4d ldr r2, [pc, #308] ; (800bf84 <UART_SetConfig+0x30c>)
800be4e: 4293 cmp r3, r2
800be50: d124 bne.n 800be9c <UART_SetConfig+0x224>
800be52: 4b48 ldr r3, [pc, #288] ; (800bf74 <UART_SetConfig+0x2fc>)
800be54: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800be58: f403 7340 and.w r3, r3, #768 ; 0x300
800be5c: f5b3 7f80 cmp.w r3, #256 ; 0x100
800be60: d012 beq.n 800be88 <UART_SetConfig+0x210>
800be62: f5b3 7f80 cmp.w r3, #256 ; 0x100
800be66: d802 bhi.n 800be6e <UART_SetConfig+0x1f6>
800be68: 2b00 cmp r3, #0
800be6a: d007 beq.n 800be7c <UART_SetConfig+0x204>
800be6c: e012 b.n 800be94 <UART_SetConfig+0x21c>
800be6e: f5b3 7f00 cmp.w r3, #512 ; 0x200
800be72: d006 beq.n 800be82 <UART_SetConfig+0x20a>
800be74: f5b3 7f40 cmp.w r3, #768 ; 0x300
800be78: d009 beq.n 800be8e <UART_SetConfig+0x216>
800be7a: e00b b.n 800be94 <UART_SetConfig+0x21c>
800be7c: 2300 movs r3, #0
800be7e: 77fb strb r3, [r7, #31]
800be80: e0a1 b.n 800bfc6 <UART_SetConfig+0x34e>
800be82: 2302 movs r3, #2
800be84: 77fb strb r3, [r7, #31]
800be86: e09e b.n 800bfc6 <UART_SetConfig+0x34e>
800be88: 2304 movs r3, #4
800be8a: 77fb strb r3, [r7, #31]
800be8c: e09b b.n 800bfc6 <UART_SetConfig+0x34e>
800be8e: 2308 movs r3, #8
800be90: 77fb strb r3, [r7, #31]
800be92: e098 b.n 800bfc6 <UART_SetConfig+0x34e>
800be94: 2310 movs r3, #16
800be96: 77fb strb r3, [r7, #31]
800be98: bf00 nop
800be9a: e094 b.n 800bfc6 <UART_SetConfig+0x34e>
800be9c: 687b ldr r3, [r7, #4]
800be9e: 681b ldr r3, [r3, #0]
800bea0: 4a39 ldr r2, [pc, #228] ; (800bf88 <UART_SetConfig+0x310>)
800bea2: 4293 cmp r3, r2
800bea4: d124 bne.n 800bef0 <UART_SetConfig+0x278>
800bea6: 4b33 ldr r3, [pc, #204] ; (800bf74 <UART_SetConfig+0x2fc>)
800bea8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800beac: f403 6340 and.w r3, r3, #3072 ; 0xc00
800beb0: f5b3 6f80 cmp.w r3, #1024 ; 0x400
800beb4: d012 beq.n 800bedc <UART_SetConfig+0x264>
800beb6: f5b3 6f80 cmp.w r3, #1024 ; 0x400
800beba: d802 bhi.n 800bec2 <UART_SetConfig+0x24a>
800bebc: 2b00 cmp r3, #0
800bebe: d007 beq.n 800bed0 <UART_SetConfig+0x258>
800bec0: e012 b.n 800bee8 <UART_SetConfig+0x270>
800bec2: f5b3 6f00 cmp.w r3, #2048 ; 0x800
800bec6: d006 beq.n 800bed6 <UART_SetConfig+0x25e>
800bec8: f5b3 6f40 cmp.w r3, #3072 ; 0xc00
800becc: d009 beq.n 800bee2 <UART_SetConfig+0x26a>
800bece: e00b b.n 800bee8 <UART_SetConfig+0x270>
800bed0: 2301 movs r3, #1
800bed2: 77fb strb r3, [r7, #31]
800bed4: e077 b.n 800bfc6 <UART_SetConfig+0x34e>
800bed6: 2302 movs r3, #2
800bed8: 77fb strb r3, [r7, #31]
800beda: e074 b.n 800bfc6 <UART_SetConfig+0x34e>
800bedc: 2304 movs r3, #4
800bede: 77fb strb r3, [r7, #31]
800bee0: e071 b.n 800bfc6 <UART_SetConfig+0x34e>
800bee2: 2308 movs r3, #8
800bee4: 77fb strb r3, [r7, #31]
800bee6: e06e b.n 800bfc6 <UART_SetConfig+0x34e>
800bee8: 2310 movs r3, #16
800beea: 77fb strb r3, [r7, #31]
800beec: bf00 nop
800beee: e06a b.n 800bfc6 <UART_SetConfig+0x34e>
800bef0: 687b ldr r3, [r7, #4]
800bef2: 681b ldr r3, [r3, #0]
800bef4: 4a25 ldr r2, [pc, #148] ; (800bf8c <UART_SetConfig+0x314>)
800bef6: 4293 cmp r3, r2
800bef8: d124 bne.n 800bf44 <UART_SetConfig+0x2cc>
800befa: 4b1e ldr r3, [pc, #120] ; (800bf74 <UART_SetConfig+0x2fc>)
800befc: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800bf00: f403 5340 and.w r3, r3, #12288 ; 0x3000
800bf04: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
800bf08: d012 beq.n 800bf30 <UART_SetConfig+0x2b8>
800bf0a: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
800bf0e: d802 bhi.n 800bf16 <UART_SetConfig+0x29e>
800bf10: 2b00 cmp r3, #0
800bf12: d007 beq.n 800bf24 <UART_SetConfig+0x2ac>
800bf14: e012 b.n 800bf3c <UART_SetConfig+0x2c4>
800bf16: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
800bf1a: d006 beq.n 800bf2a <UART_SetConfig+0x2b2>
800bf1c: f5b3 5f40 cmp.w r3, #12288 ; 0x3000
800bf20: d009 beq.n 800bf36 <UART_SetConfig+0x2be>
800bf22: e00b b.n 800bf3c <UART_SetConfig+0x2c4>
800bf24: 2300 movs r3, #0
800bf26: 77fb strb r3, [r7, #31]
800bf28: e04d b.n 800bfc6 <UART_SetConfig+0x34e>
800bf2a: 2302 movs r3, #2
800bf2c: 77fb strb r3, [r7, #31]
800bf2e: e04a b.n 800bfc6 <UART_SetConfig+0x34e>
800bf30: 2304 movs r3, #4
800bf32: 77fb strb r3, [r7, #31]
800bf34: e047 b.n 800bfc6 <UART_SetConfig+0x34e>
800bf36: 2308 movs r3, #8
800bf38: 77fb strb r3, [r7, #31]
800bf3a: e044 b.n 800bfc6 <UART_SetConfig+0x34e>
800bf3c: 2310 movs r3, #16
800bf3e: 77fb strb r3, [r7, #31]
800bf40: bf00 nop
800bf42: e040 b.n 800bfc6 <UART_SetConfig+0x34e>
800bf44: 687b ldr r3, [r7, #4]
800bf46: 681b ldr r3, [r3, #0]
800bf48: 4a11 ldr r2, [pc, #68] ; (800bf90 <UART_SetConfig+0x318>)
800bf4a: 4293 cmp r3, r2
800bf4c: d139 bne.n 800bfc2 <UART_SetConfig+0x34a>
800bf4e: 4b09 ldr r3, [pc, #36] ; (800bf74 <UART_SetConfig+0x2fc>)
800bf50: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
800bf54: f403 4340 and.w r3, r3, #49152 ; 0xc000
800bf58: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
800bf5c: d027 beq.n 800bfae <UART_SetConfig+0x336>
800bf5e: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
800bf62: d817 bhi.n 800bf94 <UART_SetConfig+0x31c>
800bf64: 2b00 cmp r3, #0
800bf66: d01c beq.n 800bfa2 <UART_SetConfig+0x32a>
800bf68: e027 b.n 800bfba <UART_SetConfig+0x342>
800bf6a: bf00 nop
800bf6c: efff69f3 .word 0xefff69f3
800bf70: 40011000 .word 0x40011000
800bf74: 40023800 .word 0x40023800
800bf78: 40004400 .word 0x40004400
800bf7c: 40004800 .word 0x40004800
800bf80: 40004c00 .word 0x40004c00
800bf84: 40005000 .word 0x40005000
800bf88: 40011400 .word 0x40011400
800bf8c: 40007800 .word 0x40007800
800bf90: 40007c00 .word 0x40007c00
800bf94: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
800bf98: d006 beq.n 800bfa8 <UART_SetConfig+0x330>
800bf9a: f5b3 4f40 cmp.w r3, #49152 ; 0xc000
800bf9e: d009 beq.n 800bfb4 <UART_SetConfig+0x33c>
800bfa0: e00b b.n 800bfba <UART_SetConfig+0x342>
800bfa2: 2300 movs r3, #0
800bfa4: 77fb strb r3, [r7, #31]
800bfa6: e00e b.n 800bfc6 <UART_SetConfig+0x34e>
800bfa8: 2302 movs r3, #2
800bfaa: 77fb strb r3, [r7, #31]
800bfac: e00b b.n 800bfc6 <UART_SetConfig+0x34e>
800bfae: 2304 movs r3, #4
800bfb0: 77fb strb r3, [r7, #31]
800bfb2: e008 b.n 800bfc6 <UART_SetConfig+0x34e>
800bfb4: 2308 movs r3, #8
800bfb6: 77fb strb r3, [r7, #31]
800bfb8: e005 b.n 800bfc6 <UART_SetConfig+0x34e>
800bfba: 2310 movs r3, #16
800bfbc: 77fb strb r3, [r7, #31]
800bfbe: bf00 nop
800bfc0: e001 b.n 800bfc6 <UART_SetConfig+0x34e>
800bfc2: 2310 movs r3, #16
800bfc4: 77fb strb r3, [r7, #31]
if (huart->Init.OverSampling == UART_OVERSAMPLING_8)
800bfc6: 687b ldr r3, [r7, #4]
800bfc8: 69db ldr r3, [r3, #28]
800bfca: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
800bfce: d17f bne.n 800c0d0 <UART_SetConfig+0x458>
{
switch (clocksource)
800bfd0: 7ffb ldrb r3, [r7, #31]
800bfd2: 2b08 cmp r3, #8
800bfd4: d85c bhi.n 800c090 <UART_SetConfig+0x418>
800bfd6: a201 add r2, pc, #4 ; (adr r2, 800bfdc <UART_SetConfig+0x364>)
800bfd8: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800bfdc: 0800c001 .word 0x0800c001
800bfe0: 0800c021 .word 0x0800c021
800bfe4: 0800c041 .word 0x0800c041
800bfe8: 0800c091 .word 0x0800c091
800bfec: 0800c059 .word 0x0800c059
800bff0: 0800c091 .word 0x0800c091
800bff4: 0800c091 .word 0x0800c091
800bff8: 0800c091 .word 0x0800c091
800bffc: 0800c079 .word 0x0800c079
{
case UART_CLOCKSOURCE_PCLK1:
pclk = HAL_RCC_GetPCLK1Freq();
800c000: f7fd fb78 bl 80096f4 <HAL_RCC_GetPCLK1Freq>
800c004: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate));
800c006: 68fb ldr r3, [r7, #12]
800c008: 005a lsls r2, r3, #1
800c00a: 687b ldr r3, [r7, #4]
800c00c: 685b ldr r3, [r3, #4]
800c00e: 085b lsrs r3, r3, #1
800c010: 441a add r2, r3
800c012: 687b ldr r3, [r7, #4]
800c014: 685b ldr r3, [r3, #4]
800c016: fbb2 f3f3 udiv r3, r2, r3
800c01a: b29b uxth r3, r3
800c01c: 61bb str r3, [r7, #24]
break;
800c01e: e03a b.n 800c096 <UART_SetConfig+0x41e>
case UART_CLOCKSOURCE_PCLK2:
pclk = HAL_RCC_GetPCLK2Freq();
800c020: f7fd fb7c bl 800971c <HAL_RCC_GetPCLK2Freq>
800c024: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate));
800c026: 68fb ldr r3, [r7, #12]
800c028: 005a lsls r2, r3, #1
800c02a: 687b ldr r3, [r7, #4]
800c02c: 685b ldr r3, [r3, #4]
800c02e: 085b lsrs r3, r3, #1
800c030: 441a add r2, r3
800c032: 687b ldr r3, [r7, #4]
800c034: 685b ldr r3, [r3, #4]
800c036: fbb2 f3f3 udiv r3, r2, r3
800c03a: b29b uxth r3, r3
800c03c: 61bb str r3, [r7, #24]
break;
800c03e: e02a b.n 800c096 <UART_SetConfig+0x41e>
case UART_CLOCKSOURCE_HSI:
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(HSI_VALUE, huart->Init.BaudRate));
800c040: 687b ldr r3, [r7, #4]
800c042: 685b ldr r3, [r3, #4]
800c044: 085a lsrs r2, r3, #1
800c046: 4b5f ldr r3, [pc, #380] ; (800c1c4 <UART_SetConfig+0x54c>)
800c048: 4413 add r3, r2
800c04a: 687a ldr r2, [r7, #4]
800c04c: 6852 ldr r2, [r2, #4]
800c04e: fbb3 f3f2 udiv r3, r3, r2
800c052: b29b uxth r3, r3
800c054: 61bb str r3, [r7, #24]
break;
800c056: e01e b.n 800c096 <UART_SetConfig+0x41e>
case UART_CLOCKSOURCE_SYSCLK:
pclk = HAL_RCC_GetSysClockFreq();
800c058: f7fd fa8e bl 8009578 <HAL_RCC_GetSysClockFreq>
800c05c: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate));
800c05e: 68fb ldr r3, [r7, #12]
800c060: 005a lsls r2, r3, #1
800c062: 687b ldr r3, [r7, #4]
800c064: 685b ldr r3, [r3, #4]
800c066: 085b lsrs r3, r3, #1
800c068: 441a add r2, r3
800c06a: 687b ldr r3, [r7, #4]
800c06c: 685b ldr r3, [r3, #4]
800c06e: fbb2 f3f3 udiv r3, r2, r3
800c072: b29b uxth r3, r3
800c074: 61bb str r3, [r7, #24]
break;
800c076: e00e b.n 800c096 <UART_SetConfig+0x41e>
case UART_CLOCKSOURCE_LSE:
usartdiv = (uint16_t)(UART_DIV_SAMPLING8(LSE_VALUE, huart->Init.BaudRate));
800c078: 687b ldr r3, [r7, #4]
800c07a: 685b ldr r3, [r3, #4]
800c07c: 085b lsrs r3, r3, #1
800c07e: f503 3280 add.w r2, r3, #65536 ; 0x10000
800c082: 687b ldr r3, [r7, #4]
800c084: 685b ldr r3, [r3, #4]
800c086: fbb2 f3f3 udiv r3, r2, r3
800c08a: b29b uxth r3, r3
800c08c: 61bb str r3, [r7, #24]
break;
800c08e: e002 b.n 800c096 <UART_SetConfig+0x41e>
default:
ret = HAL_ERROR;
800c090: 2301 movs r3, #1
800c092: 75fb strb r3, [r7, #23]
break;
800c094: bf00 nop
}
/* USARTDIV must be greater than or equal to 0d16 */
if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX))
800c096: 69bb ldr r3, [r7, #24]
800c098: 2b0f cmp r3, #15
800c09a: d916 bls.n 800c0ca <UART_SetConfig+0x452>
800c09c: 69bb ldr r3, [r7, #24]
800c09e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c0a2: d212 bcs.n 800c0ca <UART_SetConfig+0x452>
{
brrtemp = (uint16_t)(usartdiv & 0xFFF0U);
800c0a4: 69bb ldr r3, [r7, #24]
800c0a6: b29b uxth r3, r3
800c0a8: f023 030f bic.w r3, r3, #15
800c0ac: 817b strh r3, [r7, #10]
brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U);
800c0ae: 69bb ldr r3, [r7, #24]
800c0b0: 085b lsrs r3, r3, #1
800c0b2: b29b uxth r3, r3
800c0b4: f003 0307 and.w r3, r3, #7
800c0b8: b29a uxth r2, r3
800c0ba: 897b ldrh r3, [r7, #10]
800c0bc: 4313 orrs r3, r2
800c0be: 817b strh r3, [r7, #10]
huart->Instance->BRR = brrtemp;
800c0c0: 687b ldr r3, [r7, #4]
800c0c2: 681b ldr r3, [r3, #0]
800c0c4: 897a ldrh r2, [r7, #10]
800c0c6: 60da str r2, [r3, #12]
800c0c8: e070 b.n 800c1ac <UART_SetConfig+0x534>
}
else
{
ret = HAL_ERROR;
800c0ca: 2301 movs r3, #1
800c0cc: 75fb strb r3, [r7, #23]
800c0ce: e06d b.n 800c1ac <UART_SetConfig+0x534>
}
}
else
{
switch (clocksource)
800c0d0: 7ffb ldrb r3, [r7, #31]
800c0d2: 2b08 cmp r3, #8
800c0d4: d859 bhi.n 800c18a <UART_SetConfig+0x512>
800c0d6: a201 add r2, pc, #4 ; (adr r2, 800c0dc <UART_SetConfig+0x464>)
800c0d8: f852 f023 ldr.w pc, [r2, r3, lsl #2]
800c0dc: 0800c101 .word 0x0800c101
800c0e0: 0800c11f .word 0x0800c11f
800c0e4: 0800c13d .word 0x0800c13d
800c0e8: 0800c18b .word 0x0800c18b
800c0ec: 0800c155 .word 0x0800c155
800c0f0: 0800c18b .word 0x0800c18b
800c0f4: 0800c18b .word 0x0800c18b
800c0f8: 0800c18b .word 0x0800c18b
800c0fc: 0800c173 .word 0x0800c173
{
case UART_CLOCKSOURCE_PCLK1:
pclk = HAL_RCC_GetPCLK1Freq();
800c100: f7fd faf8 bl 80096f4 <HAL_RCC_GetPCLK1Freq>
800c104: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate));
800c106: 687b ldr r3, [r7, #4]
800c108: 685b ldr r3, [r3, #4]
800c10a: 085a lsrs r2, r3, #1
800c10c: 68fb ldr r3, [r7, #12]
800c10e: 441a add r2, r3
800c110: 687b ldr r3, [r7, #4]
800c112: 685b ldr r3, [r3, #4]
800c114: fbb2 f3f3 udiv r3, r2, r3
800c118: b29b uxth r3, r3
800c11a: 61bb str r3, [r7, #24]
break;
800c11c: e038 b.n 800c190 <UART_SetConfig+0x518>
case UART_CLOCKSOURCE_PCLK2:
pclk = HAL_RCC_GetPCLK2Freq();
800c11e: f7fd fafd bl 800971c <HAL_RCC_GetPCLK2Freq>
800c122: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate));
800c124: 687b ldr r3, [r7, #4]
800c126: 685b ldr r3, [r3, #4]
800c128: 085a lsrs r2, r3, #1
800c12a: 68fb ldr r3, [r7, #12]
800c12c: 441a add r2, r3
800c12e: 687b ldr r3, [r7, #4]
800c130: 685b ldr r3, [r3, #4]
800c132: fbb2 f3f3 udiv r3, r2, r3
800c136: b29b uxth r3, r3
800c138: 61bb str r3, [r7, #24]
break;
800c13a: e029 b.n 800c190 <UART_SetConfig+0x518>
case UART_CLOCKSOURCE_HSI:
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(HSI_VALUE, huart->Init.BaudRate));
800c13c: 687b ldr r3, [r7, #4]
800c13e: 685b ldr r3, [r3, #4]
800c140: 085a lsrs r2, r3, #1
800c142: 4b21 ldr r3, [pc, #132] ; (800c1c8 <UART_SetConfig+0x550>)
800c144: 4413 add r3, r2
800c146: 687a ldr r2, [r7, #4]
800c148: 6852 ldr r2, [r2, #4]
800c14a: fbb3 f3f2 udiv r3, r3, r2
800c14e: b29b uxth r3, r3
800c150: 61bb str r3, [r7, #24]
break;
800c152: e01d b.n 800c190 <UART_SetConfig+0x518>
case UART_CLOCKSOURCE_SYSCLK:
pclk = HAL_RCC_GetSysClockFreq();
800c154: f7fd fa10 bl 8009578 <HAL_RCC_GetSysClockFreq>
800c158: 60f8 str r0, [r7, #12]
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate));
800c15a: 687b ldr r3, [r7, #4]
800c15c: 685b ldr r3, [r3, #4]
800c15e: 085a lsrs r2, r3, #1
800c160: 68fb ldr r3, [r7, #12]
800c162: 441a add r2, r3
800c164: 687b ldr r3, [r7, #4]
800c166: 685b ldr r3, [r3, #4]
800c168: fbb2 f3f3 udiv r3, r2, r3
800c16c: b29b uxth r3, r3
800c16e: 61bb str r3, [r7, #24]
break;
800c170: e00e b.n 800c190 <UART_SetConfig+0x518>
case UART_CLOCKSOURCE_LSE:
usartdiv = (uint16_t)(UART_DIV_SAMPLING16(LSE_VALUE, huart->Init.BaudRate));
800c172: 687b ldr r3, [r7, #4]
800c174: 685b ldr r3, [r3, #4]
800c176: 085b lsrs r3, r3, #1
800c178: f503 4200 add.w r2, r3, #32768 ; 0x8000
800c17c: 687b ldr r3, [r7, #4]
800c17e: 685b ldr r3, [r3, #4]
800c180: fbb2 f3f3 udiv r3, r2, r3
800c184: b29b uxth r3, r3
800c186: 61bb str r3, [r7, #24]
break;
800c188: e002 b.n 800c190 <UART_SetConfig+0x518>
default:
ret = HAL_ERROR;
800c18a: 2301 movs r3, #1
800c18c: 75fb strb r3, [r7, #23]
break;
800c18e: bf00 nop
}
/* USARTDIV must be greater than or equal to 0d16 */
if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX))
800c190: 69bb ldr r3, [r7, #24]
800c192: 2b0f cmp r3, #15
800c194: d908 bls.n 800c1a8 <UART_SetConfig+0x530>
800c196: 69bb ldr r3, [r7, #24]
800c198: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
800c19c: d204 bcs.n 800c1a8 <UART_SetConfig+0x530>
{
huart->Instance->BRR = usartdiv;
800c19e: 687b ldr r3, [r7, #4]
800c1a0: 681b ldr r3, [r3, #0]
800c1a2: 69ba ldr r2, [r7, #24]
800c1a4: 60da str r2, [r3, #12]
800c1a6: e001 b.n 800c1ac <UART_SetConfig+0x534>
}
else
{
ret = HAL_ERROR;
800c1a8: 2301 movs r3, #1
800c1aa: 75fb strb r3, [r7, #23]
}
}
/* Clear ISR function pointers */
huart->RxISR = NULL;
800c1ac: 687b ldr r3, [r7, #4]
800c1ae: 2200 movs r2, #0
800c1b0: 661a str r2, [r3, #96] ; 0x60
huart->TxISR = NULL;
800c1b2: 687b ldr r3, [r7, #4]
800c1b4: 2200 movs r2, #0
800c1b6: 665a str r2, [r3, #100] ; 0x64
return ret;
800c1b8: 7dfb ldrb r3, [r7, #23]
}
800c1ba: 4618 mov r0, r3
800c1bc: 3720 adds r7, #32
800c1be: 46bd mov sp, r7
800c1c0: bd80 pop {r7, pc}
800c1c2: bf00 nop
800c1c4: 01e84800 .word 0x01e84800
800c1c8: 00f42400 .word 0x00f42400
0800c1cc <UART_AdvFeatureConfig>:
* @brief Configure the UART peripheral advanced features.
* @param huart UART handle.
* @retval None
*/
void UART_AdvFeatureConfig(UART_HandleTypeDef *huart)
{
800c1cc: b480 push {r7}
800c1ce: b083 sub sp, #12
800c1d0: af00 add r7, sp, #0
800c1d2: 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))
800c1d4: 687b ldr r3, [r7, #4]
800c1d6: 6a5b ldr r3, [r3, #36] ; 0x24
800c1d8: f003 0301 and.w r3, r3, #1
800c1dc: 2b00 cmp r3, #0
800c1de: d00a beq.n 800c1f6 <UART_AdvFeatureConfig+0x2a>
{
assert_param(IS_UART_ADVFEATURE_TXINV(huart->AdvancedInit.TxPinLevelInvert));
MODIFY_REG(huart->Instance->CR2, USART_CR2_TXINV, huart->AdvancedInit.TxPinLevelInvert);
800c1e0: 687b ldr r3, [r7, #4]
800c1e2: 681b ldr r3, [r3, #0]
800c1e4: 685b ldr r3, [r3, #4]
800c1e6: f423 3100 bic.w r1, r3, #131072 ; 0x20000
800c1ea: 687b ldr r3, [r7, #4]
800c1ec: 6a9a ldr r2, [r3, #40] ; 0x28
800c1ee: 687b ldr r3, [r7, #4]
800c1f0: 681b ldr r3, [r3, #0]
800c1f2: 430a orrs r2, r1
800c1f4: 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))
800c1f6: 687b ldr r3, [r7, #4]
800c1f8: 6a5b ldr r3, [r3, #36] ; 0x24
800c1fa: f003 0302 and.w r3, r3, #2
800c1fe: 2b00 cmp r3, #0
800c200: d00a beq.n 800c218 <UART_AdvFeatureConfig+0x4c>
{
assert_param(IS_UART_ADVFEATURE_RXINV(huart->AdvancedInit.RxPinLevelInvert));
MODIFY_REG(huart->Instance->CR2, USART_CR2_RXINV, huart->AdvancedInit.RxPinLevelInvert);
800c202: 687b ldr r3, [r7, #4]
800c204: 681b ldr r3, [r3, #0]
800c206: 685b ldr r3, [r3, #4]
800c208: f423 3180 bic.w r1, r3, #65536 ; 0x10000
800c20c: 687b ldr r3, [r7, #4]
800c20e: 6ada ldr r2, [r3, #44] ; 0x2c
800c210: 687b ldr r3, [r7, #4]
800c212: 681b ldr r3, [r3, #0]
800c214: 430a orrs r2, r1
800c216: 605a str r2, [r3, #4]
}
/* if required, configure data inversion */
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DATAINVERT_INIT))
800c218: 687b ldr r3, [r7, #4]
800c21a: 6a5b ldr r3, [r3, #36] ; 0x24
800c21c: f003 0304 and.w r3, r3, #4
800c220: 2b00 cmp r3, #0
800c222: d00a beq.n 800c23a <UART_AdvFeatureConfig+0x6e>
{
assert_param(IS_UART_ADVFEATURE_DATAINV(huart->AdvancedInit.DataInvert));
MODIFY_REG(huart->Instance->CR2, USART_CR2_DATAINV, huart->AdvancedInit.DataInvert);
800c224: 687b ldr r3, [r7, #4]
800c226: 681b ldr r3, [r3, #0]
800c228: 685b ldr r3, [r3, #4]
800c22a: f423 2180 bic.w r1, r3, #262144 ; 0x40000
800c22e: 687b ldr r3, [r7, #4]
800c230: 6b1a ldr r2, [r3, #48] ; 0x30
800c232: 687b ldr r3, [r7, #4]
800c234: 681b ldr r3, [r3, #0]
800c236: 430a orrs r2, r1
800c238: 605a str r2, [r3, #4]
}
/* if required, configure RX/TX pins swap */
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_SWAP_INIT))
800c23a: 687b ldr r3, [r7, #4]
800c23c: 6a5b ldr r3, [r3, #36] ; 0x24
800c23e: f003 0308 and.w r3, r3, #8
800c242: 2b00 cmp r3, #0
800c244: d00a beq.n 800c25c <UART_AdvFeatureConfig+0x90>
{
assert_param(IS_UART_ADVFEATURE_SWAP(huart->AdvancedInit.Swap));
MODIFY_REG(huart->Instance->CR2, USART_CR2_SWAP, huart->AdvancedInit.Swap);
800c246: 687b ldr r3, [r7, #4]
800c248: 681b ldr r3, [r3, #0]
800c24a: 685b ldr r3, [r3, #4]
800c24c: f423 4100 bic.w r1, r3, #32768 ; 0x8000
800c250: 687b ldr r3, [r7, #4]
800c252: 6b5a ldr r2, [r3, #52] ; 0x34
800c254: 687b ldr r3, [r7, #4]
800c256: 681b ldr r3, [r3, #0]
800c258: 430a orrs r2, r1
800c25a: 605a str r2, [r3, #4]
}
/* if required, configure RX overrun detection disabling */
if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXOVERRUNDISABLE_INIT))
800c25c: 687b ldr r3, [r7, #4]
800c25e: 6a5b ldr r3, [r3, #36] ; 0x24
800c260: f003 0310 and.w r3, r3, #16
800c264: 2b00 cmp r3, #0
800c266: d00a beq.n 800c27e <UART_AdvFeatureConfig+0xb2>
{
assert_param(IS_UART_OVERRUN(huart->AdvancedInit.OverrunDisable));
MODIFY_REG(huart->Instance->CR3, USART_CR3_OVRDIS, huart->AdvancedInit.OverrunDisable);
800c268: 687b ldr r3, [r7, #4]
800c26a: 681b ldr r3, [r3, #0]
800c26c: 689b ldr r3, [r3, #8]
800c26e: f423 5180 bic.w r1, r3, #4096 ; 0x1000
800c272: 687b ldr r3, [r7, #4]
800c274: 6b9a ldr r2, [r3, #56] ; 0x38
800c276: 687b ldr r3, [r7, #4]
800c278: 681b ldr r3, [r3, #0]
800c27a: 430a orrs r2, r1
800c27c: 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))
800c27e: 687b ldr r3, [r7, #4]
800c280: 6a5b ldr r3, [r3, #36] ; 0x24
800c282: f003 0320 and.w r3, r3, #32
800c286: 2b00 cmp r3, #0
800c288: d00a beq.n 800c2a0 <UART_AdvFeatureConfig+0xd4>
{
assert_param(IS_UART_ADVFEATURE_DMAONRXERROR(huart->AdvancedInit.DMADisableonRxError));
MODIFY_REG(huart->Instance->CR3, USART_CR3_DDRE, huart->AdvancedInit.DMADisableonRxError);
800c28a: 687b ldr r3, [r7, #4]
800c28c: 681b ldr r3, [r3, #0]
800c28e: 689b ldr r3, [r3, #8]
800c290: f423 5100 bic.w r1, r3, #8192 ; 0x2000
800c294: 687b ldr r3, [r7, #4]
800c296: 6bda ldr r2, [r3, #60] ; 0x3c
800c298: 687b ldr r3, [r7, #4]
800c29a: 681b ldr r3, [r3, #0]
800c29c: 430a orrs r2, r1
800c29e: 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))
800c2a0: 687b ldr r3, [r7, #4]
800c2a2: 6a5b ldr r3, [r3, #36] ; 0x24
800c2a4: f003 0340 and.w r3, r3, #64 ; 0x40
800c2a8: 2b00 cmp r3, #0
800c2aa: d01a beq.n 800c2e2 <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);
800c2ac: 687b ldr r3, [r7, #4]
800c2ae: 681b ldr r3, [r3, #0]
800c2b0: 685b ldr r3, [r3, #4]
800c2b2: f423 1180 bic.w r1, r3, #1048576 ; 0x100000
800c2b6: 687b ldr r3, [r7, #4]
800c2b8: 6c1a ldr r2, [r3, #64] ; 0x40
800c2ba: 687b ldr r3, [r7, #4]
800c2bc: 681b ldr r3, [r3, #0]
800c2be: 430a orrs r2, r1
800c2c0: 605a str r2, [r3, #4]
/* set auto Baudrate detection parameters if detection is enabled */
if (huart->AdvancedInit.AutoBaudRateEnable == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE)
800c2c2: 687b ldr r3, [r7, #4]
800c2c4: 6c1b ldr r3, [r3, #64] ; 0x40
800c2c6: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
800c2ca: d10a bne.n 800c2e2 <UART_AdvFeatureConfig+0x116>
{
assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(huart->AdvancedInit.AutoBaudRateMode));
MODIFY_REG(huart->Instance->CR2, USART_CR2_ABRMODE, huart->AdvancedInit.AutoBaudRateMode);
800c2cc: 687b ldr r3, [r7, #4]
800c2ce: 681b ldr r3, [r3, #0]
800c2d0: 685b ldr r3, [r3, #4]
800c2d2: f423 01c0 bic.w r1, r3, #6291456 ; 0x600000
800c2d6: 687b ldr r3, [r7, #4]
800c2d8: 6c5a ldr r2, [r3, #68] ; 0x44
800c2da: 687b ldr r3, [r7, #4]
800c2dc: 681b ldr r3, [r3, #0]
800c2de: 430a orrs r2, r1
800c2e0: 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))
800c2e2: 687b ldr r3, [r7, #4]
800c2e4: 6a5b ldr r3, [r3, #36] ; 0x24
800c2e6: f003 0380 and.w r3, r3, #128 ; 0x80
800c2ea: 2b00 cmp r3, #0
800c2ec: d00a beq.n 800c304 <UART_AdvFeatureConfig+0x138>
{
assert_param(IS_UART_ADVFEATURE_MSBFIRST(huart->AdvancedInit.MSBFirst));
MODIFY_REG(huart->Instance->CR2, USART_CR2_MSBFIRST, huart->AdvancedInit.MSBFirst);
800c2ee: 687b ldr r3, [r7, #4]
800c2f0: 681b ldr r3, [r3, #0]
800c2f2: 685b ldr r3, [r3, #4]
800c2f4: f423 2100 bic.w r1, r3, #524288 ; 0x80000
800c2f8: 687b ldr r3, [r7, #4]
800c2fa: 6c9a ldr r2, [r3, #72] ; 0x48
800c2fc: 687b ldr r3, [r7, #4]
800c2fe: 681b ldr r3, [r3, #0]
800c300: 430a orrs r2, r1
800c302: 605a str r2, [r3, #4]
}
}
800c304: bf00 nop
800c306: 370c adds r7, #12
800c308: 46bd mov sp, r7
800c30a: f85d 7b04 ldr.w r7, [sp], #4
800c30e: 4770 bx lr
0800c310 <UART_CheckIdleState>:
* @brief Check the UART Idle State.
* @param huart UART handle.
* @retval HAL status
*/
HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart)
{
800c310: b580 push {r7, lr}
800c312: b086 sub sp, #24
800c314: af02 add r7, sp, #8
800c316: 6078 str r0, [r7, #4]
uint32_t tickstart;
/* Initialize the UART ErrorCode */
huart->ErrorCode = HAL_UART_ERROR_NONE;
800c318: 687b ldr r3, [r7, #4]
800c31a: 2200 movs r2, #0
800c31c: 67da str r2, [r3, #124] ; 0x7c
/* Init tickstart for timeout managment*/
tickstart = HAL_GetTick();
800c31e: f7f8 fcbd bl 8004c9c <HAL_GetTick>
800c322: 60f8 str r0, [r7, #12]
/* Check if the Transmitter is enabled */
if ((huart->Instance->CR1 & USART_CR1_TE) == USART_CR1_TE)
800c324: 687b ldr r3, [r7, #4]
800c326: 681b ldr r3, [r3, #0]
800c328: 681b ldr r3, [r3, #0]
800c32a: f003 0308 and.w r3, r3, #8
800c32e: 2b08 cmp r3, #8
800c330: d10e bne.n 800c350 <UART_CheckIdleState+0x40>
{
/* Wait until TEACK flag is set */
if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_TEACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK)
800c332: f06f 437e mvn.w r3, #4261412864 ; 0xfe000000
800c336: 9300 str r3, [sp, #0]
800c338: 68fb ldr r3, [r7, #12]
800c33a: 2200 movs r2, #0
800c33c: f44f 1100 mov.w r1, #2097152 ; 0x200000
800c340: 6878 ldr r0, [r7, #4]
800c342: f000 f814 bl 800c36e <UART_WaitOnFlagUntilTimeout>
800c346: 4603 mov r3, r0
800c348: 2b00 cmp r3, #0
800c34a: d001 beq.n 800c350 <UART_CheckIdleState+0x40>
{
/* Timeout occurred */
return HAL_TIMEOUT;
800c34c: 2303 movs r3, #3
800c34e: e00a b.n 800c366 <UART_CheckIdleState+0x56>
}
}
#endif
/* Initialize the UART State */
huart->gState = HAL_UART_STATE_READY;
800c350: 687b ldr r3, [r7, #4]
800c352: 2220 movs r2, #32
800c354: 675a str r2, [r3, #116] ; 0x74
huart->RxState = HAL_UART_STATE_READY;
800c356: 687b ldr r3, [r7, #4]
800c358: 2220 movs r2, #32
800c35a: 679a str r2, [r3, #120] ; 0x78
__HAL_UNLOCK(huart);
800c35c: 687b ldr r3, [r7, #4]
800c35e: 2200 movs r2, #0
800c360: f883 2070 strb.w r2, [r3, #112] ; 0x70
return HAL_OK;
800c364: 2300 movs r3, #0
}
800c366: 4618 mov r0, r3
800c368: 3710 adds r7, #16
800c36a: 46bd mov sp, r7
800c36c: bd80 pop {r7, pc}
0800c36e <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)
{
800c36e: b580 push {r7, lr}
800c370: b084 sub sp, #16
800c372: af00 add r7, sp, #0
800c374: 60f8 str r0, [r7, #12]
800c376: 60b9 str r1, [r7, #8]
800c378: 603b str r3, [r7, #0]
800c37a: 4613 mov r3, r2
800c37c: 71fb strb r3, [r7, #7]
/* Wait until flag is set */
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
800c37e: e05d b.n 800c43c <UART_WaitOnFlagUntilTimeout+0xce>
{
/* Check for the Timeout */
if (Timeout != HAL_MAX_DELAY)
800c380: 69bb ldr r3, [r7, #24]
800c382: f1b3 3fff cmp.w r3, #4294967295
800c386: d059 beq.n 800c43c <UART_WaitOnFlagUntilTimeout+0xce>
{
if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
800c388: f7f8 fc88 bl 8004c9c <HAL_GetTick>
800c38c: 4602 mov r2, r0
800c38e: 683b ldr r3, [r7, #0]
800c390: 1ad3 subs r3, r2, r3
800c392: 69ba ldr r2, [r7, #24]
800c394: 429a cmp r2, r3
800c396: d302 bcc.n 800c39e <UART_WaitOnFlagUntilTimeout+0x30>
800c398: 69bb ldr r3, [r7, #24]
800c39a: 2b00 cmp r3, #0
800c39c: d11b bne.n 800c3d6 <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));
800c39e: 68fb ldr r3, [r7, #12]
800c3a0: 681b ldr r3, [r3, #0]
800c3a2: 681a ldr r2, [r3, #0]
800c3a4: 68fb ldr r3, [r7, #12]
800c3a6: 681b ldr r3, [r3, #0]
800c3a8: f422 72d0 bic.w r2, r2, #416 ; 0x1a0
800c3ac: 601a str r2, [r3, #0]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
800c3ae: 68fb ldr r3, [r7, #12]
800c3b0: 681b ldr r3, [r3, #0]
800c3b2: 689a ldr r2, [r3, #8]
800c3b4: 68fb ldr r3, [r7, #12]
800c3b6: 681b ldr r3, [r3, #0]
800c3b8: f022 0201 bic.w r2, r2, #1
800c3bc: 609a str r2, [r3, #8]
huart->gState = HAL_UART_STATE_READY;
800c3be: 68fb ldr r3, [r7, #12]
800c3c0: 2220 movs r2, #32
800c3c2: 675a str r2, [r3, #116] ; 0x74
huart->RxState = HAL_UART_STATE_READY;
800c3c4: 68fb ldr r3, [r7, #12]
800c3c6: 2220 movs r2, #32
800c3c8: 679a str r2, [r3, #120] ; 0x78
__HAL_UNLOCK(huart);
800c3ca: 68fb ldr r3, [r7, #12]
800c3cc: 2200 movs r2, #0
800c3ce: f883 2070 strb.w r2, [r3, #112] ; 0x70
return HAL_TIMEOUT;
800c3d2: 2303 movs r3, #3
800c3d4: e042 b.n 800c45c <UART_WaitOnFlagUntilTimeout+0xee>
}
if (READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U)
800c3d6: 68fb ldr r3, [r7, #12]
800c3d8: 681b ldr r3, [r3, #0]
800c3da: 681b ldr r3, [r3, #0]
800c3dc: f003 0304 and.w r3, r3, #4
800c3e0: 2b00 cmp r3, #0
800c3e2: d02b beq.n 800c43c <UART_WaitOnFlagUntilTimeout+0xce>
{
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET)
800c3e4: 68fb ldr r3, [r7, #12]
800c3e6: 681b ldr r3, [r3, #0]
800c3e8: 69db ldr r3, [r3, #28]
800c3ea: f403 6300 and.w r3, r3, #2048 ; 0x800
800c3ee: f5b3 6f00 cmp.w r3, #2048 ; 0x800
800c3f2: d123 bne.n 800c43c <UART_WaitOnFlagUntilTimeout+0xce>
{
/* Clear Receiver Timeout flag*/
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF);
800c3f4: 68fb ldr r3, [r7, #12]
800c3f6: 681b ldr r3, [r3, #0]
800c3f8: f44f 6200 mov.w r2, #2048 ; 0x800
800c3fc: 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));
800c3fe: 68fb ldr r3, [r7, #12]
800c400: 681b ldr r3, [r3, #0]
800c402: 681a ldr r2, [r3, #0]
800c404: 68fb ldr r3, [r7, #12]
800c406: 681b ldr r3, [r3, #0]
800c408: f422 72d0 bic.w r2, r2, #416 ; 0x1a0
800c40c: 601a str r2, [r3, #0]
CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
800c40e: 68fb ldr r3, [r7, #12]
800c410: 681b ldr r3, [r3, #0]
800c412: 689a ldr r2, [r3, #8]
800c414: 68fb ldr r3, [r7, #12]
800c416: 681b ldr r3, [r3, #0]
800c418: f022 0201 bic.w r2, r2, #1
800c41c: 609a str r2, [r3, #8]
huart->gState = HAL_UART_STATE_READY;
800c41e: 68fb ldr r3, [r7, #12]
800c420: 2220 movs r2, #32
800c422: 675a str r2, [r3, #116] ; 0x74
huart->RxState = HAL_UART_STATE_READY;
800c424: 68fb ldr r3, [r7, #12]
800c426: 2220 movs r2, #32
800c428: 679a str r2, [r3, #120] ; 0x78
huart->ErrorCode = HAL_UART_ERROR_RTO;
800c42a: 68fb ldr r3, [r7, #12]
800c42c: 2220 movs r2, #32
800c42e: 67da str r2, [r3, #124] ; 0x7c
/* Process Unlocked */
__HAL_UNLOCK(huart);
800c430: 68fb ldr r3, [r7, #12]
800c432: 2200 movs r2, #0
800c434: f883 2070 strb.w r2, [r3, #112] ; 0x70
return HAL_TIMEOUT;
800c438: 2303 movs r3, #3
800c43a: e00f b.n 800c45c <UART_WaitOnFlagUntilTimeout+0xee>
while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
800c43c: 68fb ldr r3, [r7, #12]
800c43e: 681b ldr r3, [r3, #0]
800c440: 69da ldr r2, [r3, #28]
800c442: 68bb ldr r3, [r7, #8]
800c444: 4013 ands r3, r2
800c446: 68ba ldr r2, [r7, #8]
800c448: 429a cmp r2, r3
800c44a: bf0c ite eq
800c44c: 2301 moveq r3, #1
800c44e: 2300 movne r3, #0
800c450: b2db uxtb r3, r3
800c452: 461a mov r2, r3
800c454: 79fb ldrb r3, [r7, #7]
800c456: 429a cmp r2, r3
800c458: d092 beq.n 800c380 <UART_WaitOnFlagUntilTimeout+0x12>
}
}
}
}
return HAL_OK;
800c45a: 2300 movs r3, #0
}
800c45c: 4618 mov r0, r3
800c45e: 3710 adds r7, #16
800c460: 46bd mov sp, r7
800c462: bd80 pop {r7, pc}
0800c464 <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)
{
800c464: b480 push {r7}
800c466: b085 sub sp, #20
800c468: af00 add r7, sp, #0
800c46a: 6078 str r0, [r7, #4]
800c46c: 6039 str r1, [r7, #0]
uint32_t tmpr1 = 0;
800c46e: 2300 movs r3, #0
800c470: 60fb str r3, [r7, #12]
uint32_t tmpr2 = 0;
800c472: 2300 movs r3, #0
800c474: 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)
800c476: 683b ldr r3, [r7, #0]
800c478: 681b ldr r3, [r3, #0]
800c47a: 2b01 cmp r3, #1
800c47c: d027 beq.n 800c4ce <FMC_SDRAM_Init+0x6a>
{
tmpr1 = Device->SDCR[FMC_SDRAM_BANK1];
800c47e: 687b ldr r3, [r7, #4]
800c480: 681b ldr r3, [r3, #0]
800c482: 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 | \
800c484: 68fa ldr r2, [r7, #12]
800c486: 4b2f ldr r3, [pc, #188] ; (800c544 <FMC_SDRAM_Init+0xe0>)
800c488: 4013 ands r3, r2
800c48a: 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 |\
800c48c: 683b ldr r3, [r7, #0]
800c48e: 685a ldr r2, [r3, #4]
Init->RowBitsNumber |\
800c490: 683b ldr r3, [r7, #0]
800c492: 689b ldr r3, [r3, #8]
tmpr1 |= (uint32_t)(Init->ColumnBitsNumber |\
800c494: 431a orrs r2, r3
Init->MemoryDataWidth |\
800c496: 683b ldr r3, [r7, #0]
800c498: 68db ldr r3, [r3, #12]
Init->RowBitsNumber |\
800c49a: 431a orrs r2, r3
Init->InternalBankNumber |\
800c49c: 683b ldr r3, [r7, #0]
800c49e: 691b ldr r3, [r3, #16]
Init->MemoryDataWidth |\
800c4a0: 431a orrs r2, r3
Init->CASLatency |\
800c4a2: 683b ldr r3, [r7, #0]
800c4a4: 695b ldr r3, [r3, #20]
Init->InternalBankNumber |\
800c4a6: 431a orrs r2, r3
Init->WriteProtection |\
800c4a8: 683b ldr r3, [r7, #0]
800c4aa: 699b ldr r3, [r3, #24]
Init->CASLatency |\
800c4ac: 431a orrs r2, r3
Init->SDClockPeriod |\
800c4ae: 683b ldr r3, [r7, #0]
800c4b0: 69db ldr r3, [r3, #28]
Init->WriteProtection |\
800c4b2: 431a orrs r2, r3
Init->ReadBurst |\
800c4b4: 683b ldr r3, [r7, #0]
800c4b6: 6a1b ldr r3, [r3, #32]
Init->SDClockPeriod |\
800c4b8: 431a orrs r2, r3
Init->ReadPipeDelay
800c4ba: 683b ldr r3, [r7, #0]
800c4bc: 6a5b ldr r3, [r3, #36] ; 0x24
Init->ReadBurst |\
800c4be: 4313 orrs r3, r2
tmpr1 |= (uint32_t)(Init->ColumnBitsNumber |\
800c4c0: 68fa ldr r2, [r7, #12]
800c4c2: 4313 orrs r3, r2
800c4c4: 60fb str r3, [r7, #12]
);
Device->SDCR[FMC_SDRAM_BANK1] = tmpr1;
800c4c6: 687b ldr r3, [r7, #4]
800c4c8: 68fa ldr r2, [r7, #12]
800c4ca: 601a str r2, [r3, #0]
800c4cc: e032 b.n 800c534 <FMC_SDRAM_Init+0xd0>
}
else /* FMC_Bank2_SDRAM */
{
tmpr1 = Device->SDCR[FMC_SDRAM_BANK1];
800c4ce: 687b ldr r3, [r7, #4]
800c4d0: 681b ldr r3, [r3, #0]
800c4d2: 60fb str r3, [r7, #12]
/* Clear SDCLK, RBURST, and RPIPE bits */
tmpr1 &= ((uint32_t)~(FMC_SDCR1_SDCLK | FMC_SDCR1_RBURST | FMC_SDCR1_RPIPE));
800c4d4: 68fb ldr r3, [r7, #12]
800c4d6: f423 43f8 bic.w r3, r3, #31744 ; 0x7c00
800c4da: 60fb str r3, [r7, #12]
tmpr1 |= (uint32_t)(Init->SDClockPeriod |\
800c4dc: 683b ldr r3, [r7, #0]
800c4de: 69da ldr r2, [r3, #28]
Init->ReadBurst |\
800c4e0: 683b ldr r3, [r7, #0]
800c4e2: 6a1b ldr r3, [r3, #32]
tmpr1 |= (uint32_t)(Init->SDClockPeriod |\
800c4e4: 431a orrs r2, r3
Init->ReadPipeDelay);
800c4e6: 683b ldr r3, [r7, #0]
800c4e8: 6a5b ldr r3, [r3, #36] ; 0x24
Init->ReadBurst |\
800c4ea: 4313 orrs r3, r2
tmpr1 |= (uint32_t)(Init->SDClockPeriod |\
800c4ec: 68fa ldr r2, [r7, #12]
800c4ee: 4313 orrs r3, r2
800c4f0: 60fb str r3, [r7, #12]
tmpr2 = Device->SDCR[FMC_SDRAM_BANK2];
800c4f2: 687b ldr r3, [r7, #4]
800c4f4: 685b ldr r3, [r3, #4]
800c4f6: 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 | \
800c4f8: 68ba ldr r2, [r7, #8]
800c4fa: 4b12 ldr r3, [pc, #72] ; (800c544 <FMC_SDRAM_Init+0xe0>)
800c4fc: 4013 ands r3, r2
800c4fe: 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 |\
800c500: 683b ldr r3, [r7, #0]
800c502: 685a ldr r2, [r3, #4]
Init->RowBitsNumber |\
800c504: 683b ldr r3, [r7, #0]
800c506: 689b ldr r3, [r3, #8]
tmpr2 |= (uint32_t)(Init->ColumnBitsNumber |\
800c508: 431a orrs r2, r3
Init->MemoryDataWidth |\
800c50a: 683b ldr r3, [r7, #0]
800c50c: 68db ldr r3, [r3, #12]
Init->RowBitsNumber |\
800c50e: 431a orrs r2, r3
Init->InternalBankNumber |\
800c510: 683b ldr r3, [r7, #0]
800c512: 691b ldr r3, [r3, #16]
Init->MemoryDataWidth |\
800c514: 431a orrs r2, r3
Init->CASLatency |\
800c516: 683b ldr r3, [r7, #0]
800c518: 695b ldr r3, [r3, #20]
Init->InternalBankNumber |\
800c51a: 431a orrs r2, r3
Init->WriteProtection);
800c51c: 683b ldr r3, [r7, #0]
800c51e: 699b ldr r3, [r3, #24]
Init->CASLatency |\
800c520: 4313 orrs r3, r2
tmpr2 |= (uint32_t)(Init->ColumnBitsNumber |\
800c522: 68ba ldr r2, [r7, #8]
800c524: 4313 orrs r3, r2
800c526: 60bb str r3, [r7, #8]
Device->SDCR[FMC_SDRAM_BANK1] = tmpr1;
800c528: 687b ldr r3, [r7, #4]
800c52a: 68fa ldr r2, [r7, #12]
800c52c: 601a str r2, [r3, #0]
Device->SDCR[FMC_SDRAM_BANK2] = tmpr2;
800c52e: 687b ldr r3, [r7, #4]
800c530: 68ba ldr r2, [r7, #8]
800c532: 605a str r2, [r3, #4]
}
return HAL_OK;
800c534: 2300 movs r3, #0
}
800c536: 4618 mov r0, r3
800c538: 3714 adds r7, #20
800c53a: 46bd mov sp, r7
800c53c: f85d 7b04 ldr.w r7, [sp], #4
800c540: 4770 bx lr
800c542: bf00 nop
800c544: ffff8000 .word 0xffff8000
0800c548 <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)
{
800c548: b480 push {r7}
800c54a: b087 sub sp, #28
800c54c: af00 add r7, sp, #0
800c54e: 60f8 str r0, [r7, #12]
800c550: 60b9 str r1, [r7, #8]
800c552: 607a str r2, [r7, #4]
uint32_t tmpr1 = 0;
800c554: 2300 movs r3, #0
800c556: 617b str r3, [r7, #20]
uint32_t tmpr2 = 0;
800c558: 2300 movs r3, #0
800c55a: 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)
800c55c: 687b ldr r3, [r7, #4]
800c55e: 2b01 cmp r3, #1
800c560: d02e beq.n 800c5c0 <FMC_SDRAM_Timing_Init+0x78>
{
tmpr1 = Device->SDTR[FMC_SDRAM_BANK1];
800c562: 68fb ldr r3, [r7, #12]
800c564: 689b ldr r3, [r3, #8]
800c566: 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 | \
800c568: 697b ldr r3, [r7, #20]
800c56a: f003 4370 and.w r3, r3, #4026531840 ; 0xf0000000
800c56e: 617b str r3, [r7, #20]
FMC_SDTR1_TRC | FMC_SDTR1_TWR | FMC_SDTR1_TRP | \
FMC_SDTR1_TRCD));
tmpr1 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800c570: 68bb ldr r3, [r7, #8]
800c572: 681b ldr r3, [r3, #0]
800c574: 1e5a subs r2, r3, #1
(((Timing->ExitSelfRefreshDelay)-1) << 4) |\
800c576: 68bb ldr r3, [r7, #8]
800c578: 685b ldr r3, [r3, #4]
800c57a: 3b01 subs r3, #1
800c57c: 011b lsls r3, r3, #4
tmpr1 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800c57e: 431a orrs r2, r3
(((Timing->SelfRefreshTime)-1) << 8) |\
800c580: 68bb ldr r3, [r7, #8]
800c582: 689b ldr r3, [r3, #8]
800c584: 3b01 subs r3, #1
800c586: 021b lsls r3, r3, #8
(((Timing->ExitSelfRefreshDelay)-1) << 4) |\
800c588: 431a orrs r2, r3
(((Timing->RowCycleDelay)-1) << 12) |\
800c58a: 68bb ldr r3, [r7, #8]
800c58c: 68db ldr r3, [r3, #12]
800c58e: 3b01 subs r3, #1
800c590: 031b lsls r3, r3, #12
(((Timing->SelfRefreshTime)-1) << 8) |\
800c592: 431a orrs r2, r3
(((Timing->WriteRecoveryTime)-1) <<16) |\
800c594: 68bb ldr r3, [r7, #8]
800c596: 691b ldr r3, [r3, #16]
800c598: 3b01 subs r3, #1
800c59a: 041b lsls r3, r3, #16
(((Timing->RowCycleDelay)-1) << 12) |\
800c59c: 431a orrs r2, r3
(((Timing->RPDelay)-1) << 20) |\
800c59e: 68bb ldr r3, [r7, #8]
800c5a0: 695b ldr r3, [r3, #20]
800c5a2: 3b01 subs r3, #1
800c5a4: 051b lsls r3, r3, #20
(((Timing->WriteRecoveryTime)-1) <<16) |\
800c5a6: 431a orrs r2, r3
(((Timing->RCDDelay)-1) << 24));
800c5a8: 68bb ldr r3, [r7, #8]
800c5aa: 699b ldr r3, [r3, #24]
800c5ac: 3b01 subs r3, #1
800c5ae: 061b lsls r3, r3, #24
tmpr1 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800c5b0: 4313 orrs r3, r2
800c5b2: 697a ldr r2, [r7, #20]
800c5b4: 4313 orrs r3, r2
800c5b6: 617b str r3, [r7, #20]
Device->SDTR[FMC_SDRAM_BANK1] = tmpr1;
800c5b8: 68fb ldr r3, [r7, #12]
800c5ba: 697a ldr r2, [r7, #20]
800c5bc: 609a str r2, [r3, #8]
800c5be: e039 b.n 800c634 <FMC_SDRAM_Timing_Init+0xec>
}
else /* FMC_Bank2_SDRAM */
{
tmpr1 = Device->SDTR[FMC_SDRAM_BANK1];
800c5c0: 68fb ldr r3, [r7, #12]
800c5c2: 689b ldr r3, [r3, #8]
800c5c4: 617b str r3, [r7, #20]
/* Clear TRC and TRP bits */
tmpr1 &= ((uint32_t)~(FMC_SDTR1_TRC | FMC_SDTR1_TRP));
800c5c6: 697a ldr r2, [r7, #20]
800c5c8: 4b1e ldr r3, [pc, #120] ; (800c644 <FMC_SDRAM_Timing_Init+0xfc>)
800c5ca: 4013 ands r3, r2
800c5cc: 617b str r3, [r7, #20]
tmpr1 |= (uint32_t)((((Timing->RowCycleDelay)-1) << 12) |\
800c5ce: 68bb ldr r3, [r7, #8]
800c5d0: 68db ldr r3, [r3, #12]
800c5d2: 3b01 subs r3, #1
800c5d4: 031a lsls r2, r3, #12
(((Timing->RPDelay)-1) << 20));
800c5d6: 68bb ldr r3, [r7, #8]
800c5d8: 695b ldr r3, [r3, #20]
800c5da: 3b01 subs r3, #1
800c5dc: 051b lsls r3, r3, #20
tmpr1 |= (uint32_t)((((Timing->RowCycleDelay)-1) << 12) |\
800c5de: 4313 orrs r3, r2
800c5e0: 697a ldr r2, [r7, #20]
800c5e2: 4313 orrs r3, r2
800c5e4: 617b str r3, [r7, #20]
tmpr2 = Device->SDTR[FMC_SDRAM_BANK2];
800c5e6: 68fb ldr r3, [r7, #12]
800c5e8: 68db ldr r3, [r3, #12]
800c5ea: 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 | \
800c5ec: 693b ldr r3, [r7, #16]
800c5ee: f003 4370 and.w r3, r3, #4026531840 ; 0xf0000000
800c5f2: 613b str r3, [r7, #16]
FMC_SDTR1_TRC | FMC_SDTR1_TWR | FMC_SDTR1_TRP | \
FMC_SDTR1_TRCD));
tmpr2 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800c5f4: 68bb ldr r3, [r7, #8]
800c5f6: 681b ldr r3, [r3, #0]
800c5f8: 1e5a subs r2, r3, #1
(((Timing->ExitSelfRefreshDelay)-1) << 4) |\
800c5fa: 68bb ldr r3, [r7, #8]
800c5fc: 685b ldr r3, [r3, #4]
800c5fe: 3b01 subs r3, #1
800c600: 011b lsls r3, r3, #4
tmpr2 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800c602: 431a orrs r2, r3
(((Timing->SelfRefreshTime)-1) << 8) |\
800c604: 68bb ldr r3, [r7, #8]
800c606: 689b ldr r3, [r3, #8]
800c608: 3b01 subs r3, #1
800c60a: 021b lsls r3, r3, #8
(((Timing->ExitSelfRefreshDelay)-1) << 4) |\
800c60c: 431a orrs r2, r3
(((Timing->WriteRecoveryTime)-1) <<16) |\
800c60e: 68bb ldr r3, [r7, #8]
800c610: 691b ldr r3, [r3, #16]
800c612: 3b01 subs r3, #1
800c614: 041b lsls r3, r3, #16
(((Timing->SelfRefreshTime)-1) << 8) |\
800c616: 431a orrs r2, r3
(((Timing->RCDDelay)-1) << 24));
800c618: 68bb ldr r3, [r7, #8]
800c61a: 699b ldr r3, [r3, #24]
800c61c: 3b01 subs r3, #1
800c61e: 061b lsls r3, r3, #24
tmpr2 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
800c620: 4313 orrs r3, r2
800c622: 693a ldr r2, [r7, #16]
800c624: 4313 orrs r3, r2
800c626: 613b str r3, [r7, #16]
Device->SDTR[FMC_SDRAM_BANK1] = tmpr1;
800c628: 68fb ldr r3, [r7, #12]
800c62a: 697a ldr r2, [r7, #20]
800c62c: 609a str r2, [r3, #8]
Device->SDTR[FMC_SDRAM_BANK2] = tmpr2;
800c62e: 68fb ldr r3, [r7, #12]
800c630: 693a ldr r2, [r7, #16]
800c632: 60da str r2, [r3, #12]
}
return HAL_OK;
800c634: 2300 movs r3, #0
}
800c636: 4618 mov r0, r3
800c638: 371c adds r7, #28
800c63a: 46bd mov sp, r7
800c63c: f85d 7b04 ldr.w r7, [sp], #4
800c640: 4770 bx lr
800c642: bf00 nop
800c644: ff0f0fff .word 0xff0f0fff
0800c648 <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)
{
800c648: b480 push {r7}
800c64a: b087 sub sp, #28
800c64c: af00 add r7, sp, #0
800c64e: 60f8 str r0, [r7, #12]
800c650: 60b9 str r1, [r7, #8]
800c652: 607a str r2, [r7, #4]
__IO uint32_t tmpr = 0;
800c654: 2300 movs r3, #0
800c656: 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) |\
800c658: 68bb ldr r3, [r7, #8]
800c65a: 681a ldr r2, [r3, #0]
(Command->CommandTarget) |\
800c65c: 68bb ldr r3, [r7, #8]
800c65e: 685b ldr r3, [r3, #4]
tmpr = (uint32_t)((Command->CommandMode) |\
800c660: 431a orrs r2, r3
(((Command->AutoRefreshNumber)-1) << 5) |\
800c662: 68bb ldr r3, [r7, #8]
800c664: 689b ldr r3, [r3, #8]
800c666: 3b01 subs r3, #1
800c668: 015b lsls r3, r3, #5
(Command->CommandTarget) |\
800c66a: 431a orrs r2, r3
((Command->ModeRegisterDefinition) << 9)
800c66c: 68bb ldr r3, [r7, #8]
800c66e: 68db ldr r3, [r3, #12]
800c670: 025b lsls r3, r3, #9
tmpr = (uint32_t)((Command->CommandMode) |\
800c672: 4313 orrs r3, r2
800c674: 617b str r3, [r7, #20]
);
Device->SDCMR = tmpr;
800c676: 697a ldr r2, [r7, #20]
800c678: 68fb ldr r3, [r7, #12]
800c67a: 611a str r2, [r3, #16]
return HAL_OK;
800c67c: 2300 movs r3, #0
}
800c67e: 4618 mov r0, r3
800c680: 371c adds r7, #28
800c682: 46bd mov sp, r7
800c684: f85d 7b04 ldr.w r7, [sp], #4
800c688: 4770 bx lr
0800c68a <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)
{
800c68a: b480 push {r7}
800c68c: b083 sub sp, #12
800c68e: af00 add r7, sp, #0
800c690: 6078 str r0, [r7, #4]
800c692: 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);
800c694: 687b ldr r3, [r7, #4]
800c696: 695a ldr r2, [r3, #20]
800c698: 683b ldr r3, [r7, #0]
800c69a: 005b lsls r3, r3, #1
800c69c: 431a orrs r2, r3
800c69e: 687b ldr r3, [r7, #4]
800c6a0: 615a str r2, [r3, #20]
return HAL_OK;
800c6a2: 2300 movs r3, #0
}
800c6a4: 4618 mov r0, r3
800c6a6: 370c adds r7, #12
800c6a8: 46bd mov sp, r7
800c6aa: f85d 7b04 ldr.w r7, [sp], #4
800c6ae: 4770 bx lr
0800c6b0 <MX_LWIP_Init>:
/**
* LwIP initialization function
*/
void MX_LWIP_Init(void)
{
800c6b0: b5b0 push {r4, r5, r7, lr}
800c6b2: b08e sub sp, #56 ; 0x38
800c6b4: af04 add r7, sp, #16
/* Initilialize the LwIP stack with RTOS */
tcpip_init( NULL, NULL );
800c6b6: 2100 movs r1, #0
800c6b8: 2000 movs r0, #0
800c6ba: f003 fe17 bl 80102ec <tcpip_init>
/* IP addresses initialization with DHCP (IPv4) */
ipaddr.addr = 0;
800c6be: 4b2a ldr r3, [pc, #168] ; (800c768 <MX_LWIP_Init+0xb8>)
800c6c0: 2200 movs r2, #0
800c6c2: 601a str r2, [r3, #0]
netmask.addr = 0;
800c6c4: 4b29 ldr r3, [pc, #164] ; (800c76c <MX_LWIP_Init+0xbc>)
800c6c6: 2200 movs r2, #0
800c6c8: 601a str r2, [r3, #0]
gw.addr = 0;
800c6ca: 4b29 ldr r3, [pc, #164] ; (800c770 <MX_LWIP_Init+0xc0>)
800c6cc: 2200 movs r2, #0
800c6ce: 601a str r2, [r3, #0]
/* add the network interface (IPv4/IPv6) with RTOS */
netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &tcpip_input);
800c6d0: 4b28 ldr r3, [pc, #160] ; (800c774 <MX_LWIP_Init+0xc4>)
800c6d2: 9302 str r3, [sp, #8]
800c6d4: 4b28 ldr r3, [pc, #160] ; (800c778 <MX_LWIP_Init+0xc8>)
800c6d6: 9301 str r3, [sp, #4]
800c6d8: 2300 movs r3, #0
800c6da: 9300 str r3, [sp, #0]
800c6dc: 4b24 ldr r3, [pc, #144] ; (800c770 <MX_LWIP_Init+0xc0>)
800c6de: 4a23 ldr r2, [pc, #140] ; (800c76c <MX_LWIP_Init+0xbc>)
800c6e0: 4921 ldr r1, [pc, #132] ; (800c768 <MX_LWIP_Init+0xb8>)
800c6e2: 4826 ldr r0, [pc, #152] ; (800c77c <MX_LWIP_Init+0xcc>)
800c6e4: f004 fb86 bl 8010df4 <netif_add>
/* Registers the default network interface */
netif_set_default(&gnetif);
800c6e8: 4824 ldr r0, [pc, #144] ; (800c77c <MX_LWIP_Init+0xcc>)
800c6ea: f004 fd3d bl 8011168 <netif_set_default>
if (netif_is_link_up(&gnetif))
800c6ee: 4b23 ldr r3, [pc, #140] ; (800c77c <MX_LWIP_Init+0xcc>)
800c6f0: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800c6f4: 089b lsrs r3, r3, #2
800c6f6: f003 0301 and.w r3, r3, #1
800c6fa: b2db uxtb r3, r3
800c6fc: 2b00 cmp r3, #0
800c6fe: d003 beq.n 800c708 <MX_LWIP_Init+0x58>
{
/* When the netif is fully configured this function must be called */
netif_set_up(&gnetif);
800c700: 481e ldr r0, [pc, #120] ; (800c77c <MX_LWIP_Init+0xcc>)
800c702: f004 fd41 bl 8011188 <netif_set_up>
800c706: e002 b.n 800c70e <MX_LWIP_Init+0x5e>
}
else
{
/* When the netif link is down this function must be called */
netif_set_down(&gnetif);
800c708: 481c ldr r0, [pc, #112] ; (800c77c <MX_LWIP_Init+0xcc>)
800c70a: f004 fda9 bl 8011260 <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);
800c70e: 491c ldr r1, [pc, #112] ; (800c780 <MX_LWIP_Init+0xd0>)
800c710: 481a ldr r0, [pc, #104] ; (800c77c <MX_LWIP_Init+0xcc>)
800c712: f004 fe3f bl 8011394 <netif_set_link_callback>
/* create a binary semaphore used for informing ethernetif of frame reception */
osSemaphoreDef(Netif_SEM);
800c716: 2300 movs r3, #0
800c718: 623b str r3, [r7, #32]
800c71a: 2300 movs r3, #0
800c71c: 627b str r3, [r7, #36] ; 0x24
Netif_LinkSemaphore = osSemaphoreCreate(osSemaphore(Netif_SEM) , 1 );
800c71e: f107 0320 add.w r3, r7, #32
800c722: 2101 movs r1, #1
800c724: 4618 mov r0, r3
800c726: f000 fd75 bl 800d214 <osSemaphoreCreate>
800c72a: 4602 mov r2, r0
800c72c: 4b15 ldr r3, [pc, #84] ; (800c784 <MX_LWIP_Init+0xd4>)
800c72e: 601a str r2, [r3, #0]
link_arg.netif = &gnetif;
800c730: 4b15 ldr r3, [pc, #84] ; (800c788 <MX_LWIP_Init+0xd8>)
800c732: 4a12 ldr r2, [pc, #72] ; (800c77c <MX_LWIP_Init+0xcc>)
800c734: 601a str r2, [r3, #0]
link_arg.semaphore = Netif_LinkSemaphore;
800c736: 4b13 ldr r3, [pc, #76] ; (800c784 <MX_LWIP_Init+0xd4>)
800c738: 681b ldr r3, [r3, #0]
800c73a: 4a13 ldr r2, [pc, #76] ; (800c788 <MX_LWIP_Init+0xd8>)
800c73c: 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);
800c73e: 4b13 ldr r3, [pc, #76] ; (800c78c <MX_LWIP_Init+0xdc>)
800c740: 1d3c adds r4, r7, #4
800c742: 461d mov r5, r3
800c744: cd0f ldmia r5!, {r0, r1, r2, r3}
800c746: c40f stmia r4!, {r0, r1, r2, r3}
800c748: e895 0007 ldmia.w r5, {r0, r1, r2}
800c74c: e884 0007 stmia.w r4, {r0, r1, r2}
osThreadCreate (osThread(LinkThr), &link_arg);
800c750: 1d3b adds r3, r7, #4
800c752: 490d ldr r1, [pc, #52] ; (800c788 <MX_LWIP_Init+0xd8>)
800c754: 4618 mov r0, r3
800c756: f000 fc60 bl 800d01a <osThreadCreate>
/* USER CODE END OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
/* Start DHCP negotiation for a network interface (IPv4) */
dhcp_start(&gnetif);
800c75a: 4808 ldr r0, [pc, #32] ; (800c77c <MX_LWIP_Init+0xcc>)
800c75c: f00b ff7c bl 8018658 <dhcp_start>
/* USER CODE BEGIN 3 */
/* USER CODE END 3 */
}
800c760: bf00 nop
800c762: 3728 adds r7, #40 ; 0x28
800c764: 46bd mov sp, r7
800c766: bdb0 pop {r4, r5, r7, pc}
800c768: 20008fbc .word 0x20008fbc
800c76c: 20008fc0 .word 0x20008fc0
800c770: 20008fc4 .word 0x20008fc4
800c774: 08010229 .word 0x08010229
800c778: 0800cda9 .word 0x0800cda9
800c77c: 20008f84 .word 0x20008f84
800c780: 0800ce8d .word 0x0800ce8d
800c784: 20000570 .word 0x20000570
800c788: 20008f7c .word 0x20008f7c
800c78c: 0801d7b8 .word 0x0801d7b8
0800c790 <HAL_ETH_MspInit>:
/* USER CODE END 3 */
/* Private functions ---------------------------------------------------------*/
void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle)
{
800c790: b580 push {r7, lr}
800c792: b08e sub sp, #56 ; 0x38
800c794: af00 add r7, sp, #0
800c796: 6078 str r0, [r7, #4]
GPIO_InitTypeDef GPIO_InitStruct = {0};
800c798: f107 0324 add.w r3, r7, #36 ; 0x24
800c79c: 2200 movs r2, #0
800c79e: 601a str r2, [r3, #0]
800c7a0: 605a str r2, [r3, #4]
800c7a2: 609a str r2, [r3, #8]
800c7a4: 60da str r2, [r3, #12]
800c7a6: 611a str r2, [r3, #16]
if(ethHandle->Instance==ETH)
800c7a8: 687b ldr r3, [r7, #4]
800c7aa: 681b ldr r3, [r3, #0]
800c7ac: 4a44 ldr r2, [pc, #272] ; (800c8c0 <HAL_ETH_MspInit+0x130>)
800c7ae: 4293 cmp r3, r2
800c7b0: f040 8081 bne.w 800c8b6 <HAL_ETH_MspInit+0x126>
{
/* USER CODE BEGIN ETH_MspInit 0 */
/* USER CODE END ETH_MspInit 0 */
/* Enable Peripheral clock */
__HAL_RCC_ETH_CLK_ENABLE();
800c7b4: 4b43 ldr r3, [pc, #268] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7b6: 6b1b ldr r3, [r3, #48] ; 0x30
800c7b8: 4a42 ldr r2, [pc, #264] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7ba: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000
800c7be: 6313 str r3, [r2, #48] ; 0x30
800c7c0: 4b40 ldr r3, [pc, #256] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7c2: 6b1b ldr r3, [r3, #48] ; 0x30
800c7c4: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
800c7c8: 623b str r3, [r7, #32]
800c7ca: 6a3b ldr r3, [r7, #32]
800c7cc: 4b3d ldr r3, [pc, #244] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7ce: 6b1b ldr r3, [r3, #48] ; 0x30
800c7d0: 4a3c ldr r2, [pc, #240] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7d2: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000
800c7d6: 6313 str r3, [r2, #48] ; 0x30
800c7d8: 4b3a ldr r3, [pc, #232] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7da: 6b1b ldr r3, [r3, #48] ; 0x30
800c7dc: f003 6380 and.w r3, r3, #67108864 ; 0x4000000
800c7e0: 61fb str r3, [r7, #28]
800c7e2: 69fb ldr r3, [r7, #28]
800c7e4: 4b37 ldr r3, [pc, #220] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7e6: 6b1b ldr r3, [r3, #48] ; 0x30
800c7e8: 4a36 ldr r2, [pc, #216] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7ea: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
800c7ee: 6313 str r3, [r2, #48] ; 0x30
800c7f0: 4b34 ldr r3, [pc, #208] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7f2: 6b1b ldr r3, [r3, #48] ; 0x30
800c7f4: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
800c7f8: 61bb str r3, [r7, #24]
800c7fa: 69bb ldr r3, [r7, #24]
__HAL_RCC_GPIOG_CLK_ENABLE();
800c7fc: 4b31 ldr r3, [pc, #196] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c7fe: 6b1b ldr r3, [r3, #48] ; 0x30
800c800: 4a30 ldr r2, [pc, #192] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c802: f043 0340 orr.w r3, r3, #64 ; 0x40
800c806: 6313 str r3, [r2, #48] ; 0x30
800c808: 4b2e ldr r3, [pc, #184] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c80a: 6b1b ldr r3, [r3, #48] ; 0x30
800c80c: f003 0340 and.w r3, r3, #64 ; 0x40
800c810: 617b str r3, [r7, #20]
800c812: 697b ldr r3, [r7, #20]
__HAL_RCC_GPIOC_CLK_ENABLE();
800c814: 4b2b ldr r3, [pc, #172] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c816: 6b1b ldr r3, [r3, #48] ; 0x30
800c818: 4a2a ldr r2, [pc, #168] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c81a: f043 0304 orr.w r3, r3, #4
800c81e: 6313 str r3, [r2, #48] ; 0x30
800c820: 4b28 ldr r3, [pc, #160] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c822: 6b1b ldr r3, [r3, #48] ; 0x30
800c824: f003 0304 and.w r3, r3, #4
800c828: 613b str r3, [r7, #16]
800c82a: 693b ldr r3, [r7, #16]
__HAL_RCC_GPIOA_CLK_ENABLE();
800c82c: 4b25 ldr r3, [pc, #148] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c82e: 6b1b ldr r3, [r3, #48] ; 0x30
800c830: 4a24 ldr r2, [pc, #144] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c832: f043 0301 orr.w r3, r3, #1
800c836: 6313 str r3, [r2, #48] ; 0x30
800c838: 4b22 ldr r3, [pc, #136] ; (800c8c4 <HAL_ETH_MspInit+0x134>)
800c83a: 6b1b ldr r3, [r3, #48] ; 0x30
800c83c: f003 0301 and.w r3, r3, #1
800c840: 60fb str r3, [r7, #12]
800c842: 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;
800c844: f44f 43d0 mov.w r3, #26624 ; 0x6800
800c848: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800c84a: 2302 movs r3, #2
800c84c: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800c84e: 2300 movs r3, #0
800c850: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
800c852: 2303 movs r3, #3
800c854: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
800c856: 230b movs r3, #11
800c858: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
800c85a: f107 0324 add.w r3, r7, #36 ; 0x24
800c85e: 4619 mov r1, r3
800c860: 4819 ldr r0, [pc, #100] ; (800c8c8 <HAL_ETH_MspInit+0x138>)
800c862: f7fa fe8b bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5;
800c866: 2332 movs r3, #50 ; 0x32
800c868: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800c86a: 2302 movs r3, #2
800c86c: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800c86e: 2300 movs r3, #0
800c870: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
800c872: 2303 movs r3, #3
800c874: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
800c876: 230b movs r3, #11
800c878: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
800c87a: f107 0324 add.w r3, r7, #36 ; 0x24
800c87e: 4619 mov r1, r3
800c880: 4812 ldr r0, [pc, #72] ; (800c8cc <HAL_ETH_MspInit+0x13c>)
800c882: f7fa fe7b bl 800757c <HAL_GPIO_Init>
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7;
800c886: 2386 movs r3, #134 ; 0x86
800c888: 627b str r3, [r7, #36] ; 0x24
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
800c88a: 2302 movs r3, #2
800c88c: 62bb str r3, [r7, #40] ; 0x28
GPIO_InitStruct.Pull = GPIO_NOPULL;
800c88e: 2300 movs r3, #0
800c890: 62fb str r3, [r7, #44] ; 0x2c
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
800c892: 2303 movs r3, #3
800c894: 633b str r3, [r7, #48] ; 0x30
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
800c896: 230b movs r3, #11
800c898: 637b str r3, [r7, #52] ; 0x34
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
800c89a: f107 0324 add.w r3, r7, #36 ; 0x24
800c89e: 4619 mov r1, r3
800c8a0: 480b ldr r0, [pc, #44] ; (800c8d0 <HAL_ETH_MspInit+0x140>)
800c8a2: f7fa fe6b bl 800757c <HAL_GPIO_Init>
/* Peripheral interrupt init */
HAL_NVIC_SetPriority(ETH_IRQn, 5, 0);
800c8a6: 2200 movs r2, #0
800c8a8: 2105 movs r1, #5
800c8aa: 203d movs r0, #61 ; 0x3d
800c8ac: f7f8 feb6 bl 800561c <HAL_NVIC_SetPriority>
HAL_NVIC_EnableIRQ(ETH_IRQn);
800c8b0: 203d movs r0, #61 ; 0x3d
800c8b2: f7f8 fecf bl 8005654 <HAL_NVIC_EnableIRQ>
/* USER CODE BEGIN ETH_MspInit 1 */
/* USER CODE END ETH_MspInit 1 */
}
}
800c8b6: bf00 nop
800c8b8: 3738 adds r7, #56 ; 0x38
800c8ba: 46bd mov sp, r7
800c8bc: bd80 pop {r7, pc}
800c8be: bf00 nop
800c8c0: 40028000 .word 0x40028000
800c8c4: 40023800 .word 0x40023800
800c8c8: 40021800 .word 0x40021800
800c8cc: 40020800 .word 0x40020800
800c8d0: 40020000 .word 0x40020000
0800c8d4 <HAL_ETH_RxCpltCallback>:
* @brief Ethernet Rx Transfer completed callback
* @param heth: ETH handle
* @retval None
*/
void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth)
{
800c8d4: b580 push {r7, lr}
800c8d6: b082 sub sp, #8
800c8d8: af00 add r7, sp, #0
800c8da: 6078 str r0, [r7, #4]
osSemaphoreRelease(s_xSemaphore);
800c8dc: 4b04 ldr r3, [pc, #16] ; (800c8f0 <HAL_ETH_RxCpltCallback+0x1c>)
800c8de: 681b ldr r3, [r3, #0]
800c8e0: 4618 mov r0, r3
800c8e2: f000 fd25 bl 800d330 <osSemaphoreRelease>
}
800c8e6: bf00 nop
800c8e8: 3708 adds r7, #8
800c8ea: 46bd mov sp, r7
800c8ec: bd80 pop {r7, pc}
800c8ee: bf00 nop
800c8f0: 20000574 .word 0x20000574
0800c8f4 <low_level_init>:
*
* @param netif the already initialized lwip network interface structure
* for this ethernetif
*/
static void low_level_init(struct netif *netif)
{
800c8f4: b5b0 push {r4, r5, r7, lr}
800c8f6: b090 sub sp, #64 ; 0x40
800c8f8: af00 add r7, sp, #0
800c8fa: 6078 str r0, [r7, #4]
uint32_t regvalue = 0;
800c8fc: 2300 movs r3, #0
800c8fe: 63bb str r3, [r7, #56] ; 0x38
HAL_StatusTypeDef hal_eth_init_status;
/* Init ETH */
uint8_t MACAddr[6] ;
heth.Instance = ETH;
800c900: 4b60 ldr r3, [pc, #384] ; (800ca84 <low_level_init+0x190>)
800c902: 4a61 ldr r2, [pc, #388] ; (800ca88 <low_level_init+0x194>)
800c904: 601a str r2, [r3, #0]
heth.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE;
800c906: 4b5f ldr r3, [pc, #380] ; (800ca84 <low_level_init+0x190>)
800c908: 2201 movs r2, #1
800c90a: 605a str r2, [r3, #4]
heth.Init.Speed = ETH_SPEED_100M;
800c90c: 4b5d ldr r3, [pc, #372] ; (800ca84 <low_level_init+0x190>)
800c90e: f44f 4280 mov.w r2, #16384 ; 0x4000
800c912: 609a str r2, [r3, #8]
heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX;
800c914: 4b5b ldr r3, [pc, #364] ; (800ca84 <low_level_init+0x190>)
800c916: f44f 6200 mov.w r2, #2048 ; 0x800
800c91a: 60da str r2, [r3, #12]
heth.Init.PhyAddress = LAN8742A_PHY_ADDRESS;
800c91c: 4b59 ldr r3, [pc, #356] ; (800ca84 <low_level_init+0x190>)
800c91e: 2201 movs r2, #1
800c920: 821a strh r2, [r3, #16]
MACAddr[0] = 0x00;
800c922: 2300 movs r3, #0
800c924: f887 3030 strb.w r3, [r7, #48] ; 0x30
MACAddr[1] = 0x80;
800c928: 2380 movs r3, #128 ; 0x80
800c92a: f887 3031 strb.w r3, [r7, #49] ; 0x31
MACAddr[2] = 0xE1;
800c92e: 23e1 movs r3, #225 ; 0xe1
800c930: f887 3032 strb.w r3, [r7, #50] ; 0x32
MACAddr[3] = 0x00;
800c934: 2300 movs r3, #0
800c936: f887 3033 strb.w r3, [r7, #51] ; 0x33
MACAddr[4] = 0x00;
800c93a: 2300 movs r3, #0
800c93c: f887 3034 strb.w r3, [r7, #52] ; 0x34
MACAddr[5] = 0x00;
800c940: 2300 movs r3, #0
800c942: f887 3035 strb.w r3, [r7, #53] ; 0x35
heth.Init.MACAddr = &MACAddr[0];
800c946: 4a4f ldr r2, [pc, #316] ; (800ca84 <low_level_init+0x190>)
800c948: f107 0330 add.w r3, r7, #48 ; 0x30
800c94c: 6153 str r3, [r2, #20]
heth.Init.RxMode = ETH_RXINTERRUPT_MODE;
800c94e: 4b4d ldr r3, [pc, #308] ; (800ca84 <low_level_init+0x190>)
800c950: 2201 movs r2, #1
800c952: 619a str r2, [r3, #24]
heth.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE;
800c954: 4b4b ldr r3, [pc, #300] ; (800ca84 <low_level_init+0x190>)
800c956: 2200 movs r2, #0
800c958: 61da str r2, [r3, #28]
heth.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII;
800c95a: 4b4a ldr r3, [pc, #296] ; (800ca84 <low_level_init+0x190>)
800c95c: f44f 0200 mov.w r2, #8388608 ; 0x800000
800c960: 621a str r2, [r3, #32]
/* USER CODE BEGIN MACADDRESS */
/* USER CODE END MACADDRESS */
hal_eth_init_status = HAL_ETH_Init(&heth);
800c962: 4848 ldr r0, [pc, #288] ; (800ca84 <low_level_init+0x190>)
800c964: f7f9 fc84 bl 8006270 <HAL_ETH_Init>
800c968: 4603 mov r3, r0
800c96a: f887 303f strb.w r3, [r7, #63] ; 0x3f
if (hal_eth_init_status == HAL_OK)
800c96e: f897 303f ldrb.w r3, [r7, #63] ; 0x3f
800c972: 2b00 cmp r3, #0
800c974: d108 bne.n 800c988 <low_level_init+0x94>
{
/* Set netif link flag */
netif->flags |= NETIF_FLAG_LINK_UP;
800c976: 687b ldr r3, [r7, #4]
800c978: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800c97c: f043 0304 orr.w r3, r3, #4
800c980: b2da uxtb r2, r3
800c982: 687b ldr r3, [r7, #4]
800c984: 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);
800c988: 2304 movs r3, #4
800c98a: 4a40 ldr r2, [pc, #256] ; (800ca8c <low_level_init+0x198>)
800c98c: 4940 ldr r1, [pc, #256] ; (800ca90 <low_level_init+0x19c>)
800c98e: 483d ldr r0, [pc, #244] ; (800ca84 <low_level_init+0x190>)
800c990: f7f9 fe0a bl 80065a8 <HAL_ETH_DMATxDescListInit>
/* Initialize Rx Descriptors list: Chain Mode */
HAL_ETH_DMARxDescListInit(&heth, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB);
800c994: 2304 movs r3, #4
800c996: 4a3f ldr r2, [pc, #252] ; (800ca94 <low_level_init+0x1a0>)
800c998: 493f ldr r1, [pc, #252] ; (800ca98 <low_level_init+0x1a4>)
800c99a: 483a ldr r0, [pc, #232] ; (800ca84 <low_level_init+0x190>)
800c99c: f7f9 fe6d bl 800667a <HAL_ETH_DMARxDescListInit>
#if LWIP_ARP || LWIP_ETHERNET
/* set MAC hardware address length */
netif->hwaddr_len = ETH_HWADDR_LEN;
800c9a0: 687b ldr r3, [r7, #4]
800c9a2: 2206 movs r2, #6
800c9a4: f883 2030 strb.w r2, [r3, #48] ; 0x30
/* set MAC hardware address */
netif->hwaddr[0] = heth.Init.MACAddr[0];
800c9a8: 4b36 ldr r3, [pc, #216] ; (800ca84 <low_level_init+0x190>)
800c9aa: 695b ldr r3, [r3, #20]
800c9ac: 781a ldrb r2, [r3, #0]
800c9ae: 687b ldr r3, [r7, #4]
800c9b0: f883 202a strb.w r2, [r3, #42] ; 0x2a
netif->hwaddr[1] = heth.Init.MACAddr[1];
800c9b4: 4b33 ldr r3, [pc, #204] ; (800ca84 <low_level_init+0x190>)
800c9b6: 695b ldr r3, [r3, #20]
800c9b8: 785a ldrb r2, [r3, #1]
800c9ba: 687b ldr r3, [r7, #4]
800c9bc: f883 202b strb.w r2, [r3, #43] ; 0x2b
netif->hwaddr[2] = heth.Init.MACAddr[2];
800c9c0: 4b30 ldr r3, [pc, #192] ; (800ca84 <low_level_init+0x190>)
800c9c2: 695b ldr r3, [r3, #20]
800c9c4: 789a ldrb r2, [r3, #2]
800c9c6: 687b ldr r3, [r7, #4]
800c9c8: f883 202c strb.w r2, [r3, #44] ; 0x2c
netif->hwaddr[3] = heth.Init.MACAddr[3];
800c9cc: 4b2d ldr r3, [pc, #180] ; (800ca84 <low_level_init+0x190>)
800c9ce: 695b ldr r3, [r3, #20]
800c9d0: 78da ldrb r2, [r3, #3]
800c9d2: 687b ldr r3, [r7, #4]
800c9d4: f883 202d strb.w r2, [r3, #45] ; 0x2d
netif->hwaddr[4] = heth.Init.MACAddr[4];
800c9d8: 4b2a ldr r3, [pc, #168] ; (800ca84 <low_level_init+0x190>)
800c9da: 695b ldr r3, [r3, #20]
800c9dc: 791a ldrb r2, [r3, #4]
800c9de: 687b ldr r3, [r7, #4]
800c9e0: f883 202e strb.w r2, [r3, #46] ; 0x2e
netif->hwaddr[5] = heth.Init.MACAddr[5];
800c9e4: 4b27 ldr r3, [pc, #156] ; (800ca84 <low_level_init+0x190>)
800c9e6: 695b ldr r3, [r3, #20]
800c9e8: 795a ldrb r2, [r3, #5]
800c9ea: 687b ldr r3, [r7, #4]
800c9ec: f883 202f strb.w r2, [r3, #47] ; 0x2f
/* maximum transfer unit */
netif->mtu = 1500;
800c9f0: 687b ldr r3, [r7, #4]
800c9f2: f240 52dc movw r2, #1500 ; 0x5dc
800c9f6: 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;
800c9f8: 687b ldr r3, [r7, #4]
800c9fa: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800c9fe: f043 030a orr.w r3, r3, #10
800ca02: b2da uxtb r2, r3
800ca04: 687b ldr r3, [r7, #4]
800ca06: 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);
800ca0a: 2300 movs r3, #0
800ca0c: 62bb str r3, [r7, #40] ; 0x28
800ca0e: 2300 movs r3, #0
800ca10: 62fb str r3, [r7, #44] ; 0x2c
s_xSemaphore = osSemaphoreCreate(osSemaphore(SEM), 1);
800ca12: f107 0328 add.w r3, r7, #40 ; 0x28
800ca16: 2101 movs r1, #1
800ca18: 4618 mov r0, r3
800ca1a: f000 fbfb bl 800d214 <osSemaphoreCreate>
800ca1e: 4602 mov r2, r0
800ca20: 4b1e ldr r3, [pc, #120] ; (800ca9c <low_level_init+0x1a8>)
800ca22: 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);
800ca24: 4b1e ldr r3, [pc, #120] ; (800caa0 <low_level_init+0x1ac>)
800ca26: f107 040c add.w r4, r7, #12
800ca2a: 461d mov r5, r3
800ca2c: cd0f ldmia r5!, {r0, r1, r2, r3}
800ca2e: c40f stmia r4!, {r0, r1, r2, r3}
800ca30: e895 0007 ldmia.w r5, {r0, r1, r2}
800ca34: e884 0007 stmia.w r4, {r0, r1, r2}
osThreadCreate (osThread(EthIf), netif);
800ca38: f107 030c add.w r3, r7, #12
800ca3c: 6879 ldr r1, [r7, #4]
800ca3e: 4618 mov r0, r3
800ca40: f000 faeb bl 800d01a <osThreadCreate>
/* USER CODE END OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
/* Enable MAC and DMA transmission and reception */
HAL_ETH_Start(&heth);
800ca44: 480f ldr r0, [pc, #60] ; (800ca84 <low_level_init+0x190>)
800ca46: f7fa f940 bl 8006cca <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);
800ca4a: f107 0338 add.w r3, r7, #56 ; 0x38
800ca4e: 461a mov r2, r3
800ca50: 211d movs r1, #29
800ca52: 480c ldr r0, [pc, #48] ; (800ca84 <low_level_init+0x190>)
800ca54: f7fa f86b bl 8006b2e <HAL_ETH_ReadPHYRegister>
regvalue |= (PHY_ISFR_INT4);
800ca58: 6bbb ldr r3, [r7, #56] ; 0x38
800ca5a: f043 030b orr.w r3, r3, #11
800ca5e: 63bb str r3, [r7, #56] ; 0x38
/* Enable Interrupt on change of link status */
HAL_ETH_WritePHYRegister(&heth, PHY_ISFR , regvalue );
800ca60: 6bbb ldr r3, [r7, #56] ; 0x38
800ca62: 461a mov r2, r3
800ca64: 211d movs r1, #29
800ca66: 4807 ldr r0, [pc, #28] ; (800ca84 <low_level_init+0x190>)
800ca68: f7fa f8c9 bl 8006bfe <HAL_ETH_WritePHYRegister>
/* Read Register Configuration */
HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR , &regvalue);
800ca6c: f107 0338 add.w r3, r7, #56 ; 0x38
800ca70: 461a mov r2, r3
800ca72: 211d movs r1, #29
800ca74: 4803 ldr r0, [pc, #12] ; (800ca84 <low_level_init+0x190>)
800ca76: f7fa f85a bl 8006b2e <HAL_ETH_ReadPHYRegister>
#endif /* LWIP_ARP || LWIP_ETHERNET */
/* USER CODE BEGIN LOW_LEVEL_INIT */
/* USER CODE END LOW_LEVEL_INIT */
}
800ca7a: bf00 nop
800ca7c: 3740 adds r7, #64 ; 0x40
800ca7e: 46bd mov sp, r7
800ca80: bdb0 pop {r4, r5, r7, pc}
800ca82: bf00 nop
800ca84: 2000a898 .word 0x2000a898
800ca88: 40028000 .word 0x40028000
800ca8c: 2000a8e0 .word 0x2000a8e0
800ca90: 20008fc8 .word 0x20008fc8
800ca94: 20009048 .word 0x20009048
800ca98: 2000a818 .word 0x2000a818
800ca9c: 20000574 .word 0x20000574
800caa0: 0801d7dc .word 0x0801d7dc
0800caa4 <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)
{
800caa4: b580 push {r7, lr}
800caa6: b08a sub sp, #40 ; 0x28
800caa8: af00 add r7, sp, #0
800caaa: 6078 str r0, [r7, #4]
800caac: 6039 str r1, [r7, #0]
err_t errval;
struct pbuf *q;
uint8_t *buffer = (uint8_t *)(heth.TxDesc->Buffer1Addr);
800caae: 4b4b ldr r3, [pc, #300] ; (800cbdc <low_level_output+0x138>)
800cab0: 6adb ldr r3, [r3, #44] ; 0x2c
800cab2: 689b ldr r3, [r3, #8]
800cab4: 61fb str r3, [r7, #28]
__IO ETH_DMADescTypeDef *DmaTxDesc;
uint32_t framelength = 0;
800cab6: 2300 movs r3, #0
800cab8: 617b str r3, [r7, #20]
uint32_t bufferoffset = 0;
800caba: 2300 movs r3, #0
800cabc: 613b str r3, [r7, #16]
uint32_t byteslefttocopy = 0;
800cabe: 2300 movs r3, #0
800cac0: 60fb str r3, [r7, #12]
uint32_t payloadoffset = 0;
800cac2: 2300 movs r3, #0
800cac4: 60bb str r3, [r7, #8]
DmaTxDesc = heth.TxDesc;
800cac6: 4b45 ldr r3, [pc, #276] ; (800cbdc <low_level_output+0x138>)
800cac8: 6adb ldr r3, [r3, #44] ; 0x2c
800caca: 61bb str r3, [r7, #24]
bufferoffset = 0;
800cacc: 2300 movs r3, #0
800cace: 613b str r3, [r7, #16]
/* copy frame from pbufs to driver buffers */
for(q = p; q != NULL; q = q->next)
800cad0: 683b ldr r3, [r7, #0]
800cad2: 623b str r3, [r7, #32]
800cad4: e05a b.n 800cb8c <low_level_output+0xe8>
{
/* Is this buffer available? If not, goto error */
if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
800cad6: 69bb ldr r3, [r7, #24]
800cad8: 681b ldr r3, [r3, #0]
800cada: 2b00 cmp r3, #0
800cadc: da03 bge.n 800cae6 <low_level_output+0x42>
{
errval = ERR_USE;
800cade: 23f8 movs r3, #248 ; 0xf8
800cae0: f887 3027 strb.w r3, [r7, #39] ; 0x27
goto error;
800cae4: e05c b.n 800cba0 <low_level_output+0xfc>
}
/* Get bytes in current lwIP buffer */
byteslefttocopy = q->len;
800cae6: 6a3b ldr r3, [r7, #32]
800cae8: 895b ldrh r3, [r3, #10]
800caea: 60fb str r3, [r7, #12]
payloadoffset = 0;
800caec: 2300 movs r3, #0
800caee: 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 )
800caf0: e02f b.n 800cb52 <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) );
800caf2: 69fa ldr r2, [r7, #28]
800caf4: 693b ldr r3, [r7, #16]
800caf6: 18d0 adds r0, r2, r3
800caf8: 6a3b ldr r3, [r7, #32]
800cafa: 685a ldr r2, [r3, #4]
800cafc: 68bb ldr r3, [r7, #8]
800cafe: 18d1 adds r1, r2, r3
800cb00: 693a ldr r2, [r7, #16]
800cb02: f240 53f4 movw r3, #1524 ; 0x5f4
800cb06: 1a9b subs r3, r3, r2
800cb08: 461a mov r2, r3
800cb0a: f00f fcf0 bl 801c4ee <memcpy>
/* Point to next descriptor */
DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr);
800cb0e: 69bb ldr r3, [r7, #24]
800cb10: 68db ldr r3, [r3, #12]
800cb12: 61bb str r3, [r7, #24]
/* Check if the buffer is available */
if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
800cb14: 69bb ldr r3, [r7, #24]
800cb16: 681b ldr r3, [r3, #0]
800cb18: 2b00 cmp r3, #0
800cb1a: da03 bge.n 800cb24 <low_level_output+0x80>
{
errval = ERR_USE;
800cb1c: 23f8 movs r3, #248 ; 0xf8
800cb1e: f887 3027 strb.w r3, [r7, #39] ; 0x27
goto error;
800cb22: e03d b.n 800cba0 <low_level_output+0xfc>
}
buffer = (uint8_t *)(DmaTxDesc->Buffer1Addr);
800cb24: 69bb ldr r3, [r7, #24]
800cb26: 689b ldr r3, [r3, #8]
800cb28: 61fb str r3, [r7, #28]
byteslefttocopy = byteslefttocopy - (ETH_TX_BUF_SIZE - bufferoffset);
800cb2a: 693a ldr r2, [r7, #16]
800cb2c: 68fb ldr r3, [r7, #12]
800cb2e: 4413 add r3, r2
800cb30: f2a3 53f4 subw r3, r3, #1524 ; 0x5f4
800cb34: 60fb str r3, [r7, #12]
payloadoffset = payloadoffset + (ETH_TX_BUF_SIZE - bufferoffset);
800cb36: 68ba ldr r2, [r7, #8]
800cb38: 693b ldr r3, [r7, #16]
800cb3a: 1ad3 subs r3, r2, r3
800cb3c: f203 53f4 addw r3, r3, #1524 ; 0x5f4
800cb40: 60bb str r3, [r7, #8]
framelength = framelength + (ETH_TX_BUF_SIZE - bufferoffset);
800cb42: 697a ldr r2, [r7, #20]
800cb44: 693b ldr r3, [r7, #16]
800cb46: 1ad3 subs r3, r2, r3
800cb48: f203 53f4 addw r3, r3, #1524 ; 0x5f4
800cb4c: 617b str r3, [r7, #20]
bufferoffset = 0;
800cb4e: 2300 movs r3, #0
800cb50: 613b str r3, [r7, #16]
while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE )
800cb52: 68fa ldr r2, [r7, #12]
800cb54: 693b ldr r3, [r7, #16]
800cb56: 4413 add r3, r2
800cb58: f240 52f4 movw r2, #1524 ; 0x5f4
800cb5c: 4293 cmp r3, r2
800cb5e: d8c8 bhi.n 800caf2 <low_level_output+0x4e>
}
/* Copy the remaining bytes */
memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), byteslefttocopy );
800cb60: 69fa ldr r2, [r7, #28]
800cb62: 693b ldr r3, [r7, #16]
800cb64: 18d0 adds r0, r2, r3
800cb66: 6a3b ldr r3, [r7, #32]
800cb68: 685a ldr r2, [r3, #4]
800cb6a: 68bb ldr r3, [r7, #8]
800cb6c: 4413 add r3, r2
800cb6e: 68fa ldr r2, [r7, #12]
800cb70: 4619 mov r1, r3
800cb72: f00f fcbc bl 801c4ee <memcpy>
bufferoffset = bufferoffset + byteslefttocopy;
800cb76: 693a ldr r2, [r7, #16]
800cb78: 68fb ldr r3, [r7, #12]
800cb7a: 4413 add r3, r2
800cb7c: 613b str r3, [r7, #16]
framelength = framelength + byteslefttocopy;
800cb7e: 697a ldr r2, [r7, #20]
800cb80: 68fb ldr r3, [r7, #12]
800cb82: 4413 add r3, r2
800cb84: 617b str r3, [r7, #20]
for(q = p; q != NULL; q = q->next)
800cb86: 6a3b ldr r3, [r7, #32]
800cb88: 681b ldr r3, [r3, #0]
800cb8a: 623b str r3, [r7, #32]
800cb8c: 6a3b ldr r3, [r7, #32]
800cb8e: 2b00 cmp r3, #0
800cb90: d1a1 bne.n 800cad6 <low_level_output+0x32>
}
/* Prepare transmit descriptors to give to DMA */
HAL_ETH_TransmitFrame(&heth, framelength);
800cb92: 6979 ldr r1, [r7, #20]
800cb94: 4811 ldr r0, [pc, #68] ; (800cbdc <low_level_output+0x138>)
800cb96: f7f9 fddd bl 8006754 <HAL_ETH_TransmitFrame>
errval = ERR_OK;
800cb9a: 2300 movs r3, #0
800cb9c: 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)
800cba0: 4b0e ldr r3, [pc, #56] ; (800cbdc <low_level_output+0x138>)
800cba2: 681a ldr r2, [r3, #0]
800cba4: f241 0314 movw r3, #4116 ; 0x1014
800cba8: 4413 add r3, r2
800cbaa: 681b ldr r3, [r3, #0]
800cbac: f003 0320 and.w r3, r3, #32
800cbb0: 2b00 cmp r3, #0
800cbb2: d00d beq.n 800cbd0 <low_level_output+0x12c>
{
/* Clear TUS ETHERNET DMA flag */
heth.Instance->DMASR = ETH_DMASR_TUS;
800cbb4: 4b09 ldr r3, [pc, #36] ; (800cbdc <low_level_output+0x138>)
800cbb6: 681a ldr r2, [r3, #0]
800cbb8: f241 0314 movw r3, #4116 ; 0x1014
800cbbc: 4413 add r3, r2
800cbbe: 2220 movs r2, #32
800cbc0: 601a str r2, [r3, #0]
/* Resume DMA transmission*/
heth.Instance->DMATPDR = 0;
800cbc2: 4b06 ldr r3, [pc, #24] ; (800cbdc <low_level_output+0x138>)
800cbc4: 681a ldr r2, [r3, #0]
800cbc6: f241 0304 movw r3, #4100 ; 0x1004
800cbca: 4413 add r3, r2
800cbcc: 2200 movs r2, #0
800cbce: 601a str r2, [r3, #0]
}
return errval;
800cbd0: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
}
800cbd4: 4618 mov r0, r3
800cbd6: 3728 adds r7, #40 ; 0x28
800cbd8: 46bd mov sp, r7
800cbda: bd80 pop {r7, pc}
800cbdc: 2000a898 .word 0x2000a898
0800cbe0 <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)
{
800cbe0: b580 push {r7, lr}
800cbe2: b08c sub sp, #48 ; 0x30
800cbe4: af00 add r7, sp, #0
800cbe6: 6078 str r0, [r7, #4]
struct pbuf *p = NULL;
800cbe8: 2300 movs r3, #0
800cbea: 62fb str r3, [r7, #44] ; 0x2c
struct pbuf *q = NULL;
800cbec: 2300 movs r3, #0
800cbee: 62bb str r3, [r7, #40] ; 0x28
uint16_t len = 0;
800cbf0: 2300 movs r3, #0
800cbf2: 81fb strh r3, [r7, #14]
uint8_t *buffer;
__IO ETH_DMADescTypeDef *dmarxdesc;
uint32_t bufferoffset = 0;
800cbf4: 2300 movs r3, #0
800cbf6: 61fb str r3, [r7, #28]
uint32_t payloadoffset = 0;
800cbf8: 2300 movs r3, #0
800cbfa: 61bb str r3, [r7, #24]
uint32_t byteslefttocopy = 0;
800cbfc: 2300 movs r3, #0
800cbfe: 617b str r3, [r7, #20]
uint32_t i=0;
800cc00: 2300 movs r3, #0
800cc02: 613b str r3, [r7, #16]
/* get received frame */
if (HAL_ETH_GetReceivedFrame_IT(&heth) != HAL_OK)
800cc04: 484f ldr r0, [pc, #316] ; (800cd44 <low_level_input+0x164>)
800cc06: f7f9 fe8f bl 8006928 <HAL_ETH_GetReceivedFrame_IT>
800cc0a: 4603 mov r3, r0
800cc0c: 2b00 cmp r3, #0
800cc0e: d001 beq.n 800cc14 <low_level_input+0x34>
return NULL;
800cc10: 2300 movs r3, #0
800cc12: e092 b.n 800cd3a <low_level_input+0x15a>
/* Obtain the size of the packet and put it into the "len" variable. */
len = heth.RxFrameInfos.length;
800cc14: 4b4b ldr r3, [pc, #300] ; (800cd44 <low_level_input+0x164>)
800cc16: 6bdb ldr r3, [r3, #60] ; 0x3c
800cc18: 81fb strh r3, [r7, #14]
buffer = (uint8_t *)heth.RxFrameInfos.buffer;
800cc1a: 4b4a ldr r3, [pc, #296] ; (800cd44 <low_level_input+0x164>)
800cc1c: 6c1b ldr r3, [r3, #64] ; 0x40
800cc1e: 627b str r3, [r7, #36] ; 0x24
if (len > 0)
800cc20: 89fb ldrh r3, [r7, #14]
800cc22: 2b00 cmp r3, #0
800cc24: d007 beq.n 800cc36 <low_level_input+0x56>
{
/* We allocate a pbuf chain of pbufs from the Lwip buffer pool */
p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
800cc26: 89fb ldrh r3, [r7, #14]
800cc28: f44f 72c1 mov.w r2, #386 ; 0x182
800cc2c: 4619 mov r1, r3
800cc2e: 2000 movs r0, #0
800cc30: f004 fc7a bl 8011528 <pbuf_alloc>
800cc34: 62f8 str r0, [r7, #44] ; 0x2c
}
if (p != NULL)
800cc36: 6afb ldr r3, [r7, #44] ; 0x2c
800cc38: 2b00 cmp r3, #0
800cc3a: d04b beq.n 800ccd4 <low_level_input+0xf4>
{
dmarxdesc = heth.RxFrameInfos.FSRxDesc;
800cc3c: 4b41 ldr r3, [pc, #260] ; (800cd44 <low_level_input+0x164>)
800cc3e: 6b1b ldr r3, [r3, #48] ; 0x30
800cc40: 623b str r3, [r7, #32]
bufferoffset = 0;
800cc42: 2300 movs r3, #0
800cc44: 61fb str r3, [r7, #28]
for(q = p; q != NULL; q = q->next)
800cc46: 6afb ldr r3, [r7, #44] ; 0x2c
800cc48: 62bb str r3, [r7, #40] ; 0x28
800cc4a: e040 b.n 800ccce <low_level_input+0xee>
{
byteslefttocopy = q->len;
800cc4c: 6abb ldr r3, [r7, #40] ; 0x28
800cc4e: 895b ldrh r3, [r3, #10]
800cc50: 617b str r3, [r7, #20]
payloadoffset = 0;
800cc52: 2300 movs r3, #0
800cc54: 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 )
800cc56: e021 b.n 800cc9c <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));
800cc58: 6abb ldr r3, [r7, #40] ; 0x28
800cc5a: 685a ldr r2, [r3, #4]
800cc5c: 69bb ldr r3, [r7, #24]
800cc5e: 18d0 adds r0, r2, r3
800cc60: 6a7a ldr r2, [r7, #36] ; 0x24
800cc62: 69fb ldr r3, [r7, #28]
800cc64: 18d1 adds r1, r2, r3
800cc66: 69fa ldr r2, [r7, #28]
800cc68: f240 53f4 movw r3, #1524 ; 0x5f4
800cc6c: 1a9b subs r3, r3, r2
800cc6e: 461a mov r2, r3
800cc70: f00f fc3d bl 801c4ee <memcpy>
/* Point to next descriptor */
dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);
800cc74: 6a3b ldr r3, [r7, #32]
800cc76: 68db ldr r3, [r3, #12]
800cc78: 623b str r3, [r7, #32]
buffer = (uint8_t *)(dmarxdesc->Buffer1Addr);
800cc7a: 6a3b ldr r3, [r7, #32]
800cc7c: 689b ldr r3, [r3, #8]
800cc7e: 627b str r3, [r7, #36] ; 0x24
byteslefttocopy = byteslefttocopy - (ETH_RX_BUF_SIZE - bufferoffset);
800cc80: 69fa ldr r2, [r7, #28]
800cc82: 697b ldr r3, [r7, #20]
800cc84: 4413 add r3, r2
800cc86: f2a3 53f4 subw r3, r3, #1524 ; 0x5f4
800cc8a: 617b str r3, [r7, #20]
payloadoffset = payloadoffset + (ETH_RX_BUF_SIZE - bufferoffset);
800cc8c: 69ba ldr r2, [r7, #24]
800cc8e: 69fb ldr r3, [r7, #28]
800cc90: 1ad3 subs r3, r2, r3
800cc92: f203 53f4 addw r3, r3, #1524 ; 0x5f4
800cc96: 61bb str r3, [r7, #24]
bufferoffset = 0;
800cc98: 2300 movs r3, #0
800cc9a: 61fb str r3, [r7, #28]
while( (byteslefttocopy + bufferoffset) > ETH_RX_BUF_SIZE )
800cc9c: 697a ldr r2, [r7, #20]
800cc9e: 69fb ldr r3, [r7, #28]
800cca0: 4413 add r3, r2
800cca2: f240 52f4 movw r2, #1524 ; 0x5f4
800cca6: 4293 cmp r3, r2
800cca8: d8d6 bhi.n 800cc58 <low_level_input+0x78>
}
/* Copy remaining data in pbuf */
memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), byteslefttocopy);
800ccaa: 6abb ldr r3, [r7, #40] ; 0x28
800ccac: 685a ldr r2, [r3, #4]
800ccae: 69bb ldr r3, [r7, #24]
800ccb0: 18d0 adds r0, r2, r3
800ccb2: 6a7a ldr r2, [r7, #36] ; 0x24
800ccb4: 69fb ldr r3, [r7, #28]
800ccb6: 4413 add r3, r2
800ccb8: 697a ldr r2, [r7, #20]
800ccba: 4619 mov r1, r3
800ccbc: f00f fc17 bl 801c4ee <memcpy>
bufferoffset = bufferoffset + byteslefttocopy;
800ccc0: 69fa ldr r2, [r7, #28]
800ccc2: 697b ldr r3, [r7, #20]
800ccc4: 4413 add r3, r2
800ccc6: 61fb str r3, [r7, #28]
for(q = p; q != NULL; q = q->next)
800ccc8: 6abb ldr r3, [r7, #40] ; 0x28
800ccca: 681b ldr r3, [r3, #0]
800cccc: 62bb str r3, [r7, #40] ; 0x28
800ccce: 6abb ldr r3, [r7, #40] ; 0x28
800ccd0: 2b00 cmp r3, #0
800ccd2: d1bb bne.n 800cc4c <low_level_input+0x6c>
}
}
/* Release descriptors to DMA */
/* Point to first descriptor */
dmarxdesc = heth.RxFrameInfos.FSRxDesc;
800ccd4: 4b1b ldr r3, [pc, #108] ; (800cd44 <low_level_input+0x164>)
800ccd6: 6b1b ldr r3, [r3, #48] ; 0x30
800ccd8: 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++)
800ccda: 2300 movs r3, #0
800ccdc: 613b str r3, [r7, #16]
800ccde: e00b b.n 800ccf8 <low_level_input+0x118>
{
dmarxdesc->Status |= ETH_DMARXDESC_OWN;
800cce0: 6a3b ldr r3, [r7, #32]
800cce2: 681b ldr r3, [r3, #0]
800cce4: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000
800cce8: 6a3b ldr r3, [r7, #32]
800ccea: 601a str r2, [r3, #0]
dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);
800ccec: 6a3b ldr r3, [r7, #32]
800ccee: 68db ldr r3, [r3, #12]
800ccf0: 623b str r3, [r7, #32]
for (i=0; i< heth.RxFrameInfos.SegCount; i++)
800ccf2: 693b ldr r3, [r7, #16]
800ccf4: 3301 adds r3, #1
800ccf6: 613b str r3, [r7, #16]
800ccf8: 4b12 ldr r3, [pc, #72] ; (800cd44 <low_level_input+0x164>)
800ccfa: 6b9b ldr r3, [r3, #56] ; 0x38
800ccfc: 693a ldr r2, [r7, #16]
800ccfe: 429a cmp r2, r3
800cd00: d3ee bcc.n 800cce0 <low_level_input+0x100>
}
/* Clear Segment_Count */
heth.RxFrameInfos.SegCount =0;
800cd02: 4b10 ldr r3, [pc, #64] ; (800cd44 <low_level_input+0x164>)
800cd04: 2200 movs r2, #0
800cd06: 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)
800cd08: 4b0e ldr r3, [pc, #56] ; (800cd44 <low_level_input+0x164>)
800cd0a: 681a ldr r2, [r3, #0]
800cd0c: f241 0314 movw r3, #4116 ; 0x1014
800cd10: 4413 add r3, r2
800cd12: 681b ldr r3, [r3, #0]
800cd14: f003 0380 and.w r3, r3, #128 ; 0x80
800cd18: 2b00 cmp r3, #0
800cd1a: d00d beq.n 800cd38 <low_level_input+0x158>
{
/* Clear RBUS ETHERNET DMA flag */
heth.Instance->DMASR = ETH_DMASR_RBUS;
800cd1c: 4b09 ldr r3, [pc, #36] ; (800cd44 <low_level_input+0x164>)
800cd1e: 681a ldr r2, [r3, #0]
800cd20: f241 0314 movw r3, #4116 ; 0x1014
800cd24: 4413 add r3, r2
800cd26: 2280 movs r2, #128 ; 0x80
800cd28: 601a str r2, [r3, #0]
/* Resume DMA reception */
heth.Instance->DMARPDR = 0;
800cd2a: 4b06 ldr r3, [pc, #24] ; (800cd44 <low_level_input+0x164>)
800cd2c: 681a ldr r2, [r3, #0]
800cd2e: f241 0308 movw r3, #4104 ; 0x1008
800cd32: 4413 add r3, r2
800cd34: 2200 movs r2, #0
800cd36: 601a str r2, [r3, #0]
}
return p;
800cd38: 6afb ldr r3, [r7, #44] ; 0x2c
}
800cd3a: 4618 mov r0, r3
800cd3c: 3730 adds r7, #48 ; 0x30
800cd3e: 46bd mov sp, r7
800cd40: bd80 pop {r7, pc}
800cd42: bf00 nop
800cd44: 2000a898 .word 0x2000a898
0800cd48 <ethernetif_input>:
* the appropriate input function is called.
*
* @param netif the lwip network interface structure for this ethernetif
*/
void ethernetif_input(void const * argument)
{
800cd48: b580 push {r7, lr}
800cd4a: b084 sub sp, #16
800cd4c: af00 add r7, sp, #0
800cd4e: 6078 str r0, [r7, #4]
struct pbuf *p;
struct netif *netif = (struct netif *) argument;
800cd50: 687b ldr r3, [r7, #4]
800cd52: 60fb str r3, [r7, #12]
for( ;; )
{
if (osSemaphoreWait(s_xSemaphore, TIME_WAITING_FOR_INPUT) == osOK)
800cd54: 4b12 ldr r3, [pc, #72] ; (800cda0 <ethernetif_input+0x58>)
800cd56: 681b ldr r3, [r3, #0]
800cd58: f04f 31ff mov.w r1, #4294967295
800cd5c: 4618 mov r0, r3
800cd5e: f000 fa99 bl 800d294 <osSemaphoreWait>
800cd62: 4603 mov r3, r0
800cd64: 2b00 cmp r3, #0
800cd66: d1f5 bne.n 800cd54 <ethernetif_input+0xc>
{
do
{
LOCK_TCPIP_CORE();
800cd68: 480e ldr r0, [pc, #56] ; (800cda4 <ethernetif_input+0x5c>)
800cd6a: f00f fb2d bl 801c3c8 <sys_mutex_lock>
p = low_level_input( netif );
800cd6e: 68f8 ldr r0, [r7, #12]
800cd70: f7ff ff36 bl 800cbe0 <low_level_input>
800cd74: 60b8 str r0, [r7, #8]
if (p != NULL)
800cd76: 68bb ldr r3, [r7, #8]
800cd78: 2b00 cmp r3, #0
800cd7a: d00a beq.n 800cd92 <ethernetif_input+0x4a>
{
if (netif->input( p, netif) != ERR_OK )
800cd7c: 68fb ldr r3, [r7, #12]
800cd7e: 691b ldr r3, [r3, #16]
800cd80: 68f9 ldr r1, [r7, #12]
800cd82: 68b8 ldr r0, [r7, #8]
800cd84: 4798 blx r3
800cd86: 4603 mov r3, r0
800cd88: 2b00 cmp r3, #0
800cd8a: d002 beq.n 800cd92 <ethernetif_input+0x4a>
{
pbuf_free(p);
800cd8c: 68b8 ldr r0, [r7, #8]
800cd8e: f004 feab bl 8011ae8 <pbuf_free>
}
}
UNLOCK_TCPIP_CORE();
800cd92: 4804 ldr r0, [pc, #16] ; (800cda4 <ethernetif_input+0x5c>)
800cd94: f00f fb27 bl 801c3e6 <sys_mutex_unlock>
} while(p!=NULL);
800cd98: 68bb ldr r3, [r7, #8]
800cd9a: 2b00 cmp r3, #0
800cd9c: d1e4 bne.n 800cd68 <ethernetif_input+0x20>
if (osSemaphoreWait(s_xSemaphore, TIME_WAITING_FOR_INPUT) == osOK)
800cd9e: e7d9 b.n 800cd54 <ethernetif_input+0xc>
800cda0: 20000574 .word 0x20000574
800cda4: 2000c0b0 .word 0x2000c0b0
0800cda8 <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)
{
800cda8: b580 push {r7, lr}
800cdaa: b082 sub sp, #8
800cdac: af00 add r7, sp, #0
800cdae: 6078 str r0, [r7, #4]
LWIP_ASSERT("netif != NULL", (netif != NULL));
800cdb0: 687b ldr r3, [r7, #4]
800cdb2: 2b00 cmp r3, #0
800cdb4: d106 bne.n 800cdc4 <ethernetif_init+0x1c>
800cdb6: 4b0e ldr r3, [pc, #56] ; (800cdf0 <ethernetif_init+0x48>)
800cdb8: f240 222b movw r2, #555 ; 0x22b
800cdbc: 490d ldr r1, [pc, #52] ; (800cdf4 <ethernetif_init+0x4c>)
800cdbe: 480e ldr r0, [pc, #56] ; (800cdf8 <ethernetif_init+0x50>)
800cdc0: f00f fbc2 bl 801c548 <iprintf>
#if LWIP_NETIF_HOSTNAME
/* Initialize interface hostname */
netif->hostname = "lwip";
#endif /* LWIP_NETIF_HOSTNAME */
netif->name[0] = IFNAME0;
800cdc4: 687b ldr r3, [r7, #4]
800cdc6: 2273 movs r2, #115 ; 0x73
800cdc8: f883 2032 strb.w r2, [r3, #50] ; 0x32
netif->name[1] = IFNAME1;
800cdcc: 687b ldr r3, [r7, #4]
800cdce: 2274 movs r2, #116 ; 0x74
800cdd0: 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;
800cdd4: 687b ldr r3, [r7, #4]
800cdd6: 4a09 ldr r2, [pc, #36] ; (800cdfc <ethernetif_init+0x54>)
800cdd8: 615a str r2, [r3, #20]
#if LWIP_IPV6
netif->output_ip6 = ethip6_output;
#endif /* LWIP_IPV6 */
netif->linkoutput = low_level_output;
800cdda: 687b ldr r3, [r7, #4]
800cddc: 4a08 ldr r2, [pc, #32] ; (800ce00 <ethernetif_init+0x58>)
800cdde: 619a str r2, [r3, #24]
/* initialize the hardware */
low_level_init(netif);
800cde0: 6878 ldr r0, [r7, #4]
800cde2: f7ff fd87 bl 800c8f4 <low_level_init>
return ERR_OK;
800cde6: 2300 movs r3, #0
}
800cde8: 4618 mov r0, r3
800cdea: 3708 adds r7, #8
800cdec: 46bd mov sp, r7
800cdee: bd80 pop {r7, pc}
800cdf0: 0801d7f8 .word 0x0801d7f8
800cdf4: 0801d814 .word 0x0801d814
800cdf8: 0801d824 .word 0x0801d824
800cdfc: 0801a545 .word 0x0801a545
800ce00: 0800caa5 .word 0x0800caa5
0800ce04 <sys_now>:
* when LWIP_TIMERS == 1 and NO_SYS == 1
* @param None
* @retval Time
*/
u32_t sys_now(void)
{
800ce04: b580 push {r7, lr}
800ce06: af00 add r7, sp, #0
return HAL_GetTick();
800ce08: f7f7 ff48 bl 8004c9c <HAL_GetTick>
800ce0c: 4603 mov r3, r0
}
800ce0e: 4618 mov r0, r3
800ce10: bd80 pop {r7, pc}
...
0800ce14 <ethernetif_set_link>:
* @param netif: the network interface
* @retval None
*/
void ethernetif_set_link(void const *argument)
{
800ce14: b580 push {r7, lr}
800ce16: b084 sub sp, #16
800ce18: af00 add r7, sp, #0
800ce1a: 6078 str r0, [r7, #4]
uint32_t regvalue = 0;
800ce1c: 2300 movs r3, #0
800ce1e: 60bb str r3, [r7, #8]
struct link_str *link_arg = (struct link_str *)argument;
800ce20: 687b ldr r3, [r7, #4]
800ce22: 60fb str r3, [r7, #12]
for(;;)
{
/* Read PHY_BSR*/
HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, &regvalue);
800ce24: f107 0308 add.w r3, r7, #8
800ce28: 461a mov r2, r3
800ce2a: 2101 movs r1, #1
800ce2c: 4816 ldr r0, [pc, #88] ; (800ce88 <ethernetif_set_link+0x74>)
800ce2e: f7f9 fe7e bl 8006b2e <HAL_ETH_ReadPHYRegister>
regvalue &= PHY_LINKED_STATUS;
800ce32: 68bb ldr r3, [r7, #8]
800ce34: f003 0304 and.w r3, r3, #4
800ce38: 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))
800ce3a: 68fb ldr r3, [r7, #12]
800ce3c: 681b ldr r3, [r3, #0]
800ce3e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ce42: f003 0304 and.w r3, r3, #4
800ce46: 2b00 cmp r3, #0
800ce48: d108 bne.n 800ce5c <ethernetif_set_link+0x48>
800ce4a: 68bb ldr r3, [r7, #8]
800ce4c: 2b00 cmp r3, #0
800ce4e: d005 beq.n 800ce5c <ethernetif_set_link+0x48>
{
/* network cable is connected */
netif_set_link_up(link_arg->netif);
800ce50: 68fb ldr r3, [r7, #12]
800ce52: 681b ldr r3, [r3, #0]
800ce54: 4618 mov r0, r3
800ce56: f004 fa35 bl 80112c4 <netif_set_link_up>
800ce5a: e011 b.n 800ce80 <ethernetif_set_link+0x6c>
}
else if(netif_is_link_up(link_arg->netif) && (!regvalue))
800ce5c: 68fb ldr r3, [r7, #12]
800ce5e: 681b ldr r3, [r3, #0]
800ce60: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800ce64: 089b lsrs r3, r3, #2
800ce66: f003 0301 and.w r3, r3, #1
800ce6a: b2db uxtb r3, r3
800ce6c: 2b00 cmp r3, #0
800ce6e: d007 beq.n 800ce80 <ethernetif_set_link+0x6c>
800ce70: 68bb ldr r3, [r7, #8]
800ce72: 2b00 cmp r3, #0
800ce74: d104 bne.n 800ce80 <ethernetif_set_link+0x6c>
{
/* network cable is dis-connected */
netif_set_link_down(link_arg->netif);
800ce76: 68fb ldr r3, [r7, #12]
800ce78: 681b ldr r3, [r3, #0]
800ce7a: 4618 mov r0, r3
800ce7c: f004 fa5a bl 8011334 <netif_set_link_down>
}
/* Suspend thread for 200 ms */
osDelay(200);
800ce80: 20c8 movs r0, #200 ; 0xc8
800ce82: f000 f916 bl 800d0b2 <osDelay>
HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, &regvalue);
800ce86: e7cd b.n 800ce24 <ethernetif_set_link+0x10>
800ce88: 2000a898 .word 0x2000a898
0800ce8c <ethernetif_update_config>:
* to update low level driver configuration.
* @param netif: The network interface
* @retval None
*/
void ethernetif_update_config(struct netif *netif)
{
800ce8c: b580 push {r7, lr}
800ce8e: b084 sub sp, #16
800ce90: af00 add r7, sp, #0
800ce92: 6078 str r0, [r7, #4]
__IO uint32_t tickstart = 0;
800ce94: 2300 movs r3, #0
800ce96: 60fb str r3, [r7, #12]
uint32_t regvalue = 0;
800ce98: 2300 movs r3, #0
800ce9a: 60bb str r3, [r7, #8]
if(netif_is_link_up(netif))
800ce9c: 687b ldr r3, [r7, #4]
800ce9e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
800cea2: 089b lsrs r3, r3, #2
800cea4: f003 0301 and.w r3, r3, #1
800cea8: b2db uxtb r3, r3
800ceaa: 2b00 cmp r3, #0
800ceac: d05d beq.n 800cf6a <ethernetif_update_config+0xde>
{
/* Restart the auto-negotiation */
if(heth.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE)
800ceae: 4b34 ldr r3, [pc, #208] ; (800cf80 <ethernetif_update_config+0xf4>)
800ceb0: 685b ldr r3, [r3, #4]
800ceb2: 2b00 cmp r3, #0
800ceb4: d03f beq.n 800cf36 <ethernetif_update_config+0xaa>
{
/* Enable Auto-Negotiation */
HAL_ETH_WritePHYRegister(&heth, PHY_BCR, PHY_AUTONEGOTIATION);
800ceb6: f44f 5280 mov.w r2, #4096 ; 0x1000
800ceba: 2100 movs r1, #0
800cebc: 4830 ldr r0, [pc, #192] ; (800cf80 <ethernetif_update_config+0xf4>)
800cebe: f7f9 fe9e bl 8006bfe <HAL_ETH_WritePHYRegister>
/* Get tick */
tickstart = HAL_GetTick();
800cec2: f7f7 feeb bl 8004c9c <HAL_GetTick>
800cec6: 4603 mov r3, r0
800cec8: 60fb str r3, [r7, #12]
/* Wait until the auto-negotiation will be completed */
do
{
HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, &regvalue);
800ceca: f107 0308 add.w r3, r7, #8
800cece: 461a mov r2, r3
800ced0: 2101 movs r1, #1
800ced2: 482b ldr r0, [pc, #172] ; (800cf80 <ethernetif_update_config+0xf4>)
800ced4: f7f9 fe2b bl 8006b2e <HAL_ETH_ReadPHYRegister>
/* Check for the Timeout ( 1s ) */
if((HAL_GetTick() - tickstart ) > 1000)
800ced8: f7f7 fee0 bl 8004c9c <HAL_GetTick>
800cedc: 4602 mov r2, r0
800cede: 68fb ldr r3, [r7, #12]
800cee0: 1ad3 subs r3, r2, r3
800cee2: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
800cee6: d828 bhi.n 800cf3a <ethernetif_update_config+0xae>
{
/* In case of timeout */
goto error;
}
} while (((regvalue & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE));
800cee8: 68bb ldr r3, [r7, #8]
800ceea: f003 0320 and.w r3, r3, #32
800ceee: 2b00 cmp r3, #0
800cef0: d0eb beq.n 800ceca <ethernetif_update_config+0x3e>
/* Read the result of the auto-negotiation */
HAL_ETH_ReadPHYRegister(&heth, PHY_SR, &regvalue);
800cef2: f107 0308 add.w r3, r7, #8
800cef6: 461a mov r2, r3
800cef8: 211f movs r1, #31
800cefa: 4821 ldr r0, [pc, #132] ; (800cf80 <ethernetif_update_config+0xf4>)
800cefc: f7f9 fe17 bl 8006b2e <HAL_ETH_ReadPHYRegister>
/* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */
if((regvalue & PHY_DUPLEX_STATUS) != (uint32_t)RESET)
800cf00: 68bb ldr r3, [r7, #8]
800cf02: f003 0310 and.w r3, r3, #16
800cf06: 2b00 cmp r3, #0
800cf08: d004 beq.n 800cf14 <ethernetif_update_config+0x88>
{
/* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */
heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX;
800cf0a: 4b1d ldr r3, [pc, #116] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf0c: f44f 6200 mov.w r2, #2048 ; 0x800
800cf10: 60da str r2, [r3, #12]
800cf12: e002 b.n 800cf1a <ethernetif_update_config+0x8e>
}
else
{
/* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */
heth.Init.DuplexMode = ETH_MODE_HALFDUPLEX;
800cf14: 4b1a ldr r3, [pc, #104] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf16: 2200 movs r2, #0
800cf18: 60da str r2, [r3, #12]
}
/* Configure the MAC with the speed fixed by the auto-negotiation process */
if(regvalue & PHY_SPEED_STATUS)
800cf1a: 68bb ldr r3, [r7, #8]
800cf1c: f003 0304 and.w r3, r3, #4
800cf20: 2b00 cmp r3, #0
800cf22: d003 beq.n 800cf2c <ethernetif_update_config+0xa0>
{
/* Set Ethernet speed to 10M following the auto-negotiation */
heth.Init.Speed = ETH_SPEED_10M;
800cf24: 4b16 ldr r3, [pc, #88] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf26: 2200 movs r2, #0
800cf28: 609a str r2, [r3, #8]
800cf2a: e016 b.n 800cf5a <ethernetif_update_config+0xce>
}
else
{
/* Set Ethernet speed to 100M following the auto-negotiation */
heth.Init.Speed = ETH_SPEED_100M;
800cf2c: 4b14 ldr r3, [pc, #80] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf2e: f44f 4280 mov.w r2, #16384 ; 0x4000
800cf32: 609a str r2, [r3, #8]
800cf34: e011 b.n 800cf5a <ethernetif_update_config+0xce>
}
}
else /* AutoNegotiation Disable */
{
error :
800cf36: bf00 nop
800cf38: e000 b.n 800cf3c <ethernetif_update_config+0xb0>
goto error;
800cf3a: 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) |
800cf3c: 4b10 ldr r3, [pc, #64] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf3e: 68db ldr r3, [r3, #12]
800cf40: 08db lsrs r3, r3, #3
800cf42: b29a uxth r2, r3
(uint16_t)(heth.Init.Speed >> 1)));
800cf44: 4b0e ldr r3, [pc, #56] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf46: 689b ldr r3, [r3, #8]
800cf48: 085b lsrs r3, r3, #1
800cf4a: b29b uxth r3, r3
HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) |
800cf4c: 4313 orrs r3, r2
800cf4e: b29b uxth r3, r3
800cf50: 461a mov r2, r3
800cf52: 2100 movs r1, #0
800cf54: 480a ldr r0, [pc, #40] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf56: f7f9 fe52 bl 8006bfe <HAL_ETH_WritePHYRegister>
}
/* ETHERNET MAC Re-Configuration */
HAL_ETH_ConfigMAC(&heth, (ETH_MACInitTypeDef *) NULL);
800cf5a: 2100 movs r1, #0
800cf5c: 4808 ldr r0, [pc, #32] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf5e: f7f9 ff13 bl 8006d88 <HAL_ETH_ConfigMAC>
/* Restart MAC interface */
HAL_ETH_Start(&heth);
800cf62: 4807 ldr r0, [pc, #28] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf64: f7f9 feb1 bl 8006cca <HAL_ETH_Start>
800cf68: e002 b.n 800cf70 <ethernetif_update_config+0xe4>
}
else
{
/* Stop MAC interface */
HAL_ETH_Stop(&heth);
800cf6a: 4805 ldr r0, [pc, #20] ; (800cf80 <ethernetif_update_config+0xf4>)
800cf6c: f7f9 fedc bl 8006d28 <HAL_ETH_Stop>
}
ethernetif_notify_conn_changed(netif);
800cf70: 6878 ldr r0, [r7, #4]
800cf72: f000 f807 bl 800cf84 <ethernetif_notify_conn_changed>
}
800cf76: bf00 nop
800cf78: 3710 adds r7, #16
800cf7a: 46bd mov sp, r7
800cf7c: bd80 pop {r7, pc}
800cf7e: bf00 nop
800cf80: 2000a898 .word 0x2000a898
0800cf84 <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)
{
800cf84: b480 push {r7}
800cf86: b083 sub sp, #12
800cf88: af00 add r7, sp, #0
800cf8a: 6078 str r0, [r7, #4]
/* NOTE : This is function could be implemented in user file
when the callback is needed,
*/
}
800cf8c: bf00 nop
800cf8e: 370c adds r7, #12
800cf90: 46bd mov sp, r7
800cf92: f85d 7b04 ldr.w r7, [sp], #4
800cf96: 4770 bx lr
0800cf98 <makeFreeRtosPriority>:
extern void xPortSysTickHandler(void);
/* Convert from CMSIS type osPriority to FreeRTOS priority number */
static unsigned portBASE_TYPE makeFreeRtosPriority (osPriority priority)
{
800cf98: b480 push {r7}
800cf9a: b085 sub sp, #20
800cf9c: af00 add r7, sp, #0
800cf9e: 4603 mov r3, r0
800cfa0: 80fb strh r3, [r7, #6]
unsigned portBASE_TYPE fpriority = tskIDLE_PRIORITY;
800cfa2: 2300 movs r3, #0
800cfa4: 60fb str r3, [r7, #12]
if (priority != osPriorityError) {
800cfa6: f9b7 3006 ldrsh.w r3, [r7, #6]
800cfaa: 2b84 cmp r3, #132 ; 0x84
800cfac: d005 beq.n 800cfba <makeFreeRtosPriority+0x22>
fpriority += (priority - osPriorityIdle);
800cfae: f9b7 2006 ldrsh.w r2, [r7, #6]
800cfb2: 68fb ldr r3, [r7, #12]
800cfb4: 4413 add r3, r2
800cfb6: 3303 adds r3, #3
800cfb8: 60fb str r3, [r7, #12]
}
return fpriority;
800cfba: 68fb ldr r3, [r7, #12]
}
800cfbc: 4618 mov r0, r3
800cfbe: 3714 adds r7, #20
800cfc0: 46bd mov sp, r7
800cfc2: f85d 7b04 ldr.w r7, [sp], #4
800cfc6: 4770 bx lr
0800cfc8 <inHandlerMode>:
#endif
/* Determine whether we are in thread mode or handler mode. */
static int inHandlerMode (void)
{
800cfc8: b480 push {r7}
800cfca: b083 sub sp, #12
800cfcc: af00 add r7, sp, #0
*/
__STATIC_FORCEINLINE uint32_t __get_IPSR(void)
{
uint32_t result;
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
800cfce: f3ef 8305 mrs r3, IPSR
800cfd2: 607b str r3, [r7, #4]
return(result);
800cfd4: 687b ldr r3, [r7, #4]
return __get_IPSR() != 0;
800cfd6: 2b00 cmp r3, #0
800cfd8: bf14 ite ne
800cfda: 2301 movne r3, #1
800cfdc: 2300 moveq r3, #0
800cfde: b2db uxtb r3, r3
}
800cfe0: 4618 mov r0, r3
800cfe2: 370c adds r7, #12
800cfe4: 46bd mov sp, r7
800cfe6: f85d 7b04 ldr.w r7, [sp], #4
800cfea: 4770 bx lr
0800cfec <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)
{
800cfec: b580 push {r7, lr}
800cfee: af00 add r7, sp, #0
vTaskStartScheduler();
800cff0: f001 fd8e bl 800eb10 <vTaskStartScheduler>
return osOK;
800cff4: 2300 movs r3, #0
}
800cff6: 4618 mov r0, r3
800cff8: bd80 pop {r7, pc}
0800cffa <osKernelSysTick>:
* @param None
* @retval None
* @note MUST REMAIN UNCHANGED: \b osKernelSysTick shall be consistent in every CMSIS-RTOS.
*/
uint32_t osKernelSysTick(void)
{
800cffa: b580 push {r7, lr}
800cffc: af00 add r7, sp, #0
if (inHandlerMode()) {
800cffe: f7ff ffe3 bl 800cfc8 <inHandlerMode>
800d002: 4603 mov r3, r0
800d004: 2b00 cmp r3, #0
800d006: d003 beq.n 800d010 <osKernelSysTick+0x16>
return xTaskGetTickCountFromISR();
800d008: f001 fea0 bl 800ed4c <xTaskGetTickCountFromISR>
800d00c: 4603 mov r3, r0
800d00e: e002 b.n 800d016 <osKernelSysTick+0x1c>
}
else {
return xTaskGetTickCount();
800d010: f001 fe8c bl 800ed2c <xTaskGetTickCount>
800d014: 4603 mov r3, r0
}
}
800d016: 4618 mov r0, r3
800d018: bd80 pop {r7, pc}
0800d01a <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)
{
800d01a: b5f0 push {r4, r5, r6, r7, lr}
800d01c: b089 sub sp, #36 ; 0x24
800d01e: af04 add r7, sp, #16
800d020: 6078 str r0, [r7, #4]
800d022: 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)) {
800d024: 687b ldr r3, [r7, #4]
800d026: 695b ldr r3, [r3, #20]
800d028: 2b00 cmp r3, #0
800d02a: d020 beq.n 800d06e <osThreadCreate+0x54>
800d02c: 687b ldr r3, [r7, #4]
800d02e: 699b ldr r3, [r3, #24]
800d030: 2b00 cmp r3, #0
800d032: d01c beq.n 800d06e <osThreadCreate+0x54>
handle = xTaskCreateStatic((TaskFunction_t)thread_def->pthread,(const portCHAR *)thread_def->name,
800d034: 687b ldr r3, [r7, #4]
800d036: 685c ldr r4, [r3, #4]
800d038: 687b ldr r3, [r7, #4]
800d03a: 681d ldr r5, [r3, #0]
800d03c: 687b ldr r3, [r7, #4]
800d03e: 691e ldr r6, [r3, #16]
800d040: 687b ldr r3, [r7, #4]
800d042: f9b3 3008 ldrsh.w r3, [r3, #8]
800d046: 4618 mov r0, r3
800d048: f7ff ffa6 bl 800cf98 <makeFreeRtosPriority>
800d04c: 4601 mov r1, r0
thread_def->stacksize, argument, makeFreeRtosPriority(thread_def->tpriority),
thread_def->buffer, thread_def->controlblock);
800d04e: 687b ldr r3, [r7, #4]
800d050: 695b ldr r3, [r3, #20]
800d052: 687a ldr r2, [r7, #4]
800d054: 6992 ldr r2, [r2, #24]
handle = xTaskCreateStatic((TaskFunction_t)thread_def->pthread,(const portCHAR *)thread_def->name,
800d056: 9202 str r2, [sp, #8]
800d058: 9301 str r3, [sp, #4]
800d05a: 9100 str r1, [sp, #0]
800d05c: 683b ldr r3, [r7, #0]
800d05e: 4632 mov r2, r6
800d060: 4629 mov r1, r5
800d062: 4620 mov r0, r4
800d064: f001 fafb bl 800e65e <xTaskCreateStatic>
800d068: 4603 mov r3, r0
800d06a: 60fb str r3, [r7, #12]
800d06c: e01c b.n 800d0a8 <osThreadCreate+0x8e>
}
else {
if (xTaskCreate((TaskFunction_t)thread_def->pthread,(const portCHAR *)thread_def->name,
800d06e: 687b ldr r3, [r7, #4]
800d070: 685c ldr r4, [r3, #4]
800d072: 687b ldr r3, [r7, #4]
800d074: 681d ldr r5, [r3, #0]
thread_def->stacksize, argument, makeFreeRtosPriority(thread_def->tpriority),
800d076: 687b ldr r3, [r7, #4]
800d078: 691b ldr r3, [r3, #16]
if (xTaskCreate((TaskFunction_t)thread_def->pthread,(const portCHAR *)thread_def->name,
800d07a: b29e uxth r6, r3
800d07c: 687b ldr r3, [r7, #4]
800d07e: f9b3 3008 ldrsh.w r3, [r3, #8]
800d082: 4618 mov r0, r3
800d084: f7ff ff88 bl 800cf98 <makeFreeRtosPriority>
800d088: 4602 mov r2, r0
800d08a: f107 030c add.w r3, r7, #12
800d08e: 9301 str r3, [sp, #4]
800d090: 9200 str r2, [sp, #0]
800d092: 683b ldr r3, [r7, #0]
800d094: 4632 mov r2, r6
800d096: 4629 mov r1, r5
800d098: 4620 mov r0, r4
800d09a: f001 fb40 bl 800e71e <xTaskCreate>
800d09e: 4603 mov r3, r0
800d0a0: 2b01 cmp r3, #1
800d0a2: d001 beq.n 800d0a8 <osThreadCreate+0x8e>
&handle) != pdPASS) {
return NULL;
800d0a4: 2300 movs r3, #0
800d0a6: e000 b.n 800d0aa <osThreadCreate+0x90>
&handle) != pdPASS) {
return NULL;
}
#endif
return handle;
800d0a8: 68fb ldr r3, [r7, #12]
}
800d0aa: 4618 mov r0, r3
800d0ac: 3714 adds r7, #20
800d0ae: 46bd mov sp, r7
800d0b0: bdf0 pop {r4, r5, r6, r7, pc}
0800d0b2 <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)
{
800d0b2: b580 push {r7, lr}
800d0b4: b084 sub sp, #16
800d0b6: af00 add r7, sp, #0
800d0b8: 6078 str r0, [r7, #4]
#if INCLUDE_vTaskDelay
TickType_t ticks = millisec / portTICK_PERIOD_MS;
800d0ba: 687b ldr r3, [r7, #4]
800d0bc: 60fb str r3, [r7, #12]
vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */
800d0be: 68fb ldr r3, [r7, #12]
800d0c0: 2b00 cmp r3, #0
800d0c2: d001 beq.n 800d0c8 <osDelay+0x16>
800d0c4: 68fb ldr r3, [r7, #12]
800d0c6: e000 b.n 800d0ca <osDelay+0x18>
800d0c8: 2301 movs r3, #1
800d0ca: 4618 mov r0, r3
800d0cc: f001 fcea bl 800eaa4 <vTaskDelay>
return osOK;
800d0d0: 2300 movs r3, #0
#else
(void) millisec;
return osErrorResource;
#endif
}
800d0d2: 4618 mov r0, r3
800d0d4: 3710 adds r7, #16
800d0d6: 46bd mov sp, r7
800d0d8: bd80 pop {r7, pc}
0800d0da <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)
{
800d0da: b580 push {r7, lr}
800d0dc: b082 sub sp, #8
800d0de: af00 add r7, sp, #0
800d0e0: 6078 str r0, [r7, #4]
#if ( configUSE_MUTEXES == 1)
#if( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
if (mutex_def->controlblock != NULL) {
800d0e2: 687b ldr r3, [r7, #4]
800d0e4: 685b ldr r3, [r3, #4]
800d0e6: 2b00 cmp r3, #0
800d0e8: d007 beq.n 800d0fa <osMutexCreate+0x20>
return xSemaphoreCreateMutexStatic( mutex_def->controlblock );
800d0ea: 687b ldr r3, [r7, #4]
800d0ec: 685b ldr r3, [r3, #4]
800d0ee: 4619 mov r1, r3
800d0f0: 2001 movs r0, #1
800d0f2: f000 fc5e bl 800d9b2 <xQueueCreateMutexStatic>
800d0f6: 4603 mov r3, r0
800d0f8: e003 b.n 800d102 <osMutexCreate+0x28>
}
else {
return xSemaphoreCreateMutex();
800d0fa: 2001 movs r0, #1
800d0fc: f000 fc41 bl 800d982 <xQueueCreateMutex>
800d100: 4603 mov r3, r0
return xSemaphoreCreateMutex();
#endif
#else
return NULL;
#endif
}
800d102: 4618 mov r0, r3
800d104: 3708 adds r7, #8
800d106: 46bd mov sp, r7
800d108: bd80 pop {r7, pc}
...
0800d10c <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)
{
800d10c: b580 push {r7, lr}
800d10e: b084 sub sp, #16
800d110: af00 add r7, sp, #0
800d112: 6078 str r0, [r7, #4]
800d114: 6039 str r1, [r7, #0]
TickType_t ticks;
portBASE_TYPE taskWoken = pdFALSE;
800d116: 2300 movs r3, #0
800d118: 60bb str r3, [r7, #8]
if (mutex_id == NULL) {
800d11a: 687b ldr r3, [r7, #4]
800d11c: 2b00 cmp r3, #0
800d11e: d101 bne.n 800d124 <osMutexWait+0x18>
return osErrorParameter;
800d120: 2380 movs r3, #128 ; 0x80
800d122: e03a b.n 800d19a <osMutexWait+0x8e>
}
ticks = 0;
800d124: 2300 movs r3, #0
800d126: 60fb str r3, [r7, #12]
if (millisec == osWaitForever) {
800d128: 683b ldr r3, [r7, #0]
800d12a: f1b3 3fff cmp.w r3, #4294967295
800d12e: d103 bne.n 800d138 <osMutexWait+0x2c>
ticks = portMAX_DELAY;
800d130: f04f 33ff mov.w r3, #4294967295
800d134: 60fb str r3, [r7, #12]
800d136: e009 b.n 800d14c <osMutexWait+0x40>
}
else if (millisec != 0) {
800d138: 683b ldr r3, [r7, #0]
800d13a: 2b00 cmp r3, #0
800d13c: d006 beq.n 800d14c <osMutexWait+0x40>
ticks = millisec / portTICK_PERIOD_MS;
800d13e: 683b ldr r3, [r7, #0]
800d140: 60fb str r3, [r7, #12]
if (ticks == 0) {
800d142: 68fb ldr r3, [r7, #12]
800d144: 2b00 cmp r3, #0
800d146: d101 bne.n 800d14c <osMutexWait+0x40>
ticks = 1;
800d148: 2301 movs r3, #1
800d14a: 60fb str r3, [r7, #12]
}
}
if (inHandlerMode()) {
800d14c: f7ff ff3c bl 800cfc8 <inHandlerMode>
800d150: 4603 mov r3, r0
800d152: 2b00 cmp r3, #0
800d154: d017 beq.n 800d186 <osMutexWait+0x7a>
if (xSemaphoreTakeFromISR(mutex_id, &taskWoken) != pdTRUE) {
800d156: f107 0308 add.w r3, r7, #8
800d15a: 461a mov r2, r3
800d15c: 2100 movs r1, #0
800d15e: 6878 ldr r0, [r7, #4]
800d160: f001 f8d2 bl 800e308 <xQueueReceiveFromISR>
800d164: 4603 mov r3, r0
800d166: 2b01 cmp r3, #1
800d168: d001 beq.n 800d16e <osMutexWait+0x62>
return osErrorOS;
800d16a: 23ff movs r3, #255 ; 0xff
800d16c: e015 b.n 800d19a <osMutexWait+0x8e>
}
portEND_SWITCHING_ISR(taskWoken);
800d16e: 68bb ldr r3, [r7, #8]
800d170: 2b00 cmp r3, #0
800d172: d011 beq.n 800d198 <osMutexWait+0x8c>
800d174: 4b0b ldr r3, [pc, #44] ; (800d1a4 <osMutexWait+0x98>)
800d176: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d17a: 601a str r2, [r3, #0]
800d17c: f3bf 8f4f dsb sy
800d180: f3bf 8f6f isb sy
800d184: e008 b.n 800d198 <osMutexWait+0x8c>
}
else if (xSemaphoreTake(mutex_id, ticks) != pdTRUE) {
800d186: 68f9 ldr r1, [r7, #12]
800d188: 6878 ldr r0, [r7, #4]
800d18a: f000 ffad bl 800e0e8 <xQueueSemaphoreTake>
800d18e: 4603 mov r3, r0
800d190: 2b01 cmp r3, #1
800d192: d001 beq.n 800d198 <osMutexWait+0x8c>
return osErrorOS;
800d194: 23ff movs r3, #255 ; 0xff
800d196: e000 b.n 800d19a <osMutexWait+0x8e>
}
return osOK;
800d198: 2300 movs r3, #0
}
800d19a: 4618 mov r0, r3
800d19c: 3710 adds r7, #16
800d19e: 46bd mov sp, r7
800d1a0: bd80 pop {r7, pc}
800d1a2: bf00 nop
800d1a4: e000ed04 .word 0xe000ed04
0800d1a8 <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)
{
800d1a8: b580 push {r7, lr}
800d1aa: b084 sub sp, #16
800d1ac: af00 add r7, sp, #0
800d1ae: 6078 str r0, [r7, #4]
osStatus result = osOK;
800d1b0: 2300 movs r3, #0
800d1b2: 60fb str r3, [r7, #12]
portBASE_TYPE taskWoken = pdFALSE;
800d1b4: 2300 movs r3, #0
800d1b6: 60bb str r3, [r7, #8]
if (inHandlerMode()) {
800d1b8: f7ff ff06 bl 800cfc8 <inHandlerMode>
800d1bc: 4603 mov r3, r0
800d1be: 2b00 cmp r3, #0
800d1c0: d016 beq.n 800d1f0 <osMutexRelease+0x48>
if (xSemaphoreGiveFromISR(mutex_id, &taskWoken) != pdTRUE) {
800d1c2: f107 0308 add.w r3, r7, #8
800d1c6: 4619 mov r1, r3
800d1c8: 6878 ldr r0, [r7, #4]
800d1ca: f000 fe19 bl 800de00 <xQueueGiveFromISR>
800d1ce: 4603 mov r3, r0
800d1d0: 2b01 cmp r3, #1
800d1d2: d001 beq.n 800d1d8 <osMutexRelease+0x30>
return osErrorOS;
800d1d4: 23ff movs r3, #255 ; 0xff
800d1d6: e017 b.n 800d208 <osMutexRelease+0x60>
}
portEND_SWITCHING_ISR(taskWoken);
800d1d8: 68bb ldr r3, [r7, #8]
800d1da: 2b00 cmp r3, #0
800d1dc: d013 beq.n 800d206 <osMutexRelease+0x5e>
800d1de: 4b0c ldr r3, [pc, #48] ; (800d210 <osMutexRelease+0x68>)
800d1e0: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d1e4: 601a str r2, [r3, #0]
800d1e6: f3bf 8f4f dsb sy
800d1ea: f3bf 8f6f isb sy
800d1ee: e00a b.n 800d206 <osMutexRelease+0x5e>
}
else if (xSemaphoreGive(mutex_id) != pdTRUE)
800d1f0: 2300 movs r3, #0
800d1f2: 2200 movs r2, #0
800d1f4: 2100 movs r1, #0
800d1f6: 6878 ldr r0, [r7, #4]
800d1f8: f000 fc64 bl 800dac4 <xQueueGenericSend>
800d1fc: 4603 mov r3, r0
800d1fe: 2b01 cmp r3, #1
800d200: d001 beq.n 800d206 <osMutexRelease+0x5e>
{
result = osErrorOS;
800d202: 23ff movs r3, #255 ; 0xff
800d204: 60fb str r3, [r7, #12]
}
return result;
800d206: 68fb ldr r3, [r7, #12]
}
800d208: 4618 mov r0, r3
800d20a: 3710 adds r7, #16
800d20c: 46bd mov sp, r7
800d20e: bd80 pop {r7, pc}
800d210: e000ed04 .word 0xe000ed04
0800d214 <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)
{
800d214: b580 push {r7, lr}
800d216: b086 sub sp, #24
800d218: af02 add r7, sp, #8
800d21a: 6078 str r0, [r7, #4]
800d21c: 6039 str r1, [r7, #0]
#if( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
osSemaphoreId sema;
if (semaphore_def->controlblock != NULL){
800d21e: 687b ldr r3, [r7, #4]
800d220: 685b ldr r3, [r3, #4]
800d222: 2b00 cmp r3, #0
800d224: d017 beq.n 800d256 <osSemaphoreCreate+0x42>
if (count == 1) {
800d226: 683b ldr r3, [r7, #0]
800d228: 2b01 cmp r3, #1
800d22a: d10b bne.n 800d244 <osSemaphoreCreate+0x30>
return xSemaphoreCreateBinaryStatic( semaphore_def->controlblock );
800d22c: 687b ldr r3, [r7, #4]
800d22e: 685a ldr r2, [r3, #4]
800d230: 2303 movs r3, #3
800d232: 9300 str r3, [sp, #0]
800d234: 4613 mov r3, r2
800d236: 2200 movs r2, #0
800d238: 2100 movs r1, #0
800d23a: 2001 movs r0, #1
800d23c: f000 faaa bl 800d794 <xQueueGenericCreateStatic>
800d240: 4603 mov r3, r0
800d242: e023 b.n 800d28c <osSemaphoreCreate+0x78>
}
else {
#if (configUSE_COUNTING_SEMAPHORES == 1 )
return xSemaphoreCreateCountingStatic( count, count, semaphore_def->controlblock );
800d244: 6838 ldr r0, [r7, #0]
800d246: 6839 ldr r1, [r7, #0]
800d248: 687b ldr r3, [r7, #4]
800d24a: 685b ldr r3, [r3, #4]
800d24c: 461a mov r2, r3
800d24e: f000 fbcb bl 800d9e8 <xQueueCreateCountingSemaphoreStatic>
800d252: 4603 mov r3, r0
800d254: e01a b.n 800d28c <osSemaphoreCreate+0x78>
return NULL;
#endif
}
}
else {
if (count == 1) {
800d256: 683b ldr r3, [r7, #0]
800d258: 2b01 cmp r3, #1
800d25a: d110 bne.n 800d27e <osSemaphoreCreate+0x6a>
vSemaphoreCreateBinary(sema);
800d25c: 2203 movs r2, #3
800d25e: 2100 movs r1, #0
800d260: 2001 movs r0, #1
800d262: f000 fb14 bl 800d88e <xQueueGenericCreate>
800d266: 60f8 str r0, [r7, #12]
800d268: 68fb ldr r3, [r7, #12]
800d26a: 2b00 cmp r3, #0
800d26c: d005 beq.n 800d27a <osSemaphoreCreate+0x66>
800d26e: 2300 movs r3, #0
800d270: 2200 movs r2, #0
800d272: 2100 movs r1, #0
800d274: 68f8 ldr r0, [r7, #12]
800d276: f000 fc25 bl 800dac4 <xQueueGenericSend>
return sema;
800d27a: 68fb ldr r3, [r7, #12]
800d27c: e006 b.n 800d28c <osSemaphoreCreate+0x78>
}
else {
#if (configUSE_COUNTING_SEMAPHORES == 1 )
return xSemaphoreCreateCounting(count, count);
800d27e: 683b ldr r3, [r7, #0]
800d280: 683a ldr r2, [r7, #0]
800d282: 4611 mov r1, r2
800d284: 4618 mov r0, r3
800d286: f000 fbe8 bl 800da5a <xQueueCreateCountingSemaphore>
800d28a: 4603 mov r3, r0
#else
return NULL;
#endif
}
#endif
}
800d28c: 4618 mov r0, r3
800d28e: 3710 adds r7, #16
800d290: 46bd mov sp, r7
800d292: bd80 pop {r7, pc}
0800d294 <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)
{
800d294: b580 push {r7, lr}
800d296: b084 sub sp, #16
800d298: af00 add r7, sp, #0
800d29a: 6078 str r0, [r7, #4]
800d29c: 6039 str r1, [r7, #0]
TickType_t ticks;
portBASE_TYPE taskWoken = pdFALSE;
800d29e: 2300 movs r3, #0
800d2a0: 60bb str r3, [r7, #8]
if (semaphore_id == NULL) {
800d2a2: 687b ldr r3, [r7, #4]
800d2a4: 2b00 cmp r3, #0
800d2a6: d101 bne.n 800d2ac <osSemaphoreWait+0x18>
return osErrorParameter;
800d2a8: 2380 movs r3, #128 ; 0x80
800d2aa: e03a b.n 800d322 <osSemaphoreWait+0x8e>
}
ticks = 0;
800d2ac: 2300 movs r3, #0
800d2ae: 60fb str r3, [r7, #12]
if (millisec == osWaitForever) {
800d2b0: 683b ldr r3, [r7, #0]
800d2b2: f1b3 3fff cmp.w r3, #4294967295
800d2b6: d103 bne.n 800d2c0 <osSemaphoreWait+0x2c>
ticks = portMAX_DELAY;
800d2b8: f04f 33ff mov.w r3, #4294967295
800d2bc: 60fb str r3, [r7, #12]
800d2be: e009 b.n 800d2d4 <osSemaphoreWait+0x40>
}
else if (millisec != 0) {
800d2c0: 683b ldr r3, [r7, #0]
800d2c2: 2b00 cmp r3, #0
800d2c4: d006 beq.n 800d2d4 <osSemaphoreWait+0x40>
ticks = millisec / portTICK_PERIOD_MS;
800d2c6: 683b ldr r3, [r7, #0]
800d2c8: 60fb str r3, [r7, #12]
if (ticks == 0) {
800d2ca: 68fb ldr r3, [r7, #12]
800d2cc: 2b00 cmp r3, #0
800d2ce: d101 bne.n 800d2d4 <osSemaphoreWait+0x40>
ticks = 1;
800d2d0: 2301 movs r3, #1
800d2d2: 60fb str r3, [r7, #12]
}
}
if (inHandlerMode()) {
800d2d4: f7ff fe78 bl 800cfc8 <inHandlerMode>
800d2d8: 4603 mov r3, r0
800d2da: 2b00 cmp r3, #0
800d2dc: d017 beq.n 800d30e <osSemaphoreWait+0x7a>
if (xSemaphoreTakeFromISR(semaphore_id, &taskWoken) != pdTRUE) {
800d2de: f107 0308 add.w r3, r7, #8
800d2e2: 461a mov r2, r3
800d2e4: 2100 movs r1, #0
800d2e6: 6878 ldr r0, [r7, #4]
800d2e8: f001 f80e bl 800e308 <xQueueReceiveFromISR>
800d2ec: 4603 mov r3, r0
800d2ee: 2b01 cmp r3, #1
800d2f0: d001 beq.n 800d2f6 <osSemaphoreWait+0x62>
return osErrorOS;
800d2f2: 23ff movs r3, #255 ; 0xff
800d2f4: e015 b.n 800d322 <osSemaphoreWait+0x8e>
}
portEND_SWITCHING_ISR(taskWoken);
800d2f6: 68bb ldr r3, [r7, #8]
800d2f8: 2b00 cmp r3, #0
800d2fa: d011 beq.n 800d320 <osSemaphoreWait+0x8c>
800d2fc: 4b0b ldr r3, [pc, #44] ; (800d32c <osSemaphoreWait+0x98>)
800d2fe: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d302: 601a str r2, [r3, #0]
800d304: f3bf 8f4f dsb sy
800d308: f3bf 8f6f isb sy
800d30c: e008 b.n 800d320 <osSemaphoreWait+0x8c>
}
else if (xSemaphoreTake(semaphore_id, ticks) != pdTRUE) {
800d30e: 68f9 ldr r1, [r7, #12]
800d310: 6878 ldr r0, [r7, #4]
800d312: f000 fee9 bl 800e0e8 <xQueueSemaphoreTake>
800d316: 4603 mov r3, r0
800d318: 2b01 cmp r3, #1
800d31a: d001 beq.n 800d320 <osSemaphoreWait+0x8c>
return osErrorOS;
800d31c: 23ff movs r3, #255 ; 0xff
800d31e: e000 b.n 800d322 <osSemaphoreWait+0x8e>
}
return osOK;
800d320: 2300 movs r3, #0
}
800d322: 4618 mov r0, r3
800d324: 3710 adds r7, #16
800d326: 46bd mov sp, r7
800d328: bd80 pop {r7, pc}
800d32a: bf00 nop
800d32c: e000ed04 .word 0xe000ed04
0800d330 <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)
{
800d330: b580 push {r7, lr}
800d332: b084 sub sp, #16
800d334: af00 add r7, sp, #0
800d336: 6078 str r0, [r7, #4]
osStatus result = osOK;
800d338: 2300 movs r3, #0
800d33a: 60fb str r3, [r7, #12]
portBASE_TYPE taskWoken = pdFALSE;
800d33c: 2300 movs r3, #0
800d33e: 60bb str r3, [r7, #8]
if (inHandlerMode()) {
800d340: f7ff fe42 bl 800cfc8 <inHandlerMode>
800d344: 4603 mov r3, r0
800d346: 2b00 cmp r3, #0
800d348: d016 beq.n 800d378 <osSemaphoreRelease+0x48>
if (xSemaphoreGiveFromISR(semaphore_id, &taskWoken) != pdTRUE) {
800d34a: f107 0308 add.w r3, r7, #8
800d34e: 4619 mov r1, r3
800d350: 6878 ldr r0, [r7, #4]
800d352: f000 fd55 bl 800de00 <xQueueGiveFromISR>
800d356: 4603 mov r3, r0
800d358: 2b01 cmp r3, #1
800d35a: d001 beq.n 800d360 <osSemaphoreRelease+0x30>
return osErrorOS;
800d35c: 23ff movs r3, #255 ; 0xff
800d35e: e017 b.n 800d390 <osSemaphoreRelease+0x60>
}
portEND_SWITCHING_ISR(taskWoken);
800d360: 68bb ldr r3, [r7, #8]
800d362: 2b00 cmp r3, #0
800d364: d013 beq.n 800d38e <osSemaphoreRelease+0x5e>
800d366: 4b0c ldr r3, [pc, #48] ; (800d398 <osSemaphoreRelease+0x68>)
800d368: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d36c: 601a str r2, [r3, #0]
800d36e: f3bf 8f4f dsb sy
800d372: f3bf 8f6f isb sy
800d376: e00a b.n 800d38e <osSemaphoreRelease+0x5e>
}
else {
if (xSemaphoreGive(semaphore_id) != pdTRUE) {
800d378: 2300 movs r3, #0
800d37a: 2200 movs r2, #0
800d37c: 2100 movs r1, #0
800d37e: 6878 ldr r0, [r7, #4]
800d380: f000 fba0 bl 800dac4 <xQueueGenericSend>
800d384: 4603 mov r3, r0
800d386: 2b01 cmp r3, #1
800d388: d001 beq.n 800d38e <osSemaphoreRelease+0x5e>
result = osErrorOS;
800d38a: 23ff movs r3, #255 ; 0xff
800d38c: 60fb str r3, [r7, #12]
}
}
return result;
800d38e: 68fb ldr r3, [r7, #12]
}
800d390: 4618 mov r0, r3
800d392: 3710 adds r7, #16
800d394: 46bd mov sp, r7
800d396: bd80 pop {r7, pc}
800d398: e000ed04 .word 0xe000ed04
0800d39c <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)
{
800d39c: b590 push {r4, r7, lr}
800d39e: b085 sub sp, #20
800d3a0: af02 add r7, sp, #8
800d3a2: 6078 str r0, [r7, #4]
800d3a4: 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)) {
800d3a6: 687b ldr r3, [r7, #4]
800d3a8: 689b ldr r3, [r3, #8]
800d3aa: 2b00 cmp r3, #0
800d3ac: d012 beq.n 800d3d4 <osMessageCreate+0x38>
800d3ae: 687b ldr r3, [r7, #4]
800d3b0: 68db ldr r3, [r3, #12]
800d3b2: 2b00 cmp r3, #0
800d3b4: d00e beq.n 800d3d4 <osMessageCreate+0x38>
return xQueueCreateStatic(queue_def->queue_sz, queue_def->item_sz, queue_def->buffer, queue_def->controlblock);
800d3b6: 687b ldr r3, [r7, #4]
800d3b8: 6818 ldr r0, [r3, #0]
800d3ba: 687b ldr r3, [r7, #4]
800d3bc: 6859 ldr r1, [r3, #4]
800d3be: 687b ldr r3, [r7, #4]
800d3c0: 689a ldr r2, [r3, #8]
800d3c2: 687b ldr r3, [r7, #4]
800d3c4: 68dc ldr r4, [r3, #12]
800d3c6: 2300 movs r3, #0
800d3c8: 9300 str r3, [sp, #0]
800d3ca: 4623 mov r3, r4
800d3cc: f000 f9e2 bl 800d794 <xQueueGenericCreateStatic>
800d3d0: 4603 mov r3, r0
800d3d2: e008 b.n 800d3e6 <osMessageCreate+0x4a>
}
else {
return xQueueCreate(queue_def->queue_sz, queue_def->item_sz);
800d3d4: 687b ldr r3, [r7, #4]
800d3d6: 6818 ldr r0, [r3, #0]
800d3d8: 687b ldr r3, [r7, #4]
800d3da: 685b ldr r3, [r3, #4]
800d3dc: 2200 movs r2, #0
800d3de: 4619 mov r1, r3
800d3e0: f000 fa55 bl 800d88e <xQueueGenericCreate>
800d3e4: 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
}
800d3e6: 4618 mov r0, r3
800d3e8: 370c adds r7, #12
800d3ea: 46bd mov sp, r7
800d3ec: bd90 pop {r4, r7, pc}
...
0800d3f0 <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)
{
800d3f0: b580 push {r7, lr}
800d3f2: b086 sub sp, #24
800d3f4: af00 add r7, sp, #0
800d3f6: 60f8 str r0, [r7, #12]
800d3f8: 60b9 str r1, [r7, #8]
800d3fa: 607a str r2, [r7, #4]
portBASE_TYPE taskWoken = pdFALSE;
800d3fc: 2300 movs r3, #0
800d3fe: 613b str r3, [r7, #16]
TickType_t ticks;
ticks = millisec / portTICK_PERIOD_MS;
800d400: 687b ldr r3, [r7, #4]
800d402: 617b str r3, [r7, #20]
if (ticks == 0) {
800d404: 697b ldr r3, [r7, #20]
800d406: 2b00 cmp r3, #0
800d408: d101 bne.n 800d40e <osMessagePut+0x1e>
ticks = 1;
800d40a: 2301 movs r3, #1
800d40c: 617b str r3, [r7, #20]
}
if (inHandlerMode()) {
800d40e: f7ff fddb bl 800cfc8 <inHandlerMode>
800d412: 4603 mov r3, r0
800d414: 2b00 cmp r3, #0
800d416: d018 beq.n 800d44a <osMessagePut+0x5a>
if (xQueueSendFromISR(queue_id, &info, &taskWoken) != pdTRUE) {
800d418: f107 0210 add.w r2, r7, #16
800d41c: f107 0108 add.w r1, r7, #8
800d420: 2300 movs r3, #0
800d422: 68f8 ldr r0, [r7, #12]
800d424: f000 fc50 bl 800dcc8 <xQueueGenericSendFromISR>
800d428: 4603 mov r3, r0
800d42a: 2b01 cmp r3, #1
800d42c: d001 beq.n 800d432 <osMessagePut+0x42>
return osErrorOS;
800d42e: 23ff movs r3, #255 ; 0xff
800d430: e018 b.n 800d464 <osMessagePut+0x74>
}
portEND_SWITCHING_ISR(taskWoken);
800d432: 693b ldr r3, [r7, #16]
800d434: 2b00 cmp r3, #0
800d436: d014 beq.n 800d462 <osMessagePut+0x72>
800d438: 4b0c ldr r3, [pc, #48] ; (800d46c <osMessagePut+0x7c>)
800d43a: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d43e: 601a str r2, [r3, #0]
800d440: f3bf 8f4f dsb sy
800d444: f3bf 8f6f isb sy
800d448: e00b b.n 800d462 <osMessagePut+0x72>
}
else {
if (xQueueSend(queue_id, &info, ticks) != pdTRUE) {
800d44a: f107 0108 add.w r1, r7, #8
800d44e: 2300 movs r3, #0
800d450: 697a ldr r2, [r7, #20]
800d452: 68f8 ldr r0, [r7, #12]
800d454: f000 fb36 bl 800dac4 <xQueueGenericSend>
800d458: 4603 mov r3, r0
800d45a: 2b01 cmp r3, #1
800d45c: d001 beq.n 800d462 <osMessagePut+0x72>
return osErrorOS;
800d45e: 23ff movs r3, #255 ; 0xff
800d460: e000 b.n 800d464 <osMessagePut+0x74>
}
}
return osOK;
800d462: 2300 movs r3, #0
}
800d464: 4618 mov r0, r3
800d466: 3718 adds r7, #24
800d468: 46bd mov sp, r7
800d46a: bd80 pop {r7, pc}
800d46c: e000ed04 .word 0xe000ed04
0800d470 <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)
{
800d470: b590 push {r4, r7, lr}
800d472: b08b sub sp, #44 ; 0x2c
800d474: af00 add r7, sp, #0
800d476: 60f8 str r0, [r7, #12]
800d478: 60b9 str r1, [r7, #8]
800d47a: 607a str r2, [r7, #4]
portBASE_TYPE taskWoken;
TickType_t ticks;
osEvent event;
event.def.message_id = queue_id;
800d47c: 68bb ldr r3, [r7, #8]
800d47e: 61fb str r3, [r7, #28]
event.value.v = 0;
800d480: 2300 movs r3, #0
800d482: 61bb str r3, [r7, #24]
if (queue_id == NULL) {
800d484: 68bb ldr r3, [r7, #8]
800d486: 2b00 cmp r3, #0
800d488: d10a bne.n 800d4a0 <osMessageGet+0x30>
event.status = osErrorParameter;
800d48a: 2380 movs r3, #128 ; 0x80
800d48c: 617b str r3, [r7, #20]
return event;
800d48e: 68fb ldr r3, [r7, #12]
800d490: 461c mov r4, r3
800d492: f107 0314 add.w r3, r7, #20
800d496: e893 0007 ldmia.w r3, {r0, r1, r2}
800d49a: e884 0007 stmia.w r4, {r0, r1, r2}
800d49e: e054 b.n 800d54a <osMessageGet+0xda>
}
taskWoken = pdFALSE;
800d4a0: 2300 movs r3, #0
800d4a2: 623b str r3, [r7, #32]
ticks = 0;
800d4a4: 2300 movs r3, #0
800d4a6: 627b str r3, [r7, #36] ; 0x24
if (millisec == osWaitForever) {
800d4a8: 687b ldr r3, [r7, #4]
800d4aa: f1b3 3fff cmp.w r3, #4294967295
800d4ae: d103 bne.n 800d4b8 <osMessageGet+0x48>
ticks = portMAX_DELAY;
800d4b0: f04f 33ff mov.w r3, #4294967295
800d4b4: 627b str r3, [r7, #36] ; 0x24
800d4b6: e009 b.n 800d4cc <osMessageGet+0x5c>
}
else if (millisec != 0) {
800d4b8: 687b ldr r3, [r7, #4]
800d4ba: 2b00 cmp r3, #0
800d4bc: d006 beq.n 800d4cc <osMessageGet+0x5c>
ticks = millisec / portTICK_PERIOD_MS;
800d4be: 687b ldr r3, [r7, #4]
800d4c0: 627b str r3, [r7, #36] ; 0x24
if (ticks == 0) {
800d4c2: 6a7b ldr r3, [r7, #36] ; 0x24
800d4c4: 2b00 cmp r3, #0
800d4c6: d101 bne.n 800d4cc <osMessageGet+0x5c>
ticks = 1;
800d4c8: 2301 movs r3, #1
800d4ca: 627b str r3, [r7, #36] ; 0x24
}
}
if (inHandlerMode()) {
800d4cc: f7ff fd7c bl 800cfc8 <inHandlerMode>
800d4d0: 4603 mov r3, r0
800d4d2: 2b00 cmp r3, #0
800d4d4: d01c beq.n 800d510 <osMessageGet+0xa0>
if (xQueueReceiveFromISR(queue_id, &event.value.v, &taskWoken) == pdTRUE) {
800d4d6: f107 0220 add.w r2, r7, #32
800d4da: f107 0314 add.w r3, r7, #20
800d4de: 3304 adds r3, #4
800d4e0: 4619 mov r1, r3
800d4e2: 68b8 ldr r0, [r7, #8]
800d4e4: f000 ff10 bl 800e308 <xQueueReceiveFromISR>
800d4e8: 4603 mov r3, r0
800d4ea: 2b01 cmp r3, #1
800d4ec: d102 bne.n 800d4f4 <osMessageGet+0x84>
/* We have mail */
event.status = osEventMessage;
800d4ee: 2310 movs r3, #16
800d4f0: 617b str r3, [r7, #20]
800d4f2: e001 b.n 800d4f8 <osMessageGet+0x88>
}
else {
event.status = osOK;
800d4f4: 2300 movs r3, #0
800d4f6: 617b str r3, [r7, #20]
}
portEND_SWITCHING_ISR(taskWoken);
800d4f8: 6a3b ldr r3, [r7, #32]
800d4fa: 2b00 cmp r3, #0
800d4fc: d01d beq.n 800d53a <osMessageGet+0xca>
800d4fe: 4b15 ldr r3, [pc, #84] ; (800d554 <osMessageGet+0xe4>)
800d500: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d504: 601a str r2, [r3, #0]
800d506: f3bf 8f4f dsb sy
800d50a: f3bf 8f6f isb sy
800d50e: e014 b.n 800d53a <osMessageGet+0xca>
}
else {
if (xQueueReceive(queue_id, &event.value.v, ticks) == pdTRUE) {
800d510: f107 0314 add.w r3, r7, #20
800d514: 3304 adds r3, #4
800d516: 6a7a ldr r2, [r7, #36] ; 0x24
800d518: 4619 mov r1, r3
800d51a: 68b8 ldr r0, [r7, #8]
800d51c: f000 fd02 bl 800df24 <xQueueReceive>
800d520: 4603 mov r3, r0
800d522: 2b01 cmp r3, #1
800d524: d102 bne.n 800d52c <osMessageGet+0xbc>
/* We have mail */
event.status = osEventMessage;
800d526: 2310 movs r3, #16
800d528: 617b str r3, [r7, #20]
800d52a: e006 b.n 800d53a <osMessageGet+0xca>
}
else {
event.status = (ticks == 0) ? osOK : osEventTimeout;
800d52c: 6a7b ldr r3, [r7, #36] ; 0x24
800d52e: 2b00 cmp r3, #0
800d530: d101 bne.n 800d536 <osMessageGet+0xc6>
800d532: 2300 movs r3, #0
800d534: e000 b.n 800d538 <osMessageGet+0xc8>
800d536: 2340 movs r3, #64 ; 0x40
800d538: 617b str r3, [r7, #20]
}
}
return event;
800d53a: 68fb ldr r3, [r7, #12]
800d53c: 461c mov r4, r3
800d53e: f107 0314 add.w r3, r7, #20
800d542: e893 0007 ldmia.w r3, {r0, r1, r2}
800d546: e884 0007 stmia.w r4, {r0, r1, r2}
}
800d54a: 68f8 ldr r0, [r7, #12]
800d54c: 372c adds r7, #44 ; 0x2c
800d54e: 46bd mov sp, r7
800d550: bd90 pop {r4, r7, pc}
800d552: bf00 nop
800d554: e000ed04 .word 0xe000ed04
0800d558 <vListInitialise>:
/*-----------------------------------------------------------
* PUBLIC LIST API documented in list.h
*----------------------------------------------------------*/
void vListInitialise( List_t * const pxList )
{
800d558: b480 push {r7}
800d55a: b083 sub sp, #12
800d55c: af00 add r7, sp, #0
800d55e: 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. */
800d560: 687b ldr r3, [r7, #4]
800d562: f103 0208 add.w r2, r3, #8
800d566: 687b ldr r3, [r7, #4]
800d568: 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;
800d56a: 687b ldr r3, [r7, #4]
800d56c: f04f 32ff mov.w r2, #4294967295
800d570: 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. */
800d572: 687b ldr r3, [r7, #4]
800d574: f103 0208 add.w r2, r3, #8
800d578: 687b ldr r3, [r7, #4]
800d57a: 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. */
800d57c: 687b ldr r3, [r7, #4]
800d57e: f103 0208 add.w r2, r3, #8
800d582: 687b ldr r3, [r7, #4]
800d584: 611a str r2, [r3, #16]
pxList->uxNumberOfItems = ( UBaseType_t ) 0U;
800d586: 687b ldr r3, [r7, #4]
800d588: 2200 movs r2, #0
800d58a: 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 );
}
800d58c: bf00 nop
800d58e: 370c adds r7, #12
800d590: 46bd mov sp, r7
800d592: f85d 7b04 ldr.w r7, [sp], #4
800d596: 4770 bx lr
0800d598 <vListInitialiseItem>:
/*-----------------------------------------------------------*/
void vListInitialiseItem( ListItem_t * const pxItem )
{
800d598: b480 push {r7}
800d59a: b083 sub sp, #12
800d59c: af00 add r7, sp, #0
800d59e: 6078 str r0, [r7, #4]
/* Make sure the list item is not recorded as being on a list. */
pxItem->pxContainer = NULL;
800d5a0: 687b ldr r3, [r7, #4]
800d5a2: 2200 movs r2, #0
800d5a4: 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 );
}
800d5a6: bf00 nop
800d5a8: 370c adds r7, #12
800d5aa: 46bd mov sp, r7
800d5ac: f85d 7b04 ldr.w r7, [sp], #4
800d5b0: 4770 bx lr
0800d5b2 <vListInsertEnd>:
/*-----------------------------------------------------------*/
void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
{
800d5b2: b480 push {r7}
800d5b4: b085 sub sp, #20
800d5b6: af00 add r7, sp, #0
800d5b8: 6078 str r0, [r7, #4]
800d5ba: 6039 str r1, [r7, #0]
ListItem_t * const pxIndex = pxList->pxIndex;
800d5bc: 687b ldr r3, [r7, #4]
800d5be: 685b ldr r3, [r3, #4]
800d5c0: 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;
800d5c2: 683b ldr r3, [r7, #0]
800d5c4: 68fa ldr r2, [r7, #12]
800d5c6: 605a str r2, [r3, #4]
pxNewListItem->pxPrevious = pxIndex->pxPrevious;
800d5c8: 68fb ldr r3, [r7, #12]
800d5ca: 689a ldr r2, [r3, #8]
800d5cc: 683b ldr r3, [r7, #0]
800d5ce: 609a str r2, [r3, #8]
/* Only used during decision coverage testing. */
mtCOVERAGE_TEST_DELAY();
pxIndex->pxPrevious->pxNext = pxNewListItem;
800d5d0: 68fb ldr r3, [r7, #12]
800d5d2: 689b ldr r3, [r3, #8]
800d5d4: 683a ldr r2, [r7, #0]
800d5d6: 605a str r2, [r3, #4]
pxIndex->pxPrevious = pxNewListItem;
800d5d8: 68fb ldr r3, [r7, #12]
800d5da: 683a ldr r2, [r7, #0]
800d5dc: 609a str r2, [r3, #8]
/* Remember which list the item is in. */
pxNewListItem->pxContainer = pxList;
800d5de: 683b ldr r3, [r7, #0]
800d5e0: 687a ldr r2, [r7, #4]
800d5e2: 611a str r2, [r3, #16]
( pxList->uxNumberOfItems )++;
800d5e4: 687b ldr r3, [r7, #4]
800d5e6: 681b ldr r3, [r3, #0]
800d5e8: 1c5a adds r2, r3, #1
800d5ea: 687b ldr r3, [r7, #4]
800d5ec: 601a str r2, [r3, #0]
}
800d5ee: bf00 nop
800d5f0: 3714 adds r7, #20
800d5f2: 46bd mov sp, r7
800d5f4: f85d 7b04 ldr.w r7, [sp], #4
800d5f8: 4770 bx lr
0800d5fa <vListInsert>:
/*-----------------------------------------------------------*/
void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem )
{
800d5fa: b480 push {r7}
800d5fc: b085 sub sp, #20
800d5fe: af00 add r7, sp, #0
800d600: 6078 str r0, [r7, #4]
800d602: 6039 str r1, [r7, #0]
ListItem_t *pxIterator;
const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
800d604: 683b ldr r3, [r7, #0]
800d606: 681b ldr r3, [r3, #0]
800d608: 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 )
800d60a: 68bb ldr r3, [r7, #8]
800d60c: f1b3 3fff cmp.w r3, #4294967295
800d610: d103 bne.n 800d61a <vListInsert+0x20>
{
pxIterator = pxList->xListEnd.pxPrevious;
800d612: 687b ldr r3, [r7, #4]
800d614: 691b ldr r3, [r3, #16]
800d616: 60fb str r3, [r7, #12]
800d618: e00c b.n 800d634 <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. */
800d61a: 687b ldr r3, [r7, #4]
800d61c: 3308 adds r3, #8
800d61e: 60fb str r3, [r7, #12]
800d620: e002 b.n 800d628 <vListInsert+0x2e>
800d622: 68fb ldr r3, [r7, #12]
800d624: 685b ldr r3, [r3, #4]
800d626: 60fb str r3, [r7, #12]
800d628: 68fb ldr r3, [r7, #12]
800d62a: 685b ldr r3, [r3, #4]
800d62c: 681b ldr r3, [r3, #0]
800d62e: 68ba ldr r2, [r7, #8]
800d630: 429a cmp r2, r3
800d632: d2f6 bcs.n 800d622 <vListInsert+0x28>
/* There is nothing to do here, just iterating to the wanted
insertion position. */
}
}
pxNewListItem->pxNext = pxIterator->pxNext;
800d634: 68fb ldr r3, [r7, #12]
800d636: 685a ldr r2, [r3, #4]
800d638: 683b ldr r3, [r7, #0]
800d63a: 605a str r2, [r3, #4]
pxNewListItem->pxNext->pxPrevious = pxNewListItem;
800d63c: 683b ldr r3, [r7, #0]
800d63e: 685b ldr r3, [r3, #4]
800d640: 683a ldr r2, [r7, #0]
800d642: 609a str r2, [r3, #8]
pxNewListItem->pxPrevious = pxIterator;
800d644: 683b ldr r3, [r7, #0]
800d646: 68fa ldr r2, [r7, #12]
800d648: 609a str r2, [r3, #8]
pxIterator->pxNext = pxNewListItem;
800d64a: 68fb ldr r3, [r7, #12]
800d64c: 683a ldr r2, [r7, #0]
800d64e: 605a str r2, [r3, #4]
/* Remember which list the item is in. This allows fast removal of the
item later. */
pxNewListItem->pxContainer = pxList;
800d650: 683b ldr r3, [r7, #0]
800d652: 687a ldr r2, [r7, #4]
800d654: 611a str r2, [r3, #16]
( pxList->uxNumberOfItems )++;
800d656: 687b ldr r3, [r7, #4]
800d658: 681b ldr r3, [r3, #0]
800d65a: 1c5a adds r2, r3, #1
800d65c: 687b ldr r3, [r7, #4]
800d65e: 601a str r2, [r3, #0]
}
800d660: bf00 nop
800d662: 3714 adds r7, #20
800d664: 46bd mov sp, r7
800d666: f85d 7b04 ldr.w r7, [sp], #4
800d66a: 4770 bx lr
0800d66c <uxListRemove>:
/*-----------------------------------------------------------*/
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
{
800d66c: b480 push {r7}
800d66e: b085 sub sp, #20
800d670: af00 add r7, sp, #0
800d672: 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;
800d674: 687b ldr r3, [r7, #4]
800d676: 691b ldr r3, [r3, #16]
800d678: 60fb str r3, [r7, #12]
pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
800d67a: 687b ldr r3, [r7, #4]
800d67c: 685b ldr r3, [r3, #4]
800d67e: 687a ldr r2, [r7, #4]
800d680: 6892 ldr r2, [r2, #8]
800d682: 609a str r2, [r3, #8]
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
800d684: 687b ldr r3, [r7, #4]
800d686: 689b ldr r3, [r3, #8]
800d688: 687a ldr r2, [r7, #4]
800d68a: 6852 ldr r2, [r2, #4]
800d68c: 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 )
800d68e: 68fb ldr r3, [r7, #12]
800d690: 685b ldr r3, [r3, #4]
800d692: 687a ldr r2, [r7, #4]
800d694: 429a cmp r2, r3
800d696: d103 bne.n 800d6a0 <uxListRemove+0x34>
{
pxList->pxIndex = pxItemToRemove->pxPrevious;
800d698: 687b ldr r3, [r7, #4]
800d69a: 689a ldr r2, [r3, #8]
800d69c: 68fb ldr r3, [r7, #12]
800d69e: 605a str r2, [r3, #4]
else
{
mtCOVERAGE_TEST_MARKER();
}
pxItemToRemove->pxContainer = NULL;
800d6a0: 687b ldr r3, [r7, #4]
800d6a2: 2200 movs r2, #0
800d6a4: 611a str r2, [r3, #16]
( pxList->uxNumberOfItems )--;
800d6a6: 68fb ldr r3, [r7, #12]
800d6a8: 681b ldr r3, [r3, #0]
800d6aa: 1e5a subs r2, r3, #1
800d6ac: 68fb ldr r3, [r7, #12]
800d6ae: 601a str r2, [r3, #0]
return pxList->uxNumberOfItems;
800d6b0: 68fb ldr r3, [r7, #12]
800d6b2: 681b ldr r3, [r3, #0]
}
800d6b4: 4618 mov r0, r3
800d6b6: 3714 adds r7, #20
800d6b8: 46bd mov sp, r7
800d6ba: f85d 7b04 ldr.w r7, [sp], #4
800d6be: 4770 bx lr
0800d6c0 <xQueueGenericReset>:
} \
taskEXIT_CRITICAL()
/*-----------------------------------------------------------*/
BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue )
{
800d6c0: b580 push {r7, lr}
800d6c2: b084 sub sp, #16
800d6c4: af00 add r7, sp, #0
800d6c6: 6078 str r0, [r7, #4]
800d6c8: 6039 str r1, [r7, #0]
Queue_t * const pxQueue = xQueue;
800d6ca: 687b ldr r3, [r7, #4]
800d6cc: 60fb str r3, [r7, #12]
configASSERT( pxQueue );
800d6ce: 68fb ldr r3, [r7, #12]
800d6d0: 2b00 cmp r3, #0
800d6d2: d10b bne.n 800d6ec <xQueueGenericReset+0x2c>
portFORCE_INLINE static void vPortRaiseBASEPRI( void )
{
uint32_t ulNewBASEPRI;
__asm volatile
800d6d4: f04f 0350 mov.w r3, #80 ; 0x50
800d6d8: b672 cpsid i
800d6da: f383 8811 msr BASEPRI, r3
800d6de: f3bf 8f6f isb sy
800d6e2: f3bf 8f4f dsb sy
800d6e6: b662 cpsie i
800d6e8: 60bb str r3, [r7, #8]
800d6ea: e7fe b.n 800d6ea <xQueueGenericReset+0x2a>
taskENTER_CRITICAL();
800d6ec: f002 f9a4 bl 800fa38 <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. */
800d6f0: 68fb ldr r3, [r7, #12]
800d6f2: 681a ldr r2, [r3, #0]
800d6f4: 68fb ldr r3, [r7, #12]
800d6f6: 6bdb ldr r3, [r3, #60] ; 0x3c
800d6f8: 68f9 ldr r1, [r7, #12]
800d6fa: 6c09 ldr r1, [r1, #64] ; 0x40
800d6fc: fb01 f303 mul.w r3, r1, r3
800d700: 441a add r2, r3
800d702: 68fb ldr r3, [r7, #12]
800d704: 609a str r2, [r3, #8]
pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U;
800d706: 68fb ldr r3, [r7, #12]
800d708: 2200 movs r2, #0
800d70a: 639a str r2, [r3, #56] ; 0x38
pxQueue->pcWriteTo = pxQueue->pcHead;
800d70c: 68fb ldr r3, [r7, #12]
800d70e: 681a ldr r2, [r3, #0]
800d710: 68fb ldr r3, [r7, #12]
800d712: 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. */
800d714: 68fb ldr r3, [r7, #12]
800d716: 681a ldr r2, [r3, #0]
800d718: 68fb ldr r3, [r7, #12]
800d71a: 6bdb ldr r3, [r3, #60] ; 0x3c
800d71c: 3b01 subs r3, #1
800d71e: 68f9 ldr r1, [r7, #12]
800d720: 6c09 ldr r1, [r1, #64] ; 0x40
800d722: fb01 f303 mul.w r3, r1, r3
800d726: 441a add r2, r3
800d728: 68fb ldr r3, [r7, #12]
800d72a: 60da str r2, [r3, #12]
pxQueue->cRxLock = queueUNLOCKED;
800d72c: 68fb ldr r3, [r7, #12]
800d72e: 22ff movs r2, #255 ; 0xff
800d730: f883 2044 strb.w r2, [r3, #68] ; 0x44
pxQueue->cTxLock = queueUNLOCKED;
800d734: 68fb ldr r3, [r7, #12]
800d736: 22ff movs r2, #255 ; 0xff
800d738: f883 2045 strb.w r2, [r3, #69] ; 0x45
if( xNewQueue == pdFALSE )
800d73c: 683b ldr r3, [r7, #0]
800d73e: 2b00 cmp r3, #0
800d740: d114 bne.n 800d76c <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 )
800d742: 68fb ldr r3, [r7, #12]
800d744: 691b ldr r3, [r3, #16]
800d746: 2b00 cmp r3, #0
800d748: d01a beq.n 800d780 <xQueueGenericReset+0xc0>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800d74a: 68fb ldr r3, [r7, #12]
800d74c: 3310 adds r3, #16
800d74e: 4618 mov r0, r3
800d750: f001 fc70 bl 800f034 <xTaskRemoveFromEventList>
800d754: 4603 mov r3, r0
800d756: 2b00 cmp r3, #0
800d758: d012 beq.n 800d780 <xQueueGenericReset+0xc0>
{
queueYIELD_IF_USING_PREEMPTION();
800d75a: 4b0d ldr r3, [pc, #52] ; (800d790 <xQueueGenericReset+0xd0>)
800d75c: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800d760: 601a str r2, [r3, #0]
800d762: f3bf 8f4f dsb sy
800d766: f3bf 8f6f isb sy
800d76a: e009 b.n 800d780 <xQueueGenericReset+0xc0>
}
}
else
{
/* Ensure the event queues start in the correct state. */
vListInitialise( &( pxQueue->xTasksWaitingToSend ) );
800d76c: 68fb ldr r3, [r7, #12]
800d76e: 3310 adds r3, #16
800d770: 4618 mov r0, r3
800d772: f7ff fef1 bl 800d558 <vListInitialise>
vListInitialise( &( pxQueue->xTasksWaitingToReceive ) );
800d776: 68fb ldr r3, [r7, #12]
800d778: 3324 adds r3, #36 ; 0x24
800d77a: 4618 mov r0, r3
800d77c: f7ff feec bl 800d558 <vListInitialise>
}
}
taskEXIT_CRITICAL();
800d780: f002 f98c bl 800fa9c <vPortExitCritical>
/* A value is returned for calling semantic consistency with previous
versions. */
return pdPASS;
800d784: 2301 movs r3, #1
}
800d786: 4618 mov r0, r3
800d788: 3710 adds r7, #16
800d78a: 46bd mov sp, r7
800d78c: bd80 pop {r7, pc}
800d78e: bf00 nop
800d790: e000ed04 .word 0xe000ed04
0800d794 <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 )
{
800d794: b580 push {r7, lr}
800d796: b08e sub sp, #56 ; 0x38
800d798: af02 add r7, sp, #8
800d79a: 60f8 str r0, [r7, #12]
800d79c: 60b9 str r1, [r7, #8]
800d79e: 607a str r2, [r7, #4]
800d7a0: 603b str r3, [r7, #0]
Queue_t *pxNewQueue;
configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
800d7a2: 68fb ldr r3, [r7, #12]
800d7a4: 2b00 cmp r3, #0
800d7a6: d10b bne.n 800d7c0 <xQueueGenericCreateStatic+0x2c>
800d7a8: f04f 0350 mov.w r3, #80 ; 0x50
800d7ac: b672 cpsid i
800d7ae: f383 8811 msr BASEPRI, r3
800d7b2: f3bf 8f6f isb sy
800d7b6: f3bf 8f4f dsb sy
800d7ba: b662 cpsie i
800d7bc: 62bb str r3, [r7, #40] ; 0x28
800d7be: e7fe b.n 800d7be <xQueueGenericCreateStatic+0x2a>
/* The StaticQueue_t structure and the queue storage area must be
supplied. */
configASSERT( pxStaticQueue != NULL );
800d7c0: 683b ldr r3, [r7, #0]
800d7c2: 2b00 cmp r3, #0
800d7c4: d10b bne.n 800d7de <xQueueGenericCreateStatic+0x4a>
800d7c6: f04f 0350 mov.w r3, #80 ; 0x50
800d7ca: b672 cpsid i
800d7cc: f383 8811 msr BASEPRI, r3
800d7d0: f3bf 8f6f isb sy
800d7d4: f3bf 8f4f dsb sy
800d7d8: b662 cpsie i
800d7da: 627b str r3, [r7, #36] ; 0x24
800d7dc: e7fe b.n 800d7dc <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 ) ) );
800d7de: 687b ldr r3, [r7, #4]
800d7e0: 2b00 cmp r3, #0
800d7e2: d002 beq.n 800d7ea <xQueueGenericCreateStatic+0x56>
800d7e4: 68bb ldr r3, [r7, #8]
800d7e6: 2b00 cmp r3, #0
800d7e8: d001 beq.n 800d7ee <xQueueGenericCreateStatic+0x5a>
800d7ea: 2301 movs r3, #1
800d7ec: e000 b.n 800d7f0 <xQueueGenericCreateStatic+0x5c>
800d7ee: 2300 movs r3, #0
800d7f0: 2b00 cmp r3, #0
800d7f2: d10b bne.n 800d80c <xQueueGenericCreateStatic+0x78>
800d7f4: f04f 0350 mov.w r3, #80 ; 0x50
800d7f8: b672 cpsid i
800d7fa: f383 8811 msr BASEPRI, r3
800d7fe: f3bf 8f6f isb sy
800d802: f3bf 8f4f dsb sy
800d806: b662 cpsie i
800d808: 623b str r3, [r7, #32]
800d80a: e7fe b.n 800d80a <xQueueGenericCreateStatic+0x76>
configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) );
800d80c: 687b ldr r3, [r7, #4]
800d80e: 2b00 cmp r3, #0
800d810: d102 bne.n 800d818 <xQueueGenericCreateStatic+0x84>
800d812: 68bb ldr r3, [r7, #8]
800d814: 2b00 cmp r3, #0
800d816: d101 bne.n 800d81c <xQueueGenericCreateStatic+0x88>
800d818: 2301 movs r3, #1
800d81a: e000 b.n 800d81e <xQueueGenericCreateStatic+0x8a>
800d81c: 2300 movs r3, #0
800d81e: 2b00 cmp r3, #0
800d820: d10b bne.n 800d83a <xQueueGenericCreateStatic+0xa6>
800d822: f04f 0350 mov.w r3, #80 ; 0x50
800d826: b672 cpsid i
800d828: f383 8811 msr BASEPRI, r3
800d82c: f3bf 8f6f isb sy
800d830: f3bf 8f4f dsb sy
800d834: b662 cpsie i
800d836: 61fb str r3, [r7, #28]
800d838: e7fe b.n 800d838 <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 );
800d83a: 2348 movs r3, #72 ; 0x48
800d83c: 617b str r3, [r7, #20]
configASSERT( xSize == sizeof( Queue_t ) );
800d83e: 697b ldr r3, [r7, #20]
800d840: 2b48 cmp r3, #72 ; 0x48
800d842: d00b beq.n 800d85c <xQueueGenericCreateStatic+0xc8>
800d844: f04f 0350 mov.w r3, #80 ; 0x50
800d848: b672 cpsid i
800d84a: f383 8811 msr BASEPRI, r3
800d84e: f3bf 8f6f isb sy
800d852: f3bf 8f4f dsb sy
800d856: b662 cpsie i
800d858: 61bb str r3, [r7, #24]
800d85a: e7fe b.n 800d85a <xQueueGenericCreateStatic+0xc6>
( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */
800d85c: 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. */
800d85e: 683b ldr r3, [r7, #0]
800d860: 62fb str r3, [r7, #44] ; 0x2c
if( pxNewQueue != NULL )
800d862: 6afb ldr r3, [r7, #44] ; 0x2c
800d864: 2b00 cmp r3, #0
800d866: d00d beq.n 800d884 <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;
800d868: 6afb ldr r3, [r7, #44] ; 0x2c
800d86a: 2201 movs r2, #1
800d86c: f883 2046 strb.w r2, [r3, #70] ; 0x46
}
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
800d870: f897 2038 ldrb.w r2, [r7, #56] ; 0x38
800d874: 6afb ldr r3, [r7, #44] ; 0x2c
800d876: 9300 str r3, [sp, #0]
800d878: 4613 mov r3, r2
800d87a: 687a ldr r2, [r7, #4]
800d87c: 68b9 ldr r1, [r7, #8]
800d87e: 68f8 ldr r0, [r7, #12]
800d880: f000 f846 bl 800d910 <prvInitialiseNewQueue>
{
traceQUEUE_CREATE_FAILED( ucQueueType );
mtCOVERAGE_TEST_MARKER();
}
return pxNewQueue;
800d884: 6afb ldr r3, [r7, #44] ; 0x2c
}
800d886: 4618 mov r0, r3
800d888: 3730 adds r7, #48 ; 0x30
800d88a: 46bd mov sp, r7
800d88c: bd80 pop {r7, pc}
0800d88e <xQueueGenericCreate>:
/*-----------------------------------------------------------*/
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType )
{
800d88e: b580 push {r7, lr}
800d890: b08a sub sp, #40 ; 0x28
800d892: af02 add r7, sp, #8
800d894: 60f8 str r0, [r7, #12]
800d896: 60b9 str r1, [r7, #8]
800d898: 4613 mov r3, r2
800d89a: 71fb strb r3, [r7, #7]
Queue_t *pxNewQueue;
size_t xQueueSizeInBytes;
uint8_t *pucQueueStorage;
configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
800d89c: 68fb ldr r3, [r7, #12]
800d89e: 2b00 cmp r3, #0
800d8a0: d10b bne.n 800d8ba <xQueueGenericCreate+0x2c>
800d8a2: f04f 0350 mov.w r3, #80 ; 0x50
800d8a6: b672 cpsid i
800d8a8: f383 8811 msr BASEPRI, r3
800d8ac: f3bf 8f6f isb sy
800d8b0: f3bf 8f4f dsb sy
800d8b4: b662 cpsie i
800d8b6: 613b str r3, [r7, #16]
800d8b8: e7fe b.n 800d8b8 <xQueueGenericCreate+0x2a>
if( uxItemSize == ( UBaseType_t ) 0 )
800d8ba: 68bb ldr r3, [r7, #8]
800d8bc: 2b00 cmp r3, #0
800d8be: d102 bne.n 800d8c6 <xQueueGenericCreate+0x38>
{
/* There is not going to be a queue storage area. */
xQueueSizeInBytes = ( size_t ) 0;
800d8c0: 2300 movs r3, #0
800d8c2: 61fb str r3, [r7, #28]
800d8c4: e004 b.n 800d8d0 <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. */
800d8c6: 68fb ldr r3, [r7, #12]
800d8c8: 68ba ldr r2, [r7, #8]
800d8ca: fb02 f303 mul.w r3, r2, r3
800d8ce: 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. */
800d8d0: 69fb ldr r3, [r7, #28]
800d8d2: 3348 adds r3, #72 ; 0x48
800d8d4: 4618 mov r0, r3
800d8d6: f002 f9d1 bl 800fc7c <pvPortMalloc>
800d8da: 61b8 str r0, [r7, #24]
if( pxNewQueue != NULL )
800d8dc: 69bb ldr r3, [r7, #24]
800d8de: 2b00 cmp r3, #0
800d8e0: d011 beq.n 800d906 <xQueueGenericCreate+0x78>
{
/* Jump past the queue structure to find the location of the queue
storage area. */
pucQueueStorage = ( uint8_t * ) pxNewQueue;
800d8e2: 69bb ldr r3, [r7, #24]
800d8e4: 617b str r3, [r7, #20]
pucQueueStorage += sizeof( Queue_t ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
800d8e6: 697b ldr r3, [r7, #20]
800d8e8: 3348 adds r3, #72 ; 0x48
800d8ea: 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;
800d8ec: 69bb ldr r3, [r7, #24]
800d8ee: 2200 movs r2, #0
800d8f0: f883 2046 strb.w r2, [r3, #70] ; 0x46
}
#endif /* configSUPPORT_STATIC_ALLOCATION */
prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
800d8f4: 79fa ldrb r2, [r7, #7]
800d8f6: 69bb ldr r3, [r7, #24]
800d8f8: 9300 str r3, [sp, #0]
800d8fa: 4613 mov r3, r2
800d8fc: 697a ldr r2, [r7, #20]
800d8fe: 68b9 ldr r1, [r7, #8]
800d900: 68f8 ldr r0, [r7, #12]
800d902: f000 f805 bl 800d910 <prvInitialiseNewQueue>
{
traceQUEUE_CREATE_FAILED( ucQueueType );
mtCOVERAGE_TEST_MARKER();
}
return pxNewQueue;
800d906: 69bb ldr r3, [r7, #24]
}
800d908: 4618 mov r0, r3
800d90a: 3720 adds r7, #32
800d90c: 46bd mov sp, r7
800d90e: bd80 pop {r7, pc}
0800d910 <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 )
{
800d910: b580 push {r7, lr}
800d912: b084 sub sp, #16
800d914: af00 add r7, sp, #0
800d916: 60f8 str r0, [r7, #12]
800d918: 60b9 str r1, [r7, #8]
800d91a: 607a str r2, [r7, #4]
800d91c: 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 )
800d91e: 68bb ldr r3, [r7, #8]
800d920: 2b00 cmp r3, #0
800d922: d103 bne.n 800d92c <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;
800d924: 69bb ldr r3, [r7, #24]
800d926: 69ba ldr r2, [r7, #24]
800d928: 601a str r2, [r3, #0]
800d92a: e002 b.n 800d932 <prvInitialiseNewQueue+0x22>
}
else
{
/* Set the head to the start of the queue storage area. */
pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage;
800d92c: 69bb ldr r3, [r7, #24]
800d92e: 687a ldr r2, [r7, #4]
800d930: 601a str r2, [r3, #0]
}
/* Initialise the queue members as described where the queue type is
defined. */
pxNewQueue->uxLength = uxQueueLength;
800d932: 69bb ldr r3, [r7, #24]
800d934: 68fa ldr r2, [r7, #12]
800d936: 63da str r2, [r3, #60] ; 0x3c
pxNewQueue->uxItemSize = uxItemSize;
800d938: 69bb ldr r3, [r7, #24]
800d93a: 68ba ldr r2, [r7, #8]
800d93c: 641a str r2, [r3, #64] ; 0x40
( void ) xQueueGenericReset( pxNewQueue, pdTRUE );
800d93e: 2101 movs r1, #1
800d940: 69b8 ldr r0, [r7, #24]
800d942: f7ff febd bl 800d6c0 <xQueueGenericReset>
pxNewQueue->pxQueueSetContainer = NULL;
}
#endif /* configUSE_QUEUE_SETS */
traceQUEUE_CREATE( pxNewQueue );
}
800d946: bf00 nop
800d948: 3710 adds r7, #16
800d94a: 46bd mov sp, r7
800d94c: bd80 pop {r7, pc}
0800d94e <prvInitialiseMutex>:
/*-----------------------------------------------------------*/
#if( configUSE_MUTEXES == 1 )
static void prvInitialiseMutex( Queue_t *pxNewQueue )
{
800d94e: b580 push {r7, lr}
800d950: b082 sub sp, #8
800d952: af00 add r7, sp, #0
800d954: 6078 str r0, [r7, #4]
if( pxNewQueue != NULL )
800d956: 687b ldr r3, [r7, #4]
800d958: 2b00 cmp r3, #0
800d95a: d00e beq.n 800d97a <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;
800d95c: 687b ldr r3, [r7, #4]
800d95e: 2200 movs r2, #0
800d960: 609a str r2, [r3, #8]
pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX;
800d962: 687b ldr r3, [r7, #4]
800d964: 2200 movs r2, #0
800d966: 601a str r2, [r3, #0]
/* In case this is a recursive mutex. */
pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0;
800d968: 687b ldr r3, [r7, #4]
800d96a: 2200 movs r2, #0
800d96c: 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 );
800d96e: 2300 movs r3, #0
800d970: 2200 movs r2, #0
800d972: 2100 movs r1, #0
800d974: 6878 ldr r0, [r7, #4]
800d976: f000 f8a5 bl 800dac4 <xQueueGenericSend>
}
else
{
traceCREATE_MUTEX_FAILED();
}
}
800d97a: bf00 nop
800d97c: 3708 adds r7, #8
800d97e: 46bd mov sp, r7
800d980: bd80 pop {r7, pc}
0800d982 <xQueueCreateMutex>:
/*-----------------------------------------------------------*/
#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType )
{
800d982: b580 push {r7, lr}
800d984: b086 sub sp, #24
800d986: af00 add r7, sp, #0
800d988: 4603 mov r3, r0
800d98a: 71fb strb r3, [r7, #7]
QueueHandle_t xNewQueue;
const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0;
800d98c: 2301 movs r3, #1
800d98e: 617b str r3, [r7, #20]
800d990: 2300 movs r3, #0
800d992: 613b str r3, [r7, #16]
xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType );
800d994: 79fb ldrb r3, [r7, #7]
800d996: 461a mov r2, r3
800d998: 6939 ldr r1, [r7, #16]
800d99a: 6978 ldr r0, [r7, #20]
800d99c: f7ff ff77 bl 800d88e <xQueueGenericCreate>
800d9a0: 60f8 str r0, [r7, #12]
prvInitialiseMutex( ( Queue_t * ) xNewQueue );
800d9a2: 68f8 ldr r0, [r7, #12]
800d9a4: f7ff ffd3 bl 800d94e <prvInitialiseMutex>
return xNewQueue;
800d9a8: 68fb ldr r3, [r7, #12]
}
800d9aa: 4618 mov r0, r3
800d9ac: 3718 adds r7, #24
800d9ae: 46bd mov sp, r7
800d9b0: bd80 pop {r7, pc}
0800d9b2 <xQueueCreateMutexStatic>:
/*-----------------------------------------------------------*/
#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue )
{
800d9b2: b580 push {r7, lr}
800d9b4: b088 sub sp, #32
800d9b6: af02 add r7, sp, #8
800d9b8: 4603 mov r3, r0
800d9ba: 6039 str r1, [r7, #0]
800d9bc: 71fb strb r3, [r7, #7]
QueueHandle_t xNewQueue;
const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0;
800d9be: 2301 movs r3, #1
800d9c0: 617b str r3, [r7, #20]
800d9c2: 2300 movs r3, #0
800d9c4: 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 );
800d9c6: 79fb ldrb r3, [r7, #7]
800d9c8: 9300 str r3, [sp, #0]
800d9ca: 683b ldr r3, [r7, #0]
800d9cc: 2200 movs r2, #0
800d9ce: 6939 ldr r1, [r7, #16]
800d9d0: 6978 ldr r0, [r7, #20]
800d9d2: f7ff fedf bl 800d794 <xQueueGenericCreateStatic>
800d9d6: 60f8 str r0, [r7, #12]
prvInitialiseMutex( ( Queue_t * ) xNewQueue );
800d9d8: 68f8 ldr r0, [r7, #12]
800d9da: f7ff ffb8 bl 800d94e <prvInitialiseMutex>
return xNewQueue;
800d9de: 68fb ldr r3, [r7, #12]
}
800d9e0: 4618 mov r0, r3
800d9e2: 3718 adds r7, #24
800d9e4: 46bd mov sp, r7
800d9e6: bd80 pop {r7, pc}
0800d9e8 <xQueueCreateCountingSemaphoreStatic>:
/*-----------------------------------------------------------*/
#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue )
{
800d9e8: b580 push {r7, lr}
800d9ea: b08a sub sp, #40 ; 0x28
800d9ec: af02 add r7, sp, #8
800d9ee: 60f8 str r0, [r7, #12]
800d9f0: 60b9 str r1, [r7, #8]
800d9f2: 607a str r2, [r7, #4]
QueueHandle_t xHandle;
configASSERT( uxMaxCount != 0 );
800d9f4: 68fb ldr r3, [r7, #12]
800d9f6: 2b00 cmp r3, #0
800d9f8: d10b bne.n 800da12 <xQueueCreateCountingSemaphoreStatic+0x2a>
800d9fa: f04f 0350 mov.w r3, #80 ; 0x50
800d9fe: b672 cpsid i
800da00: f383 8811 msr BASEPRI, r3
800da04: f3bf 8f6f isb sy
800da08: f3bf 8f4f dsb sy
800da0c: b662 cpsie i
800da0e: 61bb str r3, [r7, #24]
800da10: e7fe b.n 800da10 <xQueueCreateCountingSemaphoreStatic+0x28>
configASSERT( uxInitialCount <= uxMaxCount );
800da12: 68ba ldr r2, [r7, #8]
800da14: 68fb ldr r3, [r7, #12]
800da16: 429a cmp r2, r3
800da18: d90b bls.n 800da32 <xQueueCreateCountingSemaphoreStatic+0x4a>
800da1a: f04f 0350 mov.w r3, #80 ; 0x50
800da1e: b672 cpsid i
800da20: f383 8811 msr BASEPRI, r3
800da24: f3bf 8f6f isb sy
800da28: f3bf 8f4f dsb sy
800da2c: b662 cpsie i
800da2e: 617b str r3, [r7, #20]
800da30: e7fe b.n 800da30 <xQueueCreateCountingSemaphoreStatic+0x48>
xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
800da32: 2302 movs r3, #2
800da34: 9300 str r3, [sp, #0]
800da36: 687b ldr r3, [r7, #4]
800da38: 2200 movs r2, #0
800da3a: 2100 movs r1, #0
800da3c: 68f8 ldr r0, [r7, #12]
800da3e: f7ff fea9 bl 800d794 <xQueueGenericCreateStatic>
800da42: 61f8 str r0, [r7, #28]
if( xHandle != NULL )
800da44: 69fb ldr r3, [r7, #28]
800da46: 2b00 cmp r3, #0
800da48: d002 beq.n 800da50 <xQueueCreateCountingSemaphoreStatic+0x68>
{
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
800da4a: 69fb ldr r3, [r7, #28]
800da4c: 68ba ldr r2, [r7, #8]
800da4e: 639a str r2, [r3, #56] ; 0x38
else
{
traceCREATE_COUNTING_SEMAPHORE_FAILED();
}
return xHandle;
800da50: 69fb ldr r3, [r7, #28]
}
800da52: 4618 mov r0, r3
800da54: 3720 adds r7, #32
800da56: 46bd mov sp, r7
800da58: bd80 pop {r7, pc}
0800da5a <xQueueCreateCountingSemaphore>:
/*-----------------------------------------------------------*/
#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount )
{
800da5a: b580 push {r7, lr}
800da5c: b086 sub sp, #24
800da5e: af00 add r7, sp, #0
800da60: 6078 str r0, [r7, #4]
800da62: 6039 str r1, [r7, #0]
QueueHandle_t xHandle;
configASSERT( uxMaxCount != 0 );
800da64: 687b ldr r3, [r7, #4]
800da66: 2b00 cmp r3, #0
800da68: d10b bne.n 800da82 <xQueueCreateCountingSemaphore+0x28>
800da6a: f04f 0350 mov.w r3, #80 ; 0x50
800da6e: b672 cpsid i
800da70: f383 8811 msr BASEPRI, r3
800da74: f3bf 8f6f isb sy
800da78: f3bf 8f4f dsb sy
800da7c: b662 cpsie i
800da7e: 613b str r3, [r7, #16]
800da80: e7fe b.n 800da80 <xQueueCreateCountingSemaphore+0x26>
configASSERT( uxInitialCount <= uxMaxCount );
800da82: 683a ldr r2, [r7, #0]
800da84: 687b ldr r3, [r7, #4]
800da86: 429a cmp r2, r3
800da88: d90b bls.n 800daa2 <xQueueCreateCountingSemaphore+0x48>
800da8a: f04f 0350 mov.w r3, #80 ; 0x50
800da8e: b672 cpsid i
800da90: f383 8811 msr BASEPRI, r3
800da94: f3bf 8f6f isb sy
800da98: f3bf 8f4f dsb sy
800da9c: b662 cpsie i
800da9e: 60fb str r3, [r7, #12]
800daa0: e7fe b.n 800daa0 <xQueueCreateCountingSemaphore+0x46>
xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
800daa2: 2202 movs r2, #2
800daa4: 2100 movs r1, #0
800daa6: 6878 ldr r0, [r7, #4]
800daa8: f7ff fef1 bl 800d88e <xQueueGenericCreate>
800daac: 6178 str r0, [r7, #20]
if( xHandle != NULL )
800daae: 697b ldr r3, [r7, #20]
800dab0: 2b00 cmp r3, #0
800dab2: d002 beq.n 800daba <xQueueCreateCountingSemaphore+0x60>
{
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
800dab4: 697b ldr r3, [r7, #20]
800dab6: 683a ldr r2, [r7, #0]
800dab8: 639a str r2, [r3, #56] ; 0x38
else
{
traceCREATE_COUNTING_SEMAPHORE_FAILED();
}
return xHandle;
800daba: 697b ldr r3, [r7, #20]
}
800dabc: 4618 mov r0, r3
800dabe: 3718 adds r7, #24
800dac0: 46bd mov sp, r7
800dac2: bd80 pop {r7, pc}
0800dac4 <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 )
{
800dac4: b580 push {r7, lr}
800dac6: b08e sub sp, #56 ; 0x38
800dac8: af00 add r7, sp, #0
800daca: 60f8 str r0, [r7, #12]
800dacc: 60b9 str r1, [r7, #8]
800dace: 607a str r2, [r7, #4]
800dad0: 603b str r3, [r7, #0]
BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired;
800dad2: 2300 movs r3, #0
800dad4: 637b str r3, [r7, #52] ; 0x34
TimeOut_t xTimeOut;
Queue_t * const pxQueue = xQueue;
800dad6: 68fb ldr r3, [r7, #12]
800dad8: 633b str r3, [r7, #48] ; 0x30
configASSERT( pxQueue );
800dada: 6b3b ldr r3, [r7, #48] ; 0x30
800dadc: 2b00 cmp r3, #0
800dade: d10b bne.n 800daf8 <xQueueGenericSend+0x34>
800dae0: f04f 0350 mov.w r3, #80 ; 0x50
800dae4: b672 cpsid i
800dae6: f383 8811 msr BASEPRI, r3
800daea: f3bf 8f6f isb sy
800daee: f3bf 8f4f dsb sy
800daf2: b662 cpsie i
800daf4: 62bb str r3, [r7, #40] ; 0x28
800daf6: e7fe b.n 800daf6 <xQueueGenericSend+0x32>
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
800daf8: 68bb ldr r3, [r7, #8]
800dafa: 2b00 cmp r3, #0
800dafc: d103 bne.n 800db06 <xQueueGenericSend+0x42>
800dafe: 6b3b ldr r3, [r7, #48] ; 0x30
800db00: 6c1b ldr r3, [r3, #64] ; 0x40
800db02: 2b00 cmp r3, #0
800db04: d101 bne.n 800db0a <xQueueGenericSend+0x46>
800db06: 2301 movs r3, #1
800db08: e000 b.n 800db0c <xQueueGenericSend+0x48>
800db0a: 2300 movs r3, #0
800db0c: 2b00 cmp r3, #0
800db0e: d10b bne.n 800db28 <xQueueGenericSend+0x64>
800db10: f04f 0350 mov.w r3, #80 ; 0x50
800db14: b672 cpsid i
800db16: f383 8811 msr BASEPRI, r3
800db1a: f3bf 8f6f isb sy
800db1e: f3bf 8f4f dsb sy
800db22: b662 cpsie i
800db24: 627b str r3, [r7, #36] ; 0x24
800db26: e7fe b.n 800db26 <xQueueGenericSend+0x62>
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
800db28: 683b ldr r3, [r7, #0]
800db2a: 2b02 cmp r3, #2
800db2c: d103 bne.n 800db36 <xQueueGenericSend+0x72>
800db2e: 6b3b ldr r3, [r7, #48] ; 0x30
800db30: 6bdb ldr r3, [r3, #60] ; 0x3c
800db32: 2b01 cmp r3, #1
800db34: d101 bne.n 800db3a <xQueueGenericSend+0x76>
800db36: 2301 movs r3, #1
800db38: e000 b.n 800db3c <xQueueGenericSend+0x78>
800db3a: 2300 movs r3, #0
800db3c: 2b00 cmp r3, #0
800db3e: d10b bne.n 800db58 <xQueueGenericSend+0x94>
800db40: f04f 0350 mov.w r3, #80 ; 0x50
800db44: b672 cpsid i
800db46: f383 8811 msr BASEPRI, r3
800db4a: f3bf 8f6f isb sy
800db4e: f3bf 8f4f dsb sy
800db52: b662 cpsie i
800db54: 623b str r3, [r7, #32]
800db56: e7fe b.n 800db56 <xQueueGenericSend+0x92>
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
{
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
800db58: f001 fc2c bl 800f3b4 <xTaskGetSchedulerState>
800db5c: 4603 mov r3, r0
800db5e: 2b00 cmp r3, #0
800db60: d102 bne.n 800db68 <xQueueGenericSend+0xa4>
800db62: 687b ldr r3, [r7, #4]
800db64: 2b00 cmp r3, #0
800db66: d101 bne.n 800db6c <xQueueGenericSend+0xa8>
800db68: 2301 movs r3, #1
800db6a: e000 b.n 800db6e <xQueueGenericSend+0xaa>
800db6c: 2300 movs r3, #0
800db6e: 2b00 cmp r3, #0
800db70: d10b bne.n 800db8a <xQueueGenericSend+0xc6>
800db72: f04f 0350 mov.w r3, #80 ; 0x50
800db76: b672 cpsid i
800db78: f383 8811 msr BASEPRI, r3
800db7c: f3bf 8f6f isb sy
800db80: f3bf 8f4f dsb sy
800db84: b662 cpsie i
800db86: 61fb str r3, [r7, #28]
800db88: e7fe b.n 800db88 <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();
800db8a: f001 ff55 bl 800fa38 <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 ) )
800db8e: 6b3b ldr r3, [r7, #48] ; 0x30
800db90: 6b9a ldr r2, [r3, #56] ; 0x38
800db92: 6b3b ldr r3, [r7, #48] ; 0x30
800db94: 6bdb ldr r3, [r3, #60] ; 0x3c
800db96: 429a cmp r2, r3
800db98: d302 bcc.n 800dba0 <xQueueGenericSend+0xdc>
800db9a: 683b ldr r3, [r7, #0]
800db9c: 2b02 cmp r3, #2
800db9e: d129 bne.n 800dbf4 <xQueueGenericSend+0x130>
}
}
}
#else /* configUSE_QUEUE_SETS */
{
xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
800dba0: 683a ldr r2, [r7, #0]
800dba2: 68b9 ldr r1, [r7, #8]
800dba4: 6b38 ldr r0, [r7, #48] ; 0x30
800dba6: f000 fc4a bl 800e43e <prvCopyDataToQueue>
800dbaa: 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 )
800dbac: 6b3b ldr r3, [r7, #48] ; 0x30
800dbae: 6a5b ldr r3, [r3, #36] ; 0x24
800dbb0: 2b00 cmp r3, #0
800dbb2: d010 beq.n 800dbd6 <xQueueGenericSend+0x112>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
800dbb4: 6b3b ldr r3, [r7, #48] ; 0x30
800dbb6: 3324 adds r3, #36 ; 0x24
800dbb8: 4618 mov r0, r3
800dbba: f001 fa3b bl 800f034 <xTaskRemoveFromEventList>
800dbbe: 4603 mov r3, r0
800dbc0: 2b00 cmp r3, #0
800dbc2: d013 beq.n 800dbec <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();
800dbc4: 4b3f ldr r3, [pc, #252] ; (800dcc4 <xQueueGenericSend+0x200>)
800dbc6: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800dbca: 601a str r2, [r3, #0]
800dbcc: f3bf 8f4f dsb sy
800dbd0: f3bf 8f6f isb sy
800dbd4: e00a b.n 800dbec <xQueueGenericSend+0x128>
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else if( xYieldRequired != pdFALSE )
800dbd6: 6afb ldr r3, [r7, #44] ; 0x2c
800dbd8: 2b00 cmp r3, #0
800dbda: d007 beq.n 800dbec <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();
800dbdc: 4b39 ldr r3, [pc, #228] ; (800dcc4 <xQueueGenericSend+0x200>)
800dbde: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800dbe2: 601a str r2, [r3, #0]
800dbe4: f3bf 8f4f dsb sy
800dbe8: f3bf 8f6f isb sy
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_QUEUE_SETS */
taskEXIT_CRITICAL();
800dbec: f001 ff56 bl 800fa9c <vPortExitCritical>
return pdPASS;
800dbf0: 2301 movs r3, #1
800dbf2: e063 b.n 800dcbc <xQueueGenericSend+0x1f8>
}
else
{
if( xTicksToWait == ( TickType_t ) 0 )
800dbf4: 687b ldr r3, [r7, #4]
800dbf6: 2b00 cmp r3, #0
800dbf8: d103 bne.n 800dc02 <xQueueGenericSend+0x13e>
{
/* The queue was full and no block time is specified (or
the block time has expired) so leave now. */
taskEXIT_CRITICAL();
800dbfa: f001 ff4f bl 800fa9c <vPortExitCritical>
/* Return to the original privilege level before exiting
the function. */
traceQUEUE_SEND_FAILED( pxQueue );
return errQUEUE_FULL;
800dbfe: 2300 movs r3, #0
800dc00: e05c b.n 800dcbc <xQueueGenericSend+0x1f8>
}
else if( xEntryTimeSet == pdFALSE )
800dc02: 6b7b ldr r3, [r7, #52] ; 0x34
800dc04: 2b00 cmp r3, #0
800dc06: d106 bne.n 800dc16 <xQueueGenericSend+0x152>
{
/* The queue was full and a block time was specified so
configure the timeout structure. */
vTaskInternalSetTimeOutState( &xTimeOut );
800dc08: f107 0314 add.w r3, r7, #20
800dc0c: 4618 mov r0, r3
800dc0e: f001 fa75 bl 800f0fc <vTaskInternalSetTimeOutState>
xEntryTimeSet = pdTRUE;
800dc12: 2301 movs r3, #1
800dc14: 637b str r3, [r7, #52] ; 0x34
/* Entry time was already set. */
mtCOVERAGE_TEST_MARKER();
}
}
}
taskEXIT_CRITICAL();
800dc16: f001 ff41 bl 800fa9c <vPortExitCritical>
/* Interrupts and other tasks can send to and receive from the queue
now the critical section has been exited. */
vTaskSuspendAll();
800dc1a: f000 ffdb bl 800ebd4 <vTaskSuspendAll>
prvLockQueue( pxQueue );
800dc1e: f001 ff0b bl 800fa38 <vPortEnterCritical>
800dc22: 6b3b ldr r3, [r7, #48] ; 0x30
800dc24: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800dc28: b25b sxtb r3, r3
800dc2a: f1b3 3fff cmp.w r3, #4294967295
800dc2e: d103 bne.n 800dc38 <xQueueGenericSend+0x174>
800dc30: 6b3b ldr r3, [r7, #48] ; 0x30
800dc32: 2200 movs r2, #0
800dc34: f883 2044 strb.w r2, [r3, #68] ; 0x44
800dc38: 6b3b ldr r3, [r7, #48] ; 0x30
800dc3a: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800dc3e: b25b sxtb r3, r3
800dc40: f1b3 3fff cmp.w r3, #4294967295
800dc44: d103 bne.n 800dc4e <xQueueGenericSend+0x18a>
800dc46: 6b3b ldr r3, [r7, #48] ; 0x30
800dc48: 2200 movs r2, #0
800dc4a: f883 2045 strb.w r2, [r3, #69] ; 0x45
800dc4e: f001 ff25 bl 800fa9c <vPortExitCritical>
/* Update the timeout state to see if it has expired yet. */
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
800dc52: 1d3a adds r2, r7, #4
800dc54: f107 0314 add.w r3, r7, #20
800dc58: 4611 mov r1, r2
800dc5a: 4618 mov r0, r3
800dc5c: f001 fa64 bl 800f128 <xTaskCheckForTimeOut>
800dc60: 4603 mov r3, r0
800dc62: 2b00 cmp r3, #0
800dc64: d124 bne.n 800dcb0 <xQueueGenericSend+0x1ec>
{
if( prvIsQueueFull( pxQueue ) != pdFALSE )
800dc66: 6b38 ldr r0, [r7, #48] ; 0x30
800dc68: f000 fce1 bl 800e62e <prvIsQueueFull>
800dc6c: 4603 mov r3, r0
800dc6e: 2b00 cmp r3, #0
800dc70: d018 beq.n 800dca4 <xQueueGenericSend+0x1e0>
{
traceBLOCKING_ON_QUEUE_SEND( pxQueue );
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );
800dc72: 6b3b ldr r3, [r7, #48] ; 0x30
800dc74: 3310 adds r3, #16
800dc76: 687a ldr r2, [r7, #4]
800dc78: 4611 mov r1, r2
800dc7a: 4618 mov r0, r3
800dc7c: f001 f9b4 bl 800efe8 <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 );
800dc80: 6b38 ldr r0, [r7, #48] ; 0x30
800dc82: f000 fc6c bl 800e55e <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 )
800dc86: f000 ffb3 bl 800ebf0 <xTaskResumeAll>
800dc8a: 4603 mov r3, r0
800dc8c: 2b00 cmp r3, #0
800dc8e: f47f af7c bne.w 800db8a <xQueueGenericSend+0xc6>
{
portYIELD_WITHIN_API();
800dc92: 4b0c ldr r3, [pc, #48] ; (800dcc4 <xQueueGenericSend+0x200>)
800dc94: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800dc98: 601a str r2, [r3, #0]
800dc9a: f3bf 8f4f dsb sy
800dc9e: f3bf 8f6f isb sy
800dca2: e772 b.n 800db8a <xQueueGenericSend+0xc6>
}
}
else
{
/* Try again. */
prvUnlockQueue( pxQueue );
800dca4: 6b38 ldr r0, [r7, #48] ; 0x30
800dca6: f000 fc5a bl 800e55e <prvUnlockQueue>
( void ) xTaskResumeAll();
800dcaa: f000 ffa1 bl 800ebf0 <xTaskResumeAll>
800dcae: e76c b.n 800db8a <xQueueGenericSend+0xc6>
}
}
else
{
/* The timeout has expired. */
prvUnlockQueue( pxQueue );
800dcb0: 6b38 ldr r0, [r7, #48] ; 0x30
800dcb2: f000 fc54 bl 800e55e <prvUnlockQueue>
( void ) xTaskResumeAll();
800dcb6: f000 ff9b bl 800ebf0 <xTaskResumeAll>
traceQUEUE_SEND_FAILED( pxQueue );
return errQUEUE_FULL;
800dcba: 2300 movs r3, #0
}
} /*lint -restore */
}
800dcbc: 4618 mov r0, r3
800dcbe: 3738 adds r7, #56 ; 0x38
800dcc0: 46bd mov sp, r7
800dcc2: bd80 pop {r7, pc}
800dcc4: e000ed04 .word 0xe000ed04
0800dcc8 <xQueueGenericSendFromISR>:
/*-----------------------------------------------------------*/
BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition )
{
800dcc8: b580 push {r7, lr}
800dcca: b08e sub sp, #56 ; 0x38
800dccc: af00 add r7, sp, #0
800dcce: 60f8 str r0, [r7, #12]
800dcd0: 60b9 str r1, [r7, #8]
800dcd2: 607a str r2, [r7, #4]
800dcd4: 603b str r3, [r7, #0]
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
Queue_t * const pxQueue = xQueue;
800dcd6: 68fb ldr r3, [r7, #12]
800dcd8: 633b str r3, [r7, #48] ; 0x30
configASSERT( pxQueue );
800dcda: 6b3b ldr r3, [r7, #48] ; 0x30
800dcdc: 2b00 cmp r3, #0
800dcde: d10b bne.n 800dcf8 <xQueueGenericSendFromISR+0x30>
800dce0: f04f 0350 mov.w r3, #80 ; 0x50
800dce4: b672 cpsid i
800dce6: f383 8811 msr BASEPRI, r3
800dcea: f3bf 8f6f isb sy
800dcee: f3bf 8f4f dsb sy
800dcf2: b662 cpsie i
800dcf4: 627b str r3, [r7, #36] ; 0x24
800dcf6: e7fe b.n 800dcf6 <xQueueGenericSendFromISR+0x2e>
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
800dcf8: 68bb ldr r3, [r7, #8]
800dcfa: 2b00 cmp r3, #0
800dcfc: d103 bne.n 800dd06 <xQueueGenericSendFromISR+0x3e>
800dcfe: 6b3b ldr r3, [r7, #48] ; 0x30
800dd00: 6c1b ldr r3, [r3, #64] ; 0x40
800dd02: 2b00 cmp r3, #0
800dd04: d101 bne.n 800dd0a <xQueueGenericSendFromISR+0x42>
800dd06: 2301 movs r3, #1
800dd08: e000 b.n 800dd0c <xQueueGenericSendFromISR+0x44>
800dd0a: 2300 movs r3, #0
800dd0c: 2b00 cmp r3, #0
800dd0e: d10b bne.n 800dd28 <xQueueGenericSendFromISR+0x60>
800dd10: f04f 0350 mov.w r3, #80 ; 0x50
800dd14: b672 cpsid i
800dd16: f383 8811 msr BASEPRI, r3
800dd1a: f3bf 8f6f isb sy
800dd1e: f3bf 8f4f dsb sy
800dd22: b662 cpsie i
800dd24: 623b str r3, [r7, #32]
800dd26: e7fe b.n 800dd26 <xQueueGenericSendFromISR+0x5e>
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
800dd28: 683b ldr r3, [r7, #0]
800dd2a: 2b02 cmp r3, #2
800dd2c: d103 bne.n 800dd36 <xQueueGenericSendFromISR+0x6e>
800dd2e: 6b3b ldr r3, [r7, #48] ; 0x30
800dd30: 6bdb ldr r3, [r3, #60] ; 0x3c
800dd32: 2b01 cmp r3, #1
800dd34: d101 bne.n 800dd3a <xQueueGenericSendFromISR+0x72>
800dd36: 2301 movs r3, #1
800dd38: e000 b.n 800dd3c <xQueueGenericSendFromISR+0x74>
800dd3a: 2300 movs r3, #0
800dd3c: 2b00 cmp r3, #0
800dd3e: d10b bne.n 800dd58 <xQueueGenericSendFromISR+0x90>
800dd40: f04f 0350 mov.w r3, #80 ; 0x50
800dd44: b672 cpsid i
800dd46: f383 8811 msr BASEPRI, r3
800dd4a: f3bf 8f6f isb sy
800dd4e: f3bf 8f4f dsb sy
800dd52: b662 cpsie i
800dd54: 61fb str r3, [r7, #28]
800dd56: e7fe b.n 800dd56 <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();
800dd58: f001 ff4e bl 800fbf8 <vPortValidateInterruptPriority>
portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void )
{
uint32_t ulOriginalBASEPRI, ulNewBASEPRI;
__asm volatile
800dd5c: f3ef 8211 mrs r2, BASEPRI
800dd60: f04f 0350 mov.w r3, #80 ; 0x50
800dd64: b672 cpsid i
800dd66: f383 8811 msr BASEPRI, r3
800dd6a: f3bf 8f6f isb sy
800dd6e: f3bf 8f4f dsb sy
800dd72: b662 cpsie i
800dd74: 61ba str r2, [r7, #24]
800dd76: 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;
800dd78: 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();
800dd7a: 62fb str r3, [r7, #44] ; 0x2c
{
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
800dd7c: 6b3b ldr r3, [r7, #48] ; 0x30
800dd7e: 6b9a ldr r2, [r3, #56] ; 0x38
800dd80: 6b3b ldr r3, [r7, #48] ; 0x30
800dd82: 6bdb ldr r3, [r3, #60] ; 0x3c
800dd84: 429a cmp r2, r3
800dd86: d302 bcc.n 800dd8e <xQueueGenericSendFromISR+0xc6>
800dd88: 683b ldr r3, [r7, #0]
800dd8a: 2b02 cmp r3, #2
800dd8c: d12c bne.n 800dde8 <xQueueGenericSendFromISR+0x120>
{
const int8_t cTxLock = pxQueue->cTxLock;
800dd8e: 6b3b ldr r3, [r7, #48] ; 0x30
800dd90: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800dd94: 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 );
800dd98: 683a ldr r2, [r7, #0]
800dd9a: 68b9 ldr r1, [r7, #8]
800dd9c: 6b38 ldr r0, [r7, #48] ; 0x30
800dd9e: f000 fb4e bl 800e43e <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 )
800dda2: f997 302b ldrsb.w r3, [r7, #43] ; 0x2b
800dda6: f1b3 3fff cmp.w r3, #4294967295
800ddaa: d112 bne.n 800ddd2 <xQueueGenericSendFromISR+0x10a>
}
}
}
#else /* configUSE_QUEUE_SETS */
{
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
800ddac: 6b3b ldr r3, [r7, #48] ; 0x30
800ddae: 6a5b ldr r3, [r3, #36] ; 0x24
800ddb0: 2b00 cmp r3, #0
800ddb2: d016 beq.n 800dde2 <xQueueGenericSendFromISR+0x11a>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
800ddb4: 6b3b ldr r3, [r7, #48] ; 0x30
800ddb6: 3324 adds r3, #36 ; 0x24
800ddb8: 4618 mov r0, r3
800ddba: f001 f93b bl 800f034 <xTaskRemoveFromEventList>
800ddbe: 4603 mov r3, r0
800ddc0: 2b00 cmp r3, #0
800ddc2: d00e beq.n 800dde2 <xQueueGenericSendFromISR+0x11a>
{
/* The task waiting has a higher priority so record that a
context switch is required. */
if( pxHigherPriorityTaskWoken != NULL )
800ddc4: 687b ldr r3, [r7, #4]
800ddc6: 2b00 cmp r3, #0
800ddc8: d00b beq.n 800dde2 <xQueueGenericSendFromISR+0x11a>
{
*pxHigherPriorityTaskWoken = pdTRUE;
800ddca: 687b ldr r3, [r7, #4]
800ddcc: 2201 movs r2, #1
800ddce: 601a str r2, [r3, #0]
800ddd0: e007 b.n 800dde2 <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 );
800ddd2: f897 302b ldrb.w r3, [r7, #43] ; 0x2b
800ddd6: 3301 adds r3, #1
800ddd8: b2db uxtb r3, r3
800ddda: b25a sxtb r2, r3
800dddc: 6b3b ldr r3, [r7, #48] ; 0x30
800ddde: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
xReturn = pdPASS;
800dde2: 2301 movs r3, #1
800dde4: 637b str r3, [r7, #52] ; 0x34
{
800dde6: e001 b.n 800ddec <xQueueGenericSendFromISR+0x124>
}
else
{
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
xReturn = errQUEUE_FULL;
800dde8: 2300 movs r3, #0
800ddea: 637b str r3, [r7, #52] ; 0x34
800ddec: 6afb ldr r3, [r7, #44] ; 0x2c
800ddee: 613b str r3, [r7, #16]
}
/*-----------------------------------------------------------*/
portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue )
{
__asm volatile
800ddf0: 693b ldr r3, [r7, #16]
800ddf2: f383 8811 msr BASEPRI, r3
}
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return xReturn;
800ddf6: 6b7b ldr r3, [r7, #52] ; 0x34
}
800ddf8: 4618 mov r0, r3
800ddfa: 3738 adds r7, #56 ; 0x38
800ddfc: 46bd mov sp, r7
800ddfe: bd80 pop {r7, pc}
0800de00 <xQueueGiveFromISR>:
/*-----------------------------------------------------------*/
BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken )
{
800de00: b580 push {r7, lr}
800de02: b08e sub sp, #56 ; 0x38
800de04: af00 add r7, sp, #0
800de06: 6078 str r0, [r7, #4]
800de08: 6039 str r1, [r7, #0]
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
Queue_t * const pxQueue = xQueue;
800de0a: 687b ldr r3, [r7, #4]
800de0c: 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 );
800de0e: 6b3b ldr r3, [r7, #48] ; 0x30
800de10: 2b00 cmp r3, #0
800de12: d10b bne.n 800de2c <xQueueGiveFromISR+0x2c>
__asm volatile
800de14: f04f 0350 mov.w r3, #80 ; 0x50
800de18: b672 cpsid i
800de1a: f383 8811 msr BASEPRI, r3
800de1e: f3bf 8f6f isb sy
800de22: f3bf 8f4f dsb sy
800de26: b662 cpsie i
800de28: 623b str r3, [r7, #32]
800de2a: e7fe b.n 800de2a <xQueueGiveFromISR+0x2a>
/* xQueueGenericSendFromISR() should be used instead of xQueueGiveFromISR()
if the item size is not 0. */
configASSERT( pxQueue->uxItemSize == 0 );
800de2c: 6b3b ldr r3, [r7, #48] ; 0x30
800de2e: 6c1b ldr r3, [r3, #64] ; 0x40
800de30: 2b00 cmp r3, #0
800de32: d00b beq.n 800de4c <xQueueGiveFromISR+0x4c>
800de34: f04f 0350 mov.w r3, #80 ; 0x50
800de38: b672 cpsid i
800de3a: f383 8811 msr BASEPRI, r3
800de3e: f3bf 8f6f isb sy
800de42: f3bf 8f4f dsb sy
800de46: b662 cpsie i
800de48: 61fb str r3, [r7, #28]
800de4a: e7fe b.n 800de4a <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 ) ) );
800de4c: 6b3b ldr r3, [r7, #48] ; 0x30
800de4e: 681b ldr r3, [r3, #0]
800de50: 2b00 cmp r3, #0
800de52: d103 bne.n 800de5c <xQueueGiveFromISR+0x5c>
800de54: 6b3b ldr r3, [r7, #48] ; 0x30
800de56: 689b ldr r3, [r3, #8]
800de58: 2b00 cmp r3, #0
800de5a: d101 bne.n 800de60 <xQueueGiveFromISR+0x60>
800de5c: 2301 movs r3, #1
800de5e: e000 b.n 800de62 <xQueueGiveFromISR+0x62>
800de60: 2300 movs r3, #0
800de62: 2b00 cmp r3, #0
800de64: d10b bne.n 800de7e <xQueueGiveFromISR+0x7e>
800de66: f04f 0350 mov.w r3, #80 ; 0x50
800de6a: b672 cpsid i
800de6c: f383 8811 msr BASEPRI, r3
800de70: f3bf 8f6f isb sy
800de74: f3bf 8f4f dsb sy
800de78: b662 cpsie i
800de7a: 61bb str r3, [r7, #24]
800de7c: e7fe b.n 800de7c <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();
800de7e: f001 febb bl 800fbf8 <vPortValidateInterruptPriority>
__asm volatile
800de82: f3ef 8211 mrs r2, BASEPRI
800de86: f04f 0350 mov.w r3, #80 ; 0x50
800de8a: b672 cpsid i
800de8c: f383 8811 msr BASEPRI, r3
800de90: f3bf 8f6f isb sy
800de94: f3bf 8f4f dsb sy
800de98: b662 cpsie i
800de9a: 617a str r2, [r7, #20]
800de9c: 613b str r3, [r7, #16]
return ulOriginalBASEPRI;
800de9e: 697b ldr r3, [r7, #20]
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
800dea0: 62fb str r3, [r7, #44] ; 0x2c
{
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
800dea2: 6b3b ldr r3, [r7, #48] ; 0x30
800dea4: 6b9b ldr r3, [r3, #56] ; 0x38
800dea6: 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 )
800dea8: 6b3b ldr r3, [r7, #48] ; 0x30
800deaa: 6bdb ldr r3, [r3, #60] ; 0x3c
800deac: 6aba ldr r2, [r7, #40] ; 0x28
800deae: 429a cmp r2, r3
800deb0: d22b bcs.n 800df0a <xQueueGiveFromISR+0x10a>
{
const int8_t cTxLock = pxQueue->cTxLock;
800deb2: 6b3b ldr r3, [r7, #48] ; 0x30
800deb4: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800deb8: 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;
800debc: 6abb ldr r3, [r7, #40] ; 0x28
800debe: 1c5a adds r2, r3, #1
800dec0: 6b3b ldr r3, [r7, #48] ; 0x30
800dec2: 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 )
800dec4: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
800dec8: f1b3 3fff cmp.w r3, #4294967295
800decc: d112 bne.n 800def4 <xQueueGiveFromISR+0xf4>
}
}
}
#else /* configUSE_QUEUE_SETS */
{
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
800dece: 6b3b ldr r3, [r7, #48] ; 0x30
800ded0: 6a5b ldr r3, [r3, #36] ; 0x24
800ded2: 2b00 cmp r3, #0
800ded4: d016 beq.n 800df04 <xQueueGiveFromISR+0x104>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
800ded6: 6b3b ldr r3, [r7, #48] ; 0x30
800ded8: 3324 adds r3, #36 ; 0x24
800deda: 4618 mov r0, r3
800dedc: f001 f8aa bl 800f034 <xTaskRemoveFromEventList>
800dee0: 4603 mov r3, r0
800dee2: 2b00 cmp r3, #0
800dee4: d00e beq.n 800df04 <xQueueGiveFromISR+0x104>
{
/* The task waiting has a higher priority so record that a
context switch is required. */
if( pxHigherPriorityTaskWoken != NULL )
800dee6: 683b ldr r3, [r7, #0]
800dee8: 2b00 cmp r3, #0
800deea: d00b beq.n 800df04 <xQueueGiveFromISR+0x104>
{
*pxHigherPriorityTaskWoken = pdTRUE;
800deec: 683b ldr r3, [r7, #0]
800deee: 2201 movs r2, #1
800def0: 601a str r2, [r3, #0]
800def2: e007 b.n 800df04 <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 );
800def4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800def8: 3301 adds r3, #1
800defa: b2db uxtb r3, r3
800defc: b25a sxtb r2, r3
800defe: 6b3b ldr r3, [r7, #48] ; 0x30
800df00: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
xReturn = pdPASS;
800df04: 2301 movs r3, #1
800df06: 637b str r3, [r7, #52] ; 0x34
800df08: e001 b.n 800df0e <xQueueGiveFromISR+0x10e>
}
else
{
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
xReturn = errQUEUE_FULL;
800df0a: 2300 movs r3, #0
800df0c: 637b str r3, [r7, #52] ; 0x34
800df0e: 6afb ldr r3, [r7, #44] ; 0x2c
800df10: 60fb str r3, [r7, #12]
__asm volatile
800df12: 68fb ldr r3, [r7, #12]
800df14: f383 8811 msr BASEPRI, r3
}
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return xReturn;
800df18: 6b7b ldr r3, [r7, #52] ; 0x34
}
800df1a: 4618 mov r0, r3
800df1c: 3738 adds r7, #56 ; 0x38
800df1e: 46bd mov sp, r7
800df20: bd80 pop {r7, pc}
...
0800df24 <xQueueReceive>:
/*-----------------------------------------------------------*/
BaseType_t xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait )
{
800df24: b580 push {r7, lr}
800df26: b08c sub sp, #48 ; 0x30
800df28: af00 add r7, sp, #0
800df2a: 60f8 str r0, [r7, #12]
800df2c: 60b9 str r1, [r7, #8]
800df2e: 607a str r2, [r7, #4]
BaseType_t xEntryTimeSet = pdFALSE;
800df30: 2300 movs r3, #0
800df32: 62fb str r3, [r7, #44] ; 0x2c
TimeOut_t xTimeOut;
Queue_t * const pxQueue = xQueue;
800df34: 68fb ldr r3, [r7, #12]
800df36: 62bb str r3, [r7, #40] ; 0x28
/* Check the pointer is not NULL. */
configASSERT( ( pxQueue ) );
800df38: 6abb ldr r3, [r7, #40] ; 0x28
800df3a: 2b00 cmp r3, #0
800df3c: d10b bne.n 800df56 <xQueueReceive+0x32>
__asm volatile
800df3e: f04f 0350 mov.w r3, #80 ; 0x50
800df42: b672 cpsid i
800df44: f383 8811 msr BASEPRI, r3
800df48: f3bf 8f6f isb sy
800df4c: f3bf 8f4f dsb sy
800df50: b662 cpsie i
800df52: 623b str r3, [r7, #32]
800df54: e7fe b.n 800df54 <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 ) ) );
800df56: 68bb ldr r3, [r7, #8]
800df58: 2b00 cmp r3, #0
800df5a: d103 bne.n 800df64 <xQueueReceive+0x40>
800df5c: 6abb ldr r3, [r7, #40] ; 0x28
800df5e: 6c1b ldr r3, [r3, #64] ; 0x40
800df60: 2b00 cmp r3, #0
800df62: d101 bne.n 800df68 <xQueueReceive+0x44>
800df64: 2301 movs r3, #1
800df66: e000 b.n 800df6a <xQueueReceive+0x46>
800df68: 2300 movs r3, #0
800df6a: 2b00 cmp r3, #0
800df6c: d10b bne.n 800df86 <xQueueReceive+0x62>
800df6e: f04f 0350 mov.w r3, #80 ; 0x50
800df72: b672 cpsid i
800df74: f383 8811 msr BASEPRI, r3
800df78: f3bf 8f6f isb sy
800df7c: f3bf 8f4f dsb sy
800df80: b662 cpsie i
800df82: 61fb str r3, [r7, #28]
800df84: e7fe b.n 800df84 <xQueueReceive+0x60>
/* Cannot block if the scheduler is suspended. */
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
{
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
800df86: f001 fa15 bl 800f3b4 <xTaskGetSchedulerState>
800df8a: 4603 mov r3, r0
800df8c: 2b00 cmp r3, #0
800df8e: d102 bne.n 800df96 <xQueueReceive+0x72>
800df90: 687b ldr r3, [r7, #4]
800df92: 2b00 cmp r3, #0
800df94: d101 bne.n 800df9a <xQueueReceive+0x76>
800df96: 2301 movs r3, #1
800df98: e000 b.n 800df9c <xQueueReceive+0x78>
800df9a: 2300 movs r3, #0
800df9c: 2b00 cmp r3, #0
800df9e: d10b bne.n 800dfb8 <xQueueReceive+0x94>
800dfa0: f04f 0350 mov.w r3, #80 ; 0x50
800dfa4: b672 cpsid i
800dfa6: f383 8811 msr BASEPRI, r3
800dfaa: f3bf 8f6f isb sy
800dfae: f3bf 8f4f dsb sy
800dfb2: b662 cpsie i
800dfb4: 61bb str r3, [r7, #24]
800dfb6: e7fe b.n 800dfb6 <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();
800dfb8: f001 fd3e bl 800fa38 <vPortEnterCritical>
{
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
800dfbc: 6abb ldr r3, [r7, #40] ; 0x28
800dfbe: 6b9b ldr r3, [r3, #56] ; 0x38
800dfc0: 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 )
800dfc2: 6a7b ldr r3, [r7, #36] ; 0x24
800dfc4: 2b00 cmp r3, #0
800dfc6: d01f beq.n 800e008 <xQueueReceive+0xe4>
{
/* Data available, remove one item. */
prvCopyDataFromQueue( pxQueue, pvBuffer );
800dfc8: 68b9 ldr r1, [r7, #8]
800dfca: 6ab8 ldr r0, [r7, #40] ; 0x28
800dfcc: f000 faa1 bl 800e512 <prvCopyDataFromQueue>
traceQUEUE_RECEIVE( pxQueue );
pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
800dfd0: 6a7b ldr r3, [r7, #36] ; 0x24
800dfd2: 1e5a subs r2, r3, #1
800dfd4: 6abb ldr r3, [r7, #40] ; 0x28
800dfd6: 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 )
800dfd8: 6abb ldr r3, [r7, #40] ; 0x28
800dfda: 691b ldr r3, [r3, #16]
800dfdc: 2b00 cmp r3, #0
800dfde: d00f beq.n 800e000 <xQueueReceive+0xdc>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800dfe0: 6abb ldr r3, [r7, #40] ; 0x28
800dfe2: 3310 adds r3, #16
800dfe4: 4618 mov r0, r3
800dfe6: f001 f825 bl 800f034 <xTaskRemoveFromEventList>
800dfea: 4603 mov r3, r0
800dfec: 2b00 cmp r3, #0
800dfee: d007 beq.n 800e000 <xQueueReceive+0xdc>
{
queueYIELD_IF_USING_PREEMPTION();
800dff0: 4b3c ldr r3, [pc, #240] ; (800e0e4 <xQueueReceive+0x1c0>)
800dff2: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800dff6: 601a str r2, [r3, #0]
800dff8: f3bf 8f4f dsb sy
800dffc: f3bf 8f6f isb sy
else
{
mtCOVERAGE_TEST_MARKER();
}
taskEXIT_CRITICAL();
800e000: f001 fd4c bl 800fa9c <vPortExitCritical>
return pdPASS;
800e004: 2301 movs r3, #1
800e006: e069 b.n 800e0dc <xQueueReceive+0x1b8>
}
else
{
if( xTicksToWait == ( TickType_t ) 0 )
800e008: 687b ldr r3, [r7, #4]
800e00a: 2b00 cmp r3, #0
800e00c: d103 bne.n 800e016 <xQueueReceive+0xf2>
{
/* The queue was empty and no block time is specified (or
the block time has expired) so leave now. */
taskEXIT_CRITICAL();
800e00e: f001 fd45 bl 800fa9c <vPortExitCritical>
traceQUEUE_RECEIVE_FAILED( pxQueue );
return errQUEUE_EMPTY;
800e012: 2300 movs r3, #0
800e014: e062 b.n 800e0dc <xQueueReceive+0x1b8>
}
else if( xEntryTimeSet == pdFALSE )
800e016: 6afb ldr r3, [r7, #44] ; 0x2c
800e018: 2b00 cmp r3, #0
800e01a: d106 bne.n 800e02a <xQueueReceive+0x106>
{
/* The queue was empty and a block time was specified so
configure the timeout structure. */
vTaskInternalSetTimeOutState( &xTimeOut );
800e01c: f107 0310 add.w r3, r7, #16
800e020: 4618 mov r0, r3
800e022: f001 f86b bl 800f0fc <vTaskInternalSetTimeOutState>
xEntryTimeSet = pdTRUE;
800e026: 2301 movs r3, #1
800e028: 62fb str r3, [r7, #44] ; 0x2c
/* Entry time was already set. */
mtCOVERAGE_TEST_MARKER();
}
}
}
taskEXIT_CRITICAL();
800e02a: f001 fd37 bl 800fa9c <vPortExitCritical>
/* Interrupts and other tasks can send to and receive from the queue
now the critical section has been exited. */
vTaskSuspendAll();
800e02e: f000 fdd1 bl 800ebd4 <vTaskSuspendAll>
prvLockQueue( pxQueue );
800e032: f001 fd01 bl 800fa38 <vPortEnterCritical>
800e036: 6abb ldr r3, [r7, #40] ; 0x28
800e038: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800e03c: b25b sxtb r3, r3
800e03e: f1b3 3fff cmp.w r3, #4294967295
800e042: d103 bne.n 800e04c <xQueueReceive+0x128>
800e044: 6abb ldr r3, [r7, #40] ; 0x28
800e046: 2200 movs r2, #0
800e048: f883 2044 strb.w r2, [r3, #68] ; 0x44
800e04c: 6abb ldr r3, [r7, #40] ; 0x28
800e04e: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800e052: b25b sxtb r3, r3
800e054: f1b3 3fff cmp.w r3, #4294967295
800e058: d103 bne.n 800e062 <xQueueReceive+0x13e>
800e05a: 6abb ldr r3, [r7, #40] ; 0x28
800e05c: 2200 movs r2, #0
800e05e: f883 2045 strb.w r2, [r3, #69] ; 0x45
800e062: f001 fd1b bl 800fa9c <vPortExitCritical>
/* Update the timeout state to see if it has expired yet. */
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
800e066: 1d3a adds r2, r7, #4
800e068: f107 0310 add.w r3, r7, #16
800e06c: 4611 mov r1, r2
800e06e: 4618 mov r0, r3
800e070: f001 f85a bl 800f128 <xTaskCheckForTimeOut>
800e074: 4603 mov r3, r0
800e076: 2b00 cmp r3, #0
800e078: d123 bne.n 800e0c2 <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 )
800e07a: 6ab8 ldr r0, [r7, #40] ; 0x28
800e07c: f000 fac1 bl 800e602 <prvIsQueueEmpty>
800e080: 4603 mov r3, r0
800e082: 2b00 cmp r3, #0
800e084: d017 beq.n 800e0b6 <xQueueReceive+0x192>
{
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
800e086: 6abb ldr r3, [r7, #40] ; 0x28
800e088: 3324 adds r3, #36 ; 0x24
800e08a: 687a ldr r2, [r7, #4]
800e08c: 4611 mov r1, r2
800e08e: 4618 mov r0, r3
800e090: f000 ffaa bl 800efe8 <vTaskPlaceOnEventList>
prvUnlockQueue( pxQueue );
800e094: 6ab8 ldr r0, [r7, #40] ; 0x28
800e096: f000 fa62 bl 800e55e <prvUnlockQueue>
if( xTaskResumeAll() == pdFALSE )
800e09a: f000 fda9 bl 800ebf0 <xTaskResumeAll>
800e09e: 4603 mov r3, r0
800e0a0: 2b00 cmp r3, #0
800e0a2: d189 bne.n 800dfb8 <xQueueReceive+0x94>
{
portYIELD_WITHIN_API();
800e0a4: 4b0f ldr r3, [pc, #60] ; (800e0e4 <xQueueReceive+0x1c0>)
800e0a6: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e0aa: 601a str r2, [r3, #0]
800e0ac: f3bf 8f4f dsb sy
800e0b0: f3bf 8f6f isb sy
800e0b4: e780 b.n 800dfb8 <xQueueReceive+0x94>
}
else
{
/* The queue contains data again. Loop back to try and read the
data. */
prvUnlockQueue( pxQueue );
800e0b6: 6ab8 ldr r0, [r7, #40] ; 0x28
800e0b8: f000 fa51 bl 800e55e <prvUnlockQueue>
( void ) xTaskResumeAll();
800e0bc: f000 fd98 bl 800ebf0 <xTaskResumeAll>
800e0c0: e77a b.n 800dfb8 <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 );
800e0c2: 6ab8 ldr r0, [r7, #40] ; 0x28
800e0c4: f000 fa4b bl 800e55e <prvUnlockQueue>
( void ) xTaskResumeAll();
800e0c8: f000 fd92 bl 800ebf0 <xTaskResumeAll>
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
800e0cc: 6ab8 ldr r0, [r7, #40] ; 0x28
800e0ce: f000 fa98 bl 800e602 <prvIsQueueEmpty>
800e0d2: 4603 mov r3, r0
800e0d4: 2b00 cmp r3, #0
800e0d6: f43f af6f beq.w 800dfb8 <xQueueReceive+0x94>
{
traceQUEUE_RECEIVE_FAILED( pxQueue );
return errQUEUE_EMPTY;
800e0da: 2300 movs r3, #0
{
mtCOVERAGE_TEST_MARKER();
}
}
} /*lint -restore */
}
800e0dc: 4618 mov r0, r3
800e0de: 3730 adds r7, #48 ; 0x30
800e0e0: 46bd mov sp, r7
800e0e2: bd80 pop {r7, pc}
800e0e4: e000ed04 .word 0xe000ed04
0800e0e8 <xQueueSemaphoreTake>:
/*-----------------------------------------------------------*/
BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait )
{
800e0e8: b580 push {r7, lr}
800e0ea: b08e sub sp, #56 ; 0x38
800e0ec: af00 add r7, sp, #0
800e0ee: 6078 str r0, [r7, #4]
800e0f0: 6039 str r1, [r7, #0]
BaseType_t xEntryTimeSet = pdFALSE;
800e0f2: 2300 movs r3, #0
800e0f4: 637b str r3, [r7, #52] ; 0x34
TimeOut_t xTimeOut;
Queue_t * const pxQueue = xQueue;
800e0f6: 687b ldr r3, [r7, #4]
800e0f8: 62fb str r3, [r7, #44] ; 0x2c
#if( configUSE_MUTEXES == 1 )
BaseType_t xInheritanceOccurred = pdFALSE;
800e0fa: 2300 movs r3, #0
800e0fc: 633b str r3, [r7, #48] ; 0x30
#endif
/* Check the queue pointer is not NULL. */
configASSERT( ( pxQueue ) );
800e0fe: 6afb ldr r3, [r7, #44] ; 0x2c
800e100: 2b00 cmp r3, #0
800e102: d10b bne.n 800e11c <xQueueSemaphoreTake+0x34>
800e104: f04f 0350 mov.w r3, #80 ; 0x50
800e108: b672 cpsid i
800e10a: f383 8811 msr BASEPRI, r3
800e10e: f3bf 8f6f isb sy
800e112: f3bf 8f4f dsb sy
800e116: b662 cpsie i
800e118: 623b str r3, [r7, #32]
800e11a: e7fe b.n 800e11a <xQueueSemaphoreTake+0x32>
/* Check this really is a semaphore, in which case the item size will be
0. */
configASSERT( pxQueue->uxItemSize == 0 );
800e11c: 6afb ldr r3, [r7, #44] ; 0x2c
800e11e: 6c1b ldr r3, [r3, #64] ; 0x40
800e120: 2b00 cmp r3, #0
800e122: d00b beq.n 800e13c <xQueueSemaphoreTake+0x54>
800e124: f04f 0350 mov.w r3, #80 ; 0x50
800e128: b672 cpsid i
800e12a: f383 8811 msr BASEPRI, r3
800e12e: f3bf 8f6f isb sy
800e132: f3bf 8f4f dsb sy
800e136: b662 cpsie i
800e138: 61fb str r3, [r7, #28]
800e13a: e7fe b.n 800e13a <xQueueSemaphoreTake+0x52>
/* Cannot block if the scheduler is suspended. */
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
{
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
800e13c: f001 f93a bl 800f3b4 <xTaskGetSchedulerState>
800e140: 4603 mov r3, r0
800e142: 2b00 cmp r3, #0
800e144: d102 bne.n 800e14c <xQueueSemaphoreTake+0x64>
800e146: 683b ldr r3, [r7, #0]
800e148: 2b00 cmp r3, #0
800e14a: d101 bne.n 800e150 <xQueueSemaphoreTake+0x68>
800e14c: 2301 movs r3, #1
800e14e: e000 b.n 800e152 <xQueueSemaphoreTake+0x6a>
800e150: 2300 movs r3, #0
800e152: 2b00 cmp r3, #0
800e154: d10b bne.n 800e16e <xQueueSemaphoreTake+0x86>
800e156: f04f 0350 mov.w r3, #80 ; 0x50
800e15a: b672 cpsid i
800e15c: f383 8811 msr BASEPRI, r3
800e160: f3bf 8f6f isb sy
800e164: f3bf 8f4f dsb sy
800e168: b662 cpsie i
800e16a: 61bb str r3, [r7, #24]
800e16c: e7fe b.n 800e16c <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();
800e16e: f001 fc63 bl 800fa38 <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;
800e172: 6afb ldr r3, [r7, #44] ; 0x2c
800e174: 6b9b ldr r3, [r3, #56] ; 0x38
800e176: 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 )
800e178: 6abb ldr r3, [r7, #40] ; 0x28
800e17a: 2b00 cmp r3, #0
800e17c: d024 beq.n 800e1c8 <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;
800e17e: 6abb ldr r3, [r7, #40] ; 0x28
800e180: 1e5a subs r2, r3, #1
800e182: 6afb ldr r3, [r7, #44] ; 0x2c
800e184: 639a str r2, [r3, #56] ; 0x38
#if ( configUSE_MUTEXES == 1 )
{
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
800e186: 6afb ldr r3, [r7, #44] ; 0x2c
800e188: 681b ldr r3, [r3, #0]
800e18a: 2b00 cmp r3, #0
800e18c: d104 bne.n 800e198 <xQueueSemaphoreTake+0xb0>
{
/* Record the information required to implement
priority inheritance should it become necessary. */
pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount();
800e18e: f001 fad3 bl 800f738 <pvTaskIncrementMutexHeldCount>
800e192: 4602 mov r2, r0
800e194: 6afb ldr r3, [r7, #44] ; 0x2c
800e196: 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 )
800e198: 6afb ldr r3, [r7, #44] ; 0x2c
800e19a: 691b ldr r3, [r3, #16]
800e19c: 2b00 cmp r3, #0
800e19e: d00f beq.n 800e1c0 <xQueueSemaphoreTake+0xd8>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800e1a0: 6afb ldr r3, [r7, #44] ; 0x2c
800e1a2: 3310 adds r3, #16
800e1a4: 4618 mov r0, r3
800e1a6: f000 ff45 bl 800f034 <xTaskRemoveFromEventList>
800e1aa: 4603 mov r3, r0
800e1ac: 2b00 cmp r3, #0
800e1ae: d007 beq.n 800e1c0 <xQueueSemaphoreTake+0xd8>
{
queueYIELD_IF_USING_PREEMPTION();
800e1b0: 4b54 ldr r3, [pc, #336] ; (800e304 <xQueueSemaphoreTake+0x21c>)
800e1b2: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e1b6: 601a str r2, [r3, #0]
800e1b8: f3bf 8f4f dsb sy
800e1bc: f3bf 8f6f isb sy
else
{
mtCOVERAGE_TEST_MARKER();
}
taskEXIT_CRITICAL();
800e1c0: f001 fc6c bl 800fa9c <vPortExitCritical>
return pdPASS;
800e1c4: 2301 movs r3, #1
800e1c6: e098 b.n 800e2fa <xQueueSemaphoreTake+0x212>
}
else
{
if( xTicksToWait == ( TickType_t ) 0 )
800e1c8: 683b ldr r3, [r7, #0]
800e1ca: 2b00 cmp r3, #0
800e1cc: d112 bne.n 800e1f4 <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 );
800e1ce: 6b3b ldr r3, [r7, #48] ; 0x30
800e1d0: 2b00 cmp r3, #0
800e1d2: d00b beq.n 800e1ec <xQueueSemaphoreTake+0x104>
800e1d4: f04f 0350 mov.w r3, #80 ; 0x50
800e1d8: b672 cpsid i
800e1da: f383 8811 msr BASEPRI, r3
800e1de: f3bf 8f6f isb sy
800e1e2: f3bf 8f4f dsb sy
800e1e6: b662 cpsie i
800e1e8: 617b str r3, [r7, #20]
800e1ea: e7fe b.n 800e1ea <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();
800e1ec: f001 fc56 bl 800fa9c <vPortExitCritical>
traceQUEUE_RECEIVE_FAILED( pxQueue );
return errQUEUE_EMPTY;
800e1f0: 2300 movs r3, #0
800e1f2: e082 b.n 800e2fa <xQueueSemaphoreTake+0x212>
}
else if( xEntryTimeSet == pdFALSE )
800e1f4: 6b7b ldr r3, [r7, #52] ; 0x34
800e1f6: 2b00 cmp r3, #0
800e1f8: d106 bne.n 800e208 <xQueueSemaphoreTake+0x120>
{
/* The semaphore count was 0 and a block time was specified
so configure the timeout structure ready to block. */
vTaskInternalSetTimeOutState( &xTimeOut );
800e1fa: f107 030c add.w r3, r7, #12
800e1fe: 4618 mov r0, r3
800e200: f000 ff7c bl 800f0fc <vTaskInternalSetTimeOutState>
xEntryTimeSet = pdTRUE;
800e204: 2301 movs r3, #1
800e206: 637b str r3, [r7, #52] ; 0x34
/* Entry time was already set. */
mtCOVERAGE_TEST_MARKER();
}
}
}
taskEXIT_CRITICAL();
800e208: f001 fc48 bl 800fa9c <vPortExitCritical>
/* Interrupts and other tasks can give to and take from the semaphore
now the critical section has been exited. */
vTaskSuspendAll();
800e20c: f000 fce2 bl 800ebd4 <vTaskSuspendAll>
prvLockQueue( pxQueue );
800e210: f001 fc12 bl 800fa38 <vPortEnterCritical>
800e214: 6afb ldr r3, [r7, #44] ; 0x2c
800e216: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800e21a: b25b sxtb r3, r3
800e21c: f1b3 3fff cmp.w r3, #4294967295
800e220: d103 bne.n 800e22a <xQueueSemaphoreTake+0x142>
800e222: 6afb ldr r3, [r7, #44] ; 0x2c
800e224: 2200 movs r2, #0
800e226: f883 2044 strb.w r2, [r3, #68] ; 0x44
800e22a: 6afb ldr r3, [r7, #44] ; 0x2c
800e22c: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800e230: b25b sxtb r3, r3
800e232: f1b3 3fff cmp.w r3, #4294967295
800e236: d103 bne.n 800e240 <xQueueSemaphoreTake+0x158>
800e238: 6afb ldr r3, [r7, #44] ; 0x2c
800e23a: 2200 movs r2, #0
800e23c: f883 2045 strb.w r2, [r3, #69] ; 0x45
800e240: f001 fc2c bl 800fa9c <vPortExitCritical>
/* Update the timeout state to see if it has expired yet. */
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
800e244: 463a mov r2, r7
800e246: f107 030c add.w r3, r7, #12
800e24a: 4611 mov r1, r2
800e24c: 4618 mov r0, r3
800e24e: f000 ff6b bl 800f128 <xTaskCheckForTimeOut>
800e252: 4603 mov r3, r0
800e254: 2b00 cmp r3, #0
800e256: d132 bne.n 800e2be <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 )
800e258: 6af8 ldr r0, [r7, #44] ; 0x2c
800e25a: f000 f9d2 bl 800e602 <prvIsQueueEmpty>
800e25e: 4603 mov r3, r0
800e260: 2b00 cmp r3, #0
800e262: d026 beq.n 800e2b2 <xQueueSemaphoreTake+0x1ca>
{
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );
#if ( configUSE_MUTEXES == 1 )
{
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
800e264: 6afb ldr r3, [r7, #44] ; 0x2c
800e266: 681b ldr r3, [r3, #0]
800e268: 2b00 cmp r3, #0
800e26a: d109 bne.n 800e280 <xQueueSemaphoreTake+0x198>
{
taskENTER_CRITICAL();
800e26c: f001 fbe4 bl 800fa38 <vPortEnterCritical>
{
xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder );
800e270: 6afb ldr r3, [r7, #44] ; 0x2c
800e272: 689b ldr r3, [r3, #8]
800e274: 4618 mov r0, r3
800e276: f001 f8bb bl 800f3f0 <xTaskPriorityInherit>
800e27a: 6338 str r0, [r7, #48] ; 0x30
}
taskEXIT_CRITICAL();
800e27c: f001 fc0e bl 800fa9c <vPortExitCritical>
mtCOVERAGE_TEST_MARKER();
}
}
#endif
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
800e280: 6afb ldr r3, [r7, #44] ; 0x2c
800e282: 3324 adds r3, #36 ; 0x24
800e284: 683a ldr r2, [r7, #0]
800e286: 4611 mov r1, r2
800e288: 4618 mov r0, r3
800e28a: f000 fead bl 800efe8 <vTaskPlaceOnEventList>
prvUnlockQueue( pxQueue );
800e28e: 6af8 ldr r0, [r7, #44] ; 0x2c
800e290: f000 f965 bl 800e55e <prvUnlockQueue>
if( xTaskResumeAll() == pdFALSE )
800e294: f000 fcac bl 800ebf0 <xTaskResumeAll>
800e298: 4603 mov r3, r0
800e29a: 2b00 cmp r3, #0
800e29c: f47f af67 bne.w 800e16e <xQueueSemaphoreTake+0x86>
{
portYIELD_WITHIN_API();
800e2a0: 4b18 ldr r3, [pc, #96] ; (800e304 <xQueueSemaphoreTake+0x21c>)
800e2a2: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e2a6: 601a str r2, [r3, #0]
800e2a8: f3bf 8f4f dsb sy
800e2ac: f3bf 8f6f isb sy
800e2b0: e75d b.n 800e16e <xQueueSemaphoreTake+0x86>
}
else
{
/* There was no timeout and the semaphore count was not 0, so
attempt to take the semaphore again. */
prvUnlockQueue( pxQueue );
800e2b2: 6af8 ldr r0, [r7, #44] ; 0x2c
800e2b4: f000 f953 bl 800e55e <prvUnlockQueue>
( void ) xTaskResumeAll();
800e2b8: f000 fc9a bl 800ebf0 <xTaskResumeAll>
800e2bc: e757 b.n 800e16e <xQueueSemaphoreTake+0x86>
}
}
else
{
/* Timed out. */
prvUnlockQueue( pxQueue );
800e2be: 6af8 ldr r0, [r7, #44] ; 0x2c
800e2c0: f000 f94d bl 800e55e <prvUnlockQueue>
( void ) xTaskResumeAll();
800e2c4: f000 fc94 bl 800ebf0 <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 )
800e2c8: 6af8 ldr r0, [r7, #44] ; 0x2c
800e2ca: f000 f99a bl 800e602 <prvIsQueueEmpty>
800e2ce: 4603 mov r3, r0
800e2d0: 2b00 cmp r3, #0
800e2d2: f43f af4c beq.w 800e16e <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 )
800e2d6: 6b3b ldr r3, [r7, #48] ; 0x30
800e2d8: 2b00 cmp r3, #0
800e2da: d00d beq.n 800e2f8 <xQueueSemaphoreTake+0x210>
{
taskENTER_CRITICAL();
800e2dc: f001 fbac bl 800fa38 <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 );
800e2e0: 6af8 ldr r0, [r7, #44] ; 0x2c
800e2e2: f000 f894 bl 800e40e <prvGetDisinheritPriorityAfterTimeout>
800e2e6: 6278 str r0, [r7, #36] ; 0x24
vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority );
800e2e8: 6afb ldr r3, [r7, #44] ; 0x2c
800e2ea: 689b ldr r3, [r3, #8]
800e2ec: 6a79 ldr r1, [r7, #36] ; 0x24
800e2ee: 4618 mov r0, r3
800e2f0: f001 f986 bl 800f600 <vTaskPriorityDisinheritAfterTimeout>
}
taskEXIT_CRITICAL();
800e2f4: f001 fbd2 bl 800fa9c <vPortExitCritical>
}
}
#endif /* configUSE_MUTEXES */
traceQUEUE_RECEIVE_FAILED( pxQueue );
return errQUEUE_EMPTY;
800e2f8: 2300 movs r3, #0
{
mtCOVERAGE_TEST_MARKER();
}
}
} /*lint -restore */
}
800e2fa: 4618 mov r0, r3
800e2fc: 3738 adds r7, #56 ; 0x38
800e2fe: 46bd mov sp, r7
800e300: bd80 pop {r7, pc}
800e302: bf00 nop
800e304: e000ed04 .word 0xe000ed04
0800e308 <xQueueReceiveFromISR>:
} /*lint -restore */
}
/*-----------------------------------------------------------*/
BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken )
{
800e308: b580 push {r7, lr}
800e30a: b08e sub sp, #56 ; 0x38
800e30c: af00 add r7, sp, #0
800e30e: 60f8 str r0, [r7, #12]
800e310: 60b9 str r1, [r7, #8]
800e312: 607a str r2, [r7, #4]
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
Queue_t * const pxQueue = xQueue;
800e314: 68fb ldr r3, [r7, #12]
800e316: 633b str r3, [r7, #48] ; 0x30
configASSERT( pxQueue );
800e318: 6b3b ldr r3, [r7, #48] ; 0x30
800e31a: 2b00 cmp r3, #0
800e31c: d10b bne.n 800e336 <xQueueReceiveFromISR+0x2e>
800e31e: f04f 0350 mov.w r3, #80 ; 0x50
800e322: b672 cpsid i
800e324: f383 8811 msr BASEPRI, r3
800e328: f3bf 8f6f isb sy
800e32c: f3bf 8f4f dsb sy
800e330: b662 cpsie i
800e332: 623b str r3, [r7, #32]
800e334: e7fe b.n 800e334 <xQueueReceiveFromISR+0x2c>
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
800e336: 68bb ldr r3, [r7, #8]
800e338: 2b00 cmp r3, #0
800e33a: d103 bne.n 800e344 <xQueueReceiveFromISR+0x3c>
800e33c: 6b3b ldr r3, [r7, #48] ; 0x30
800e33e: 6c1b ldr r3, [r3, #64] ; 0x40
800e340: 2b00 cmp r3, #0
800e342: d101 bne.n 800e348 <xQueueReceiveFromISR+0x40>
800e344: 2301 movs r3, #1
800e346: e000 b.n 800e34a <xQueueReceiveFromISR+0x42>
800e348: 2300 movs r3, #0
800e34a: 2b00 cmp r3, #0
800e34c: d10b bne.n 800e366 <xQueueReceiveFromISR+0x5e>
800e34e: f04f 0350 mov.w r3, #80 ; 0x50
800e352: b672 cpsid i
800e354: f383 8811 msr BASEPRI, r3
800e358: f3bf 8f6f isb sy
800e35c: f3bf 8f4f dsb sy
800e360: b662 cpsie i
800e362: 61fb str r3, [r7, #28]
800e364: e7fe b.n 800e364 <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();
800e366: f001 fc47 bl 800fbf8 <vPortValidateInterruptPriority>
__asm volatile
800e36a: f3ef 8211 mrs r2, BASEPRI
800e36e: f04f 0350 mov.w r3, #80 ; 0x50
800e372: b672 cpsid i
800e374: f383 8811 msr BASEPRI, r3
800e378: f3bf 8f6f isb sy
800e37c: f3bf 8f4f dsb sy
800e380: b662 cpsie i
800e382: 61ba str r2, [r7, #24]
800e384: 617b str r3, [r7, #20]
return ulOriginalBASEPRI;
800e386: 69bb ldr r3, [r7, #24]
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
800e388: 62fb str r3, [r7, #44] ; 0x2c
{
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
800e38a: 6b3b ldr r3, [r7, #48] ; 0x30
800e38c: 6b9b ldr r3, [r3, #56] ; 0x38
800e38e: 62bb str r3, [r7, #40] ; 0x28
/* Cannot block in an ISR, so check there is data available. */
if( uxMessagesWaiting > ( UBaseType_t ) 0 )
800e390: 6abb ldr r3, [r7, #40] ; 0x28
800e392: 2b00 cmp r3, #0
800e394: d02f beq.n 800e3f6 <xQueueReceiveFromISR+0xee>
{
const int8_t cRxLock = pxQueue->cRxLock;
800e396: 6b3b ldr r3, [r7, #48] ; 0x30
800e398: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800e39c: f887 3027 strb.w r3, [r7, #39] ; 0x27
traceQUEUE_RECEIVE_FROM_ISR( pxQueue );
prvCopyDataFromQueue( pxQueue, pvBuffer );
800e3a0: 68b9 ldr r1, [r7, #8]
800e3a2: 6b38 ldr r0, [r7, #48] ; 0x30
800e3a4: f000 f8b5 bl 800e512 <prvCopyDataFromQueue>
pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
800e3a8: 6abb ldr r3, [r7, #40] ; 0x28
800e3aa: 1e5a subs r2, r3, #1
800e3ac: 6b3b ldr r3, [r7, #48] ; 0x30
800e3ae: 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 )
800e3b0: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
800e3b4: f1b3 3fff cmp.w r3, #4294967295
800e3b8: d112 bne.n 800e3e0 <xQueueReceiveFromISR+0xd8>
{
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
800e3ba: 6b3b ldr r3, [r7, #48] ; 0x30
800e3bc: 691b ldr r3, [r3, #16]
800e3be: 2b00 cmp r3, #0
800e3c0: d016 beq.n 800e3f0 <xQueueReceiveFromISR+0xe8>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800e3c2: 6b3b ldr r3, [r7, #48] ; 0x30
800e3c4: 3310 adds r3, #16
800e3c6: 4618 mov r0, r3
800e3c8: f000 fe34 bl 800f034 <xTaskRemoveFromEventList>
800e3cc: 4603 mov r3, r0
800e3ce: 2b00 cmp r3, #0
800e3d0: d00e beq.n 800e3f0 <xQueueReceiveFromISR+0xe8>
{
/* The task waiting has a higher priority than us so
force a context switch. */
if( pxHigherPriorityTaskWoken != NULL )
800e3d2: 687b ldr r3, [r7, #4]
800e3d4: 2b00 cmp r3, #0
800e3d6: d00b beq.n 800e3f0 <xQueueReceiveFromISR+0xe8>
{
*pxHigherPriorityTaskWoken = pdTRUE;
800e3d8: 687b ldr r3, [r7, #4]
800e3da: 2201 movs r2, #1
800e3dc: 601a str r2, [r3, #0]
800e3de: e007 b.n 800e3f0 <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 );
800e3e0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
800e3e4: 3301 adds r3, #1
800e3e6: b2db uxtb r3, r3
800e3e8: b25a sxtb r2, r3
800e3ea: 6b3b ldr r3, [r7, #48] ; 0x30
800e3ec: f883 2044 strb.w r2, [r3, #68] ; 0x44
}
xReturn = pdPASS;
800e3f0: 2301 movs r3, #1
800e3f2: 637b str r3, [r7, #52] ; 0x34
800e3f4: e001 b.n 800e3fa <xQueueReceiveFromISR+0xf2>
}
else
{
xReturn = pdFAIL;
800e3f6: 2300 movs r3, #0
800e3f8: 637b str r3, [r7, #52] ; 0x34
800e3fa: 6afb ldr r3, [r7, #44] ; 0x2c
800e3fc: 613b str r3, [r7, #16]
__asm volatile
800e3fe: 693b ldr r3, [r7, #16]
800e400: f383 8811 msr BASEPRI, r3
traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );
}
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return xReturn;
800e404: 6b7b ldr r3, [r7, #52] ; 0x34
}
800e406: 4618 mov r0, r3
800e408: 3738 adds r7, #56 ; 0x38
800e40a: 46bd mov sp, r7
800e40c: bd80 pop {r7, pc}
0800e40e <prvGetDisinheritPriorityAfterTimeout>:
/*-----------------------------------------------------------*/
#if( configUSE_MUTEXES == 1 )
static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue )
{
800e40e: b480 push {r7}
800e410: b085 sub sp, #20
800e412: af00 add r7, sp, #0
800e414: 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 )
800e416: 687b ldr r3, [r7, #4]
800e418: 6a5b ldr r3, [r3, #36] ; 0x24
800e41a: 2b00 cmp r3, #0
800e41c: d006 beq.n 800e42c <prvGetDisinheritPriorityAfterTimeout+0x1e>
{
uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) );
800e41e: 687b ldr r3, [r7, #4]
800e420: 6b1b ldr r3, [r3, #48] ; 0x30
800e422: 681b ldr r3, [r3, #0]
800e424: f1c3 0307 rsb r3, r3, #7
800e428: 60fb str r3, [r7, #12]
800e42a: e001 b.n 800e430 <prvGetDisinheritPriorityAfterTimeout+0x22>
}
else
{
uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY;
800e42c: 2300 movs r3, #0
800e42e: 60fb str r3, [r7, #12]
}
return uxHighestPriorityOfWaitingTasks;
800e430: 68fb ldr r3, [r7, #12]
}
800e432: 4618 mov r0, r3
800e434: 3714 adds r7, #20
800e436: 46bd mov sp, r7
800e438: f85d 7b04 ldr.w r7, [sp], #4
800e43c: 4770 bx lr
0800e43e <prvCopyDataToQueue>:
#endif /* configUSE_MUTEXES */
/*-----------------------------------------------------------*/
static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition )
{
800e43e: b580 push {r7, lr}
800e440: b086 sub sp, #24
800e442: af00 add r7, sp, #0
800e444: 60f8 str r0, [r7, #12]
800e446: 60b9 str r1, [r7, #8]
800e448: 607a str r2, [r7, #4]
BaseType_t xReturn = pdFALSE;
800e44a: 2300 movs r3, #0
800e44c: 617b str r3, [r7, #20]
UBaseType_t uxMessagesWaiting;
/* This function is called from a critical section. */
uxMessagesWaiting = pxQueue->uxMessagesWaiting;
800e44e: 68fb ldr r3, [r7, #12]
800e450: 6b9b ldr r3, [r3, #56] ; 0x38
800e452: 613b str r3, [r7, #16]
if( pxQueue->uxItemSize == ( UBaseType_t ) 0 )
800e454: 68fb ldr r3, [r7, #12]
800e456: 6c1b ldr r3, [r3, #64] ; 0x40
800e458: 2b00 cmp r3, #0
800e45a: d10d bne.n 800e478 <prvCopyDataToQueue+0x3a>
{
#if ( configUSE_MUTEXES == 1 )
{
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
800e45c: 68fb ldr r3, [r7, #12]
800e45e: 681b ldr r3, [r3, #0]
800e460: 2b00 cmp r3, #0
800e462: d14d bne.n 800e500 <prvCopyDataToQueue+0xc2>
{
/* The mutex is no longer being held. */
xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder );
800e464: 68fb ldr r3, [r7, #12]
800e466: 689b ldr r3, [r3, #8]
800e468: 4618 mov r0, r3
800e46a: f001 f841 bl 800f4f0 <xTaskPriorityDisinherit>
800e46e: 6178 str r0, [r7, #20]
pxQueue->u.xSemaphore.xMutexHolder = NULL;
800e470: 68fb ldr r3, [r7, #12]
800e472: 2200 movs r2, #0
800e474: 609a str r2, [r3, #8]
800e476: e043 b.n 800e500 <prvCopyDataToQueue+0xc2>
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_MUTEXES */
}
else if( xPosition == queueSEND_TO_BACK )
800e478: 687b ldr r3, [r7, #4]
800e47a: 2b00 cmp r3, #0
800e47c: d119 bne.n 800e4b2 <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. */
800e47e: 68fb ldr r3, [r7, #12]
800e480: 6858 ldr r0, [r3, #4]
800e482: 68fb ldr r3, [r7, #12]
800e484: 6c1b ldr r3, [r3, #64] ; 0x40
800e486: 461a mov r2, r3
800e488: 68b9 ldr r1, [r7, #8]
800e48a: f00e f830 bl 801c4ee <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. */
800e48e: 68fb ldr r3, [r7, #12]
800e490: 685a ldr r2, [r3, #4]
800e492: 68fb ldr r3, [r7, #12]
800e494: 6c1b ldr r3, [r3, #64] ; 0x40
800e496: 441a add r2, r3
800e498: 68fb ldr r3, [r7, #12]
800e49a: 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. */
800e49c: 68fb ldr r3, [r7, #12]
800e49e: 685a ldr r2, [r3, #4]
800e4a0: 68fb ldr r3, [r7, #12]
800e4a2: 689b ldr r3, [r3, #8]
800e4a4: 429a cmp r2, r3
800e4a6: d32b bcc.n 800e500 <prvCopyDataToQueue+0xc2>
{
pxQueue->pcWriteTo = pxQueue->pcHead;
800e4a8: 68fb ldr r3, [r7, #12]
800e4aa: 681a ldr r2, [r3, #0]
800e4ac: 68fb ldr r3, [r7, #12]
800e4ae: 605a str r2, [r3, #4]
800e4b0: e026 b.n 800e500 <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. */
800e4b2: 68fb ldr r3, [r7, #12]
800e4b4: 68d8 ldr r0, [r3, #12]
800e4b6: 68fb ldr r3, [r7, #12]
800e4b8: 6c1b ldr r3, [r3, #64] ; 0x40
800e4ba: 461a mov r2, r3
800e4bc: 68b9 ldr r1, [r7, #8]
800e4be: f00e f816 bl 801c4ee <memcpy>
pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize;
800e4c2: 68fb ldr r3, [r7, #12]
800e4c4: 68da ldr r2, [r3, #12]
800e4c6: 68fb ldr r3, [r7, #12]
800e4c8: 6c1b ldr r3, [r3, #64] ; 0x40
800e4ca: 425b negs r3, r3
800e4cc: 441a add r2, r3
800e4ce: 68fb ldr r3, [r7, #12]
800e4d0: 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. */
800e4d2: 68fb ldr r3, [r7, #12]
800e4d4: 68da ldr r2, [r3, #12]
800e4d6: 68fb ldr r3, [r7, #12]
800e4d8: 681b ldr r3, [r3, #0]
800e4da: 429a cmp r2, r3
800e4dc: d207 bcs.n 800e4ee <prvCopyDataToQueue+0xb0>
{
pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize );
800e4de: 68fb ldr r3, [r7, #12]
800e4e0: 689a ldr r2, [r3, #8]
800e4e2: 68fb ldr r3, [r7, #12]
800e4e4: 6c1b ldr r3, [r3, #64] ; 0x40
800e4e6: 425b negs r3, r3
800e4e8: 441a add r2, r3
800e4ea: 68fb ldr r3, [r7, #12]
800e4ec: 60da str r2, [r3, #12]
else
{
mtCOVERAGE_TEST_MARKER();
}
if( xPosition == queueOVERWRITE )
800e4ee: 687b ldr r3, [r7, #4]
800e4f0: 2b02 cmp r3, #2
800e4f2: d105 bne.n 800e500 <prvCopyDataToQueue+0xc2>
{
if( uxMessagesWaiting > ( UBaseType_t ) 0 )
800e4f4: 693b ldr r3, [r7, #16]
800e4f6: 2b00 cmp r3, #0
800e4f8: d002 beq.n 800e500 <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;
800e4fa: 693b ldr r3, [r7, #16]
800e4fc: 3b01 subs r3, #1
800e4fe: 613b str r3, [r7, #16]
{
mtCOVERAGE_TEST_MARKER();
}
}
pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;
800e500: 693b ldr r3, [r7, #16]
800e502: 1c5a adds r2, r3, #1
800e504: 68fb ldr r3, [r7, #12]
800e506: 639a str r2, [r3, #56] ; 0x38
return xReturn;
800e508: 697b ldr r3, [r7, #20]
}
800e50a: 4618 mov r0, r3
800e50c: 3718 adds r7, #24
800e50e: 46bd mov sp, r7
800e510: bd80 pop {r7, pc}
0800e512 <prvCopyDataFromQueue>:
/*-----------------------------------------------------------*/
static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer )
{
800e512: b580 push {r7, lr}
800e514: b082 sub sp, #8
800e516: af00 add r7, sp, #0
800e518: 6078 str r0, [r7, #4]
800e51a: 6039 str r1, [r7, #0]
if( pxQueue->uxItemSize != ( UBaseType_t ) 0 )
800e51c: 687b ldr r3, [r7, #4]
800e51e: 6c1b ldr r3, [r3, #64] ; 0x40
800e520: 2b00 cmp r3, #0
800e522: d018 beq.n 800e556 <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. */
800e524: 687b ldr r3, [r7, #4]
800e526: 68da ldr r2, [r3, #12]
800e528: 687b ldr r3, [r7, #4]
800e52a: 6c1b ldr r3, [r3, #64] ; 0x40
800e52c: 441a add r2, r3
800e52e: 687b ldr r3, [r7, #4]
800e530: 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. */
800e532: 687b ldr r3, [r7, #4]
800e534: 68da ldr r2, [r3, #12]
800e536: 687b ldr r3, [r7, #4]
800e538: 689b ldr r3, [r3, #8]
800e53a: 429a cmp r2, r3
800e53c: d303 bcc.n 800e546 <prvCopyDataFromQueue+0x34>
{
pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead;
800e53e: 687b ldr r3, [r7, #4]
800e540: 681a ldr r2, [r3, #0]
800e542: 687b ldr r3, [r7, #4]
800e544: 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. */
800e546: 687b ldr r3, [r7, #4]
800e548: 68d9 ldr r1, [r3, #12]
800e54a: 687b ldr r3, [r7, #4]
800e54c: 6c1b ldr r3, [r3, #64] ; 0x40
800e54e: 461a mov r2, r3
800e550: 6838 ldr r0, [r7, #0]
800e552: f00d ffcc bl 801c4ee <memcpy>
}
}
800e556: bf00 nop
800e558: 3708 adds r7, #8
800e55a: 46bd mov sp, r7
800e55c: bd80 pop {r7, pc}
0800e55e <prvUnlockQueue>:
/*-----------------------------------------------------------*/
static void prvUnlockQueue( Queue_t * const pxQueue )
{
800e55e: b580 push {r7, lr}
800e560: b084 sub sp, #16
800e562: af00 add r7, sp, #0
800e564: 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();
800e566: f001 fa67 bl 800fa38 <vPortEnterCritical>
{
int8_t cTxLock = pxQueue->cTxLock;
800e56a: 687b ldr r3, [r7, #4]
800e56c: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
800e570: 73fb strb r3, [r7, #15]
/* See if data was added to the queue while it was locked. */
while( cTxLock > queueLOCKED_UNMODIFIED )
800e572: e011 b.n 800e598 <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 )
800e574: 687b ldr r3, [r7, #4]
800e576: 6a5b ldr r3, [r3, #36] ; 0x24
800e578: 2b00 cmp r3, #0
800e57a: d012 beq.n 800e5a2 <prvUnlockQueue+0x44>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
800e57c: 687b ldr r3, [r7, #4]
800e57e: 3324 adds r3, #36 ; 0x24
800e580: 4618 mov r0, r3
800e582: f000 fd57 bl 800f034 <xTaskRemoveFromEventList>
800e586: 4603 mov r3, r0
800e588: 2b00 cmp r3, #0
800e58a: d001 beq.n 800e590 <prvUnlockQueue+0x32>
{
/* The task waiting has a higher priority so record that
a context switch is required. */
vTaskMissedYield();
800e58c: f000 fe30 bl 800f1f0 <vTaskMissedYield>
break;
}
}
#endif /* configUSE_QUEUE_SETS */
--cTxLock;
800e590: 7bfb ldrb r3, [r7, #15]
800e592: 3b01 subs r3, #1
800e594: b2db uxtb r3, r3
800e596: 73fb strb r3, [r7, #15]
while( cTxLock > queueLOCKED_UNMODIFIED )
800e598: f997 300f ldrsb.w r3, [r7, #15]
800e59c: 2b00 cmp r3, #0
800e59e: dce9 bgt.n 800e574 <prvUnlockQueue+0x16>
800e5a0: e000 b.n 800e5a4 <prvUnlockQueue+0x46>
break;
800e5a2: bf00 nop
}
pxQueue->cTxLock = queueUNLOCKED;
800e5a4: 687b ldr r3, [r7, #4]
800e5a6: 22ff movs r2, #255 ; 0xff
800e5a8: f883 2045 strb.w r2, [r3, #69] ; 0x45
}
taskEXIT_CRITICAL();
800e5ac: f001 fa76 bl 800fa9c <vPortExitCritical>
/* Do the same for the Rx lock. */
taskENTER_CRITICAL();
800e5b0: f001 fa42 bl 800fa38 <vPortEnterCritical>
{
int8_t cRxLock = pxQueue->cRxLock;
800e5b4: 687b ldr r3, [r7, #4]
800e5b6: f893 3044 ldrb.w r3, [r3, #68] ; 0x44
800e5ba: 73bb strb r3, [r7, #14]
while( cRxLock > queueLOCKED_UNMODIFIED )
800e5bc: e011 b.n 800e5e2 <prvUnlockQueue+0x84>
{
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
800e5be: 687b ldr r3, [r7, #4]
800e5c0: 691b ldr r3, [r3, #16]
800e5c2: 2b00 cmp r3, #0
800e5c4: d012 beq.n 800e5ec <prvUnlockQueue+0x8e>
{
if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
800e5c6: 687b ldr r3, [r7, #4]
800e5c8: 3310 adds r3, #16
800e5ca: 4618 mov r0, r3
800e5cc: f000 fd32 bl 800f034 <xTaskRemoveFromEventList>
800e5d0: 4603 mov r3, r0
800e5d2: 2b00 cmp r3, #0
800e5d4: d001 beq.n 800e5da <prvUnlockQueue+0x7c>
{
vTaskMissedYield();
800e5d6: f000 fe0b bl 800f1f0 <vTaskMissedYield>
else
{
mtCOVERAGE_TEST_MARKER();
}
--cRxLock;
800e5da: 7bbb ldrb r3, [r7, #14]
800e5dc: 3b01 subs r3, #1
800e5de: b2db uxtb r3, r3
800e5e0: 73bb strb r3, [r7, #14]
while( cRxLock > queueLOCKED_UNMODIFIED )
800e5e2: f997 300e ldrsb.w r3, [r7, #14]
800e5e6: 2b00 cmp r3, #0
800e5e8: dce9 bgt.n 800e5be <prvUnlockQueue+0x60>
800e5ea: e000 b.n 800e5ee <prvUnlockQueue+0x90>
}
else
{
break;
800e5ec: bf00 nop
}
}
pxQueue->cRxLock = queueUNLOCKED;
800e5ee: 687b ldr r3, [r7, #4]
800e5f0: 22ff movs r2, #255 ; 0xff
800e5f2: f883 2044 strb.w r2, [r3, #68] ; 0x44
}
taskEXIT_CRITICAL();
800e5f6: f001 fa51 bl 800fa9c <vPortExitCritical>
}
800e5fa: bf00 nop
800e5fc: 3710 adds r7, #16
800e5fe: 46bd mov sp, r7
800e600: bd80 pop {r7, pc}
0800e602 <prvIsQueueEmpty>:
/*-----------------------------------------------------------*/
static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue )
{
800e602: b580 push {r7, lr}
800e604: b084 sub sp, #16
800e606: af00 add r7, sp, #0
800e608: 6078 str r0, [r7, #4]
BaseType_t xReturn;
taskENTER_CRITICAL();
800e60a: f001 fa15 bl 800fa38 <vPortEnterCritical>
{
if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
800e60e: 687b ldr r3, [r7, #4]
800e610: 6b9b ldr r3, [r3, #56] ; 0x38
800e612: 2b00 cmp r3, #0
800e614: d102 bne.n 800e61c <prvIsQueueEmpty+0x1a>
{
xReturn = pdTRUE;
800e616: 2301 movs r3, #1
800e618: 60fb str r3, [r7, #12]
800e61a: e001 b.n 800e620 <prvIsQueueEmpty+0x1e>
}
else
{
xReturn = pdFALSE;
800e61c: 2300 movs r3, #0
800e61e: 60fb str r3, [r7, #12]
}
}
taskEXIT_CRITICAL();
800e620: f001 fa3c bl 800fa9c <vPortExitCritical>
return xReturn;
800e624: 68fb ldr r3, [r7, #12]
}
800e626: 4618 mov r0, r3
800e628: 3710 adds r7, #16
800e62a: 46bd mov sp, r7
800e62c: bd80 pop {r7, pc}
0800e62e <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 )
{
800e62e: b580 push {r7, lr}
800e630: b084 sub sp, #16
800e632: af00 add r7, sp, #0
800e634: 6078 str r0, [r7, #4]
BaseType_t xReturn;
taskENTER_CRITICAL();
800e636: f001 f9ff bl 800fa38 <vPortEnterCritical>
{
if( pxQueue->uxMessagesWaiting == pxQueue->uxLength )
800e63a: 687b ldr r3, [r7, #4]
800e63c: 6b9a ldr r2, [r3, #56] ; 0x38
800e63e: 687b ldr r3, [r7, #4]
800e640: 6bdb ldr r3, [r3, #60] ; 0x3c
800e642: 429a cmp r2, r3
800e644: d102 bne.n 800e64c <prvIsQueueFull+0x1e>
{
xReturn = pdTRUE;
800e646: 2301 movs r3, #1
800e648: 60fb str r3, [r7, #12]
800e64a: e001 b.n 800e650 <prvIsQueueFull+0x22>
}
else
{
xReturn = pdFALSE;
800e64c: 2300 movs r3, #0
800e64e: 60fb str r3, [r7, #12]
}
}
taskEXIT_CRITICAL();
800e650: f001 fa24 bl 800fa9c <vPortExitCritical>
return xReturn;
800e654: 68fb ldr r3, [r7, #12]
}
800e656: 4618 mov r0, r3
800e658: 3710 adds r7, #16
800e65a: 46bd mov sp, r7
800e65c: bd80 pop {r7, pc}
0800e65e <xTaskCreateStatic>:
const uint32_t ulStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
StackType_t * const puxStackBuffer,
StaticTask_t * const pxTaskBuffer )
{
800e65e: b580 push {r7, lr}
800e660: b08e sub sp, #56 ; 0x38
800e662: af04 add r7, sp, #16
800e664: 60f8 str r0, [r7, #12]
800e666: 60b9 str r1, [r7, #8]
800e668: 607a str r2, [r7, #4]
800e66a: 603b str r3, [r7, #0]
TCB_t *pxNewTCB;
TaskHandle_t xReturn;
configASSERT( puxStackBuffer != NULL );
800e66c: 6b7b ldr r3, [r7, #52] ; 0x34
800e66e: 2b00 cmp r3, #0
800e670: d10b bne.n 800e68a <xTaskCreateStatic+0x2c>
__asm volatile
800e672: f04f 0350 mov.w r3, #80 ; 0x50
800e676: b672 cpsid i
800e678: f383 8811 msr BASEPRI, r3
800e67c: f3bf 8f6f isb sy
800e680: f3bf 8f4f dsb sy
800e684: b662 cpsie i
800e686: 623b str r3, [r7, #32]
800e688: e7fe b.n 800e688 <xTaskCreateStatic+0x2a>
configASSERT( pxTaskBuffer != NULL );
800e68a: 6bbb ldr r3, [r7, #56] ; 0x38
800e68c: 2b00 cmp r3, #0
800e68e: d10b bne.n 800e6a8 <xTaskCreateStatic+0x4a>
800e690: f04f 0350 mov.w r3, #80 ; 0x50
800e694: b672 cpsid i
800e696: f383 8811 msr BASEPRI, r3
800e69a: f3bf 8f6f isb sy
800e69e: f3bf 8f4f dsb sy
800e6a2: b662 cpsie i
800e6a4: 61fb str r3, [r7, #28]
800e6a6: e7fe b.n 800e6a6 <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 );
800e6a8: 2358 movs r3, #88 ; 0x58
800e6aa: 613b str r3, [r7, #16]
configASSERT( xSize == sizeof( TCB_t ) );
800e6ac: 693b ldr r3, [r7, #16]
800e6ae: 2b58 cmp r3, #88 ; 0x58
800e6b0: d00b beq.n 800e6ca <xTaskCreateStatic+0x6c>
800e6b2: f04f 0350 mov.w r3, #80 ; 0x50
800e6b6: b672 cpsid i
800e6b8: f383 8811 msr BASEPRI, r3
800e6bc: f3bf 8f6f isb sy
800e6c0: f3bf 8f4f dsb sy
800e6c4: b662 cpsie i
800e6c6: 61bb str r3, [r7, #24]
800e6c8: e7fe b.n 800e6c8 <xTaskCreateStatic+0x6a>
( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */
800e6ca: 693b ldr r3, [r7, #16]
}
#endif /* configASSERT_DEFINED */
if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) )
800e6cc: 6bbb ldr r3, [r7, #56] ; 0x38
800e6ce: 2b00 cmp r3, #0
800e6d0: d01e beq.n 800e710 <xTaskCreateStatic+0xb2>
800e6d2: 6b7b ldr r3, [r7, #52] ; 0x34
800e6d4: 2b00 cmp r3, #0
800e6d6: d01b beq.n 800e710 <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. */
800e6d8: 6bbb ldr r3, [r7, #56] ; 0x38
800e6da: 627b str r3, [r7, #36] ; 0x24
pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer;
800e6dc: 6a7b ldr r3, [r7, #36] ; 0x24
800e6de: 6b7a ldr r2, [r7, #52] ; 0x34
800e6e0: 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;
800e6e2: 6a7b ldr r3, [r7, #36] ; 0x24
800e6e4: 2202 movs r2, #2
800e6e6: f883 2055 strb.w r2, [r3, #85] ; 0x55
}
#endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */
prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL );
800e6ea: 2300 movs r3, #0
800e6ec: 9303 str r3, [sp, #12]
800e6ee: 6a7b ldr r3, [r7, #36] ; 0x24
800e6f0: 9302 str r3, [sp, #8]
800e6f2: f107 0314 add.w r3, r7, #20
800e6f6: 9301 str r3, [sp, #4]
800e6f8: 6b3b ldr r3, [r7, #48] ; 0x30
800e6fa: 9300 str r3, [sp, #0]
800e6fc: 683b ldr r3, [r7, #0]
800e6fe: 687a ldr r2, [r7, #4]
800e700: 68b9 ldr r1, [r7, #8]
800e702: 68f8 ldr r0, [r7, #12]
800e704: f000 f850 bl 800e7a8 <prvInitialiseNewTask>
prvAddNewTaskToReadyList( pxNewTCB );
800e708: 6a78 ldr r0, [r7, #36] ; 0x24
800e70a: f000 f8e1 bl 800e8d0 <prvAddNewTaskToReadyList>
800e70e: e001 b.n 800e714 <xTaskCreateStatic+0xb6>
}
else
{
xReturn = NULL;
800e710: 2300 movs r3, #0
800e712: 617b str r3, [r7, #20]
}
return xReturn;
800e714: 697b ldr r3, [r7, #20]
}
800e716: 4618 mov r0, r3
800e718: 3728 adds r7, #40 ; 0x28
800e71a: 46bd mov sp, r7
800e71c: bd80 pop {r7, pc}
0800e71e <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 )
{
800e71e: b580 push {r7, lr}
800e720: b08c sub sp, #48 ; 0x30
800e722: af04 add r7, sp, #16
800e724: 60f8 str r0, [r7, #12]
800e726: 60b9 str r1, [r7, #8]
800e728: 603b str r3, [r7, #0]
800e72a: 4613 mov r3, r2
800e72c: 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. */
800e72e: 88fb ldrh r3, [r7, #6]
800e730: 009b lsls r3, r3, #2
800e732: 4618 mov r0, r3
800e734: f001 faa2 bl 800fc7c <pvPortMalloc>
800e738: 6178 str r0, [r7, #20]
if( pxStack != NULL )
800e73a: 697b ldr r3, [r7, #20]
800e73c: 2b00 cmp r3, #0
800e73e: d00e beq.n 800e75e <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. */
800e740: 2058 movs r0, #88 ; 0x58
800e742: f001 fa9b bl 800fc7c <pvPortMalloc>
800e746: 61f8 str r0, [r7, #28]
if( pxNewTCB != NULL )
800e748: 69fb ldr r3, [r7, #28]
800e74a: 2b00 cmp r3, #0
800e74c: d003 beq.n 800e756 <xTaskCreate+0x38>
{
/* Store the stack location in the TCB. */
pxNewTCB->pxStack = pxStack;
800e74e: 69fb ldr r3, [r7, #28]
800e750: 697a ldr r2, [r7, #20]
800e752: 631a str r2, [r3, #48] ; 0x30
800e754: e005 b.n 800e762 <xTaskCreate+0x44>
}
else
{
/* The stack cannot be used as the TCB was not created. Free
it again. */
vPortFree( pxStack );
800e756: 6978 ldr r0, [r7, #20]
800e758: f001 fb5c bl 800fe14 <vPortFree>
800e75c: e001 b.n 800e762 <xTaskCreate+0x44>
}
}
else
{
pxNewTCB = NULL;
800e75e: 2300 movs r3, #0
800e760: 61fb str r3, [r7, #28]
}
}
#endif /* portSTACK_GROWTH */
if( pxNewTCB != NULL )
800e762: 69fb ldr r3, [r7, #28]
800e764: 2b00 cmp r3, #0
800e766: d017 beq.n 800e798 <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;
800e768: 69fb ldr r3, [r7, #28]
800e76a: 2200 movs r2, #0
800e76c: 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 );
800e770: 88fa ldrh r2, [r7, #6]
800e772: 2300 movs r3, #0
800e774: 9303 str r3, [sp, #12]
800e776: 69fb ldr r3, [r7, #28]
800e778: 9302 str r3, [sp, #8]
800e77a: 6afb ldr r3, [r7, #44] ; 0x2c
800e77c: 9301 str r3, [sp, #4]
800e77e: 6abb ldr r3, [r7, #40] ; 0x28
800e780: 9300 str r3, [sp, #0]
800e782: 683b ldr r3, [r7, #0]
800e784: 68b9 ldr r1, [r7, #8]
800e786: 68f8 ldr r0, [r7, #12]
800e788: f000 f80e bl 800e7a8 <prvInitialiseNewTask>
prvAddNewTaskToReadyList( pxNewTCB );
800e78c: 69f8 ldr r0, [r7, #28]
800e78e: f000 f89f bl 800e8d0 <prvAddNewTaskToReadyList>
xReturn = pdPASS;
800e792: 2301 movs r3, #1
800e794: 61bb str r3, [r7, #24]
800e796: e002 b.n 800e79e <xTaskCreate+0x80>
}
else
{
xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY;
800e798: f04f 33ff mov.w r3, #4294967295
800e79c: 61bb str r3, [r7, #24]
}
return xReturn;
800e79e: 69bb ldr r3, [r7, #24]
}
800e7a0: 4618 mov r0, r3
800e7a2: 3720 adds r7, #32
800e7a4: 46bd mov sp, r7
800e7a6: bd80 pop {r7, pc}
0800e7a8 <prvInitialiseNewTask>:
void * const pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask,
TCB_t *pxNewTCB,
const MemoryRegion_t * const xRegions )
{
800e7a8: b580 push {r7, lr}
800e7aa: b088 sub sp, #32
800e7ac: af00 add r7, sp, #0
800e7ae: 60f8 str r0, [r7, #12]
800e7b0: 60b9 str r1, [r7, #8]
800e7b2: 607a str r2, [r7, #4]
800e7b4: 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 ) );
800e7b6: 6b3b ldr r3, [r7, #48] ; 0x30
800e7b8: 6b18 ldr r0, [r3, #48] ; 0x30
800e7ba: 687b ldr r3, [r7, #4]
800e7bc: 009b lsls r3, r3, #2
800e7be: 461a mov r2, r3
800e7c0: 21a5 movs r1, #165 ; 0xa5
800e7c2: f00d feb8 bl 801c536 <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 ] );
800e7c6: 6b3b ldr r3, [r7, #48] ; 0x30
800e7c8: 6b1a ldr r2, [r3, #48] ; 0x30
800e7ca: 6879 ldr r1, [r7, #4]
800e7cc: f06f 4340 mvn.w r3, #3221225472 ; 0xc0000000
800e7d0: 440b add r3, r1
800e7d2: 009b lsls r3, r3, #2
800e7d4: 4413 add r3, r2
800e7d6: 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(). */
800e7d8: 69bb ldr r3, [r7, #24]
800e7da: f023 0307 bic.w r3, r3, #7
800e7de: 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 ) );
800e7e0: 69bb ldr r3, [r7, #24]
800e7e2: f003 0307 and.w r3, r3, #7
800e7e6: 2b00 cmp r3, #0
800e7e8: d00b beq.n 800e802 <prvInitialiseNewTask+0x5a>
800e7ea: f04f 0350 mov.w r3, #80 ; 0x50
800e7ee: b672 cpsid i
800e7f0: f383 8811 msr BASEPRI, r3
800e7f4: f3bf 8f6f isb sy
800e7f8: f3bf 8f4f dsb sy
800e7fc: b662 cpsie i
800e7fe: 617b str r3, [r7, #20]
800e800: e7fe b.n 800e800 <prvInitialiseNewTask+0x58>
pxNewTCB->pxEndOfStack = pxNewTCB->pxStack + ( ulStackDepth - ( uint32_t ) 1 );
}
#endif /* portSTACK_GROWTH */
/* Store the task name in the TCB. */
if( pcName != NULL )
800e802: 68bb ldr r3, [r7, #8]
800e804: 2b00 cmp r3, #0
800e806: d01f beq.n 800e848 <prvInitialiseNewTask+0xa0>
{
for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
800e808: 2300 movs r3, #0
800e80a: 61fb str r3, [r7, #28]
800e80c: e012 b.n 800e834 <prvInitialiseNewTask+0x8c>
{
pxNewTCB->pcTaskName[ x ] = pcName[ x ];
800e80e: 68ba ldr r2, [r7, #8]
800e810: 69fb ldr r3, [r7, #28]
800e812: 4413 add r3, r2
800e814: 7819 ldrb r1, [r3, #0]
800e816: 6b3a ldr r2, [r7, #48] ; 0x30
800e818: 69fb ldr r3, [r7, #28]
800e81a: 4413 add r3, r2
800e81c: 3334 adds r3, #52 ; 0x34
800e81e: 460a mov r2, r1
800e820: 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 )
800e822: 68ba ldr r2, [r7, #8]
800e824: 69fb ldr r3, [r7, #28]
800e826: 4413 add r3, r2
800e828: 781b ldrb r3, [r3, #0]
800e82a: 2b00 cmp r3, #0
800e82c: d006 beq.n 800e83c <prvInitialiseNewTask+0x94>
for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
800e82e: 69fb ldr r3, [r7, #28]
800e830: 3301 adds r3, #1
800e832: 61fb str r3, [r7, #28]
800e834: 69fb ldr r3, [r7, #28]
800e836: 2b0f cmp r3, #15
800e838: d9e9 bls.n 800e80e <prvInitialiseNewTask+0x66>
800e83a: e000 b.n 800e83e <prvInitialiseNewTask+0x96>
{
break;
800e83c: 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';
800e83e: 6b3b ldr r3, [r7, #48] ; 0x30
800e840: 2200 movs r2, #0
800e842: f883 2043 strb.w r2, [r3, #67] ; 0x43
800e846: e003 b.n 800e850 <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;
800e848: 6b3b ldr r3, [r7, #48] ; 0x30
800e84a: 2200 movs r2, #0
800e84c: 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 )
800e850: 6abb ldr r3, [r7, #40] ; 0x28
800e852: 2b06 cmp r3, #6
800e854: d901 bls.n 800e85a <prvInitialiseNewTask+0xb2>
{
uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U;
800e856: 2306 movs r3, #6
800e858: 62bb str r3, [r7, #40] ; 0x28
else
{
mtCOVERAGE_TEST_MARKER();
}
pxNewTCB->uxPriority = uxPriority;
800e85a: 6b3b ldr r3, [r7, #48] ; 0x30
800e85c: 6aba ldr r2, [r7, #40] ; 0x28
800e85e: 62da str r2, [r3, #44] ; 0x2c
#if ( configUSE_MUTEXES == 1 )
{
pxNewTCB->uxBasePriority = uxPriority;
800e860: 6b3b ldr r3, [r7, #48] ; 0x30
800e862: 6aba ldr r2, [r7, #40] ; 0x28
800e864: 645a str r2, [r3, #68] ; 0x44
pxNewTCB->uxMutexesHeld = 0;
800e866: 6b3b ldr r3, [r7, #48] ; 0x30
800e868: 2200 movs r2, #0
800e86a: 649a str r2, [r3, #72] ; 0x48
}
#endif /* configUSE_MUTEXES */
vListInitialiseItem( &( pxNewTCB->xStateListItem ) );
800e86c: 6b3b ldr r3, [r7, #48] ; 0x30
800e86e: 3304 adds r3, #4
800e870: 4618 mov r0, r3
800e872: f7fe fe91 bl 800d598 <vListInitialiseItem>
vListInitialiseItem( &( pxNewTCB->xEventListItem ) );
800e876: 6b3b ldr r3, [r7, #48] ; 0x30
800e878: 3318 adds r3, #24
800e87a: 4618 mov r0, r3
800e87c: f7fe fe8c bl 800d598 <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 );
800e880: 6b3b ldr r3, [r7, #48] ; 0x30
800e882: 6b3a ldr r2, [r7, #48] ; 0x30
800e884: 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. */
800e886: 6abb ldr r3, [r7, #40] ; 0x28
800e888: f1c3 0207 rsb r2, r3, #7
800e88c: 6b3b ldr r3, [r7, #48] ; 0x30
800e88e: 619a str r2, [r3, #24]
listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB );
800e890: 6b3b ldr r3, [r7, #48] ; 0x30
800e892: 6b3a ldr r2, [r7, #48] ; 0x30
800e894: 625a str r2, [r3, #36] ; 0x24
}
#endif /* portCRITICAL_NESTING_IN_TCB */
#if ( configUSE_APPLICATION_TASK_TAG == 1 )
{
pxNewTCB->pxTaskTag = NULL;
800e896: 6b3b ldr r3, [r7, #48] ; 0x30
800e898: 2200 movs r2, #0
800e89a: 64da str r2, [r3, #76] ; 0x4c
}
#endif
#if ( configUSE_TASK_NOTIFICATIONS == 1 )
{
pxNewTCB->ulNotifiedValue = 0;
800e89c: 6b3b ldr r3, [r7, #48] ; 0x30
800e89e: 2200 movs r2, #0
800e8a0: 651a str r2, [r3, #80] ; 0x50
pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION;
800e8a2: 6b3b ldr r3, [r7, #48] ; 0x30
800e8a4: 2200 movs r2, #0
800e8a6: f883 2054 strb.w r2, [r3, #84] ; 0x54
}
#endif /* portSTACK_GROWTH */
}
#else /* portHAS_STACK_OVERFLOW_CHECKING */
{
pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters );
800e8aa: 683a ldr r2, [r7, #0]
800e8ac: 68f9 ldr r1, [r7, #12]
800e8ae: 69b8 ldr r0, [r7, #24]
800e8b0: f000 ffbc bl 800f82c <pxPortInitialiseStack>
800e8b4: 4602 mov r2, r0
800e8b6: 6b3b ldr r3, [r7, #48] ; 0x30
800e8b8: 601a str r2, [r3, #0]
}
#endif /* portHAS_STACK_OVERFLOW_CHECKING */
}
#endif /* portUSING_MPU_WRAPPERS */
if( pxCreatedTask != NULL )
800e8ba: 6afb ldr r3, [r7, #44] ; 0x2c
800e8bc: 2b00 cmp r3, #0
800e8be: d002 beq.n 800e8c6 <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;
800e8c0: 6afb ldr r3, [r7, #44] ; 0x2c
800e8c2: 6b3a ldr r2, [r7, #48] ; 0x30
800e8c4: 601a str r2, [r3, #0]
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800e8c6: bf00 nop
800e8c8: 3720 adds r7, #32
800e8ca: 46bd mov sp, r7
800e8cc: bd80 pop {r7, pc}
...
0800e8d0 <prvAddNewTaskToReadyList>:
/*-----------------------------------------------------------*/
static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
{
800e8d0: b580 push {r7, lr}
800e8d2: b082 sub sp, #8
800e8d4: af00 add r7, sp, #0
800e8d6: 6078 str r0, [r7, #4]
/* Ensure interrupts don't access the task lists while the lists are being
updated. */
taskENTER_CRITICAL();
800e8d8: f001 f8ae bl 800fa38 <vPortEnterCritical>
{
uxCurrentNumberOfTasks++;
800e8dc: 4b2a ldr r3, [pc, #168] ; (800e988 <prvAddNewTaskToReadyList+0xb8>)
800e8de: 681b ldr r3, [r3, #0]
800e8e0: 3301 adds r3, #1
800e8e2: 4a29 ldr r2, [pc, #164] ; (800e988 <prvAddNewTaskToReadyList+0xb8>)
800e8e4: 6013 str r3, [r2, #0]
if( pxCurrentTCB == NULL )
800e8e6: 4b29 ldr r3, [pc, #164] ; (800e98c <prvAddNewTaskToReadyList+0xbc>)
800e8e8: 681b ldr r3, [r3, #0]
800e8ea: 2b00 cmp r3, #0
800e8ec: d109 bne.n 800e902 <prvAddNewTaskToReadyList+0x32>
{
/* There are no other tasks, or all the other tasks are in
the suspended state - make this the current task. */
pxCurrentTCB = pxNewTCB;
800e8ee: 4a27 ldr r2, [pc, #156] ; (800e98c <prvAddNewTaskToReadyList+0xbc>)
800e8f0: 687b ldr r3, [r7, #4]
800e8f2: 6013 str r3, [r2, #0]
if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 )
800e8f4: 4b24 ldr r3, [pc, #144] ; (800e988 <prvAddNewTaskToReadyList+0xb8>)
800e8f6: 681b ldr r3, [r3, #0]
800e8f8: 2b01 cmp r3, #1
800e8fa: d110 bne.n 800e91e <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();
800e8fc: f000 fc9e bl 800f23c <prvInitialiseTaskLists>
800e900: e00d b.n 800e91e <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 )
800e902: 4b23 ldr r3, [pc, #140] ; (800e990 <prvAddNewTaskToReadyList+0xc0>)
800e904: 681b ldr r3, [r3, #0]
800e906: 2b00 cmp r3, #0
800e908: d109 bne.n 800e91e <prvAddNewTaskToReadyList+0x4e>
{
if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority )
800e90a: 4b20 ldr r3, [pc, #128] ; (800e98c <prvAddNewTaskToReadyList+0xbc>)
800e90c: 681b ldr r3, [r3, #0]
800e90e: 6ada ldr r2, [r3, #44] ; 0x2c
800e910: 687b ldr r3, [r7, #4]
800e912: 6adb ldr r3, [r3, #44] ; 0x2c
800e914: 429a cmp r2, r3
800e916: d802 bhi.n 800e91e <prvAddNewTaskToReadyList+0x4e>
{
pxCurrentTCB = pxNewTCB;
800e918: 4a1c ldr r2, [pc, #112] ; (800e98c <prvAddNewTaskToReadyList+0xbc>)
800e91a: 687b ldr r3, [r7, #4]
800e91c: 6013 str r3, [r2, #0]
{
mtCOVERAGE_TEST_MARKER();
}
}
uxTaskNumber++;
800e91e: 4b1d ldr r3, [pc, #116] ; (800e994 <prvAddNewTaskToReadyList+0xc4>)
800e920: 681b ldr r3, [r3, #0]
800e922: 3301 adds r3, #1
800e924: 4a1b ldr r2, [pc, #108] ; (800e994 <prvAddNewTaskToReadyList+0xc4>)
800e926: 6013 str r3, [r2, #0]
pxNewTCB->uxTCBNumber = uxTaskNumber;
}
#endif /* configUSE_TRACE_FACILITY */
traceTASK_CREATE( pxNewTCB );
prvAddTaskToReadyList( pxNewTCB );
800e928: 687b ldr r3, [r7, #4]
800e92a: 6adb ldr r3, [r3, #44] ; 0x2c
800e92c: 2201 movs r2, #1
800e92e: 409a lsls r2, r3
800e930: 4b19 ldr r3, [pc, #100] ; (800e998 <prvAddNewTaskToReadyList+0xc8>)
800e932: 681b ldr r3, [r3, #0]
800e934: 4313 orrs r3, r2
800e936: 4a18 ldr r2, [pc, #96] ; (800e998 <prvAddNewTaskToReadyList+0xc8>)
800e938: 6013 str r3, [r2, #0]
800e93a: 687b ldr r3, [r7, #4]
800e93c: 6ada ldr r2, [r3, #44] ; 0x2c
800e93e: 4613 mov r3, r2
800e940: 009b lsls r3, r3, #2
800e942: 4413 add r3, r2
800e944: 009b lsls r3, r3, #2
800e946: 4a15 ldr r2, [pc, #84] ; (800e99c <prvAddNewTaskToReadyList+0xcc>)
800e948: 441a add r2, r3
800e94a: 687b ldr r3, [r7, #4]
800e94c: 3304 adds r3, #4
800e94e: 4619 mov r1, r3
800e950: 4610 mov r0, r2
800e952: f7fe fe2e bl 800d5b2 <vListInsertEnd>
portSETUP_TCB( pxNewTCB );
}
taskEXIT_CRITICAL();
800e956: f001 f8a1 bl 800fa9c <vPortExitCritical>
if( xSchedulerRunning != pdFALSE )
800e95a: 4b0d ldr r3, [pc, #52] ; (800e990 <prvAddNewTaskToReadyList+0xc0>)
800e95c: 681b ldr r3, [r3, #0]
800e95e: 2b00 cmp r3, #0
800e960: d00e beq.n 800e980 <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 )
800e962: 4b0a ldr r3, [pc, #40] ; (800e98c <prvAddNewTaskToReadyList+0xbc>)
800e964: 681b ldr r3, [r3, #0]
800e966: 6ada ldr r2, [r3, #44] ; 0x2c
800e968: 687b ldr r3, [r7, #4]
800e96a: 6adb ldr r3, [r3, #44] ; 0x2c
800e96c: 429a cmp r2, r3
800e96e: d207 bcs.n 800e980 <prvAddNewTaskToReadyList+0xb0>
{
taskYIELD_IF_USING_PREEMPTION();
800e970: 4b0b ldr r3, [pc, #44] ; (800e9a0 <prvAddNewTaskToReadyList+0xd0>)
800e972: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800e976: 601a str r2, [r3, #0]
800e978: f3bf 8f4f dsb sy
800e97c: f3bf 8f6f isb sy
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800e980: bf00 nop
800e982: 3708 adds r7, #8
800e984: 46bd mov sp, r7
800e986: bd80 pop {r7, pc}
800e988: 20000678 .word 0x20000678
800e98c: 20000578 .word 0x20000578
800e990: 20000684 .word 0x20000684
800e994: 20000694 .word 0x20000694
800e998: 20000680 .word 0x20000680
800e99c: 2000057c .word 0x2000057c
800e9a0: e000ed04 .word 0xe000ed04
0800e9a4 <vTaskDelayUntil>:
/*-----------------------------------------------------------*/
#if ( INCLUDE_vTaskDelayUntil == 1 )
void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement )
{
800e9a4: b580 push {r7, lr}
800e9a6: b08a sub sp, #40 ; 0x28
800e9a8: af00 add r7, sp, #0
800e9aa: 6078 str r0, [r7, #4]
800e9ac: 6039 str r1, [r7, #0]
TickType_t xTimeToWake;
BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE;
800e9ae: 2300 movs r3, #0
800e9b0: 627b str r3, [r7, #36] ; 0x24
configASSERT( pxPreviousWakeTime );
800e9b2: 687b ldr r3, [r7, #4]
800e9b4: 2b00 cmp r3, #0
800e9b6: d10b bne.n 800e9d0 <vTaskDelayUntil+0x2c>
800e9b8: f04f 0350 mov.w r3, #80 ; 0x50
800e9bc: b672 cpsid i
800e9be: f383 8811 msr BASEPRI, r3
800e9c2: f3bf 8f6f isb sy
800e9c6: f3bf 8f4f dsb sy
800e9ca: b662 cpsie i
800e9cc: 617b str r3, [r7, #20]
800e9ce: e7fe b.n 800e9ce <vTaskDelayUntil+0x2a>
configASSERT( ( xTimeIncrement > 0U ) );
800e9d0: 683b ldr r3, [r7, #0]
800e9d2: 2b00 cmp r3, #0
800e9d4: d10b bne.n 800e9ee <vTaskDelayUntil+0x4a>
800e9d6: f04f 0350 mov.w r3, #80 ; 0x50
800e9da: b672 cpsid i
800e9dc: f383 8811 msr BASEPRI, r3
800e9e0: f3bf 8f6f isb sy
800e9e4: f3bf 8f4f dsb sy
800e9e8: b662 cpsie i
800e9ea: 613b str r3, [r7, #16]
800e9ec: e7fe b.n 800e9ec <vTaskDelayUntil+0x48>
configASSERT( uxSchedulerSuspended == 0 );
800e9ee: 4b2a ldr r3, [pc, #168] ; (800ea98 <vTaskDelayUntil+0xf4>)
800e9f0: 681b ldr r3, [r3, #0]
800e9f2: 2b00 cmp r3, #0
800e9f4: d00b beq.n 800ea0e <vTaskDelayUntil+0x6a>
800e9f6: f04f 0350 mov.w r3, #80 ; 0x50
800e9fa: b672 cpsid i
800e9fc: f383 8811 msr BASEPRI, r3
800ea00: f3bf 8f6f isb sy
800ea04: f3bf 8f4f dsb sy
800ea08: b662 cpsie i
800ea0a: 60fb str r3, [r7, #12]
800ea0c: e7fe b.n 800ea0c <vTaskDelayUntil+0x68>
vTaskSuspendAll();
800ea0e: f000 f8e1 bl 800ebd4 <vTaskSuspendAll>
{
/* Minor optimisation. The tick count cannot change in this
block. */
const TickType_t xConstTickCount = xTickCount;
800ea12: 4b22 ldr r3, [pc, #136] ; (800ea9c <vTaskDelayUntil+0xf8>)
800ea14: 681b ldr r3, [r3, #0]
800ea16: 623b str r3, [r7, #32]
/* Generate the tick time at which the task wants to wake. */
xTimeToWake = *pxPreviousWakeTime + xTimeIncrement;
800ea18: 687b ldr r3, [r7, #4]
800ea1a: 681b ldr r3, [r3, #0]
800ea1c: 683a ldr r2, [r7, #0]
800ea1e: 4413 add r3, r2
800ea20: 61fb str r3, [r7, #28]
if( xConstTickCount < *pxPreviousWakeTime )
800ea22: 687b ldr r3, [r7, #4]
800ea24: 681b ldr r3, [r3, #0]
800ea26: 6a3a ldr r2, [r7, #32]
800ea28: 429a cmp r2, r3
800ea2a: d20b bcs.n 800ea44 <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 ) )
800ea2c: 687b ldr r3, [r7, #4]
800ea2e: 681b ldr r3, [r3, #0]
800ea30: 69fa ldr r2, [r7, #28]
800ea32: 429a cmp r2, r3
800ea34: d211 bcs.n 800ea5a <vTaskDelayUntil+0xb6>
800ea36: 69fa ldr r2, [r7, #28]
800ea38: 6a3b ldr r3, [r7, #32]
800ea3a: 429a cmp r2, r3
800ea3c: d90d bls.n 800ea5a <vTaskDelayUntil+0xb6>
{
xShouldDelay = pdTRUE;
800ea3e: 2301 movs r3, #1
800ea40: 627b str r3, [r7, #36] ; 0x24
800ea42: e00a b.n 800ea5a <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 ) )
800ea44: 687b ldr r3, [r7, #4]
800ea46: 681b ldr r3, [r3, #0]
800ea48: 69fa ldr r2, [r7, #28]
800ea4a: 429a cmp r2, r3
800ea4c: d303 bcc.n 800ea56 <vTaskDelayUntil+0xb2>
800ea4e: 69fa ldr r2, [r7, #28]
800ea50: 6a3b ldr r3, [r7, #32]
800ea52: 429a cmp r2, r3
800ea54: d901 bls.n 800ea5a <vTaskDelayUntil+0xb6>
{
xShouldDelay = pdTRUE;
800ea56: 2301 movs r3, #1
800ea58: 627b str r3, [r7, #36] ; 0x24
mtCOVERAGE_TEST_MARKER();
}
}
/* Update the wake time ready for the next call. */
*pxPreviousWakeTime = xTimeToWake;
800ea5a: 687b ldr r3, [r7, #4]
800ea5c: 69fa ldr r2, [r7, #28]
800ea5e: 601a str r2, [r3, #0]
if( xShouldDelay != pdFALSE )
800ea60: 6a7b ldr r3, [r7, #36] ; 0x24
800ea62: 2b00 cmp r3, #0
800ea64: d006 beq.n 800ea74 <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 );
800ea66: 69fa ldr r2, [r7, #28]
800ea68: 6a3b ldr r3, [r7, #32]
800ea6a: 1ad3 subs r3, r2, r3
800ea6c: 2100 movs r1, #0
800ea6e: 4618 mov r0, r3
800ea70: f000 fe76 bl 800f760 <prvAddCurrentTaskToDelayedList>
else
{
mtCOVERAGE_TEST_MARKER();
}
}
xAlreadyYielded = xTaskResumeAll();
800ea74: f000 f8bc bl 800ebf0 <xTaskResumeAll>
800ea78: 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 )
800ea7a: 69bb ldr r3, [r7, #24]
800ea7c: 2b00 cmp r3, #0
800ea7e: d107 bne.n 800ea90 <vTaskDelayUntil+0xec>
{
portYIELD_WITHIN_API();
800ea80: 4b07 ldr r3, [pc, #28] ; (800eaa0 <vTaskDelayUntil+0xfc>)
800ea82: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800ea86: 601a str r2, [r3, #0]
800ea88: f3bf 8f4f dsb sy
800ea8c: f3bf 8f6f isb sy
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800ea90: bf00 nop
800ea92: 3728 adds r7, #40 ; 0x28
800ea94: 46bd mov sp, r7
800ea96: bd80 pop {r7, pc}
800ea98: 200006a0 .word 0x200006a0
800ea9c: 2000067c .word 0x2000067c
800eaa0: e000ed04 .word 0xe000ed04
0800eaa4 <vTaskDelay>:
/*-----------------------------------------------------------*/
#if ( INCLUDE_vTaskDelay == 1 )
void vTaskDelay( const TickType_t xTicksToDelay )
{
800eaa4: b580 push {r7, lr}
800eaa6: b084 sub sp, #16
800eaa8: af00 add r7, sp, #0
800eaaa: 6078 str r0, [r7, #4]
BaseType_t xAlreadyYielded = pdFALSE;
800eaac: 2300 movs r3, #0
800eaae: 60fb str r3, [r7, #12]
/* A delay time of zero just forces a reschedule. */
if( xTicksToDelay > ( TickType_t ) 0U )
800eab0: 687b ldr r3, [r7, #4]
800eab2: 2b00 cmp r3, #0
800eab4: d018 beq.n 800eae8 <vTaskDelay+0x44>
{
configASSERT( uxSchedulerSuspended == 0 );
800eab6: 4b14 ldr r3, [pc, #80] ; (800eb08 <vTaskDelay+0x64>)
800eab8: 681b ldr r3, [r3, #0]
800eaba: 2b00 cmp r3, #0
800eabc: d00b beq.n 800ead6 <vTaskDelay+0x32>
800eabe: f04f 0350 mov.w r3, #80 ; 0x50
800eac2: b672 cpsid i
800eac4: f383 8811 msr BASEPRI, r3
800eac8: f3bf 8f6f isb sy
800eacc: f3bf 8f4f dsb sy
800ead0: b662 cpsie i
800ead2: 60bb str r3, [r7, #8]
800ead4: e7fe b.n 800ead4 <vTaskDelay+0x30>
vTaskSuspendAll();
800ead6: f000 f87d bl 800ebd4 <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 );
800eada: 2100 movs r1, #0
800eadc: 6878 ldr r0, [r7, #4]
800eade: f000 fe3f bl 800f760 <prvAddCurrentTaskToDelayedList>
}
xAlreadyYielded = xTaskResumeAll();
800eae2: f000 f885 bl 800ebf0 <xTaskResumeAll>
800eae6: 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 )
800eae8: 68fb ldr r3, [r7, #12]
800eaea: 2b00 cmp r3, #0
800eaec: d107 bne.n 800eafe <vTaskDelay+0x5a>
{
portYIELD_WITHIN_API();
800eaee: 4b07 ldr r3, [pc, #28] ; (800eb0c <vTaskDelay+0x68>)
800eaf0: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800eaf4: 601a str r2, [r3, #0]
800eaf6: f3bf 8f4f dsb sy
800eafa: f3bf 8f6f isb sy
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800eafe: bf00 nop
800eb00: 3710 adds r7, #16
800eb02: 46bd mov sp, r7
800eb04: bd80 pop {r7, pc}
800eb06: bf00 nop
800eb08: 200006a0 .word 0x200006a0
800eb0c: e000ed04 .word 0xe000ed04
0800eb10 <vTaskStartScheduler>:
#endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */
/*-----------------------------------------------------------*/
void vTaskStartScheduler( void )
{
800eb10: b580 push {r7, lr}
800eb12: b08a sub sp, #40 ; 0x28
800eb14: 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;
800eb16: 2300 movs r3, #0
800eb18: 60bb str r3, [r7, #8]
StackType_t *pxIdleTaskStackBuffer = NULL;
800eb1a: 2300 movs r3, #0
800eb1c: 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 );
800eb1e: 463a mov r2, r7
800eb20: 1d39 adds r1, r7, #4
800eb22: f107 0308 add.w r3, r7, #8
800eb26: 4618 mov r0, r3
800eb28: f7f1 fd5c bl 80005e4 <vApplicationGetIdleTaskMemory>
xIdleTaskHandle = xTaskCreateStatic( prvIdleTask,
800eb2c: 6839 ldr r1, [r7, #0]
800eb2e: 687b ldr r3, [r7, #4]
800eb30: 68ba ldr r2, [r7, #8]
800eb32: 9202 str r2, [sp, #8]
800eb34: 9301 str r3, [sp, #4]
800eb36: 2300 movs r3, #0
800eb38: 9300 str r3, [sp, #0]
800eb3a: 2300 movs r3, #0
800eb3c: 460a mov r2, r1
800eb3e: 491f ldr r1, [pc, #124] ; (800ebbc <vTaskStartScheduler+0xac>)
800eb40: 481f ldr r0, [pc, #124] ; (800ebc0 <vTaskStartScheduler+0xb0>)
800eb42: f7ff fd8c bl 800e65e <xTaskCreateStatic>
800eb46: 4602 mov r2, r0
800eb48: 4b1e ldr r3, [pc, #120] ; (800ebc4 <vTaskStartScheduler+0xb4>)
800eb4a: 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 )
800eb4c: 4b1d ldr r3, [pc, #116] ; (800ebc4 <vTaskStartScheduler+0xb4>)
800eb4e: 681b ldr r3, [r3, #0]
800eb50: 2b00 cmp r3, #0
800eb52: d002 beq.n 800eb5a <vTaskStartScheduler+0x4a>
{
xReturn = pdPASS;
800eb54: 2301 movs r3, #1
800eb56: 617b str r3, [r7, #20]
800eb58: e001 b.n 800eb5e <vTaskStartScheduler+0x4e>
}
else
{
xReturn = pdFAIL;
800eb5a: 2300 movs r3, #0
800eb5c: 617b str r3, [r7, #20]
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_TIMERS */
if( xReturn == pdPASS )
800eb5e: 697b ldr r3, [r7, #20]
800eb60: 2b01 cmp r3, #1
800eb62: d117 bne.n 800eb94 <vTaskStartScheduler+0x84>
800eb64: f04f 0350 mov.w r3, #80 ; 0x50
800eb68: b672 cpsid i
800eb6a: f383 8811 msr BASEPRI, r3
800eb6e: f3bf 8f6f isb sy
800eb72: f3bf 8f4f dsb sy
800eb76: b662 cpsie i
800eb78: 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;
800eb7a: 4b13 ldr r3, [pc, #76] ; (800ebc8 <vTaskStartScheduler+0xb8>)
800eb7c: f04f 32ff mov.w r2, #4294967295
800eb80: 601a str r2, [r3, #0]
xSchedulerRunning = pdTRUE;
800eb82: 4b12 ldr r3, [pc, #72] ; (800ebcc <vTaskStartScheduler+0xbc>)
800eb84: 2201 movs r2, #1
800eb86: 601a str r2, [r3, #0]
xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT;
800eb88: 4b11 ldr r3, [pc, #68] ; (800ebd0 <vTaskStartScheduler+0xc0>)
800eb8a: 2200 movs r2, #0
800eb8c: 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 )
800eb8e: f000 fed7 bl 800f940 <xPortStartScheduler>
}
/* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0,
meaning xIdleTaskHandle is not used anywhere else. */
( void ) xIdleTaskHandle;
}
800eb92: e00f b.n 800ebb4 <vTaskStartScheduler+0xa4>
configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY );
800eb94: 697b ldr r3, [r7, #20]
800eb96: f1b3 3fff cmp.w r3, #4294967295
800eb9a: d10b bne.n 800ebb4 <vTaskStartScheduler+0xa4>
800eb9c: f04f 0350 mov.w r3, #80 ; 0x50
800eba0: b672 cpsid i
800eba2: f383 8811 msr BASEPRI, r3
800eba6: f3bf 8f6f isb sy
800ebaa: f3bf 8f4f dsb sy
800ebae: b662 cpsie i
800ebb0: 60fb str r3, [r7, #12]
800ebb2: e7fe b.n 800ebb2 <vTaskStartScheduler+0xa2>
}
800ebb4: bf00 nop
800ebb6: 3718 adds r7, #24
800ebb8: 46bd mov sp, r7
800ebba: bd80 pop {r7, pc}
800ebbc: 0801d84c .word 0x0801d84c
800ebc0: 0800f209 .word 0x0800f209
800ebc4: 2000069c .word 0x2000069c
800ebc8: 20000698 .word 0x20000698
800ebcc: 20000684 .word 0x20000684
800ebd0: 2000067c .word 0x2000067c
0800ebd4 <vTaskSuspendAll>:
vPortEndScheduler();
}
/*----------------------------------------------------------*/
void vTaskSuspendAll( void )
{
800ebd4: b480 push {r7}
800ebd6: 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;
800ebd8: 4b04 ldr r3, [pc, #16] ; (800ebec <vTaskSuspendAll+0x18>)
800ebda: 681b ldr r3, [r3, #0]
800ebdc: 3301 adds r3, #1
800ebde: 4a03 ldr r2, [pc, #12] ; (800ebec <vTaskSuspendAll+0x18>)
800ebe0: 6013 str r3, [r2, #0]
portMEMORY_BARRIER();
}
800ebe2: bf00 nop
800ebe4: 46bd mov sp, r7
800ebe6: f85d 7b04 ldr.w r7, [sp], #4
800ebea: 4770 bx lr
800ebec: 200006a0 .word 0x200006a0
0800ebf0 <xTaskResumeAll>:
#endif /* configUSE_TICKLESS_IDLE */
/*----------------------------------------------------------*/
BaseType_t xTaskResumeAll( void )
{
800ebf0: b580 push {r7, lr}
800ebf2: b084 sub sp, #16
800ebf4: af00 add r7, sp, #0
TCB_t *pxTCB = NULL;
800ebf6: 2300 movs r3, #0
800ebf8: 60fb str r3, [r7, #12]
BaseType_t xAlreadyYielded = pdFALSE;
800ebfa: 2300 movs r3, #0
800ebfc: 60bb str r3, [r7, #8]
/* If uxSchedulerSuspended is zero then this function does not match a
previous call to vTaskSuspendAll(). */
configASSERT( uxSchedulerSuspended );
800ebfe: 4b42 ldr r3, [pc, #264] ; (800ed08 <xTaskResumeAll+0x118>)
800ec00: 681b ldr r3, [r3, #0]
800ec02: 2b00 cmp r3, #0
800ec04: d10b bne.n 800ec1e <xTaskResumeAll+0x2e>
800ec06: f04f 0350 mov.w r3, #80 ; 0x50
800ec0a: b672 cpsid i
800ec0c: f383 8811 msr BASEPRI, r3
800ec10: f3bf 8f6f isb sy
800ec14: f3bf 8f4f dsb sy
800ec18: b662 cpsie i
800ec1a: 603b str r3, [r7, #0]
800ec1c: e7fe b.n 800ec1c <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();
800ec1e: f000 ff0b bl 800fa38 <vPortEnterCritical>
{
--uxSchedulerSuspended;
800ec22: 4b39 ldr r3, [pc, #228] ; (800ed08 <xTaskResumeAll+0x118>)
800ec24: 681b ldr r3, [r3, #0]
800ec26: 3b01 subs r3, #1
800ec28: 4a37 ldr r2, [pc, #220] ; (800ed08 <xTaskResumeAll+0x118>)
800ec2a: 6013 str r3, [r2, #0]
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
800ec2c: 4b36 ldr r3, [pc, #216] ; (800ed08 <xTaskResumeAll+0x118>)
800ec2e: 681b ldr r3, [r3, #0]
800ec30: 2b00 cmp r3, #0
800ec32: d161 bne.n 800ecf8 <xTaskResumeAll+0x108>
{
if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U )
800ec34: 4b35 ldr r3, [pc, #212] ; (800ed0c <xTaskResumeAll+0x11c>)
800ec36: 681b ldr r3, [r3, #0]
800ec38: 2b00 cmp r3, #0
800ec3a: d05d beq.n 800ecf8 <xTaskResumeAll+0x108>
{
/* Move any readied tasks from the pending list into the
appropriate ready list. */
while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
800ec3c: e02e b.n 800ec9c <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. */
800ec3e: 4b34 ldr r3, [pc, #208] ; (800ed10 <xTaskResumeAll+0x120>)
800ec40: 68db ldr r3, [r3, #12]
800ec42: 68db ldr r3, [r3, #12]
800ec44: 60fb str r3, [r7, #12]
( void ) uxListRemove( &( pxTCB->xEventListItem ) );
800ec46: 68fb ldr r3, [r7, #12]
800ec48: 3318 adds r3, #24
800ec4a: 4618 mov r0, r3
800ec4c: f7fe fd0e bl 800d66c <uxListRemove>
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
800ec50: 68fb ldr r3, [r7, #12]
800ec52: 3304 adds r3, #4
800ec54: 4618 mov r0, r3
800ec56: f7fe fd09 bl 800d66c <uxListRemove>
prvAddTaskToReadyList( pxTCB );
800ec5a: 68fb ldr r3, [r7, #12]
800ec5c: 6adb ldr r3, [r3, #44] ; 0x2c
800ec5e: 2201 movs r2, #1
800ec60: 409a lsls r2, r3
800ec62: 4b2c ldr r3, [pc, #176] ; (800ed14 <xTaskResumeAll+0x124>)
800ec64: 681b ldr r3, [r3, #0]
800ec66: 4313 orrs r3, r2
800ec68: 4a2a ldr r2, [pc, #168] ; (800ed14 <xTaskResumeAll+0x124>)
800ec6a: 6013 str r3, [r2, #0]
800ec6c: 68fb ldr r3, [r7, #12]
800ec6e: 6ada ldr r2, [r3, #44] ; 0x2c
800ec70: 4613 mov r3, r2
800ec72: 009b lsls r3, r3, #2
800ec74: 4413 add r3, r2
800ec76: 009b lsls r3, r3, #2
800ec78: 4a27 ldr r2, [pc, #156] ; (800ed18 <xTaskResumeAll+0x128>)
800ec7a: 441a add r2, r3
800ec7c: 68fb ldr r3, [r7, #12]
800ec7e: 3304 adds r3, #4
800ec80: 4619 mov r1, r3
800ec82: 4610 mov r0, r2
800ec84: f7fe fc95 bl 800d5b2 <vListInsertEnd>
/* If the moved task has a priority higher than the current
task then a yield must be performed. */
if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
800ec88: 68fb ldr r3, [r7, #12]
800ec8a: 6ada ldr r2, [r3, #44] ; 0x2c
800ec8c: 4b23 ldr r3, [pc, #140] ; (800ed1c <xTaskResumeAll+0x12c>)
800ec8e: 681b ldr r3, [r3, #0]
800ec90: 6adb ldr r3, [r3, #44] ; 0x2c
800ec92: 429a cmp r2, r3
800ec94: d302 bcc.n 800ec9c <xTaskResumeAll+0xac>
{
xYieldPending = pdTRUE;
800ec96: 4b22 ldr r3, [pc, #136] ; (800ed20 <xTaskResumeAll+0x130>)
800ec98: 2201 movs r2, #1
800ec9a: 601a str r2, [r3, #0]
while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
800ec9c: 4b1c ldr r3, [pc, #112] ; (800ed10 <xTaskResumeAll+0x120>)
800ec9e: 681b ldr r3, [r3, #0]
800eca0: 2b00 cmp r3, #0
800eca2: d1cc bne.n 800ec3e <xTaskResumeAll+0x4e>
{
mtCOVERAGE_TEST_MARKER();
}
}
if( pxTCB != NULL )
800eca4: 68fb ldr r3, [r7, #12]
800eca6: 2b00 cmp r3, #0
800eca8: d001 beq.n 800ecae <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();
800ecaa: f000 fb63 bl 800f374 <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. */
800ecae: 4b1d ldr r3, [pc, #116] ; (800ed24 <xTaskResumeAll+0x134>)
800ecb0: 681b ldr r3, [r3, #0]
800ecb2: 607b str r3, [r7, #4]
if( uxPendedCounts > ( UBaseType_t ) 0U )
800ecb4: 687b ldr r3, [r7, #4]
800ecb6: 2b00 cmp r3, #0
800ecb8: d010 beq.n 800ecdc <xTaskResumeAll+0xec>
{
do
{
if( xTaskIncrementTick() != pdFALSE )
800ecba: f000 f859 bl 800ed70 <xTaskIncrementTick>
800ecbe: 4603 mov r3, r0
800ecc0: 2b00 cmp r3, #0
800ecc2: d002 beq.n 800ecca <xTaskResumeAll+0xda>
{
xYieldPending = pdTRUE;
800ecc4: 4b16 ldr r3, [pc, #88] ; (800ed20 <xTaskResumeAll+0x130>)
800ecc6: 2201 movs r2, #1
800ecc8: 601a str r2, [r3, #0]
}
else
{
mtCOVERAGE_TEST_MARKER();
}
--uxPendedCounts;
800ecca: 687b ldr r3, [r7, #4]
800eccc: 3b01 subs r3, #1
800ecce: 607b str r3, [r7, #4]
} while( uxPendedCounts > ( UBaseType_t ) 0U );
800ecd0: 687b ldr r3, [r7, #4]
800ecd2: 2b00 cmp r3, #0
800ecd4: d1f1 bne.n 800ecba <xTaskResumeAll+0xca>
uxPendedTicks = 0;
800ecd6: 4b13 ldr r3, [pc, #76] ; (800ed24 <xTaskResumeAll+0x134>)
800ecd8: 2200 movs r2, #0
800ecda: 601a str r2, [r3, #0]
{
mtCOVERAGE_TEST_MARKER();
}
}
if( xYieldPending != pdFALSE )
800ecdc: 4b10 ldr r3, [pc, #64] ; (800ed20 <xTaskResumeAll+0x130>)
800ecde: 681b ldr r3, [r3, #0]
800ece0: 2b00 cmp r3, #0
800ece2: d009 beq.n 800ecf8 <xTaskResumeAll+0x108>
{
#if( configUSE_PREEMPTION != 0 )
{
xAlreadyYielded = pdTRUE;
800ece4: 2301 movs r3, #1
800ece6: 60bb str r3, [r7, #8]
}
#endif
taskYIELD_IF_USING_PREEMPTION();
800ece8: 4b0f ldr r3, [pc, #60] ; (800ed28 <xTaskResumeAll+0x138>)
800ecea: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800ecee: 601a str r2, [r3, #0]
800ecf0: f3bf 8f4f dsb sy
800ecf4: f3bf 8f6f isb sy
else
{
mtCOVERAGE_TEST_MARKER();
}
}
taskEXIT_CRITICAL();
800ecf8: f000 fed0 bl 800fa9c <vPortExitCritical>
return xAlreadyYielded;
800ecfc: 68bb ldr r3, [r7, #8]
}
800ecfe: 4618 mov r0, r3
800ed00: 3710 adds r7, #16
800ed02: 46bd mov sp, r7
800ed04: bd80 pop {r7, pc}
800ed06: bf00 nop
800ed08: 200006a0 .word 0x200006a0
800ed0c: 20000678 .word 0x20000678
800ed10: 20000638 .word 0x20000638
800ed14: 20000680 .word 0x20000680
800ed18: 2000057c .word 0x2000057c
800ed1c: 20000578 .word 0x20000578
800ed20: 2000068c .word 0x2000068c
800ed24: 20000688 .word 0x20000688
800ed28: e000ed04 .word 0xe000ed04
0800ed2c <xTaskGetTickCount>:
/*-----------------------------------------------------------*/
TickType_t xTaskGetTickCount( void )
{
800ed2c: b480 push {r7}
800ed2e: b083 sub sp, #12
800ed30: af00 add r7, sp, #0
TickType_t xTicks;
/* Critical section required if running on a 16 bit processor. */
portTICK_TYPE_ENTER_CRITICAL();
{
xTicks = xTickCount;
800ed32: 4b05 ldr r3, [pc, #20] ; (800ed48 <xTaskGetTickCount+0x1c>)
800ed34: 681b ldr r3, [r3, #0]
800ed36: 607b str r3, [r7, #4]
}
portTICK_TYPE_EXIT_CRITICAL();
return xTicks;
800ed38: 687b ldr r3, [r7, #4]
}
800ed3a: 4618 mov r0, r3
800ed3c: 370c adds r7, #12
800ed3e: 46bd mov sp, r7
800ed40: f85d 7b04 ldr.w r7, [sp], #4
800ed44: 4770 bx lr
800ed46: bf00 nop
800ed48: 2000067c .word 0x2000067c
0800ed4c <xTaskGetTickCountFromISR>:
/*-----------------------------------------------------------*/
TickType_t xTaskGetTickCountFromISR( void )
{
800ed4c: b580 push {r7, lr}
800ed4e: b082 sub sp, #8
800ed50: 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();
800ed52: f000 ff51 bl 800fbf8 <vPortValidateInterruptPriority>
uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR();
800ed56: 2300 movs r3, #0
800ed58: 607b str r3, [r7, #4]
{
xReturn = xTickCount;
800ed5a: 4b04 ldr r3, [pc, #16] ; (800ed6c <xTaskGetTickCountFromISR+0x20>)
800ed5c: 681b ldr r3, [r3, #0]
800ed5e: 603b str r3, [r7, #0]
}
portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return xReturn;
800ed60: 683b ldr r3, [r7, #0]
}
800ed62: 4618 mov r0, r3
800ed64: 3708 adds r7, #8
800ed66: 46bd mov sp, r7
800ed68: bd80 pop {r7, pc}
800ed6a: bf00 nop
800ed6c: 2000067c .word 0x2000067c
0800ed70 <xTaskIncrementTick>:
#endif /* INCLUDE_xTaskAbortDelay */
/*----------------------------------------------------------*/
BaseType_t xTaskIncrementTick( void )
{
800ed70: b580 push {r7, lr}
800ed72: b086 sub sp, #24
800ed74: af00 add r7, sp, #0
TCB_t * pxTCB;
TickType_t xItemValue;
BaseType_t xSwitchRequired = pdFALSE;
800ed76: 2300 movs r3, #0
800ed78: 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 )
800ed7a: 4b4f ldr r3, [pc, #316] ; (800eeb8 <xTaskIncrementTick+0x148>)
800ed7c: 681b ldr r3, [r3, #0]
800ed7e: 2b00 cmp r3, #0
800ed80: f040 8089 bne.w 800ee96 <xTaskIncrementTick+0x126>
{
/* Minor optimisation. The tick count cannot change in this
block. */
const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1;
800ed84: 4b4d ldr r3, [pc, #308] ; (800eebc <xTaskIncrementTick+0x14c>)
800ed86: 681b ldr r3, [r3, #0]
800ed88: 3301 adds r3, #1
800ed8a: 613b str r3, [r7, #16]
/* Increment the RTOS tick, switching the delayed and overflowed
delayed lists if it wraps to 0. */
xTickCount = xConstTickCount;
800ed8c: 4a4b ldr r2, [pc, #300] ; (800eebc <xTaskIncrementTick+0x14c>)
800ed8e: 693b ldr r3, [r7, #16]
800ed90: 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. */
800ed92: 693b ldr r3, [r7, #16]
800ed94: 2b00 cmp r3, #0
800ed96: d121 bne.n 800eddc <xTaskIncrementTick+0x6c>
{
taskSWITCH_DELAYED_LISTS();
800ed98: 4b49 ldr r3, [pc, #292] ; (800eec0 <xTaskIncrementTick+0x150>)
800ed9a: 681b ldr r3, [r3, #0]
800ed9c: 681b ldr r3, [r3, #0]
800ed9e: 2b00 cmp r3, #0
800eda0: d00b beq.n 800edba <xTaskIncrementTick+0x4a>
800eda2: f04f 0350 mov.w r3, #80 ; 0x50
800eda6: b672 cpsid i
800eda8: f383 8811 msr BASEPRI, r3
800edac: f3bf 8f6f isb sy
800edb0: f3bf 8f4f dsb sy
800edb4: b662 cpsie i
800edb6: 603b str r3, [r7, #0]
800edb8: e7fe b.n 800edb8 <xTaskIncrementTick+0x48>
800edba: 4b41 ldr r3, [pc, #260] ; (800eec0 <xTaskIncrementTick+0x150>)
800edbc: 681b ldr r3, [r3, #0]
800edbe: 60fb str r3, [r7, #12]
800edc0: 4b40 ldr r3, [pc, #256] ; (800eec4 <xTaskIncrementTick+0x154>)
800edc2: 681b ldr r3, [r3, #0]
800edc4: 4a3e ldr r2, [pc, #248] ; (800eec0 <xTaskIncrementTick+0x150>)
800edc6: 6013 str r3, [r2, #0]
800edc8: 4a3e ldr r2, [pc, #248] ; (800eec4 <xTaskIncrementTick+0x154>)
800edca: 68fb ldr r3, [r7, #12]
800edcc: 6013 str r3, [r2, #0]
800edce: 4b3e ldr r3, [pc, #248] ; (800eec8 <xTaskIncrementTick+0x158>)
800edd0: 681b ldr r3, [r3, #0]
800edd2: 3301 adds r3, #1
800edd4: 4a3c ldr r2, [pc, #240] ; (800eec8 <xTaskIncrementTick+0x158>)
800edd6: 6013 str r3, [r2, #0]
800edd8: f000 facc bl 800f374 <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 )
800eddc: 4b3b ldr r3, [pc, #236] ; (800eecc <xTaskIncrementTick+0x15c>)
800edde: 681b ldr r3, [r3, #0]
800ede0: 693a ldr r2, [r7, #16]
800ede2: 429a cmp r2, r3
800ede4: d348 bcc.n 800ee78 <xTaskIncrementTick+0x108>
{
for( ;; )
{
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
800ede6: 4b36 ldr r3, [pc, #216] ; (800eec0 <xTaskIncrementTick+0x150>)
800ede8: 681b ldr r3, [r3, #0]
800edea: 681b ldr r3, [r3, #0]
800edec: 2b00 cmp r3, #0
800edee: d104 bne.n 800edfa <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. */
800edf0: 4b36 ldr r3, [pc, #216] ; (800eecc <xTaskIncrementTick+0x15c>)
800edf2: f04f 32ff mov.w r2, #4294967295
800edf6: 601a str r2, [r3, #0]
break;
800edf8: e03e b.n 800ee78 <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. */
800edfa: 4b31 ldr r3, [pc, #196] ; (800eec0 <xTaskIncrementTick+0x150>)
800edfc: 681b ldr r3, [r3, #0]
800edfe: 68db ldr r3, [r3, #12]
800ee00: 68db ldr r3, [r3, #12]
800ee02: 60bb str r3, [r7, #8]
xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) );
800ee04: 68bb ldr r3, [r7, #8]
800ee06: 685b ldr r3, [r3, #4]
800ee08: 607b str r3, [r7, #4]
if( xConstTickCount < xItemValue )
800ee0a: 693a ldr r2, [r7, #16]
800ee0c: 687b ldr r3, [r7, #4]
800ee0e: 429a cmp r2, r3
800ee10: d203 bcs.n 800ee1a <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;
800ee12: 4a2e ldr r2, [pc, #184] ; (800eecc <xTaskIncrementTick+0x15c>)
800ee14: 687b ldr r3, [r7, #4]
800ee16: 6013 str r3, [r2, #0]
break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */
800ee18: e02e b.n 800ee78 <xTaskIncrementTick+0x108>
{
mtCOVERAGE_TEST_MARKER();
}
/* It is time to remove the item from the Blocked state. */
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
800ee1a: 68bb ldr r3, [r7, #8]
800ee1c: 3304 adds r3, #4
800ee1e: 4618 mov r0, r3
800ee20: f7fe fc24 bl 800d66c <uxListRemove>
/* Is the task waiting on an event also? If so remove
it from the event list. */
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )
800ee24: 68bb ldr r3, [r7, #8]
800ee26: 6a9b ldr r3, [r3, #40] ; 0x28
800ee28: 2b00 cmp r3, #0
800ee2a: d004 beq.n 800ee36 <xTaskIncrementTick+0xc6>
{
( void ) uxListRemove( &( pxTCB->xEventListItem ) );
800ee2c: 68bb ldr r3, [r7, #8]
800ee2e: 3318 adds r3, #24
800ee30: 4618 mov r0, r3
800ee32: f7fe fc1b bl 800d66c <uxListRemove>
mtCOVERAGE_TEST_MARKER();
}
/* Place the unblocked task into the appropriate ready
list. */
prvAddTaskToReadyList( pxTCB );
800ee36: 68bb ldr r3, [r7, #8]
800ee38: 6adb ldr r3, [r3, #44] ; 0x2c
800ee3a: 2201 movs r2, #1
800ee3c: 409a lsls r2, r3
800ee3e: 4b24 ldr r3, [pc, #144] ; (800eed0 <xTaskIncrementTick+0x160>)
800ee40: 681b ldr r3, [r3, #0]
800ee42: 4313 orrs r3, r2
800ee44: 4a22 ldr r2, [pc, #136] ; (800eed0 <xTaskIncrementTick+0x160>)
800ee46: 6013 str r3, [r2, #0]
800ee48: 68bb ldr r3, [r7, #8]
800ee4a: 6ada ldr r2, [r3, #44] ; 0x2c
800ee4c: 4613 mov r3, r2
800ee4e: 009b lsls r3, r3, #2
800ee50: 4413 add r3, r2
800ee52: 009b lsls r3, r3, #2
800ee54: 4a1f ldr r2, [pc, #124] ; (800eed4 <xTaskIncrementTick+0x164>)
800ee56: 441a add r2, r3
800ee58: 68bb ldr r3, [r7, #8]
800ee5a: 3304 adds r3, #4
800ee5c: 4619 mov r1, r3
800ee5e: 4610 mov r0, r2
800ee60: f7fe fba7 bl 800d5b2 <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 )
800ee64: 68bb ldr r3, [r7, #8]
800ee66: 6ada ldr r2, [r3, #44] ; 0x2c
800ee68: 4b1b ldr r3, [pc, #108] ; (800eed8 <xTaskIncrementTick+0x168>)
800ee6a: 681b ldr r3, [r3, #0]
800ee6c: 6adb ldr r3, [r3, #44] ; 0x2c
800ee6e: 429a cmp r2, r3
800ee70: d3b9 bcc.n 800ede6 <xTaskIncrementTick+0x76>
{
xSwitchRequired = pdTRUE;
800ee72: 2301 movs r3, #1
800ee74: 617b str r3, [r7, #20]
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
800ee76: e7b6 b.n 800ede6 <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 )
800ee78: 4b17 ldr r3, [pc, #92] ; (800eed8 <xTaskIncrementTick+0x168>)
800ee7a: 681b ldr r3, [r3, #0]
800ee7c: 6ada ldr r2, [r3, #44] ; 0x2c
800ee7e: 4915 ldr r1, [pc, #84] ; (800eed4 <xTaskIncrementTick+0x164>)
800ee80: 4613 mov r3, r2
800ee82: 009b lsls r3, r3, #2
800ee84: 4413 add r3, r2
800ee86: 009b lsls r3, r3, #2
800ee88: 440b add r3, r1
800ee8a: 681b ldr r3, [r3, #0]
800ee8c: 2b01 cmp r3, #1
800ee8e: d907 bls.n 800eea0 <xTaskIncrementTick+0x130>
{
xSwitchRequired = pdTRUE;
800ee90: 2301 movs r3, #1
800ee92: 617b str r3, [r7, #20]
800ee94: e004 b.n 800eea0 <xTaskIncrementTick+0x130>
}
#endif /* configUSE_TICK_HOOK */
}
else
{
++uxPendedTicks;
800ee96: 4b11 ldr r3, [pc, #68] ; (800eedc <xTaskIncrementTick+0x16c>)
800ee98: 681b ldr r3, [r3, #0]
800ee9a: 3301 adds r3, #1
800ee9c: 4a0f ldr r2, [pc, #60] ; (800eedc <xTaskIncrementTick+0x16c>)
800ee9e: 6013 str r3, [r2, #0]
#endif
}
#if ( configUSE_PREEMPTION == 1 )
{
if( xYieldPending != pdFALSE )
800eea0: 4b0f ldr r3, [pc, #60] ; (800eee0 <xTaskIncrementTick+0x170>)
800eea2: 681b ldr r3, [r3, #0]
800eea4: 2b00 cmp r3, #0
800eea6: d001 beq.n 800eeac <xTaskIncrementTick+0x13c>
{
xSwitchRequired = pdTRUE;
800eea8: 2301 movs r3, #1
800eeaa: 617b str r3, [r7, #20]
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_PREEMPTION */
return xSwitchRequired;
800eeac: 697b ldr r3, [r7, #20]
}
800eeae: 4618 mov r0, r3
800eeb0: 3718 adds r7, #24
800eeb2: 46bd mov sp, r7
800eeb4: bd80 pop {r7, pc}
800eeb6: bf00 nop
800eeb8: 200006a0 .word 0x200006a0
800eebc: 2000067c .word 0x2000067c
800eec0: 20000630 .word 0x20000630
800eec4: 20000634 .word 0x20000634
800eec8: 20000690 .word 0x20000690
800eecc: 20000698 .word 0x20000698
800eed0: 20000680 .word 0x20000680
800eed4: 2000057c .word 0x2000057c
800eed8: 20000578 .word 0x20000578
800eedc: 20000688 .word 0x20000688
800eee0: 2000068c .word 0x2000068c
0800eee4 <vTaskSwitchContext>:
#endif /* configUSE_APPLICATION_TASK_TAG */
/*-----------------------------------------------------------*/
void vTaskSwitchContext( void )
{
800eee4: b580 push {r7, lr}
800eee6: b088 sub sp, #32
800eee8: af00 add r7, sp, #0
if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
800eeea: 4b3a ldr r3, [pc, #232] ; (800efd4 <vTaskSwitchContext+0xf0>)
800eeec: 681b ldr r3, [r3, #0]
800eeee: 2b00 cmp r3, #0
800eef0: d003 beq.n 800eefa <vTaskSwitchContext+0x16>
{
/* The scheduler is currently suspended - do not allow a context
switch. */
xYieldPending = pdTRUE;
800eef2: 4b39 ldr r3, [pc, #228] ; (800efd8 <vTaskSwitchContext+0xf4>)
800eef4: 2201 movs r2, #1
800eef6: 601a str r2, [r3, #0]
structure specific to this task. */
_impure_ptr = &( pxCurrentTCB->xNewLib_reent );
}
#endif /* configUSE_NEWLIB_REENTRANT */
}
}
800eef8: e067 b.n 800efca <vTaskSwitchContext+0xe6>
xYieldPending = pdFALSE;
800eefa: 4b37 ldr r3, [pc, #220] ; (800efd8 <vTaskSwitchContext+0xf4>)
800eefc: 2200 movs r2, #0
800eefe: 601a str r2, [r3, #0]
taskCHECK_FOR_STACK_OVERFLOW();
800ef00: 4b36 ldr r3, [pc, #216] ; (800efdc <vTaskSwitchContext+0xf8>)
800ef02: 681b ldr r3, [r3, #0]
800ef04: 6b1b ldr r3, [r3, #48] ; 0x30
800ef06: 61fb str r3, [r7, #28]
800ef08: f04f 33a5 mov.w r3, #2779096485 ; 0xa5a5a5a5
800ef0c: 61bb str r3, [r7, #24]
800ef0e: 69fb ldr r3, [r7, #28]
800ef10: 681b ldr r3, [r3, #0]
800ef12: 69ba ldr r2, [r7, #24]
800ef14: 429a cmp r2, r3
800ef16: d111 bne.n 800ef3c <vTaskSwitchContext+0x58>
800ef18: 69fb ldr r3, [r7, #28]
800ef1a: 3304 adds r3, #4
800ef1c: 681b ldr r3, [r3, #0]
800ef1e: 69ba ldr r2, [r7, #24]
800ef20: 429a cmp r2, r3
800ef22: d10b bne.n 800ef3c <vTaskSwitchContext+0x58>
800ef24: 69fb ldr r3, [r7, #28]
800ef26: 3308 adds r3, #8
800ef28: 681b ldr r3, [r3, #0]
800ef2a: 69ba ldr r2, [r7, #24]
800ef2c: 429a cmp r2, r3
800ef2e: d105 bne.n 800ef3c <vTaskSwitchContext+0x58>
800ef30: 69fb ldr r3, [r7, #28]
800ef32: 330c adds r3, #12
800ef34: 681b ldr r3, [r3, #0]
800ef36: 69ba ldr r2, [r7, #24]
800ef38: 429a cmp r2, r3
800ef3a: d008 beq.n 800ef4e <vTaskSwitchContext+0x6a>
800ef3c: 4b27 ldr r3, [pc, #156] ; (800efdc <vTaskSwitchContext+0xf8>)
800ef3e: 681a ldr r2, [r3, #0]
800ef40: 4b26 ldr r3, [pc, #152] ; (800efdc <vTaskSwitchContext+0xf8>)
800ef42: 681b ldr r3, [r3, #0]
800ef44: 3334 adds r3, #52 ; 0x34
800ef46: 4619 mov r1, r3
800ef48: 4610 mov r0, r2
800ef4a: f7f1 fb38 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. */
800ef4e: 4b24 ldr r3, [pc, #144] ; (800efe0 <vTaskSwitchContext+0xfc>)
800ef50: 681b ldr r3, [r3, #0]
800ef52: 60fb str r3, [r7, #12]
__asm volatile ( "clz %0, %1" : "=r" ( ucReturn ) : "r" ( ulBitmap ) : "memory" );
800ef54: 68fb ldr r3, [r7, #12]
800ef56: fab3 f383 clz r3, r3
800ef5a: 72fb strb r3, [r7, #11]
return ucReturn;
800ef5c: 7afb ldrb r3, [r7, #11]
800ef5e: f1c3 031f rsb r3, r3, #31
800ef62: 617b str r3, [r7, #20]
800ef64: 491f ldr r1, [pc, #124] ; (800efe4 <vTaskSwitchContext+0x100>)
800ef66: 697a ldr r2, [r7, #20]
800ef68: 4613 mov r3, r2
800ef6a: 009b lsls r3, r3, #2
800ef6c: 4413 add r3, r2
800ef6e: 009b lsls r3, r3, #2
800ef70: 440b add r3, r1
800ef72: 681b ldr r3, [r3, #0]
800ef74: 2b00 cmp r3, #0
800ef76: d10b bne.n 800ef90 <vTaskSwitchContext+0xac>
__asm volatile
800ef78: f04f 0350 mov.w r3, #80 ; 0x50
800ef7c: b672 cpsid i
800ef7e: f383 8811 msr BASEPRI, r3
800ef82: f3bf 8f6f isb sy
800ef86: f3bf 8f4f dsb sy
800ef8a: b662 cpsie i
800ef8c: 607b str r3, [r7, #4]
800ef8e: e7fe b.n 800ef8e <vTaskSwitchContext+0xaa>
800ef90: 697a ldr r2, [r7, #20]
800ef92: 4613 mov r3, r2
800ef94: 009b lsls r3, r3, #2
800ef96: 4413 add r3, r2
800ef98: 009b lsls r3, r3, #2
800ef9a: 4a12 ldr r2, [pc, #72] ; (800efe4 <vTaskSwitchContext+0x100>)
800ef9c: 4413 add r3, r2
800ef9e: 613b str r3, [r7, #16]
800efa0: 693b ldr r3, [r7, #16]
800efa2: 685b ldr r3, [r3, #4]
800efa4: 685a ldr r2, [r3, #4]
800efa6: 693b ldr r3, [r7, #16]
800efa8: 605a str r2, [r3, #4]
800efaa: 693b ldr r3, [r7, #16]
800efac: 685a ldr r2, [r3, #4]
800efae: 693b ldr r3, [r7, #16]
800efb0: 3308 adds r3, #8
800efb2: 429a cmp r2, r3
800efb4: d104 bne.n 800efc0 <vTaskSwitchContext+0xdc>
800efb6: 693b ldr r3, [r7, #16]
800efb8: 685b ldr r3, [r3, #4]
800efba: 685a ldr r2, [r3, #4]
800efbc: 693b ldr r3, [r7, #16]
800efbe: 605a str r2, [r3, #4]
800efc0: 693b ldr r3, [r7, #16]
800efc2: 685b ldr r3, [r3, #4]
800efc4: 68db ldr r3, [r3, #12]
800efc6: 4a05 ldr r2, [pc, #20] ; (800efdc <vTaskSwitchContext+0xf8>)
800efc8: 6013 str r3, [r2, #0]
}
800efca: bf00 nop
800efcc: 3720 adds r7, #32
800efce: 46bd mov sp, r7
800efd0: bd80 pop {r7, pc}
800efd2: bf00 nop
800efd4: 200006a0 .word 0x200006a0
800efd8: 2000068c .word 0x2000068c
800efdc: 20000578 .word 0x20000578
800efe0: 20000680 .word 0x20000680
800efe4: 2000057c .word 0x2000057c
0800efe8 <vTaskPlaceOnEventList>:
/*-----------------------------------------------------------*/
void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait )
{
800efe8: b580 push {r7, lr}
800efea: b084 sub sp, #16
800efec: af00 add r7, sp, #0
800efee: 6078 str r0, [r7, #4]
800eff0: 6039 str r1, [r7, #0]
configASSERT( pxEventList );
800eff2: 687b ldr r3, [r7, #4]
800eff4: 2b00 cmp r3, #0
800eff6: d10b bne.n 800f010 <vTaskPlaceOnEventList+0x28>
800eff8: f04f 0350 mov.w r3, #80 ; 0x50
800effc: b672 cpsid i
800effe: f383 8811 msr BASEPRI, r3
800f002: f3bf 8f6f isb sy
800f006: f3bf 8f4f dsb sy
800f00a: b662 cpsie i
800f00c: 60fb str r3, [r7, #12]
800f00e: e7fe b.n 800f00e <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 ) );
800f010: 4b07 ldr r3, [pc, #28] ; (800f030 <vTaskPlaceOnEventList+0x48>)
800f012: 681b ldr r3, [r3, #0]
800f014: 3318 adds r3, #24
800f016: 4619 mov r1, r3
800f018: 6878 ldr r0, [r7, #4]
800f01a: f7fe faee bl 800d5fa <vListInsert>
prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE );
800f01e: 2101 movs r1, #1
800f020: 6838 ldr r0, [r7, #0]
800f022: f000 fb9d bl 800f760 <prvAddCurrentTaskToDelayedList>
}
800f026: bf00 nop
800f028: 3710 adds r7, #16
800f02a: 46bd mov sp, r7
800f02c: bd80 pop {r7, pc}
800f02e: bf00 nop
800f030: 20000578 .word 0x20000578
0800f034 <xTaskRemoveFromEventList>:
#endif /* configUSE_TIMERS */
/*-----------------------------------------------------------*/
BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
{
800f034: b580 push {r7, lr}
800f036: b086 sub sp, #24
800f038: af00 add r7, sp, #0
800f03a: 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. */
800f03c: 687b ldr r3, [r7, #4]
800f03e: 68db ldr r3, [r3, #12]
800f040: 68db ldr r3, [r3, #12]
800f042: 613b str r3, [r7, #16]
configASSERT( pxUnblockedTCB );
800f044: 693b ldr r3, [r7, #16]
800f046: 2b00 cmp r3, #0
800f048: d10b bne.n 800f062 <xTaskRemoveFromEventList+0x2e>
800f04a: f04f 0350 mov.w r3, #80 ; 0x50
800f04e: b672 cpsid i
800f050: f383 8811 msr BASEPRI, r3
800f054: f3bf 8f6f isb sy
800f058: f3bf 8f4f dsb sy
800f05c: b662 cpsie i
800f05e: 60fb str r3, [r7, #12]
800f060: e7fe b.n 800f060 <xTaskRemoveFromEventList+0x2c>
( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) );
800f062: 693b ldr r3, [r7, #16]
800f064: 3318 adds r3, #24
800f066: 4618 mov r0, r3
800f068: f7fe fb00 bl 800d66c <uxListRemove>
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
800f06c: 4b1d ldr r3, [pc, #116] ; (800f0e4 <xTaskRemoveFromEventList+0xb0>)
800f06e: 681b ldr r3, [r3, #0]
800f070: 2b00 cmp r3, #0
800f072: d11c bne.n 800f0ae <xTaskRemoveFromEventList+0x7a>
{
( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) );
800f074: 693b ldr r3, [r7, #16]
800f076: 3304 adds r3, #4
800f078: 4618 mov r0, r3
800f07a: f7fe faf7 bl 800d66c <uxListRemove>
prvAddTaskToReadyList( pxUnblockedTCB );
800f07e: 693b ldr r3, [r7, #16]
800f080: 6adb ldr r3, [r3, #44] ; 0x2c
800f082: 2201 movs r2, #1
800f084: 409a lsls r2, r3
800f086: 4b18 ldr r3, [pc, #96] ; (800f0e8 <xTaskRemoveFromEventList+0xb4>)
800f088: 681b ldr r3, [r3, #0]
800f08a: 4313 orrs r3, r2
800f08c: 4a16 ldr r2, [pc, #88] ; (800f0e8 <xTaskRemoveFromEventList+0xb4>)
800f08e: 6013 str r3, [r2, #0]
800f090: 693b ldr r3, [r7, #16]
800f092: 6ada ldr r2, [r3, #44] ; 0x2c
800f094: 4613 mov r3, r2
800f096: 009b lsls r3, r3, #2
800f098: 4413 add r3, r2
800f09a: 009b lsls r3, r3, #2
800f09c: 4a13 ldr r2, [pc, #76] ; (800f0ec <xTaskRemoveFromEventList+0xb8>)
800f09e: 441a add r2, r3
800f0a0: 693b ldr r3, [r7, #16]
800f0a2: 3304 adds r3, #4
800f0a4: 4619 mov r1, r3
800f0a6: 4610 mov r0, r2
800f0a8: f7fe fa83 bl 800d5b2 <vListInsertEnd>
800f0ac: e005 b.n 800f0ba <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 ) );
800f0ae: 693b ldr r3, [r7, #16]
800f0b0: 3318 adds r3, #24
800f0b2: 4619 mov r1, r3
800f0b4: 480e ldr r0, [pc, #56] ; (800f0f0 <xTaskRemoveFromEventList+0xbc>)
800f0b6: f7fe fa7c bl 800d5b2 <vListInsertEnd>
}
if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority )
800f0ba: 693b ldr r3, [r7, #16]
800f0bc: 6ada ldr r2, [r3, #44] ; 0x2c
800f0be: 4b0d ldr r3, [pc, #52] ; (800f0f4 <xTaskRemoveFromEventList+0xc0>)
800f0c0: 681b ldr r3, [r3, #0]
800f0c2: 6adb ldr r3, [r3, #44] ; 0x2c
800f0c4: 429a cmp r2, r3
800f0c6: d905 bls.n 800f0d4 <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;
800f0c8: 2301 movs r3, #1
800f0ca: 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;
800f0cc: 4b0a ldr r3, [pc, #40] ; (800f0f8 <xTaskRemoveFromEventList+0xc4>)
800f0ce: 2201 movs r2, #1
800f0d0: 601a str r2, [r3, #0]
800f0d2: e001 b.n 800f0d8 <xTaskRemoveFromEventList+0xa4>
}
else
{
xReturn = pdFALSE;
800f0d4: 2300 movs r3, #0
800f0d6: 617b str r3, [r7, #20]
}
return xReturn;
800f0d8: 697b ldr r3, [r7, #20]
}
800f0da: 4618 mov r0, r3
800f0dc: 3718 adds r7, #24
800f0de: 46bd mov sp, r7
800f0e0: bd80 pop {r7, pc}
800f0e2: bf00 nop
800f0e4: 200006a0 .word 0x200006a0
800f0e8: 20000680 .word 0x20000680
800f0ec: 2000057c .word 0x2000057c
800f0f0: 20000638 .word 0x20000638
800f0f4: 20000578 .word 0x20000578
800f0f8: 2000068c .word 0x2000068c
0800f0fc <vTaskInternalSetTimeOutState>:
taskEXIT_CRITICAL();
}
/*-----------------------------------------------------------*/
void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut )
{
800f0fc: b480 push {r7}
800f0fe: b083 sub sp, #12
800f100: af00 add r7, sp, #0
800f102: 6078 str r0, [r7, #4]
/* For internal use only as it does not use a critical section. */
pxTimeOut->xOverflowCount = xNumOfOverflows;
800f104: 4b06 ldr r3, [pc, #24] ; (800f120 <vTaskInternalSetTimeOutState+0x24>)
800f106: 681a ldr r2, [r3, #0]
800f108: 687b ldr r3, [r7, #4]
800f10a: 601a str r2, [r3, #0]
pxTimeOut->xTimeOnEntering = xTickCount;
800f10c: 4b05 ldr r3, [pc, #20] ; (800f124 <vTaskInternalSetTimeOutState+0x28>)
800f10e: 681a ldr r2, [r3, #0]
800f110: 687b ldr r3, [r7, #4]
800f112: 605a str r2, [r3, #4]
}
800f114: bf00 nop
800f116: 370c adds r7, #12
800f118: 46bd mov sp, r7
800f11a: f85d 7b04 ldr.w r7, [sp], #4
800f11e: 4770 bx lr
800f120: 20000690 .word 0x20000690
800f124: 2000067c .word 0x2000067c
0800f128 <xTaskCheckForTimeOut>:
/*-----------------------------------------------------------*/
BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait )
{
800f128: b580 push {r7, lr}
800f12a: b088 sub sp, #32
800f12c: af00 add r7, sp, #0
800f12e: 6078 str r0, [r7, #4]
800f130: 6039 str r1, [r7, #0]
BaseType_t xReturn;
configASSERT( pxTimeOut );
800f132: 687b ldr r3, [r7, #4]
800f134: 2b00 cmp r3, #0
800f136: d10b bne.n 800f150 <xTaskCheckForTimeOut+0x28>
800f138: f04f 0350 mov.w r3, #80 ; 0x50
800f13c: b672 cpsid i
800f13e: f383 8811 msr BASEPRI, r3
800f142: f3bf 8f6f isb sy
800f146: f3bf 8f4f dsb sy
800f14a: b662 cpsie i
800f14c: 613b str r3, [r7, #16]
800f14e: e7fe b.n 800f14e <xTaskCheckForTimeOut+0x26>
configASSERT( pxTicksToWait );
800f150: 683b ldr r3, [r7, #0]
800f152: 2b00 cmp r3, #0
800f154: d10b bne.n 800f16e <xTaskCheckForTimeOut+0x46>
800f156: f04f 0350 mov.w r3, #80 ; 0x50
800f15a: b672 cpsid i
800f15c: f383 8811 msr BASEPRI, r3
800f160: f3bf 8f6f isb sy
800f164: f3bf 8f4f dsb sy
800f168: b662 cpsie i
800f16a: 60fb str r3, [r7, #12]
800f16c: e7fe b.n 800f16c <xTaskCheckForTimeOut+0x44>
taskENTER_CRITICAL();
800f16e: f000 fc63 bl 800fa38 <vPortEnterCritical>
{
/* Minor optimisation. The tick count cannot change in this block. */
const TickType_t xConstTickCount = xTickCount;
800f172: 4b1d ldr r3, [pc, #116] ; (800f1e8 <xTaskCheckForTimeOut+0xc0>)
800f174: 681b ldr r3, [r3, #0]
800f176: 61bb str r3, [r7, #24]
const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering;
800f178: 687b ldr r3, [r7, #4]
800f17a: 685b ldr r3, [r3, #4]
800f17c: 69ba ldr r2, [r7, #24]
800f17e: 1ad3 subs r3, r2, r3
800f180: 617b str r3, [r7, #20]
}
else
#endif
#if ( INCLUDE_vTaskSuspend == 1 )
if( *pxTicksToWait == portMAX_DELAY )
800f182: 683b ldr r3, [r7, #0]
800f184: 681b ldr r3, [r3, #0]
800f186: f1b3 3fff cmp.w r3, #4294967295
800f18a: d102 bne.n 800f192 <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;
800f18c: 2300 movs r3, #0
800f18e: 61fb str r3, [r7, #28]
800f190: e023 b.n 800f1da <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. */
800f192: 687b ldr r3, [r7, #4]
800f194: 681a ldr r2, [r3, #0]
800f196: 4b15 ldr r3, [pc, #84] ; (800f1ec <xTaskCheckForTimeOut+0xc4>)
800f198: 681b ldr r3, [r3, #0]
800f19a: 429a cmp r2, r3
800f19c: d007 beq.n 800f1ae <xTaskCheckForTimeOut+0x86>
800f19e: 687b ldr r3, [r7, #4]
800f1a0: 685b ldr r3, [r3, #4]
800f1a2: 69ba ldr r2, [r7, #24]
800f1a4: 429a cmp r2, r3
800f1a6: d302 bcc.n 800f1ae <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;
800f1a8: 2301 movs r3, #1
800f1aa: 61fb str r3, [r7, #28]
800f1ac: e015 b.n 800f1da <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. */
800f1ae: 683b ldr r3, [r7, #0]
800f1b0: 681b ldr r3, [r3, #0]
800f1b2: 697a ldr r2, [r7, #20]
800f1b4: 429a cmp r2, r3
800f1b6: d20b bcs.n 800f1d0 <xTaskCheckForTimeOut+0xa8>
{
/* Not a genuine timeout. Adjust parameters for time remaining. */
*pxTicksToWait -= xElapsedTime;
800f1b8: 683b ldr r3, [r7, #0]
800f1ba: 681a ldr r2, [r3, #0]
800f1bc: 697b ldr r3, [r7, #20]
800f1be: 1ad2 subs r2, r2, r3
800f1c0: 683b ldr r3, [r7, #0]
800f1c2: 601a str r2, [r3, #0]
vTaskInternalSetTimeOutState( pxTimeOut );
800f1c4: 6878 ldr r0, [r7, #4]
800f1c6: f7ff ff99 bl 800f0fc <vTaskInternalSetTimeOutState>
xReturn = pdFALSE;
800f1ca: 2300 movs r3, #0
800f1cc: 61fb str r3, [r7, #28]
800f1ce: e004 b.n 800f1da <xTaskCheckForTimeOut+0xb2>
}
else
{
*pxTicksToWait = 0;
800f1d0: 683b ldr r3, [r7, #0]
800f1d2: 2200 movs r2, #0
800f1d4: 601a str r2, [r3, #0]
xReturn = pdTRUE;
800f1d6: 2301 movs r3, #1
800f1d8: 61fb str r3, [r7, #28]
}
}
taskEXIT_CRITICAL();
800f1da: f000 fc5f bl 800fa9c <vPortExitCritical>
return xReturn;
800f1de: 69fb ldr r3, [r7, #28]
}
800f1e0: 4618 mov r0, r3
800f1e2: 3720 adds r7, #32
800f1e4: 46bd mov sp, r7
800f1e6: bd80 pop {r7, pc}
800f1e8: 2000067c .word 0x2000067c
800f1ec: 20000690 .word 0x20000690
0800f1f0 <vTaskMissedYield>:
/*-----------------------------------------------------------*/
void vTaskMissedYield( void )
{
800f1f0: b480 push {r7}
800f1f2: af00 add r7, sp, #0
xYieldPending = pdTRUE;
800f1f4: 4b03 ldr r3, [pc, #12] ; (800f204 <vTaskMissedYield+0x14>)
800f1f6: 2201 movs r2, #1
800f1f8: 601a str r2, [r3, #0]
}
800f1fa: bf00 nop
800f1fc: 46bd mov sp, r7
800f1fe: f85d 7b04 ldr.w r7, [sp], #4
800f202: 4770 bx lr
800f204: 2000068c .word 0x2000068c
0800f208 <prvIdleTask>:
*
* void prvIdleTask( void *pvParameters );
*
*/
static portTASK_FUNCTION( prvIdleTask, pvParameters )
{
800f208: b580 push {r7, lr}
800f20a: b082 sub sp, #8
800f20c: af00 add r7, sp, #0
800f20e: 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();
800f210: f000 f854 bl 800f2bc <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 )
800f214: 4b07 ldr r3, [pc, #28] ; (800f234 <prvIdleTask+0x2c>)
800f216: 681b ldr r3, [r3, #0]
800f218: 2b01 cmp r3, #1
800f21a: d907 bls.n 800f22c <prvIdleTask+0x24>
{
taskYIELD();
800f21c: 4b06 ldr r3, [pc, #24] ; (800f238 <prvIdleTask+0x30>)
800f21e: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800f222: 601a str r2, [r3, #0]
800f224: f3bf 8f4f dsb sy
800f228: 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();
800f22c: f7f1 f9c0 bl 80005b0 <vApplicationIdleHook>
prvCheckTasksWaitingTermination();
800f230: e7ee b.n 800f210 <prvIdleTask+0x8>
800f232: bf00 nop
800f234: 2000057c .word 0x2000057c
800f238: e000ed04 .word 0xe000ed04
0800f23c <prvInitialiseTaskLists>:
#endif /* portUSING_MPU_WRAPPERS */
/*-----------------------------------------------------------*/
static void prvInitialiseTaskLists( void )
{
800f23c: b580 push {r7, lr}
800f23e: b082 sub sp, #8
800f240: af00 add r7, sp, #0
UBaseType_t uxPriority;
for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
800f242: 2300 movs r3, #0
800f244: 607b str r3, [r7, #4]
800f246: e00c b.n 800f262 <prvInitialiseTaskLists+0x26>
{
vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) );
800f248: 687a ldr r2, [r7, #4]
800f24a: 4613 mov r3, r2
800f24c: 009b lsls r3, r3, #2
800f24e: 4413 add r3, r2
800f250: 009b lsls r3, r3, #2
800f252: 4a12 ldr r2, [pc, #72] ; (800f29c <prvInitialiseTaskLists+0x60>)
800f254: 4413 add r3, r2
800f256: 4618 mov r0, r3
800f258: f7fe f97e bl 800d558 <vListInitialise>
for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
800f25c: 687b ldr r3, [r7, #4]
800f25e: 3301 adds r3, #1
800f260: 607b str r3, [r7, #4]
800f262: 687b ldr r3, [r7, #4]
800f264: 2b06 cmp r3, #6
800f266: d9ef bls.n 800f248 <prvInitialiseTaskLists+0xc>
}
vListInitialise( &xDelayedTaskList1 );
800f268: 480d ldr r0, [pc, #52] ; (800f2a0 <prvInitialiseTaskLists+0x64>)
800f26a: f7fe f975 bl 800d558 <vListInitialise>
vListInitialise( &xDelayedTaskList2 );
800f26e: 480d ldr r0, [pc, #52] ; (800f2a4 <prvInitialiseTaskLists+0x68>)
800f270: f7fe f972 bl 800d558 <vListInitialise>
vListInitialise( &xPendingReadyList );
800f274: 480c ldr r0, [pc, #48] ; (800f2a8 <prvInitialiseTaskLists+0x6c>)
800f276: f7fe f96f bl 800d558 <vListInitialise>
#if ( INCLUDE_vTaskDelete == 1 )
{
vListInitialise( &xTasksWaitingTermination );
800f27a: 480c ldr r0, [pc, #48] ; (800f2ac <prvInitialiseTaskLists+0x70>)
800f27c: f7fe f96c bl 800d558 <vListInitialise>
}
#endif /* INCLUDE_vTaskDelete */
#if ( INCLUDE_vTaskSuspend == 1 )
{
vListInitialise( &xSuspendedTaskList );
800f280: 480b ldr r0, [pc, #44] ; (800f2b0 <prvInitialiseTaskLists+0x74>)
800f282: f7fe f969 bl 800d558 <vListInitialise>
}
#endif /* INCLUDE_vTaskSuspend */
/* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList
using list2. */
pxDelayedTaskList = &xDelayedTaskList1;
800f286: 4b0b ldr r3, [pc, #44] ; (800f2b4 <prvInitialiseTaskLists+0x78>)
800f288: 4a05 ldr r2, [pc, #20] ; (800f2a0 <prvInitialiseTaskLists+0x64>)
800f28a: 601a str r2, [r3, #0]
pxOverflowDelayedTaskList = &xDelayedTaskList2;
800f28c: 4b0a ldr r3, [pc, #40] ; (800f2b8 <prvInitialiseTaskLists+0x7c>)
800f28e: 4a05 ldr r2, [pc, #20] ; (800f2a4 <prvInitialiseTaskLists+0x68>)
800f290: 601a str r2, [r3, #0]
}
800f292: bf00 nop
800f294: 3708 adds r7, #8
800f296: 46bd mov sp, r7
800f298: bd80 pop {r7, pc}
800f29a: bf00 nop
800f29c: 2000057c .word 0x2000057c
800f2a0: 20000608 .word 0x20000608
800f2a4: 2000061c .word 0x2000061c
800f2a8: 20000638 .word 0x20000638
800f2ac: 2000064c .word 0x2000064c
800f2b0: 20000664 .word 0x20000664
800f2b4: 20000630 .word 0x20000630
800f2b8: 20000634 .word 0x20000634
0800f2bc <prvCheckTasksWaitingTermination>:
/*-----------------------------------------------------------*/
static void prvCheckTasksWaitingTermination( void )
{
800f2bc: b580 push {r7, lr}
800f2be: b082 sub sp, #8
800f2c0: 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 )
800f2c2: e019 b.n 800f2f8 <prvCheckTasksWaitingTermination+0x3c>
{
taskENTER_CRITICAL();
800f2c4: f000 fbb8 bl 800fa38 <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. */
800f2c8: 4b0f ldr r3, [pc, #60] ; (800f308 <prvCheckTasksWaitingTermination+0x4c>)
800f2ca: 68db ldr r3, [r3, #12]
800f2cc: 68db ldr r3, [r3, #12]
800f2ce: 607b str r3, [r7, #4]
( void ) uxListRemove( &( pxTCB->xStateListItem ) );
800f2d0: 687b ldr r3, [r7, #4]
800f2d2: 3304 adds r3, #4
800f2d4: 4618 mov r0, r3
800f2d6: f7fe f9c9 bl 800d66c <uxListRemove>
--uxCurrentNumberOfTasks;
800f2da: 4b0c ldr r3, [pc, #48] ; (800f30c <prvCheckTasksWaitingTermination+0x50>)
800f2dc: 681b ldr r3, [r3, #0]
800f2de: 3b01 subs r3, #1
800f2e0: 4a0a ldr r2, [pc, #40] ; (800f30c <prvCheckTasksWaitingTermination+0x50>)
800f2e2: 6013 str r3, [r2, #0]
--uxDeletedTasksWaitingCleanUp;
800f2e4: 4b0a ldr r3, [pc, #40] ; (800f310 <prvCheckTasksWaitingTermination+0x54>)
800f2e6: 681b ldr r3, [r3, #0]
800f2e8: 3b01 subs r3, #1
800f2ea: 4a09 ldr r2, [pc, #36] ; (800f310 <prvCheckTasksWaitingTermination+0x54>)
800f2ec: 6013 str r3, [r2, #0]
}
taskEXIT_CRITICAL();
800f2ee: f000 fbd5 bl 800fa9c <vPortExitCritical>
prvDeleteTCB( pxTCB );
800f2f2: 6878 ldr r0, [r7, #4]
800f2f4: f000 f80e bl 800f314 <prvDeleteTCB>
while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
800f2f8: 4b05 ldr r3, [pc, #20] ; (800f310 <prvCheckTasksWaitingTermination+0x54>)
800f2fa: 681b ldr r3, [r3, #0]
800f2fc: 2b00 cmp r3, #0
800f2fe: d1e1 bne.n 800f2c4 <prvCheckTasksWaitingTermination+0x8>
}
}
#endif /* INCLUDE_vTaskDelete */
}
800f300: bf00 nop
800f302: 3708 adds r7, #8
800f304: 46bd mov sp, r7
800f306: bd80 pop {r7, pc}
800f308: 2000064c .word 0x2000064c
800f30c: 20000678 .word 0x20000678
800f310: 20000660 .word 0x20000660
0800f314 <prvDeleteTCB>:
/*-----------------------------------------------------------*/
#if ( INCLUDE_vTaskDelete == 1 )
static void prvDeleteTCB( TCB_t *pxTCB )
{
800f314: b580 push {r7, lr}
800f316: b084 sub sp, #16
800f318: af00 add r7, sp, #0
800f31a: 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 )
800f31c: 687b ldr r3, [r7, #4]
800f31e: f893 3055 ldrb.w r3, [r3, #85] ; 0x55
800f322: 2b00 cmp r3, #0
800f324: d108 bne.n 800f338 <prvDeleteTCB+0x24>
{
/* Both the stack and TCB were allocated dynamically, so both
must be freed. */
vPortFree( pxTCB->pxStack );
800f326: 687b ldr r3, [r7, #4]
800f328: 6b1b ldr r3, [r3, #48] ; 0x30
800f32a: 4618 mov r0, r3
800f32c: f000 fd72 bl 800fe14 <vPortFree>
vPortFree( pxTCB );
800f330: 6878 ldr r0, [r7, #4]
800f332: f000 fd6f bl 800fe14 <vPortFree>
configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB );
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
}
800f336: e019 b.n 800f36c <prvDeleteTCB+0x58>
else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY )
800f338: 687b ldr r3, [r7, #4]
800f33a: f893 3055 ldrb.w r3, [r3, #85] ; 0x55
800f33e: 2b01 cmp r3, #1
800f340: d103 bne.n 800f34a <prvDeleteTCB+0x36>
vPortFree( pxTCB );
800f342: 6878 ldr r0, [r7, #4]
800f344: f000 fd66 bl 800fe14 <vPortFree>
}
800f348: e010 b.n 800f36c <prvDeleteTCB+0x58>
configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB );
800f34a: 687b ldr r3, [r7, #4]
800f34c: f893 3055 ldrb.w r3, [r3, #85] ; 0x55
800f350: 2b02 cmp r3, #2
800f352: d00b beq.n 800f36c <prvDeleteTCB+0x58>
800f354: f04f 0350 mov.w r3, #80 ; 0x50
800f358: b672 cpsid i
800f35a: f383 8811 msr BASEPRI, r3
800f35e: f3bf 8f6f isb sy
800f362: f3bf 8f4f dsb sy
800f366: b662 cpsie i
800f368: 60fb str r3, [r7, #12]
800f36a: e7fe b.n 800f36a <prvDeleteTCB+0x56>
}
800f36c: bf00 nop
800f36e: 3710 adds r7, #16
800f370: 46bd mov sp, r7
800f372: bd80 pop {r7, pc}
0800f374 <prvResetNextTaskUnblockTime>:
#endif /* INCLUDE_vTaskDelete */
/*-----------------------------------------------------------*/
static void prvResetNextTaskUnblockTime( void )
{
800f374: b480 push {r7}
800f376: b083 sub sp, #12
800f378: af00 add r7, sp, #0
TCB_t *pxTCB;
if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
800f37a: 4b0c ldr r3, [pc, #48] ; (800f3ac <prvResetNextTaskUnblockTime+0x38>)
800f37c: 681b ldr r3, [r3, #0]
800f37e: 681b ldr r3, [r3, #0]
800f380: 2b00 cmp r3, #0
800f382: d104 bne.n 800f38e <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;
800f384: 4b0a ldr r3, [pc, #40] ; (800f3b0 <prvResetNextTaskUnblockTime+0x3c>)
800f386: f04f 32ff mov.w r2, #4294967295
800f38a: 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 ) );
}
}
800f38c: e008 b.n 800f3a0 <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. */
800f38e: 4b07 ldr r3, [pc, #28] ; (800f3ac <prvResetNextTaskUnblockTime+0x38>)
800f390: 681b ldr r3, [r3, #0]
800f392: 68db ldr r3, [r3, #12]
800f394: 68db ldr r3, [r3, #12]
800f396: 607b str r3, [r7, #4]
xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) );
800f398: 687b ldr r3, [r7, #4]
800f39a: 685b ldr r3, [r3, #4]
800f39c: 4a04 ldr r2, [pc, #16] ; (800f3b0 <prvResetNextTaskUnblockTime+0x3c>)
800f39e: 6013 str r3, [r2, #0]
}
800f3a0: bf00 nop
800f3a2: 370c adds r7, #12
800f3a4: 46bd mov sp, r7
800f3a6: f85d 7b04 ldr.w r7, [sp], #4
800f3aa: 4770 bx lr
800f3ac: 20000630 .word 0x20000630
800f3b0: 20000698 .word 0x20000698
0800f3b4 <xTaskGetSchedulerState>:
/*-----------------------------------------------------------*/
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
BaseType_t xTaskGetSchedulerState( void )
{
800f3b4: b480 push {r7}
800f3b6: b083 sub sp, #12
800f3b8: af00 add r7, sp, #0
BaseType_t xReturn;
if( xSchedulerRunning == pdFALSE )
800f3ba: 4b0b ldr r3, [pc, #44] ; (800f3e8 <xTaskGetSchedulerState+0x34>)
800f3bc: 681b ldr r3, [r3, #0]
800f3be: 2b00 cmp r3, #0
800f3c0: d102 bne.n 800f3c8 <xTaskGetSchedulerState+0x14>
{
xReturn = taskSCHEDULER_NOT_STARTED;
800f3c2: 2301 movs r3, #1
800f3c4: 607b str r3, [r7, #4]
800f3c6: e008 b.n 800f3da <xTaskGetSchedulerState+0x26>
}
else
{
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
800f3c8: 4b08 ldr r3, [pc, #32] ; (800f3ec <xTaskGetSchedulerState+0x38>)
800f3ca: 681b ldr r3, [r3, #0]
800f3cc: 2b00 cmp r3, #0
800f3ce: d102 bne.n 800f3d6 <xTaskGetSchedulerState+0x22>
{
xReturn = taskSCHEDULER_RUNNING;
800f3d0: 2302 movs r3, #2
800f3d2: 607b str r3, [r7, #4]
800f3d4: e001 b.n 800f3da <xTaskGetSchedulerState+0x26>
}
else
{
xReturn = taskSCHEDULER_SUSPENDED;
800f3d6: 2300 movs r3, #0
800f3d8: 607b str r3, [r7, #4]
}
}
return xReturn;
800f3da: 687b ldr r3, [r7, #4]
}
800f3dc: 4618 mov r0, r3
800f3de: 370c adds r7, #12
800f3e0: 46bd mov sp, r7
800f3e2: f85d 7b04 ldr.w r7, [sp], #4
800f3e6: 4770 bx lr
800f3e8: 20000684 .word 0x20000684
800f3ec: 200006a0 .word 0x200006a0
0800f3f0 <xTaskPriorityInherit>:
/*-----------------------------------------------------------*/
#if ( configUSE_MUTEXES == 1 )
BaseType_t xTaskPriorityInherit( TaskHandle_t const pxMutexHolder )
{
800f3f0: b580 push {r7, lr}
800f3f2: b084 sub sp, #16
800f3f4: af00 add r7, sp, #0
800f3f6: 6078 str r0, [r7, #4]
TCB_t * const pxMutexHolderTCB = pxMutexHolder;
800f3f8: 687b ldr r3, [r7, #4]
800f3fa: 60bb str r3, [r7, #8]
BaseType_t xReturn = pdFALSE;
800f3fc: 2300 movs r3, #0
800f3fe: 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 )
800f400: 687b ldr r3, [r7, #4]
800f402: 2b00 cmp r3, #0
800f404: d069 beq.n 800f4da <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 )
800f406: 68bb ldr r3, [r7, #8]
800f408: 6ada ldr r2, [r3, #44] ; 0x2c
800f40a: 4b36 ldr r3, [pc, #216] ; (800f4e4 <xTaskPriorityInherit+0xf4>)
800f40c: 681b ldr r3, [r3, #0]
800f40e: 6adb ldr r3, [r3, #44] ; 0x2c
800f410: 429a cmp r2, r3
800f412: d259 bcs.n 800f4c8 <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 )
800f414: 68bb ldr r3, [r7, #8]
800f416: 699b ldr r3, [r3, #24]
800f418: 2b00 cmp r3, #0
800f41a: db06 blt.n 800f42a <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. */
800f41c: 4b31 ldr r3, [pc, #196] ; (800f4e4 <xTaskPriorityInherit+0xf4>)
800f41e: 681b ldr r3, [r3, #0]
800f420: 6adb ldr r3, [r3, #44] ; 0x2c
800f422: f1c3 0207 rsb r2, r3, #7
800f426: 68bb ldr r3, [r7, #8]
800f428: 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 )
800f42a: 68bb ldr r3, [r7, #8]
800f42c: 6959 ldr r1, [r3, #20]
800f42e: 68bb ldr r3, [r7, #8]
800f430: 6ada ldr r2, [r3, #44] ; 0x2c
800f432: 4613 mov r3, r2
800f434: 009b lsls r3, r3, #2
800f436: 4413 add r3, r2
800f438: 009b lsls r3, r3, #2
800f43a: 4a2b ldr r2, [pc, #172] ; (800f4e8 <xTaskPriorityInherit+0xf8>)
800f43c: 4413 add r3, r2
800f43e: 4299 cmp r1, r3
800f440: d13a bne.n 800f4b8 <xTaskPriorityInherit+0xc8>
{
if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
800f442: 68bb ldr r3, [r7, #8]
800f444: 3304 adds r3, #4
800f446: 4618 mov r0, r3
800f448: f7fe f910 bl 800d66c <uxListRemove>
800f44c: 4603 mov r3, r0
800f44e: 2b00 cmp r3, #0
800f450: d115 bne.n 800f47e <xTaskPriorityInherit+0x8e>
{
taskRESET_READY_PRIORITY( pxMutexHolderTCB->uxPriority );
800f452: 68bb ldr r3, [r7, #8]
800f454: 6ada ldr r2, [r3, #44] ; 0x2c
800f456: 4924 ldr r1, [pc, #144] ; (800f4e8 <xTaskPriorityInherit+0xf8>)
800f458: 4613 mov r3, r2
800f45a: 009b lsls r3, r3, #2
800f45c: 4413 add r3, r2
800f45e: 009b lsls r3, r3, #2
800f460: 440b add r3, r1
800f462: 681b ldr r3, [r3, #0]
800f464: 2b00 cmp r3, #0
800f466: d10a bne.n 800f47e <xTaskPriorityInherit+0x8e>
800f468: 68bb ldr r3, [r7, #8]
800f46a: 6adb ldr r3, [r3, #44] ; 0x2c
800f46c: 2201 movs r2, #1
800f46e: fa02 f303 lsl.w r3, r2, r3
800f472: 43da mvns r2, r3
800f474: 4b1d ldr r3, [pc, #116] ; (800f4ec <xTaskPriorityInherit+0xfc>)
800f476: 681b ldr r3, [r3, #0]
800f478: 4013 ands r3, r2
800f47a: 4a1c ldr r2, [pc, #112] ; (800f4ec <xTaskPriorityInherit+0xfc>)
800f47c: 6013 str r3, [r2, #0]
{
mtCOVERAGE_TEST_MARKER();
}
/* Inherit the priority before being moved into the new list. */
pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
800f47e: 4b19 ldr r3, [pc, #100] ; (800f4e4 <xTaskPriorityInherit+0xf4>)
800f480: 681b ldr r3, [r3, #0]
800f482: 6ada ldr r2, [r3, #44] ; 0x2c
800f484: 68bb ldr r3, [r7, #8]
800f486: 62da str r2, [r3, #44] ; 0x2c
prvAddTaskToReadyList( pxMutexHolderTCB );
800f488: 68bb ldr r3, [r7, #8]
800f48a: 6adb ldr r3, [r3, #44] ; 0x2c
800f48c: 2201 movs r2, #1
800f48e: 409a lsls r2, r3
800f490: 4b16 ldr r3, [pc, #88] ; (800f4ec <xTaskPriorityInherit+0xfc>)
800f492: 681b ldr r3, [r3, #0]
800f494: 4313 orrs r3, r2
800f496: 4a15 ldr r2, [pc, #84] ; (800f4ec <xTaskPriorityInherit+0xfc>)
800f498: 6013 str r3, [r2, #0]
800f49a: 68bb ldr r3, [r7, #8]
800f49c: 6ada ldr r2, [r3, #44] ; 0x2c
800f49e: 4613 mov r3, r2
800f4a0: 009b lsls r3, r3, #2
800f4a2: 4413 add r3, r2
800f4a4: 009b lsls r3, r3, #2
800f4a6: 4a10 ldr r2, [pc, #64] ; (800f4e8 <xTaskPriorityInherit+0xf8>)
800f4a8: 441a add r2, r3
800f4aa: 68bb ldr r3, [r7, #8]
800f4ac: 3304 adds r3, #4
800f4ae: 4619 mov r1, r3
800f4b0: 4610 mov r0, r2
800f4b2: f7fe f87e bl 800d5b2 <vListInsertEnd>
800f4b6: e004 b.n 800f4c2 <xTaskPriorityInherit+0xd2>
}
else
{
/* Just inherit the priority. */
pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
800f4b8: 4b0a ldr r3, [pc, #40] ; (800f4e4 <xTaskPriorityInherit+0xf4>)
800f4ba: 681b ldr r3, [r3, #0]
800f4bc: 6ada ldr r2, [r3, #44] ; 0x2c
800f4be: 68bb ldr r3, [r7, #8]
800f4c0: 62da str r2, [r3, #44] ; 0x2c
}
traceTASK_PRIORITY_INHERIT( pxMutexHolderTCB, pxCurrentTCB->uxPriority );
/* Inheritance occurred. */
xReturn = pdTRUE;
800f4c2: 2301 movs r3, #1
800f4c4: 60fb str r3, [r7, #12]
800f4c6: e008 b.n 800f4da <xTaskPriorityInherit+0xea>
}
else
{
if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority )
800f4c8: 68bb ldr r3, [r7, #8]
800f4ca: 6c5a ldr r2, [r3, #68] ; 0x44
800f4cc: 4b05 ldr r3, [pc, #20] ; (800f4e4 <xTaskPriorityInherit+0xf4>)
800f4ce: 681b ldr r3, [r3, #0]
800f4d0: 6adb ldr r3, [r3, #44] ; 0x2c
800f4d2: 429a cmp r2, r3
800f4d4: d201 bcs.n 800f4da <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;
800f4d6: 2301 movs r3, #1
800f4d8: 60fb str r3, [r7, #12]
else
{
mtCOVERAGE_TEST_MARKER();
}
return xReturn;
800f4da: 68fb ldr r3, [r7, #12]
}
800f4dc: 4618 mov r0, r3
800f4de: 3710 adds r7, #16
800f4e0: 46bd mov sp, r7
800f4e2: bd80 pop {r7, pc}
800f4e4: 20000578 .word 0x20000578
800f4e8: 2000057c .word 0x2000057c
800f4ec: 20000680 .word 0x20000680
0800f4f0 <xTaskPriorityDisinherit>:
/*-----------------------------------------------------------*/
#if ( configUSE_MUTEXES == 1 )
BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder )
{
800f4f0: b580 push {r7, lr}
800f4f2: b086 sub sp, #24
800f4f4: af00 add r7, sp, #0
800f4f6: 6078 str r0, [r7, #4]
TCB_t * const pxTCB = pxMutexHolder;
800f4f8: 687b ldr r3, [r7, #4]
800f4fa: 613b str r3, [r7, #16]
BaseType_t xReturn = pdFALSE;
800f4fc: 2300 movs r3, #0
800f4fe: 617b str r3, [r7, #20]
if( pxMutexHolder != NULL )
800f500: 687b ldr r3, [r7, #4]
800f502: 2b00 cmp r3, #0
800f504: d070 beq.n 800f5e8 <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 );
800f506: 4b3b ldr r3, [pc, #236] ; (800f5f4 <xTaskPriorityDisinherit+0x104>)
800f508: 681b ldr r3, [r3, #0]
800f50a: 693a ldr r2, [r7, #16]
800f50c: 429a cmp r2, r3
800f50e: d00b beq.n 800f528 <xTaskPriorityDisinherit+0x38>
800f510: f04f 0350 mov.w r3, #80 ; 0x50
800f514: b672 cpsid i
800f516: f383 8811 msr BASEPRI, r3
800f51a: f3bf 8f6f isb sy
800f51e: f3bf 8f4f dsb sy
800f522: b662 cpsie i
800f524: 60fb str r3, [r7, #12]
800f526: e7fe b.n 800f526 <xTaskPriorityDisinherit+0x36>
configASSERT( pxTCB->uxMutexesHeld );
800f528: 693b ldr r3, [r7, #16]
800f52a: 6c9b ldr r3, [r3, #72] ; 0x48
800f52c: 2b00 cmp r3, #0
800f52e: d10b bne.n 800f548 <xTaskPriorityDisinherit+0x58>
800f530: f04f 0350 mov.w r3, #80 ; 0x50
800f534: b672 cpsid i
800f536: f383 8811 msr BASEPRI, r3
800f53a: f3bf 8f6f isb sy
800f53e: f3bf 8f4f dsb sy
800f542: b662 cpsie i
800f544: 60bb str r3, [r7, #8]
800f546: e7fe b.n 800f546 <xTaskPriorityDisinherit+0x56>
( pxTCB->uxMutexesHeld )--;
800f548: 693b ldr r3, [r7, #16]
800f54a: 6c9b ldr r3, [r3, #72] ; 0x48
800f54c: 1e5a subs r2, r3, #1
800f54e: 693b ldr r3, [r7, #16]
800f550: 649a str r2, [r3, #72] ; 0x48
/* Has the holder of the mutex inherited the priority of another
task? */
if( pxTCB->uxPriority != pxTCB->uxBasePriority )
800f552: 693b ldr r3, [r7, #16]
800f554: 6ada ldr r2, [r3, #44] ; 0x2c
800f556: 693b ldr r3, [r7, #16]
800f558: 6c5b ldr r3, [r3, #68] ; 0x44
800f55a: 429a cmp r2, r3
800f55c: d044 beq.n 800f5e8 <xTaskPriorityDisinherit+0xf8>
{
/* Only disinherit if no other mutexes are held. */
if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 )
800f55e: 693b ldr r3, [r7, #16]
800f560: 6c9b ldr r3, [r3, #72] ; 0x48
800f562: 2b00 cmp r3, #0
800f564: d140 bne.n 800f5e8 <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 )
800f566: 693b ldr r3, [r7, #16]
800f568: 3304 adds r3, #4
800f56a: 4618 mov r0, r3
800f56c: f7fe f87e bl 800d66c <uxListRemove>
800f570: 4603 mov r3, r0
800f572: 2b00 cmp r3, #0
800f574: d115 bne.n 800f5a2 <xTaskPriorityDisinherit+0xb2>
{
taskRESET_READY_PRIORITY( pxTCB->uxPriority );
800f576: 693b ldr r3, [r7, #16]
800f578: 6ada ldr r2, [r3, #44] ; 0x2c
800f57a: 491f ldr r1, [pc, #124] ; (800f5f8 <xTaskPriorityDisinherit+0x108>)
800f57c: 4613 mov r3, r2
800f57e: 009b lsls r3, r3, #2
800f580: 4413 add r3, r2
800f582: 009b lsls r3, r3, #2
800f584: 440b add r3, r1
800f586: 681b ldr r3, [r3, #0]
800f588: 2b00 cmp r3, #0
800f58a: d10a bne.n 800f5a2 <xTaskPriorityDisinherit+0xb2>
800f58c: 693b ldr r3, [r7, #16]
800f58e: 6adb ldr r3, [r3, #44] ; 0x2c
800f590: 2201 movs r2, #1
800f592: fa02 f303 lsl.w r3, r2, r3
800f596: 43da mvns r2, r3
800f598: 4b18 ldr r3, [pc, #96] ; (800f5fc <xTaskPriorityDisinherit+0x10c>)
800f59a: 681b ldr r3, [r3, #0]
800f59c: 4013 ands r3, r2
800f59e: 4a17 ldr r2, [pc, #92] ; (800f5fc <xTaskPriorityDisinherit+0x10c>)
800f5a0: 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;
800f5a2: 693b ldr r3, [r7, #16]
800f5a4: 6c5a ldr r2, [r3, #68] ; 0x44
800f5a6: 693b ldr r3, [r7, #16]
800f5a8: 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. */
800f5aa: 693b ldr r3, [r7, #16]
800f5ac: 6adb ldr r3, [r3, #44] ; 0x2c
800f5ae: f1c3 0207 rsb r2, r3, #7
800f5b2: 693b ldr r3, [r7, #16]
800f5b4: 619a str r2, [r3, #24]
prvAddTaskToReadyList( pxTCB );
800f5b6: 693b ldr r3, [r7, #16]
800f5b8: 6adb ldr r3, [r3, #44] ; 0x2c
800f5ba: 2201 movs r2, #1
800f5bc: 409a lsls r2, r3
800f5be: 4b0f ldr r3, [pc, #60] ; (800f5fc <xTaskPriorityDisinherit+0x10c>)
800f5c0: 681b ldr r3, [r3, #0]
800f5c2: 4313 orrs r3, r2
800f5c4: 4a0d ldr r2, [pc, #52] ; (800f5fc <xTaskPriorityDisinherit+0x10c>)
800f5c6: 6013 str r3, [r2, #0]
800f5c8: 693b ldr r3, [r7, #16]
800f5ca: 6ada ldr r2, [r3, #44] ; 0x2c
800f5cc: 4613 mov r3, r2
800f5ce: 009b lsls r3, r3, #2
800f5d0: 4413 add r3, r2
800f5d2: 009b lsls r3, r3, #2
800f5d4: 4a08 ldr r2, [pc, #32] ; (800f5f8 <xTaskPriorityDisinherit+0x108>)
800f5d6: 441a add r2, r3
800f5d8: 693b ldr r3, [r7, #16]
800f5da: 3304 adds r3, #4
800f5dc: 4619 mov r1, r3
800f5de: 4610 mov r0, r2
800f5e0: f7fd ffe7 bl 800d5b2 <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;
800f5e4: 2301 movs r3, #1
800f5e6: 617b str r3, [r7, #20]
else
{
mtCOVERAGE_TEST_MARKER();
}
return xReturn;
800f5e8: 697b ldr r3, [r7, #20]
}
800f5ea: 4618 mov r0, r3
800f5ec: 3718 adds r7, #24
800f5ee: 46bd mov sp, r7
800f5f0: bd80 pop {r7, pc}
800f5f2: bf00 nop
800f5f4: 20000578 .word 0x20000578
800f5f8: 2000057c .word 0x2000057c
800f5fc: 20000680 .word 0x20000680
0800f600 <vTaskPriorityDisinheritAfterTimeout>:
/*-----------------------------------------------------------*/
#if ( configUSE_MUTEXES == 1 )
void vTaskPriorityDisinheritAfterTimeout( TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask )
{
800f600: b580 push {r7, lr}
800f602: b088 sub sp, #32
800f604: af00 add r7, sp, #0
800f606: 6078 str r0, [r7, #4]
800f608: 6039 str r1, [r7, #0]
TCB_t * const pxTCB = pxMutexHolder;
800f60a: 687b ldr r3, [r7, #4]
800f60c: 61bb str r3, [r7, #24]
UBaseType_t uxPriorityUsedOnEntry, uxPriorityToUse;
const UBaseType_t uxOnlyOneMutexHeld = ( UBaseType_t ) 1;
800f60e: 2301 movs r3, #1
800f610: 617b str r3, [r7, #20]
if( pxMutexHolder != NULL )
800f612: 687b ldr r3, [r7, #4]
800f614: 2b00 cmp r3, #0
800f616: f000 8085 beq.w 800f724 <vTaskPriorityDisinheritAfterTimeout+0x124>
{
/* If pxMutexHolder is not NULL then the holder must hold at least
one mutex. */
configASSERT( pxTCB->uxMutexesHeld );
800f61a: 69bb ldr r3, [r7, #24]
800f61c: 6c9b ldr r3, [r3, #72] ; 0x48
800f61e: 2b00 cmp r3, #0
800f620: d10b bne.n 800f63a <vTaskPriorityDisinheritAfterTimeout+0x3a>
800f622: f04f 0350 mov.w r3, #80 ; 0x50
800f626: b672 cpsid i
800f628: f383 8811 msr BASEPRI, r3
800f62c: f3bf 8f6f isb sy
800f630: f3bf 8f4f dsb sy
800f634: b662 cpsie i
800f636: 60fb str r3, [r7, #12]
800f638: e7fe b.n 800f638 <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 )
800f63a: 69bb ldr r3, [r7, #24]
800f63c: 6c5b ldr r3, [r3, #68] ; 0x44
800f63e: 683a ldr r2, [r7, #0]
800f640: 429a cmp r2, r3
800f642: d902 bls.n 800f64a <vTaskPriorityDisinheritAfterTimeout+0x4a>
{
uxPriorityToUse = uxHighestPriorityWaitingTask;
800f644: 683b ldr r3, [r7, #0]
800f646: 61fb str r3, [r7, #28]
800f648: e002 b.n 800f650 <vTaskPriorityDisinheritAfterTimeout+0x50>
}
else
{
uxPriorityToUse = pxTCB->uxBasePriority;
800f64a: 69bb ldr r3, [r7, #24]
800f64c: 6c5b ldr r3, [r3, #68] ; 0x44
800f64e: 61fb str r3, [r7, #28]
}
/* Does the priority need to change? */
if( pxTCB->uxPriority != uxPriorityToUse )
800f650: 69bb ldr r3, [r7, #24]
800f652: 6adb ldr r3, [r3, #44] ; 0x2c
800f654: 69fa ldr r2, [r7, #28]
800f656: 429a cmp r2, r3
800f658: d064 beq.n 800f724 <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 )
800f65a: 69bb ldr r3, [r7, #24]
800f65c: 6c9b ldr r3, [r3, #72] ; 0x48
800f65e: 697a ldr r2, [r7, #20]
800f660: 429a cmp r2, r3
800f662: d15f bne.n 800f724 <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 );
800f664: 4b31 ldr r3, [pc, #196] ; (800f72c <vTaskPriorityDisinheritAfterTimeout+0x12c>)
800f666: 681b ldr r3, [r3, #0]
800f668: 69ba ldr r2, [r7, #24]
800f66a: 429a cmp r2, r3
800f66c: d10b bne.n 800f686 <vTaskPriorityDisinheritAfterTimeout+0x86>
800f66e: f04f 0350 mov.w r3, #80 ; 0x50
800f672: b672 cpsid i
800f674: f383 8811 msr BASEPRI, r3
800f678: f3bf 8f6f isb sy
800f67c: f3bf 8f4f dsb sy
800f680: b662 cpsie i
800f682: 60bb str r3, [r7, #8]
800f684: e7fe b.n 800f684 <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;
800f686: 69bb ldr r3, [r7, #24]
800f688: 6adb ldr r3, [r3, #44] ; 0x2c
800f68a: 613b str r3, [r7, #16]
pxTCB->uxPriority = uxPriorityToUse;
800f68c: 69bb ldr r3, [r7, #24]
800f68e: 69fa ldr r2, [r7, #28]
800f690: 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 )
800f692: 69bb ldr r3, [r7, #24]
800f694: 699b ldr r3, [r3, #24]
800f696: 2b00 cmp r3, #0
800f698: db04 blt.n 800f6a4 <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. */
800f69a: 69fb ldr r3, [r7, #28]
800f69c: f1c3 0207 rsb r2, r3, #7
800f6a0: 69bb ldr r3, [r7, #24]
800f6a2: 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 )
800f6a4: 69bb ldr r3, [r7, #24]
800f6a6: 6959 ldr r1, [r3, #20]
800f6a8: 693a ldr r2, [r7, #16]
800f6aa: 4613 mov r3, r2
800f6ac: 009b lsls r3, r3, #2
800f6ae: 4413 add r3, r2
800f6b0: 009b lsls r3, r3, #2
800f6b2: 4a1f ldr r2, [pc, #124] ; (800f730 <vTaskPriorityDisinheritAfterTimeout+0x130>)
800f6b4: 4413 add r3, r2
800f6b6: 4299 cmp r1, r3
800f6b8: d134 bne.n 800f724 <vTaskPriorityDisinheritAfterTimeout+0x124>
{
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
800f6ba: 69bb ldr r3, [r7, #24]
800f6bc: 3304 adds r3, #4
800f6be: 4618 mov r0, r3
800f6c0: f7fd ffd4 bl 800d66c <uxListRemove>
800f6c4: 4603 mov r3, r0
800f6c6: 2b00 cmp r3, #0
800f6c8: d115 bne.n 800f6f6 <vTaskPriorityDisinheritAfterTimeout+0xf6>
{
taskRESET_READY_PRIORITY( pxTCB->uxPriority );
800f6ca: 69bb ldr r3, [r7, #24]
800f6cc: 6ada ldr r2, [r3, #44] ; 0x2c
800f6ce: 4918 ldr r1, [pc, #96] ; (800f730 <vTaskPriorityDisinheritAfterTimeout+0x130>)
800f6d0: 4613 mov r3, r2
800f6d2: 009b lsls r3, r3, #2
800f6d4: 4413 add r3, r2
800f6d6: 009b lsls r3, r3, #2
800f6d8: 440b add r3, r1
800f6da: 681b ldr r3, [r3, #0]
800f6dc: 2b00 cmp r3, #0
800f6de: d10a bne.n 800f6f6 <vTaskPriorityDisinheritAfterTimeout+0xf6>
800f6e0: 69bb ldr r3, [r7, #24]
800f6e2: 6adb ldr r3, [r3, #44] ; 0x2c
800f6e4: 2201 movs r2, #1
800f6e6: fa02 f303 lsl.w r3, r2, r3
800f6ea: 43da mvns r2, r3
800f6ec: 4b11 ldr r3, [pc, #68] ; (800f734 <vTaskPriorityDisinheritAfterTimeout+0x134>)
800f6ee: 681b ldr r3, [r3, #0]
800f6f0: 4013 ands r3, r2
800f6f2: 4a10 ldr r2, [pc, #64] ; (800f734 <vTaskPriorityDisinheritAfterTimeout+0x134>)
800f6f4: 6013 str r3, [r2, #0]
else
{
mtCOVERAGE_TEST_MARKER();
}
prvAddTaskToReadyList( pxTCB );
800f6f6: 69bb ldr r3, [r7, #24]
800f6f8: 6adb ldr r3, [r3, #44] ; 0x2c
800f6fa: 2201 movs r2, #1
800f6fc: 409a lsls r2, r3
800f6fe: 4b0d ldr r3, [pc, #52] ; (800f734 <vTaskPriorityDisinheritAfterTimeout+0x134>)
800f700: 681b ldr r3, [r3, #0]
800f702: 4313 orrs r3, r2
800f704: 4a0b ldr r2, [pc, #44] ; (800f734 <vTaskPriorityDisinheritAfterTimeout+0x134>)
800f706: 6013 str r3, [r2, #0]
800f708: 69bb ldr r3, [r7, #24]
800f70a: 6ada ldr r2, [r3, #44] ; 0x2c
800f70c: 4613 mov r3, r2
800f70e: 009b lsls r3, r3, #2
800f710: 4413 add r3, r2
800f712: 009b lsls r3, r3, #2
800f714: 4a06 ldr r2, [pc, #24] ; (800f730 <vTaskPriorityDisinheritAfterTimeout+0x130>)
800f716: 441a add r2, r3
800f718: 69bb ldr r3, [r7, #24]
800f71a: 3304 adds r3, #4
800f71c: 4619 mov r1, r3
800f71e: 4610 mov r0, r2
800f720: f7fd ff47 bl 800d5b2 <vListInsertEnd>
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
800f724: bf00 nop
800f726: 3720 adds r7, #32
800f728: 46bd mov sp, r7
800f72a: bd80 pop {r7, pc}
800f72c: 20000578 .word 0x20000578
800f730: 2000057c .word 0x2000057c
800f734: 20000680 .word 0x20000680
0800f738 <pvTaskIncrementMutexHeldCount>:
/*-----------------------------------------------------------*/
#if ( configUSE_MUTEXES == 1 )
TaskHandle_t pvTaskIncrementMutexHeldCount( void )
{
800f738: b480 push {r7}
800f73a: af00 add r7, sp, #0
/* If xSemaphoreCreateMutex() is called before any tasks have been created
then pxCurrentTCB will be NULL. */
if( pxCurrentTCB != NULL )
800f73c: 4b07 ldr r3, [pc, #28] ; (800f75c <pvTaskIncrementMutexHeldCount+0x24>)
800f73e: 681b ldr r3, [r3, #0]
800f740: 2b00 cmp r3, #0
800f742: d004 beq.n 800f74e <pvTaskIncrementMutexHeldCount+0x16>
{
( pxCurrentTCB->uxMutexesHeld )++;
800f744: 4b05 ldr r3, [pc, #20] ; (800f75c <pvTaskIncrementMutexHeldCount+0x24>)
800f746: 681b ldr r3, [r3, #0]
800f748: 6c9a ldr r2, [r3, #72] ; 0x48
800f74a: 3201 adds r2, #1
800f74c: 649a str r2, [r3, #72] ; 0x48
}
return pxCurrentTCB;
800f74e: 4b03 ldr r3, [pc, #12] ; (800f75c <pvTaskIncrementMutexHeldCount+0x24>)
800f750: 681b ldr r3, [r3, #0]
}
800f752: 4618 mov r0, r3
800f754: 46bd mov sp, r7
800f756: f85d 7b04 ldr.w r7, [sp], #4
800f75a: 4770 bx lr
800f75c: 20000578 .word 0x20000578
0800f760 <prvAddCurrentTaskToDelayedList>:
}
#endif
/*-----------------------------------------------------------*/
static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely )
{
800f760: b580 push {r7, lr}
800f762: b084 sub sp, #16
800f764: af00 add r7, sp, #0
800f766: 6078 str r0, [r7, #4]
800f768: 6039 str r1, [r7, #0]
TickType_t xTimeToWake;
const TickType_t xConstTickCount = xTickCount;
800f76a: 4b29 ldr r3, [pc, #164] ; (800f810 <prvAddCurrentTaskToDelayedList+0xb0>)
800f76c: 681b ldr r3, [r3, #0]
800f76e: 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 )
800f770: 4b28 ldr r3, [pc, #160] ; (800f814 <prvAddCurrentTaskToDelayedList+0xb4>)
800f772: 681b ldr r3, [r3, #0]
800f774: 3304 adds r3, #4
800f776: 4618 mov r0, r3
800f778: f7fd ff78 bl 800d66c <uxListRemove>
800f77c: 4603 mov r3, r0
800f77e: 2b00 cmp r3, #0
800f780: d10b bne.n 800f79a <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. */
800f782: 4b24 ldr r3, [pc, #144] ; (800f814 <prvAddCurrentTaskToDelayedList+0xb4>)
800f784: 681b ldr r3, [r3, #0]
800f786: 6adb ldr r3, [r3, #44] ; 0x2c
800f788: 2201 movs r2, #1
800f78a: fa02 f303 lsl.w r3, r2, r3
800f78e: 43da mvns r2, r3
800f790: 4b21 ldr r3, [pc, #132] ; (800f818 <prvAddCurrentTaskToDelayedList+0xb8>)
800f792: 681b ldr r3, [r3, #0]
800f794: 4013 ands r3, r2
800f796: 4a20 ldr r2, [pc, #128] ; (800f818 <prvAddCurrentTaskToDelayedList+0xb8>)
800f798: 6013 str r3, [r2, #0]
mtCOVERAGE_TEST_MARKER();
}
#if ( INCLUDE_vTaskSuspend == 1 )
{
if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) )
800f79a: 687b ldr r3, [r7, #4]
800f79c: f1b3 3fff cmp.w r3, #4294967295
800f7a0: d10a bne.n 800f7b8 <prvAddCurrentTaskToDelayedList+0x58>
800f7a2: 683b ldr r3, [r7, #0]
800f7a4: 2b00 cmp r3, #0
800f7a6: d007 beq.n 800f7b8 <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 ) );
800f7a8: 4b1a ldr r3, [pc, #104] ; (800f814 <prvAddCurrentTaskToDelayedList+0xb4>)
800f7aa: 681b ldr r3, [r3, #0]
800f7ac: 3304 adds r3, #4
800f7ae: 4619 mov r1, r3
800f7b0: 481a ldr r0, [pc, #104] ; (800f81c <prvAddCurrentTaskToDelayedList+0xbc>)
800f7b2: f7fd fefe bl 800d5b2 <vListInsertEnd>
/* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */
( void ) xCanBlockIndefinitely;
}
#endif /* INCLUDE_vTaskSuspend */
}
800f7b6: e026 b.n 800f806 <prvAddCurrentTaskToDelayedList+0xa6>
xTimeToWake = xConstTickCount + xTicksToWait;
800f7b8: 68fa ldr r2, [r7, #12]
800f7ba: 687b ldr r3, [r7, #4]
800f7bc: 4413 add r3, r2
800f7be: 60bb str r3, [r7, #8]
listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake );
800f7c0: 4b14 ldr r3, [pc, #80] ; (800f814 <prvAddCurrentTaskToDelayedList+0xb4>)
800f7c2: 681b ldr r3, [r3, #0]
800f7c4: 68ba ldr r2, [r7, #8]
800f7c6: 605a str r2, [r3, #4]
if( xTimeToWake < xConstTickCount )
800f7c8: 68ba ldr r2, [r7, #8]
800f7ca: 68fb ldr r3, [r7, #12]
800f7cc: 429a cmp r2, r3
800f7ce: d209 bcs.n 800f7e4 <prvAddCurrentTaskToDelayedList+0x84>
vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
800f7d0: 4b13 ldr r3, [pc, #76] ; (800f820 <prvAddCurrentTaskToDelayedList+0xc0>)
800f7d2: 681a ldr r2, [r3, #0]
800f7d4: 4b0f ldr r3, [pc, #60] ; (800f814 <prvAddCurrentTaskToDelayedList+0xb4>)
800f7d6: 681b ldr r3, [r3, #0]
800f7d8: 3304 adds r3, #4
800f7da: 4619 mov r1, r3
800f7dc: 4610 mov r0, r2
800f7de: f7fd ff0c bl 800d5fa <vListInsert>
}
800f7e2: e010 b.n 800f806 <prvAddCurrentTaskToDelayedList+0xa6>
vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
800f7e4: 4b0f ldr r3, [pc, #60] ; (800f824 <prvAddCurrentTaskToDelayedList+0xc4>)
800f7e6: 681a ldr r2, [r3, #0]
800f7e8: 4b0a ldr r3, [pc, #40] ; (800f814 <prvAddCurrentTaskToDelayedList+0xb4>)
800f7ea: 681b ldr r3, [r3, #0]
800f7ec: 3304 adds r3, #4
800f7ee: 4619 mov r1, r3
800f7f0: 4610 mov r0, r2
800f7f2: f7fd ff02 bl 800d5fa <vListInsert>
if( xTimeToWake < xNextTaskUnblockTime )
800f7f6: 4b0c ldr r3, [pc, #48] ; (800f828 <prvAddCurrentTaskToDelayedList+0xc8>)
800f7f8: 681b ldr r3, [r3, #0]
800f7fa: 68ba ldr r2, [r7, #8]
800f7fc: 429a cmp r2, r3
800f7fe: d202 bcs.n 800f806 <prvAddCurrentTaskToDelayedList+0xa6>
xNextTaskUnblockTime = xTimeToWake;
800f800: 4a09 ldr r2, [pc, #36] ; (800f828 <prvAddCurrentTaskToDelayedList+0xc8>)
800f802: 68bb ldr r3, [r7, #8]
800f804: 6013 str r3, [r2, #0]
}
800f806: bf00 nop
800f808: 3710 adds r7, #16
800f80a: 46bd mov sp, r7
800f80c: bd80 pop {r7, pc}
800f80e: bf00 nop
800f810: 2000067c .word 0x2000067c
800f814: 20000578 .word 0x20000578
800f818: 20000680 .word 0x20000680
800f81c: 20000664 .word 0x20000664
800f820: 20000634 .word 0x20000634
800f824: 20000630 .word 0x20000630
800f828: 20000698 .word 0x20000698
0800f82c <pxPortInitialiseStack>:
/*
* See header file for description.
*/
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{
800f82c: b480 push {r7}
800f82e: b085 sub sp, #20
800f830: af00 add r7, sp, #0
800f832: 60f8 str r0, [r7, #12]
800f834: 60b9 str r1, [r7, #8]
800f836: 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--;
800f838: 68fb ldr r3, [r7, #12]
800f83a: 3b04 subs r3, #4
800f83c: 60fb str r3, [r7, #12]
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */
800f83e: 68fb ldr r3, [r7, #12]
800f840: f04f 7280 mov.w r2, #16777216 ; 0x1000000
800f844: 601a str r2, [r3, #0]
pxTopOfStack--;
800f846: 68fb ldr r3, [r7, #12]
800f848: 3b04 subs r3, #4
800f84a: 60fb str r3, [r7, #12]
*pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */
800f84c: 68bb ldr r3, [r7, #8]
800f84e: f023 0201 bic.w r2, r3, #1
800f852: 68fb ldr r3, [r7, #12]
800f854: 601a str r2, [r3, #0]
pxTopOfStack--;
800f856: 68fb ldr r3, [r7, #12]
800f858: 3b04 subs r3, #4
800f85a: 60fb str r3, [r7, #12]
*pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */
800f85c: 4a0c ldr r2, [pc, #48] ; (800f890 <pxPortInitialiseStack+0x64>)
800f85e: 68fb ldr r3, [r7, #12]
800f860: 601a str r2, [r3, #0]
/* Save code space by skipping register initialisation. */
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */
800f862: 68fb ldr r3, [r7, #12]
800f864: 3b14 subs r3, #20
800f866: 60fb str r3, [r7, #12]
*pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */
800f868: 687a ldr r2, [r7, #4]
800f86a: 68fb ldr r3, [r7, #12]
800f86c: 601a str r2, [r3, #0]
/* A save method is being used that requires each task to maintain its
own exec return value. */
pxTopOfStack--;
800f86e: 68fb ldr r3, [r7, #12]
800f870: 3b04 subs r3, #4
800f872: 60fb str r3, [r7, #12]
*pxTopOfStack = portINITIAL_EXC_RETURN;
800f874: 68fb ldr r3, [r7, #12]
800f876: f06f 0202 mvn.w r2, #2
800f87a: 601a str r2, [r3, #0]
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
800f87c: 68fb ldr r3, [r7, #12]
800f87e: 3b20 subs r3, #32
800f880: 60fb str r3, [r7, #12]
return pxTopOfStack;
800f882: 68fb ldr r3, [r7, #12]
}
800f884: 4618 mov r0, r3
800f886: 3714 adds r7, #20
800f888: 46bd mov sp, r7
800f88a: f85d 7b04 ldr.w r7, [sp], #4
800f88e: 4770 bx lr
800f890: 0800f895 .word 0x0800f895
0800f894 <prvTaskExitError>:
/*-----------------------------------------------------------*/
static void prvTaskExitError( void )
{
800f894: b480 push {r7}
800f896: b085 sub sp, #20
800f898: af00 add r7, sp, #0
volatile uint32_t ulDummy = 0;
800f89a: 2300 movs r3, #0
800f89c: 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 );
800f89e: 4b13 ldr r3, [pc, #76] ; (800f8ec <prvTaskExitError+0x58>)
800f8a0: 681b ldr r3, [r3, #0]
800f8a2: f1b3 3fff cmp.w r3, #4294967295
800f8a6: d00b beq.n 800f8c0 <prvTaskExitError+0x2c>
800f8a8: f04f 0350 mov.w r3, #80 ; 0x50
800f8ac: b672 cpsid i
800f8ae: f383 8811 msr BASEPRI, r3
800f8b2: f3bf 8f6f isb sy
800f8b6: f3bf 8f4f dsb sy
800f8ba: b662 cpsie i
800f8bc: 60fb str r3, [r7, #12]
800f8be: e7fe b.n 800f8be <prvTaskExitError+0x2a>
800f8c0: f04f 0350 mov.w r3, #80 ; 0x50
800f8c4: b672 cpsid i
800f8c6: f383 8811 msr BASEPRI, r3
800f8ca: f3bf 8f6f isb sy
800f8ce: f3bf 8f4f dsb sy
800f8d2: b662 cpsie i
800f8d4: 60bb str r3, [r7, #8]
portDISABLE_INTERRUPTS();
while( ulDummy == 0 )
800f8d6: bf00 nop
800f8d8: 687b ldr r3, [r7, #4]
800f8da: 2b00 cmp r3, #0
800f8dc: d0fc beq.n 800f8d8 <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. */
}
}
800f8de: bf00 nop
800f8e0: 3714 adds r7, #20
800f8e2: 46bd mov sp, r7
800f8e4: f85d 7b04 ldr.w r7, [sp], #4
800f8e8: 4770 bx lr
800f8ea: bf00 nop
800f8ec: 2000005c .word 0x2000005c
0800f8f0 <SVC_Handler>:
/*-----------------------------------------------------------*/
void vPortSVCHandler( void )
{
__asm volatile (
800f8f0: 4b07 ldr r3, [pc, #28] ; (800f910 <pxCurrentTCBConst2>)
800f8f2: 6819 ldr r1, [r3, #0]
800f8f4: 6808 ldr r0, [r1, #0]
800f8f6: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
800f8fa: f380 8809 msr PSP, r0
800f8fe: f3bf 8f6f isb sy
800f902: f04f 0000 mov.w r0, #0
800f906: f380 8811 msr BASEPRI, r0
800f90a: 4770 bx lr
800f90c: f3af 8000 nop.w
0800f910 <pxCurrentTCBConst2>:
800f910: 20000578 .word 0x20000578
" bx r14 \n"
" \n"
" .align 4 \n"
"pxCurrentTCBConst2: .word pxCurrentTCB \n"
);
}
800f914: bf00 nop
800f916: bf00 nop
0800f918 <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(
800f918: 4808 ldr r0, [pc, #32] ; (800f93c <prvPortStartFirstTask+0x24>)
800f91a: 6800 ldr r0, [r0, #0]
800f91c: 6800 ldr r0, [r0, #0]
800f91e: f380 8808 msr MSP, r0
800f922: f04f 0000 mov.w r0, #0
800f926: f380 8814 msr CONTROL, r0
800f92a: b662 cpsie i
800f92c: b661 cpsie f
800f92e: f3bf 8f4f dsb sy
800f932: f3bf 8f6f isb sy
800f936: df00 svc 0
800f938: bf00 nop
" dsb \n"
" isb \n"
" svc 0 \n" /* System call to start first task. */
" nop \n"
);
}
800f93a: bf00 nop
800f93c: e000ed08 .word 0xe000ed08
0800f940 <xPortStartScheduler>:
/*
* See header file for description.
*/
BaseType_t xPortStartScheduler( void )
{
800f940: b580 push {r7, lr}
800f942: b084 sub sp, #16
800f944: 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 );
800f946: 4b36 ldr r3, [pc, #216] ; (800fa20 <xPortStartScheduler+0xe0>)
800f948: 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;
800f94a: 68fb ldr r3, [r7, #12]
800f94c: 781b ldrb r3, [r3, #0]
800f94e: b2db uxtb r3, r3
800f950: 607b str r3, [r7, #4]
/* Determine the number of priority bits available. First write to all
possible bits. */
*pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE;
800f952: 68fb ldr r3, [r7, #12]
800f954: 22ff movs r2, #255 ; 0xff
800f956: 701a strb r2, [r3, #0]
/* Read the value back to see how many bits stuck. */
ucMaxPriorityValue = *pucFirstUserPriorityRegister;
800f958: 68fb ldr r3, [r7, #12]
800f95a: 781b ldrb r3, [r3, #0]
800f95c: b2db uxtb r3, r3
800f95e: 70fb strb r3, [r7, #3]
/* Use the same mask on the maximum system call priority. */
ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue;
800f960: 78fb ldrb r3, [r7, #3]
800f962: b2db uxtb r3, r3
800f964: f003 0350 and.w r3, r3, #80 ; 0x50
800f968: b2da uxtb r2, r3
800f96a: 4b2e ldr r3, [pc, #184] ; (800fa24 <xPortStartScheduler+0xe4>)
800f96c: 701a strb r2, [r3, #0]
/* Calculate the maximum acceptable priority group value for the number
of bits read back. */
ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS;
800f96e: 4b2e ldr r3, [pc, #184] ; (800fa28 <xPortStartScheduler+0xe8>)
800f970: 2207 movs r2, #7
800f972: 601a str r2, [r3, #0]
while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
800f974: e009 b.n 800f98a <xPortStartScheduler+0x4a>
{
ulMaxPRIGROUPValue--;
800f976: 4b2c ldr r3, [pc, #176] ; (800fa28 <xPortStartScheduler+0xe8>)
800f978: 681b ldr r3, [r3, #0]
800f97a: 3b01 subs r3, #1
800f97c: 4a2a ldr r2, [pc, #168] ; (800fa28 <xPortStartScheduler+0xe8>)
800f97e: 6013 str r3, [r2, #0]
ucMaxPriorityValue <<= ( uint8_t ) 0x01;
800f980: 78fb ldrb r3, [r7, #3]
800f982: b2db uxtb r3, r3
800f984: 005b lsls r3, r3, #1
800f986: b2db uxtb r3, r3
800f988: 70fb strb r3, [r7, #3]
while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
800f98a: 78fb ldrb r3, [r7, #3]
800f98c: b2db uxtb r3, r3
800f98e: f003 0380 and.w r3, r3, #128 ; 0x80
800f992: 2b80 cmp r3, #128 ; 0x80
800f994: d0ef beq.n 800f976 <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 );
800f996: 4b24 ldr r3, [pc, #144] ; (800fa28 <xPortStartScheduler+0xe8>)
800f998: 681b ldr r3, [r3, #0]
800f99a: f1c3 0307 rsb r3, r3, #7
800f99e: 2b04 cmp r3, #4
800f9a0: d00b beq.n 800f9ba <xPortStartScheduler+0x7a>
800f9a2: f04f 0350 mov.w r3, #80 ; 0x50
800f9a6: b672 cpsid i
800f9a8: f383 8811 msr BASEPRI, r3
800f9ac: f3bf 8f6f isb sy
800f9b0: f3bf 8f4f dsb sy
800f9b4: b662 cpsie i
800f9b6: 60bb str r3, [r7, #8]
800f9b8: e7fe b.n 800f9b8 <xPortStartScheduler+0x78>
}
#endif
/* Shift the priority group value back to its position within the AIRCR
register. */
ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT;
800f9ba: 4b1b ldr r3, [pc, #108] ; (800fa28 <xPortStartScheduler+0xe8>)
800f9bc: 681b ldr r3, [r3, #0]
800f9be: 021b lsls r3, r3, #8
800f9c0: 4a19 ldr r2, [pc, #100] ; (800fa28 <xPortStartScheduler+0xe8>)
800f9c2: 6013 str r3, [r2, #0]
ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK;
800f9c4: 4b18 ldr r3, [pc, #96] ; (800fa28 <xPortStartScheduler+0xe8>)
800f9c6: 681b ldr r3, [r3, #0]
800f9c8: f403 63e0 and.w r3, r3, #1792 ; 0x700
800f9cc: 4a16 ldr r2, [pc, #88] ; (800fa28 <xPortStartScheduler+0xe8>)
800f9ce: 6013 str r3, [r2, #0]
/* Restore the clobbered interrupt priority register to its original
value. */
*pucFirstUserPriorityRegister = ulOriginalPriority;
800f9d0: 687b ldr r3, [r7, #4]
800f9d2: b2da uxtb r2, r3
800f9d4: 68fb ldr r3, [r7, #12]
800f9d6: 701a strb r2, [r3, #0]
}
#endif /* conifgASSERT_DEFINED */
/* Make PendSV and SysTick the lowest priority interrupts. */
portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI;
800f9d8: 4b14 ldr r3, [pc, #80] ; (800fa2c <xPortStartScheduler+0xec>)
800f9da: 681b ldr r3, [r3, #0]
800f9dc: 4a13 ldr r2, [pc, #76] ; (800fa2c <xPortStartScheduler+0xec>)
800f9de: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
800f9e2: 6013 str r3, [r2, #0]
portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI;
800f9e4: 4b11 ldr r3, [pc, #68] ; (800fa2c <xPortStartScheduler+0xec>)
800f9e6: 681b ldr r3, [r3, #0]
800f9e8: 4a10 ldr r2, [pc, #64] ; (800fa2c <xPortStartScheduler+0xec>)
800f9ea: f043 4370 orr.w r3, r3, #4026531840 ; 0xf0000000
800f9ee: 6013 str r3, [r2, #0]
/* Start the timer that generates the tick ISR. Interrupts are disabled
here already. */
vPortSetupTimerInterrupt();
800f9f0: f000 f8d4 bl 800fb9c <vPortSetupTimerInterrupt>
/* Initialise the critical nesting count ready for the first task. */
uxCriticalNesting = 0;
800f9f4: 4b0e ldr r3, [pc, #56] ; (800fa30 <xPortStartScheduler+0xf0>)
800f9f6: 2200 movs r2, #0
800f9f8: 601a str r2, [r3, #0]
/* Ensure the VFP is enabled - it should be anyway. */
vPortEnableVFP();
800f9fa: f000 f8f3 bl 800fbe4 <vPortEnableVFP>
/* Lazy save always. */
*( portFPCCR ) |= portASPEN_AND_LSPEN_BITS;
800f9fe: 4b0d ldr r3, [pc, #52] ; (800fa34 <xPortStartScheduler+0xf4>)
800fa00: 681b ldr r3, [r3, #0]
800fa02: 4a0c ldr r2, [pc, #48] ; (800fa34 <xPortStartScheduler+0xf4>)
800fa04: f043 4340 orr.w r3, r3, #3221225472 ; 0xc0000000
800fa08: 6013 str r3, [r2, #0]
/* Start the first task. */
prvPortStartFirstTask();
800fa0a: f7ff ff85 bl 800f918 <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();
800fa0e: f7ff fa69 bl 800eee4 <vTaskSwitchContext>
prvTaskExitError();
800fa12: f7ff ff3f bl 800f894 <prvTaskExitError>
/* Should not get here! */
return 0;
800fa16: 2300 movs r3, #0
}
800fa18: 4618 mov r0, r3
800fa1a: 3710 adds r7, #16
800fa1c: 46bd mov sp, r7
800fa1e: bd80 pop {r7, pc}
800fa20: e000e400 .word 0xe000e400
800fa24: 200006a4 .word 0x200006a4
800fa28: 200006a8 .word 0x200006a8
800fa2c: e000ed20 .word 0xe000ed20
800fa30: 2000005c .word 0x2000005c
800fa34: e000ef34 .word 0xe000ef34
0800fa38 <vPortEnterCritical>:
configASSERT( uxCriticalNesting == 1000UL );
}
/*-----------------------------------------------------------*/
void vPortEnterCritical( void )
{
800fa38: b480 push {r7}
800fa3a: b083 sub sp, #12
800fa3c: af00 add r7, sp, #0
800fa3e: f04f 0350 mov.w r3, #80 ; 0x50
800fa42: b672 cpsid i
800fa44: f383 8811 msr BASEPRI, r3
800fa48: f3bf 8f6f isb sy
800fa4c: f3bf 8f4f dsb sy
800fa50: b662 cpsie i
800fa52: 607b str r3, [r7, #4]
portDISABLE_INTERRUPTS();
uxCriticalNesting++;
800fa54: 4b0f ldr r3, [pc, #60] ; (800fa94 <vPortEnterCritical+0x5c>)
800fa56: 681b ldr r3, [r3, #0]
800fa58: 3301 adds r3, #1
800fa5a: 4a0e ldr r2, [pc, #56] ; (800fa94 <vPortEnterCritical+0x5c>)
800fa5c: 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 )
800fa5e: 4b0d ldr r3, [pc, #52] ; (800fa94 <vPortEnterCritical+0x5c>)
800fa60: 681b ldr r3, [r3, #0]
800fa62: 2b01 cmp r3, #1
800fa64: d110 bne.n 800fa88 <vPortEnterCritical+0x50>
{
configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 );
800fa66: 4b0c ldr r3, [pc, #48] ; (800fa98 <vPortEnterCritical+0x60>)
800fa68: 681b ldr r3, [r3, #0]
800fa6a: b2db uxtb r3, r3
800fa6c: 2b00 cmp r3, #0
800fa6e: d00b beq.n 800fa88 <vPortEnterCritical+0x50>
800fa70: f04f 0350 mov.w r3, #80 ; 0x50
800fa74: b672 cpsid i
800fa76: f383 8811 msr BASEPRI, r3
800fa7a: f3bf 8f6f isb sy
800fa7e: f3bf 8f4f dsb sy
800fa82: b662 cpsie i
800fa84: 603b str r3, [r7, #0]
800fa86: e7fe b.n 800fa86 <vPortEnterCritical+0x4e>
}
}
800fa88: bf00 nop
800fa8a: 370c adds r7, #12
800fa8c: 46bd mov sp, r7
800fa8e: f85d 7b04 ldr.w r7, [sp], #4
800fa92: 4770 bx lr
800fa94: 2000005c .word 0x2000005c
800fa98: e000ed04 .word 0xe000ed04
0800fa9c <vPortExitCritical>:
/*-----------------------------------------------------------*/
void vPortExitCritical( void )
{
800fa9c: b480 push {r7}
800fa9e: b083 sub sp, #12
800faa0: af00 add r7, sp, #0
configASSERT( uxCriticalNesting );
800faa2: 4b12 ldr r3, [pc, #72] ; (800faec <vPortExitCritical+0x50>)
800faa4: 681b ldr r3, [r3, #0]
800faa6: 2b00 cmp r3, #0
800faa8: d10b bne.n 800fac2 <vPortExitCritical+0x26>
800faaa: f04f 0350 mov.w r3, #80 ; 0x50
800faae: b672 cpsid i
800fab0: f383 8811 msr BASEPRI, r3
800fab4: f3bf 8f6f isb sy
800fab8: f3bf 8f4f dsb sy
800fabc: b662 cpsie i
800fabe: 607b str r3, [r7, #4]
800fac0: e7fe b.n 800fac0 <vPortExitCritical+0x24>
uxCriticalNesting--;
800fac2: 4b0a ldr r3, [pc, #40] ; (800faec <vPortExitCritical+0x50>)
800fac4: 681b ldr r3, [r3, #0]
800fac6: 3b01 subs r3, #1
800fac8: 4a08 ldr r2, [pc, #32] ; (800faec <vPortExitCritical+0x50>)
800faca: 6013 str r3, [r2, #0]
if( uxCriticalNesting == 0 )
800facc: 4b07 ldr r3, [pc, #28] ; (800faec <vPortExitCritical+0x50>)
800face: 681b ldr r3, [r3, #0]
800fad0: 2b00 cmp r3, #0
800fad2: d104 bne.n 800fade <vPortExitCritical+0x42>
800fad4: 2300 movs r3, #0
800fad6: 603b str r3, [r7, #0]
__asm volatile
800fad8: 683b ldr r3, [r7, #0]
800fada: f383 8811 msr BASEPRI, r3
{
portENABLE_INTERRUPTS();
}
}
800fade: bf00 nop
800fae0: 370c adds r7, #12
800fae2: 46bd mov sp, r7
800fae4: f85d 7b04 ldr.w r7, [sp], #4
800fae8: 4770 bx lr
800faea: bf00 nop
800faec: 2000005c .word 0x2000005c
0800faf0 <PendSV_Handler>:
void xPortPendSVHandler( void )
{
/* This is a naked function. */
__asm volatile
800faf0: f3ef 8009 mrs r0, PSP
800faf4: f3bf 8f6f isb sy
800faf8: 4b15 ldr r3, [pc, #84] ; (800fb50 <pxCurrentTCBConst>)
800fafa: 681a ldr r2, [r3, #0]
800fafc: f01e 0f10 tst.w lr, #16
800fb00: bf08 it eq
800fb02: ed20 8a10 vstmdbeq r0!, {s16-s31}
800fb06: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
800fb0a: 6010 str r0, [r2, #0]
800fb0c: e92d 0009 stmdb sp!, {r0, r3}
800fb10: f04f 0050 mov.w r0, #80 ; 0x50
800fb14: b672 cpsid i
800fb16: f380 8811 msr BASEPRI, r0
800fb1a: f3bf 8f4f dsb sy
800fb1e: f3bf 8f6f isb sy
800fb22: b662 cpsie i
800fb24: f7ff f9de bl 800eee4 <vTaskSwitchContext>
800fb28: f04f 0000 mov.w r0, #0
800fb2c: f380 8811 msr BASEPRI, r0
800fb30: bc09 pop {r0, r3}
800fb32: 6819 ldr r1, [r3, #0]
800fb34: 6808 ldr r0, [r1, #0]
800fb36: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
800fb3a: f01e 0f10 tst.w lr, #16
800fb3e: bf08 it eq
800fb40: ecb0 8a10 vldmiaeq r0!, {s16-s31}
800fb44: f380 8809 msr PSP, r0
800fb48: f3bf 8f6f isb sy
800fb4c: 4770 bx lr
800fb4e: bf00 nop
0800fb50 <pxCurrentTCBConst>:
800fb50: 20000578 .word 0x20000578
" \n"
" .align 4 \n"
"pxCurrentTCBConst: .word pxCurrentTCB \n"
::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY)
);
}
800fb54: bf00 nop
800fb56: bf00 nop
0800fb58 <SysTick_Handler>:
/*-----------------------------------------------------------*/
void xPortSysTickHandler( void )
{
800fb58: b580 push {r7, lr}
800fb5a: b082 sub sp, #8
800fb5c: af00 add r7, sp, #0
__asm volatile
800fb5e: f04f 0350 mov.w r3, #80 ; 0x50
800fb62: b672 cpsid i
800fb64: f383 8811 msr BASEPRI, r3
800fb68: f3bf 8f6f isb sy
800fb6c: f3bf 8f4f dsb sy
800fb70: b662 cpsie i
800fb72: 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 )
800fb74: f7ff f8fc bl 800ed70 <xTaskIncrementTick>
800fb78: 4603 mov r3, r0
800fb7a: 2b00 cmp r3, #0
800fb7c: d003 beq.n 800fb86 <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;
800fb7e: 4b06 ldr r3, [pc, #24] ; (800fb98 <SysTick_Handler+0x40>)
800fb80: f04f 5280 mov.w r2, #268435456 ; 0x10000000
800fb84: 601a str r2, [r3, #0]
800fb86: 2300 movs r3, #0
800fb88: 603b str r3, [r7, #0]
__asm volatile
800fb8a: 683b ldr r3, [r7, #0]
800fb8c: f383 8811 msr BASEPRI, r3
}
}
portENABLE_INTERRUPTS();
}
800fb90: bf00 nop
800fb92: 3708 adds r7, #8
800fb94: 46bd mov sp, r7
800fb96: bd80 pop {r7, pc}
800fb98: e000ed04 .word 0xe000ed04
0800fb9c <vPortSetupTimerInterrupt>:
/*
* Setup the systick timer to generate the tick interrupts at the required
* frequency.
*/
__attribute__(( weak )) void vPortSetupTimerInterrupt( void )
{
800fb9c: b480 push {r7}
800fb9e: 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;
800fba0: 4b0b ldr r3, [pc, #44] ; (800fbd0 <vPortSetupTimerInterrupt+0x34>)
800fba2: 2200 movs r2, #0
800fba4: 601a str r2, [r3, #0]
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;
800fba6: 4b0b ldr r3, [pc, #44] ; (800fbd4 <vPortSetupTimerInterrupt+0x38>)
800fba8: 2200 movs r2, #0
800fbaa: 601a str r2, [r3, #0]
/* Configure SysTick to interrupt at the requested rate. */
portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
800fbac: 4b0a ldr r3, [pc, #40] ; (800fbd8 <vPortSetupTimerInterrupt+0x3c>)
800fbae: 681b ldr r3, [r3, #0]
800fbb0: 4a0a ldr r2, [pc, #40] ; (800fbdc <vPortSetupTimerInterrupt+0x40>)
800fbb2: fba2 2303 umull r2, r3, r2, r3
800fbb6: 099b lsrs r3, r3, #6
800fbb8: 4a09 ldr r2, [pc, #36] ; (800fbe0 <vPortSetupTimerInterrupt+0x44>)
800fbba: 3b01 subs r3, #1
800fbbc: 6013 str r3, [r2, #0]
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT );
800fbbe: 4b04 ldr r3, [pc, #16] ; (800fbd0 <vPortSetupTimerInterrupt+0x34>)
800fbc0: 2207 movs r2, #7
800fbc2: 601a str r2, [r3, #0]
}
800fbc4: bf00 nop
800fbc6: 46bd mov sp, r7
800fbc8: f85d 7b04 ldr.w r7, [sp], #4
800fbcc: 4770 bx lr
800fbce: bf00 nop
800fbd0: e000e010 .word 0xe000e010
800fbd4: e000e018 .word 0xe000e018
800fbd8: 20000050 .word 0x20000050
800fbdc: 10624dd3 .word 0x10624dd3
800fbe0: e000e014 .word 0xe000e014
0800fbe4 <vPortEnableVFP>:
/*-----------------------------------------------------------*/
/* This is a naked function. */
static void vPortEnableVFP( void )
{
__asm volatile
800fbe4: f8df 000c ldr.w r0, [pc, #12] ; 800fbf4 <vPortEnableVFP+0x10>
800fbe8: 6801 ldr r1, [r0, #0]
800fbea: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000
800fbee: 6001 str r1, [r0, #0]
800fbf0: 4770 bx lr
" \n"
" orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */
" str r1, [r0] \n"
" bx r14 "
);
}
800fbf2: bf00 nop
800fbf4: e000ed88 .word 0xe000ed88
0800fbf8 <vPortValidateInterruptPriority>:
/*-----------------------------------------------------------*/
#if( configASSERT_DEFINED == 1 )
void vPortValidateInterruptPriority( void )
{
800fbf8: b480 push {r7}
800fbfa: b085 sub sp, #20
800fbfc: 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" );
800fbfe: f3ef 8305 mrs r3, IPSR
800fc02: 60fb str r3, [r7, #12]
/* Is the interrupt number a user defined interrupt? */
if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER )
800fc04: 68fb ldr r3, [r7, #12]
800fc06: 2b0f cmp r3, #15
800fc08: d915 bls.n 800fc36 <vPortValidateInterruptPriority+0x3e>
{
/* Look up the interrupt's priority. */
ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ];
800fc0a: 4a18 ldr r2, [pc, #96] ; (800fc6c <vPortValidateInterruptPriority+0x74>)
800fc0c: 68fb ldr r3, [r7, #12]
800fc0e: 4413 add r3, r2
800fc10: 781b ldrb r3, [r3, #0]
800fc12: 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 );
800fc14: 4b16 ldr r3, [pc, #88] ; (800fc70 <vPortValidateInterruptPriority+0x78>)
800fc16: 781b ldrb r3, [r3, #0]
800fc18: 7afa ldrb r2, [r7, #11]
800fc1a: 429a cmp r2, r3
800fc1c: d20b bcs.n 800fc36 <vPortValidateInterruptPriority+0x3e>
__asm volatile
800fc1e: f04f 0350 mov.w r3, #80 ; 0x50
800fc22: b672 cpsid i
800fc24: f383 8811 msr BASEPRI, r3
800fc28: f3bf 8f6f isb sy
800fc2c: f3bf 8f4f dsb sy
800fc30: b662 cpsie i
800fc32: 607b str r3, [r7, #4]
800fc34: e7fe b.n 800fc34 <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 );
800fc36: 4b0f ldr r3, [pc, #60] ; (800fc74 <vPortValidateInterruptPriority+0x7c>)
800fc38: 681b ldr r3, [r3, #0]
800fc3a: f403 62e0 and.w r2, r3, #1792 ; 0x700
800fc3e: 4b0e ldr r3, [pc, #56] ; (800fc78 <vPortValidateInterruptPriority+0x80>)
800fc40: 681b ldr r3, [r3, #0]
800fc42: 429a cmp r2, r3
800fc44: d90b bls.n 800fc5e <vPortValidateInterruptPriority+0x66>
800fc46: f04f 0350 mov.w r3, #80 ; 0x50
800fc4a: b672 cpsid i
800fc4c: f383 8811 msr BASEPRI, r3
800fc50: f3bf 8f6f isb sy
800fc54: f3bf 8f4f dsb sy
800fc58: b662 cpsie i
800fc5a: 603b str r3, [r7, #0]
800fc5c: e7fe b.n 800fc5c <vPortValidateInterruptPriority+0x64>
}
800fc5e: bf00 nop
800fc60: 3714 adds r7, #20
800fc62: 46bd mov sp, r7
800fc64: f85d 7b04 ldr.w r7, [sp], #4
800fc68: 4770 bx lr
800fc6a: bf00 nop
800fc6c: e000e3f0 .word 0xe000e3f0
800fc70: 200006a4 .word 0x200006a4
800fc74: e000ed0c .word 0xe000ed0c
800fc78: 200006a8 .word 0x200006a8
0800fc7c <pvPortMalloc>:
static size_t xBlockAllocatedBit = 0;
/*-----------------------------------------------------------*/
void *pvPortMalloc( size_t xWantedSize )
{
800fc7c: b580 push {r7, lr}
800fc7e: b08a sub sp, #40 ; 0x28
800fc80: af00 add r7, sp, #0
800fc82: 6078 str r0, [r7, #4]
BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
void *pvReturn = NULL;
800fc84: 2300 movs r3, #0
800fc86: 61fb str r3, [r7, #28]
vTaskSuspendAll();
800fc88: f7fe ffa4 bl 800ebd4 <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 )
800fc8c: 4b5c ldr r3, [pc, #368] ; (800fe00 <pvPortMalloc+0x184>)
800fc8e: 681b ldr r3, [r3, #0]
800fc90: 2b00 cmp r3, #0
800fc92: d101 bne.n 800fc98 <pvPortMalloc+0x1c>
{
prvHeapInit();
800fc94: f000 f91a bl 800fecc <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 )
800fc98: 4b5a ldr r3, [pc, #360] ; (800fe04 <pvPortMalloc+0x188>)
800fc9a: 681a ldr r2, [r3, #0]
800fc9c: 687b ldr r3, [r7, #4]
800fc9e: 4013 ands r3, r2
800fca0: 2b00 cmp r3, #0
800fca2: f040 8090 bne.w 800fdc6 <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 )
800fca6: 687b ldr r3, [r7, #4]
800fca8: 2b00 cmp r3, #0
800fcaa: d01e beq.n 800fcea <pvPortMalloc+0x6e>
{
xWantedSize += xHeapStructSize;
800fcac: 2208 movs r2, #8
800fcae: 687b ldr r3, [r7, #4]
800fcb0: 4413 add r3, r2
800fcb2: 607b str r3, [r7, #4]
/* Ensure that blocks are always aligned to the required number
of bytes. */
if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )
800fcb4: 687b ldr r3, [r7, #4]
800fcb6: f003 0307 and.w r3, r3, #7
800fcba: 2b00 cmp r3, #0
800fcbc: d015 beq.n 800fcea <pvPortMalloc+0x6e>
{
/* Byte alignment required. */
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
800fcbe: 687b ldr r3, [r7, #4]
800fcc0: f023 0307 bic.w r3, r3, #7
800fcc4: 3308 adds r3, #8
800fcc6: 607b str r3, [r7, #4]
configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 );
800fcc8: 687b ldr r3, [r7, #4]
800fcca: f003 0307 and.w r3, r3, #7
800fcce: 2b00 cmp r3, #0
800fcd0: d00b beq.n 800fcea <pvPortMalloc+0x6e>
800fcd2: f04f 0350 mov.w r3, #80 ; 0x50
800fcd6: b672 cpsid i
800fcd8: f383 8811 msr BASEPRI, r3
800fcdc: f3bf 8f6f isb sy
800fce0: f3bf 8f4f dsb sy
800fce4: b662 cpsie i
800fce6: 617b str r3, [r7, #20]
800fce8: e7fe b.n 800fce8 <pvPortMalloc+0x6c>
else
{
mtCOVERAGE_TEST_MARKER();
}
if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) )
800fcea: 687b ldr r3, [r7, #4]
800fcec: 2b00 cmp r3, #0
800fcee: d06a beq.n 800fdc6 <pvPortMalloc+0x14a>
800fcf0: 4b45 ldr r3, [pc, #276] ; (800fe08 <pvPortMalloc+0x18c>)
800fcf2: 681b ldr r3, [r3, #0]
800fcf4: 687a ldr r2, [r7, #4]
800fcf6: 429a cmp r2, r3
800fcf8: d865 bhi.n 800fdc6 <pvPortMalloc+0x14a>
{
/* Traverse the list from the start (lowest address) block until
one of adequate size is found. */
pxPreviousBlock = &xStart;
800fcfa: 4b44 ldr r3, [pc, #272] ; (800fe0c <pvPortMalloc+0x190>)
800fcfc: 623b str r3, [r7, #32]
pxBlock = xStart.pxNextFreeBlock;
800fcfe: 4b43 ldr r3, [pc, #268] ; (800fe0c <pvPortMalloc+0x190>)
800fd00: 681b ldr r3, [r3, #0]
800fd02: 627b str r3, [r7, #36] ; 0x24
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
800fd04: e004 b.n 800fd10 <pvPortMalloc+0x94>
{
pxPreviousBlock = pxBlock;
800fd06: 6a7b ldr r3, [r7, #36] ; 0x24
800fd08: 623b str r3, [r7, #32]
pxBlock = pxBlock->pxNextFreeBlock;
800fd0a: 6a7b ldr r3, [r7, #36] ; 0x24
800fd0c: 681b ldr r3, [r3, #0]
800fd0e: 627b str r3, [r7, #36] ; 0x24
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
800fd10: 6a7b ldr r3, [r7, #36] ; 0x24
800fd12: 685b ldr r3, [r3, #4]
800fd14: 687a ldr r2, [r7, #4]
800fd16: 429a cmp r2, r3
800fd18: d903 bls.n 800fd22 <pvPortMalloc+0xa6>
800fd1a: 6a7b ldr r3, [r7, #36] ; 0x24
800fd1c: 681b ldr r3, [r3, #0]
800fd1e: 2b00 cmp r3, #0
800fd20: d1f1 bne.n 800fd06 <pvPortMalloc+0x8a>
}
/* If the end marker was reached then a block of adequate size
was not found. */
if( pxBlock != pxEnd )
800fd22: 4b37 ldr r3, [pc, #220] ; (800fe00 <pvPortMalloc+0x184>)
800fd24: 681b ldr r3, [r3, #0]
800fd26: 6a7a ldr r2, [r7, #36] ; 0x24
800fd28: 429a cmp r2, r3
800fd2a: d04c beq.n 800fdc6 <pvPortMalloc+0x14a>
{
/* Return the memory space pointed to - jumping over the
BlockLink_t structure at its start. */
pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize );
800fd2c: 6a3b ldr r3, [r7, #32]
800fd2e: 681b ldr r3, [r3, #0]
800fd30: 2208 movs r2, #8
800fd32: 4413 add r3, r2
800fd34: 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;
800fd36: 6a7b ldr r3, [r7, #36] ; 0x24
800fd38: 681a ldr r2, [r3, #0]
800fd3a: 6a3b ldr r3, [r7, #32]
800fd3c: 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 )
800fd3e: 6a7b ldr r3, [r7, #36] ; 0x24
800fd40: 685a ldr r2, [r3, #4]
800fd42: 687b ldr r3, [r7, #4]
800fd44: 1ad2 subs r2, r2, r3
800fd46: 2308 movs r3, #8
800fd48: 005b lsls r3, r3, #1
800fd4a: 429a cmp r2, r3
800fd4c: d920 bls.n 800fd90 <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 );
800fd4e: 6a7a ldr r2, [r7, #36] ; 0x24
800fd50: 687b ldr r3, [r7, #4]
800fd52: 4413 add r3, r2
800fd54: 61bb str r3, [r7, #24]
configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 );
800fd56: 69bb ldr r3, [r7, #24]
800fd58: f003 0307 and.w r3, r3, #7
800fd5c: 2b00 cmp r3, #0
800fd5e: d00b beq.n 800fd78 <pvPortMalloc+0xfc>
800fd60: f04f 0350 mov.w r3, #80 ; 0x50
800fd64: b672 cpsid i
800fd66: f383 8811 msr BASEPRI, r3
800fd6a: f3bf 8f6f isb sy
800fd6e: f3bf 8f4f dsb sy
800fd72: b662 cpsie i
800fd74: 613b str r3, [r7, #16]
800fd76: e7fe b.n 800fd76 <pvPortMalloc+0xfa>
/* Calculate the sizes of two blocks split from the
single block. */
pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
800fd78: 6a7b ldr r3, [r7, #36] ; 0x24
800fd7a: 685a ldr r2, [r3, #4]
800fd7c: 687b ldr r3, [r7, #4]
800fd7e: 1ad2 subs r2, r2, r3
800fd80: 69bb ldr r3, [r7, #24]
800fd82: 605a str r2, [r3, #4]
pxBlock->xBlockSize = xWantedSize;
800fd84: 6a7b ldr r3, [r7, #36] ; 0x24
800fd86: 687a ldr r2, [r7, #4]
800fd88: 605a str r2, [r3, #4]
/* Insert the new block into the list of free blocks. */
prvInsertBlockIntoFreeList( pxNewBlockLink );
800fd8a: 69b8 ldr r0, [r7, #24]
800fd8c: f000 f900 bl 800ff90 <prvInsertBlockIntoFreeList>
else
{
mtCOVERAGE_TEST_MARKER();
}
xFreeBytesRemaining -= pxBlock->xBlockSize;
800fd90: 4b1d ldr r3, [pc, #116] ; (800fe08 <pvPortMalloc+0x18c>)
800fd92: 681a ldr r2, [r3, #0]
800fd94: 6a7b ldr r3, [r7, #36] ; 0x24
800fd96: 685b ldr r3, [r3, #4]
800fd98: 1ad3 subs r3, r2, r3
800fd9a: 4a1b ldr r2, [pc, #108] ; (800fe08 <pvPortMalloc+0x18c>)
800fd9c: 6013 str r3, [r2, #0]
if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining )
800fd9e: 4b1a ldr r3, [pc, #104] ; (800fe08 <pvPortMalloc+0x18c>)
800fda0: 681a ldr r2, [r3, #0]
800fda2: 4b1b ldr r3, [pc, #108] ; (800fe10 <pvPortMalloc+0x194>)
800fda4: 681b ldr r3, [r3, #0]
800fda6: 429a cmp r2, r3
800fda8: d203 bcs.n 800fdb2 <pvPortMalloc+0x136>
{
xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;
800fdaa: 4b17 ldr r3, [pc, #92] ; (800fe08 <pvPortMalloc+0x18c>)
800fdac: 681b ldr r3, [r3, #0]
800fdae: 4a18 ldr r2, [pc, #96] ; (800fe10 <pvPortMalloc+0x194>)
800fdb0: 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;
800fdb2: 6a7b ldr r3, [r7, #36] ; 0x24
800fdb4: 685a ldr r2, [r3, #4]
800fdb6: 4b13 ldr r3, [pc, #76] ; (800fe04 <pvPortMalloc+0x188>)
800fdb8: 681b ldr r3, [r3, #0]
800fdba: 431a orrs r2, r3
800fdbc: 6a7b ldr r3, [r7, #36] ; 0x24
800fdbe: 605a str r2, [r3, #4]
pxBlock->pxNextFreeBlock = NULL;
800fdc0: 6a7b ldr r3, [r7, #36] ; 0x24
800fdc2: 2200 movs r2, #0
800fdc4: 601a str r2, [r3, #0]
mtCOVERAGE_TEST_MARKER();
}
traceMALLOC( pvReturn, xWantedSize );
}
( void ) xTaskResumeAll();
800fdc6: f7fe ff13 bl 800ebf0 <xTaskResumeAll>
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
{
if( pvReturn == NULL )
800fdca: 69fb ldr r3, [r7, #28]
800fdcc: 2b00 cmp r3, #0
800fdce: d101 bne.n 800fdd4 <pvPortMalloc+0x158>
{
extern void vApplicationMallocFailedHook( void );
vApplicationMallocFailedHook();
800fdd0: f7f0 fc00 bl 80005d4 <vApplicationMallocFailedHook>
mtCOVERAGE_TEST_MARKER();
}
}
#endif
configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 );
800fdd4: 69fb ldr r3, [r7, #28]
800fdd6: f003 0307 and.w r3, r3, #7
800fdda: 2b00 cmp r3, #0
800fddc: d00b beq.n 800fdf6 <pvPortMalloc+0x17a>
800fdde: f04f 0350 mov.w r3, #80 ; 0x50
800fde2: b672 cpsid i
800fde4: f383 8811 msr BASEPRI, r3
800fde8: f3bf 8f6f isb sy
800fdec: f3bf 8f4f dsb sy
800fdf0: b662 cpsie i
800fdf2: 60fb str r3, [r7, #12]
800fdf4: e7fe b.n 800fdf4 <pvPortMalloc+0x178>
return pvReturn;
800fdf6: 69fb ldr r3, [r7, #28]
}
800fdf8: 4618 mov r0, r3
800fdfa: 3728 adds r7, #40 ; 0x28
800fdfc: 46bd mov sp, r7
800fdfe: bd80 pop {r7, pc}
800fe00: 200086b4 .word 0x200086b4
800fe04: 200086c0 .word 0x200086c0
800fe08: 200086b8 .word 0x200086b8
800fe0c: 200086ac .word 0x200086ac
800fe10: 200086bc .word 0x200086bc
0800fe14 <vPortFree>:
/*-----------------------------------------------------------*/
void vPortFree( void *pv )
{
800fe14: b580 push {r7, lr}
800fe16: b086 sub sp, #24
800fe18: af00 add r7, sp, #0
800fe1a: 6078 str r0, [r7, #4]
uint8_t *puc = ( uint8_t * ) pv;
800fe1c: 687b ldr r3, [r7, #4]
800fe1e: 617b str r3, [r7, #20]
BlockLink_t *pxLink;
if( pv != NULL )
800fe20: 687b ldr r3, [r7, #4]
800fe22: 2b00 cmp r3, #0
800fe24: d04a beq.n 800febc <vPortFree+0xa8>
{
/* The memory being freed will have an BlockLink_t structure immediately
before it. */
puc -= xHeapStructSize;
800fe26: 2308 movs r3, #8
800fe28: 425b negs r3, r3
800fe2a: 697a ldr r2, [r7, #20]
800fe2c: 4413 add r3, r2
800fe2e: 617b str r3, [r7, #20]
/* This casting is to keep the compiler from issuing warnings. */
pxLink = ( void * ) puc;
800fe30: 697b ldr r3, [r7, #20]
800fe32: 613b str r3, [r7, #16]
/* Check the block is actually allocated. */
configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
800fe34: 693b ldr r3, [r7, #16]
800fe36: 685a ldr r2, [r3, #4]
800fe38: 4b22 ldr r3, [pc, #136] ; (800fec4 <vPortFree+0xb0>)
800fe3a: 681b ldr r3, [r3, #0]
800fe3c: 4013 ands r3, r2
800fe3e: 2b00 cmp r3, #0
800fe40: d10b bne.n 800fe5a <vPortFree+0x46>
800fe42: f04f 0350 mov.w r3, #80 ; 0x50
800fe46: b672 cpsid i
800fe48: f383 8811 msr BASEPRI, r3
800fe4c: f3bf 8f6f isb sy
800fe50: f3bf 8f4f dsb sy
800fe54: b662 cpsie i
800fe56: 60fb str r3, [r7, #12]
800fe58: e7fe b.n 800fe58 <vPortFree+0x44>
configASSERT( pxLink->pxNextFreeBlock == NULL );
800fe5a: 693b ldr r3, [r7, #16]
800fe5c: 681b ldr r3, [r3, #0]
800fe5e: 2b00 cmp r3, #0
800fe60: d00b beq.n 800fe7a <vPortFree+0x66>
800fe62: f04f 0350 mov.w r3, #80 ; 0x50
800fe66: b672 cpsid i
800fe68: f383 8811 msr BASEPRI, r3
800fe6c: f3bf 8f6f isb sy
800fe70: f3bf 8f4f dsb sy
800fe74: b662 cpsie i
800fe76: 60bb str r3, [r7, #8]
800fe78: e7fe b.n 800fe78 <vPortFree+0x64>
if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 )
800fe7a: 693b ldr r3, [r7, #16]
800fe7c: 685a ldr r2, [r3, #4]
800fe7e: 4b11 ldr r3, [pc, #68] ; (800fec4 <vPortFree+0xb0>)
800fe80: 681b ldr r3, [r3, #0]
800fe82: 4013 ands r3, r2
800fe84: 2b00 cmp r3, #0
800fe86: d019 beq.n 800febc <vPortFree+0xa8>
{
if( pxLink->pxNextFreeBlock == NULL )
800fe88: 693b ldr r3, [r7, #16]
800fe8a: 681b ldr r3, [r3, #0]
800fe8c: 2b00 cmp r3, #0
800fe8e: d115 bne.n 800febc <vPortFree+0xa8>
{
/* The block is being returned to the heap - it is no longer
allocated. */
pxLink->xBlockSize &= ~xBlockAllocatedBit;
800fe90: 693b ldr r3, [r7, #16]
800fe92: 685a ldr r2, [r3, #4]
800fe94: 4b0b ldr r3, [pc, #44] ; (800fec4 <vPortFree+0xb0>)
800fe96: 681b ldr r3, [r3, #0]
800fe98: 43db mvns r3, r3
800fe9a: 401a ands r2, r3
800fe9c: 693b ldr r3, [r7, #16]
800fe9e: 605a str r2, [r3, #4]
vTaskSuspendAll();
800fea0: f7fe fe98 bl 800ebd4 <vTaskSuspendAll>
{
/* Add this block to the list of free blocks. */
xFreeBytesRemaining += pxLink->xBlockSize;
800fea4: 693b ldr r3, [r7, #16]
800fea6: 685a ldr r2, [r3, #4]
800fea8: 4b07 ldr r3, [pc, #28] ; (800fec8 <vPortFree+0xb4>)
800feaa: 681b ldr r3, [r3, #0]
800feac: 4413 add r3, r2
800feae: 4a06 ldr r2, [pc, #24] ; (800fec8 <vPortFree+0xb4>)
800feb0: 6013 str r3, [r2, #0]
traceFREE( pv, pxLink->xBlockSize );
prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
800feb2: 6938 ldr r0, [r7, #16]
800feb4: f000 f86c bl 800ff90 <prvInsertBlockIntoFreeList>
}
( void ) xTaskResumeAll();
800feb8: f7fe fe9a bl 800ebf0 <xTaskResumeAll>
else
{
mtCOVERAGE_TEST_MARKER();
}
}
}
800febc: bf00 nop
800febe: 3718 adds r7, #24
800fec0: 46bd mov sp, r7
800fec2: bd80 pop {r7, pc}
800fec4: 200086c0 .word 0x200086c0
800fec8: 200086b8 .word 0x200086b8
0800fecc <prvHeapInit>:
/* This just exists to keep the linker quiet. */
}
/*-----------------------------------------------------------*/
static void prvHeapInit( void )
{
800fecc: b480 push {r7}
800fece: b085 sub sp, #20
800fed0: af00 add r7, sp, #0
BlockLink_t *pxFirstFreeBlock;
uint8_t *pucAlignedHeap;
size_t uxAddress;
size_t xTotalHeapSize = configTOTAL_HEAP_SIZE;
800fed2: f44f 4300 mov.w r3, #32768 ; 0x8000
800fed6: 60bb str r3, [r7, #8]
/* Ensure the heap starts on a correctly aligned boundary. */
uxAddress = ( size_t ) ucHeap;
800fed8: 4b27 ldr r3, [pc, #156] ; (800ff78 <prvHeapInit+0xac>)
800feda: 60fb str r3, [r7, #12]
if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 )
800fedc: 68fb ldr r3, [r7, #12]
800fede: f003 0307 and.w r3, r3, #7
800fee2: 2b00 cmp r3, #0
800fee4: d00c beq.n 800ff00 <prvHeapInit+0x34>
{
uxAddress += ( portBYTE_ALIGNMENT - 1 );
800fee6: 68fb ldr r3, [r7, #12]
800fee8: 3307 adds r3, #7
800feea: 60fb str r3, [r7, #12]
uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
800feec: 68fb ldr r3, [r7, #12]
800feee: f023 0307 bic.w r3, r3, #7
800fef2: 60fb str r3, [r7, #12]
xTotalHeapSize -= uxAddress - ( size_t ) ucHeap;
800fef4: 68ba ldr r2, [r7, #8]
800fef6: 68fb ldr r3, [r7, #12]
800fef8: 1ad3 subs r3, r2, r3
800fefa: 4a1f ldr r2, [pc, #124] ; (800ff78 <prvHeapInit+0xac>)
800fefc: 4413 add r3, r2
800fefe: 60bb str r3, [r7, #8]
}
pucAlignedHeap = ( uint8_t * ) uxAddress;
800ff00: 68fb ldr r3, [r7, #12]
800ff02: 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;
800ff04: 4a1d ldr r2, [pc, #116] ; (800ff7c <prvHeapInit+0xb0>)
800ff06: 687b ldr r3, [r7, #4]
800ff08: 6013 str r3, [r2, #0]
xStart.xBlockSize = ( size_t ) 0;
800ff0a: 4b1c ldr r3, [pc, #112] ; (800ff7c <prvHeapInit+0xb0>)
800ff0c: 2200 movs r2, #0
800ff0e: 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;
800ff10: 687b ldr r3, [r7, #4]
800ff12: 68ba ldr r2, [r7, #8]
800ff14: 4413 add r3, r2
800ff16: 60fb str r3, [r7, #12]
uxAddress -= xHeapStructSize;
800ff18: 2208 movs r2, #8
800ff1a: 68fb ldr r3, [r7, #12]
800ff1c: 1a9b subs r3, r3, r2
800ff1e: 60fb str r3, [r7, #12]
uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
800ff20: 68fb ldr r3, [r7, #12]
800ff22: f023 0307 bic.w r3, r3, #7
800ff26: 60fb str r3, [r7, #12]
pxEnd = ( void * ) uxAddress;
800ff28: 68fb ldr r3, [r7, #12]
800ff2a: 4a15 ldr r2, [pc, #84] ; (800ff80 <prvHeapInit+0xb4>)
800ff2c: 6013 str r3, [r2, #0]
pxEnd->xBlockSize = 0;
800ff2e: 4b14 ldr r3, [pc, #80] ; (800ff80 <prvHeapInit+0xb4>)
800ff30: 681b ldr r3, [r3, #0]
800ff32: 2200 movs r2, #0
800ff34: 605a str r2, [r3, #4]
pxEnd->pxNextFreeBlock = NULL;
800ff36: 4b12 ldr r3, [pc, #72] ; (800ff80 <prvHeapInit+0xb4>)
800ff38: 681b ldr r3, [r3, #0]
800ff3a: 2200 movs r2, #0
800ff3c: 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;
800ff3e: 687b ldr r3, [r7, #4]
800ff40: 603b str r3, [r7, #0]
pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock;
800ff42: 683b ldr r3, [r7, #0]
800ff44: 68fa ldr r2, [r7, #12]
800ff46: 1ad2 subs r2, r2, r3
800ff48: 683b ldr r3, [r7, #0]
800ff4a: 605a str r2, [r3, #4]
pxFirstFreeBlock->pxNextFreeBlock = pxEnd;
800ff4c: 4b0c ldr r3, [pc, #48] ; (800ff80 <prvHeapInit+0xb4>)
800ff4e: 681a ldr r2, [r3, #0]
800ff50: 683b ldr r3, [r7, #0]
800ff52: 601a str r2, [r3, #0]
/* Only one block exists - and it covers the entire usable heap space. */
xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
800ff54: 683b ldr r3, [r7, #0]
800ff56: 685b ldr r3, [r3, #4]
800ff58: 4a0a ldr r2, [pc, #40] ; (800ff84 <prvHeapInit+0xb8>)
800ff5a: 6013 str r3, [r2, #0]
xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
800ff5c: 683b ldr r3, [r7, #0]
800ff5e: 685b ldr r3, [r3, #4]
800ff60: 4a09 ldr r2, [pc, #36] ; (800ff88 <prvHeapInit+0xbc>)
800ff62: 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 );
800ff64: 4b09 ldr r3, [pc, #36] ; (800ff8c <prvHeapInit+0xc0>)
800ff66: f04f 4200 mov.w r2, #2147483648 ; 0x80000000
800ff6a: 601a str r2, [r3, #0]
}
800ff6c: bf00 nop
800ff6e: 3714 adds r7, #20
800ff70: 46bd mov sp, r7
800ff72: f85d 7b04 ldr.w r7, [sp], #4
800ff76: 4770 bx lr
800ff78: 200006ac .word 0x200006ac
800ff7c: 200086ac .word 0x200086ac
800ff80: 200086b4 .word 0x200086b4
800ff84: 200086bc .word 0x200086bc
800ff88: 200086b8 .word 0x200086b8
800ff8c: 200086c0 .word 0x200086c0
0800ff90 <prvInsertBlockIntoFreeList>:
/*-----------------------------------------------------------*/
static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert )
{
800ff90: b480 push {r7}
800ff92: b085 sub sp, #20
800ff94: af00 add r7, sp, #0
800ff96: 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 )
800ff98: 4b28 ldr r3, [pc, #160] ; (801003c <prvInsertBlockIntoFreeList+0xac>)
800ff9a: 60fb str r3, [r7, #12]
800ff9c: e002 b.n 800ffa4 <prvInsertBlockIntoFreeList+0x14>
800ff9e: 68fb ldr r3, [r7, #12]
800ffa0: 681b ldr r3, [r3, #0]
800ffa2: 60fb str r3, [r7, #12]
800ffa4: 68fb ldr r3, [r7, #12]
800ffa6: 681b ldr r3, [r3, #0]
800ffa8: 687a ldr r2, [r7, #4]
800ffaa: 429a cmp r2, r3
800ffac: d8f7 bhi.n 800ff9e <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;
800ffae: 68fb ldr r3, [r7, #12]
800ffb0: 60bb str r3, [r7, #8]
if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert )
800ffb2: 68fb ldr r3, [r7, #12]
800ffb4: 685b ldr r3, [r3, #4]
800ffb6: 68ba ldr r2, [r7, #8]
800ffb8: 4413 add r3, r2
800ffba: 687a ldr r2, [r7, #4]
800ffbc: 429a cmp r2, r3
800ffbe: d108 bne.n 800ffd2 <prvInsertBlockIntoFreeList+0x42>
{
pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
800ffc0: 68fb ldr r3, [r7, #12]
800ffc2: 685a ldr r2, [r3, #4]
800ffc4: 687b ldr r3, [r7, #4]
800ffc6: 685b ldr r3, [r3, #4]
800ffc8: 441a add r2, r3
800ffca: 68fb ldr r3, [r7, #12]
800ffcc: 605a str r2, [r3, #4]
pxBlockToInsert = pxIterator;
800ffce: 68fb ldr r3, [r7, #12]
800ffd0: 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;
800ffd2: 687b ldr r3, [r7, #4]
800ffd4: 60bb str r3, [r7, #8]
if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock )
800ffd6: 687b ldr r3, [r7, #4]
800ffd8: 685b ldr r3, [r3, #4]
800ffda: 68ba ldr r2, [r7, #8]
800ffdc: 441a add r2, r3
800ffde: 68fb ldr r3, [r7, #12]
800ffe0: 681b ldr r3, [r3, #0]
800ffe2: 429a cmp r2, r3
800ffe4: d118 bne.n 8010018 <prvInsertBlockIntoFreeList+0x88>
{
if( pxIterator->pxNextFreeBlock != pxEnd )
800ffe6: 68fb ldr r3, [r7, #12]
800ffe8: 681a ldr r2, [r3, #0]
800ffea: 4b15 ldr r3, [pc, #84] ; (8010040 <prvInsertBlockIntoFreeList+0xb0>)
800ffec: 681b ldr r3, [r3, #0]
800ffee: 429a cmp r2, r3
800fff0: d00d beq.n 801000e <prvInsertBlockIntoFreeList+0x7e>
{
/* Form one big block from the two blocks. */
pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
800fff2: 687b ldr r3, [r7, #4]
800fff4: 685a ldr r2, [r3, #4]
800fff6: 68fb ldr r3, [r7, #12]
800fff8: 681b ldr r3, [r3, #0]
800fffa: 685b ldr r3, [r3, #4]
800fffc: 441a add r2, r3
800fffe: 687b ldr r3, [r7, #4]
8010000: 605a str r2, [r3, #4]
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
8010002: 68fb ldr r3, [r7, #12]
8010004: 681b ldr r3, [r3, #0]
8010006: 681a ldr r2, [r3, #0]
8010008: 687b ldr r3, [r7, #4]
801000a: 601a str r2, [r3, #0]
801000c: e008 b.n 8010020 <prvInsertBlockIntoFreeList+0x90>
}
else
{
pxBlockToInsert->pxNextFreeBlock = pxEnd;
801000e: 4b0c ldr r3, [pc, #48] ; (8010040 <prvInsertBlockIntoFreeList+0xb0>)
8010010: 681a ldr r2, [r3, #0]
8010012: 687b ldr r3, [r7, #4]
8010014: 601a str r2, [r3, #0]
8010016: e003 b.n 8010020 <prvInsertBlockIntoFreeList+0x90>
}
}
else
{
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
8010018: 68fb ldr r3, [r7, #12]
801001a: 681a ldr r2, [r3, #0]
801001c: 687b ldr r3, [r7, #4]
801001e: 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 )
8010020: 68fa ldr r2, [r7, #12]
8010022: 687b ldr r3, [r7, #4]
8010024: 429a cmp r2, r3
8010026: d002 beq.n 801002e <prvInsertBlockIntoFreeList+0x9e>
{
pxIterator->pxNextFreeBlock = pxBlockToInsert;
8010028: 68fb ldr r3, [r7, #12]
801002a: 687a ldr r2, [r7, #4]
801002c: 601a str r2, [r3, #0]
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
801002e: bf00 nop
8010030: 3714 adds r7, #20
8010032: 46bd mov sp, r7
8010034: f85d 7b04 ldr.w r7, [sp], #4
8010038: 4770 bx lr
801003a: bf00 nop
801003c: 200086ac .word 0x200086ac
8010040: 200086b4 .word 0x200086b4
08010044 <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)
{
8010044: b580 push {r7, lr}
8010046: b084 sub sp, #16
8010048: af00 add r7, sp, #0
801004a: 6078 str r0, [r7, #4]
801004c: 6039 str r1, [r7, #0]
u32_t sleeptime, res;
again:
LWIP_ASSERT_CORE_LOCKED();
sleeptime = sys_timeouts_sleeptime();
801004e: f007 fa91 bl 8017574 <sys_timeouts_sleeptime>
8010052: 60f8 str r0, [r7, #12]
if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) {
8010054: 68fb ldr r3, [r7, #12]
8010056: f1b3 3fff cmp.w r3, #4294967295
801005a: d10b bne.n 8010074 <tcpip_timeouts_mbox_fetch+0x30>
UNLOCK_TCPIP_CORE();
801005c: 4813 ldr r0, [pc, #76] ; (80100ac <tcpip_timeouts_mbox_fetch+0x68>)
801005e: f00c f9c2 bl 801c3e6 <sys_mutex_unlock>
sys_arch_mbox_fetch(mbox, msg, 0);
8010062: 2200 movs r2, #0
8010064: 6839 ldr r1, [r7, #0]
8010066: 6878 ldr r0, [r7, #4]
8010068: f00c f934 bl 801c2d4 <sys_arch_mbox_fetch>
LOCK_TCPIP_CORE();
801006c: 480f ldr r0, [pc, #60] ; (80100ac <tcpip_timeouts_mbox_fetch+0x68>)
801006e: f00c f9ab bl 801c3c8 <sys_mutex_lock>
return;
8010072: e018 b.n 80100a6 <tcpip_timeouts_mbox_fetch+0x62>
} else if (sleeptime == 0) {
8010074: 68fb ldr r3, [r7, #12]
8010076: 2b00 cmp r3, #0
8010078: d102 bne.n 8010080 <tcpip_timeouts_mbox_fetch+0x3c>
sys_check_timeouts();
801007a: f007 fa41 bl 8017500 <sys_check_timeouts>
/* We try again to fetch a message from the mbox. */
goto again;
801007e: e7e6 b.n 801004e <tcpip_timeouts_mbox_fetch+0xa>
}
UNLOCK_TCPIP_CORE();
8010080: 480a ldr r0, [pc, #40] ; (80100ac <tcpip_timeouts_mbox_fetch+0x68>)
8010082: f00c f9b0 bl 801c3e6 <sys_mutex_unlock>
res = sys_arch_mbox_fetch(mbox, msg, sleeptime);
8010086: 68fa ldr r2, [r7, #12]
8010088: 6839 ldr r1, [r7, #0]
801008a: 6878 ldr r0, [r7, #4]
801008c: f00c f922 bl 801c2d4 <sys_arch_mbox_fetch>
8010090: 60b8 str r0, [r7, #8]
LOCK_TCPIP_CORE();
8010092: 4806 ldr r0, [pc, #24] ; (80100ac <tcpip_timeouts_mbox_fetch+0x68>)
8010094: f00c f998 bl 801c3c8 <sys_mutex_lock>
if (res == SYS_ARCH_TIMEOUT) {
8010098: 68bb ldr r3, [r7, #8]
801009a: f1b3 3fff cmp.w r3, #4294967295
801009e: d102 bne.n 80100a6 <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();
80100a0: f007 fa2e bl 8017500 <sys_check_timeouts>
/* We try again to fetch a message from the mbox. */
goto again;
80100a4: e7d3 b.n 801004e <tcpip_timeouts_mbox_fetch+0xa>
}
}
80100a6: 3710 adds r7, #16
80100a8: 46bd mov sp, r7
80100aa: bd80 pop {r7, pc}
80100ac: 2000c0b0 .word 0x2000c0b0
080100b0 <tcpip_thread>:
*
* @param arg unused argument
*/
static void
tcpip_thread(void *arg)
{
80100b0: b580 push {r7, lr}
80100b2: b084 sub sp, #16
80100b4: af00 add r7, sp, #0
80100b6: 6078 str r0, [r7, #4]
struct tcpip_msg *msg;
LWIP_UNUSED_ARG(arg);
LWIP_MARK_TCPIP_THREAD();
LOCK_TCPIP_CORE();
80100b8: 4810 ldr r0, [pc, #64] ; (80100fc <tcpip_thread+0x4c>)
80100ba: f00c f985 bl 801c3c8 <sys_mutex_lock>
if (tcpip_init_done != NULL) {
80100be: 4b10 ldr r3, [pc, #64] ; (8010100 <tcpip_thread+0x50>)
80100c0: 681b ldr r3, [r3, #0]
80100c2: 2b00 cmp r3, #0
80100c4: d005 beq.n 80100d2 <tcpip_thread+0x22>
tcpip_init_done(tcpip_init_done_arg);
80100c6: 4b0e ldr r3, [pc, #56] ; (8010100 <tcpip_thread+0x50>)
80100c8: 681b ldr r3, [r3, #0]
80100ca: 4a0e ldr r2, [pc, #56] ; (8010104 <tcpip_thread+0x54>)
80100cc: 6812 ldr r2, [r2, #0]
80100ce: 4610 mov r0, r2
80100d0: 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);
80100d2: f107 030c add.w r3, r7, #12
80100d6: 4619 mov r1, r3
80100d8: 480b ldr r0, [pc, #44] ; (8010108 <tcpip_thread+0x58>)
80100da: f7ff ffb3 bl 8010044 <tcpip_timeouts_mbox_fetch>
if (msg == NULL) {
80100de: 68fb ldr r3, [r7, #12]
80100e0: 2b00 cmp r3, #0
80100e2: d106 bne.n 80100f2 <tcpip_thread+0x42>
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n"));
LWIP_ASSERT("tcpip_thread: invalid message", 0);
80100e4: 4b09 ldr r3, [pc, #36] ; (801010c <tcpip_thread+0x5c>)
80100e6: 2291 movs r2, #145 ; 0x91
80100e8: 4909 ldr r1, [pc, #36] ; (8010110 <tcpip_thread+0x60>)
80100ea: 480a ldr r0, [pc, #40] ; (8010114 <tcpip_thread+0x64>)
80100ec: f00c fa2c bl 801c548 <iprintf>
continue;
80100f0: e003 b.n 80100fa <tcpip_thread+0x4a>
}
tcpip_thread_handle_msg(msg);
80100f2: 68fb ldr r3, [r7, #12]
80100f4: 4618 mov r0, r3
80100f6: f000 f80f bl 8010118 <tcpip_thread_handle_msg>
TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg);
80100fa: e7ea b.n 80100d2 <tcpip_thread+0x22>
80100fc: 2000c0b0 .word 0x2000c0b0
8010100: 200086c4 .word 0x200086c4
8010104: 200086c8 .word 0x200086c8
8010108: 200086cc .word 0x200086cc
801010c: 0801d854 .word 0x0801d854
8010110: 0801d884 .word 0x0801d884
8010114: 0801d8a4 .word 0x0801d8a4
08010118 <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)
{
8010118: b580 push {r7, lr}
801011a: b082 sub sp, #8
801011c: af00 add r7, sp, #0
801011e: 6078 str r0, [r7, #4]
switch (msg->type) {
8010120: 687b ldr r3, [r7, #4]
8010122: 781b ldrb r3, [r3, #0]
8010124: 2b01 cmp r3, #1
8010126: d018 beq.n 801015a <tcpip_thread_handle_msg+0x42>
8010128: 2b02 cmp r3, #2
801012a: d021 beq.n 8010170 <tcpip_thread_handle_msg+0x58>
801012c: 2b00 cmp r3, #0
801012e: d126 bne.n 801017e <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) {
8010130: 687b ldr r3, [r7, #4]
8010132: 68db ldr r3, [r3, #12]
8010134: 687a ldr r2, [r7, #4]
8010136: 6850 ldr r0, [r2, #4]
8010138: 687a ldr r2, [r7, #4]
801013a: 6892 ldr r2, [r2, #8]
801013c: 4611 mov r1, r2
801013e: 4798 blx r3
8010140: 4603 mov r3, r0
8010142: 2b00 cmp r3, #0
8010144: d004 beq.n 8010150 <tcpip_thread_handle_msg+0x38>
pbuf_free(msg->msg.inp.p);
8010146: 687b ldr r3, [r7, #4]
8010148: 685b ldr r3, [r3, #4]
801014a: 4618 mov r0, r3
801014c: f001 fccc bl 8011ae8 <pbuf_free>
}
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
8010150: 6879 ldr r1, [r7, #4]
8010152: 2009 movs r0, #9
8010154: f000 fe1c bl 8010d90 <memp_free>
break;
8010158: e018 b.n 801018c <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);
801015a: 687b ldr r3, [r7, #4]
801015c: 685b ldr r3, [r3, #4]
801015e: 687a ldr r2, [r7, #4]
8010160: 6892 ldr r2, [r2, #8]
8010162: 4610 mov r0, r2
8010164: 4798 blx r3
memp_free(MEMP_TCPIP_MSG_API, msg);
8010166: 6879 ldr r1, [r7, #4]
8010168: 2008 movs r0, #8
801016a: f000 fe11 bl 8010d90 <memp_free>
break;
801016e: e00d b.n 801018c <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);
8010170: 687b ldr r3, [r7, #4]
8010172: 685b ldr r3, [r3, #4]
8010174: 687a ldr r2, [r7, #4]
8010176: 6892 ldr r2, [r2, #8]
8010178: 4610 mov r0, r2
801017a: 4798 blx r3
break;
801017c: e006 b.n 801018c <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);
801017e: 4b05 ldr r3, [pc, #20] ; (8010194 <tcpip_thread_handle_msg+0x7c>)
8010180: 22cf movs r2, #207 ; 0xcf
8010182: 4905 ldr r1, [pc, #20] ; (8010198 <tcpip_thread_handle_msg+0x80>)
8010184: 4805 ldr r0, [pc, #20] ; (801019c <tcpip_thread_handle_msg+0x84>)
8010186: f00c f9df bl 801c548 <iprintf>
break;
801018a: bf00 nop
}
}
801018c: bf00 nop
801018e: 3708 adds r7, #8
8010190: 46bd mov sp, r7
8010192: bd80 pop {r7, pc}
8010194: 0801d854 .word 0x0801d854
8010198: 0801d884 .word 0x0801d884
801019c: 0801d8a4 .word 0x0801d8a4
080101a0 <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)
{
80101a0: b580 push {r7, lr}
80101a2: b086 sub sp, #24
80101a4: af00 add r7, sp, #0
80101a6: 60f8 str r0, [r7, #12]
80101a8: 60b9 str r1, [r7, #8]
80101aa: 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));
80101ac: 481a ldr r0, [pc, #104] ; (8010218 <tcpip_inpkt+0x78>)
80101ae: f00c f8d0 bl 801c352 <sys_mbox_valid>
80101b2: 4603 mov r3, r0
80101b4: 2b00 cmp r3, #0
80101b6: d105 bne.n 80101c4 <tcpip_inpkt+0x24>
80101b8: 4b18 ldr r3, [pc, #96] ; (801021c <tcpip_inpkt+0x7c>)
80101ba: 22fc movs r2, #252 ; 0xfc
80101bc: 4918 ldr r1, [pc, #96] ; (8010220 <tcpip_inpkt+0x80>)
80101be: 4819 ldr r0, [pc, #100] ; (8010224 <tcpip_inpkt+0x84>)
80101c0: f00c f9c2 bl 801c548 <iprintf>
msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT);
80101c4: 2009 movs r0, #9
80101c6: f000 fd91 bl 8010cec <memp_malloc>
80101ca: 6178 str r0, [r7, #20]
if (msg == NULL) {
80101cc: 697b ldr r3, [r7, #20]
80101ce: 2b00 cmp r3, #0
80101d0: d102 bne.n 80101d8 <tcpip_inpkt+0x38>
return ERR_MEM;
80101d2: f04f 33ff mov.w r3, #4294967295
80101d6: e01a b.n 801020e <tcpip_inpkt+0x6e>
}
msg->type = TCPIP_MSG_INPKT;
80101d8: 697b ldr r3, [r7, #20]
80101da: 2200 movs r2, #0
80101dc: 701a strb r2, [r3, #0]
msg->msg.inp.p = p;
80101de: 697b ldr r3, [r7, #20]
80101e0: 68fa ldr r2, [r7, #12]
80101e2: 605a str r2, [r3, #4]
msg->msg.inp.netif = inp;
80101e4: 697b ldr r3, [r7, #20]
80101e6: 68ba ldr r2, [r7, #8]
80101e8: 609a str r2, [r3, #8]
msg->msg.inp.input_fn = input_fn;
80101ea: 697b ldr r3, [r7, #20]
80101ec: 687a ldr r2, [r7, #4]
80101ee: 60da str r2, [r3, #12]
if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) {
80101f0: 6979 ldr r1, [r7, #20]
80101f2: 4809 ldr r0, [pc, #36] ; (8010218 <tcpip_inpkt+0x78>)
80101f4: f00c f854 bl 801c2a0 <sys_mbox_trypost>
80101f8: 4603 mov r3, r0
80101fa: 2b00 cmp r3, #0
80101fc: d006 beq.n 801020c <tcpip_inpkt+0x6c>
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
80101fe: 6979 ldr r1, [r7, #20]
8010200: 2009 movs r0, #9
8010202: f000 fdc5 bl 8010d90 <memp_free>
return ERR_MEM;
8010206: f04f 33ff mov.w r3, #4294967295
801020a: e000 b.n 801020e <tcpip_inpkt+0x6e>
}
return ERR_OK;
801020c: 2300 movs r3, #0
#endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */
}
801020e: 4618 mov r0, r3
8010210: 3718 adds r7, #24
8010212: 46bd mov sp, r7
8010214: bd80 pop {r7, pc}
8010216: bf00 nop
8010218: 200086cc .word 0x200086cc
801021c: 0801d854 .word 0x0801d854
8010220: 0801d8cc .word 0x0801d8cc
8010224: 0801d8a4 .word 0x0801d8a4
08010228 <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)
{
8010228: b580 push {r7, lr}
801022a: b082 sub sp, #8
801022c: af00 add r7, sp, #0
801022e: 6078 str r0, [r7, #4]
8010230: 6039 str r1, [r7, #0]
#if LWIP_ETHERNET
if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) {
8010232: 683b ldr r3, [r7, #0]
8010234: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8010238: f003 0318 and.w r3, r3, #24
801023c: 2b00 cmp r3, #0
801023e: d006 beq.n 801024e <tcpip_input+0x26>
return tcpip_inpkt(p, inp, ethernet_input);
8010240: 4a08 ldr r2, [pc, #32] ; (8010264 <tcpip_input+0x3c>)
8010242: 6839 ldr r1, [r7, #0]
8010244: 6878 ldr r0, [r7, #4]
8010246: f7ff ffab bl 80101a0 <tcpip_inpkt>
801024a: 4603 mov r3, r0
801024c: e005 b.n 801025a <tcpip_input+0x32>
} else
#endif /* LWIP_ETHERNET */
return tcpip_inpkt(p, inp, ip_input);
801024e: 4a06 ldr r2, [pc, #24] ; (8010268 <tcpip_input+0x40>)
8010250: 6839 ldr r1, [r7, #0]
8010252: 6878 ldr r0, [r7, #4]
8010254: f7ff ffa4 bl 80101a0 <tcpip_inpkt>
8010258: 4603 mov r3, r0
}
801025a: 4618 mov r0, r3
801025c: 3708 adds r7, #8
801025e: 46bd mov sp, r7
8010260: bd80 pop {r7, pc}
8010262: bf00 nop
8010264: 0801c0b1 .word 0x0801c0b1
8010268: 0801af95 .word 0x0801af95
0801026c <tcpip_try_callback>:
*
* @see tcpip_callback
*/
err_t
tcpip_try_callback(tcpip_callback_fn function, void *ctx)
{
801026c: b580 push {r7, lr}
801026e: b084 sub sp, #16
8010270: af00 add r7, sp, #0
8010272: 6078 str r0, [r7, #4]
8010274: 6039 str r1, [r7, #0]
struct tcpip_msg *msg;
LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
8010276: 4819 ldr r0, [pc, #100] ; (80102dc <tcpip_try_callback+0x70>)
8010278: f00c f86b bl 801c352 <sys_mbox_valid>
801027c: 4603 mov r3, r0
801027e: 2b00 cmp r3, #0
8010280: d106 bne.n 8010290 <tcpip_try_callback+0x24>
8010282: 4b17 ldr r3, [pc, #92] ; (80102e0 <tcpip_try_callback+0x74>)
8010284: f240 125d movw r2, #349 ; 0x15d
8010288: 4916 ldr r1, [pc, #88] ; (80102e4 <tcpip_try_callback+0x78>)
801028a: 4817 ldr r0, [pc, #92] ; (80102e8 <tcpip_try_callback+0x7c>)
801028c: f00c f95c bl 801c548 <iprintf>
msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API);
8010290: 2008 movs r0, #8
8010292: f000 fd2b bl 8010cec <memp_malloc>
8010296: 60f8 str r0, [r7, #12]
if (msg == NULL) {
8010298: 68fb ldr r3, [r7, #12]
801029a: 2b00 cmp r3, #0
801029c: d102 bne.n 80102a4 <tcpip_try_callback+0x38>
return ERR_MEM;
801029e: f04f 33ff mov.w r3, #4294967295
80102a2: e017 b.n 80102d4 <tcpip_try_callback+0x68>
}
msg->type = TCPIP_MSG_CALLBACK;
80102a4: 68fb ldr r3, [r7, #12]
80102a6: 2201 movs r2, #1
80102a8: 701a strb r2, [r3, #0]
msg->msg.cb.function = function;
80102aa: 68fb ldr r3, [r7, #12]
80102ac: 687a ldr r2, [r7, #4]
80102ae: 605a str r2, [r3, #4]
msg->msg.cb.ctx = ctx;
80102b0: 68fb ldr r3, [r7, #12]
80102b2: 683a ldr r2, [r7, #0]
80102b4: 609a str r2, [r3, #8]
if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) {
80102b6: 68f9 ldr r1, [r7, #12]
80102b8: 4808 ldr r0, [pc, #32] ; (80102dc <tcpip_try_callback+0x70>)
80102ba: f00b fff1 bl 801c2a0 <sys_mbox_trypost>
80102be: 4603 mov r3, r0
80102c0: 2b00 cmp r3, #0
80102c2: d006 beq.n 80102d2 <tcpip_try_callback+0x66>
memp_free(MEMP_TCPIP_MSG_API, msg);
80102c4: 68f9 ldr r1, [r7, #12]
80102c6: 2008 movs r0, #8
80102c8: f000 fd62 bl 8010d90 <memp_free>
return ERR_MEM;
80102cc: f04f 33ff mov.w r3, #4294967295
80102d0: e000 b.n 80102d4 <tcpip_try_callback+0x68>
}
return ERR_OK;
80102d2: 2300 movs r3, #0
}
80102d4: 4618 mov r0, r3
80102d6: 3710 adds r7, #16
80102d8: 46bd mov sp, r7
80102da: bd80 pop {r7, pc}
80102dc: 200086cc .word 0x200086cc
80102e0: 0801d854 .word 0x0801d854
80102e4: 0801d8cc .word 0x0801d8cc
80102e8: 0801d8a4 .word 0x0801d8a4
080102ec <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)
{
80102ec: b580 push {r7, lr}
80102ee: b084 sub sp, #16
80102f0: af02 add r7, sp, #8
80102f2: 6078 str r0, [r7, #4]
80102f4: 6039 str r1, [r7, #0]
lwip_init();
80102f6: f000 f871 bl 80103dc <lwip_init>
tcpip_init_done = initfunc;
80102fa: 4a17 ldr r2, [pc, #92] ; (8010358 <tcpip_init+0x6c>)
80102fc: 687b ldr r3, [r7, #4]
80102fe: 6013 str r3, [r2, #0]
tcpip_init_done_arg = arg;
8010300: 4a16 ldr r2, [pc, #88] ; (801035c <tcpip_init+0x70>)
8010302: 683b ldr r3, [r7, #0]
8010304: 6013 str r3, [r2, #0]
if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) {
8010306: 2106 movs r1, #6
8010308: 4815 ldr r0, [pc, #84] ; (8010360 <tcpip_init+0x74>)
801030a: f00b ffa7 bl 801c25c <sys_mbox_new>
801030e: 4603 mov r3, r0
8010310: 2b00 cmp r3, #0
8010312: d006 beq.n 8010322 <tcpip_init+0x36>
LWIP_ASSERT("failed to create tcpip_thread mbox", 0);
8010314: 4b13 ldr r3, [pc, #76] ; (8010364 <tcpip_init+0x78>)
8010316: f240 2261 movw r2, #609 ; 0x261
801031a: 4913 ldr r1, [pc, #76] ; (8010368 <tcpip_init+0x7c>)
801031c: 4813 ldr r0, [pc, #76] ; (801036c <tcpip_init+0x80>)
801031e: f00c f913 bl 801c548 <iprintf>
}
#if LWIP_TCPIP_CORE_LOCKING
if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) {
8010322: 4813 ldr r0, [pc, #76] ; (8010370 <tcpip_init+0x84>)
8010324: f00c f834 bl 801c390 <sys_mutex_new>
8010328: 4603 mov r3, r0
801032a: 2b00 cmp r3, #0
801032c: d006 beq.n 801033c <tcpip_init+0x50>
LWIP_ASSERT("failed to create lock_tcpip_core", 0);
801032e: 4b0d ldr r3, [pc, #52] ; (8010364 <tcpip_init+0x78>)
8010330: f240 2265 movw r2, #613 ; 0x265
8010334: 490f ldr r1, [pc, #60] ; (8010374 <tcpip_init+0x88>)
8010336: 480d ldr r0, [pc, #52] ; (801036c <tcpip_init+0x80>)
8010338: f00c f906 bl 801c548 <iprintf>
}
#endif /* LWIP_TCPIP_CORE_LOCKING */
sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);
801033c: 2300 movs r3, #0
801033e: 9300 str r3, [sp, #0]
8010340: f44f 6380 mov.w r3, #1024 ; 0x400
8010344: 2200 movs r2, #0
8010346: 490c ldr r1, [pc, #48] ; (8010378 <tcpip_init+0x8c>)
8010348: 480c ldr r0, [pc, #48] ; (801037c <tcpip_init+0x90>)
801034a: f00c f859 bl 801c400 <sys_thread_new>
}
801034e: bf00 nop
8010350: 3708 adds r7, #8
8010352: 46bd mov sp, r7
8010354: bd80 pop {r7, pc}
8010356: bf00 nop
8010358: 200086c4 .word 0x200086c4
801035c: 200086c8 .word 0x200086c8
8010360: 200086cc .word 0x200086cc
8010364: 0801d854 .word 0x0801d854
8010368: 0801d8dc .word 0x0801d8dc
801036c: 0801d8a4 .word 0x0801d8a4
8010370: 2000c0b0 .word 0x2000c0b0
8010374: 0801d900 .word 0x0801d900
8010378: 080100b1 .word 0x080100b1
801037c: 0801d924 .word 0x0801d924
08010380 <lwip_htons>:
* @param n u16_t in host byte order
* @return n in network byte order
*/
u16_t
lwip_htons(u16_t n)
{
8010380: b480 push {r7}
8010382: b083 sub sp, #12
8010384: af00 add r7, sp, #0
8010386: 4603 mov r3, r0
8010388: 80fb strh r3, [r7, #6]
return PP_HTONS(n);
801038a: 88fb ldrh r3, [r7, #6]
801038c: 021b lsls r3, r3, #8
801038e: b21a sxth r2, r3
8010390: 88fb ldrh r3, [r7, #6]
8010392: 0a1b lsrs r3, r3, #8
8010394: b29b uxth r3, r3
8010396: b21b sxth r3, r3
8010398: 4313 orrs r3, r2
801039a: b21b sxth r3, r3
801039c: b29b uxth r3, r3
}
801039e: 4618 mov r0, r3
80103a0: 370c adds r7, #12
80103a2: 46bd mov sp, r7
80103a4: f85d 7b04 ldr.w r7, [sp], #4
80103a8: 4770 bx lr
080103aa <lwip_htonl>:
* @param n u32_t in host byte order
* @return n in network byte order
*/
u32_t
lwip_htonl(u32_t n)
{
80103aa: b480 push {r7}
80103ac: b083 sub sp, #12
80103ae: af00 add r7, sp, #0
80103b0: 6078 str r0, [r7, #4]
return PP_HTONL(n);
80103b2: 687b ldr r3, [r7, #4]
80103b4: 061a lsls r2, r3, #24
80103b6: 687b ldr r3, [r7, #4]
80103b8: 021b lsls r3, r3, #8
80103ba: f403 037f and.w r3, r3, #16711680 ; 0xff0000
80103be: 431a orrs r2, r3
80103c0: 687b ldr r3, [r7, #4]
80103c2: 0a1b lsrs r3, r3, #8
80103c4: f403 437f and.w r3, r3, #65280 ; 0xff00
80103c8: 431a orrs r2, r3
80103ca: 687b ldr r3, [r7, #4]
80103cc: 0e1b lsrs r3, r3, #24
80103ce: 4313 orrs r3, r2
}
80103d0: 4618 mov r0, r3
80103d2: 370c adds r7, #12
80103d4: 46bd mov sp, r7
80103d6: f85d 7b04 ldr.w r7, [sp], #4
80103da: 4770 bx lr
080103dc <lwip_init>:
* Initialize all modules.
* Use this in NO_SYS mode. Use tcpip_init() otherwise.
*/
void
lwip_init(void)
{
80103dc: b580 push {r7, lr}
80103de: b082 sub sp, #8
80103e0: af00 add r7, sp, #0
#ifndef LWIP_SKIP_CONST_CHECK
int a = 0;
80103e2: 2300 movs r3, #0
80103e4: 607b str r3, [r7, #4]
#endif
/* Modules initialization */
stats_init();
#if !NO_SYS
sys_init();
80103e6: f00b ffc5 bl 801c374 <sys_init>
#endif /* !NO_SYS */
mem_init();
80103ea: f000 f8d5 bl 8010598 <mem_init>
memp_init();
80103ee: f000 fc31 bl 8010c54 <memp_init>
pbuf_init();
netif_init();
80103f2: f000 fcf7 bl 8010de4 <netif_init>
#endif /* LWIP_IPV4 */
#if LWIP_RAW
raw_init();
#endif /* LWIP_RAW */
#if LWIP_UDP
udp_init();
80103f6: f007 f8f5 bl 80175e4 <udp_init>
#endif /* LWIP_UDP */
#if LWIP_TCP
tcp_init();
80103fa: f001 fe1f bl 801203c <tcp_init>
#if PPP_SUPPORT
ppp_init();
#endif
#if LWIP_TIMERS
sys_timeouts_init();
80103fe: f007 f839 bl 8017474 <sys_timeouts_init>
#endif /* LWIP_TIMERS */
}
8010402: bf00 nop
8010404: 3708 adds r7, #8
8010406: 46bd mov sp, r7
8010408: bd80 pop {r7, pc}
...
0801040c <ptr_to_mem>:
#define mem_overflow_check_element(mem)
#endif /* MEM_OVERFLOW_CHECK */
static struct mem *
ptr_to_mem(mem_size_t ptr)
{
801040c: b480 push {r7}
801040e: b083 sub sp, #12
8010410: af00 add r7, sp, #0
8010412: 4603 mov r3, r0
8010414: 80fb strh r3, [r7, #6]
return (struct mem *)(void *)&ram[ptr];
8010416: 4b05 ldr r3, [pc, #20] ; (801042c <ptr_to_mem+0x20>)
8010418: 681a ldr r2, [r3, #0]
801041a: 88fb ldrh r3, [r7, #6]
801041c: 4413 add r3, r2
}
801041e: 4618 mov r0, r3
8010420: 370c adds r7, #12
8010422: 46bd mov sp, r7
8010424: f85d 7b04 ldr.w r7, [sp], #4
8010428: 4770 bx lr
801042a: bf00 nop
801042c: 200086d0 .word 0x200086d0
08010430 <mem_to_ptr>:
static mem_size_t
mem_to_ptr(void *mem)
{
8010430: b480 push {r7}
8010432: b083 sub sp, #12
8010434: af00 add r7, sp, #0
8010436: 6078 str r0, [r7, #4]
return (mem_size_t)((u8_t *)mem - ram);
8010438: 687b ldr r3, [r7, #4]
801043a: 4a05 ldr r2, [pc, #20] ; (8010450 <mem_to_ptr+0x20>)
801043c: 6812 ldr r2, [r2, #0]
801043e: 1a9b subs r3, r3, r2
8010440: b29b uxth r3, r3
}
8010442: 4618 mov r0, r3
8010444: 370c adds r7, #12
8010446: 46bd mov sp, r7
8010448: f85d 7b04 ldr.w r7, [sp], #4
801044c: 4770 bx lr
801044e: bf00 nop
8010450: 200086d0 .word 0x200086d0
08010454 <plug_holes>:
* This assumes access to the heap is protected by the calling function
* already.
*/
static void
plug_holes(struct mem *mem)
{
8010454: b590 push {r4, r7, lr}
8010456: b085 sub sp, #20
8010458: af00 add r7, sp, #0
801045a: 6078 str r0, [r7, #4]
struct mem *nmem;
struct mem *pmem;
LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
801045c: 4b45 ldr r3, [pc, #276] ; (8010574 <plug_holes+0x120>)
801045e: 681b ldr r3, [r3, #0]
8010460: 687a ldr r2, [r7, #4]
8010462: 429a cmp r2, r3
8010464: d206 bcs.n 8010474 <plug_holes+0x20>
8010466: 4b44 ldr r3, [pc, #272] ; (8010578 <plug_holes+0x124>)
8010468: f240 12df movw r2, #479 ; 0x1df
801046c: 4943 ldr r1, [pc, #268] ; (801057c <plug_holes+0x128>)
801046e: 4844 ldr r0, [pc, #272] ; (8010580 <plug_holes+0x12c>)
8010470: f00c f86a bl 801c548 <iprintf>
LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
8010474: 4b43 ldr r3, [pc, #268] ; (8010584 <plug_holes+0x130>)
8010476: 681b ldr r3, [r3, #0]
8010478: 687a ldr r2, [r7, #4]
801047a: 429a cmp r2, r3
801047c: d306 bcc.n 801048c <plug_holes+0x38>
801047e: 4b3e ldr r3, [pc, #248] ; (8010578 <plug_holes+0x124>)
8010480: f44f 72f0 mov.w r2, #480 ; 0x1e0
8010484: 4940 ldr r1, [pc, #256] ; (8010588 <plug_holes+0x134>)
8010486: 483e ldr r0, [pc, #248] ; (8010580 <plug_holes+0x12c>)
8010488: f00c f85e bl 801c548 <iprintf>
LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
801048c: 687b ldr r3, [r7, #4]
801048e: 791b ldrb r3, [r3, #4]
8010490: 2b00 cmp r3, #0
8010492: d006 beq.n 80104a2 <plug_holes+0x4e>
8010494: 4b38 ldr r3, [pc, #224] ; (8010578 <plug_holes+0x124>)
8010496: f240 12e1 movw r2, #481 ; 0x1e1
801049a: 493c ldr r1, [pc, #240] ; (801058c <plug_holes+0x138>)
801049c: 4838 ldr r0, [pc, #224] ; (8010580 <plug_holes+0x12c>)
801049e: f00c f853 bl 801c548 <iprintf>
/* plug hole forward */
LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
80104a2: 687b ldr r3, [r7, #4]
80104a4: 881b ldrh r3, [r3, #0]
80104a6: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80104aa: d906 bls.n 80104ba <plug_holes+0x66>
80104ac: 4b32 ldr r3, [pc, #200] ; (8010578 <plug_holes+0x124>)
80104ae: f44f 72f2 mov.w r2, #484 ; 0x1e4
80104b2: 4937 ldr r1, [pc, #220] ; (8010590 <plug_holes+0x13c>)
80104b4: 4832 ldr r0, [pc, #200] ; (8010580 <plug_holes+0x12c>)
80104b6: f00c f847 bl 801c548 <iprintf>
nmem = ptr_to_mem(mem->next);
80104ba: 687b ldr r3, [r7, #4]
80104bc: 881b ldrh r3, [r3, #0]
80104be: 4618 mov r0, r3
80104c0: f7ff ffa4 bl 801040c <ptr_to_mem>
80104c4: 60f8 str r0, [r7, #12]
if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) {
80104c6: 687a ldr r2, [r7, #4]
80104c8: 68fb ldr r3, [r7, #12]
80104ca: 429a cmp r2, r3
80104cc: d024 beq.n 8010518 <plug_holes+0xc4>
80104ce: 68fb ldr r3, [r7, #12]
80104d0: 791b ldrb r3, [r3, #4]
80104d2: 2b00 cmp r3, #0
80104d4: d120 bne.n 8010518 <plug_holes+0xc4>
80104d6: 4b2b ldr r3, [pc, #172] ; (8010584 <plug_holes+0x130>)
80104d8: 681b ldr r3, [r3, #0]
80104da: 68fa ldr r2, [r7, #12]
80104dc: 429a cmp r2, r3
80104de: d01b beq.n 8010518 <plug_holes+0xc4>
/* if mem->next is unused and not end of ram, combine mem and mem->next */
if (lfree == nmem) {
80104e0: 4b2c ldr r3, [pc, #176] ; (8010594 <plug_holes+0x140>)
80104e2: 681b ldr r3, [r3, #0]
80104e4: 68fa ldr r2, [r7, #12]
80104e6: 429a cmp r2, r3
80104e8: d102 bne.n 80104f0 <plug_holes+0x9c>
lfree = mem;
80104ea: 4a2a ldr r2, [pc, #168] ; (8010594 <plug_holes+0x140>)
80104ec: 687b ldr r3, [r7, #4]
80104ee: 6013 str r3, [r2, #0]
}
mem->next = nmem->next;
80104f0: 68fb ldr r3, [r7, #12]
80104f2: 881a ldrh r2, [r3, #0]
80104f4: 687b ldr r3, [r7, #4]
80104f6: 801a strh r2, [r3, #0]
if (nmem->next != MEM_SIZE_ALIGNED) {
80104f8: 68fb ldr r3, [r7, #12]
80104fa: 881b ldrh r3, [r3, #0]
80104fc: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010500: d00a beq.n 8010518 <plug_holes+0xc4>
ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem);
8010502: 68fb ldr r3, [r7, #12]
8010504: 881b ldrh r3, [r3, #0]
8010506: 4618 mov r0, r3
8010508: f7ff ff80 bl 801040c <ptr_to_mem>
801050c: 4604 mov r4, r0
801050e: 6878 ldr r0, [r7, #4]
8010510: f7ff ff8e bl 8010430 <mem_to_ptr>
8010514: 4603 mov r3, r0
8010516: 8063 strh r3, [r4, #2]
}
}
/* plug hole backward */
pmem = ptr_to_mem(mem->prev);
8010518: 687b ldr r3, [r7, #4]
801051a: 885b ldrh r3, [r3, #2]
801051c: 4618 mov r0, r3
801051e: f7ff ff75 bl 801040c <ptr_to_mem>
8010522: 60b8 str r0, [r7, #8]
if (pmem != mem && pmem->used == 0) {
8010524: 68ba ldr r2, [r7, #8]
8010526: 687b ldr r3, [r7, #4]
8010528: 429a cmp r2, r3
801052a: d01f beq.n 801056c <plug_holes+0x118>
801052c: 68bb ldr r3, [r7, #8]
801052e: 791b ldrb r3, [r3, #4]
8010530: 2b00 cmp r3, #0
8010532: d11b bne.n 801056c <plug_holes+0x118>
/* if mem->prev is unused, combine mem and mem->prev */
if (lfree == mem) {
8010534: 4b17 ldr r3, [pc, #92] ; (8010594 <plug_holes+0x140>)
8010536: 681b ldr r3, [r3, #0]
8010538: 687a ldr r2, [r7, #4]
801053a: 429a cmp r2, r3
801053c: d102 bne.n 8010544 <plug_holes+0xf0>
lfree = pmem;
801053e: 4a15 ldr r2, [pc, #84] ; (8010594 <plug_holes+0x140>)
8010540: 68bb ldr r3, [r7, #8]
8010542: 6013 str r3, [r2, #0]
}
pmem->next = mem->next;
8010544: 687b ldr r3, [r7, #4]
8010546: 881a ldrh r2, [r3, #0]
8010548: 68bb ldr r3, [r7, #8]
801054a: 801a strh r2, [r3, #0]
if (mem->next != MEM_SIZE_ALIGNED) {
801054c: 687b ldr r3, [r7, #4]
801054e: 881b ldrh r3, [r3, #0]
8010550: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010554: d00a beq.n 801056c <plug_holes+0x118>
ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem);
8010556: 687b ldr r3, [r7, #4]
8010558: 881b ldrh r3, [r3, #0]
801055a: 4618 mov r0, r3
801055c: f7ff ff56 bl 801040c <ptr_to_mem>
8010560: 4604 mov r4, r0
8010562: 68b8 ldr r0, [r7, #8]
8010564: f7ff ff64 bl 8010430 <mem_to_ptr>
8010568: 4603 mov r3, r0
801056a: 8063 strh r3, [r4, #2]
}
}
}
801056c: bf00 nop
801056e: 3714 adds r7, #20
8010570: 46bd mov sp, r7
8010572: bd90 pop {r4, r7, pc}
8010574: 200086d0 .word 0x200086d0
8010578: 0801d934 .word 0x0801d934
801057c: 0801d964 .word 0x0801d964
8010580: 0801d97c .word 0x0801d97c
8010584: 200086d4 .word 0x200086d4
8010588: 0801d9a4 .word 0x0801d9a4
801058c: 0801d9c0 .word 0x0801d9c0
8010590: 0801d9dc .word 0x0801d9dc
8010594: 200086dc .word 0x200086dc
08010598 <mem_init>:
/**
* Zero the heap and initialize start, end and lowest-free
*/
void
mem_init(void)
{
8010598: b580 push {r7, lr}
801059a: b082 sub sp, #8
801059c: 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);
801059e: 4b1f ldr r3, [pc, #124] ; (801061c <mem_init+0x84>)
80105a0: 3303 adds r3, #3
80105a2: f023 0303 bic.w r3, r3, #3
80105a6: 461a mov r2, r3
80105a8: 4b1d ldr r3, [pc, #116] ; (8010620 <mem_init+0x88>)
80105aa: 601a str r2, [r3, #0]
/* initialize the start of the heap */
mem = (struct mem *)(void *)ram;
80105ac: 4b1c ldr r3, [pc, #112] ; (8010620 <mem_init+0x88>)
80105ae: 681b ldr r3, [r3, #0]
80105b0: 607b str r3, [r7, #4]
mem->next = MEM_SIZE_ALIGNED;
80105b2: 687b ldr r3, [r7, #4]
80105b4: f44f 62c8 mov.w r2, #1600 ; 0x640
80105b8: 801a strh r2, [r3, #0]
mem->prev = 0;
80105ba: 687b ldr r3, [r7, #4]
80105bc: 2200 movs r2, #0
80105be: 805a strh r2, [r3, #2]
mem->used = 0;
80105c0: 687b ldr r3, [r7, #4]
80105c2: 2200 movs r2, #0
80105c4: 711a strb r2, [r3, #4]
/* initialize the end of the heap */
ram_end = ptr_to_mem(MEM_SIZE_ALIGNED);
80105c6: f44f 60c8 mov.w r0, #1600 ; 0x640
80105ca: f7ff ff1f bl 801040c <ptr_to_mem>
80105ce: 4602 mov r2, r0
80105d0: 4b14 ldr r3, [pc, #80] ; (8010624 <mem_init+0x8c>)
80105d2: 601a str r2, [r3, #0]
ram_end->used = 1;
80105d4: 4b13 ldr r3, [pc, #76] ; (8010624 <mem_init+0x8c>)
80105d6: 681b ldr r3, [r3, #0]
80105d8: 2201 movs r2, #1
80105da: 711a strb r2, [r3, #4]
ram_end->next = MEM_SIZE_ALIGNED;
80105dc: 4b11 ldr r3, [pc, #68] ; (8010624 <mem_init+0x8c>)
80105de: 681b ldr r3, [r3, #0]
80105e0: f44f 62c8 mov.w r2, #1600 ; 0x640
80105e4: 801a strh r2, [r3, #0]
ram_end->prev = MEM_SIZE_ALIGNED;
80105e6: 4b0f ldr r3, [pc, #60] ; (8010624 <mem_init+0x8c>)
80105e8: 681b ldr r3, [r3, #0]
80105ea: f44f 62c8 mov.w r2, #1600 ; 0x640
80105ee: 805a strh r2, [r3, #2]
MEM_SANITY();
/* initialize the lowest-free pointer to the start of the heap */
lfree = (struct mem *)(void *)ram;
80105f0: 4b0b ldr r3, [pc, #44] ; (8010620 <mem_init+0x88>)
80105f2: 681b ldr r3, [r3, #0]
80105f4: 4a0c ldr r2, [pc, #48] ; (8010628 <mem_init+0x90>)
80105f6: 6013 str r3, [r2, #0]
MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED);
if (sys_mutex_new(&mem_mutex) != ERR_OK) {
80105f8: 480c ldr r0, [pc, #48] ; (801062c <mem_init+0x94>)
80105fa: f00b fec9 bl 801c390 <sys_mutex_new>
80105fe: 4603 mov r3, r0
8010600: 2b00 cmp r3, #0
8010602: d006 beq.n 8010612 <mem_init+0x7a>
LWIP_ASSERT("failed to create mem_mutex", 0);
8010604: 4b0a ldr r3, [pc, #40] ; (8010630 <mem_init+0x98>)
8010606: f240 221f movw r2, #543 ; 0x21f
801060a: 490a ldr r1, [pc, #40] ; (8010634 <mem_init+0x9c>)
801060c: 480a ldr r0, [pc, #40] ; (8010638 <mem_init+0xa0>)
801060e: f00b ff9b bl 801c548 <iprintf>
}
}
8010612: bf00 nop
8010614: 3708 adds r7, #8
8010616: 46bd mov sp, r7
8010618: bd80 pop {r7, pc}
801061a: bf00 nop
801061c: 2000c0cc .word 0x2000c0cc
8010620: 200086d0 .word 0x200086d0
8010624: 200086d4 .word 0x200086d4
8010628: 200086dc .word 0x200086dc
801062c: 200086d8 .word 0x200086d8
8010630: 0801d934 .word 0x0801d934
8010634: 0801da08 .word 0x0801da08
8010638: 0801d97c .word 0x0801d97c
0801063c <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)
{
801063c: b580 push {r7, lr}
801063e: b086 sub sp, #24
8010640: af00 add r7, sp, #0
8010642: 6078 str r0, [r7, #4]
struct mem *nmem, *pmem;
mem_size_t rmem_idx;
rmem_idx = mem_to_ptr(mem);
8010644: 6878 ldr r0, [r7, #4]
8010646: f7ff fef3 bl 8010430 <mem_to_ptr>
801064a: 4603 mov r3, r0
801064c: 82fb strh r3, [r7, #22]
nmem = ptr_to_mem(mem->next);
801064e: 687b ldr r3, [r7, #4]
8010650: 881b ldrh r3, [r3, #0]
8010652: 4618 mov r0, r3
8010654: f7ff feda bl 801040c <ptr_to_mem>
8010658: 6138 str r0, [r7, #16]
pmem = ptr_to_mem(mem->prev);
801065a: 687b ldr r3, [r7, #4]
801065c: 885b ldrh r3, [r3, #2]
801065e: 4618 mov r0, r3
8010660: f7ff fed4 bl 801040c <ptr_to_mem>
8010664: 60f8 str r0, [r7, #12]
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
8010666: 687b ldr r3, [r7, #4]
8010668: 881b ldrh r3, [r3, #0]
801066a: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
801066e: d818 bhi.n 80106a2 <mem_link_valid+0x66>
8010670: 687b ldr r3, [r7, #4]
8010672: 885b ldrh r3, [r3, #2]
8010674: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010678: d813 bhi.n 80106a2 <mem_link_valid+0x66>
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
801067a: 687b ldr r3, [r7, #4]
801067c: 885b ldrh r3, [r3, #2]
if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
801067e: 8afa ldrh r2, [r7, #22]
8010680: 429a cmp r2, r3
8010682: d004 beq.n 801068e <mem_link_valid+0x52>
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
8010684: 68fb ldr r3, [r7, #12]
8010686: 881b ldrh r3, [r3, #0]
8010688: 8afa ldrh r2, [r7, #22]
801068a: 429a cmp r2, r3
801068c: d109 bne.n 80106a2 <mem_link_valid+0x66>
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
801068e: 4b08 ldr r3, [pc, #32] ; (80106b0 <mem_link_valid+0x74>)
8010690: 681b ldr r3, [r3, #0]
((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
8010692: 693a ldr r2, [r7, #16]
8010694: 429a cmp r2, r3
8010696: d006 beq.n 80106a6 <mem_link_valid+0x6a>
((nmem != ram_end) && (nmem->prev != rmem_idx))) {
8010698: 693b ldr r3, [r7, #16]
801069a: 885b ldrh r3, [r3, #2]
801069c: 8afa ldrh r2, [r7, #22]
801069e: 429a cmp r2, r3
80106a0: d001 beq.n 80106a6 <mem_link_valid+0x6a>
return 0;
80106a2: 2300 movs r3, #0
80106a4: e000 b.n 80106a8 <mem_link_valid+0x6c>
}
return 1;
80106a6: 2301 movs r3, #1
}
80106a8: 4618 mov r0, r3
80106aa: 3718 adds r7, #24
80106ac: 46bd mov sp, r7
80106ae: bd80 pop {r7, pc}
80106b0: 200086d4 .word 0x200086d4
080106b4 <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)
{
80106b4: b580 push {r7, lr}
80106b6: b088 sub sp, #32
80106b8: af00 add r7, sp, #0
80106ba: 6078 str r0, [r7, #4]
struct mem *mem;
LWIP_MEM_FREE_DECL_PROTECT();
if (rmem == NULL) {
80106bc: 687b ldr r3, [r7, #4]
80106be: 2b00 cmp r3, #0
80106c0: d070 beq.n 80107a4 <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) {
80106c2: 687b ldr r3, [r7, #4]
80106c4: f003 0303 and.w r3, r3, #3
80106c8: 2b00 cmp r3, #0
80106ca: d00d beq.n 80106e8 <mem_free+0x34>
LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment");
80106cc: 4b37 ldr r3, [pc, #220] ; (80107ac <mem_free+0xf8>)
80106ce: f240 2273 movw r2, #627 ; 0x273
80106d2: 4937 ldr r1, [pc, #220] ; (80107b0 <mem_free+0xfc>)
80106d4: 4837 ldr r0, [pc, #220] ; (80107b4 <mem_free+0x100>)
80106d6: f00b ff37 bl 801c548 <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);
80106da: f00b feb7 bl 801c44c <sys_arch_protect>
80106de: 60f8 str r0, [r7, #12]
80106e0: 68f8 ldr r0, [r7, #12]
80106e2: f00b fec1 bl 801c468 <sys_arch_unprotect>
return;
80106e6: e05e b.n 80107a6 <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));
80106e8: 687b ldr r3, [r7, #4]
80106ea: 3b08 subs r3, #8
80106ec: 61fb str r3, [r7, #28]
if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) {
80106ee: 4b32 ldr r3, [pc, #200] ; (80107b8 <mem_free+0x104>)
80106f0: 681b ldr r3, [r3, #0]
80106f2: 69fa ldr r2, [r7, #28]
80106f4: 429a cmp r2, r3
80106f6: d306 bcc.n 8010706 <mem_free+0x52>
80106f8: 687b ldr r3, [r7, #4]
80106fa: f103 020c add.w r2, r3, #12
80106fe: 4b2f ldr r3, [pc, #188] ; (80107bc <mem_free+0x108>)
8010700: 681b ldr r3, [r3, #0]
8010702: 429a cmp r2, r3
8010704: d90d bls.n 8010722 <mem_free+0x6e>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory");
8010706: 4b29 ldr r3, [pc, #164] ; (80107ac <mem_free+0xf8>)
8010708: f240 227f movw r2, #639 ; 0x27f
801070c: 492c ldr r1, [pc, #176] ; (80107c0 <mem_free+0x10c>)
801070e: 4829 ldr r0, [pc, #164] ; (80107b4 <mem_free+0x100>)
8010710: f00b ff1a bl 801c548 <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);
8010714: f00b fe9a bl 801c44c <sys_arch_protect>
8010718: 6138 str r0, [r7, #16]
801071a: 6938 ldr r0, [r7, #16]
801071c: f00b fea4 bl 801c468 <sys_arch_unprotect>
return;
8010720: e041 b.n 80107a6 <mem_free+0xf2>
}
#if MEM_OVERFLOW_CHECK
mem_overflow_check_element(mem);
#endif
/* protect the heap from concurrent access */
LWIP_MEM_FREE_PROTECT();
8010722: 4828 ldr r0, [pc, #160] ; (80107c4 <mem_free+0x110>)
8010724: f00b fe50 bl 801c3c8 <sys_mutex_lock>
/* mem has to be in a used state */
if (!mem->used) {
8010728: 69fb ldr r3, [r7, #28]
801072a: 791b ldrb r3, [r3, #4]
801072c: 2b00 cmp r3, #0
801072e: d110 bne.n 8010752 <mem_free+0x9e>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free");
8010730: 4b1e ldr r3, [pc, #120] ; (80107ac <mem_free+0xf8>)
8010732: f44f 7223 mov.w r2, #652 ; 0x28c
8010736: 4924 ldr r1, [pc, #144] ; (80107c8 <mem_free+0x114>)
8010738: 481e ldr r0, [pc, #120] ; (80107b4 <mem_free+0x100>)
801073a: f00b ff05 bl 801c548 <iprintf>
LWIP_MEM_FREE_UNPROTECT();
801073e: 4821 ldr r0, [pc, #132] ; (80107c4 <mem_free+0x110>)
8010740: f00b fe51 bl 801c3e6 <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);
8010744: f00b fe82 bl 801c44c <sys_arch_protect>
8010748: 6178 str r0, [r7, #20]
801074a: 6978 ldr r0, [r7, #20]
801074c: f00b fe8c bl 801c468 <sys_arch_unprotect>
return;
8010750: e029 b.n 80107a6 <mem_free+0xf2>
}
if (!mem_link_valid(mem)) {
8010752: 69f8 ldr r0, [r7, #28]
8010754: f7ff ff72 bl 801063c <mem_link_valid>
8010758: 4603 mov r3, r0
801075a: 2b00 cmp r3, #0
801075c: d110 bne.n 8010780 <mem_free+0xcc>
LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free");
801075e: 4b13 ldr r3, [pc, #76] ; (80107ac <mem_free+0xf8>)
8010760: f240 2295 movw r2, #661 ; 0x295
8010764: 4919 ldr r1, [pc, #100] ; (80107cc <mem_free+0x118>)
8010766: 4813 ldr r0, [pc, #76] ; (80107b4 <mem_free+0x100>)
8010768: f00b feee bl 801c548 <iprintf>
LWIP_MEM_FREE_UNPROTECT();
801076c: 4815 ldr r0, [pc, #84] ; (80107c4 <mem_free+0x110>)
801076e: f00b fe3a bl 801c3e6 <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);
8010772: f00b fe6b bl 801c44c <sys_arch_protect>
8010776: 61b8 str r0, [r7, #24]
8010778: 69b8 ldr r0, [r7, #24]
801077a: f00b fe75 bl 801c468 <sys_arch_unprotect>
return;
801077e: e012 b.n 80107a6 <mem_free+0xf2>
}
/* mem is now unused. */
mem->used = 0;
8010780: 69fb ldr r3, [r7, #28]
8010782: 2200 movs r2, #0
8010784: 711a strb r2, [r3, #4]
if (mem < lfree) {
8010786: 4b12 ldr r3, [pc, #72] ; (80107d0 <mem_free+0x11c>)
8010788: 681b ldr r3, [r3, #0]
801078a: 69fa ldr r2, [r7, #28]
801078c: 429a cmp r2, r3
801078e: d202 bcs.n 8010796 <mem_free+0xe2>
/* the newly freed struct is now the lowest */
lfree = mem;
8010790: 4a0f ldr r2, [pc, #60] ; (80107d0 <mem_free+0x11c>)
8010792: 69fb ldr r3, [r7, #28]
8010794: 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);
8010796: 69f8 ldr r0, [r7, #28]
8010798: f7ff fe5c bl 8010454 <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();
801079c: 4809 ldr r0, [pc, #36] ; (80107c4 <mem_free+0x110>)
801079e: f00b fe22 bl 801c3e6 <sys_mutex_unlock>
80107a2: e000 b.n 80107a6 <mem_free+0xf2>
return;
80107a4: bf00 nop
}
80107a6: 3720 adds r7, #32
80107a8: 46bd mov sp, r7
80107aa: bd80 pop {r7, pc}
80107ac: 0801d934 .word 0x0801d934
80107b0: 0801da24 .word 0x0801da24
80107b4: 0801d97c .word 0x0801d97c
80107b8: 200086d0 .word 0x200086d0
80107bc: 200086d4 .word 0x200086d4
80107c0: 0801da48 .word 0x0801da48
80107c4: 200086d8 .word 0x200086d8
80107c8: 0801da64 .word 0x0801da64
80107cc: 0801da8c .word 0x0801da8c
80107d0: 200086dc .word 0x200086dc
080107d4 <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)
{
80107d4: b580 push {r7, lr}
80107d6: b088 sub sp, #32
80107d8: af00 add r7, sp, #0
80107da: 6078 str r0, [r7, #4]
80107dc: 460b mov r3, r1
80107de: 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);
80107e0: 887b ldrh r3, [r7, #2]
80107e2: 3303 adds r3, #3
80107e4: b29b uxth r3, r3
80107e6: f023 0303 bic.w r3, r3, #3
80107ea: 83fb strh r3, [r7, #30]
if (newsize < MIN_SIZE_ALIGNED) {
80107ec: 8bfb ldrh r3, [r7, #30]
80107ee: 2b0b cmp r3, #11
80107f0: d801 bhi.n 80107f6 <mem_trim+0x22>
/* every data block must be at least MIN_SIZE_ALIGNED long */
newsize = MIN_SIZE_ALIGNED;
80107f2: 230c movs r3, #12
80107f4: 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)) {
80107f6: 8bfb ldrh r3, [r7, #30]
80107f8: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80107fc: d803 bhi.n 8010806 <mem_trim+0x32>
80107fe: 8bfa ldrh r2, [r7, #30]
8010800: 887b ldrh r3, [r7, #2]
8010802: 429a cmp r2, r3
8010804: d201 bcs.n 801080a <mem_trim+0x36>
return NULL;
8010806: 2300 movs r3, #0
8010808: e0d8 b.n 80109bc <mem_trim+0x1e8>
}
LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
801080a: 4b6e ldr r3, [pc, #440] ; (80109c4 <mem_trim+0x1f0>)
801080c: 681b ldr r3, [r3, #0]
801080e: 687a ldr r2, [r7, #4]
8010810: 429a cmp r2, r3
8010812: d304 bcc.n 801081e <mem_trim+0x4a>
8010814: 4b6c ldr r3, [pc, #432] ; (80109c8 <mem_trim+0x1f4>)
8010816: 681b ldr r3, [r3, #0]
8010818: 687a ldr r2, [r7, #4]
801081a: 429a cmp r2, r3
801081c: d306 bcc.n 801082c <mem_trim+0x58>
801081e: 4b6b ldr r3, [pc, #428] ; (80109cc <mem_trim+0x1f8>)
8010820: f240 22d2 movw r2, #722 ; 0x2d2
8010824: 496a ldr r1, [pc, #424] ; (80109d0 <mem_trim+0x1fc>)
8010826: 486b ldr r0, [pc, #428] ; (80109d4 <mem_trim+0x200>)
8010828: f00b fe8e bl 801c548 <iprintf>
(u8_t *)rmem < (u8_t *)ram_end);
if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
801082c: 4b65 ldr r3, [pc, #404] ; (80109c4 <mem_trim+0x1f0>)
801082e: 681b ldr r3, [r3, #0]
8010830: 687a ldr r2, [r7, #4]
8010832: 429a cmp r2, r3
8010834: d304 bcc.n 8010840 <mem_trim+0x6c>
8010836: 4b64 ldr r3, [pc, #400] ; (80109c8 <mem_trim+0x1f4>)
8010838: 681b ldr r3, [r3, #0]
801083a: 687a ldr r2, [r7, #4]
801083c: 429a cmp r2, r3
801083e: d307 bcc.n 8010850 <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);
8010840: f00b fe04 bl 801c44c <sys_arch_protect>
8010844: 60b8 str r0, [r7, #8]
8010846: 68b8 ldr r0, [r7, #8]
8010848: f00b fe0e bl 801c468 <sys_arch_unprotect>
return rmem;
801084c: 687b ldr r3, [r7, #4]
801084e: e0b5 b.n 80109bc <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));
8010850: 687b ldr r3, [r7, #4]
8010852: 3b08 subs r3, #8
8010854: 61bb str r3, [r7, #24]
#if MEM_OVERFLOW_CHECK
mem_overflow_check_element(mem);
#endif
/* ... and its offset pointer */
ptr = mem_to_ptr(mem);
8010856: 69b8 ldr r0, [r7, #24]
8010858: f7ff fdea bl 8010430 <mem_to_ptr>
801085c: 4603 mov r3, r0
801085e: 82fb strh r3, [r7, #22]
size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD));
8010860: 69bb ldr r3, [r7, #24]
8010862: 881a ldrh r2, [r3, #0]
8010864: 8afb ldrh r3, [r7, #22]
8010866: 1ad3 subs r3, r2, r3
8010868: b29b uxth r3, r3
801086a: 3b08 subs r3, #8
801086c: 82bb strh r3, [r7, #20]
LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
801086e: 8bfa ldrh r2, [r7, #30]
8010870: 8abb ldrh r3, [r7, #20]
8010872: 429a cmp r2, r3
8010874: d906 bls.n 8010884 <mem_trim+0xb0>
8010876: 4b55 ldr r3, [pc, #340] ; (80109cc <mem_trim+0x1f8>)
8010878: f44f 7239 mov.w r2, #740 ; 0x2e4
801087c: 4956 ldr r1, [pc, #344] ; (80109d8 <mem_trim+0x204>)
801087e: 4855 ldr r0, [pc, #340] ; (80109d4 <mem_trim+0x200>)
8010880: f00b fe62 bl 801c548 <iprintf>
if (newsize > size) {
8010884: 8bfa ldrh r2, [r7, #30]
8010886: 8abb ldrh r3, [r7, #20]
8010888: 429a cmp r2, r3
801088a: d901 bls.n 8010890 <mem_trim+0xbc>
/* not supported */
return NULL;
801088c: 2300 movs r3, #0
801088e: e095 b.n 80109bc <mem_trim+0x1e8>
}
if (newsize == size) {
8010890: 8bfa ldrh r2, [r7, #30]
8010892: 8abb ldrh r3, [r7, #20]
8010894: 429a cmp r2, r3
8010896: d101 bne.n 801089c <mem_trim+0xc8>
/* No change in size, simply return */
return rmem;
8010898: 687b ldr r3, [r7, #4]
801089a: e08f b.n 80109bc <mem_trim+0x1e8>
}
/* protect the heap from concurrent access */
LWIP_MEM_FREE_PROTECT();
801089c: 484f ldr r0, [pc, #316] ; (80109dc <mem_trim+0x208>)
801089e: f00b fd93 bl 801c3c8 <sys_mutex_lock>
mem2 = ptr_to_mem(mem->next);
80108a2: 69bb ldr r3, [r7, #24]
80108a4: 881b ldrh r3, [r3, #0]
80108a6: 4618 mov r0, r3
80108a8: f7ff fdb0 bl 801040c <ptr_to_mem>
80108ac: 6138 str r0, [r7, #16]
if (mem2->used == 0) {
80108ae: 693b ldr r3, [r7, #16]
80108b0: 791b ldrb r3, [r3, #4]
80108b2: 2b00 cmp r3, #0
80108b4: d13f bne.n 8010936 <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);
80108b6: 69bb ldr r3, [r7, #24]
80108b8: 881b ldrh r3, [r3, #0]
80108ba: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80108be: d106 bne.n 80108ce <mem_trim+0xfa>
80108c0: 4b42 ldr r3, [pc, #264] ; (80109cc <mem_trim+0x1f8>)
80108c2: f240 22f5 movw r2, #757 ; 0x2f5
80108c6: 4946 ldr r1, [pc, #280] ; (80109e0 <mem_trim+0x20c>)
80108c8: 4842 ldr r0, [pc, #264] ; (80109d4 <mem_trim+0x200>)
80108ca: f00b fe3d bl 801c548 <iprintf>
/* remember the old next pointer */
next = mem2->next;
80108ce: 693b ldr r3, [r7, #16]
80108d0: 881b ldrh r3, [r3, #0]
80108d2: 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);
80108d4: 8afa ldrh r2, [r7, #22]
80108d6: 8bfb ldrh r3, [r7, #30]
80108d8: 4413 add r3, r2
80108da: b29b uxth r3, r3
80108dc: 3308 adds r3, #8
80108de: 81fb strh r3, [r7, #14]
if (lfree == mem2) {
80108e0: 4b40 ldr r3, [pc, #256] ; (80109e4 <mem_trim+0x210>)
80108e2: 681b ldr r3, [r3, #0]
80108e4: 693a ldr r2, [r7, #16]
80108e6: 429a cmp r2, r3
80108e8: d106 bne.n 80108f8 <mem_trim+0x124>
lfree = ptr_to_mem(ptr2);
80108ea: 89fb ldrh r3, [r7, #14]
80108ec: 4618 mov r0, r3
80108ee: f7ff fd8d bl 801040c <ptr_to_mem>
80108f2: 4602 mov r2, r0
80108f4: 4b3b ldr r3, [pc, #236] ; (80109e4 <mem_trim+0x210>)
80108f6: 601a str r2, [r3, #0]
}
mem2 = ptr_to_mem(ptr2);
80108f8: 89fb ldrh r3, [r7, #14]
80108fa: 4618 mov r0, r3
80108fc: f7ff fd86 bl 801040c <ptr_to_mem>
8010900: 6138 str r0, [r7, #16]
mem2->used = 0;
8010902: 693b ldr r3, [r7, #16]
8010904: 2200 movs r2, #0
8010906: 711a strb r2, [r3, #4]
/* restore the next pointer */
mem2->next = next;
8010908: 693b ldr r3, [r7, #16]
801090a: 89ba ldrh r2, [r7, #12]
801090c: 801a strh r2, [r3, #0]
/* link it back to mem */
mem2->prev = ptr;
801090e: 693b ldr r3, [r7, #16]
8010910: 8afa ldrh r2, [r7, #22]
8010912: 805a strh r2, [r3, #2]
/* link mem to it */
mem->next = ptr2;
8010914: 69bb ldr r3, [r7, #24]
8010916: 89fa ldrh r2, [r7, #14]
8010918: 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) {
801091a: 693b ldr r3, [r7, #16]
801091c: 881b ldrh r3, [r3, #0]
801091e: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010922: d047 beq.n 80109b4 <mem_trim+0x1e0>
ptr_to_mem(mem2->next)->prev = ptr2;
8010924: 693b ldr r3, [r7, #16]
8010926: 881b ldrh r3, [r3, #0]
8010928: 4618 mov r0, r3
801092a: f7ff fd6f bl 801040c <ptr_to_mem>
801092e: 4602 mov r2, r0
8010930: 89fb ldrh r3, [r7, #14]
8010932: 8053 strh r3, [r2, #2]
8010934: e03e b.n 80109b4 <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) {
8010936: 8bfb ldrh r3, [r7, #30]
8010938: f103 0214 add.w r2, r3, #20
801093c: 8abb ldrh r3, [r7, #20]
801093e: 429a cmp r2, r3
8010940: d838 bhi.n 80109b4 <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);
8010942: 8afa ldrh r2, [r7, #22]
8010944: 8bfb ldrh r3, [r7, #30]
8010946: 4413 add r3, r2
8010948: b29b uxth r3, r3
801094a: 3308 adds r3, #8
801094c: 81fb strh r3, [r7, #14]
LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
801094e: 69bb ldr r3, [r7, #24]
8010950: 881b ldrh r3, [r3, #0]
8010952: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010956: d106 bne.n 8010966 <mem_trim+0x192>
8010958: 4b1c ldr r3, [pc, #112] ; (80109cc <mem_trim+0x1f8>)
801095a: f240 3216 movw r2, #790 ; 0x316
801095e: 4920 ldr r1, [pc, #128] ; (80109e0 <mem_trim+0x20c>)
8010960: 481c ldr r0, [pc, #112] ; (80109d4 <mem_trim+0x200>)
8010962: f00b fdf1 bl 801c548 <iprintf>
mem2 = ptr_to_mem(ptr2);
8010966: 89fb ldrh r3, [r7, #14]
8010968: 4618 mov r0, r3
801096a: f7ff fd4f bl 801040c <ptr_to_mem>
801096e: 6138 str r0, [r7, #16]
if (mem2 < lfree) {
8010970: 4b1c ldr r3, [pc, #112] ; (80109e4 <mem_trim+0x210>)
8010972: 681b ldr r3, [r3, #0]
8010974: 693a ldr r2, [r7, #16]
8010976: 429a cmp r2, r3
8010978: d202 bcs.n 8010980 <mem_trim+0x1ac>
lfree = mem2;
801097a: 4a1a ldr r2, [pc, #104] ; (80109e4 <mem_trim+0x210>)
801097c: 693b ldr r3, [r7, #16]
801097e: 6013 str r3, [r2, #0]
}
mem2->used = 0;
8010980: 693b ldr r3, [r7, #16]
8010982: 2200 movs r2, #0
8010984: 711a strb r2, [r3, #4]
mem2->next = mem->next;
8010986: 69bb ldr r3, [r7, #24]
8010988: 881a ldrh r2, [r3, #0]
801098a: 693b ldr r3, [r7, #16]
801098c: 801a strh r2, [r3, #0]
mem2->prev = ptr;
801098e: 693b ldr r3, [r7, #16]
8010990: 8afa ldrh r2, [r7, #22]
8010992: 805a strh r2, [r3, #2]
mem->next = ptr2;
8010994: 69bb ldr r3, [r7, #24]
8010996: 89fa ldrh r2, [r7, #14]
8010998: 801a strh r2, [r3, #0]
if (mem2->next != MEM_SIZE_ALIGNED) {
801099a: 693b ldr r3, [r7, #16]
801099c: 881b ldrh r3, [r3, #0]
801099e: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
80109a2: d007 beq.n 80109b4 <mem_trim+0x1e0>
ptr_to_mem(mem2->next)->prev = ptr2;
80109a4: 693b ldr r3, [r7, #16]
80109a6: 881b ldrh r3, [r3, #0]
80109a8: 4618 mov r0, r3
80109aa: f7ff fd2f bl 801040c <ptr_to_mem>
80109ae: 4602 mov r2, r0
80109b0: 89fb ldrh r3, [r7, #14]
80109b2: 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();
80109b4: 4809 ldr r0, [pc, #36] ; (80109dc <mem_trim+0x208>)
80109b6: f00b fd16 bl 801c3e6 <sys_mutex_unlock>
return rmem;
80109ba: 687b ldr r3, [r7, #4]
}
80109bc: 4618 mov r0, r3
80109be: 3720 adds r7, #32
80109c0: 46bd mov sp, r7
80109c2: bd80 pop {r7, pc}
80109c4: 200086d0 .word 0x200086d0
80109c8: 200086d4 .word 0x200086d4
80109cc: 0801d934 .word 0x0801d934
80109d0: 0801dac0 .word 0x0801dac0
80109d4: 0801d97c .word 0x0801d97c
80109d8: 0801dad8 .word 0x0801dad8
80109dc: 200086d8 .word 0x200086d8
80109e0: 0801daf8 .word 0x0801daf8
80109e4: 200086dc .word 0x200086dc
080109e8 <mem_malloc>:
*
* Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT).
*/
void *
mem_malloc(mem_size_t size_in)
{
80109e8: b580 push {r7, lr}
80109ea: b088 sub sp, #32
80109ec: af00 add r7, sp, #0
80109ee: 4603 mov r3, r0
80109f0: 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) {
80109f2: 88fb ldrh r3, [r7, #6]
80109f4: 2b00 cmp r3, #0
80109f6: d101 bne.n 80109fc <mem_malloc+0x14>
return NULL;
80109f8: 2300 movs r3, #0
80109fa: e0e2 b.n 8010bc2 <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);
80109fc: 88fb ldrh r3, [r7, #6]
80109fe: 3303 adds r3, #3
8010a00: b29b uxth r3, r3
8010a02: f023 0303 bic.w r3, r3, #3
8010a06: 83bb strh r3, [r7, #28]
if (size < MIN_SIZE_ALIGNED) {
8010a08: 8bbb ldrh r3, [r7, #28]
8010a0a: 2b0b cmp r3, #11
8010a0c: d801 bhi.n 8010a12 <mem_malloc+0x2a>
/* every data block must be at least MIN_SIZE_ALIGNED long */
size = MIN_SIZE_ALIGNED;
8010a0e: 230c movs r3, #12
8010a10: 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)) {
8010a12: 8bbb ldrh r3, [r7, #28]
8010a14: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010a18: d803 bhi.n 8010a22 <mem_malloc+0x3a>
8010a1a: 8bba ldrh r2, [r7, #28]
8010a1c: 88fb ldrh r3, [r7, #6]
8010a1e: 429a cmp r2, r3
8010a20: d201 bcs.n 8010a26 <mem_malloc+0x3e>
return NULL;
8010a22: 2300 movs r3, #0
8010a24: e0cd b.n 8010bc2 <mem_malloc+0x1da>
}
/* protect the heap from concurrent access */
sys_mutex_lock(&mem_mutex);
8010a26: 4869 ldr r0, [pc, #420] ; (8010bcc <mem_malloc+0x1e4>)
8010a28: f00b fcce bl 801c3c8 <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;
8010a2c: 4b68 ldr r3, [pc, #416] ; (8010bd0 <mem_malloc+0x1e8>)
8010a2e: 681b ldr r3, [r3, #0]
8010a30: 4618 mov r0, r3
8010a32: f7ff fcfd bl 8010430 <mem_to_ptr>
8010a36: 4603 mov r3, r0
8010a38: 83fb strh r3, [r7, #30]
8010a3a: e0b7 b.n 8010bac <mem_malloc+0x1c4>
ptr = ptr_to_mem(ptr)->next) {
mem = ptr_to_mem(ptr);
8010a3c: 8bfb ldrh r3, [r7, #30]
8010a3e: 4618 mov r0, r3
8010a40: f7ff fce4 bl 801040c <ptr_to_mem>
8010a44: 6178 str r0, [r7, #20]
local_mem_free_count = 1;
break;
}
#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
if ((!mem->used) &&
8010a46: 697b ldr r3, [r7, #20]
8010a48: 791b ldrb r3, [r3, #4]
8010a4a: 2b00 cmp r3, #0
8010a4c: f040 80a7 bne.w 8010b9e <mem_malloc+0x1b6>
(mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
8010a50: 697b ldr r3, [r7, #20]
8010a52: 881b ldrh r3, [r3, #0]
8010a54: 461a mov r2, r3
8010a56: 8bfb ldrh r3, [r7, #30]
8010a58: 1ad3 subs r3, r2, r3
8010a5a: f1a3 0208 sub.w r2, r3, #8
8010a5e: 8bbb ldrh r3, [r7, #28]
if ((!mem->used) &&
8010a60: 429a cmp r2, r3
8010a62: f0c0 809c bcc.w 8010b9e <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)) {
8010a66: 697b ldr r3, [r7, #20]
8010a68: 881b ldrh r3, [r3, #0]
8010a6a: 461a mov r2, r3
8010a6c: 8bfb ldrh r3, [r7, #30]
8010a6e: 1ad3 subs r3, r2, r3
8010a70: f1a3 0208 sub.w r2, r3, #8
8010a74: 8bbb ldrh r3, [r7, #28]
8010a76: 3314 adds r3, #20
8010a78: 429a cmp r2, r3
8010a7a: d333 bcc.n 8010ae4 <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);
8010a7c: 8bfa ldrh r2, [r7, #30]
8010a7e: 8bbb ldrh r3, [r7, #28]
8010a80: 4413 add r3, r2
8010a82: b29b uxth r3, r3
8010a84: 3308 adds r3, #8
8010a86: 827b strh r3, [r7, #18]
LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
8010a88: 8a7b ldrh r3, [r7, #18]
8010a8a: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010a8e: d106 bne.n 8010a9e <mem_malloc+0xb6>
8010a90: 4b50 ldr r3, [pc, #320] ; (8010bd4 <mem_malloc+0x1ec>)
8010a92: f240 3287 movw r2, #903 ; 0x387
8010a96: 4950 ldr r1, [pc, #320] ; (8010bd8 <mem_malloc+0x1f0>)
8010a98: 4850 ldr r0, [pc, #320] ; (8010bdc <mem_malloc+0x1f4>)
8010a9a: f00b fd55 bl 801c548 <iprintf>
/* create mem2 struct */
mem2 = ptr_to_mem(ptr2);
8010a9e: 8a7b ldrh r3, [r7, #18]
8010aa0: 4618 mov r0, r3
8010aa2: f7ff fcb3 bl 801040c <ptr_to_mem>
8010aa6: 60f8 str r0, [r7, #12]
mem2->used = 0;
8010aa8: 68fb ldr r3, [r7, #12]
8010aaa: 2200 movs r2, #0
8010aac: 711a strb r2, [r3, #4]
mem2->next = mem->next;
8010aae: 697b ldr r3, [r7, #20]
8010ab0: 881a ldrh r2, [r3, #0]
8010ab2: 68fb ldr r3, [r7, #12]
8010ab4: 801a strh r2, [r3, #0]
mem2->prev = ptr;
8010ab6: 68fb ldr r3, [r7, #12]
8010ab8: 8bfa ldrh r2, [r7, #30]
8010aba: 805a strh r2, [r3, #2]
/* and insert it between mem and mem->next */
mem->next = ptr2;
8010abc: 697b ldr r3, [r7, #20]
8010abe: 8a7a ldrh r2, [r7, #18]
8010ac0: 801a strh r2, [r3, #0]
mem->used = 1;
8010ac2: 697b ldr r3, [r7, #20]
8010ac4: 2201 movs r2, #1
8010ac6: 711a strb r2, [r3, #4]
if (mem2->next != MEM_SIZE_ALIGNED) {
8010ac8: 68fb ldr r3, [r7, #12]
8010aca: 881b ldrh r3, [r3, #0]
8010acc: f5b3 6fc8 cmp.w r3, #1600 ; 0x640
8010ad0: d00b beq.n 8010aea <mem_malloc+0x102>
ptr_to_mem(mem2->next)->prev = ptr2;
8010ad2: 68fb ldr r3, [r7, #12]
8010ad4: 881b ldrh r3, [r3, #0]
8010ad6: 4618 mov r0, r3
8010ad8: f7ff fc98 bl 801040c <ptr_to_mem>
8010adc: 4602 mov r2, r0
8010ade: 8a7b ldrh r3, [r7, #18]
8010ae0: 8053 strh r3, [r2, #2]
8010ae2: e002 b.n 8010aea <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;
8010ae4: 697b ldr r3, [r7, #20]
8010ae6: 2201 movs r2, #1
8010ae8: 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) {
8010aea: 4b39 ldr r3, [pc, #228] ; (8010bd0 <mem_malloc+0x1e8>)
8010aec: 681b ldr r3, [r3, #0]
8010aee: 697a ldr r2, [r7, #20]
8010af0: 429a cmp r2, r3
8010af2: d127 bne.n 8010b44 <mem_malloc+0x15c>
struct mem *cur = lfree;
8010af4: 4b36 ldr r3, [pc, #216] ; (8010bd0 <mem_malloc+0x1e8>)
8010af6: 681b ldr r3, [r3, #0]
8010af8: 61bb str r3, [r7, #24]
/* Find next free block after mem and update lowest free pointer */
while (cur->used && cur != ram_end) {
8010afa: e005 b.n 8010b08 <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);
8010afc: 69bb ldr r3, [r7, #24]
8010afe: 881b ldrh r3, [r3, #0]
8010b00: 4618 mov r0, r3
8010b02: f7ff fc83 bl 801040c <ptr_to_mem>
8010b06: 61b8 str r0, [r7, #24]
while (cur->used && cur != ram_end) {
8010b08: 69bb ldr r3, [r7, #24]
8010b0a: 791b ldrb r3, [r3, #4]
8010b0c: 2b00 cmp r3, #0
8010b0e: d004 beq.n 8010b1a <mem_malloc+0x132>
8010b10: 4b33 ldr r3, [pc, #204] ; (8010be0 <mem_malloc+0x1f8>)
8010b12: 681b ldr r3, [r3, #0]
8010b14: 69ba ldr r2, [r7, #24]
8010b16: 429a cmp r2, r3
8010b18: d1f0 bne.n 8010afc <mem_malloc+0x114>
}
lfree = cur;
8010b1a: 4a2d ldr r2, [pc, #180] ; (8010bd0 <mem_malloc+0x1e8>)
8010b1c: 69bb ldr r3, [r7, #24]
8010b1e: 6013 str r3, [r2, #0]
LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
8010b20: 4b2b ldr r3, [pc, #172] ; (8010bd0 <mem_malloc+0x1e8>)
8010b22: 681a ldr r2, [r3, #0]
8010b24: 4b2e ldr r3, [pc, #184] ; (8010be0 <mem_malloc+0x1f8>)
8010b26: 681b ldr r3, [r3, #0]
8010b28: 429a cmp r2, r3
8010b2a: d00b beq.n 8010b44 <mem_malloc+0x15c>
8010b2c: 4b28 ldr r3, [pc, #160] ; (8010bd0 <mem_malloc+0x1e8>)
8010b2e: 681b ldr r3, [r3, #0]
8010b30: 791b ldrb r3, [r3, #4]
8010b32: 2b00 cmp r3, #0
8010b34: d006 beq.n 8010b44 <mem_malloc+0x15c>
8010b36: 4b27 ldr r3, [pc, #156] ; (8010bd4 <mem_malloc+0x1ec>)
8010b38: f240 32b5 movw r2, #949 ; 0x3b5
8010b3c: 4929 ldr r1, [pc, #164] ; (8010be4 <mem_malloc+0x1fc>)
8010b3e: 4827 ldr r0, [pc, #156] ; (8010bdc <mem_malloc+0x1f4>)
8010b40: f00b fd02 bl 801c548 <iprintf>
}
LWIP_MEM_ALLOC_UNPROTECT();
sys_mutex_unlock(&mem_mutex);
8010b44: 4821 ldr r0, [pc, #132] ; (8010bcc <mem_malloc+0x1e4>)
8010b46: f00b fc4e bl 801c3e6 <sys_mutex_unlock>
LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
8010b4a: 8bba ldrh r2, [r7, #28]
8010b4c: 697b ldr r3, [r7, #20]
8010b4e: 4413 add r3, r2
8010b50: 3308 adds r3, #8
8010b52: 4a23 ldr r2, [pc, #140] ; (8010be0 <mem_malloc+0x1f8>)
8010b54: 6812 ldr r2, [r2, #0]
8010b56: 4293 cmp r3, r2
8010b58: d906 bls.n 8010b68 <mem_malloc+0x180>
8010b5a: 4b1e ldr r3, [pc, #120] ; (8010bd4 <mem_malloc+0x1ec>)
8010b5c: f240 32ba movw r2, #954 ; 0x3ba
8010b60: 4921 ldr r1, [pc, #132] ; (8010be8 <mem_malloc+0x200>)
8010b62: 481e ldr r0, [pc, #120] ; (8010bdc <mem_malloc+0x1f4>)
8010b64: f00b fcf0 bl 801c548 <iprintf>
(mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
8010b68: 697b ldr r3, [r7, #20]
8010b6a: f003 0303 and.w r3, r3, #3
8010b6e: 2b00 cmp r3, #0
8010b70: d006 beq.n 8010b80 <mem_malloc+0x198>
8010b72: 4b18 ldr r3, [pc, #96] ; (8010bd4 <mem_malloc+0x1ec>)
8010b74: f44f 726f mov.w r2, #956 ; 0x3bc
8010b78: 491c ldr r1, [pc, #112] ; (8010bec <mem_malloc+0x204>)
8010b7a: 4818 ldr r0, [pc, #96] ; (8010bdc <mem_malloc+0x1f4>)
8010b7c: f00b fce4 bl 801c548 <iprintf>
((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
LWIP_ASSERT("mem_malloc: sanity check alignment",
8010b80: 697b ldr r3, [r7, #20]
8010b82: f003 0303 and.w r3, r3, #3
8010b86: 2b00 cmp r3, #0
8010b88: d006 beq.n 8010b98 <mem_malloc+0x1b0>
8010b8a: 4b12 ldr r3, [pc, #72] ; (8010bd4 <mem_malloc+0x1ec>)
8010b8c: f240 32be movw r2, #958 ; 0x3be
8010b90: 4917 ldr r1, [pc, #92] ; (8010bf0 <mem_malloc+0x208>)
8010b92: 4812 ldr r0, [pc, #72] ; (8010bdc <mem_malloc+0x1f4>)
8010b94: f00b fcd8 bl 801c548 <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;
8010b98: 697b ldr r3, [r7, #20]
8010b9a: 3308 adds r3, #8
8010b9c: e011 b.n 8010bc2 <mem_malloc+0x1da>
ptr = ptr_to_mem(ptr)->next) {
8010b9e: 8bfb ldrh r3, [r7, #30]
8010ba0: 4618 mov r0, r3
8010ba2: f7ff fc33 bl 801040c <ptr_to_mem>
8010ba6: 4603 mov r3, r0
8010ba8: 881b ldrh r3, [r3, #0]
8010baa: 83fb strh r3, [r7, #30]
for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
8010bac: 8bfa ldrh r2, [r7, #30]
8010bae: 8bbb ldrh r3, [r7, #28]
8010bb0: f5c3 63c8 rsb r3, r3, #1600 ; 0x640
8010bb4: 429a cmp r2, r3
8010bb6: f4ff af41 bcc.w 8010a3c <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);
8010bba: 4804 ldr r0, [pc, #16] ; (8010bcc <mem_malloc+0x1e4>)
8010bbc: f00b fc13 bl 801c3e6 <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;
8010bc0: 2300 movs r3, #0
}
8010bc2: 4618 mov r0, r3
8010bc4: 3720 adds r7, #32
8010bc6: 46bd mov sp, r7
8010bc8: bd80 pop {r7, pc}
8010bca: bf00 nop
8010bcc: 200086d8 .word 0x200086d8
8010bd0: 200086dc .word 0x200086dc
8010bd4: 0801d934 .word 0x0801d934
8010bd8: 0801daf8 .word 0x0801daf8
8010bdc: 0801d97c .word 0x0801d97c
8010be0: 200086d4 .word 0x200086d4
8010be4: 0801db0c .word 0x0801db0c
8010be8: 0801db28 .word 0x0801db28
8010bec: 0801db58 .word 0x0801db58
8010bf0: 0801db88 .word 0x0801db88
08010bf4 <memp_init_pool>:
*
* @param desc pool to initialize
*/
void
memp_init_pool(const struct memp_desc *desc)
{
8010bf4: b480 push {r7}
8010bf6: b085 sub sp, #20
8010bf8: af00 add r7, sp, #0
8010bfa: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(desc);
#else
int i;
struct memp *memp;
*desc->tab = NULL;
8010bfc: 687b ldr r3, [r7, #4]
8010bfe: 689b ldr r3, [r3, #8]
8010c00: 2200 movs r2, #0
8010c02: 601a str r2, [r3, #0]
memp = (struct memp *)LWIP_MEM_ALIGN(desc->base);
8010c04: 687b ldr r3, [r7, #4]
8010c06: 685b ldr r3, [r3, #4]
8010c08: 3303 adds r3, #3
8010c0a: f023 0303 bic.w r3, r3, #3
8010c0e: 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) {
8010c10: 2300 movs r3, #0
8010c12: 60fb str r3, [r7, #12]
8010c14: e011 b.n 8010c3a <memp_init_pool+0x46>
memp->next = *desc->tab;
8010c16: 687b ldr r3, [r7, #4]
8010c18: 689b ldr r3, [r3, #8]
8010c1a: 681a ldr r2, [r3, #0]
8010c1c: 68bb ldr r3, [r7, #8]
8010c1e: 601a str r2, [r3, #0]
*desc->tab = memp;
8010c20: 687b ldr r3, [r7, #4]
8010c22: 689b ldr r3, [r3, #8]
8010c24: 68ba ldr r2, [r7, #8]
8010c26: 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
8010c28: 687b ldr r3, [r7, #4]
8010c2a: 881b ldrh r3, [r3, #0]
8010c2c: 461a mov r2, r3
8010c2e: 68bb ldr r3, [r7, #8]
8010c30: 4413 add r3, r2
8010c32: 60bb str r3, [r7, #8]
for (i = 0; i < desc->num; ++i) {
8010c34: 68fb ldr r3, [r7, #12]
8010c36: 3301 adds r3, #1
8010c38: 60fb str r3, [r7, #12]
8010c3a: 687b ldr r3, [r7, #4]
8010c3c: 885b ldrh r3, [r3, #2]
8010c3e: 461a mov r2, r3
8010c40: 68fb ldr r3, [r7, #12]
8010c42: 4293 cmp r3, r2
8010c44: dbe7 blt.n 8010c16 <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) */
}
8010c46: bf00 nop
8010c48: 3714 adds r7, #20
8010c4a: 46bd mov sp, r7
8010c4c: f85d 7b04 ldr.w r7, [sp], #4
8010c50: 4770 bx lr
...
08010c54 <memp_init>:
*
* Carves out memp_memory into linked lists for each pool-type.
*/
void
memp_init(void)
{
8010c54: b580 push {r7, lr}
8010c56: b082 sub sp, #8
8010c58: af00 add r7, sp, #0
u16_t i;
/* for every pool: */
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
8010c5a: 2300 movs r3, #0
8010c5c: 80fb strh r3, [r7, #6]
8010c5e: e009 b.n 8010c74 <memp_init+0x20>
memp_init_pool(memp_pools[i]);
8010c60: 88fb ldrh r3, [r7, #6]
8010c62: 4a08 ldr r2, [pc, #32] ; (8010c84 <memp_init+0x30>)
8010c64: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8010c68: 4618 mov r0, r3
8010c6a: f7ff ffc3 bl 8010bf4 <memp_init_pool>
for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
8010c6e: 88fb ldrh r3, [r7, #6]
8010c70: 3301 adds r3, #1
8010c72: 80fb strh r3, [r7, #6]
8010c74: 88fb ldrh r3, [r7, #6]
8010c76: 2b0c cmp r3, #12
8010c78: d9f2 bls.n 8010c60 <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 */
}
8010c7a: bf00 nop
8010c7c: 3708 adds r7, #8
8010c7e: 46bd mov sp, r7
8010c80: bd80 pop {r7, pc}
8010c82: bf00 nop
8010c84: 08022664 .word 0x08022664
08010c88 <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
{
8010c88: b580 push {r7, lr}
8010c8a: b084 sub sp, #16
8010c8c: af00 add r7, sp, #0
8010c8e: 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);
8010c90: f00b fbdc bl 801c44c <sys_arch_protect>
8010c94: 60f8 str r0, [r7, #12]
memp = *desc->tab;
8010c96: 687b ldr r3, [r7, #4]
8010c98: 689b ldr r3, [r3, #8]
8010c9a: 681b ldr r3, [r3, #0]
8010c9c: 60bb str r3, [r7, #8]
#endif /* MEMP_MEM_MALLOC */
if (memp != NULL) {
8010c9e: 68bb ldr r3, [r7, #8]
8010ca0: 2b00 cmp r3, #0
8010ca2: d015 beq.n 8010cd0 <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;
8010ca4: 687b ldr r3, [r7, #4]
8010ca6: 689b ldr r3, [r3, #8]
8010ca8: 68ba ldr r2, [r7, #8]
8010caa: 6812 ldr r2, [r2, #0]
8010cac: 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",
8010cae: 68bb ldr r3, [r7, #8]
8010cb0: f003 0303 and.w r3, r3, #3
8010cb4: 2b00 cmp r3, #0
8010cb6: d006 beq.n 8010cc6 <do_memp_malloc_pool+0x3e>
8010cb8: 4b09 ldr r3, [pc, #36] ; (8010ce0 <do_memp_malloc_pool+0x58>)
8010cba: f240 1219 movw r2, #281 ; 0x119
8010cbe: 4909 ldr r1, [pc, #36] ; (8010ce4 <do_memp_malloc_pool+0x5c>)
8010cc0: 4809 ldr r0, [pc, #36] ; (8010ce8 <do_memp_malloc_pool+0x60>)
8010cc2: f00b fc41 bl 801c548 <iprintf>
desc->stats->used++;
if (desc->stats->used > desc->stats->max) {
desc->stats->max = desc->stats->used;
}
#endif
SYS_ARCH_UNPROTECT(old_level);
8010cc6: 68f8 ldr r0, [r7, #12]
8010cc8: f00b fbce bl 801c468 <sys_arch_unprotect>
/* cast through u8_t* to get rid of alignment warnings */
return ((u8_t *)memp + MEMP_SIZE);
8010ccc: 68bb ldr r3, [r7, #8]
8010cce: e003 b.n 8010cd8 <do_memp_malloc_pool+0x50>
} else {
#if MEMP_STATS
desc->stats->err++;
#endif
SYS_ARCH_UNPROTECT(old_level);
8010cd0: 68f8 ldr r0, [r7, #12]
8010cd2: f00b fbc9 bl 801c468 <sys_arch_unprotect>
LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc));
}
return NULL;
8010cd6: 2300 movs r3, #0
}
8010cd8: 4618 mov r0, r3
8010cda: 3710 adds r7, #16
8010cdc: 46bd mov sp, r7
8010cde: bd80 pop {r7, pc}
8010ce0: 0801dbac .word 0x0801dbac
8010ce4: 0801dbdc .word 0x0801dbdc
8010ce8: 0801dc00 .word 0x0801dc00
08010cec <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
{
8010cec: b580 push {r7, lr}
8010cee: b084 sub sp, #16
8010cf0: af00 add r7, sp, #0
8010cf2: 4603 mov r3, r0
8010cf4: 71fb strb r3, [r7, #7]
void *memp;
LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
8010cf6: 79fb ldrb r3, [r7, #7]
8010cf8: 2b0c cmp r3, #12
8010cfa: d908 bls.n 8010d0e <memp_malloc+0x22>
8010cfc: 4b0a ldr r3, [pc, #40] ; (8010d28 <memp_malloc+0x3c>)
8010cfe: f240 1257 movw r2, #343 ; 0x157
8010d02: 490a ldr r1, [pc, #40] ; (8010d2c <memp_malloc+0x40>)
8010d04: 480a ldr r0, [pc, #40] ; (8010d30 <memp_malloc+0x44>)
8010d06: f00b fc1f bl 801c548 <iprintf>
8010d0a: 2300 movs r3, #0
8010d0c: e008 b.n 8010d20 <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]);
8010d0e: 79fb ldrb r3, [r7, #7]
8010d10: 4a08 ldr r2, [pc, #32] ; (8010d34 <memp_malloc+0x48>)
8010d12: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8010d16: 4618 mov r0, r3
8010d18: f7ff ffb6 bl 8010c88 <do_memp_malloc_pool>
8010d1c: 60f8 str r0, [r7, #12]
#else
memp = do_memp_malloc_pool_fn(memp_pools[type], file, line);
#endif
return memp;
8010d1e: 68fb ldr r3, [r7, #12]
}
8010d20: 4618 mov r0, r3
8010d22: 3710 adds r7, #16
8010d24: 46bd mov sp, r7
8010d26: bd80 pop {r7, pc}
8010d28: 0801dbac .word 0x0801dbac
8010d2c: 0801dc3c .word 0x0801dc3c
8010d30: 0801dc00 .word 0x0801dc00
8010d34: 08022664 .word 0x08022664
08010d38 <do_memp_free_pool>:
static void
do_memp_free_pool(const struct memp_desc *desc, void *mem)
{
8010d38: b580 push {r7, lr}
8010d3a: b084 sub sp, #16
8010d3c: af00 add r7, sp, #0
8010d3e: 6078 str r0, [r7, #4]
8010d40: 6039 str r1, [r7, #0]
struct memp *memp;
SYS_ARCH_DECL_PROTECT(old_level);
LWIP_ASSERT("memp_free: mem properly aligned",
8010d42: 683b ldr r3, [r7, #0]
8010d44: f003 0303 and.w r3, r3, #3
8010d48: 2b00 cmp r3, #0
8010d4a: d006 beq.n 8010d5a <do_memp_free_pool+0x22>
8010d4c: 4b0d ldr r3, [pc, #52] ; (8010d84 <do_memp_free_pool+0x4c>)
8010d4e: f240 126d movw r2, #365 ; 0x16d
8010d52: 490d ldr r1, [pc, #52] ; (8010d88 <do_memp_free_pool+0x50>)
8010d54: 480d ldr r0, [pc, #52] ; (8010d8c <do_memp_free_pool+0x54>)
8010d56: f00b fbf7 bl 801c548 <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);
8010d5a: 683b ldr r3, [r7, #0]
8010d5c: 60fb str r3, [r7, #12]
SYS_ARCH_PROTECT(old_level);
8010d5e: f00b fb75 bl 801c44c <sys_arch_protect>
8010d62: 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;
8010d64: 687b ldr r3, [r7, #4]
8010d66: 689b ldr r3, [r3, #8]
8010d68: 681a ldr r2, [r3, #0]
8010d6a: 68fb ldr r3, [r7, #12]
8010d6c: 601a str r2, [r3, #0]
*desc->tab = memp;
8010d6e: 687b ldr r3, [r7, #4]
8010d70: 689b ldr r3, [r3, #8]
8010d72: 68fa ldr r2, [r7, #12]
8010d74: 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);
8010d76: 68b8 ldr r0, [r7, #8]
8010d78: f00b fb76 bl 801c468 <sys_arch_unprotect>
#endif /* !MEMP_MEM_MALLOC */
}
8010d7c: bf00 nop
8010d7e: 3710 adds r7, #16
8010d80: 46bd mov sp, r7
8010d82: bd80 pop {r7, pc}
8010d84: 0801dbac .word 0x0801dbac
8010d88: 0801dc5c .word 0x0801dc5c
8010d8c: 0801dc00 .word 0x0801dc00
08010d90 <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)
{
8010d90: b580 push {r7, lr}
8010d92: b082 sub sp, #8
8010d94: af00 add r7, sp, #0
8010d96: 4603 mov r3, r0
8010d98: 6039 str r1, [r7, #0]
8010d9a: 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;);
8010d9c: 79fb ldrb r3, [r7, #7]
8010d9e: 2b0c cmp r3, #12
8010da0: d907 bls.n 8010db2 <memp_free+0x22>
8010da2: 4b0c ldr r3, [pc, #48] ; (8010dd4 <memp_free+0x44>)
8010da4: f44f 72d5 mov.w r2, #426 ; 0x1aa
8010da8: 490b ldr r1, [pc, #44] ; (8010dd8 <memp_free+0x48>)
8010daa: 480c ldr r0, [pc, #48] ; (8010ddc <memp_free+0x4c>)
8010dac: f00b fbcc bl 801c548 <iprintf>
8010db0: e00c b.n 8010dcc <memp_free+0x3c>
if (mem == NULL) {
8010db2: 683b ldr r3, [r7, #0]
8010db4: 2b00 cmp r3, #0
8010db6: d008 beq.n 8010dca <memp_free+0x3a>
#ifdef LWIP_HOOK_MEMP_AVAILABLE
old_first = *memp_pools[type]->tab;
#endif
do_memp_free_pool(memp_pools[type], mem);
8010db8: 79fb ldrb r3, [r7, #7]
8010dba: 4a09 ldr r2, [pc, #36] ; (8010de0 <memp_free+0x50>)
8010dbc: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8010dc0: 6839 ldr r1, [r7, #0]
8010dc2: 4618 mov r0, r3
8010dc4: f7ff ffb8 bl 8010d38 <do_memp_free_pool>
8010dc8: e000 b.n 8010dcc <memp_free+0x3c>
return;
8010dca: bf00 nop
#ifdef LWIP_HOOK_MEMP_AVAILABLE
if (old_first == NULL) {
LWIP_HOOK_MEMP_AVAILABLE(type);
}
#endif
}
8010dcc: 3708 adds r7, #8
8010dce: 46bd mov sp, r7
8010dd0: bd80 pop {r7, pc}
8010dd2: bf00 nop
8010dd4: 0801dbac .word 0x0801dbac
8010dd8: 0801dc7c .word 0x0801dc7c
8010ddc: 0801dc00 .word 0x0801dc00
8010de0: 08022664 .word 0x08022664
08010de4 <netif_init>:
}
#endif /* LWIP_HAVE_LOOPIF */
void
netif_init(void)
{
8010de4: b480 push {r7}
8010de6: af00 add r7, sp, #0
netif_set_link_up(&loop_netif);
netif_set_up(&loop_netif);
#endif /* LWIP_HAVE_LOOPIF */
}
8010de8: bf00 nop
8010dea: 46bd mov sp, r7
8010dec: f85d 7b04 ldr.w r7, [sp], #4
8010df0: 4770 bx lr
...
08010df4 <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)
{
8010df4: b580 push {r7, lr}
8010df6: b086 sub sp, #24
8010df8: af00 add r7, sp, #0
8010dfa: 60f8 str r0, [r7, #12]
8010dfc: 60b9 str r1, [r7, #8]
8010dfe: 607a str r2, [r7, #4]
8010e00: 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);
8010e02: 68fb ldr r3, [r7, #12]
8010e04: 2b00 cmp r3, #0
8010e06: d108 bne.n 8010e1a <netif_add+0x26>
8010e08: 4b5b ldr r3, [pc, #364] ; (8010f78 <netif_add+0x184>)
8010e0a: f240 1227 movw r2, #295 ; 0x127
8010e0e: 495b ldr r1, [pc, #364] ; (8010f7c <netif_add+0x188>)
8010e10: 485b ldr r0, [pc, #364] ; (8010f80 <netif_add+0x18c>)
8010e12: f00b fb99 bl 801c548 <iprintf>
8010e16: 2300 movs r3, #0
8010e18: e0a9 b.n 8010f6e <netif_add+0x17a>
LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
8010e1a: 6a7b ldr r3, [r7, #36] ; 0x24
8010e1c: 2b00 cmp r3, #0
8010e1e: d108 bne.n 8010e32 <netif_add+0x3e>
8010e20: 4b55 ldr r3, [pc, #340] ; (8010f78 <netif_add+0x184>)
8010e22: f44f 7294 mov.w r2, #296 ; 0x128
8010e26: 4957 ldr r1, [pc, #348] ; (8010f84 <netif_add+0x190>)
8010e28: 4855 ldr r0, [pc, #340] ; (8010f80 <netif_add+0x18c>)
8010e2a: f00b fb8d bl 801c548 <iprintf>
8010e2e: 2300 movs r3, #0
8010e30: e09d b.n 8010f6e <netif_add+0x17a>
#if LWIP_IPV4
if (ipaddr == NULL) {
8010e32: 68bb ldr r3, [r7, #8]
8010e34: 2b00 cmp r3, #0
8010e36: d101 bne.n 8010e3c <netif_add+0x48>
ipaddr = ip_2_ip4(IP4_ADDR_ANY);
8010e38: 4b53 ldr r3, [pc, #332] ; (8010f88 <netif_add+0x194>)
8010e3a: 60bb str r3, [r7, #8]
}
if (netmask == NULL) {
8010e3c: 687b ldr r3, [r7, #4]
8010e3e: 2b00 cmp r3, #0
8010e40: d101 bne.n 8010e46 <netif_add+0x52>
netmask = ip_2_ip4(IP4_ADDR_ANY);
8010e42: 4b51 ldr r3, [pc, #324] ; (8010f88 <netif_add+0x194>)
8010e44: 607b str r3, [r7, #4]
}
if (gw == NULL) {
8010e46: 683b ldr r3, [r7, #0]
8010e48: 2b00 cmp r3, #0
8010e4a: d101 bne.n 8010e50 <netif_add+0x5c>
gw = ip_2_ip4(IP4_ADDR_ANY);
8010e4c: 4b4e ldr r3, [pc, #312] ; (8010f88 <netif_add+0x194>)
8010e4e: 603b str r3, [r7, #0]
}
/* reset new interface configuration state */
ip_addr_set_zero_ip4(&netif->ip_addr);
8010e50: 68fb ldr r3, [r7, #12]
8010e52: 2200 movs r2, #0
8010e54: 605a str r2, [r3, #4]
ip_addr_set_zero_ip4(&netif->netmask);
8010e56: 68fb ldr r3, [r7, #12]
8010e58: 2200 movs r2, #0
8010e5a: 609a str r2, [r3, #8]
ip_addr_set_zero_ip4(&netif->gw);
8010e5c: 68fb ldr r3, [r7, #12]
8010e5e: 2200 movs r2, #0
8010e60: 60da str r2, [r3, #12]
netif->output = netif_null_output_ip4;
8010e62: 68fb ldr r3, [r7, #12]
8010e64: 4a49 ldr r2, [pc, #292] ; (8010f8c <netif_add+0x198>)
8010e66: 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;
8010e68: 68fb ldr r3, [r7, #12]
8010e6a: 2200 movs r2, #0
8010e6c: 851a strh r2, [r3, #40] ; 0x28
netif->flags = 0;
8010e6e: 68fb ldr r3, [r7, #12]
8010e70: 2200 movs r2, #0
8010e72: f883 2031 strb.w r2, [r3, #49] ; 0x31
#ifdef netif_get_client_data
memset(netif->client_data, 0, sizeof(netif->client_data));
8010e76: 68fb ldr r3, [r7, #12]
8010e78: 3324 adds r3, #36 ; 0x24
8010e7a: 2204 movs r2, #4
8010e7c: 2100 movs r1, #0
8010e7e: 4618 mov r0, r3
8010e80: f00b fb59 bl 801c536 <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;
8010e84: 68fb ldr r3, [r7, #12]
8010e86: 2200 movs r2, #0
8010e88: 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;
8010e8a: 68fb ldr r3, [r7, #12]
8010e8c: 6a3a ldr r2, [r7, #32]
8010e8e: 621a str r2, [r3, #32]
netif->num = netif_num;
8010e90: 4b3f ldr r3, [pc, #252] ; (8010f90 <netif_add+0x19c>)
8010e92: 781a ldrb r2, [r3, #0]
8010e94: 68fb ldr r3, [r7, #12]
8010e96: f883 2034 strb.w r2, [r3, #52] ; 0x34
netif->input = input;
8010e9a: 68fb ldr r3, [r7, #12]
8010e9c: 6aba ldr r2, [r7, #40] ; 0x28
8010e9e: 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);
8010ea0: 683b ldr r3, [r7, #0]
8010ea2: 687a ldr r2, [r7, #4]
8010ea4: 68b9 ldr r1, [r7, #8]
8010ea6: 68f8 ldr r0, [r7, #12]
8010ea8: f000 f914 bl 80110d4 <netif_set_addr>
#endif /* LWIP_IPV4 */
/* call user specified initialization function for netif */
if (init(netif) != ERR_OK) {
8010eac: 6a7b ldr r3, [r7, #36] ; 0x24
8010eae: 68f8 ldr r0, [r7, #12]
8010eb0: 4798 blx r3
8010eb2: 4603 mov r3, r0
8010eb4: 2b00 cmp r3, #0
8010eb6: d001 beq.n 8010ebc <netif_add+0xc8>
return NULL;
8010eb8: 2300 movs r3, #0
8010eba: e058 b.n 8010f6e <netif_add+0x17a>
*/
{
struct netif *netif2;
int num_netifs;
do {
if (netif->num == 255) {
8010ebc: 68fb ldr r3, [r7, #12]
8010ebe: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8010ec2: 2bff cmp r3, #255 ; 0xff
8010ec4: d103 bne.n 8010ece <netif_add+0xda>
netif->num = 0;
8010ec6: 68fb ldr r3, [r7, #12]
8010ec8: 2200 movs r2, #0
8010eca: f883 2034 strb.w r2, [r3, #52] ; 0x34
}
num_netifs = 0;
8010ece: 2300 movs r3, #0
8010ed0: 613b str r3, [r7, #16]
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
8010ed2: 4b30 ldr r3, [pc, #192] ; (8010f94 <netif_add+0x1a0>)
8010ed4: 681b ldr r3, [r3, #0]
8010ed6: 617b str r3, [r7, #20]
8010ed8: e02b b.n 8010f32 <netif_add+0x13e>
LWIP_ASSERT("netif already added", netif2 != netif);
8010eda: 697a ldr r2, [r7, #20]
8010edc: 68fb ldr r3, [r7, #12]
8010ede: 429a cmp r2, r3
8010ee0: d106 bne.n 8010ef0 <netif_add+0xfc>
8010ee2: 4b25 ldr r3, [pc, #148] ; (8010f78 <netif_add+0x184>)
8010ee4: f240 128b movw r2, #395 ; 0x18b
8010ee8: 492b ldr r1, [pc, #172] ; (8010f98 <netif_add+0x1a4>)
8010eea: 4825 ldr r0, [pc, #148] ; (8010f80 <netif_add+0x18c>)
8010eec: f00b fb2c bl 801c548 <iprintf>
num_netifs++;
8010ef0: 693b ldr r3, [r7, #16]
8010ef2: 3301 adds r3, #1
8010ef4: 613b str r3, [r7, #16]
LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255);
8010ef6: 693b ldr r3, [r7, #16]
8010ef8: 2bff cmp r3, #255 ; 0xff
8010efa: dd06 ble.n 8010f0a <netif_add+0x116>
8010efc: 4b1e ldr r3, [pc, #120] ; (8010f78 <netif_add+0x184>)
8010efe: f240 128d movw r2, #397 ; 0x18d
8010f02: 4926 ldr r1, [pc, #152] ; (8010f9c <netif_add+0x1a8>)
8010f04: 481e ldr r0, [pc, #120] ; (8010f80 <netif_add+0x18c>)
8010f06: f00b fb1f bl 801c548 <iprintf>
if (netif2->num == netif->num) {
8010f0a: 697b ldr r3, [r7, #20]
8010f0c: f893 2034 ldrb.w r2, [r3, #52] ; 0x34
8010f10: 68fb ldr r3, [r7, #12]
8010f12: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8010f16: 429a cmp r2, r3
8010f18: d108 bne.n 8010f2c <netif_add+0x138>
netif->num++;
8010f1a: 68fb ldr r3, [r7, #12]
8010f1c: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8010f20: 3301 adds r3, #1
8010f22: b2da uxtb r2, r3
8010f24: 68fb ldr r3, [r7, #12]
8010f26: f883 2034 strb.w r2, [r3, #52] ; 0x34
break;
8010f2a: e005 b.n 8010f38 <netif_add+0x144>
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
8010f2c: 697b ldr r3, [r7, #20]
8010f2e: 681b ldr r3, [r3, #0]
8010f30: 617b str r3, [r7, #20]
8010f32: 697b ldr r3, [r7, #20]
8010f34: 2b00 cmp r3, #0
8010f36: d1d0 bne.n 8010eda <netif_add+0xe6>
}
}
} while (netif2 != NULL);
8010f38: 697b ldr r3, [r7, #20]
8010f3a: 2b00 cmp r3, #0
8010f3c: d1be bne.n 8010ebc <netif_add+0xc8>
}
if (netif->num == 254) {
8010f3e: 68fb ldr r3, [r7, #12]
8010f40: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8010f44: 2bfe cmp r3, #254 ; 0xfe
8010f46: d103 bne.n 8010f50 <netif_add+0x15c>
netif_num = 0;
8010f48: 4b11 ldr r3, [pc, #68] ; (8010f90 <netif_add+0x19c>)
8010f4a: 2200 movs r2, #0
8010f4c: 701a strb r2, [r3, #0]
8010f4e: e006 b.n 8010f5e <netif_add+0x16a>
} else {
netif_num = (u8_t)(netif->num + 1);
8010f50: 68fb ldr r3, [r7, #12]
8010f52: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8010f56: 3301 adds r3, #1
8010f58: b2da uxtb r2, r3
8010f5a: 4b0d ldr r3, [pc, #52] ; (8010f90 <netif_add+0x19c>)
8010f5c: 701a strb r2, [r3, #0]
}
/* add this netif to the list */
netif->next = netif_list;
8010f5e: 4b0d ldr r3, [pc, #52] ; (8010f94 <netif_add+0x1a0>)
8010f60: 681a ldr r2, [r3, #0]
8010f62: 68fb ldr r3, [r7, #12]
8010f64: 601a str r2, [r3, #0]
netif_list = netif;
8010f66: 4a0b ldr r2, [pc, #44] ; (8010f94 <netif_add+0x1a0>)
8010f68: 68fb ldr r3, [r7, #12]
8010f6a: 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;
8010f6c: 68fb ldr r3, [r7, #12]
}
8010f6e: 4618 mov r0, r3
8010f70: 3718 adds r7, #24
8010f72: 46bd mov sp, r7
8010f74: bd80 pop {r7, pc}
8010f76: bf00 nop
8010f78: 0801dc98 .word 0x0801dc98
8010f7c: 0801dd2c .word 0x0801dd2c
8010f80: 0801dce8 .word 0x0801dce8
8010f84: 0801dd48 .word 0x0801dd48
8010f88: 080226e8 .word 0x080226e8
8010f8c: 080113b7 .word 0x080113b7
8010f90: 20008714 .word 0x20008714
8010f94: 2000f7d8 .word 0x2000f7d8
8010f98: 0801dd6c .word 0x0801dd6c
8010f9c: 0801dd80 .word 0x0801dd80
08010fa0 <netif_do_ip_addr_changed>:
static void
netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
{
8010fa0: b580 push {r7, lr}
8010fa2: b082 sub sp, #8
8010fa4: af00 add r7, sp, #0
8010fa6: 6078 str r0, [r7, #4]
8010fa8: 6039 str r1, [r7, #0]
#if LWIP_TCP
tcp_netif_ip_addr_changed(old_addr, new_addr);
8010faa: 6839 ldr r1, [r7, #0]
8010fac: 6878 ldr r0, [r7, #4]
8010fae: f002 fb81 bl 80136b4 <tcp_netif_ip_addr_changed>
#endif /* LWIP_TCP */
#if LWIP_UDP
udp_netif_ip_addr_changed(old_addr, new_addr);
8010fb2: 6839 ldr r1, [r7, #0]
8010fb4: 6878 ldr r0, [r7, #4]
8010fb6: f006 ffa1 bl 8017efc <udp_netif_ip_addr_changed>
#endif /* LWIP_UDP */
#if LWIP_RAW
raw_netif_ip_addr_changed(old_addr, new_addr);
#endif /* LWIP_RAW */
}
8010fba: bf00 nop
8010fbc: 3708 adds r7, #8
8010fbe: 46bd mov sp, r7
8010fc0: bd80 pop {r7, pc}
...
08010fc4 <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)
{
8010fc4: b580 push {r7, lr}
8010fc6: b086 sub sp, #24
8010fc8: af00 add r7, sp, #0
8010fca: 60f8 str r0, [r7, #12]
8010fcc: 60b9 str r1, [r7, #8]
8010fce: 607a str r2, [r7, #4]
LWIP_ASSERT("invalid pointer", ipaddr != NULL);
8010fd0: 68bb ldr r3, [r7, #8]
8010fd2: 2b00 cmp r3, #0
8010fd4: d106 bne.n 8010fe4 <netif_do_set_ipaddr+0x20>
8010fd6: 4b1d ldr r3, [pc, #116] ; (801104c <netif_do_set_ipaddr+0x88>)
8010fd8: f240 12cb movw r2, #459 ; 0x1cb
8010fdc: 491c ldr r1, [pc, #112] ; (8011050 <netif_do_set_ipaddr+0x8c>)
8010fde: 481d ldr r0, [pc, #116] ; (8011054 <netif_do_set_ipaddr+0x90>)
8010fe0: f00b fab2 bl 801c548 <iprintf>
LWIP_ASSERT("invalid pointer", old_addr != NULL);
8010fe4: 687b ldr r3, [r7, #4]
8010fe6: 2b00 cmp r3, #0
8010fe8: d106 bne.n 8010ff8 <netif_do_set_ipaddr+0x34>
8010fea: 4b18 ldr r3, [pc, #96] ; (801104c <netif_do_set_ipaddr+0x88>)
8010fec: f44f 72e6 mov.w r2, #460 ; 0x1cc
8010ff0: 4917 ldr r1, [pc, #92] ; (8011050 <netif_do_set_ipaddr+0x8c>)
8010ff2: 4818 ldr r0, [pc, #96] ; (8011054 <netif_do_set_ipaddr+0x90>)
8010ff4: f00b faa8 bl 801c548 <iprintf>
/* address is actually being changed? */
if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) {
8010ff8: 68bb ldr r3, [r7, #8]
8010ffa: 681a ldr r2, [r3, #0]
8010ffc: 68fb ldr r3, [r7, #12]
8010ffe: 3304 adds r3, #4
8011000: 681b ldr r3, [r3, #0]
8011002: 429a cmp r2, r3
8011004: d01c beq.n 8011040 <netif_do_set_ipaddr+0x7c>
ip_addr_t new_addr;
*ip_2_ip4(&new_addr) = *ipaddr;
8011006: 68bb ldr r3, [r7, #8]
8011008: 681b ldr r3, [r3, #0]
801100a: 617b str r3, [r7, #20]
IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4);
ip_addr_copy(*old_addr, *netif_ip_addr4(netif));
801100c: 68fb ldr r3, [r7, #12]
801100e: 3304 adds r3, #4
8011010: 681a ldr r2, [r3, #0]
8011012: 687b ldr r3, [r7, #4]
8011014: 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);
8011016: f107 0314 add.w r3, r7, #20
801101a: 4619 mov r1, r3
801101c: 6878 ldr r0, [r7, #4]
801101e: f7ff ffbf bl 8010fa0 <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);
8011022: 68bb ldr r3, [r7, #8]
8011024: 2b00 cmp r3, #0
8011026: d002 beq.n 801102e <netif_do_set_ipaddr+0x6a>
8011028: 68bb ldr r3, [r7, #8]
801102a: 681b ldr r3, [r3, #0]
801102c: e000 b.n 8011030 <netif_do_set_ipaddr+0x6c>
801102e: 2300 movs r3, #0
8011030: 68fa ldr r2, [r7, #12]
8011032: 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);
8011034: 2101 movs r1, #1
8011036: 68f8 ldr r0, [r7, #12]
8011038: f000 f8d2 bl 80111e0 <netif_issue_reports>
NETIF_STATUS_CALLBACK(netif);
return 1; /* address changed */
801103c: 2301 movs r3, #1
801103e: e000 b.n 8011042 <netif_do_set_ipaddr+0x7e>
}
return 0; /* address unchanged */
8011040: 2300 movs r3, #0
}
8011042: 4618 mov r0, r3
8011044: 3718 adds r7, #24
8011046: 46bd mov sp, r7
8011048: bd80 pop {r7, pc}
801104a: bf00 nop
801104c: 0801dc98 .word 0x0801dc98
8011050: 0801ddb0 .word 0x0801ddb0
8011054: 0801dce8 .word 0x0801dce8
08011058 <netif_do_set_netmask>:
}
}
static int
netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm)
{
8011058: b480 push {r7}
801105a: b085 sub sp, #20
801105c: af00 add r7, sp, #0
801105e: 60f8 str r0, [r7, #12]
8011060: 60b9 str r1, [r7, #8]
8011062: 607a str r2, [r7, #4]
/* address is actually being changed? */
if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) {
8011064: 68bb ldr r3, [r7, #8]
8011066: 681a ldr r2, [r3, #0]
8011068: 68fb ldr r3, [r7, #12]
801106a: 3308 adds r3, #8
801106c: 681b ldr r3, [r3, #0]
801106e: 429a cmp r2, r3
8011070: d00a beq.n 8011088 <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);
8011072: 68bb ldr r3, [r7, #8]
8011074: 2b00 cmp r3, #0
8011076: d002 beq.n 801107e <netif_do_set_netmask+0x26>
8011078: 68bb ldr r3, [r7, #8]
801107a: 681b ldr r3, [r3, #0]
801107c: e000 b.n 8011080 <netif_do_set_netmask+0x28>
801107e: 2300 movs r3, #0
8011080: 68fa ldr r2, [r7, #12]
8011082: 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 */
8011084: 2301 movs r3, #1
8011086: e000 b.n 801108a <netif_do_set_netmask+0x32>
}
return 0; /* netmask unchanged */
8011088: 2300 movs r3, #0
}
801108a: 4618 mov r0, r3
801108c: 3714 adds r7, #20
801108e: 46bd mov sp, r7
8011090: f85d 7b04 ldr.w r7, [sp], #4
8011094: 4770 bx lr
08011096 <netif_do_set_gw>:
}
}
static int
netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw)
{
8011096: b480 push {r7}
8011098: b085 sub sp, #20
801109a: af00 add r7, sp, #0
801109c: 60f8 str r0, [r7, #12]
801109e: 60b9 str r1, [r7, #8]
80110a0: 607a str r2, [r7, #4]
/* address is actually being changed? */
if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) {
80110a2: 68bb ldr r3, [r7, #8]
80110a4: 681a ldr r2, [r3, #0]
80110a6: 68fb ldr r3, [r7, #12]
80110a8: 330c adds r3, #12
80110aa: 681b ldr r3, [r3, #0]
80110ac: 429a cmp r2, r3
80110ae: d00a beq.n 80110c6 <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);
80110b0: 68bb ldr r3, [r7, #8]
80110b2: 2b00 cmp r3, #0
80110b4: d002 beq.n 80110bc <netif_do_set_gw+0x26>
80110b6: 68bb ldr r3, [r7, #8]
80110b8: 681b ldr r3, [r3, #0]
80110ba: e000 b.n 80110be <netif_do_set_gw+0x28>
80110bc: 2300 movs r3, #0
80110be: 68fa ldr r2, [r7, #12]
80110c0: 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 */
80110c2: 2301 movs r3, #1
80110c4: e000 b.n 80110c8 <netif_do_set_gw+0x32>
}
return 0; /* gateway unchanged */
80110c6: 2300 movs r3, #0
}
80110c8: 4618 mov r0, r3
80110ca: 3714 adds r7, #20
80110cc: 46bd mov sp, r7
80110ce: f85d 7b04 ldr.w r7, [sp], #4
80110d2: 4770 bx lr
080110d4 <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)
{
80110d4: b580 push {r7, lr}
80110d6: b088 sub sp, #32
80110d8: af00 add r7, sp, #0
80110da: 60f8 str r0, [r7, #12]
80110dc: 60b9 str r1, [r7, #8]
80110de: 607a str r2, [r7, #4]
80110e0: 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;
80110e2: 2300 movs r3, #0
80110e4: 61fb str r3, [r7, #28]
ip_addr_t *old_gw = NULL;
80110e6: 2300 movs r3, #0
80110e8: 61bb str r3, [r7, #24]
int remove;
LWIP_ASSERT_CORE_LOCKED();
/* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
if (ipaddr == NULL) {
80110ea: 68bb ldr r3, [r7, #8]
80110ec: 2b00 cmp r3, #0
80110ee: d101 bne.n 80110f4 <netif_set_addr+0x20>
ipaddr = IP4_ADDR_ANY4;
80110f0: 4b1c ldr r3, [pc, #112] ; (8011164 <netif_set_addr+0x90>)
80110f2: 60bb str r3, [r7, #8]
}
if (netmask == NULL) {
80110f4: 687b ldr r3, [r7, #4]
80110f6: 2b00 cmp r3, #0
80110f8: d101 bne.n 80110fe <netif_set_addr+0x2a>
netmask = IP4_ADDR_ANY4;
80110fa: 4b1a ldr r3, [pc, #104] ; (8011164 <netif_set_addr+0x90>)
80110fc: 607b str r3, [r7, #4]
}
if (gw == NULL) {
80110fe: 683b ldr r3, [r7, #0]
8011100: 2b00 cmp r3, #0
8011102: d101 bne.n 8011108 <netif_set_addr+0x34>
gw = IP4_ADDR_ANY4;
8011104: 4b17 ldr r3, [pc, #92] ; (8011164 <netif_set_addr+0x90>)
8011106: 603b str r3, [r7, #0]
}
remove = ip4_addr_isany(ipaddr);
8011108: 68bb ldr r3, [r7, #8]
801110a: 2b00 cmp r3, #0
801110c: d003 beq.n 8011116 <netif_set_addr+0x42>
801110e: 68bb ldr r3, [r7, #8]
8011110: 681b ldr r3, [r3, #0]
8011112: 2b00 cmp r3, #0
8011114: d101 bne.n 801111a <netif_set_addr+0x46>
8011116: 2301 movs r3, #1
8011118: e000 b.n 801111c <netif_set_addr+0x48>
801111a: 2300 movs r3, #0
801111c: 617b str r3, [r7, #20]
if (remove) {
801111e: 697b ldr r3, [r7, #20]
8011120: 2b00 cmp r3, #0
8011122: d006 beq.n 8011132 <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)) {
8011124: f107 0310 add.w r3, r7, #16
8011128: 461a mov r2, r3
801112a: 68b9 ldr r1, [r7, #8]
801112c: 68f8 ldr r0, [r7, #12]
801112e: f7ff ff49 bl 8010fc4 <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)) {
8011132: 69fa ldr r2, [r7, #28]
8011134: 6879 ldr r1, [r7, #4]
8011136: 68f8 ldr r0, [r7, #12]
8011138: f7ff ff8e bl 8011058 <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)) {
801113c: 69ba ldr r2, [r7, #24]
801113e: 6839 ldr r1, [r7, #0]
8011140: 68f8 ldr r0, [r7, #12]
8011142: f7ff ffa8 bl 8011096 <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) {
8011146: 697b ldr r3, [r7, #20]
8011148: 2b00 cmp r3, #0
801114a: d106 bne.n 801115a <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)) {
801114c: f107 0310 add.w r3, r7, #16
8011150: 461a mov r2, r3
8011152: 68b9 ldr r1, [r7, #8]
8011154: 68f8 ldr r0, [r7, #12]
8011156: f7ff ff35 bl 8010fc4 <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
}
801115a: bf00 nop
801115c: 3720 adds r7, #32
801115e: 46bd mov sp, r7
8011160: bd80 pop {r7, pc}
8011162: bf00 nop
8011164: 080226e8 .word 0x080226e8
08011168 <netif_set_default>:
*
* @param netif the default network interface
*/
void
netif_set_default(struct netif *netif)
{
8011168: b480 push {r7}
801116a: b083 sub sp, #12
801116c: af00 add r7, sp, #0
801116e: 6078 str r0, [r7, #4]
mib2_remove_route_ip4(1, netif);
} else {
/* install default route */
mib2_add_route_ip4(1, netif);
}
netif_default = netif;
8011170: 4a04 ldr r2, [pc, #16] ; (8011184 <netif_set_default+0x1c>)
8011172: 687b ldr r3, [r7, #4]
8011174: 6013 str r3, [r2, #0]
LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n",
netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\''));
}
8011176: bf00 nop
8011178: 370c adds r7, #12
801117a: 46bd mov sp, r7
801117c: f85d 7b04 ldr.w r7, [sp], #4
8011180: 4770 bx lr
8011182: bf00 nop
8011184: 2000f7dc .word 0x2000f7dc
08011188 <netif_set_up>:
* Bring an interface up, available for processing
* traffic.
*/
void
netif_set_up(struct netif *netif)
{
8011188: b580 push {r7, lr}
801118a: b082 sub sp, #8
801118c: af00 add r7, sp, #0
801118e: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
8011190: 687b ldr r3, [r7, #4]
8011192: 2b00 cmp r3, #0
8011194: d107 bne.n 80111a6 <netif_set_up+0x1e>
8011196: 4b0f ldr r3, [pc, #60] ; (80111d4 <netif_set_up+0x4c>)
8011198: f44f 7254 mov.w r2, #848 ; 0x350
801119c: 490e ldr r1, [pc, #56] ; (80111d8 <netif_set_up+0x50>)
801119e: 480f ldr r0, [pc, #60] ; (80111dc <netif_set_up+0x54>)
80111a0: f00b f9d2 bl 801c548 <iprintf>
80111a4: e013 b.n 80111ce <netif_set_up+0x46>
if (!(netif->flags & NETIF_FLAG_UP)) {
80111a6: 687b ldr r3, [r7, #4]
80111a8: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80111ac: f003 0301 and.w r3, r3, #1
80111b0: 2b00 cmp r3, #0
80111b2: d10c bne.n 80111ce <netif_set_up+0x46>
netif_set_flags(netif, NETIF_FLAG_UP);
80111b4: 687b ldr r3, [r7, #4]
80111b6: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80111ba: f043 0301 orr.w r3, r3, #1
80111be: b2da uxtb r2, r3
80111c0: 687b ldr r3, [r7, #4]
80111c2: 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);
80111c6: 2103 movs r1, #3
80111c8: 6878 ldr r0, [r7, #4]
80111ca: f000 f809 bl 80111e0 <netif_issue_reports>
#if LWIP_IPV6
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
}
}
80111ce: 3708 adds r7, #8
80111d0: 46bd mov sp, r7
80111d2: bd80 pop {r7, pc}
80111d4: 0801dc98 .word 0x0801dc98
80111d8: 0801de20 .word 0x0801de20
80111dc: 0801dce8 .word 0x0801dce8
080111e0 <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)
{
80111e0: b580 push {r7, lr}
80111e2: b082 sub sp, #8
80111e4: af00 add r7, sp, #0
80111e6: 6078 str r0, [r7, #4]
80111e8: 460b mov r3, r1
80111ea: 70fb strb r3, [r7, #3]
LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
80111ec: 687b ldr r3, [r7, #4]
80111ee: 2b00 cmp r3, #0
80111f0: d106 bne.n 8011200 <netif_issue_reports+0x20>
80111f2: 4b18 ldr r3, [pc, #96] ; (8011254 <netif_issue_reports+0x74>)
80111f4: f240 326d movw r2, #877 ; 0x36d
80111f8: 4917 ldr r1, [pc, #92] ; (8011258 <netif_issue_reports+0x78>)
80111fa: 4818 ldr r0, [pc, #96] ; (801125c <netif_issue_reports+0x7c>)
80111fc: f00b f9a4 bl 801c548 <iprintf>
/* Only send reports when both link and admin states are up */
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
8011200: 687b ldr r3, [r7, #4]
8011202: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011206: f003 0304 and.w r3, r3, #4
801120a: 2b00 cmp r3, #0
801120c: d01e beq.n 801124c <netif_issue_reports+0x6c>
!(netif->flags & NETIF_FLAG_UP)) {
801120e: 687b ldr r3, [r7, #4]
8011210: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011214: f003 0301 and.w r3, r3, #1
if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
8011218: 2b00 cmp r3, #0
801121a: d017 beq.n 801124c <netif_issue_reports+0x6c>
return;
}
#if LWIP_IPV4
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
801121c: 78fb ldrb r3, [r7, #3]
801121e: f003 0301 and.w r3, r3, #1
8011222: 2b00 cmp r3, #0
8011224: d013 beq.n 801124e <netif_issue_reports+0x6e>
!ip4_addr_isany_val(*netif_ip4_addr(netif))) {
8011226: 687b ldr r3, [r7, #4]
8011228: 3304 adds r3, #4
801122a: 681b ldr r3, [r3, #0]
if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
801122c: 2b00 cmp r3, #0
801122e: d00e beq.n 801124e <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)) {
8011230: 687b ldr r3, [r7, #4]
8011232: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011236: f003 0308 and.w r3, r3, #8
801123a: 2b00 cmp r3, #0
801123c: d007 beq.n 801124e <netif_issue_reports+0x6e>
etharp_gratuitous(netif);
801123e: 687b ldr r3, [r7, #4]
8011240: 3304 adds r3, #4
8011242: 4619 mov r1, r3
8011244: 6878 ldr r0, [r7, #4]
8011246: f009 fc6b bl 801ab20 <etharp_request>
801124a: e000 b.n 801124e <netif_issue_reports+0x6e>
return;
801124c: bf00 nop
/* send mld memberships */
mld6_report_groups(netif);
#endif /* LWIP_IPV6_MLD */
}
#endif /* LWIP_IPV6 */
}
801124e: 3708 adds r7, #8
8011250: 46bd mov sp, r7
8011252: bd80 pop {r7, pc}
8011254: 0801dc98 .word 0x0801dc98
8011258: 0801de3c .word 0x0801de3c
801125c: 0801dce8 .word 0x0801dce8
08011260 <netif_set_down>:
* @ingroup netif
* Bring an interface down, disabling any traffic processing.
*/
void
netif_set_down(struct netif *netif)
{
8011260: b580 push {r7, lr}
8011262: b082 sub sp, #8
8011264: af00 add r7, sp, #0
8011266: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
8011268: 687b ldr r3, [r7, #4]
801126a: 2b00 cmp r3, #0
801126c: d107 bne.n 801127e <netif_set_down+0x1e>
801126e: 4b12 ldr r3, [pc, #72] ; (80112b8 <netif_set_down+0x58>)
8011270: f240 329b movw r2, #923 ; 0x39b
8011274: 4911 ldr r1, [pc, #68] ; (80112bc <netif_set_down+0x5c>)
8011276: 4812 ldr r0, [pc, #72] ; (80112c0 <netif_set_down+0x60>)
8011278: f00b f966 bl 801c548 <iprintf>
801127c: e019 b.n 80112b2 <netif_set_down+0x52>
if (netif->flags & NETIF_FLAG_UP) {
801127e: 687b ldr r3, [r7, #4]
8011280: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011284: f003 0301 and.w r3, r3, #1
8011288: 2b00 cmp r3, #0
801128a: d012 beq.n 80112b2 <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);
801128c: 687b ldr r3, [r7, #4]
801128e: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011292: f023 0301 bic.w r3, r3, #1
8011296: b2da uxtb r2, r3
8011298: 687b ldr r3, [r7, #4]
801129a: 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) {
801129e: 687b ldr r3, [r7, #4]
80112a0: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80112a4: f003 0308 and.w r3, r3, #8
80112a8: 2b00 cmp r3, #0
80112aa: d002 beq.n 80112b2 <netif_set_down+0x52>
etharp_cleanup_netif(netif);
80112ac: 6878 ldr r0, [r7, #4]
80112ae: f008 fff1 bl 801a294 <etharp_cleanup_netif>
nd6_cleanup_netif(netif);
#endif /* LWIP_IPV6 */
NETIF_STATUS_CALLBACK(netif);
}
}
80112b2: 3708 adds r7, #8
80112b4: 46bd mov sp, r7
80112b6: bd80 pop {r7, pc}
80112b8: 0801dc98 .word 0x0801dc98
80112bc: 0801de60 .word 0x0801de60
80112c0: 0801dce8 .word 0x0801dce8
080112c4 <netif_set_link_up>:
* @ingroup netif
* Called by a driver when its link goes up
*/
void
netif_set_link_up(struct netif *netif)
{
80112c4: b580 push {r7, lr}
80112c6: b082 sub sp, #8
80112c8: af00 add r7, sp, #0
80112ca: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return);
80112cc: 687b ldr r3, [r7, #4]
80112ce: 2b00 cmp r3, #0
80112d0: d107 bne.n 80112e2 <netif_set_link_up+0x1e>
80112d2: 4b15 ldr r3, [pc, #84] ; (8011328 <netif_set_link_up+0x64>)
80112d4: f44f 7278 mov.w r2, #992 ; 0x3e0
80112d8: 4914 ldr r1, [pc, #80] ; (801132c <netif_set_link_up+0x68>)
80112da: 4815 ldr r0, [pc, #84] ; (8011330 <netif_set_link_up+0x6c>)
80112dc: f00b f934 bl 801c548 <iprintf>
80112e0: e01e b.n 8011320 <netif_set_link_up+0x5c>
if (!(netif->flags & NETIF_FLAG_LINK_UP)) {
80112e2: 687b ldr r3, [r7, #4]
80112e4: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80112e8: f003 0304 and.w r3, r3, #4
80112ec: 2b00 cmp r3, #0
80112ee: d117 bne.n 8011320 <netif_set_link_up+0x5c>
netif_set_flags(netif, NETIF_FLAG_LINK_UP);
80112f0: 687b ldr r3, [r7, #4]
80112f2: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
80112f6: f043 0304 orr.w r3, r3, #4
80112fa: b2da uxtb r2, r3
80112fc: 687b ldr r3, [r7, #4]
80112fe: f883 2031 strb.w r2, [r3, #49] ; 0x31
#if LWIP_DHCP
dhcp_network_changed(netif);
8011302: 6878 ldr r0, [r7, #4]
8011304: f007 fa26 bl 8018754 <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);
8011308: 2103 movs r1, #3
801130a: 6878 ldr r0, [r7, #4]
801130c: f7ff ff68 bl 80111e0 <netif_issue_reports>
#if LWIP_IPV6
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
NETIF_LINK_CALLBACK(netif);
8011310: 687b ldr r3, [r7, #4]
8011312: 69db ldr r3, [r3, #28]
8011314: 2b00 cmp r3, #0
8011316: d003 beq.n 8011320 <netif_set_link_up+0x5c>
8011318: 687b ldr r3, [r7, #4]
801131a: 69db ldr r3, [r3, #28]
801131c: 6878 ldr r0, [r7, #4]
801131e: 4798 blx r3
args.link_changed.state = 1;
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
}
#endif
}
}
8011320: 3708 adds r7, #8
8011322: 46bd mov sp, r7
8011324: bd80 pop {r7, pc}
8011326: bf00 nop
8011328: 0801dc98 .word 0x0801dc98
801132c: 0801de80 .word 0x0801de80
8011330: 0801dce8 .word 0x0801dce8
08011334 <netif_set_link_down>:
* @ingroup netif
* Called by a driver when its link goes down
*/
void
netif_set_link_down(struct netif *netif)
{
8011334: b580 push {r7, lr}
8011336: b082 sub sp, #8
8011338: af00 add r7, sp, #0
801133a: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
801133c: 687b ldr r3, [r7, #4]
801133e: 2b00 cmp r3, #0
8011340: d107 bne.n 8011352 <netif_set_link_down+0x1e>
8011342: 4b11 ldr r3, [pc, #68] ; (8011388 <netif_set_link_down+0x54>)
8011344: f240 4206 movw r2, #1030 ; 0x406
8011348: 4910 ldr r1, [pc, #64] ; (801138c <netif_set_link_down+0x58>)
801134a: 4811 ldr r0, [pc, #68] ; (8011390 <netif_set_link_down+0x5c>)
801134c: f00b f8fc bl 801c548 <iprintf>
8011350: e017 b.n 8011382 <netif_set_link_down+0x4e>
if (netif->flags & NETIF_FLAG_LINK_UP) {
8011352: 687b ldr r3, [r7, #4]
8011354: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011358: f003 0304 and.w r3, r3, #4
801135c: 2b00 cmp r3, #0
801135e: d010 beq.n 8011382 <netif_set_link_down+0x4e>
netif_clear_flags(netif, NETIF_FLAG_LINK_UP);
8011360: 687b ldr r3, [r7, #4]
8011362: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8011366: f023 0304 bic.w r3, r3, #4
801136a: b2da uxtb r2, r3
801136c: 687b ldr r3, [r7, #4]
801136e: f883 2031 strb.w r2, [r3, #49] ; 0x31
NETIF_LINK_CALLBACK(netif);
8011372: 687b ldr r3, [r7, #4]
8011374: 69db ldr r3, [r3, #28]
8011376: 2b00 cmp r3, #0
8011378: d003 beq.n 8011382 <netif_set_link_down+0x4e>
801137a: 687b ldr r3, [r7, #4]
801137c: 69db ldr r3, [r3, #28]
801137e: 6878 ldr r0, [r7, #4]
8011380: 4798 blx r3
args.link_changed.state = 0;
netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args);
}
#endif
}
}
8011382: 3708 adds r7, #8
8011384: 46bd mov sp, r7
8011386: bd80 pop {r7, pc}
8011388: 0801dc98 .word 0x0801dc98
801138c: 0801dea4 .word 0x0801dea4
8011390: 0801dce8 .word 0x0801dce8
08011394 <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)
{
8011394: b480 push {r7}
8011396: b083 sub sp, #12
8011398: af00 add r7, sp, #0
801139a: 6078 str r0, [r7, #4]
801139c: 6039 str r1, [r7, #0]
LWIP_ASSERT_CORE_LOCKED();
if (netif) {
801139e: 687b ldr r3, [r7, #4]
80113a0: 2b00 cmp r3, #0
80113a2: d002 beq.n 80113aa <netif_set_link_callback+0x16>
netif->link_callback = link_callback;
80113a4: 687b ldr r3, [r7, #4]
80113a6: 683a ldr r2, [r7, #0]
80113a8: 61da str r2, [r3, #28]
}
}
80113aa: bf00 nop
80113ac: 370c adds r7, #12
80113ae: 46bd mov sp, r7
80113b0: f85d 7b04 ldr.w r7, [sp], #4
80113b4: 4770 bx lr
080113b6 <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)
{
80113b6: b480 push {r7}
80113b8: b085 sub sp, #20
80113ba: af00 add r7, sp, #0
80113bc: 60f8 str r0, [r7, #12]
80113be: 60b9 str r1, [r7, #8]
80113c0: 607a str r2, [r7, #4]
LWIP_UNUSED_ARG(netif);
LWIP_UNUSED_ARG(p);
LWIP_UNUSED_ARG(ipaddr);
return ERR_IF;
80113c2: f06f 030b mvn.w r3, #11
}
80113c6: 4618 mov r0, r3
80113c8: 3714 adds r7, #20
80113ca: 46bd mov sp, r7
80113cc: f85d 7b04 ldr.w r7, [sp], #4
80113d0: 4770 bx lr
...
080113d4 <netif_get_by_index>:
*
* @param idx index of netif to find
*/
struct netif *
netif_get_by_index(u8_t idx)
{
80113d4: b480 push {r7}
80113d6: b085 sub sp, #20
80113d8: af00 add r7, sp, #0
80113da: 4603 mov r3, r0
80113dc: 71fb strb r3, [r7, #7]
struct netif *netif;
LWIP_ASSERT_CORE_LOCKED();
if (idx != NETIF_NO_INDEX) {
80113de: 79fb ldrb r3, [r7, #7]
80113e0: 2b00 cmp r3, #0
80113e2: d013 beq.n 801140c <netif_get_by_index+0x38>
NETIF_FOREACH(netif) {
80113e4: 4b0d ldr r3, [pc, #52] ; (801141c <netif_get_by_index+0x48>)
80113e6: 681b ldr r3, [r3, #0]
80113e8: 60fb str r3, [r7, #12]
80113ea: e00c b.n 8011406 <netif_get_by_index+0x32>
if (idx == netif_get_index(netif)) {
80113ec: 68fb ldr r3, [r7, #12]
80113ee: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80113f2: 3301 adds r3, #1
80113f4: b2db uxtb r3, r3
80113f6: 79fa ldrb r2, [r7, #7]
80113f8: 429a cmp r2, r3
80113fa: d101 bne.n 8011400 <netif_get_by_index+0x2c>
return netif; /* found! */
80113fc: 68fb ldr r3, [r7, #12]
80113fe: e006 b.n 801140e <netif_get_by_index+0x3a>
NETIF_FOREACH(netif) {
8011400: 68fb ldr r3, [r7, #12]
8011402: 681b ldr r3, [r3, #0]
8011404: 60fb str r3, [r7, #12]
8011406: 68fb ldr r3, [r7, #12]
8011408: 2b00 cmp r3, #0
801140a: d1ef bne.n 80113ec <netif_get_by_index+0x18>
}
}
}
return NULL;
801140c: 2300 movs r3, #0
}
801140e: 4618 mov r0, r3
8011410: 3714 adds r7, #20
8011412: 46bd mov sp, r7
8011414: f85d 7b04 ldr.w r7, [sp], #4
8011418: 4770 bx lr
801141a: bf00 nop
801141c: 2000f7d8 .word 0x2000f7d8
08011420 <pbuf_free_ooseq>:
#if !NO_SYS
static
#endif /* !NO_SYS */
void
pbuf_free_ooseq(void)
{
8011420: b580 push {r7, lr}
8011422: b082 sub sp, #8
8011424: af00 add r7, sp, #0
struct tcp_pcb *pcb;
SYS_ARCH_SET(pbuf_free_ooseq_pending, 0);
8011426: f00b f811 bl 801c44c <sys_arch_protect>
801142a: 6038 str r0, [r7, #0]
801142c: 4b0d ldr r3, [pc, #52] ; (8011464 <pbuf_free_ooseq+0x44>)
801142e: 2200 movs r2, #0
8011430: 701a strb r2, [r3, #0]
8011432: 6838 ldr r0, [r7, #0]
8011434: f00b f818 bl 801c468 <sys_arch_unprotect>
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
8011438: 4b0b ldr r3, [pc, #44] ; (8011468 <pbuf_free_ooseq+0x48>)
801143a: 681b ldr r3, [r3, #0]
801143c: 607b str r3, [r7, #4]
801143e: e00a b.n 8011456 <pbuf_free_ooseq+0x36>
if (pcb->ooseq != NULL) {
8011440: 687b ldr r3, [r7, #4]
8011442: 6f5b ldr r3, [r3, #116] ; 0x74
8011444: 2b00 cmp r3, #0
8011446: d003 beq.n 8011450 <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);
8011448: 6878 ldr r0, [r7, #4]
801144a: f002 f971 bl 8013730 <tcp_free_ooseq>
return;
801144e: e005 b.n 801145c <pbuf_free_ooseq+0x3c>
for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
8011450: 687b ldr r3, [r7, #4]
8011452: 68db ldr r3, [r3, #12]
8011454: 607b str r3, [r7, #4]
8011456: 687b ldr r3, [r7, #4]
8011458: 2b00 cmp r3, #0
801145a: d1f1 bne.n 8011440 <pbuf_free_ooseq+0x20>
}
}
}
801145c: 3708 adds r7, #8
801145e: 46bd mov sp, r7
8011460: bd80 pop {r7, pc}
8011462: bf00 nop
8011464: 2000f7e0 .word 0x2000f7e0
8011468: 2000f7e8 .word 0x2000f7e8
0801146c <pbuf_free_ooseq_callback>:
/**
* Just a callback function for tcpip_callback() that calls pbuf_free_ooseq().
*/
static void
pbuf_free_ooseq_callback(void *arg)
{
801146c: b580 push {r7, lr}
801146e: b082 sub sp, #8
8011470: af00 add r7, sp, #0
8011472: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(arg);
pbuf_free_ooseq();
8011474: f7ff ffd4 bl 8011420 <pbuf_free_ooseq>
}
8011478: bf00 nop
801147a: 3708 adds r7, #8
801147c: 46bd mov sp, r7
801147e: bd80 pop {r7, pc}
08011480 <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)
{
8011480: b580 push {r7, lr}
8011482: b082 sub sp, #8
8011484: 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);
8011486: f00a ffe1 bl 801c44c <sys_arch_protect>
801148a: 6078 str r0, [r7, #4]
queued = pbuf_free_ooseq_pending;
801148c: 4b0f ldr r3, [pc, #60] ; (80114cc <pbuf_pool_is_empty+0x4c>)
801148e: 781b ldrb r3, [r3, #0]
8011490: 70fb strb r3, [r7, #3]
pbuf_free_ooseq_pending = 1;
8011492: 4b0e ldr r3, [pc, #56] ; (80114cc <pbuf_pool_is_empty+0x4c>)
8011494: 2201 movs r2, #1
8011496: 701a strb r2, [r3, #0]
SYS_ARCH_UNPROTECT(old_level);
8011498: 6878 ldr r0, [r7, #4]
801149a: f00a ffe5 bl 801c468 <sys_arch_unprotect>
if (!queued) {
801149e: 78fb ldrb r3, [r7, #3]
80114a0: 2b00 cmp r3, #0
80114a2: d10f bne.n 80114c4 <pbuf_pool_is_empty+0x44>
/* queue a call to pbuf_free_ooseq if not already queued */
PBUF_POOL_FREE_OOSEQ_QUEUE_CALL();
80114a4: 2100 movs r1, #0
80114a6: 480a ldr r0, [pc, #40] ; (80114d0 <pbuf_pool_is_empty+0x50>)
80114a8: f7fe fee0 bl 801026c <tcpip_try_callback>
80114ac: 4603 mov r3, r0
80114ae: 2b00 cmp r3, #0
80114b0: d008 beq.n 80114c4 <pbuf_pool_is_empty+0x44>
80114b2: f00a ffcb bl 801c44c <sys_arch_protect>
80114b6: 6078 str r0, [r7, #4]
80114b8: 4b04 ldr r3, [pc, #16] ; (80114cc <pbuf_pool_is_empty+0x4c>)
80114ba: 2200 movs r2, #0
80114bc: 701a strb r2, [r3, #0]
80114be: 6878 ldr r0, [r7, #4]
80114c0: f00a ffd2 bl 801c468 <sys_arch_unprotect>
}
#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */
}
80114c4: bf00 nop
80114c6: 3708 adds r7, #8
80114c8: 46bd mov sp, r7
80114ca: bd80 pop {r7, pc}
80114cc: 2000f7e0 .word 0x2000f7e0
80114d0: 0801146d .word 0x0801146d
080114d4 <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)
{
80114d4: b480 push {r7}
80114d6: b085 sub sp, #20
80114d8: af00 add r7, sp, #0
80114da: 60f8 str r0, [r7, #12]
80114dc: 60b9 str r1, [r7, #8]
80114de: 4611 mov r1, r2
80114e0: 461a mov r2, r3
80114e2: 460b mov r3, r1
80114e4: 80fb strh r3, [r7, #6]
80114e6: 4613 mov r3, r2
80114e8: 80bb strh r3, [r7, #4]
p->next = NULL;
80114ea: 68fb ldr r3, [r7, #12]
80114ec: 2200 movs r2, #0
80114ee: 601a str r2, [r3, #0]
p->payload = payload;
80114f0: 68fb ldr r3, [r7, #12]
80114f2: 68ba ldr r2, [r7, #8]
80114f4: 605a str r2, [r3, #4]
p->tot_len = tot_len;
80114f6: 68fb ldr r3, [r7, #12]
80114f8: 88fa ldrh r2, [r7, #6]
80114fa: 811a strh r2, [r3, #8]
p->len = len;
80114fc: 68fb ldr r3, [r7, #12]
80114fe: 88ba ldrh r2, [r7, #4]
8011500: 815a strh r2, [r3, #10]
p->type_internal = (u8_t)type;
8011502: 8b3b ldrh r3, [r7, #24]
8011504: b2da uxtb r2, r3
8011506: 68fb ldr r3, [r7, #12]
8011508: 731a strb r2, [r3, #12]
p->flags = flags;
801150a: 68fb ldr r3, [r7, #12]
801150c: 7f3a ldrb r2, [r7, #28]
801150e: 735a strb r2, [r3, #13]
p->ref = 1;
8011510: 68fb ldr r3, [r7, #12]
8011512: 2201 movs r2, #1
8011514: 739a strb r2, [r3, #14]
p->if_idx = NETIF_NO_INDEX;
8011516: 68fb ldr r3, [r7, #12]
8011518: 2200 movs r2, #0
801151a: 73da strb r2, [r3, #15]
}
801151c: bf00 nop
801151e: 3714 adds r7, #20
8011520: 46bd mov sp, r7
8011522: f85d 7b04 ldr.w r7, [sp], #4
8011526: 4770 bx lr
08011528 <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)
{
8011528: b580 push {r7, lr}
801152a: b08c sub sp, #48 ; 0x30
801152c: af02 add r7, sp, #8
801152e: 4603 mov r3, r0
8011530: 71fb strb r3, [r7, #7]
8011532: 460b mov r3, r1
8011534: 80bb strh r3, [r7, #4]
8011536: 4613 mov r3, r2
8011538: 807b strh r3, [r7, #2]
struct pbuf *p;
u16_t offset = (u16_t)layer;
801153a: 79fb ldrb r3, [r7, #7]
801153c: 847b strh r3, [r7, #34] ; 0x22
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length));
switch (type) {
801153e: 887b ldrh r3, [r7, #2]
8011540: 2b41 cmp r3, #65 ; 0x41
8011542: d00b beq.n 801155c <pbuf_alloc+0x34>
8011544: 2b41 cmp r3, #65 ; 0x41
8011546: dc02 bgt.n 801154e <pbuf_alloc+0x26>
8011548: 2b01 cmp r3, #1
801154a: d007 beq.n 801155c <pbuf_alloc+0x34>
801154c: e0c2 b.n 80116d4 <pbuf_alloc+0x1ac>
801154e: f5b3 7fc1 cmp.w r3, #386 ; 0x182
8011552: d00b beq.n 801156c <pbuf_alloc+0x44>
8011554: f5b3 7f20 cmp.w r3, #640 ; 0x280
8011558: d070 beq.n 801163c <pbuf_alloc+0x114>
801155a: e0bb b.n 80116d4 <pbuf_alloc+0x1ac>
case PBUF_REF: /* fall through */
case PBUF_ROM:
p = pbuf_alloc_reference(NULL, length, type);
801155c: 887a ldrh r2, [r7, #2]
801155e: 88bb ldrh r3, [r7, #4]
8011560: 4619 mov r1, r3
8011562: 2000 movs r0, #0
8011564: f000 f8d2 bl 801170c <pbuf_alloc_reference>
8011568: 6278 str r0, [r7, #36] ; 0x24
break;
801156a: e0bd b.n 80116e8 <pbuf_alloc+0x1c0>
case PBUF_POOL: {
struct pbuf *q, *last;
u16_t rem_len; /* remaining length */
p = NULL;
801156c: 2300 movs r3, #0
801156e: 627b str r3, [r7, #36] ; 0x24
last = NULL;
8011570: 2300 movs r3, #0
8011572: 61fb str r3, [r7, #28]
rem_len = length;
8011574: 88bb ldrh r3, [r7, #4]
8011576: 837b strh r3, [r7, #26]
do {
u16_t qlen;
q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL);
8011578: 200c movs r0, #12
801157a: f7ff fbb7 bl 8010cec <memp_malloc>
801157e: 6138 str r0, [r7, #16]
if (q == NULL) {
8011580: 693b ldr r3, [r7, #16]
8011582: 2b00 cmp r3, #0
8011584: d109 bne.n 801159a <pbuf_alloc+0x72>
PBUF_POOL_IS_EMPTY();
8011586: f7ff ff7b bl 8011480 <pbuf_pool_is_empty>
/* free chain so far allocated */
if (p) {
801158a: 6a7b ldr r3, [r7, #36] ; 0x24
801158c: 2b00 cmp r3, #0
801158e: d002 beq.n 8011596 <pbuf_alloc+0x6e>
pbuf_free(p);
8011590: 6a78 ldr r0, [r7, #36] ; 0x24
8011592: f000 faa9 bl 8011ae8 <pbuf_free>
}
/* bail out unsuccessfully */
return NULL;
8011596: 2300 movs r3, #0
8011598: e0a7 b.n 80116ea <pbuf_alloc+0x1c2>
}
qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)));
801159a: 8c7b ldrh r3, [r7, #34] ; 0x22
801159c: 3303 adds r3, #3
801159e: b29b uxth r3, r3
80115a0: f023 0303 bic.w r3, r3, #3
80115a4: b29b uxth r3, r3
80115a6: f5c3 7314 rsb r3, r3, #592 ; 0x250
80115aa: b29b uxth r3, r3
80115ac: 8b7a ldrh r2, [r7, #26]
80115ae: 4293 cmp r3, r2
80115b0: bf28 it cs
80115b2: 4613 movcs r3, r2
80115b4: 81fb strh r3, [r7, #14]
pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)),
80115b6: 8c7b ldrh r3, [r7, #34] ; 0x22
80115b8: 3310 adds r3, #16
80115ba: 693a ldr r2, [r7, #16]
80115bc: 4413 add r3, r2
80115be: 3303 adds r3, #3
80115c0: f023 0303 bic.w r3, r3, #3
80115c4: 4618 mov r0, r3
80115c6: 89f9 ldrh r1, [r7, #14]
80115c8: 8b7a ldrh r2, [r7, #26]
80115ca: 2300 movs r3, #0
80115cc: 9301 str r3, [sp, #4]
80115ce: 887b ldrh r3, [r7, #2]
80115d0: 9300 str r3, [sp, #0]
80115d2: 460b mov r3, r1
80115d4: 4601 mov r1, r0
80115d6: 6938 ldr r0, [r7, #16]
80115d8: f7ff ff7c bl 80114d4 <pbuf_init_alloced_pbuf>
rem_len, qlen, type, 0);
LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned",
80115dc: 693b ldr r3, [r7, #16]
80115de: 685b ldr r3, [r3, #4]
80115e0: f003 0303 and.w r3, r3, #3
80115e4: 2b00 cmp r3, #0
80115e6: d006 beq.n 80115f6 <pbuf_alloc+0xce>
80115e8: 4b42 ldr r3, [pc, #264] ; (80116f4 <pbuf_alloc+0x1cc>)
80115ea: f240 1201 movw r2, #257 ; 0x101
80115ee: 4942 ldr r1, [pc, #264] ; (80116f8 <pbuf_alloc+0x1d0>)
80115f0: 4842 ldr r0, [pc, #264] ; (80116fc <pbuf_alloc+0x1d4>)
80115f2: f00a ffa9 bl 801c548 <iprintf>
((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0);
LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT",
80115f6: 8c7b ldrh r3, [r7, #34] ; 0x22
80115f8: 3303 adds r3, #3
80115fa: f023 0303 bic.w r3, r3, #3
80115fe: f5b3 7f14 cmp.w r3, #592 ; 0x250
8011602: d106 bne.n 8011612 <pbuf_alloc+0xea>
8011604: 4b3b ldr r3, [pc, #236] ; (80116f4 <pbuf_alloc+0x1cc>)
8011606: f240 1203 movw r2, #259 ; 0x103
801160a: 493d ldr r1, [pc, #244] ; (8011700 <pbuf_alloc+0x1d8>)
801160c: 483b ldr r0, [pc, #236] ; (80116fc <pbuf_alloc+0x1d4>)
801160e: f00a ff9b bl 801c548 <iprintf>
(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 );
if (p == NULL) {
8011612: 6a7b ldr r3, [r7, #36] ; 0x24
8011614: 2b00 cmp r3, #0
8011616: d102 bne.n 801161e <pbuf_alloc+0xf6>
/* allocated head of pbuf chain (into p) */
p = q;
8011618: 693b ldr r3, [r7, #16]
801161a: 627b str r3, [r7, #36] ; 0x24
801161c: e002 b.n 8011624 <pbuf_alloc+0xfc>
} else {
/* make previous pbuf point to this pbuf */
last->next = q;
801161e: 69fb ldr r3, [r7, #28]
8011620: 693a ldr r2, [r7, #16]
8011622: 601a str r2, [r3, #0]
}
last = q;
8011624: 693b ldr r3, [r7, #16]
8011626: 61fb str r3, [r7, #28]
rem_len = (u16_t)(rem_len - qlen);
8011628: 8b7a ldrh r2, [r7, #26]
801162a: 89fb ldrh r3, [r7, #14]
801162c: 1ad3 subs r3, r2, r3
801162e: 837b strh r3, [r7, #26]
offset = 0;
8011630: 2300 movs r3, #0
8011632: 847b strh r3, [r7, #34] ; 0x22
} while (rem_len > 0);
8011634: 8b7b ldrh r3, [r7, #26]
8011636: 2b00 cmp r3, #0
8011638: d19e bne.n 8011578 <pbuf_alloc+0x50>
break;
801163a: e055 b.n 80116e8 <pbuf_alloc+0x1c0>
}
case PBUF_RAM: {
u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
801163c: 8c7b ldrh r3, [r7, #34] ; 0x22
801163e: 3303 adds r3, #3
8011640: b29b uxth r3, r3
8011642: f023 0303 bic.w r3, r3, #3
8011646: b29a uxth r2, r3
8011648: 88bb ldrh r3, [r7, #4]
801164a: 3303 adds r3, #3
801164c: b29b uxth r3, r3
801164e: f023 0303 bic.w r3, r3, #3
8011652: b29b uxth r3, r3
8011654: 4413 add r3, r2
8011656: 833b strh r3, [r7, #24]
mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
8011658: 8b3b ldrh r3, [r7, #24]
801165a: 3310 adds r3, #16
801165c: 82fb strh r3, [r7, #22]
/* bug #50040: Check for integer overflow when calculating alloc_len */
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
801165e: 8b3a ldrh r2, [r7, #24]
8011660: 88bb ldrh r3, [r7, #4]
8011662: 3303 adds r3, #3
8011664: f023 0303 bic.w r3, r3, #3
8011668: 429a cmp r2, r3
801166a: d306 bcc.n 801167a <pbuf_alloc+0x152>
(alloc_len < LWIP_MEM_ALIGN_SIZE(length))) {
801166c: 8afa ldrh r2, [r7, #22]
801166e: 88bb ldrh r3, [r7, #4]
8011670: 3303 adds r3, #3
8011672: f023 0303 bic.w r3, r3, #3
if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
8011676: 429a cmp r2, r3
8011678: d201 bcs.n 801167e <pbuf_alloc+0x156>
return NULL;
801167a: 2300 movs r3, #0
801167c: e035 b.n 80116ea <pbuf_alloc+0x1c2>
}
/* If pbuf is to be allocated in RAM, allocate memory for it. */
p = (struct pbuf *)mem_malloc(alloc_len);
801167e: 8afb ldrh r3, [r7, #22]
8011680: 4618 mov r0, r3
8011682: f7ff f9b1 bl 80109e8 <mem_malloc>
8011686: 6278 str r0, [r7, #36] ; 0x24
if (p == NULL) {
8011688: 6a7b ldr r3, [r7, #36] ; 0x24
801168a: 2b00 cmp r3, #0
801168c: d101 bne.n 8011692 <pbuf_alloc+0x16a>
return NULL;
801168e: 2300 movs r3, #0
8011690: e02b b.n 80116ea <pbuf_alloc+0x1c2>
}
pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)),
8011692: 8c7b ldrh r3, [r7, #34] ; 0x22
8011694: 3310 adds r3, #16
8011696: 6a7a ldr r2, [r7, #36] ; 0x24
8011698: 4413 add r3, r2
801169a: 3303 adds r3, #3
801169c: f023 0303 bic.w r3, r3, #3
80116a0: 4618 mov r0, r3
80116a2: 88b9 ldrh r1, [r7, #4]
80116a4: 88ba ldrh r2, [r7, #4]
80116a6: 2300 movs r3, #0
80116a8: 9301 str r3, [sp, #4]
80116aa: 887b ldrh r3, [r7, #2]
80116ac: 9300 str r3, [sp, #0]
80116ae: 460b mov r3, r1
80116b0: 4601 mov r1, r0
80116b2: 6a78 ldr r0, [r7, #36] ; 0x24
80116b4: f7ff ff0e bl 80114d4 <pbuf_init_alloced_pbuf>
length, length, type, 0);
LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned",
80116b8: 6a7b ldr r3, [r7, #36] ; 0x24
80116ba: 685b ldr r3, [r3, #4]
80116bc: f003 0303 and.w r3, r3, #3
80116c0: 2b00 cmp r3, #0
80116c2: d010 beq.n 80116e6 <pbuf_alloc+0x1be>
80116c4: 4b0b ldr r3, [pc, #44] ; (80116f4 <pbuf_alloc+0x1cc>)
80116c6: f240 1223 movw r2, #291 ; 0x123
80116ca: 490e ldr r1, [pc, #56] ; (8011704 <pbuf_alloc+0x1dc>)
80116cc: 480b ldr r0, [pc, #44] ; (80116fc <pbuf_alloc+0x1d4>)
80116ce: f00a ff3b bl 801c548 <iprintf>
((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0);
break;
80116d2: e008 b.n 80116e6 <pbuf_alloc+0x1be>
}
default:
LWIP_ASSERT("pbuf_alloc: erroneous type", 0);
80116d4: 4b07 ldr r3, [pc, #28] ; (80116f4 <pbuf_alloc+0x1cc>)
80116d6: f240 1227 movw r2, #295 ; 0x127
80116da: 490b ldr r1, [pc, #44] ; (8011708 <pbuf_alloc+0x1e0>)
80116dc: 4807 ldr r0, [pc, #28] ; (80116fc <pbuf_alloc+0x1d4>)
80116de: f00a ff33 bl 801c548 <iprintf>
return NULL;
80116e2: 2300 movs r3, #0
80116e4: e001 b.n 80116ea <pbuf_alloc+0x1c2>
break;
80116e6: bf00 nop
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p));
return p;
80116e8: 6a7b ldr r3, [r7, #36] ; 0x24
}
80116ea: 4618 mov r0, r3
80116ec: 3728 adds r7, #40 ; 0x28
80116ee: 46bd mov sp, r7
80116f0: bd80 pop {r7, pc}
80116f2: bf00 nop
80116f4: 0801dec8 .word 0x0801dec8
80116f8: 0801def8 .word 0x0801def8
80116fc: 0801df28 .word 0x0801df28
8011700: 0801df50 .word 0x0801df50
8011704: 0801df84 .word 0x0801df84
8011708: 0801dfb0 .word 0x0801dfb0
0801170c <pbuf_alloc_reference>:
*
* @return the allocated pbuf.
*/
struct pbuf *
pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type)
{
801170c: b580 push {r7, lr}
801170e: b086 sub sp, #24
8011710: af02 add r7, sp, #8
8011712: 6078 str r0, [r7, #4]
8011714: 460b mov r3, r1
8011716: 807b strh r3, [r7, #2]
8011718: 4613 mov r3, r2
801171a: 803b strh r3, [r7, #0]
struct pbuf *p;
LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
801171c: 883b ldrh r3, [r7, #0]
801171e: 2b41 cmp r3, #65 ; 0x41
8011720: d009 beq.n 8011736 <pbuf_alloc_reference+0x2a>
8011722: 883b ldrh r3, [r7, #0]
8011724: 2b01 cmp r3, #1
8011726: d006 beq.n 8011736 <pbuf_alloc_reference+0x2a>
8011728: 4b0f ldr r3, [pc, #60] ; (8011768 <pbuf_alloc_reference+0x5c>)
801172a: f44f 72a5 mov.w r2, #330 ; 0x14a
801172e: 490f ldr r1, [pc, #60] ; (801176c <pbuf_alloc_reference+0x60>)
8011730: 480f ldr r0, [pc, #60] ; (8011770 <pbuf_alloc_reference+0x64>)
8011732: f00a ff09 bl 801c548 <iprintf>
/* only allocate memory for the pbuf structure */
p = (struct pbuf *)memp_malloc(MEMP_PBUF);
8011736: 200b movs r0, #11
8011738: f7ff fad8 bl 8010cec <memp_malloc>
801173c: 60f8 str r0, [r7, #12]
if (p == NULL) {
801173e: 68fb ldr r3, [r7, #12]
8011740: 2b00 cmp r3, #0
8011742: d101 bne.n 8011748 <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;
8011744: 2300 movs r3, #0
8011746: e00b b.n 8011760 <pbuf_alloc_reference+0x54>
}
pbuf_init_alloced_pbuf(p, payload, length, length, type, 0);
8011748: 8879 ldrh r1, [r7, #2]
801174a: 887a ldrh r2, [r7, #2]
801174c: 2300 movs r3, #0
801174e: 9301 str r3, [sp, #4]
8011750: 883b ldrh r3, [r7, #0]
8011752: 9300 str r3, [sp, #0]
8011754: 460b mov r3, r1
8011756: 6879 ldr r1, [r7, #4]
8011758: 68f8 ldr r0, [r7, #12]
801175a: f7ff febb bl 80114d4 <pbuf_init_alloced_pbuf>
return p;
801175e: 68fb ldr r3, [r7, #12]
}
8011760: 4618 mov r0, r3
8011762: 3710 adds r7, #16
8011764: 46bd mov sp, r7
8011766: bd80 pop {r7, pc}
8011768: 0801dec8 .word 0x0801dec8
801176c: 0801dfcc .word 0x0801dfcc
8011770: 0801df28 .word 0x0801df28
08011774 <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)
{
8011774: b580 push {r7, lr}
8011776: b088 sub sp, #32
8011778: af02 add r7, sp, #8
801177a: 607b str r3, [r7, #4]
801177c: 4603 mov r3, r0
801177e: 73fb strb r3, [r7, #15]
8011780: 460b mov r3, r1
8011782: 81bb strh r3, [r7, #12]
8011784: 4613 mov r3, r2
8011786: 817b strh r3, [r7, #10]
u16_t offset = (u16_t)l;
8011788: 7bfb ldrb r3, [r7, #15]
801178a: 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) {
801178c: 8a7b ldrh r3, [r7, #18]
801178e: 3303 adds r3, #3
8011790: f023 0203 bic.w r2, r3, #3
8011794: 89bb ldrh r3, [r7, #12]
8011796: 441a add r2, r3
8011798: 8cbb ldrh r3, [r7, #36] ; 0x24
801179a: 429a cmp r2, r3
801179c: d901 bls.n 80117a2 <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;
801179e: 2300 movs r3, #0
80117a0: e018 b.n 80117d4 <pbuf_alloced_custom+0x60>
}
if (payload_mem != NULL) {
80117a2: 6a3b ldr r3, [r7, #32]
80117a4: 2b00 cmp r3, #0
80117a6: d007 beq.n 80117b8 <pbuf_alloced_custom+0x44>
payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset);
80117a8: 8a7b ldrh r3, [r7, #18]
80117aa: 3303 adds r3, #3
80117ac: f023 0303 bic.w r3, r3, #3
80117b0: 6a3a ldr r2, [r7, #32]
80117b2: 4413 add r3, r2
80117b4: 617b str r3, [r7, #20]
80117b6: e001 b.n 80117bc <pbuf_alloced_custom+0x48>
} else {
payload = NULL;
80117b8: 2300 movs r3, #0
80117ba: 617b str r3, [r7, #20]
}
pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM);
80117bc: 6878 ldr r0, [r7, #4]
80117be: 89b9 ldrh r1, [r7, #12]
80117c0: 89ba ldrh r2, [r7, #12]
80117c2: 2302 movs r3, #2
80117c4: 9301 str r3, [sp, #4]
80117c6: 897b ldrh r3, [r7, #10]
80117c8: 9300 str r3, [sp, #0]
80117ca: 460b mov r3, r1
80117cc: 6979 ldr r1, [r7, #20]
80117ce: f7ff fe81 bl 80114d4 <pbuf_init_alloced_pbuf>
return &p->pbuf;
80117d2: 687b ldr r3, [r7, #4]
}
80117d4: 4618 mov r0, r3
80117d6: 3718 adds r7, #24
80117d8: 46bd mov sp, r7
80117da: bd80 pop {r7, pc}
080117dc <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)
{
80117dc: b580 push {r7, lr}
80117de: b084 sub sp, #16
80117e0: af00 add r7, sp, #0
80117e2: 6078 str r0, [r7, #4]
80117e4: 460b mov r3, r1
80117e6: 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);
80117e8: 687b ldr r3, [r7, #4]
80117ea: 2b00 cmp r3, #0
80117ec: d106 bne.n 80117fc <pbuf_realloc+0x20>
80117ee: 4b3a ldr r3, [pc, #232] ; (80118d8 <pbuf_realloc+0xfc>)
80117f0: f44f 72cc mov.w r2, #408 ; 0x198
80117f4: 4939 ldr r1, [pc, #228] ; (80118dc <pbuf_realloc+0x100>)
80117f6: 483a ldr r0, [pc, #232] ; (80118e0 <pbuf_realloc+0x104>)
80117f8: f00a fea6 bl 801c548 <iprintf>
/* desired length larger than current length? */
if (new_len >= p->tot_len) {
80117fc: 687b ldr r3, [r7, #4]
80117fe: 891b ldrh r3, [r3, #8]
8011800: 887a ldrh r2, [r7, #2]
8011802: 429a cmp r2, r3
8011804: d264 bcs.n 80118d0 <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);
8011806: 687b ldr r3, [r7, #4]
8011808: 891a ldrh r2, [r3, #8]
801180a: 887b ldrh r3, [r7, #2]
801180c: 1ad3 subs r3, r2, r3
801180e: 813b strh r3, [r7, #8]
/* first, step over any pbufs that should remain in the chain */
rem_len = new_len;
8011810: 887b ldrh r3, [r7, #2]
8011812: 817b strh r3, [r7, #10]
q = p;
8011814: 687b ldr r3, [r7, #4]
8011816: 60fb str r3, [r7, #12]
/* should this pbuf be kept? */
while (rem_len > q->len) {
8011818: e018 b.n 801184c <pbuf_realloc+0x70>
/* decrease remaining length by pbuf length */
rem_len = (u16_t)(rem_len - q->len);
801181a: 68fb ldr r3, [r7, #12]
801181c: 895b ldrh r3, [r3, #10]
801181e: 897a ldrh r2, [r7, #10]
8011820: 1ad3 subs r3, r2, r3
8011822: 817b strh r3, [r7, #10]
/* decrease total length indicator */
q->tot_len = (u16_t)(q->tot_len - shrink);
8011824: 68fb ldr r3, [r7, #12]
8011826: 891a ldrh r2, [r3, #8]
8011828: 893b ldrh r3, [r7, #8]
801182a: 1ad3 subs r3, r2, r3
801182c: b29a uxth r2, r3
801182e: 68fb ldr r3, [r7, #12]
8011830: 811a strh r2, [r3, #8]
/* proceed to next pbuf in chain */
q = q->next;
8011832: 68fb ldr r3, [r7, #12]
8011834: 681b ldr r3, [r3, #0]
8011836: 60fb str r3, [r7, #12]
LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL);
8011838: 68fb ldr r3, [r7, #12]
801183a: 2b00 cmp r3, #0
801183c: d106 bne.n 801184c <pbuf_realloc+0x70>
801183e: 4b26 ldr r3, [pc, #152] ; (80118d8 <pbuf_realloc+0xfc>)
8011840: f240 12af movw r2, #431 ; 0x1af
8011844: 4927 ldr r1, [pc, #156] ; (80118e4 <pbuf_realloc+0x108>)
8011846: 4826 ldr r0, [pc, #152] ; (80118e0 <pbuf_realloc+0x104>)
8011848: f00a fe7e bl 801c548 <iprintf>
while (rem_len > q->len) {
801184c: 68fb ldr r3, [r7, #12]
801184e: 895b ldrh r3, [r3, #10]
8011850: 897a ldrh r2, [r7, #10]
8011852: 429a cmp r2, r3
8011854: d8e1 bhi.n 801181a <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)
8011856: 68fb ldr r3, [r7, #12]
8011858: 7b1b ldrb r3, [r3, #12]
801185a: f003 030f and.w r3, r3, #15
801185e: 2b00 cmp r3, #0
8011860: d122 bne.n 80118a8 <pbuf_realloc+0xcc>
8011862: 68fb ldr r3, [r7, #12]
8011864: 895b ldrh r3, [r3, #10]
8011866: 897a ldrh r2, [r7, #10]
8011868: 429a cmp r2, r3
801186a: d01d beq.n 80118a8 <pbuf_realloc+0xcc>
#if LWIP_SUPPORT_CUSTOM_PBUF
&& ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0)
801186c: 68fb ldr r3, [r7, #12]
801186e: 7b5b ldrb r3, [r3, #13]
8011870: f003 0302 and.w r3, r3, #2
8011874: 2b00 cmp r3, #0
8011876: d117 bne.n 80118a8 <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));
8011878: 68fb ldr r3, [r7, #12]
801187a: 685b ldr r3, [r3, #4]
801187c: 461a mov r2, r3
801187e: 68fb ldr r3, [r7, #12]
8011880: 1ad3 subs r3, r2, r3
8011882: b29a uxth r2, r3
8011884: 897b ldrh r3, [r7, #10]
8011886: 4413 add r3, r2
8011888: b29b uxth r3, r3
801188a: 4619 mov r1, r3
801188c: 68f8 ldr r0, [r7, #12]
801188e: f7fe ffa1 bl 80107d4 <mem_trim>
8011892: 60f8 str r0, [r7, #12]
LWIP_ASSERT("mem_trim returned q == NULL", q != NULL);
8011894: 68fb ldr r3, [r7, #12]
8011896: 2b00 cmp r3, #0
8011898: d106 bne.n 80118a8 <pbuf_realloc+0xcc>
801189a: 4b0f ldr r3, [pc, #60] ; (80118d8 <pbuf_realloc+0xfc>)
801189c: f240 12bd movw r2, #445 ; 0x1bd
80118a0: 4911 ldr r1, [pc, #68] ; (80118e8 <pbuf_realloc+0x10c>)
80118a2: 480f ldr r0, [pc, #60] ; (80118e0 <pbuf_realloc+0x104>)
80118a4: f00a fe50 bl 801c548 <iprintf>
}
/* adjust length fields for new last pbuf */
q->len = rem_len;
80118a8: 68fb ldr r3, [r7, #12]
80118aa: 897a ldrh r2, [r7, #10]
80118ac: 815a strh r2, [r3, #10]
q->tot_len = q->len;
80118ae: 68fb ldr r3, [r7, #12]
80118b0: 895a ldrh r2, [r3, #10]
80118b2: 68fb ldr r3, [r7, #12]
80118b4: 811a strh r2, [r3, #8]
/* any remaining pbufs in chain? */
if (q->next != NULL) {
80118b6: 68fb ldr r3, [r7, #12]
80118b8: 681b ldr r3, [r3, #0]
80118ba: 2b00 cmp r3, #0
80118bc: d004 beq.n 80118c8 <pbuf_realloc+0xec>
/* free remaining pbufs in chain */
pbuf_free(q->next);
80118be: 68fb ldr r3, [r7, #12]
80118c0: 681b ldr r3, [r3, #0]
80118c2: 4618 mov r0, r3
80118c4: f000 f910 bl 8011ae8 <pbuf_free>
}
/* q is last packet in chain */
q->next = NULL;
80118c8: 68fb ldr r3, [r7, #12]
80118ca: 2200 movs r2, #0
80118cc: 601a str r2, [r3, #0]
80118ce: e000 b.n 80118d2 <pbuf_realloc+0xf6>
return;
80118d0: bf00 nop
}
80118d2: 3710 adds r7, #16
80118d4: 46bd mov sp, r7
80118d6: bd80 pop {r7, pc}
80118d8: 0801dec8 .word 0x0801dec8
80118dc: 0801dfe0 .word 0x0801dfe0
80118e0: 0801df28 .word 0x0801df28
80118e4: 0801dff8 .word 0x0801dff8
80118e8: 0801e010 .word 0x0801e010
080118ec <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)
{
80118ec: b580 push {r7, lr}
80118ee: b086 sub sp, #24
80118f0: af00 add r7, sp, #0
80118f2: 60f8 str r0, [r7, #12]
80118f4: 60b9 str r1, [r7, #8]
80118f6: 4613 mov r3, r2
80118f8: 71fb strb r3, [r7, #7]
u16_t type_internal;
void *payload;
u16_t increment_magnitude;
LWIP_ASSERT("p != NULL", p != NULL);
80118fa: 68fb ldr r3, [r7, #12]
80118fc: 2b00 cmp r3, #0
80118fe: d106 bne.n 801190e <pbuf_add_header_impl+0x22>
8011900: 4b2b ldr r3, [pc, #172] ; (80119b0 <pbuf_add_header_impl+0xc4>)
8011902: f240 12df movw r2, #479 ; 0x1df
8011906: 492b ldr r1, [pc, #172] ; (80119b4 <pbuf_add_header_impl+0xc8>)
8011908: 482b ldr r0, [pc, #172] ; (80119b8 <pbuf_add_header_impl+0xcc>)
801190a: f00a fe1d bl 801c548 <iprintf>
if ((p == NULL) || (header_size_increment > 0xFFFF)) {
801190e: 68fb ldr r3, [r7, #12]
8011910: 2b00 cmp r3, #0
8011912: d003 beq.n 801191c <pbuf_add_header_impl+0x30>
8011914: 68bb ldr r3, [r7, #8]
8011916: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
801191a: d301 bcc.n 8011920 <pbuf_add_header_impl+0x34>
return 1;
801191c: 2301 movs r3, #1
801191e: e043 b.n 80119a8 <pbuf_add_header_impl+0xbc>
}
if (header_size_increment == 0) {
8011920: 68bb ldr r3, [r7, #8]
8011922: 2b00 cmp r3, #0
8011924: d101 bne.n 801192a <pbuf_add_header_impl+0x3e>
return 0;
8011926: 2300 movs r3, #0
8011928: e03e b.n 80119a8 <pbuf_add_header_impl+0xbc>
}
increment_magnitude = (u16_t)header_size_increment;
801192a: 68bb ldr r3, [r7, #8]
801192c: 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) {
801192e: 68fb ldr r3, [r7, #12]
8011930: 891a ldrh r2, [r3, #8]
8011932: 8a7b ldrh r3, [r7, #18]
8011934: 4413 add r3, r2
8011936: b29b uxth r3, r3
8011938: 8a7a ldrh r2, [r7, #18]
801193a: 429a cmp r2, r3
801193c: d901 bls.n 8011942 <pbuf_add_header_impl+0x56>
return 1;
801193e: 2301 movs r3, #1
8011940: e032 b.n 80119a8 <pbuf_add_header_impl+0xbc>
}
type_internal = p->type_internal;
8011942: 68fb ldr r3, [r7, #12]
8011944: 7b1b ldrb r3, [r3, #12]
8011946: 823b strh r3, [r7, #16]
/* pbuf types containing payloads? */
if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) {
8011948: 8a3b ldrh r3, [r7, #16]
801194a: f003 0380 and.w r3, r3, #128 ; 0x80
801194e: 2b00 cmp r3, #0
8011950: d00c beq.n 801196c <pbuf_add_header_impl+0x80>
/* set new payload pointer */
payload = (u8_t *)p->payload - header_size_increment;
8011952: 68fb ldr r3, [r7, #12]
8011954: 685a ldr r2, [r3, #4]
8011956: 68bb ldr r3, [r7, #8]
8011958: 425b negs r3, r3
801195a: 4413 add r3, r2
801195c: 617b str r3, [r7, #20]
/* boundary check fails? */
if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) {
801195e: 68fb ldr r3, [r7, #12]
8011960: 3310 adds r3, #16
8011962: 697a ldr r2, [r7, #20]
8011964: 429a cmp r2, r3
8011966: d20d bcs.n 8011984 <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;
8011968: 2301 movs r3, #1
801196a: e01d b.n 80119a8 <pbuf_add_header_impl+0xbc>
}
/* pbuf types referring to external payloads? */
} else {
/* hide a header in the payload? */
if (force) {
801196c: 79fb ldrb r3, [r7, #7]
801196e: 2b00 cmp r3, #0
8011970: d006 beq.n 8011980 <pbuf_add_header_impl+0x94>
payload = (u8_t *)p->payload - header_size_increment;
8011972: 68fb ldr r3, [r7, #12]
8011974: 685a ldr r2, [r3, #4]
8011976: 68bb ldr r3, [r7, #8]
8011978: 425b negs r3, r3
801197a: 4413 add r3, r2
801197c: 617b str r3, [r7, #20]
801197e: e001 b.n 8011984 <pbuf_add_header_impl+0x98>
} else {
/* cannot expand payload to front (yet!)
* bail out unsuccessfully */
return 1;
8011980: 2301 movs r3, #1
8011982: e011 b.n 80119a8 <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;
8011984: 68fb ldr r3, [r7, #12]
8011986: 697a ldr r2, [r7, #20]
8011988: 605a str r2, [r3, #4]
p->len = (u16_t)(p->len + increment_magnitude);
801198a: 68fb ldr r3, [r7, #12]
801198c: 895a ldrh r2, [r3, #10]
801198e: 8a7b ldrh r3, [r7, #18]
8011990: 4413 add r3, r2
8011992: b29a uxth r2, r3
8011994: 68fb ldr r3, [r7, #12]
8011996: 815a strh r2, [r3, #10]
p->tot_len = (u16_t)(p->tot_len + increment_magnitude);
8011998: 68fb ldr r3, [r7, #12]
801199a: 891a ldrh r2, [r3, #8]
801199c: 8a7b ldrh r3, [r7, #18]
801199e: 4413 add r3, r2
80119a0: b29a uxth r2, r3
80119a2: 68fb ldr r3, [r7, #12]
80119a4: 811a strh r2, [r3, #8]
return 0;
80119a6: 2300 movs r3, #0
}
80119a8: 4618 mov r0, r3
80119aa: 3718 adds r7, #24
80119ac: 46bd mov sp, r7
80119ae: bd80 pop {r7, pc}
80119b0: 0801dec8 .word 0x0801dec8
80119b4: 0801e02c .word 0x0801e02c
80119b8: 0801df28 .word 0x0801df28
080119bc <pbuf_add_header>:
* @return non-zero on failure, zero on success.
*
*/
u8_t
pbuf_add_header(struct pbuf *p, size_t header_size_increment)
{
80119bc: b580 push {r7, lr}
80119be: b082 sub sp, #8
80119c0: af00 add r7, sp, #0
80119c2: 6078 str r0, [r7, #4]
80119c4: 6039 str r1, [r7, #0]
return pbuf_add_header_impl(p, header_size_increment, 0);
80119c6: 2200 movs r2, #0
80119c8: 6839 ldr r1, [r7, #0]
80119ca: 6878 ldr r0, [r7, #4]
80119cc: f7ff ff8e bl 80118ec <pbuf_add_header_impl>
80119d0: 4603 mov r3, r0
}
80119d2: 4618 mov r0, r3
80119d4: 3708 adds r7, #8
80119d6: 46bd mov sp, r7
80119d8: bd80 pop {r7, pc}
...
080119dc <pbuf_remove_header>:
* @return non-zero on failure, zero on success.
*
*/
u8_t
pbuf_remove_header(struct pbuf *p, size_t header_size_decrement)
{
80119dc: b580 push {r7, lr}
80119de: b084 sub sp, #16
80119e0: af00 add r7, sp, #0
80119e2: 6078 str r0, [r7, #4]
80119e4: 6039 str r1, [r7, #0]
void *payload;
u16_t increment_magnitude;
LWIP_ASSERT("p != NULL", p != NULL);
80119e6: 687b ldr r3, [r7, #4]
80119e8: 2b00 cmp r3, #0
80119ea: d106 bne.n 80119fa <pbuf_remove_header+0x1e>
80119ec: 4b20 ldr r3, [pc, #128] ; (8011a70 <pbuf_remove_header+0x94>)
80119ee: f240 224b movw r2, #587 ; 0x24b
80119f2: 4920 ldr r1, [pc, #128] ; (8011a74 <pbuf_remove_header+0x98>)
80119f4: 4820 ldr r0, [pc, #128] ; (8011a78 <pbuf_remove_header+0x9c>)
80119f6: f00a fda7 bl 801c548 <iprintf>
if ((p == NULL) || (header_size_decrement > 0xFFFF)) {
80119fa: 687b ldr r3, [r7, #4]
80119fc: 2b00 cmp r3, #0
80119fe: d003 beq.n 8011a08 <pbuf_remove_header+0x2c>
8011a00: 683b ldr r3, [r7, #0]
8011a02: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8011a06: d301 bcc.n 8011a0c <pbuf_remove_header+0x30>
return 1;
8011a08: 2301 movs r3, #1
8011a0a: e02c b.n 8011a66 <pbuf_remove_header+0x8a>
}
if (header_size_decrement == 0) {
8011a0c: 683b ldr r3, [r7, #0]
8011a0e: 2b00 cmp r3, #0
8011a10: d101 bne.n 8011a16 <pbuf_remove_header+0x3a>
return 0;
8011a12: 2300 movs r3, #0
8011a14: e027 b.n 8011a66 <pbuf_remove_header+0x8a>
}
increment_magnitude = (u16_t)header_size_decrement;
8011a16: 683b ldr r3, [r7, #0]
8011a18: 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;);
8011a1a: 687b ldr r3, [r7, #4]
8011a1c: 895b ldrh r3, [r3, #10]
8011a1e: 89fa ldrh r2, [r7, #14]
8011a20: 429a cmp r2, r3
8011a22: d908 bls.n 8011a36 <pbuf_remove_header+0x5a>
8011a24: 4b12 ldr r3, [pc, #72] ; (8011a70 <pbuf_remove_header+0x94>)
8011a26: f240 2255 movw r2, #597 ; 0x255
8011a2a: 4914 ldr r1, [pc, #80] ; (8011a7c <pbuf_remove_header+0xa0>)
8011a2c: 4812 ldr r0, [pc, #72] ; (8011a78 <pbuf_remove_header+0x9c>)
8011a2e: f00a fd8b bl 801c548 <iprintf>
8011a32: 2301 movs r3, #1
8011a34: e017 b.n 8011a66 <pbuf_remove_header+0x8a>
/* remember current payload pointer */
payload = p->payload;
8011a36: 687b ldr r3, [r7, #4]
8011a38: 685b ldr r3, [r3, #4]
8011a3a: 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;
8011a3c: 687b ldr r3, [r7, #4]
8011a3e: 685a ldr r2, [r3, #4]
8011a40: 683b ldr r3, [r7, #0]
8011a42: 441a add r2, r3
8011a44: 687b ldr r3, [r7, #4]
8011a46: 605a str r2, [r3, #4]
/* modify pbuf length fields */
p->len = (u16_t)(p->len - increment_magnitude);
8011a48: 687b ldr r3, [r7, #4]
8011a4a: 895a ldrh r2, [r3, #10]
8011a4c: 89fb ldrh r3, [r7, #14]
8011a4e: 1ad3 subs r3, r2, r3
8011a50: b29a uxth r2, r3
8011a52: 687b ldr r3, [r7, #4]
8011a54: 815a strh r2, [r3, #10]
p->tot_len = (u16_t)(p->tot_len - increment_magnitude);
8011a56: 687b ldr r3, [r7, #4]
8011a58: 891a ldrh r2, [r3, #8]
8011a5a: 89fb ldrh r3, [r7, #14]
8011a5c: 1ad3 subs r3, r2, r3
8011a5e: b29a uxth r2, r3
8011a60: 687b ldr r3, [r7, #4]
8011a62: 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;
8011a64: 2300 movs r3, #0
}
8011a66: 4618 mov r0, r3
8011a68: 3710 adds r7, #16
8011a6a: 46bd mov sp, r7
8011a6c: bd80 pop {r7, pc}
8011a6e: bf00 nop
8011a70: 0801dec8 .word 0x0801dec8
8011a74: 0801e02c .word 0x0801e02c
8011a78: 0801df28 .word 0x0801df28
8011a7c: 0801e038 .word 0x0801e038
08011a80 <pbuf_header_impl>:
static u8_t
pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force)
{
8011a80: b580 push {r7, lr}
8011a82: b082 sub sp, #8
8011a84: af00 add r7, sp, #0
8011a86: 6078 str r0, [r7, #4]
8011a88: 460b mov r3, r1
8011a8a: 807b strh r3, [r7, #2]
8011a8c: 4613 mov r3, r2
8011a8e: 707b strb r3, [r7, #1]
if (header_size_increment < 0) {
8011a90: f9b7 3002 ldrsh.w r3, [r7, #2]
8011a94: 2b00 cmp r3, #0
8011a96: da08 bge.n 8011aaa <pbuf_header_impl+0x2a>
return pbuf_remove_header(p, (size_t) - header_size_increment);
8011a98: f9b7 3002 ldrsh.w r3, [r7, #2]
8011a9c: 425b negs r3, r3
8011a9e: 4619 mov r1, r3
8011aa0: 6878 ldr r0, [r7, #4]
8011aa2: f7ff ff9b bl 80119dc <pbuf_remove_header>
8011aa6: 4603 mov r3, r0
8011aa8: e007 b.n 8011aba <pbuf_header_impl+0x3a>
} else {
return pbuf_add_header_impl(p, (size_t)header_size_increment, force);
8011aaa: f9b7 3002 ldrsh.w r3, [r7, #2]
8011aae: 787a ldrb r2, [r7, #1]
8011ab0: 4619 mov r1, r3
8011ab2: 6878 ldr r0, [r7, #4]
8011ab4: f7ff ff1a bl 80118ec <pbuf_add_header_impl>
8011ab8: 4603 mov r3, r0
}
}
8011aba: 4618 mov r0, r3
8011abc: 3708 adds r7, #8
8011abe: 46bd mov sp, r7
8011ac0: bd80 pop {r7, pc}
08011ac2 <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)
{
8011ac2: b580 push {r7, lr}
8011ac4: b082 sub sp, #8
8011ac6: af00 add r7, sp, #0
8011ac8: 6078 str r0, [r7, #4]
8011aca: 460b mov r3, r1
8011acc: 807b strh r3, [r7, #2]
return pbuf_header_impl(p, header_size_increment, 1);
8011ace: f9b7 3002 ldrsh.w r3, [r7, #2]
8011ad2: 2201 movs r2, #1
8011ad4: 4619 mov r1, r3
8011ad6: 6878 ldr r0, [r7, #4]
8011ad8: f7ff ffd2 bl 8011a80 <pbuf_header_impl>
8011adc: 4603 mov r3, r0
}
8011ade: 4618 mov r0, r3
8011ae0: 3708 adds r7, #8
8011ae2: 46bd mov sp, r7
8011ae4: bd80 pop {r7, pc}
...
08011ae8 <pbuf_free>:
* 1->1->1 becomes .......
*
*/
u8_t
pbuf_free(struct pbuf *p)
{
8011ae8: b580 push {r7, lr}
8011aea: b088 sub sp, #32
8011aec: af00 add r7, sp, #0
8011aee: 6078 str r0, [r7, #4]
u8_t alloc_src;
struct pbuf *q;
u8_t count;
if (p == NULL) {
8011af0: 687b ldr r3, [r7, #4]
8011af2: 2b00 cmp r3, #0
8011af4: d10b bne.n 8011b0e <pbuf_free+0x26>
LWIP_ASSERT("p != NULL", p != NULL);
8011af6: 687b ldr r3, [r7, #4]
8011af8: 2b00 cmp r3, #0
8011afa: d106 bne.n 8011b0a <pbuf_free+0x22>
8011afc: 4b3b ldr r3, [pc, #236] ; (8011bec <pbuf_free+0x104>)
8011afe: f44f 7237 mov.w r2, #732 ; 0x2dc
8011b02: 493b ldr r1, [pc, #236] ; (8011bf0 <pbuf_free+0x108>)
8011b04: 483b ldr r0, [pc, #236] ; (8011bf4 <pbuf_free+0x10c>)
8011b06: f00a fd1f bl 801c548 <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;
8011b0a: 2300 movs r3, #0
8011b0c: e069 b.n 8011be2 <pbuf_free+0xfa>
}
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p));
PERF_START;
count = 0;
8011b0e: 2300 movs r3, #0
8011b10: 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) {
8011b12: e062 b.n 8011bda <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);
8011b14: f00a fc9a bl 801c44c <sys_arch_protect>
8011b18: 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);
8011b1a: 687b ldr r3, [r7, #4]
8011b1c: 7b9b ldrb r3, [r3, #14]
8011b1e: 2b00 cmp r3, #0
8011b20: d106 bne.n 8011b30 <pbuf_free+0x48>
8011b22: 4b32 ldr r3, [pc, #200] ; (8011bec <pbuf_free+0x104>)
8011b24: f240 22f1 movw r2, #753 ; 0x2f1
8011b28: 4933 ldr r1, [pc, #204] ; (8011bf8 <pbuf_free+0x110>)
8011b2a: 4832 ldr r0, [pc, #200] ; (8011bf4 <pbuf_free+0x10c>)
8011b2c: f00a fd0c bl 801c548 <iprintf>
/* decrease reference count (number of pointers to pbuf) */
ref = --(p->ref);
8011b30: 687b ldr r3, [r7, #4]
8011b32: 7b9b ldrb r3, [r3, #14]
8011b34: 3b01 subs r3, #1
8011b36: b2da uxtb r2, r3
8011b38: 687b ldr r3, [r7, #4]
8011b3a: 739a strb r2, [r3, #14]
8011b3c: 687b ldr r3, [r7, #4]
8011b3e: 7b9b ldrb r3, [r3, #14]
8011b40: 75fb strb r3, [r7, #23]
SYS_ARCH_UNPROTECT(old_level);
8011b42: 69b8 ldr r0, [r7, #24]
8011b44: f00a fc90 bl 801c468 <sys_arch_unprotect>
/* this pbuf is no longer referenced to? */
if (ref == 0) {
8011b48: 7dfb ldrb r3, [r7, #23]
8011b4a: 2b00 cmp r3, #0
8011b4c: d143 bne.n 8011bd6 <pbuf_free+0xee>
/* remember next pbuf in chain for next iteration */
q = p->next;
8011b4e: 687b ldr r3, [r7, #4]
8011b50: 681b ldr r3, [r3, #0]
8011b52: 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);
8011b54: 687b ldr r3, [r7, #4]
8011b56: 7b1b ldrb r3, [r3, #12]
8011b58: f003 030f and.w r3, r3, #15
8011b5c: 73fb strb r3, [r7, #15]
#if LWIP_SUPPORT_CUSTOM_PBUF
/* is this a custom pbuf? */
if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) {
8011b5e: 687b ldr r3, [r7, #4]
8011b60: 7b5b ldrb r3, [r3, #13]
8011b62: f003 0302 and.w r3, r3, #2
8011b66: 2b00 cmp r3, #0
8011b68: d011 beq.n 8011b8e <pbuf_free+0xa6>
struct pbuf_custom *pc = (struct pbuf_custom *)p;
8011b6a: 687b ldr r3, [r7, #4]
8011b6c: 60bb str r3, [r7, #8]
LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL);
8011b6e: 68bb ldr r3, [r7, #8]
8011b70: 691b ldr r3, [r3, #16]
8011b72: 2b00 cmp r3, #0
8011b74: d106 bne.n 8011b84 <pbuf_free+0x9c>
8011b76: 4b1d ldr r3, [pc, #116] ; (8011bec <pbuf_free+0x104>)
8011b78: f240 22ff movw r2, #767 ; 0x2ff
8011b7c: 491f ldr r1, [pc, #124] ; (8011bfc <pbuf_free+0x114>)
8011b7e: 481d ldr r0, [pc, #116] ; (8011bf4 <pbuf_free+0x10c>)
8011b80: f00a fce2 bl 801c548 <iprintf>
pc->custom_free_function(p);
8011b84: 68bb ldr r3, [r7, #8]
8011b86: 691b ldr r3, [r3, #16]
8011b88: 6878 ldr r0, [r7, #4]
8011b8a: 4798 blx r3
8011b8c: e01d b.n 8011bca <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) {
8011b8e: 7bfb ldrb r3, [r7, #15]
8011b90: 2b02 cmp r3, #2
8011b92: d104 bne.n 8011b9e <pbuf_free+0xb6>
memp_free(MEMP_PBUF_POOL, p);
8011b94: 6879 ldr r1, [r7, #4]
8011b96: 200c movs r0, #12
8011b98: f7ff f8fa bl 8010d90 <memp_free>
8011b9c: e015 b.n 8011bca <pbuf_free+0xe2>
/* is this a ROM or RAM referencing pbuf? */
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) {
8011b9e: 7bfb ldrb r3, [r7, #15]
8011ba0: 2b01 cmp r3, #1
8011ba2: d104 bne.n 8011bae <pbuf_free+0xc6>
memp_free(MEMP_PBUF, p);
8011ba4: 6879 ldr r1, [r7, #4]
8011ba6: 200b movs r0, #11
8011ba8: f7ff f8f2 bl 8010d90 <memp_free>
8011bac: e00d b.n 8011bca <pbuf_free+0xe2>
/* type == PBUF_RAM */
} else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) {
8011bae: 7bfb ldrb r3, [r7, #15]
8011bb0: 2b00 cmp r3, #0
8011bb2: d103 bne.n 8011bbc <pbuf_free+0xd4>
mem_free(p);
8011bb4: 6878 ldr r0, [r7, #4]
8011bb6: f7fe fd7d bl 80106b4 <mem_free>
8011bba: e006 b.n 8011bca <pbuf_free+0xe2>
} else {
/* @todo: support freeing other types */
LWIP_ASSERT("invalid pbuf type", 0);
8011bbc: 4b0b ldr r3, [pc, #44] ; (8011bec <pbuf_free+0x104>)
8011bbe: f240 320f movw r2, #783 ; 0x30f
8011bc2: 490f ldr r1, [pc, #60] ; (8011c00 <pbuf_free+0x118>)
8011bc4: 480b ldr r0, [pc, #44] ; (8011bf4 <pbuf_free+0x10c>)
8011bc6: f00a fcbf bl 801c548 <iprintf>
}
}
count++;
8011bca: 7ffb ldrb r3, [r7, #31]
8011bcc: 3301 adds r3, #1
8011bce: 77fb strb r3, [r7, #31]
/* proceed to next pbuf */
p = q;
8011bd0: 693b ldr r3, [r7, #16]
8011bd2: 607b str r3, [r7, #4]
8011bd4: e001 b.n 8011bda <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;
8011bd6: 2300 movs r3, #0
8011bd8: 607b str r3, [r7, #4]
while (p != NULL) {
8011bda: 687b ldr r3, [r7, #4]
8011bdc: 2b00 cmp r3, #0
8011bde: d199 bne.n 8011b14 <pbuf_free+0x2c>
}
}
PERF_STOP("pbuf_free");
/* return number of de-allocated pbufs */
return count;
8011be0: 7ffb ldrb r3, [r7, #31]
}
8011be2: 4618 mov r0, r3
8011be4: 3720 adds r7, #32
8011be6: 46bd mov sp, r7
8011be8: bd80 pop {r7, pc}
8011bea: bf00 nop
8011bec: 0801dec8 .word 0x0801dec8
8011bf0: 0801e02c .word 0x0801e02c
8011bf4: 0801df28 .word 0x0801df28
8011bf8: 0801e058 .word 0x0801e058
8011bfc: 0801e070 .word 0x0801e070
8011c00: 0801e094 .word 0x0801e094
08011c04 <pbuf_clen>:
* @param p first pbuf of chain
* @return the number of pbufs in a chain
*/
u16_t
pbuf_clen(const struct pbuf *p)
{
8011c04: b480 push {r7}
8011c06: b085 sub sp, #20
8011c08: af00 add r7, sp, #0
8011c0a: 6078 str r0, [r7, #4]
u16_t len;
len = 0;
8011c0c: 2300 movs r3, #0
8011c0e: 81fb strh r3, [r7, #14]
while (p != NULL) {
8011c10: e005 b.n 8011c1e <pbuf_clen+0x1a>
++len;
8011c12: 89fb ldrh r3, [r7, #14]
8011c14: 3301 adds r3, #1
8011c16: 81fb strh r3, [r7, #14]
p = p->next;
8011c18: 687b ldr r3, [r7, #4]
8011c1a: 681b ldr r3, [r3, #0]
8011c1c: 607b str r3, [r7, #4]
while (p != NULL) {
8011c1e: 687b ldr r3, [r7, #4]
8011c20: 2b00 cmp r3, #0
8011c22: d1f6 bne.n 8011c12 <pbuf_clen+0xe>
}
return len;
8011c24: 89fb ldrh r3, [r7, #14]
}
8011c26: 4618 mov r0, r3
8011c28: 3714 adds r7, #20
8011c2a: 46bd mov sp, r7
8011c2c: f85d 7b04 ldr.w r7, [sp], #4
8011c30: 4770 bx lr
...
08011c34 <pbuf_ref>:
* @param p pbuf to increase reference counter of
*
*/
void
pbuf_ref(struct pbuf *p)
{
8011c34: b580 push {r7, lr}
8011c36: b084 sub sp, #16
8011c38: af00 add r7, sp, #0
8011c3a: 6078 str r0, [r7, #4]
/* pbuf given? */
if (p != NULL) {
8011c3c: 687b ldr r3, [r7, #4]
8011c3e: 2b00 cmp r3, #0
8011c40: d016 beq.n 8011c70 <pbuf_ref+0x3c>
SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1));
8011c42: f00a fc03 bl 801c44c <sys_arch_protect>
8011c46: 60f8 str r0, [r7, #12]
8011c48: 687b ldr r3, [r7, #4]
8011c4a: 7b9b ldrb r3, [r3, #14]
8011c4c: 3301 adds r3, #1
8011c4e: b2da uxtb r2, r3
8011c50: 687b ldr r3, [r7, #4]
8011c52: 739a strb r2, [r3, #14]
8011c54: 68f8 ldr r0, [r7, #12]
8011c56: f00a fc07 bl 801c468 <sys_arch_unprotect>
LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
8011c5a: 687b ldr r3, [r7, #4]
8011c5c: 7b9b ldrb r3, [r3, #14]
8011c5e: 2b00 cmp r3, #0
8011c60: d106 bne.n 8011c70 <pbuf_ref+0x3c>
8011c62: 4b05 ldr r3, [pc, #20] ; (8011c78 <pbuf_ref+0x44>)
8011c64: f240 3242 movw r2, #834 ; 0x342
8011c68: 4904 ldr r1, [pc, #16] ; (8011c7c <pbuf_ref+0x48>)
8011c6a: 4805 ldr r0, [pc, #20] ; (8011c80 <pbuf_ref+0x4c>)
8011c6c: f00a fc6c bl 801c548 <iprintf>
}
}
8011c70: bf00 nop
8011c72: 3710 adds r7, #16
8011c74: 46bd mov sp, r7
8011c76: bd80 pop {r7, pc}
8011c78: 0801dec8 .word 0x0801dec8
8011c7c: 0801e0a8 .word 0x0801e0a8
8011c80: 0801df28 .word 0x0801df28
08011c84 <pbuf_cat>:
*
* @see pbuf_chain()
*/
void
pbuf_cat(struct pbuf *h, struct pbuf *t)
{
8011c84: b580 push {r7, lr}
8011c86: b084 sub sp, #16
8011c88: af00 add r7, sp, #0
8011c8a: 6078 str r0, [r7, #4]
8011c8c: 6039 str r1, [r7, #0]
struct pbuf *p;
LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)",
8011c8e: 687b ldr r3, [r7, #4]
8011c90: 2b00 cmp r3, #0
8011c92: d002 beq.n 8011c9a <pbuf_cat+0x16>
8011c94: 683b ldr r3, [r7, #0]
8011c96: 2b00 cmp r3, #0
8011c98: d107 bne.n 8011caa <pbuf_cat+0x26>
8011c9a: 4b20 ldr r3, [pc, #128] ; (8011d1c <pbuf_cat+0x98>)
8011c9c: f240 325a movw r2, #858 ; 0x35a
8011ca0: 491f ldr r1, [pc, #124] ; (8011d20 <pbuf_cat+0x9c>)
8011ca2: 4820 ldr r0, [pc, #128] ; (8011d24 <pbuf_cat+0xa0>)
8011ca4: f00a fc50 bl 801c548 <iprintf>
8011ca8: e034 b.n 8011d14 <pbuf_cat+0x90>
((h != NULL) && (t != NULL)), return;);
/* proceed to last pbuf of chain */
for (p = h; p->next != NULL; p = p->next) {
8011caa: 687b ldr r3, [r7, #4]
8011cac: 60fb str r3, [r7, #12]
8011cae: e00a b.n 8011cc6 <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);
8011cb0: 68fb ldr r3, [r7, #12]
8011cb2: 891a ldrh r2, [r3, #8]
8011cb4: 683b ldr r3, [r7, #0]
8011cb6: 891b ldrh r3, [r3, #8]
8011cb8: 4413 add r3, r2
8011cba: b29a uxth r2, r3
8011cbc: 68fb ldr r3, [r7, #12]
8011cbe: 811a strh r2, [r3, #8]
for (p = h; p->next != NULL; p = p->next) {
8011cc0: 68fb ldr r3, [r7, #12]
8011cc2: 681b ldr r3, [r3, #0]
8011cc4: 60fb str r3, [r7, #12]
8011cc6: 68fb ldr r3, [r7, #12]
8011cc8: 681b ldr r3, [r3, #0]
8011cca: 2b00 cmp r3, #0
8011ccc: d1f0 bne.n 8011cb0 <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);
8011cce: 68fb ldr r3, [r7, #12]
8011cd0: 891a ldrh r2, [r3, #8]
8011cd2: 68fb ldr r3, [r7, #12]
8011cd4: 895b ldrh r3, [r3, #10]
8011cd6: 429a cmp r2, r3
8011cd8: d006 beq.n 8011ce8 <pbuf_cat+0x64>
8011cda: 4b10 ldr r3, [pc, #64] ; (8011d1c <pbuf_cat+0x98>)
8011cdc: f240 3262 movw r2, #866 ; 0x362
8011ce0: 4911 ldr r1, [pc, #68] ; (8011d28 <pbuf_cat+0xa4>)
8011ce2: 4810 ldr r0, [pc, #64] ; (8011d24 <pbuf_cat+0xa0>)
8011ce4: f00a fc30 bl 801c548 <iprintf>
LWIP_ASSERT("p->next == NULL", p->next == NULL);
8011ce8: 68fb ldr r3, [r7, #12]
8011cea: 681b ldr r3, [r3, #0]
8011cec: 2b00 cmp r3, #0
8011cee: d006 beq.n 8011cfe <pbuf_cat+0x7a>
8011cf0: 4b0a ldr r3, [pc, #40] ; (8011d1c <pbuf_cat+0x98>)
8011cf2: f240 3263 movw r2, #867 ; 0x363
8011cf6: 490d ldr r1, [pc, #52] ; (8011d2c <pbuf_cat+0xa8>)
8011cf8: 480a ldr r0, [pc, #40] ; (8011d24 <pbuf_cat+0xa0>)
8011cfa: f00a fc25 bl 801c548 <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);
8011cfe: 68fb ldr r3, [r7, #12]
8011d00: 891a ldrh r2, [r3, #8]
8011d02: 683b ldr r3, [r7, #0]
8011d04: 891b ldrh r3, [r3, #8]
8011d06: 4413 add r3, r2
8011d08: b29a uxth r2, r3
8011d0a: 68fb ldr r3, [r7, #12]
8011d0c: 811a strh r2, [r3, #8]
/* chain last pbuf of head (p) with first of tail (t) */
p->next = t;
8011d0e: 68fb ldr r3, [r7, #12]
8011d10: 683a ldr r2, [r7, #0]
8011d12: 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.
*/
}
8011d14: 3710 adds r7, #16
8011d16: 46bd mov sp, r7
8011d18: bd80 pop {r7, pc}
8011d1a: bf00 nop
8011d1c: 0801dec8 .word 0x0801dec8
8011d20: 0801e0bc .word 0x0801e0bc
8011d24: 0801df28 .word 0x0801df28
8011d28: 0801e0f4 .word 0x0801e0f4
8011d2c: 0801e124 .word 0x0801e124
08011d30 <pbuf_chain>:
* The ->ref field of the first pbuf of the tail chain is adjusted.
*
*/
void
pbuf_chain(struct pbuf *h, struct pbuf *t)
{
8011d30: b580 push {r7, lr}
8011d32: b082 sub sp, #8
8011d34: af00 add r7, sp, #0
8011d36: 6078 str r0, [r7, #4]
8011d38: 6039 str r1, [r7, #0]
pbuf_cat(h, t);
8011d3a: 6839 ldr r1, [r7, #0]
8011d3c: 6878 ldr r0, [r7, #4]
8011d3e: f7ff ffa1 bl 8011c84 <pbuf_cat>
/* t is now referenced by h */
pbuf_ref(t);
8011d42: 6838 ldr r0, [r7, #0]
8011d44: f7ff ff76 bl 8011c34 <pbuf_ref>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t));
}
8011d48: bf00 nop
8011d4a: 3708 adds r7, #8
8011d4c: 46bd mov sp, r7
8011d4e: bd80 pop {r7, pc}
08011d50 <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)
{
8011d50: b580 push {r7, lr}
8011d52: b086 sub sp, #24
8011d54: af00 add r7, sp, #0
8011d56: 6078 str r0, [r7, #4]
8011d58: 6039 str r1, [r7, #0]
size_t offset_to = 0, offset_from = 0, len;
8011d5a: 2300 movs r3, #0
8011d5c: 617b str r3, [r7, #20]
8011d5e: 2300 movs r3, #0
8011d60: 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) &&
8011d62: 687b ldr r3, [r7, #4]
8011d64: 2b00 cmp r3, #0
8011d66: d008 beq.n 8011d7a <pbuf_copy+0x2a>
8011d68: 683b ldr r3, [r7, #0]
8011d6a: 2b00 cmp r3, #0
8011d6c: d005 beq.n 8011d7a <pbuf_copy+0x2a>
8011d6e: 687b ldr r3, [r7, #4]
8011d70: 891a ldrh r2, [r3, #8]
8011d72: 683b ldr r3, [r7, #0]
8011d74: 891b ldrh r3, [r3, #8]
8011d76: 429a cmp r2, r3
8011d78: d209 bcs.n 8011d8e <pbuf_copy+0x3e>
8011d7a: 4b57 ldr r3, [pc, #348] ; (8011ed8 <pbuf_copy+0x188>)
8011d7c: f240 32ca movw r2, #970 ; 0x3ca
8011d80: 4956 ldr r1, [pc, #344] ; (8011edc <pbuf_copy+0x18c>)
8011d82: 4857 ldr r0, [pc, #348] ; (8011ee0 <pbuf_copy+0x190>)
8011d84: f00a fbe0 bl 801c548 <iprintf>
8011d88: f06f 030f mvn.w r3, #15
8011d8c: e09f b.n 8011ece <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)) {
8011d8e: 687b ldr r3, [r7, #4]
8011d90: 895b ldrh r3, [r3, #10]
8011d92: 461a mov r2, r3
8011d94: 697b ldr r3, [r7, #20]
8011d96: 1ad2 subs r2, r2, r3
8011d98: 683b ldr r3, [r7, #0]
8011d9a: 895b ldrh r3, [r3, #10]
8011d9c: 4619 mov r1, r3
8011d9e: 693b ldr r3, [r7, #16]
8011da0: 1acb subs r3, r1, r3
8011da2: 429a cmp r2, r3
8011da4: d306 bcc.n 8011db4 <pbuf_copy+0x64>
/* complete current p_from fits into current p_to */
len = p_from->len - offset_from;
8011da6: 683b ldr r3, [r7, #0]
8011da8: 895b ldrh r3, [r3, #10]
8011daa: 461a mov r2, r3
8011dac: 693b ldr r3, [r7, #16]
8011dae: 1ad3 subs r3, r2, r3
8011db0: 60fb str r3, [r7, #12]
8011db2: e005 b.n 8011dc0 <pbuf_copy+0x70>
} else {
/* current p_from does not fit into current p_to */
len = p_to->len - offset_to;
8011db4: 687b ldr r3, [r7, #4]
8011db6: 895b ldrh r3, [r3, #10]
8011db8: 461a mov r2, r3
8011dba: 697b ldr r3, [r7, #20]
8011dbc: 1ad3 subs r3, r2, r3
8011dbe: 60fb str r3, [r7, #12]
}
MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
8011dc0: 687b ldr r3, [r7, #4]
8011dc2: 685a ldr r2, [r3, #4]
8011dc4: 697b ldr r3, [r7, #20]
8011dc6: 18d0 adds r0, r2, r3
8011dc8: 683b ldr r3, [r7, #0]
8011dca: 685a ldr r2, [r3, #4]
8011dcc: 693b ldr r3, [r7, #16]
8011dce: 4413 add r3, r2
8011dd0: 68fa ldr r2, [r7, #12]
8011dd2: 4619 mov r1, r3
8011dd4: f00a fb8b bl 801c4ee <memcpy>
offset_to += len;
8011dd8: 697a ldr r2, [r7, #20]
8011dda: 68fb ldr r3, [r7, #12]
8011ddc: 4413 add r3, r2
8011dde: 617b str r3, [r7, #20]
offset_from += len;
8011de0: 693a ldr r2, [r7, #16]
8011de2: 68fb ldr r3, [r7, #12]
8011de4: 4413 add r3, r2
8011de6: 613b str r3, [r7, #16]
LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
8011de8: 687b ldr r3, [r7, #4]
8011dea: 895b ldrh r3, [r3, #10]
8011dec: 461a mov r2, r3
8011dee: 697b ldr r3, [r7, #20]
8011df0: 4293 cmp r3, r2
8011df2: d906 bls.n 8011e02 <pbuf_copy+0xb2>
8011df4: 4b38 ldr r3, [pc, #224] ; (8011ed8 <pbuf_copy+0x188>)
8011df6: f240 32d9 movw r2, #985 ; 0x3d9
8011dfa: 493a ldr r1, [pc, #232] ; (8011ee4 <pbuf_copy+0x194>)
8011dfc: 4838 ldr r0, [pc, #224] ; (8011ee0 <pbuf_copy+0x190>)
8011dfe: f00a fba3 bl 801c548 <iprintf>
LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
8011e02: 683b ldr r3, [r7, #0]
8011e04: 895b ldrh r3, [r3, #10]
8011e06: 461a mov r2, r3
8011e08: 693b ldr r3, [r7, #16]
8011e0a: 4293 cmp r3, r2
8011e0c: d906 bls.n 8011e1c <pbuf_copy+0xcc>
8011e0e: 4b32 ldr r3, [pc, #200] ; (8011ed8 <pbuf_copy+0x188>)
8011e10: f240 32da movw r2, #986 ; 0x3da
8011e14: 4934 ldr r1, [pc, #208] ; (8011ee8 <pbuf_copy+0x198>)
8011e16: 4832 ldr r0, [pc, #200] ; (8011ee0 <pbuf_copy+0x190>)
8011e18: f00a fb96 bl 801c548 <iprintf>
if (offset_from >= p_from->len) {
8011e1c: 683b ldr r3, [r7, #0]
8011e1e: 895b ldrh r3, [r3, #10]
8011e20: 461a mov r2, r3
8011e22: 693b ldr r3, [r7, #16]
8011e24: 4293 cmp r3, r2
8011e26: d304 bcc.n 8011e32 <pbuf_copy+0xe2>
/* on to next p_from (if any) */
offset_from = 0;
8011e28: 2300 movs r3, #0
8011e2a: 613b str r3, [r7, #16]
p_from = p_from->next;
8011e2c: 683b ldr r3, [r7, #0]
8011e2e: 681b ldr r3, [r3, #0]
8011e30: 603b str r3, [r7, #0]
}
if (offset_to == p_to->len) {
8011e32: 687b ldr r3, [r7, #4]
8011e34: 895b ldrh r3, [r3, #10]
8011e36: 461a mov r2, r3
8011e38: 697b ldr r3, [r7, #20]
8011e3a: 4293 cmp r3, r2
8011e3c: d114 bne.n 8011e68 <pbuf_copy+0x118>
/* on to next p_to (if any) */
offset_to = 0;
8011e3e: 2300 movs r3, #0
8011e40: 617b str r3, [r7, #20]
p_to = p_to->next;
8011e42: 687b ldr r3, [r7, #4]
8011e44: 681b ldr r3, [r3, #0]
8011e46: 607b str r3, [r7, #4]
LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
8011e48: 687b ldr r3, [r7, #4]
8011e4a: 2b00 cmp r3, #0
8011e4c: d10c bne.n 8011e68 <pbuf_copy+0x118>
8011e4e: 683b ldr r3, [r7, #0]
8011e50: 2b00 cmp r3, #0
8011e52: d009 beq.n 8011e68 <pbuf_copy+0x118>
8011e54: 4b20 ldr r3, [pc, #128] ; (8011ed8 <pbuf_copy+0x188>)
8011e56: f44f 7279 mov.w r2, #996 ; 0x3e4
8011e5a: 4924 ldr r1, [pc, #144] ; (8011eec <pbuf_copy+0x19c>)
8011e5c: 4820 ldr r0, [pc, #128] ; (8011ee0 <pbuf_copy+0x190>)
8011e5e: f00a fb73 bl 801c548 <iprintf>
8011e62: f06f 030f mvn.w r3, #15
8011e66: e032 b.n 8011ece <pbuf_copy+0x17e>
}
if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
8011e68: 683b ldr r3, [r7, #0]
8011e6a: 2b00 cmp r3, #0
8011e6c: d013 beq.n 8011e96 <pbuf_copy+0x146>
8011e6e: 683b ldr r3, [r7, #0]
8011e70: 895a ldrh r2, [r3, #10]
8011e72: 683b ldr r3, [r7, #0]
8011e74: 891b ldrh r3, [r3, #8]
8011e76: 429a cmp r2, r3
8011e78: d10d bne.n 8011e96 <pbuf_copy+0x146>
/* don't copy more than one packet! */
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
8011e7a: 683b ldr r3, [r7, #0]
8011e7c: 681b ldr r3, [r3, #0]
8011e7e: 2b00 cmp r3, #0
8011e80: d009 beq.n 8011e96 <pbuf_copy+0x146>
8011e82: 4b15 ldr r3, [pc, #84] ; (8011ed8 <pbuf_copy+0x188>)
8011e84: f240 32ea movw r2, #1002 ; 0x3ea
8011e88: 4919 ldr r1, [pc, #100] ; (8011ef0 <pbuf_copy+0x1a0>)
8011e8a: 4815 ldr r0, [pc, #84] ; (8011ee0 <pbuf_copy+0x190>)
8011e8c: f00a fb5c bl 801c548 <iprintf>
8011e90: f06f 0305 mvn.w r3, #5
8011e94: e01b b.n 8011ece <pbuf_copy+0x17e>
(p_from->next == NULL), return ERR_VAL;);
}
if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
8011e96: 687b ldr r3, [r7, #4]
8011e98: 2b00 cmp r3, #0
8011e9a: d013 beq.n 8011ec4 <pbuf_copy+0x174>
8011e9c: 687b ldr r3, [r7, #4]
8011e9e: 895a ldrh r2, [r3, #10]
8011ea0: 687b ldr r3, [r7, #4]
8011ea2: 891b ldrh r3, [r3, #8]
8011ea4: 429a cmp r2, r3
8011ea6: d10d bne.n 8011ec4 <pbuf_copy+0x174>
/* don't copy more than one packet! */
LWIP_ERROR("pbuf_copy() does not allow packet queues!",
8011ea8: 687b ldr r3, [r7, #4]
8011eaa: 681b ldr r3, [r3, #0]
8011eac: 2b00 cmp r3, #0
8011eae: d009 beq.n 8011ec4 <pbuf_copy+0x174>
8011eb0: 4b09 ldr r3, [pc, #36] ; (8011ed8 <pbuf_copy+0x188>)
8011eb2: f240 32ef movw r2, #1007 ; 0x3ef
8011eb6: 490e ldr r1, [pc, #56] ; (8011ef0 <pbuf_copy+0x1a0>)
8011eb8: 4809 ldr r0, [pc, #36] ; (8011ee0 <pbuf_copy+0x190>)
8011eba: f00a fb45 bl 801c548 <iprintf>
8011ebe: f06f 0305 mvn.w r3, #5
8011ec2: e004 b.n 8011ece <pbuf_copy+0x17e>
(p_to->next == NULL), return ERR_VAL;);
}
} while (p_from);
8011ec4: 683b ldr r3, [r7, #0]
8011ec6: 2b00 cmp r3, #0
8011ec8: f47f af61 bne.w 8011d8e <pbuf_copy+0x3e>
LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n"));
return ERR_OK;
8011ecc: 2300 movs r3, #0
}
8011ece: 4618 mov r0, r3
8011ed0: 3718 adds r7, #24
8011ed2: 46bd mov sp, r7
8011ed4: bd80 pop {r7, pc}
8011ed6: bf00 nop
8011ed8: 0801dec8 .word 0x0801dec8
8011edc: 0801e170 .word 0x0801e170
8011ee0: 0801df28 .word 0x0801df28
8011ee4: 0801e1a0 .word 0x0801e1a0
8011ee8: 0801e1b8 .word 0x0801e1b8
8011eec: 0801e1d4 .word 0x0801e1d4
8011ef0: 0801e1e4 .word 0x0801e1e4
08011ef4 <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)
{
8011ef4: b580 push {r7, lr}
8011ef6: b088 sub sp, #32
8011ef8: af00 add r7, sp, #0
8011efa: 60f8 str r0, [r7, #12]
8011efc: 60b9 str r1, [r7, #8]
8011efe: 4611 mov r1, r2
8011f00: 461a mov r2, r3
8011f02: 460b mov r3, r1
8011f04: 80fb strh r3, [r7, #6]
8011f06: 4613 mov r3, r2
8011f08: 80bb strh r3, [r7, #4]
const struct pbuf *p;
u16_t left = 0;
8011f0a: 2300 movs r3, #0
8011f0c: 837b strh r3, [r7, #26]
u16_t buf_copy_len;
u16_t copied_total = 0;
8011f0e: 2300 movs r3, #0
8011f10: 82fb strh r3, [r7, #22]
LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
8011f12: 68fb ldr r3, [r7, #12]
8011f14: 2b00 cmp r3, #0
8011f16: d108 bne.n 8011f2a <pbuf_copy_partial+0x36>
8011f18: 4b2b ldr r3, [pc, #172] ; (8011fc8 <pbuf_copy_partial+0xd4>)
8011f1a: f240 420a movw r2, #1034 ; 0x40a
8011f1e: 492b ldr r1, [pc, #172] ; (8011fcc <pbuf_copy_partial+0xd8>)
8011f20: 482b ldr r0, [pc, #172] ; (8011fd0 <pbuf_copy_partial+0xdc>)
8011f22: f00a fb11 bl 801c548 <iprintf>
8011f26: 2300 movs r3, #0
8011f28: e04a b.n 8011fc0 <pbuf_copy_partial+0xcc>
LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
8011f2a: 68bb ldr r3, [r7, #8]
8011f2c: 2b00 cmp r3, #0
8011f2e: d108 bne.n 8011f42 <pbuf_copy_partial+0x4e>
8011f30: 4b25 ldr r3, [pc, #148] ; (8011fc8 <pbuf_copy_partial+0xd4>)
8011f32: f240 420b movw r2, #1035 ; 0x40b
8011f36: 4927 ldr r1, [pc, #156] ; (8011fd4 <pbuf_copy_partial+0xe0>)
8011f38: 4825 ldr r0, [pc, #148] ; (8011fd0 <pbuf_copy_partial+0xdc>)
8011f3a: f00a fb05 bl 801c548 <iprintf>
8011f3e: 2300 movs r3, #0
8011f40: e03e b.n 8011fc0 <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) {
8011f42: 68fb ldr r3, [r7, #12]
8011f44: 61fb str r3, [r7, #28]
8011f46: e034 b.n 8011fb2 <pbuf_copy_partial+0xbe>
if ((offset != 0) && (offset >= p->len)) {
8011f48: 88bb ldrh r3, [r7, #4]
8011f4a: 2b00 cmp r3, #0
8011f4c: d00a beq.n 8011f64 <pbuf_copy_partial+0x70>
8011f4e: 69fb ldr r3, [r7, #28]
8011f50: 895b ldrh r3, [r3, #10]
8011f52: 88ba ldrh r2, [r7, #4]
8011f54: 429a cmp r2, r3
8011f56: d305 bcc.n 8011f64 <pbuf_copy_partial+0x70>
/* don't copy from this buffer -> on to the next */
offset = (u16_t)(offset - p->len);
8011f58: 69fb ldr r3, [r7, #28]
8011f5a: 895b ldrh r3, [r3, #10]
8011f5c: 88ba ldrh r2, [r7, #4]
8011f5e: 1ad3 subs r3, r2, r3
8011f60: 80bb strh r3, [r7, #4]
8011f62: e023 b.n 8011fac <pbuf_copy_partial+0xb8>
} else {
/* copy from this buffer. maybe only partially. */
buf_copy_len = (u16_t)(p->len - offset);
8011f64: 69fb ldr r3, [r7, #28]
8011f66: 895a ldrh r2, [r3, #10]
8011f68: 88bb ldrh r3, [r7, #4]
8011f6a: 1ad3 subs r3, r2, r3
8011f6c: 833b strh r3, [r7, #24]
if (buf_copy_len > len) {
8011f6e: 8b3a ldrh r2, [r7, #24]
8011f70: 88fb ldrh r3, [r7, #6]
8011f72: 429a cmp r2, r3
8011f74: d901 bls.n 8011f7a <pbuf_copy_partial+0x86>
buf_copy_len = len;
8011f76: 88fb ldrh r3, [r7, #6]
8011f78: 833b strh r3, [r7, #24]
}
/* copy the necessary parts of the buffer */
MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len);
8011f7a: 8b7b ldrh r3, [r7, #26]
8011f7c: 68ba ldr r2, [r7, #8]
8011f7e: 18d0 adds r0, r2, r3
8011f80: 69fb ldr r3, [r7, #28]
8011f82: 685a ldr r2, [r3, #4]
8011f84: 88bb ldrh r3, [r7, #4]
8011f86: 4413 add r3, r2
8011f88: 8b3a ldrh r2, [r7, #24]
8011f8a: 4619 mov r1, r3
8011f8c: f00a faaf bl 801c4ee <memcpy>
copied_total = (u16_t)(copied_total + buf_copy_len);
8011f90: 8afa ldrh r2, [r7, #22]
8011f92: 8b3b ldrh r3, [r7, #24]
8011f94: 4413 add r3, r2
8011f96: 82fb strh r3, [r7, #22]
left = (u16_t)(left + buf_copy_len);
8011f98: 8b7a ldrh r2, [r7, #26]
8011f9a: 8b3b ldrh r3, [r7, #24]
8011f9c: 4413 add r3, r2
8011f9e: 837b strh r3, [r7, #26]
len = (u16_t)(len - buf_copy_len);
8011fa0: 88fa ldrh r2, [r7, #6]
8011fa2: 8b3b ldrh r3, [r7, #24]
8011fa4: 1ad3 subs r3, r2, r3
8011fa6: 80fb strh r3, [r7, #6]
offset = 0;
8011fa8: 2300 movs r3, #0
8011faa: 80bb strh r3, [r7, #4]
for (p = buf; len != 0 && p != NULL; p = p->next) {
8011fac: 69fb ldr r3, [r7, #28]
8011fae: 681b ldr r3, [r3, #0]
8011fb0: 61fb str r3, [r7, #28]
8011fb2: 88fb ldrh r3, [r7, #6]
8011fb4: 2b00 cmp r3, #0
8011fb6: d002 beq.n 8011fbe <pbuf_copy_partial+0xca>
8011fb8: 69fb ldr r3, [r7, #28]
8011fba: 2b00 cmp r3, #0
8011fbc: d1c4 bne.n 8011f48 <pbuf_copy_partial+0x54>
}
}
return copied_total;
8011fbe: 8afb ldrh r3, [r7, #22]
}
8011fc0: 4618 mov r0, r3
8011fc2: 3720 adds r7, #32
8011fc4: 46bd mov sp, r7
8011fc6: bd80 pop {r7, pc}
8011fc8: 0801dec8 .word 0x0801dec8
8011fcc: 0801e210 .word 0x0801e210
8011fd0: 0801df28 .word 0x0801df28
8011fd4: 0801e230 .word 0x0801e230
08011fd8 <pbuf_clone>:
*
* @return a new pbuf or NULL if allocation fails
*/
struct pbuf *
pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p)
{
8011fd8: b580 push {r7, lr}
8011fda: b084 sub sp, #16
8011fdc: af00 add r7, sp, #0
8011fde: 4603 mov r3, r0
8011fe0: 603a str r2, [r7, #0]
8011fe2: 71fb strb r3, [r7, #7]
8011fe4: 460b mov r3, r1
8011fe6: 80bb strh r3, [r7, #4]
struct pbuf *q;
err_t err;
q = pbuf_alloc(layer, p->tot_len, type);
8011fe8: 683b ldr r3, [r7, #0]
8011fea: 8919 ldrh r1, [r3, #8]
8011fec: 88ba ldrh r2, [r7, #4]
8011fee: 79fb ldrb r3, [r7, #7]
8011ff0: 4618 mov r0, r3
8011ff2: f7ff fa99 bl 8011528 <pbuf_alloc>
8011ff6: 60f8 str r0, [r7, #12]
if (q == NULL) {
8011ff8: 68fb ldr r3, [r7, #12]
8011ffa: 2b00 cmp r3, #0
8011ffc: d101 bne.n 8012002 <pbuf_clone+0x2a>
return NULL;
8011ffe: 2300 movs r3, #0
8012000: e011 b.n 8012026 <pbuf_clone+0x4e>
}
err = pbuf_copy(q, p);
8012002: 6839 ldr r1, [r7, #0]
8012004: 68f8 ldr r0, [r7, #12]
8012006: f7ff fea3 bl 8011d50 <pbuf_copy>
801200a: 4603 mov r3, r0
801200c: 72fb strb r3, [r7, #11]
LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */
LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
801200e: f997 300b ldrsb.w r3, [r7, #11]
8012012: 2b00 cmp r3, #0
8012014: d006 beq.n 8012024 <pbuf_clone+0x4c>
8012016: 4b06 ldr r3, [pc, #24] ; (8012030 <pbuf_clone+0x58>)
8012018: f240 5224 movw r2, #1316 ; 0x524
801201c: 4905 ldr r1, [pc, #20] ; (8012034 <pbuf_clone+0x5c>)
801201e: 4806 ldr r0, [pc, #24] ; (8012038 <pbuf_clone+0x60>)
8012020: f00a fa92 bl 801c548 <iprintf>
return q;
8012024: 68fb ldr r3, [r7, #12]
}
8012026: 4618 mov r0, r3
8012028: 3710 adds r7, #16
801202a: 46bd mov sp, r7
801202c: bd80 pop {r7, pc}
801202e: bf00 nop
8012030: 0801dec8 .word 0x0801dec8
8012034: 0801e33c .word 0x0801e33c
8012038: 0801df28 .word 0x0801df28
0801203c <tcp_init>:
/**
* Initialize this module.
*/
void
tcp_init(void)
{
801203c: b580 push {r7, lr}
801203e: af00 add r7, sp, #0
#ifdef LWIP_RAND
tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
8012040: f00a fa9a bl 801c578 <rand>
8012044: 4603 mov r3, r0
8012046: b29b uxth r3, r3
8012048: f3c3 030d ubfx r3, r3, #0, #14
801204c: b29b uxth r3, r3
801204e: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
8012052: b29a uxth r2, r3
8012054: 4b01 ldr r3, [pc, #4] ; (801205c <tcp_init+0x20>)
8012056: 801a strh r2, [r3, #0]
#endif /* LWIP_RAND */
}
8012058: bf00 nop
801205a: bd80 pop {r7, pc}
801205c: 20000060 .word 0x20000060
08012060 <tcp_free>:
/** Free a tcp pcb */
void
tcp_free(struct tcp_pcb *pcb)
{
8012060: b580 push {r7, lr}
8012062: b082 sub sp, #8
8012064: af00 add r7, sp, #0
8012066: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
8012068: 687b ldr r3, [r7, #4]
801206a: 7d1b ldrb r3, [r3, #20]
801206c: 2b01 cmp r3, #1
801206e: d105 bne.n 801207c <tcp_free+0x1c>
8012070: 4b06 ldr r3, [pc, #24] ; (801208c <tcp_free+0x2c>)
8012072: 22d4 movs r2, #212 ; 0xd4
8012074: 4906 ldr r1, [pc, #24] ; (8012090 <tcp_free+0x30>)
8012076: 4807 ldr r0, [pc, #28] ; (8012094 <tcp_free+0x34>)
8012078: f00a fa66 bl 801c548 <iprintf>
#if LWIP_TCP_PCB_NUM_EXT_ARGS
tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args);
#endif
memp_free(MEMP_TCP_PCB, pcb);
801207c: 6879 ldr r1, [r7, #4]
801207e: 2001 movs r0, #1
8012080: f7fe fe86 bl 8010d90 <memp_free>
}
8012084: bf00 nop
8012086: 3708 adds r7, #8
8012088: 46bd mov sp, r7
801208a: bd80 pop {r7, pc}
801208c: 0801e3c8 .word 0x0801e3c8
8012090: 0801e3f8 .word 0x0801e3f8
8012094: 0801e40c .word 0x0801e40c
08012098 <tcp_free_listen>:
/** Free a tcp listen pcb */
static void
tcp_free_listen(struct tcp_pcb *pcb)
{
8012098: b580 push {r7, lr}
801209a: b082 sub sp, #8
801209c: af00 add r7, sp, #0
801209e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
80120a0: 687b ldr r3, [r7, #4]
80120a2: 7d1b ldrb r3, [r3, #20]
80120a4: 2b01 cmp r3, #1
80120a6: d105 bne.n 80120b4 <tcp_free_listen+0x1c>
80120a8: 4b06 ldr r3, [pc, #24] ; (80120c4 <tcp_free_listen+0x2c>)
80120aa: 22df movs r2, #223 ; 0xdf
80120ac: 4906 ldr r1, [pc, #24] ; (80120c8 <tcp_free_listen+0x30>)
80120ae: 4807 ldr r0, [pc, #28] ; (80120cc <tcp_free_listen+0x34>)
80120b0: f00a fa4a bl 801c548 <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);
80120b4: 6879 ldr r1, [r7, #4]
80120b6: 2002 movs r0, #2
80120b8: f7fe fe6a bl 8010d90 <memp_free>
}
80120bc: bf00 nop
80120be: 3708 adds r7, #8
80120c0: 46bd mov sp, r7
80120c2: bd80 pop {r7, pc}
80120c4: 0801e3c8 .word 0x0801e3c8
80120c8: 0801e434 .word 0x0801e434
80120cc: 0801e40c .word 0x0801e40c
080120d0 <tcp_tmr>:
/**
* Called periodically to dispatch TCP timers.
*/
void
tcp_tmr(void)
{
80120d0: b580 push {r7, lr}
80120d2: af00 add r7, sp, #0
/* Call tcp_fasttmr() every 250 ms */
tcp_fasttmr();
80120d4: f000 fe98 bl 8012e08 <tcp_fasttmr>
if (++tcp_timer & 1) {
80120d8: 4b07 ldr r3, [pc, #28] ; (80120f8 <tcp_tmr+0x28>)
80120da: 781b ldrb r3, [r3, #0]
80120dc: 3301 adds r3, #1
80120de: b2da uxtb r2, r3
80120e0: 4b05 ldr r3, [pc, #20] ; (80120f8 <tcp_tmr+0x28>)
80120e2: 701a strb r2, [r3, #0]
80120e4: 4b04 ldr r3, [pc, #16] ; (80120f8 <tcp_tmr+0x28>)
80120e6: 781b ldrb r3, [r3, #0]
80120e8: f003 0301 and.w r3, r3, #1
80120ec: 2b00 cmp r3, #0
80120ee: d001 beq.n 80120f4 <tcp_tmr+0x24>
/* Call tcp_slowtmr() every 500 ms, i.e., every other timer
tcp_tmr() is called. */
tcp_slowtmr();
80120f0: f000 fb4c bl 801278c <tcp_slowtmr>
}
}
80120f4: bf00 nop
80120f6: bd80 pop {r7, pc}
80120f8: 20008715 .word 0x20008715
080120fc <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)
{
80120fc: b580 push {r7, lr}
80120fe: b084 sub sp, #16
8012100: af00 add r7, sp, #0
8012102: 6078 str r0, [r7, #4]
8012104: 6039 str r1, [r7, #0]
struct tcp_pcb *pcb;
LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL);
8012106: 683b ldr r3, [r7, #0]
8012108: 2b00 cmp r3, #0
801210a: d105 bne.n 8012118 <tcp_remove_listener+0x1c>
801210c: 4b0d ldr r3, [pc, #52] ; (8012144 <tcp_remove_listener+0x48>)
801210e: 22ff movs r2, #255 ; 0xff
8012110: 490d ldr r1, [pc, #52] ; (8012148 <tcp_remove_listener+0x4c>)
8012112: 480e ldr r0, [pc, #56] ; (801214c <tcp_remove_listener+0x50>)
8012114: f00a fa18 bl 801c548 <iprintf>
for (pcb = list; pcb != NULL; pcb = pcb->next) {
8012118: 687b ldr r3, [r7, #4]
801211a: 60fb str r3, [r7, #12]
801211c: e00a b.n 8012134 <tcp_remove_listener+0x38>
if (pcb->listener == lpcb) {
801211e: 68fb ldr r3, [r7, #12]
8012120: 6fdb ldr r3, [r3, #124] ; 0x7c
8012122: 683a ldr r2, [r7, #0]
8012124: 429a cmp r2, r3
8012126: d102 bne.n 801212e <tcp_remove_listener+0x32>
pcb->listener = NULL;
8012128: 68fb ldr r3, [r7, #12]
801212a: 2200 movs r2, #0
801212c: 67da str r2, [r3, #124] ; 0x7c
for (pcb = list; pcb != NULL; pcb = pcb->next) {
801212e: 68fb ldr r3, [r7, #12]
8012130: 68db ldr r3, [r3, #12]
8012132: 60fb str r3, [r7, #12]
8012134: 68fb ldr r3, [r7, #12]
8012136: 2b00 cmp r3, #0
8012138: d1f1 bne.n 801211e <tcp_remove_listener+0x22>
}
}
}
801213a: bf00 nop
801213c: 3710 adds r7, #16
801213e: 46bd mov sp, r7
8012140: bd80 pop {r7, pc}
8012142: bf00 nop
8012144: 0801e3c8 .word 0x0801e3c8
8012148: 0801e450 .word 0x0801e450
801214c: 0801e40c .word 0x0801e40c
08012150 <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)
{
8012150: b580 push {r7, lr}
8012152: b084 sub sp, #16
8012154: af00 add r7, sp, #0
8012156: 6078 str r0, [r7, #4]
#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG
size_t i;
LWIP_ASSERT("pcb != NULL", pcb != NULL);
8012158: 687b ldr r3, [r7, #4]
801215a: 2b00 cmp r3, #0
801215c: d106 bne.n 801216c <tcp_listen_closed+0x1c>
801215e: 4b14 ldr r3, [pc, #80] ; (80121b0 <tcp_listen_closed+0x60>)
8012160: f240 1211 movw r2, #273 ; 0x111
8012164: 4913 ldr r1, [pc, #76] ; (80121b4 <tcp_listen_closed+0x64>)
8012166: 4814 ldr r0, [pc, #80] ; (80121b8 <tcp_listen_closed+0x68>)
8012168: f00a f9ee bl 801c548 <iprintf>
LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
801216c: 687b ldr r3, [r7, #4]
801216e: 7d1b ldrb r3, [r3, #20]
8012170: 2b01 cmp r3, #1
8012172: d006 beq.n 8012182 <tcp_listen_closed+0x32>
8012174: 4b0e ldr r3, [pc, #56] ; (80121b0 <tcp_listen_closed+0x60>)
8012176: f44f 7289 mov.w r2, #274 ; 0x112
801217a: 4910 ldr r1, [pc, #64] ; (80121bc <tcp_listen_closed+0x6c>)
801217c: 480e ldr r0, [pc, #56] ; (80121b8 <tcp_listen_closed+0x68>)
801217e: f00a f9e3 bl 801c548 <iprintf>
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
8012182: 2301 movs r3, #1
8012184: 60fb str r3, [r7, #12]
8012186: e00b b.n 80121a0 <tcp_listen_closed+0x50>
tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb);
8012188: 4a0d ldr r2, [pc, #52] ; (80121c0 <tcp_listen_closed+0x70>)
801218a: 68fb ldr r3, [r7, #12]
801218c: f852 3023 ldr.w r3, [r2, r3, lsl #2]
8012190: 681b ldr r3, [r3, #0]
8012192: 6879 ldr r1, [r7, #4]
8012194: 4618 mov r0, r3
8012196: f7ff ffb1 bl 80120fc <tcp_remove_listener>
for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
801219a: 68fb ldr r3, [r7, #12]
801219c: 3301 adds r3, #1
801219e: 60fb str r3, [r7, #12]
80121a0: 68fb ldr r3, [r7, #12]
80121a2: 2b03 cmp r3, #3
80121a4: d9f0 bls.n 8012188 <tcp_listen_closed+0x38>
}
#endif
LWIP_UNUSED_ARG(pcb);
}
80121a6: bf00 nop
80121a8: 3710 adds r7, #16
80121aa: 46bd mov sp, r7
80121ac: bd80 pop {r7, pc}
80121ae: bf00 nop
80121b0: 0801e3c8 .word 0x0801e3c8
80121b4: 0801e478 .word 0x0801e478
80121b8: 0801e40c .word 0x0801e40c
80121bc: 0801e484 .word 0x0801e484
80121c0: 080226b0 .word 0x080226b0
080121c4 <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)
{
80121c4: b5b0 push {r4, r5, r7, lr}
80121c6: b088 sub sp, #32
80121c8: af04 add r7, sp, #16
80121ca: 6078 str r0, [r7, #4]
80121cc: 460b mov r3, r1
80121ce: 70fb strb r3, [r7, #3]
LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
80121d0: 687b ldr r3, [r7, #4]
80121d2: 2b00 cmp r3, #0
80121d4: d106 bne.n 80121e4 <tcp_close_shutdown+0x20>
80121d6: 4b61 ldr r3, [pc, #388] ; (801235c <tcp_close_shutdown+0x198>)
80121d8: f44f 72af mov.w r2, #350 ; 0x15e
80121dc: 4960 ldr r1, [pc, #384] ; (8012360 <tcp_close_shutdown+0x19c>)
80121de: 4861 ldr r0, [pc, #388] ; (8012364 <tcp_close_shutdown+0x1a0>)
80121e0: f00a f9b2 bl 801c548 <iprintf>
if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) {
80121e4: 78fb ldrb r3, [r7, #3]
80121e6: 2b00 cmp r3, #0
80121e8: d066 beq.n 80122b8 <tcp_close_shutdown+0xf4>
80121ea: 687b ldr r3, [r7, #4]
80121ec: 7d1b ldrb r3, [r3, #20]
80121ee: 2b04 cmp r3, #4
80121f0: d003 beq.n 80121fa <tcp_close_shutdown+0x36>
80121f2: 687b ldr r3, [r7, #4]
80121f4: 7d1b ldrb r3, [r3, #20]
80121f6: 2b07 cmp r3, #7
80121f8: d15e bne.n 80122b8 <tcp_close_shutdown+0xf4>
if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
80121fa: 687b ldr r3, [r7, #4]
80121fc: 6f9b ldr r3, [r3, #120] ; 0x78
80121fe: 2b00 cmp r3, #0
8012200: d104 bne.n 801220c <tcp_close_shutdown+0x48>
8012202: 687b ldr r3, [r7, #4]
8012204: 8d1b ldrh r3, [r3, #40] ; 0x28
8012206: f5b3 6f06 cmp.w r3, #2144 ; 0x860
801220a: d055 beq.n 80122b8 <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);
801220c: 687b ldr r3, [r7, #4]
801220e: 8b5b ldrh r3, [r3, #26]
8012210: f003 0310 and.w r3, r3, #16
8012214: 2b00 cmp r3, #0
8012216: d106 bne.n 8012226 <tcp_close_shutdown+0x62>
8012218: 4b50 ldr r3, [pc, #320] ; (801235c <tcp_close_shutdown+0x198>)
801221a: f44f 72b2 mov.w r2, #356 ; 0x164
801221e: 4952 ldr r1, [pc, #328] ; (8012368 <tcp_close_shutdown+0x1a4>)
8012220: 4850 ldr r0, [pc, #320] ; (8012364 <tcp_close_shutdown+0x1a0>)
8012222: f00a f991 bl 801c548 <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,
8012226: 687b ldr r3, [r7, #4]
8012228: 6d18 ldr r0, [r3, #80] ; 0x50
801222a: 687b ldr r3, [r7, #4]
801222c: 6a5c ldr r4, [r3, #36] ; 0x24
801222e: 687d ldr r5, [r7, #4]
8012230: 687b ldr r3, [r7, #4]
8012232: 3304 adds r3, #4
8012234: 687a ldr r2, [r7, #4]
8012236: 8ad2 ldrh r2, [r2, #22]
8012238: 6879 ldr r1, [r7, #4]
801223a: 8b09 ldrh r1, [r1, #24]
801223c: 9102 str r1, [sp, #8]
801223e: 9201 str r2, [sp, #4]
8012240: 9300 str r3, [sp, #0]
8012242: 462b mov r3, r5
8012244: 4622 mov r2, r4
8012246: 4601 mov r1, r0
8012248: 6878 ldr r0, [r7, #4]
801224a: f004 fe91 bl 8016f70 <tcp_rst>
pcb->local_port, pcb->remote_port);
tcp_pcb_purge(pcb);
801224e: 6878 ldr r0, [r7, #4]
8012250: f001 f8ba bl 80133c8 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8012254: 4b45 ldr r3, [pc, #276] ; (801236c <tcp_close_shutdown+0x1a8>)
8012256: 681b ldr r3, [r3, #0]
8012258: 687a ldr r2, [r7, #4]
801225a: 429a cmp r2, r3
801225c: d105 bne.n 801226a <tcp_close_shutdown+0xa6>
801225e: 4b43 ldr r3, [pc, #268] ; (801236c <tcp_close_shutdown+0x1a8>)
8012260: 681b ldr r3, [r3, #0]
8012262: 68db ldr r3, [r3, #12]
8012264: 4a41 ldr r2, [pc, #260] ; (801236c <tcp_close_shutdown+0x1a8>)
8012266: 6013 str r3, [r2, #0]
8012268: e013 b.n 8012292 <tcp_close_shutdown+0xce>
801226a: 4b40 ldr r3, [pc, #256] ; (801236c <tcp_close_shutdown+0x1a8>)
801226c: 681b ldr r3, [r3, #0]
801226e: 60fb str r3, [r7, #12]
8012270: e00c b.n 801228c <tcp_close_shutdown+0xc8>
8012272: 68fb ldr r3, [r7, #12]
8012274: 68db ldr r3, [r3, #12]
8012276: 687a ldr r2, [r7, #4]
8012278: 429a cmp r2, r3
801227a: d104 bne.n 8012286 <tcp_close_shutdown+0xc2>
801227c: 687b ldr r3, [r7, #4]
801227e: 68da ldr r2, [r3, #12]
8012280: 68fb ldr r3, [r7, #12]
8012282: 60da str r2, [r3, #12]
8012284: e005 b.n 8012292 <tcp_close_shutdown+0xce>
8012286: 68fb ldr r3, [r7, #12]
8012288: 68db ldr r3, [r3, #12]
801228a: 60fb str r3, [r7, #12]
801228c: 68fb ldr r3, [r7, #12]
801228e: 2b00 cmp r3, #0
8012290: d1ef bne.n 8012272 <tcp_close_shutdown+0xae>
8012292: 687b ldr r3, [r7, #4]
8012294: 2200 movs r2, #0
8012296: 60da str r2, [r3, #12]
8012298: 4b35 ldr r3, [pc, #212] ; (8012370 <tcp_close_shutdown+0x1ac>)
801229a: 2201 movs r2, #1
801229c: 701a strb r2, [r3, #0]
/* Deallocate the pcb since we already sent a RST for it */
if (tcp_input_pcb == pcb) {
801229e: 4b35 ldr r3, [pc, #212] ; (8012374 <tcp_close_shutdown+0x1b0>)
80122a0: 681b ldr r3, [r3, #0]
80122a2: 687a ldr r2, [r7, #4]
80122a4: 429a cmp r2, r3
80122a6: d102 bne.n 80122ae <tcp_close_shutdown+0xea>
/* prevent using a deallocated pcb: free it from tcp_input later */
tcp_trigger_input_pcb_close();
80122a8: f003 fd4c bl 8015d44 <tcp_trigger_input_pcb_close>
80122ac: e002 b.n 80122b4 <tcp_close_shutdown+0xf0>
} else {
tcp_free(pcb);
80122ae: 6878 ldr r0, [r7, #4]
80122b0: f7ff fed6 bl 8012060 <tcp_free>
}
return ERR_OK;
80122b4: 2300 movs r3, #0
80122b6: e04d b.n 8012354 <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) {
80122b8: 687b ldr r3, [r7, #4]
80122ba: 7d1b ldrb r3, [r3, #20]
80122bc: 2b01 cmp r3, #1
80122be: d02d beq.n 801231c <tcp_close_shutdown+0x158>
80122c0: 2b02 cmp r3, #2
80122c2: d036 beq.n 8012332 <tcp_close_shutdown+0x16e>
80122c4: 2b00 cmp r3, #0
80122c6: d13f bne.n 8012348 <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) {
80122c8: 687b ldr r3, [r7, #4]
80122ca: 8adb ldrh r3, [r3, #22]
80122cc: 2b00 cmp r3, #0
80122ce: d021 beq.n 8012314 <tcp_close_shutdown+0x150>
TCP_RMV(&tcp_bound_pcbs, pcb);
80122d0: 4b29 ldr r3, [pc, #164] ; (8012378 <tcp_close_shutdown+0x1b4>)
80122d2: 681b ldr r3, [r3, #0]
80122d4: 687a ldr r2, [r7, #4]
80122d6: 429a cmp r2, r3
80122d8: d105 bne.n 80122e6 <tcp_close_shutdown+0x122>
80122da: 4b27 ldr r3, [pc, #156] ; (8012378 <tcp_close_shutdown+0x1b4>)
80122dc: 681b ldr r3, [r3, #0]
80122de: 68db ldr r3, [r3, #12]
80122e0: 4a25 ldr r2, [pc, #148] ; (8012378 <tcp_close_shutdown+0x1b4>)
80122e2: 6013 str r3, [r2, #0]
80122e4: e013 b.n 801230e <tcp_close_shutdown+0x14a>
80122e6: 4b24 ldr r3, [pc, #144] ; (8012378 <tcp_close_shutdown+0x1b4>)
80122e8: 681b ldr r3, [r3, #0]
80122ea: 60bb str r3, [r7, #8]
80122ec: e00c b.n 8012308 <tcp_close_shutdown+0x144>
80122ee: 68bb ldr r3, [r7, #8]
80122f0: 68db ldr r3, [r3, #12]
80122f2: 687a ldr r2, [r7, #4]
80122f4: 429a cmp r2, r3
80122f6: d104 bne.n 8012302 <tcp_close_shutdown+0x13e>
80122f8: 687b ldr r3, [r7, #4]
80122fa: 68da ldr r2, [r3, #12]
80122fc: 68bb ldr r3, [r7, #8]
80122fe: 60da str r2, [r3, #12]
8012300: e005 b.n 801230e <tcp_close_shutdown+0x14a>
8012302: 68bb ldr r3, [r7, #8]
8012304: 68db ldr r3, [r3, #12]
8012306: 60bb str r3, [r7, #8]
8012308: 68bb ldr r3, [r7, #8]
801230a: 2b00 cmp r3, #0
801230c: d1ef bne.n 80122ee <tcp_close_shutdown+0x12a>
801230e: 687b ldr r3, [r7, #4]
8012310: 2200 movs r2, #0
8012312: 60da str r2, [r3, #12]
}
tcp_free(pcb);
8012314: 6878 ldr r0, [r7, #4]
8012316: f7ff fea3 bl 8012060 <tcp_free>
break;
801231a: e01a b.n 8012352 <tcp_close_shutdown+0x18e>
case LISTEN:
tcp_listen_closed(pcb);
801231c: 6878 ldr r0, [r7, #4]
801231e: f7ff ff17 bl 8012150 <tcp_listen_closed>
tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
8012322: 6879 ldr r1, [r7, #4]
8012324: 4815 ldr r0, [pc, #84] ; (801237c <tcp_close_shutdown+0x1b8>)
8012326: f001 f89f bl 8013468 <tcp_pcb_remove>
tcp_free_listen(pcb);
801232a: 6878 ldr r0, [r7, #4]
801232c: f7ff feb4 bl 8012098 <tcp_free_listen>
break;
8012330: e00f b.n 8012352 <tcp_close_shutdown+0x18e>
case SYN_SENT:
TCP_PCB_REMOVE_ACTIVE(pcb);
8012332: 6879 ldr r1, [r7, #4]
8012334: 480d ldr r0, [pc, #52] ; (801236c <tcp_close_shutdown+0x1a8>)
8012336: f001 f897 bl 8013468 <tcp_pcb_remove>
801233a: 4b0d ldr r3, [pc, #52] ; (8012370 <tcp_close_shutdown+0x1ac>)
801233c: 2201 movs r2, #1
801233e: 701a strb r2, [r3, #0]
tcp_free(pcb);
8012340: 6878 ldr r0, [r7, #4]
8012342: f7ff fe8d bl 8012060 <tcp_free>
MIB2_STATS_INC(mib2.tcpattemptfails);
break;
8012346: e004 b.n 8012352 <tcp_close_shutdown+0x18e>
default:
return tcp_close_shutdown_fin(pcb);
8012348: 6878 ldr r0, [r7, #4]
801234a: f000 f819 bl 8012380 <tcp_close_shutdown_fin>
801234e: 4603 mov r3, r0
8012350: e000 b.n 8012354 <tcp_close_shutdown+0x190>
}
return ERR_OK;
8012352: 2300 movs r3, #0
}
8012354: 4618 mov r0, r3
8012356: 3710 adds r7, #16
8012358: 46bd mov sp, r7
801235a: bdb0 pop {r4, r5, r7, pc}
801235c: 0801e3c8 .word 0x0801e3c8
8012360: 0801e49c .word 0x0801e49c
8012364: 0801e40c .word 0x0801e40c
8012368: 0801e4bc .word 0x0801e4bc
801236c: 2000f7e8 .word 0x2000f7e8
8012370: 2000f7e4 .word 0x2000f7e4
8012374: 2000f7fc .word 0x2000f7fc
8012378: 2000f7f4 .word 0x2000f7f4
801237c: 2000f7f0 .word 0x2000f7f0
08012380 <tcp_close_shutdown_fin>:
static err_t
tcp_close_shutdown_fin(struct tcp_pcb *pcb)
{
8012380: b580 push {r7, lr}
8012382: b084 sub sp, #16
8012384: af00 add r7, sp, #0
8012386: 6078 str r0, [r7, #4]
err_t err;
LWIP_ASSERT("pcb != NULL", pcb != NULL);
8012388: 687b ldr r3, [r7, #4]
801238a: 2b00 cmp r3, #0
801238c: d106 bne.n 801239c <tcp_close_shutdown_fin+0x1c>
801238e: 4b2c ldr r3, [pc, #176] ; (8012440 <tcp_close_shutdown_fin+0xc0>)
8012390: f44f 72ce mov.w r2, #412 ; 0x19c
8012394: 492b ldr r1, [pc, #172] ; (8012444 <tcp_close_shutdown_fin+0xc4>)
8012396: 482c ldr r0, [pc, #176] ; (8012448 <tcp_close_shutdown_fin+0xc8>)
8012398: f00a f8d6 bl 801c548 <iprintf>
switch (pcb->state) {
801239c: 687b ldr r3, [r7, #4]
801239e: 7d1b ldrb r3, [r3, #20]
80123a0: 2b04 cmp r3, #4
80123a2: d010 beq.n 80123c6 <tcp_close_shutdown_fin+0x46>
80123a4: 2b07 cmp r3, #7
80123a6: d01b beq.n 80123e0 <tcp_close_shutdown_fin+0x60>
80123a8: 2b03 cmp r3, #3
80123aa: d126 bne.n 80123fa <tcp_close_shutdown_fin+0x7a>
case SYN_RCVD:
err = tcp_send_fin(pcb);
80123ac: 6878 ldr r0, [r7, #4]
80123ae: f003 fedb bl 8016168 <tcp_send_fin>
80123b2: 4603 mov r3, r0
80123b4: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
80123b6: f997 300f ldrsb.w r3, [r7, #15]
80123ba: 2b00 cmp r3, #0
80123bc: d11f bne.n 80123fe <tcp_close_shutdown_fin+0x7e>
tcp_backlog_accepted(pcb);
MIB2_STATS_INC(mib2.tcpattemptfails);
pcb->state = FIN_WAIT_1;
80123be: 687b ldr r3, [r7, #4]
80123c0: 2205 movs r2, #5
80123c2: 751a strb r2, [r3, #20]
}
break;
80123c4: e01b b.n 80123fe <tcp_close_shutdown_fin+0x7e>
case ESTABLISHED:
err = tcp_send_fin(pcb);
80123c6: 6878 ldr r0, [r7, #4]
80123c8: f003 fece bl 8016168 <tcp_send_fin>
80123cc: 4603 mov r3, r0
80123ce: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
80123d0: f997 300f ldrsb.w r3, [r7, #15]
80123d4: 2b00 cmp r3, #0
80123d6: d114 bne.n 8012402 <tcp_close_shutdown_fin+0x82>
MIB2_STATS_INC(mib2.tcpestabresets);
pcb->state = FIN_WAIT_1;
80123d8: 687b ldr r3, [r7, #4]
80123da: 2205 movs r2, #5
80123dc: 751a strb r2, [r3, #20]
}
break;
80123de: e010 b.n 8012402 <tcp_close_shutdown_fin+0x82>
case CLOSE_WAIT:
err = tcp_send_fin(pcb);
80123e0: 6878 ldr r0, [r7, #4]
80123e2: f003 fec1 bl 8016168 <tcp_send_fin>
80123e6: 4603 mov r3, r0
80123e8: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
80123ea: f997 300f ldrsb.w r3, [r7, #15]
80123ee: 2b00 cmp r3, #0
80123f0: d109 bne.n 8012406 <tcp_close_shutdown_fin+0x86>
MIB2_STATS_INC(mib2.tcpestabresets);
pcb->state = LAST_ACK;
80123f2: 687b ldr r3, [r7, #4]
80123f4: 2209 movs r2, #9
80123f6: 751a strb r2, [r3, #20]
}
break;
80123f8: e005 b.n 8012406 <tcp_close_shutdown_fin+0x86>
default:
/* Has already been closed, do nothing. */
return ERR_OK;
80123fa: 2300 movs r3, #0
80123fc: e01c b.n 8012438 <tcp_close_shutdown_fin+0xb8>
break;
80123fe: bf00 nop
8012400: e002 b.n 8012408 <tcp_close_shutdown_fin+0x88>
break;
8012402: bf00 nop
8012404: e000 b.n 8012408 <tcp_close_shutdown_fin+0x88>
break;
8012406: bf00 nop
}
if (err == ERR_OK) {
8012408: f997 300f ldrsb.w r3, [r7, #15]
801240c: 2b00 cmp r3, #0
801240e: d103 bne.n 8012418 <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);
8012410: 6878 ldr r0, [r7, #4]
8012412: f003 ffe7 bl 80163e4 <tcp_output>
8012416: e00d b.n 8012434 <tcp_close_shutdown_fin+0xb4>
} else if (err == ERR_MEM) {
8012418: f997 300f ldrsb.w r3, [r7, #15]
801241c: f1b3 3fff cmp.w r3, #4294967295
8012420: d108 bne.n 8012434 <tcp_close_shutdown_fin+0xb4>
/* Mark this pcb for closing. Closing is retried from tcp_tmr. */
tcp_set_flags(pcb, TF_CLOSEPEND);
8012422: 687b ldr r3, [r7, #4]
8012424: 8b5b ldrh r3, [r3, #26]
8012426: f043 0308 orr.w r3, r3, #8
801242a: b29a uxth r2, r3
801242c: 687b ldr r3, [r7, #4]
801242e: 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;
8012430: 2300 movs r3, #0
8012432: e001 b.n 8012438 <tcp_close_shutdown_fin+0xb8>
}
return err;
8012434: f997 300f ldrsb.w r3, [r7, #15]
}
8012438: 4618 mov r0, r3
801243a: 3710 adds r7, #16
801243c: 46bd mov sp, r7
801243e: bd80 pop {r7, pc}
8012440: 0801e3c8 .word 0x0801e3c8
8012444: 0801e478 .word 0x0801e478
8012448: 0801e40c .word 0x0801e40c
0801244c <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)
{
801244c: b580 push {r7, lr}
801244e: b082 sub sp, #8
8012450: af00 add r7, sp, #0
8012452: 6078 str r0, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
8012454: 687b ldr r3, [r7, #4]
8012456: 2b00 cmp r3, #0
8012458: d109 bne.n 801246e <tcp_close+0x22>
801245a: 4b0f ldr r3, [pc, #60] ; (8012498 <tcp_close+0x4c>)
801245c: f44f 72f4 mov.w r2, #488 ; 0x1e8
8012460: 490e ldr r1, [pc, #56] ; (801249c <tcp_close+0x50>)
8012462: 480f ldr r0, [pc, #60] ; (80124a0 <tcp_close+0x54>)
8012464: f00a f870 bl 801c548 <iprintf>
8012468: f06f 030f mvn.w r3, #15
801246c: e00f b.n 801248e <tcp_close+0x42>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in "));
tcp_debug_print_state(pcb->state);
if (pcb->state != LISTEN) {
801246e: 687b ldr r3, [r7, #4]
8012470: 7d1b ldrb r3, [r3, #20]
8012472: 2b01 cmp r3, #1
8012474: d006 beq.n 8012484 <tcp_close+0x38>
/* Set a flag not to receive any more data... */
tcp_set_flags(pcb, TF_RXCLOSED);
8012476: 687b ldr r3, [r7, #4]
8012478: 8b5b ldrh r3, [r3, #26]
801247a: f043 0310 orr.w r3, r3, #16
801247e: b29a uxth r2, r3
8012480: 687b ldr r3, [r7, #4]
8012482: 835a strh r2, [r3, #26]
}
/* ... and close */
return tcp_close_shutdown(pcb, 1);
8012484: 2101 movs r1, #1
8012486: 6878 ldr r0, [r7, #4]
8012488: f7ff fe9c bl 80121c4 <tcp_close_shutdown>
801248c: 4603 mov r3, r0
}
801248e: 4618 mov r0, r3
8012490: 3708 adds r7, #8
8012492: 46bd mov sp, r7
8012494: bd80 pop {r7, pc}
8012496: bf00 nop
8012498: 0801e3c8 .word 0x0801e3c8
801249c: 0801e4d8 .word 0x0801e4d8
80124a0: 0801e40c .word 0x0801e40c
080124a4 <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)
{
80124a4: b580 push {r7, lr}
80124a6: b08e sub sp, #56 ; 0x38
80124a8: af04 add r7, sp, #16
80124aa: 6078 str r0, [r7, #4]
80124ac: 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);
80124ae: 687b ldr r3, [r7, #4]
80124b0: 2b00 cmp r3, #0
80124b2: d107 bne.n 80124c4 <tcp_abandon+0x20>
80124b4: 4b52 ldr r3, [pc, #328] ; (8012600 <tcp_abandon+0x15c>)
80124b6: f240 223d movw r2, #573 ; 0x23d
80124ba: 4952 ldr r1, [pc, #328] ; (8012604 <tcp_abandon+0x160>)
80124bc: 4852 ldr r0, [pc, #328] ; (8012608 <tcp_abandon+0x164>)
80124be: f00a f843 bl 801c548 <iprintf>
80124c2: e099 b.n 80125f8 <tcp_abandon+0x154>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
80124c4: 687b ldr r3, [r7, #4]
80124c6: 7d1b ldrb r3, [r3, #20]
80124c8: 2b01 cmp r3, #1
80124ca: d106 bne.n 80124da <tcp_abandon+0x36>
80124cc: 4b4c ldr r3, [pc, #304] ; (8012600 <tcp_abandon+0x15c>)
80124ce: f240 2241 movw r2, #577 ; 0x241
80124d2: 494e ldr r1, [pc, #312] ; (801260c <tcp_abandon+0x168>)
80124d4: 484c ldr r0, [pc, #304] ; (8012608 <tcp_abandon+0x164>)
80124d6: f00a f837 bl 801c548 <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) {
80124da: 687b ldr r3, [r7, #4]
80124dc: 7d1b ldrb r3, [r3, #20]
80124de: 2b0a cmp r3, #10
80124e0: d107 bne.n 80124f2 <tcp_abandon+0x4e>
tcp_pcb_remove(&tcp_tw_pcbs, pcb);
80124e2: 6879 ldr r1, [r7, #4]
80124e4: 484a ldr r0, [pc, #296] ; (8012610 <tcp_abandon+0x16c>)
80124e6: f000 ffbf bl 8013468 <tcp_pcb_remove>
tcp_free(pcb);
80124ea: 6878 ldr r0, [r7, #4]
80124ec: f7ff fdb8 bl 8012060 <tcp_free>
80124f0: e082 b.n 80125f8 <tcp_abandon+0x154>
} else {
int send_rst = 0;
80124f2: 2300 movs r3, #0
80124f4: 627b str r3, [r7, #36] ; 0x24
u16_t local_port = 0;
80124f6: 2300 movs r3, #0
80124f8: 847b strh r3, [r7, #34] ; 0x22
enum tcp_state last_state;
seqno = pcb->snd_nxt;
80124fa: 687b ldr r3, [r7, #4]
80124fc: 6d1b ldr r3, [r3, #80] ; 0x50
80124fe: 61bb str r3, [r7, #24]
ackno = pcb->rcv_nxt;
8012500: 687b ldr r3, [r7, #4]
8012502: 6a5b ldr r3, [r3, #36] ; 0x24
8012504: 617b str r3, [r7, #20]
#if LWIP_CALLBACK_API
errf = pcb->errf;
8012506: 687b ldr r3, [r7, #4]
8012508: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
801250c: 613b str r3, [r7, #16]
#endif /* LWIP_CALLBACK_API */
errf_arg = pcb->callback_arg;
801250e: 687b ldr r3, [r7, #4]
8012510: 691b ldr r3, [r3, #16]
8012512: 60fb str r3, [r7, #12]
if (pcb->state == CLOSED) {
8012514: 687b ldr r3, [r7, #4]
8012516: 7d1b ldrb r3, [r3, #20]
8012518: 2b00 cmp r3, #0
801251a: d126 bne.n 801256a <tcp_abandon+0xc6>
if (pcb->local_port != 0) {
801251c: 687b ldr r3, [r7, #4]
801251e: 8adb ldrh r3, [r3, #22]
8012520: 2b00 cmp r3, #0
8012522: d02e beq.n 8012582 <tcp_abandon+0xde>
/* bound, not yet opened */
TCP_RMV(&tcp_bound_pcbs, pcb);
8012524: 4b3b ldr r3, [pc, #236] ; (8012614 <tcp_abandon+0x170>)
8012526: 681b ldr r3, [r3, #0]
8012528: 687a ldr r2, [r7, #4]
801252a: 429a cmp r2, r3
801252c: d105 bne.n 801253a <tcp_abandon+0x96>
801252e: 4b39 ldr r3, [pc, #228] ; (8012614 <tcp_abandon+0x170>)
8012530: 681b ldr r3, [r3, #0]
8012532: 68db ldr r3, [r3, #12]
8012534: 4a37 ldr r2, [pc, #220] ; (8012614 <tcp_abandon+0x170>)
8012536: 6013 str r3, [r2, #0]
8012538: e013 b.n 8012562 <tcp_abandon+0xbe>
801253a: 4b36 ldr r3, [pc, #216] ; (8012614 <tcp_abandon+0x170>)
801253c: 681b ldr r3, [r3, #0]
801253e: 61fb str r3, [r7, #28]
8012540: e00c b.n 801255c <tcp_abandon+0xb8>
8012542: 69fb ldr r3, [r7, #28]
8012544: 68db ldr r3, [r3, #12]
8012546: 687a ldr r2, [r7, #4]
8012548: 429a cmp r2, r3
801254a: d104 bne.n 8012556 <tcp_abandon+0xb2>
801254c: 687b ldr r3, [r7, #4]
801254e: 68da ldr r2, [r3, #12]
8012550: 69fb ldr r3, [r7, #28]
8012552: 60da str r2, [r3, #12]
8012554: e005 b.n 8012562 <tcp_abandon+0xbe>
8012556: 69fb ldr r3, [r7, #28]
8012558: 68db ldr r3, [r3, #12]
801255a: 61fb str r3, [r7, #28]
801255c: 69fb ldr r3, [r7, #28]
801255e: 2b00 cmp r3, #0
8012560: d1ef bne.n 8012542 <tcp_abandon+0x9e>
8012562: 687b ldr r3, [r7, #4]
8012564: 2200 movs r2, #0
8012566: 60da str r2, [r3, #12]
8012568: e00b b.n 8012582 <tcp_abandon+0xde>
}
} else {
send_rst = reset;
801256a: 683b ldr r3, [r7, #0]
801256c: 627b str r3, [r7, #36] ; 0x24
local_port = pcb->local_port;
801256e: 687b ldr r3, [r7, #4]
8012570: 8adb ldrh r3, [r3, #22]
8012572: 847b strh r3, [r7, #34] ; 0x22
TCP_PCB_REMOVE_ACTIVE(pcb);
8012574: 6879 ldr r1, [r7, #4]
8012576: 4828 ldr r0, [pc, #160] ; (8012618 <tcp_abandon+0x174>)
8012578: f000 ff76 bl 8013468 <tcp_pcb_remove>
801257c: 4b27 ldr r3, [pc, #156] ; (801261c <tcp_abandon+0x178>)
801257e: 2201 movs r2, #1
8012580: 701a strb r2, [r3, #0]
}
if (pcb->unacked != NULL) {
8012582: 687b ldr r3, [r7, #4]
8012584: 6f1b ldr r3, [r3, #112] ; 0x70
8012586: 2b00 cmp r3, #0
8012588: d004 beq.n 8012594 <tcp_abandon+0xf0>
tcp_segs_free(pcb->unacked);
801258a: 687b ldr r3, [r7, #4]
801258c: 6f1b ldr r3, [r3, #112] ; 0x70
801258e: 4618 mov r0, r3
8012590: f000 fd1a bl 8012fc8 <tcp_segs_free>
}
if (pcb->unsent != NULL) {
8012594: 687b ldr r3, [r7, #4]
8012596: 6edb ldr r3, [r3, #108] ; 0x6c
8012598: 2b00 cmp r3, #0
801259a: d004 beq.n 80125a6 <tcp_abandon+0x102>
tcp_segs_free(pcb->unsent);
801259c: 687b ldr r3, [r7, #4]
801259e: 6edb ldr r3, [r3, #108] ; 0x6c
80125a0: 4618 mov r0, r3
80125a2: f000 fd11 bl 8012fc8 <tcp_segs_free>
}
#if TCP_QUEUE_OOSEQ
if (pcb->ooseq != NULL) {
80125a6: 687b ldr r3, [r7, #4]
80125a8: 6f5b ldr r3, [r3, #116] ; 0x74
80125aa: 2b00 cmp r3, #0
80125ac: d004 beq.n 80125b8 <tcp_abandon+0x114>
tcp_segs_free(pcb->ooseq);
80125ae: 687b ldr r3, [r7, #4]
80125b0: 6f5b ldr r3, [r3, #116] ; 0x74
80125b2: 4618 mov r0, r3
80125b4: f000 fd08 bl 8012fc8 <tcp_segs_free>
}
#endif /* TCP_QUEUE_OOSEQ */
tcp_backlog_accepted(pcb);
if (send_rst) {
80125b8: 6a7b ldr r3, [r7, #36] ; 0x24
80125ba: 2b00 cmp r3, #0
80125bc: d00e beq.n 80125dc <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);
80125be: 6879 ldr r1, [r7, #4]
80125c0: 687b ldr r3, [r7, #4]
80125c2: 3304 adds r3, #4
80125c4: 687a ldr r2, [r7, #4]
80125c6: 8b12 ldrh r2, [r2, #24]
80125c8: 9202 str r2, [sp, #8]
80125ca: 8c7a ldrh r2, [r7, #34] ; 0x22
80125cc: 9201 str r2, [sp, #4]
80125ce: 9300 str r3, [sp, #0]
80125d0: 460b mov r3, r1
80125d2: 697a ldr r2, [r7, #20]
80125d4: 69b9 ldr r1, [r7, #24]
80125d6: 6878 ldr r0, [r7, #4]
80125d8: f004 fcca bl 8016f70 <tcp_rst>
}
last_state = pcb->state;
80125dc: 687b ldr r3, [r7, #4]
80125de: 7d1b ldrb r3, [r3, #20]
80125e0: 72fb strb r3, [r7, #11]
tcp_free(pcb);
80125e2: 6878 ldr r0, [r7, #4]
80125e4: f7ff fd3c bl 8012060 <tcp_free>
TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT);
80125e8: 693b ldr r3, [r7, #16]
80125ea: 2b00 cmp r3, #0
80125ec: d004 beq.n 80125f8 <tcp_abandon+0x154>
80125ee: 693b ldr r3, [r7, #16]
80125f0: f06f 010c mvn.w r1, #12
80125f4: 68f8 ldr r0, [r7, #12]
80125f6: 4798 blx r3
}
}
80125f8: 3728 adds r7, #40 ; 0x28
80125fa: 46bd mov sp, r7
80125fc: bd80 pop {r7, pc}
80125fe: bf00 nop
8012600: 0801e3c8 .word 0x0801e3c8
8012604: 0801e50c .word 0x0801e50c
8012608: 0801e40c .word 0x0801e40c
801260c: 0801e528 .word 0x0801e528
8012610: 2000f7f8 .word 0x2000f7f8
8012614: 2000f7f4 .word 0x2000f7f4
8012618: 2000f7e8 .word 0x2000f7e8
801261c: 2000f7e4 .word 0x2000f7e4
08012620 <tcp_abort>:
*
* @param pcb the tcp pcb to abort
*/
void
tcp_abort(struct tcp_pcb *pcb)
{
8012620: b580 push {r7, lr}
8012622: b082 sub sp, #8
8012624: af00 add r7, sp, #0
8012626: 6078 str r0, [r7, #4]
tcp_abandon(pcb, 1);
8012628: 2101 movs r1, #1
801262a: 6878 ldr r0, [r7, #4]
801262c: f7ff ff3a bl 80124a4 <tcp_abandon>
}
8012630: bf00 nop
8012632: 3708 adds r7, #8
8012634: 46bd mov sp, r7
8012636: bd80 pop {r7, pc}
08012638 <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)
{
8012638: b580 push {r7, lr}
801263a: b084 sub sp, #16
801263c: af00 add r7, sp, #0
801263e: 6078 str r0, [r7, #4]
u32_t new_right_edge;
LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
8012640: 687b ldr r3, [r7, #4]
8012642: 2b00 cmp r3, #0
8012644: d106 bne.n 8012654 <tcp_update_rcv_ann_wnd+0x1c>
8012646: 4b25 ldr r3, [pc, #148] ; (80126dc <tcp_update_rcv_ann_wnd+0xa4>)
8012648: f240 32a6 movw r2, #934 ; 0x3a6
801264c: 4924 ldr r1, [pc, #144] ; (80126e0 <tcp_update_rcv_ann_wnd+0xa8>)
801264e: 4825 ldr r0, [pc, #148] ; (80126e4 <tcp_update_rcv_ann_wnd+0xac>)
8012650: f009 ff7a bl 801c548 <iprintf>
new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;
8012654: 687b ldr r3, [r7, #4]
8012656: 6a5b ldr r3, [r3, #36] ; 0x24
8012658: 687a ldr r2, [r7, #4]
801265a: 8d12 ldrh r2, [r2, #40] ; 0x28
801265c: 4413 add r3, r2
801265e: 60fb str r3, [r7, #12]
if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) {
8012660: 687b ldr r3, [r7, #4]
8012662: 6adb ldr r3, [r3, #44] ; 0x2c
8012664: 687a ldr r2, [r7, #4]
8012666: 8e52 ldrh r2, [r2, #50] ; 0x32
8012668: f5b2 6f86 cmp.w r2, #1072 ; 0x430
801266c: bf28 it cs
801266e: f44f 6286 movcs.w r2, #1072 ; 0x430
8012672: b292 uxth r2, r2
8012674: 4413 add r3, r2
8012676: 68fa ldr r2, [r7, #12]
8012678: 1ad3 subs r3, r2, r3
801267a: 2b00 cmp r3, #0
801267c: db08 blt.n 8012690 <tcp_update_rcv_ann_wnd+0x58>
/* we can advertise more window */
pcb->rcv_ann_wnd = pcb->rcv_wnd;
801267e: 687b ldr r3, [r7, #4]
8012680: 8d1a ldrh r2, [r3, #40] ; 0x28
8012682: 687b ldr r3, [r7, #4]
8012684: 855a strh r2, [r3, #42] ; 0x2a
return new_right_edge - pcb->rcv_ann_right_edge;
8012686: 687b ldr r3, [r7, #4]
8012688: 6adb ldr r3, [r3, #44] ; 0x2c
801268a: 68fa ldr r2, [r7, #12]
801268c: 1ad3 subs r3, r2, r3
801268e: e020 b.n 80126d2 <tcp_update_rcv_ann_wnd+0x9a>
} else {
if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
8012690: 687b ldr r3, [r7, #4]
8012692: 6a5a ldr r2, [r3, #36] ; 0x24
8012694: 687b ldr r3, [r7, #4]
8012696: 6adb ldr r3, [r3, #44] ; 0x2c
8012698: 1ad3 subs r3, r2, r3
801269a: 2b00 cmp r3, #0
801269c: dd03 ble.n 80126a6 <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;
801269e: 687b ldr r3, [r7, #4]
80126a0: 2200 movs r2, #0
80126a2: 855a strh r2, [r3, #42] ; 0x2a
80126a4: e014 b.n 80126d0 <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;
80126a6: 687b ldr r3, [r7, #4]
80126a8: 6ada ldr r2, [r3, #44] ; 0x2c
80126aa: 687b ldr r3, [r7, #4]
80126ac: 6a5b ldr r3, [r3, #36] ; 0x24
80126ae: 1ad3 subs r3, r2, r3
80126b0: 60bb str r3, [r7, #8]
#if !LWIP_WND_SCALE
LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
80126b2: 68bb ldr r3, [r7, #8]
80126b4: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
80126b8: d306 bcc.n 80126c8 <tcp_update_rcv_ann_wnd+0x90>
80126ba: 4b08 ldr r3, [pc, #32] ; (80126dc <tcp_update_rcv_ann_wnd+0xa4>)
80126bc: f240 32b6 movw r2, #950 ; 0x3b6
80126c0: 4909 ldr r1, [pc, #36] ; (80126e8 <tcp_update_rcv_ann_wnd+0xb0>)
80126c2: 4808 ldr r0, [pc, #32] ; (80126e4 <tcp_update_rcv_ann_wnd+0xac>)
80126c4: f009 ff40 bl 801c548 <iprintf>
#endif
pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd;
80126c8: 68bb ldr r3, [r7, #8]
80126ca: b29a uxth r2, r3
80126cc: 687b ldr r3, [r7, #4]
80126ce: 855a strh r2, [r3, #42] ; 0x2a
}
return 0;
80126d0: 2300 movs r3, #0
}
}
80126d2: 4618 mov r0, r3
80126d4: 3710 adds r7, #16
80126d6: 46bd mov sp, r7
80126d8: bd80 pop {r7, pc}
80126da: bf00 nop
80126dc: 0801e3c8 .word 0x0801e3c8
80126e0: 0801e624 .word 0x0801e624
80126e4: 0801e40c .word 0x0801e40c
80126e8: 0801e648 .word 0x0801e648
080126ec <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)
{
80126ec: b580 push {r7, lr}
80126ee: b084 sub sp, #16
80126f0: af00 add r7, sp, #0
80126f2: 6078 str r0, [r7, #4]
80126f4: 460b mov r3, r1
80126f6: 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);
80126f8: 687b ldr r3, [r7, #4]
80126fa: 2b00 cmp r3, #0
80126fc: d107 bne.n 801270e <tcp_recved+0x22>
80126fe: 4b1f ldr r3, [pc, #124] ; (801277c <tcp_recved+0x90>)
8012700: f240 32cf movw r2, #975 ; 0x3cf
8012704: 491e ldr r1, [pc, #120] ; (8012780 <tcp_recved+0x94>)
8012706: 481f ldr r0, [pc, #124] ; (8012784 <tcp_recved+0x98>)
8012708: f009 ff1e bl 801c548 <iprintf>
801270c: e032 b.n 8012774 <tcp_recved+0x88>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
801270e: 687b ldr r3, [r7, #4]
8012710: 7d1b ldrb r3, [r3, #20]
8012712: 2b01 cmp r3, #1
8012714: d106 bne.n 8012724 <tcp_recved+0x38>
8012716: 4b19 ldr r3, [pc, #100] ; (801277c <tcp_recved+0x90>)
8012718: f240 32d3 movw r2, #979 ; 0x3d3
801271c: 491a ldr r1, [pc, #104] ; (8012788 <tcp_recved+0x9c>)
801271e: 4819 ldr r0, [pc, #100] ; (8012784 <tcp_recved+0x98>)
8012720: f009 ff12 bl 801c548 <iprintf>
pcb->state != LISTEN);
rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len);
8012724: 687b ldr r3, [r7, #4]
8012726: 8d1a ldrh r2, [r3, #40] ; 0x28
8012728: 887b ldrh r3, [r7, #2]
801272a: 4413 add r3, r2
801272c: 81fb strh r3, [r7, #14]
if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) {
801272e: 89fb ldrh r3, [r7, #14]
8012730: f5b3 6f06 cmp.w r3, #2144 ; 0x860
8012734: d804 bhi.n 8012740 <tcp_recved+0x54>
8012736: 687b ldr r3, [r7, #4]
8012738: 8d1b ldrh r3, [r3, #40] ; 0x28
801273a: 89fa ldrh r2, [r7, #14]
801273c: 429a cmp r2, r3
801273e: d204 bcs.n 801274a <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);
8012740: 687b ldr r3, [r7, #4]
8012742: f44f 6206 mov.w r2, #2144 ; 0x860
8012746: 851a strh r2, [r3, #40] ; 0x28
8012748: e002 b.n 8012750 <tcp_recved+0x64>
} else {
pcb->rcv_wnd = rcv_wnd;
801274a: 687b ldr r3, [r7, #4]
801274c: 89fa ldrh r2, [r7, #14]
801274e: 851a strh r2, [r3, #40] ; 0x28
}
wnd_inflation = tcp_update_rcv_ann_wnd(pcb);
8012750: 6878 ldr r0, [r7, #4]
8012752: f7ff ff71 bl 8012638 <tcp_update_rcv_ann_wnd>
8012756: 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) {
8012758: 68bb ldr r3, [r7, #8]
801275a: f5b3 7f06 cmp.w r3, #536 ; 0x218
801275e: d309 bcc.n 8012774 <tcp_recved+0x88>
tcp_ack_now(pcb);
8012760: 687b ldr r3, [r7, #4]
8012762: 8b5b ldrh r3, [r3, #26]
8012764: f043 0302 orr.w r3, r3, #2
8012768: b29a uxth r2, r3
801276a: 687b ldr r3, [r7, #4]
801276c: 835a strh r2, [r3, #26]
tcp_output(pcb);
801276e: 6878 ldr r0, [r7, #4]
8012770: f003 fe38 bl 80163e4 <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)));
}
8012774: 3710 adds r7, #16
8012776: 46bd mov sp, r7
8012778: bd80 pop {r7, pc}
801277a: bf00 nop
801277c: 0801e3c8 .word 0x0801e3c8
8012780: 0801e664 .word 0x0801e664
8012784: 0801e40c .word 0x0801e40c
8012788: 0801e67c .word 0x0801e67c
0801278c <tcp_slowtmr>:
*
* Automatically called from tcp_tmr().
*/
void
tcp_slowtmr(void)
{
801278c: b5b0 push {r4, r5, r7, lr}
801278e: b090 sub sp, #64 ; 0x40
8012790: 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;
8012792: 2300 movs r3, #0
8012794: f887 3025 strb.w r3, [r7, #37] ; 0x25
++tcp_ticks;
8012798: 4b94 ldr r3, [pc, #592] ; (80129ec <tcp_slowtmr+0x260>)
801279a: 681b ldr r3, [r3, #0]
801279c: 3301 adds r3, #1
801279e: 4a93 ldr r2, [pc, #588] ; (80129ec <tcp_slowtmr+0x260>)
80127a0: 6013 str r3, [r2, #0]
++tcp_timer_ctr;
80127a2: 4b93 ldr r3, [pc, #588] ; (80129f0 <tcp_slowtmr+0x264>)
80127a4: 781b ldrb r3, [r3, #0]
80127a6: 3301 adds r3, #1
80127a8: b2da uxtb r2, r3
80127aa: 4b91 ldr r3, [pc, #580] ; (80129f0 <tcp_slowtmr+0x264>)
80127ac: 701a strb r2, [r3, #0]
tcp_slowtmr_start:
/* Steps through all of the active PCBs. */
prev = NULL;
80127ae: 2300 movs r3, #0
80127b0: 62bb str r3, [r7, #40] ; 0x28
pcb = tcp_active_pcbs;
80127b2: 4b90 ldr r3, [pc, #576] ; (80129f4 <tcp_slowtmr+0x268>)
80127b4: 681b ldr r3, [r3, #0]
80127b6: 62fb str r3, [r7, #44] ; 0x2c
if (pcb == NULL) {
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n"));
}
while (pcb != NULL) {
80127b8: e29d b.n 8012cf6 <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);
80127ba: 6afb ldr r3, [r7, #44] ; 0x2c
80127bc: 7d1b ldrb r3, [r3, #20]
80127be: 2b00 cmp r3, #0
80127c0: d106 bne.n 80127d0 <tcp_slowtmr+0x44>
80127c2: 4b8d ldr r3, [pc, #564] ; (80129f8 <tcp_slowtmr+0x26c>)
80127c4: f240 42be movw r2, #1214 ; 0x4be
80127c8: 498c ldr r1, [pc, #560] ; (80129fc <tcp_slowtmr+0x270>)
80127ca: 488d ldr r0, [pc, #564] ; (8012a00 <tcp_slowtmr+0x274>)
80127cc: f009 febc bl 801c548 <iprintf>
LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
80127d0: 6afb ldr r3, [r7, #44] ; 0x2c
80127d2: 7d1b ldrb r3, [r3, #20]
80127d4: 2b01 cmp r3, #1
80127d6: d106 bne.n 80127e6 <tcp_slowtmr+0x5a>
80127d8: 4b87 ldr r3, [pc, #540] ; (80129f8 <tcp_slowtmr+0x26c>)
80127da: f240 42bf movw r2, #1215 ; 0x4bf
80127de: 4989 ldr r1, [pc, #548] ; (8012a04 <tcp_slowtmr+0x278>)
80127e0: 4887 ldr r0, [pc, #540] ; (8012a00 <tcp_slowtmr+0x274>)
80127e2: f009 feb1 bl 801c548 <iprintf>
LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
80127e6: 6afb ldr r3, [r7, #44] ; 0x2c
80127e8: 7d1b ldrb r3, [r3, #20]
80127ea: 2b0a cmp r3, #10
80127ec: d106 bne.n 80127fc <tcp_slowtmr+0x70>
80127ee: 4b82 ldr r3, [pc, #520] ; (80129f8 <tcp_slowtmr+0x26c>)
80127f0: f44f 6298 mov.w r2, #1216 ; 0x4c0
80127f4: 4984 ldr r1, [pc, #528] ; (8012a08 <tcp_slowtmr+0x27c>)
80127f6: 4882 ldr r0, [pc, #520] ; (8012a00 <tcp_slowtmr+0x274>)
80127f8: f009 fea6 bl 801c548 <iprintf>
if (pcb->last_timer == tcp_timer_ctr) {
80127fc: 6afb ldr r3, [r7, #44] ; 0x2c
80127fe: 7f9a ldrb r2, [r3, #30]
8012800: 4b7b ldr r3, [pc, #492] ; (80129f0 <tcp_slowtmr+0x264>)
8012802: 781b ldrb r3, [r3, #0]
8012804: 429a cmp r2, r3
8012806: d105 bne.n 8012814 <tcp_slowtmr+0x88>
/* skip this pcb, we have already processed it */
prev = pcb;
8012808: 6afb ldr r3, [r7, #44] ; 0x2c
801280a: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
801280c: 6afb ldr r3, [r7, #44] ; 0x2c
801280e: 68db ldr r3, [r3, #12]
8012810: 62fb str r3, [r7, #44] ; 0x2c
continue;
8012812: e270 b.n 8012cf6 <tcp_slowtmr+0x56a>
}
pcb->last_timer = tcp_timer_ctr;
8012814: 4b76 ldr r3, [pc, #472] ; (80129f0 <tcp_slowtmr+0x264>)
8012816: 781a ldrb r2, [r3, #0]
8012818: 6afb ldr r3, [r7, #44] ; 0x2c
801281a: 779a strb r2, [r3, #30]
pcb_remove = 0;
801281c: 2300 movs r3, #0
801281e: f887 3027 strb.w r3, [r7, #39] ; 0x27
pcb_reset = 0;
8012822: 2300 movs r3, #0
8012824: f887 3026 strb.w r3, [r7, #38] ; 0x26
if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
8012828: 6afb ldr r3, [r7, #44] ; 0x2c
801282a: 7d1b ldrb r3, [r3, #20]
801282c: 2b02 cmp r3, #2
801282e: d10a bne.n 8012846 <tcp_slowtmr+0xba>
8012830: 6afb ldr r3, [r7, #44] ; 0x2c
8012832: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8012836: 2b05 cmp r3, #5
8012838: d905 bls.n 8012846 <tcp_slowtmr+0xba>
++pcb_remove;
801283a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801283e: 3301 adds r3, #1
8012840: f887 3027 strb.w r3, [r7, #39] ; 0x27
8012844: e11e b.n 8012a84 <tcp_slowtmr+0x2f8>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n"));
} else if (pcb->nrtx >= TCP_MAXRTX) {
8012846: 6afb ldr r3, [r7, #44] ; 0x2c
8012848: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
801284c: 2b0b cmp r3, #11
801284e: d905 bls.n 801285c <tcp_slowtmr+0xd0>
++pcb_remove;
8012850: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012854: 3301 adds r3, #1
8012856: f887 3027 strb.w r3, [r7, #39] ; 0x27
801285a: e113 b.n 8012a84 <tcp_slowtmr+0x2f8>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n"));
} else {
if (pcb->persist_backoff > 0) {
801285c: 6afb ldr r3, [r7, #44] ; 0x2c
801285e: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
8012862: 2b00 cmp r3, #0
8012864: d075 beq.n 8012952 <tcp_slowtmr+0x1c6>
LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL);
8012866: 6afb ldr r3, [r7, #44] ; 0x2c
8012868: 6f1b ldr r3, [r3, #112] ; 0x70
801286a: 2b00 cmp r3, #0
801286c: d006 beq.n 801287c <tcp_slowtmr+0xf0>
801286e: 4b62 ldr r3, [pc, #392] ; (80129f8 <tcp_slowtmr+0x26c>)
8012870: f240 42d4 movw r2, #1236 ; 0x4d4
8012874: 4965 ldr r1, [pc, #404] ; (8012a0c <tcp_slowtmr+0x280>)
8012876: 4862 ldr r0, [pc, #392] ; (8012a00 <tcp_slowtmr+0x274>)
8012878: f009 fe66 bl 801c548 <iprintf>
LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
801287c: 6afb ldr r3, [r7, #44] ; 0x2c
801287e: 6edb ldr r3, [r3, #108] ; 0x6c
8012880: 2b00 cmp r3, #0
8012882: d106 bne.n 8012892 <tcp_slowtmr+0x106>
8012884: 4b5c ldr r3, [pc, #368] ; (80129f8 <tcp_slowtmr+0x26c>)
8012886: f240 42d5 movw r2, #1237 ; 0x4d5
801288a: 4961 ldr r1, [pc, #388] ; (8012a10 <tcp_slowtmr+0x284>)
801288c: 485c ldr r0, [pc, #368] ; (8012a00 <tcp_slowtmr+0x274>)
801288e: f009 fe5b bl 801c548 <iprintf>
if (pcb->persist_probe >= TCP_MAXRTX) {
8012892: 6afb ldr r3, [r7, #44] ; 0x2c
8012894: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
8012898: 2b0b cmp r3, #11
801289a: d905 bls.n 80128a8 <tcp_slowtmr+0x11c>
++pcb_remove; /* max probes reached */
801289c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80128a0: 3301 adds r3, #1
80128a2: f887 3027 strb.w r3, [r7, #39] ; 0x27
80128a6: e0ed b.n 8012a84 <tcp_slowtmr+0x2f8>
} else {
u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1];
80128a8: 6afb ldr r3, [r7, #44] ; 0x2c
80128aa: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80128ae: 3b01 subs r3, #1
80128b0: 4a58 ldr r2, [pc, #352] ; (8012a14 <tcp_slowtmr+0x288>)
80128b2: 5cd3 ldrb r3, [r2, r3]
80128b4: 747b strb r3, [r7, #17]
if (pcb->persist_cnt < backoff_cnt) {
80128b6: 6afb ldr r3, [r7, #44] ; 0x2c
80128b8: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
80128bc: 7c7a ldrb r2, [r7, #17]
80128be: 429a cmp r2, r3
80128c0: d907 bls.n 80128d2 <tcp_slowtmr+0x146>
pcb->persist_cnt++;
80128c2: 6afb ldr r3, [r7, #44] ; 0x2c
80128c4: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
80128c8: 3301 adds r3, #1
80128ca: b2da uxtb r2, r3
80128cc: 6afb ldr r3, [r7, #44] ; 0x2c
80128ce: f883 2098 strb.w r2, [r3, #152] ; 0x98
}
if (pcb->persist_cnt >= backoff_cnt) {
80128d2: 6afb ldr r3, [r7, #44] ; 0x2c
80128d4: f893 3098 ldrb.w r3, [r3, #152] ; 0x98
80128d8: 7c7a ldrb r2, [r7, #17]
80128da: 429a cmp r2, r3
80128dc: f200 80d2 bhi.w 8012a84 <tcp_slowtmr+0x2f8>
int next_slot = 1; /* increment timer to next slot */
80128e0: 2301 movs r3, #1
80128e2: 623b str r3, [r7, #32]
/* If snd_wnd is zero, send 1 byte probes */
if (pcb->snd_wnd == 0) {
80128e4: 6afb ldr r3, [r7, #44] ; 0x2c
80128e6: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
80128ea: 2b00 cmp r3, #0
80128ec: d108 bne.n 8012900 <tcp_slowtmr+0x174>
if (tcp_zero_window_probe(pcb) != ERR_OK) {
80128ee: 6af8 ldr r0, [r7, #44] ; 0x2c
80128f0: f004 fc32 bl 8017158 <tcp_zero_window_probe>
80128f4: 4603 mov r3, r0
80128f6: 2b00 cmp r3, #0
80128f8: d014 beq.n 8012924 <tcp_slowtmr+0x198>
next_slot = 0; /* try probe again with current slot */
80128fa: 2300 movs r3, #0
80128fc: 623b str r3, [r7, #32]
80128fe: e011 b.n 8012924 <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) {
8012900: 6afb ldr r3, [r7, #44] ; 0x2c
8012902: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8012906: 4619 mov r1, r3
8012908: 6af8 ldr r0, [r7, #44] ; 0x2c
801290a: f003 fae5 bl 8015ed8 <tcp_split_unsent_seg>
801290e: 4603 mov r3, r0
8012910: 2b00 cmp r3, #0
8012912: d107 bne.n 8012924 <tcp_slowtmr+0x198>
if (tcp_output(pcb) == ERR_OK) {
8012914: 6af8 ldr r0, [r7, #44] ; 0x2c
8012916: f003 fd65 bl 80163e4 <tcp_output>
801291a: 4603 mov r3, r0
801291c: 2b00 cmp r3, #0
801291e: d101 bne.n 8012924 <tcp_slowtmr+0x198>
/* sending will cancel persist timer, else retry with current slot */
next_slot = 0;
8012920: 2300 movs r3, #0
8012922: 623b str r3, [r7, #32]
}
}
}
if (next_slot) {
8012924: 6a3b ldr r3, [r7, #32]
8012926: 2b00 cmp r3, #0
8012928: f000 80ac beq.w 8012a84 <tcp_slowtmr+0x2f8>
pcb->persist_cnt = 0;
801292c: 6afb ldr r3, [r7, #44] ; 0x2c
801292e: 2200 movs r2, #0
8012930: f883 2098 strb.w r2, [r3, #152] ; 0x98
if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) {
8012934: 6afb ldr r3, [r7, #44] ; 0x2c
8012936: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
801293a: 2b06 cmp r3, #6
801293c: f200 80a2 bhi.w 8012a84 <tcp_slowtmr+0x2f8>
pcb->persist_backoff++;
8012940: 6afb ldr r3, [r7, #44] ; 0x2c
8012942: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
8012946: 3301 adds r3, #1
8012948: b2da uxtb r2, r3
801294a: 6afb ldr r3, [r7, #44] ; 0x2c
801294c: f883 2099 strb.w r2, [r3, #153] ; 0x99
8012950: e098 b.n 8012a84 <tcp_slowtmr+0x2f8>
}
}
}
} else {
/* Increase the retransmission timer if it is running */
if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) {
8012952: 6afb ldr r3, [r7, #44] ; 0x2c
8012954: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8012958: 2b00 cmp r3, #0
801295a: db0f blt.n 801297c <tcp_slowtmr+0x1f0>
801295c: 6afb ldr r3, [r7, #44] ; 0x2c
801295e: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8012962: f647 72ff movw r2, #32767 ; 0x7fff
8012966: 4293 cmp r3, r2
8012968: d008 beq.n 801297c <tcp_slowtmr+0x1f0>
++pcb->rtime;
801296a: 6afb ldr r3, [r7, #44] ; 0x2c
801296c: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8012970: b29b uxth r3, r3
8012972: 3301 adds r3, #1
8012974: b29b uxth r3, r3
8012976: b21a sxth r2, r3
8012978: 6afb ldr r3, [r7, #44] ; 0x2c
801297a: 861a strh r2, [r3, #48] ; 0x30
}
if (pcb->rtime >= pcb->rto) {
801297c: 6afb ldr r3, [r7, #44] ; 0x2c
801297e: f9b3 2030 ldrsh.w r2, [r3, #48] ; 0x30
8012982: 6afb ldr r3, [r7, #44] ; 0x2c
8012984: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
8012988: 429a cmp r2, r3
801298a: db7b blt.n 8012a84 <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))) {
801298c: 6af8 ldr r0, [r7, #44] ; 0x2c
801298e: f004 f821 bl 80169d4 <tcp_rexmit_rto_prepare>
8012992: 4603 mov r3, r0
8012994: 2b00 cmp r3, #0
8012996: d007 beq.n 80129a8 <tcp_slowtmr+0x21c>
8012998: 6afb ldr r3, [r7, #44] ; 0x2c
801299a: 6f1b ldr r3, [r3, #112] ; 0x70
801299c: 2b00 cmp r3, #0
801299e: d171 bne.n 8012a84 <tcp_slowtmr+0x2f8>
80129a0: 6afb ldr r3, [r7, #44] ; 0x2c
80129a2: 6edb ldr r3, [r3, #108] ; 0x6c
80129a4: 2b00 cmp r3, #0
80129a6: d06d beq.n 8012a84 <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) {
80129a8: 6afb ldr r3, [r7, #44] ; 0x2c
80129aa: 7d1b ldrb r3, [r3, #20]
80129ac: 2b02 cmp r3, #2
80129ae: d03a beq.n 8012a26 <tcp_slowtmr+0x29a>
u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1);
80129b0: 6afb ldr r3, [r7, #44] ; 0x2c
80129b2: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
80129b6: 2b0c cmp r3, #12
80129b8: bf28 it cs
80129ba: 230c movcs r3, #12
80129bc: 76fb strb r3, [r7, #27]
int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx];
80129be: 6afb ldr r3, [r7, #44] ; 0x2c
80129c0: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
80129c4: 10db asrs r3, r3, #3
80129c6: b21b sxth r3, r3
80129c8: 461a mov r2, r3
80129ca: 6afb ldr r3, [r7, #44] ; 0x2c
80129cc: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
80129d0: 4413 add r3, r2
80129d2: 7efa ldrb r2, [r7, #27]
80129d4: 4910 ldr r1, [pc, #64] ; (8012a18 <tcp_slowtmr+0x28c>)
80129d6: 5c8a ldrb r2, [r1, r2]
80129d8: 4093 lsls r3, r2
80129da: 617b str r3, [r7, #20]
pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
80129dc: 697b ldr r3, [r7, #20]
80129de: f647 72fe movw r2, #32766 ; 0x7ffe
80129e2: 4293 cmp r3, r2
80129e4: dc1a bgt.n 8012a1c <tcp_slowtmr+0x290>
80129e6: 697b ldr r3, [r7, #20]
80129e8: b21a sxth r2, r3
80129ea: e019 b.n 8012a20 <tcp_slowtmr+0x294>
80129ec: 2000f7ec .word 0x2000f7ec
80129f0: 20008716 .word 0x20008716
80129f4: 2000f7e8 .word 0x2000f7e8
80129f8: 0801e3c8 .word 0x0801e3c8
80129fc: 0801e70c .word 0x0801e70c
8012a00: 0801e40c .word 0x0801e40c
8012a04: 0801e738 .word 0x0801e738
8012a08: 0801e764 .word 0x0801e764
8012a0c: 0801e794 .word 0x0801e794
8012a10: 0801e7c8 .word 0x0801e7c8
8012a14: 080226a8 .word 0x080226a8
8012a18: 08022698 .word 0x08022698
8012a1c: f647 72ff movw r2, #32767 ; 0x7fff
8012a20: 6afb ldr r3, [r7, #44] ; 0x2c
8012a22: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
}
/* Reset the retransmission timer. */
pcb->rtime = 0;
8012a26: 6afb ldr r3, [r7, #44] ; 0x2c
8012a28: 2200 movs r2, #0
8012a2a: 861a strh r2, [r3, #48] ; 0x30
/* Reduce congestion window and ssthresh. */
eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
8012a2c: 6afb ldr r3, [r7, #44] ; 0x2c
8012a2e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8012a32: 6afb ldr r3, [r7, #44] ; 0x2c
8012a34: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8012a38: 4293 cmp r3, r2
8012a3a: bf28 it cs
8012a3c: 4613 movcs r3, r2
8012a3e: 827b strh r3, [r7, #18]
pcb->ssthresh = eff_wnd >> 1;
8012a40: 8a7b ldrh r3, [r7, #18]
8012a42: 085b lsrs r3, r3, #1
8012a44: b29a uxth r2, r3
8012a46: 6afb ldr r3, [r7, #44] ; 0x2c
8012a48: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) {
8012a4c: 6afb ldr r3, [r7, #44] ; 0x2c
8012a4e: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
8012a52: 6afb ldr r3, [r7, #44] ; 0x2c
8012a54: 8e5b ldrh r3, [r3, #50] ; 0x32
8012a56: 005b lsls r3, r3, #1
8012a58: b29b uxth r3, r3
8012a5a: 429a cmp r2, r3
8012a5c: d206 bcs.n 8012a6c <tcp_slowtmr+0x2e0>
pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1);
8012a5e: 6afb ldr r3, [r7, #44] ; 0x2c
8012a60: 8e5b ldrh r3, [r3, #50] ; 0x32
8012a62: 005b lsls r3, r3, #1
8012a64: b29a uxth r2, r3
8012a66: 6afb ldr r3, [r7, #44] ; 0x2c
8012a68: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
}
pcb->cwnd = pcb->mss;
8012a6c: 6afb ldr r3, [r7, #44] ; 0x2c
8012a6e: 8e5a ldrh r2, [r3, #50] ; 0x32
8012a70: 6afb ldr r3, [r7, #44] ; 0x2c
8012a72: 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;
8012a76: 6afb ldr r3, [r7, #44] ; 0x2c
8012a78: 2200 movs r2, #0
8012a7a: 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);
8012a7e: 6af8 ldr r0, [r7, #44] ; 0x2c
8012a80: f004 f818 bl 8016ab4 <tcp_rexmit_rto_commit>
}
}
}
}
/* Check if this PCB has stayed too long in FIN-WAIT-2 */
if (pcb->state == FIN_WAIT_2) {
8012a84: 6afb ldr r3, [r7, #44] ; 0x2c
8012a86: 7d1b ldrb r3, [r3, #20]
8012a88: 2b06 cmp r3, #6
8012a8a: d111 bne.n 8012ab0 <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) {
8012a8c: 6afb ldr r3, [r7, #44] ; 0x2c
8012a8e: 8b5b ldrh r3, [r3, #26]
8012a90: f003 0310 and.w r3, r3, #16
8012a94: 2b00 cmp r3, #0
8012a96: d00b beq.n 8012ab0 <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) >
8012a98: 4b9c ldr r3, [pc, #624] ; (8012d0c <tcp_slowtmr+0x580>)
8012a9a: 681a ldr r2, [r3, #0]
8012a9c: 6afb ldr r3, [r7, #44] ; 0x2c
8012a9e: 6a1b ldr r3, [r3, #32]
8012aa0: 1ad3 subs r3, r2, r3
8012aa2: 2b28 cmp r3, #40 ; 0x28
8012aa4: d904 bls.n 8012ab0 <tcp_slowtmr+0x324>
TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
8012aa6: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012aaa: 3301 adds r3, #1
8012aac: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
}
}
/* Check if KEEPALIVE should be sent */
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
8012ab0: 6afb ldr r3, [r7, #44] ; 0x2c
8012ab2: 7a5b ldrb r3, [r3, #9]
8012ab4: f003 0308 and.w r3, r3, #8
8012ab8: 2b00 cmp r3, #0
8012aba: d04a beq.n 8012b52 <tcp_slowtmr+0x3c6>
((pcb->state == ESTABLISHED) ||
8012abc: 6afb ldr r3, [r7, #44] ; 0x2c
8012abe: 7d1b ldrb r3, [r3, #20]
if (ip_get_option(pcb, SOF_KEEPALIVE) &&
8012ac0: 2b04 cmp r3, #4
8012ac2: d003 beq.n 8012acc <tcp_slowtmr+0x340>
(pcb->state == CLOSE_WAIT))) {
8012ac4: 6afb ldr r3, [r7, #44] ; 0x2c
8012ac6: 7d1b ldrb r3, [r3, #20]
((pcb->state == ESTABLISHED) ||
8012ac8: 2b07 cmp r3, #7
8012aca: d142 bne.n 8012b52 <tcp_slowtmr+0x3c6>
if ((u32_t)(tcp_ticks - pcb->tmr) >
8012acc: 4b8f ldr r3, [pc, #572] ; (8012d0c <tcp_slowtmr+0x580>)
8012ace: 681a ldr r2, [r3, #0]
8012ad0: 6afb ldr r3, [r7, #44] ; 0x2c
8012ad2: 6a1b ldr r3, [r3, #32]
8012ad4: 1ad2 subs r2, r2, r3
(pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) {
8012ad6: 6afb ldr r3, [r7, #44] ; 0x2c
8012ad8: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94
8012adc: 4b8c ldr r3, [pc, #560] ; (8012d10 <tcp_slowtmr+0x584>)
8012ade: 440b add r3, r1
8012ae0: 498c ldr r1, [pc, #560] ; (8012d14 <tcp_slowtmr+0x588>)
8012ae2: fba1 1303 umull r1, r3, r1, r3
8012ae6: 095b lsrs r3, r3, #5
if ((u32_t)(tcp_ticks - pcb->tmr) >
8012ae8: 429a cmp r2, r3
8012aea: d90a bls.n 8012b02 <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;
8012aec: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012af0: 3301 adds r3, #1
8012af2: f887 3027 strb.w r3, [r7, #39] ; 0x27
++pcb_reset;
8012af6: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8012afa: 3301 adds r3, #1
8012afc: f887 3026 strb.w r3, [r7, #38] ; 0x26
8012b00: e027 b.n 8012b52 <tcp_slowtmr+0x3c6>
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
8012b02: 4b82 ldr r3, [pc, #520] ; (8012d0c <tcp_slowtmr+0x580>)
8012b04: 681a ldr r2, [r3, #0]
8012b06: 6afb ldr r3, [r7, #44] ; 0x2c
8012b08: 6a1b ldr r3, [r3, #32]
8012b0a: 1ad2 subs r2, r2, r3
(pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb))
8012b0c: 6afb ldr r3, [r7, #44] ; 0x2c
8012b0e: f8d3 1094 ldr.w r1, [r3, #148] ; 0x94
8012b12: 6afb ldr r3, [r7, #44] ; 0x2c
8012b14: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
8012b18: 4618 mov r0, r3
8012b1a: 4b7f ldr r3, [pc, #508] ; (8012d18 <tcp_slowtmr+0x58c>)
8012b1c: fb03 f300 mul.w r3, r3, r0
8012b20: 440b add r3, r1
/ TCP_SLOW_INTERVAL) {
8012b22: 497c ldr r1, [pc, #496] ; (8012d14 <tcp_slowtmr+0x588>)
8012b24: fba1 1303 umull r1, r3, r1, r3
8012b28: 095b lsrs r3, r3, #5
} else if ((u32_t)(tcp_ticks - pcb->tmr) >
8012b2a: 429a cmp r2, r3
8012b2c: d911 bls.n 8012b52 <tcp_slowtmr+0x3c6>
err = tcp_keepalive(pcb);
8012b2e: 6af8 ldr r0, [r7, #44] ; 0x2c
8012b30: f004 fad2 bl 80170d8 <tcp_keepalive>
8012b34: 4603 mov r3, r0
8012b36: f887 3025 strb.w r3, [r7, #37] ; 0x25
if (err == ERR_OK) {
8012b3a: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
8012b3e: 2b00 cmp r3, #0
8012b40: d107 bne.n 8012b52 <tcp_slowtmr+0x3c6>
pcb->keep_cnt_sent++;
8012b42: 6afb ldr r3, [r7, #44] ; 0x2c
8012b44: f893 309b ldrb.w r3, [r3, #155] ; 0x9b
8012b48: 3301 adds r3, #1
8012b4a: b2da uxtb r2, r3
8012b4c: 6afb ldr r3, [r7, #44] ; 0x2c
8012b4e: 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 &&
8012b52: 6afb ldr r3, [r7, #44] ; 0x2c
8012b54: 6f5b ldr r3, [r3, #116] ; 0x74
8012b56: 2b00 cmp r3, #0
8012b58: d011 beq.n 8012b7e <tcp_slowtmr+0x3f2>
(tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) {
8012b5a: 4b6c ldr r3, [pc, #432] ; (8012d0c <tcp_slowtmr+0x580>)
8012b5c: 681a ldr r2, [r3, #0]
8012b5e: 6afb ldr r3, [r7, #44] ; 0x2c
8012b60: 6a1b ldr r3, [r3, #32]
8012b62: 1ad2 subs r2, r2, r3
8012b64: 6afb ldr r3, [r7, #44] ; 0x2c
8012b66: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40
8012b6a: 4619 mov r1, r3
8012b6c: 460b mov r3, r1
8012b6e: 005b lsls r3, r3, #1
8012b70: 440b add r3, r1
8012b72: 005b lsls r3, r3, #1
if (pcb->ooseq != NULL &&
8012b74: 429a cmp r2, r3
8012b76: d302 bcc.n 8012b7e <tcp_slowtmr+0x3f2>
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n"));
tcp_free_ooseq(pcb);
8012b78: 6af8 ldr r0, [r7, #44] ; 0x2c
8012b7a: f000 fdd9 bl 8013730 <tcp_free_ooseq>
}
#endif /* TCP_QUEUE_OOSEQ */
/* Check if this PCB has stayed too long in SYN-RCVD */
if (pcb->state == SYN_RCVD) {
8012b7e: 6afb ldr r3, [r7, #44] ; 0x2c
8012b80: 7d1b ldrb r3, [r3, #20]
8012b82: 2b03 cmp r3, #3
8012b84: d10b bne.n 8012b9e <tcp_slowtmr+0x412>
if ((u32_t)(tcp_ticks - pcb->tmr) >
8012b86: 4b61 ldr r3, [pc, #388] ; (8012d0c <tcp_slowtmr+0x580>)
8012b88: 681a ldr r2, [r3, #0]
8012b8a: 6afb ldr r3, [r7, #44] ; 0x2c
8012b8c: 6a1b ldr r3, [r3, #32]
8012b8e: 1ad3 subs r3, r2, r3
8012b90: 2b28 cmp r3, #40 ; 0x28
8012b92: d904 bls.n 8012b9e <tcp_slowtmr+0x412>
TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
8012b94: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012b98: 3301 adds r3, #1
8012b9a: 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) {
8012b9e: 6afb ldr r3, [r7, #44] ; 0x2c
8012ba0: 7d1b ldrb r3, [r3, #20]
8012ba2: 2b09 cmp r3, #9
8012ba4: d10b bne.n 8012bbe <tcp_slowtmr+0x432>
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
8012ba6: 4b59 ldr r3, [pc, #356] ; (8012d0c <tcp_slowtmr+0x580>)
8012ba8: 681a ldr r2, [r3, #0]
8012baa: 6afb ldr r3, [r7, #44] ; 0x2c
8012bac: 6a1b ldr r3, [r3, #32]
8012bae: 1ad3 subs r3, r2, r3
8012bb0: 2bf0 cmp r3, #240 ; 0xf0
8012bb2: d904 bls.n 8012bbe <tcp_slowtmr+0x432>
++pcb_remove;
8012bb4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012bb8: 3301 adds r3, #1
8012bba: 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) {
8012bbe: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012bc2: 2b00 cmp r3, #0
8012bc4: d060 beq.n 8012c88 <tcp_slowtmr+0x4fc>
struct tcp_pcb *pcb2;
#if LWIP_CALLBACK_API
tcp_err_fn err_fn = pcb->errf;
8012bc6: 6afb ldr r3, [r7, #44] ; 0x2c
8012bc8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8012bcc: 60fb str r3, [r7, #12]
#endif /* LWIP_CALLBACK_API */
void *err_arg;
enum tcp_state last_state;
tcp_pcb_purge(pcb);
8012bce: 6af8 ldr r0, [r7, #44] ; 0x2c
8012bd0: f000 fbfa bl 80133c8 <tcp_pcb_purge>
/* Remove PCB from tcp_active_pcbs list. */
if (prev != NULL) {
8012bd4: 6abb ldr r3, [r7, #40] ; 0x28
8012bd6: 2b00 cmp r3, #0
8012bd8: d010 beq.n 8012bfc <tcp_slowtmr+0x470>
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
8012bda: 4b50 ldr r3, [pc, #320] ; (8012d1c <tcp_slowtmr+0x590>)
8012bdc: 681b ldr r3, [r3, #0]
8012bde: 6afa ldr r2, [r7, #44] ; 0x2c
8012be0: 429a cmp r2, r3
8012be2: d106 bne.n 8012bf2 <tcp_slowtmr+0x466>
8012be4: 4b4e ldr r3, [pc, #312] ; (8012d20 <tcp_slowtmr+0x594>)
8012be6: f240 526d movw r2, #1389 ; 0x56d
8012bea: 494e ldr r1, [pc, #312] ; (8012d24 <tcp_slowtmr+0x598>)
8012bec: 484e ldr r0, [pc, #312] ; (8012d28 <tcp_slowtmr+0x59c>)
8012bee: f009 fcab bl 801c548 <iprintf>
prev->next = pcb->next;
8012bf2: 6afb ldr r3, [r7, #44] ; 0x2c
8012bf4: 68da ldr r2, [r3, #12]
8012bf6: 6abb ldr r3, [r7, #40] ; 0x28
8012bf8: 60da str r2, [r3, #12]
8012bfa: e00f b.n 8012c1c <tcp_slowtmr+0x490>
} else {
/* This PCB was the first. */
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb);
8012bfc: 4b47 ldr r3, [pc, #284] ; (8012d1c <tcp_slowtmr+0x590>)
8012bfe: 681b ldr r3, [r3, #0]
8012c00: 6afa ldr r2, [r7, #44] ; 0x2c
8012c02: 429a cmp r2, r3
8012c04: d006 beq.n 8012c14 <tcp_slowtmr+0x488>
8012c06: 4b46 ldr r3, [pc, #280] ; (8012d20 <tcp_slowtmr+0x594>)
8012c08: f240 5271 movw r2, #1393 ; 0x571
8012c0c: 4947 ldr r1, [pc, #284] ; (8012d2c <tcp_slowtmr+0x5a0>)
8012c0e: 4846 ldr r0, [pc, #280] ; (8012d28 <tcp_slowtmr+0x59c>)
8012c10: f009 fc9a bl 801c548 <iprintf>
tcp_active_pcbs = pcb->next;
8012c14: 6afb ldr r3, [r7, #44] ; 0x2c
8012c16: 68db ldr r3, [r3, #12]
8012c18: 4a40 ldr r2, [pc, #256] ; (8012d1c <tcp_slowtmr+0x590>)
8012c1a: 6013 str r3, [r2, #0]
}
if (pcb_reset) {
8012c1c: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8012c20: 2b00 cmp r3, #0
8012c22: d013 beq.n 8012c4c <tcp_slowtmr+0x4c0>
tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
8012c24: 6afb ldr r3, [r7, #44] ; 0x2c
8012c26: 6d18 ldr r0, [r3, #80] ; 0x50
8012c28: 6afb ldr r3, [r7, #44] ; 0x2c
8012c2a: 6a5c ldr r4, [r3, #36] ; 0x24
8012c2c: 6afd ldr r5, [r7, #44] ; 0x2c
8012c2e: 6afb ldr r3, [r7, #44] ; 0x2c
8012c30: 3304 adds r3, #4
8012c32: 6afa ldr r2, [r7, #44] ; 0x2c
8012c34: 8ad2 ldrh r2, [r2, #22]
8012c36: 6af9 ldr r1, [r7, #44] ; 0x2c
8012c38: 8b09 ldrh r1, [r1, #24]
8012c3a: 9102 str r1, [sp, #8]
8012c3c: 9201 str r2, [sp, #4]
8012c3e: 9300 str r3, [sp, #0]
8012c40: 462b mov r3, r5
8012c42: 4622 mov r2, r4
8012c44: 4601 mov r1, r0
8012c46: 6af8 ldr r0, [r7, #44] ; 0x2c
8012c48: f004 f992 bl 8016f70 <tcp_rst>
pcb->local_port, pcb->remote_port);
}
err_arg = pcb->callback_arg;
8012c4c: 6afb ldr r3, [r7, #44] ; 0x2c
8012c4e: 691b ldr r3, [r3, #16]
8012c50: 60bb str r3, [r7, #8]
last_state = pcb->state;
8012c52: 6afb ldr r3, [r7, #44] ; 0x2c
8012c54: 7d1b ldrb r3, [r3, #20]
8012c56: 71fb strb r3, [r7, #7]
pcb2 = pcb;
8012c58: 6afb ldr r3, [r7, #44] ; 0x2c
8012c5a: 603b str r3, [r7, #0]
pcb = pcb->next;
8012c5c: 6afb ldr r3, [r7, #44] ; 0x2c
8012c5e: 68db ldr r3, [r3, #12]
8012c60: 62fb str r3, [r7, #44] ; 0x2c
tcp_free(pcb2);
8012c62: 6838 ldr r0, [r7, #0]
8012c64: f7ff f9fc bl 8012060 <tcp_free>
tcp_active_pcbs_changed = 0;
8012c68: 4b31 ldr r3, [pc, #196] ; (8012d30 <tcp_slowtmr+0x5a4>)
8012c6a: 2200 movs r2, #0
8012c6c: 701a strb r2, [r3, #0]
TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT);
8012c6e: 68fb ldr r3, [r7, #12]
8012c70: 2b00 cmp r3, #0
8012c72: d004 beq.n 8012c7e <tcp_slowtmr+0x4f2>
8012c74: 68fb ldr r3, [r7, #12]
8012c76: f06f 010c mvn.w r1, #12
8012c7a: 68b8 ldr r0, [r7, #8]
8012c7c: 4798 blx r3
if (tcp_active_pcbs_changed) {
8012c7e: 4b2c ldr r3, [pc, #176] ; (8012d30 <tcp_slowtmr+0x5a4>)
8012c80: 781b ldrb r3, [r3, #0]
8012c82: 2b00 cmp r3, #0
8012c84: d037 beq.n 8012cf6 <tcp_slowtmr+0x56a>
goto tcp_slowtmr_start;
8012c86: e592 b.n 80127ae <tcp_slowtmr+0x22>
}
} else {
/* get the 'next' element now and work with 'prev' below (in case of abort) */
prev = pcb;
8012c88: 6afb ldr r3, [r7, #44] ; 0x2c
8012c8a: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
8012c8c: 6afb ldr r3, [r7, #44] ; 0x2c
8012c8e: 68db ldr r3, [r3, #12]
8012c90: 62fb str r3, [r7, #44] ; 0x2c
/* We check if we should poll the connection. */
++prev->polltmr;
8012c92: 6abb ldr r3, [r7, #40] ; 0x28
8012c94: 7f1b ldrb r3, [r3, #28]
8012c96: 3301 adds r3, #1
8012c98: b2da uxtb r2, r3
8012c9a: 6abb ldr r3, [r7, #40] ; 0x28
8012c9c: 771a strb r2, [r3, #28]
if (prev->polltmr >= prev->pollinterval) {
8012c9e: 6abb ldr r3, [r7, #40] ; 0x28
8012ca0: 7f1a ldrb r2, [r3, #28]
8012ca2: 6abb ldr r3, [r7, #40] ; 0x28
8012ca4: 7f5b ldrb r3, [r3, #29]
8012ca6: 429a cmp r2, r3
8012ca8: d325 bcc.n 8012cf6 <tcp_slowtmr+0x56a>
prev->polltmr = 0;
8012caa: 6abb ldr r3, [r7, #40] ; 0x28
8012cac: 2200 movs r2, #0
8012cae: 771a strb r2, [r3, #28]
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n"));
tcp_active_pcbs_changed = 0;
8012cb0: 4b1f ldr r3, [pc, #124] ; (8012d30 <tcp_slowtmr+0x5a4>)
8012cb2: 2200 movs r2, #0
8012cb4: 701a strb r2, [r3, #0]
TCP_EVENT_POLL(prev, err);
8012cb6: 6abb ldr r3, [r7, #40] ; 0x28
8012cb8: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8012cbc: 2b00 cmp r3, #0
8012cbe: d00b beq.n 8012cd8 <tcp_slowtmr+0x54c>
8012cc0: 6abb ldr r3, [r7, #40] ; 0x28
8012cc2: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
8012cc6: 6aba ldr r2, [r7, #40] ; 0x28
8012cc8: 6912 ldr r2, [r2, #16]
8012cca: 6ab9 ldr r1, [r7, #40] ; 0x28
8012ccc: 4610 mov r0, r2
8012cce: 4798 blx r3
8012cd0: 4603 mov r3, r0
8012cd2: f887 3025 strb.w r3, [r7, #37] ; 0x25
8012cd6: e002 b.n 8012cde <tcp_slowtmr+0x552>
8012cd8: 2300 movs r3, #0
8012cda: f887 3025 strb.w r3, [r7, #37] ; 0x25
if (tcp_active_pcbs_changed) {
8012cde: 4b14 ldr r3, [pc, #80] ; (8012d30 <tcp_slowtmr+0x5a4>)
8012ce0: 781b ldrb r3, [r3, #0]
8012ce2: 2b00 cmp r3, #0
8012ce4: d000 beq.n 8012ce8 <tcp_slowtmr+0x55c>
goto tcp_slowtmr_start;
8012ce6: e562 b.n 80127ae <tcp_slowtmr+0x22>
}
/* if err == ERR_ABRT, 'prev' is already deallocated */
if (err == ERR_OK) {
8012ce8: f997 3025 ldrsb.w r3, [r7, #37] ; 0x25
8012cec: 2b00 cmp r3, #0
8012cee: d102 bne.n 8012cf6 <tcp_slowtmr+0x56a>
tcp_output(prev);
8012cf0: 6ab8 ldr r0, [r7, #40] ; 0x28
8012cf2: f003 fb77 bl 80163e4 <tcp_output>
while (pcb != NULL) {
8012cf6: 6afb ldr r3, [r7, #44] ; 0x2c
8012cf8: 2b00 cmp r3, #0
8012cfa: f47f ad5e bne.w 80127ba <tcp_slowtmr+0x2e>
}
}
/* Steps through all of the TIME-WAIT PCBs. */
prev = NULL;
8012cfe: 2300 movs r3, #0
8012d00: 62bb str r3, [r7, #40] ; 0x28
pcb = tcp_tw_pcbs;
8012d02: 4b0c ldr r3, [pc, #48] ; (8012d34 <tcp_slowtmr+0x5a8>)
8012d04: 681b ldr r3, [r3, #0]
8012d06: 62fb str r3, [r7, #44] ; 0x2c
while (pcb != NULL) {
8012d08: e069 b.n 8012dde <tcp_slowtmr+0x652>
8012d0a: bf00 nop
8012d0c: 2000f7ec .word 0x2000f7ec
8012d10: 000a4cb8 .word 0x000a4cb8
8012d14: 10624dd3 .word 0x10624dd3
8012d18: 000124f8 .word 0x000124f8
8012d1c: 2000f7e8 .word 0x2000f7e8
8012d20: 0801e3c8 .word 0x0801e3c8
8012d24: 0801e800 .word 0x0801e800
8012d28: 0801e40c .word 0x0801e40c
8012d2c: 0801e82c .word 0x0801e82c
8012d30: 2000f7e4 .word 0x2000f7e4
8012d34: 2000f7f8 .word 0x2000f7f8
LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
8012d38: 6afb ldr r3, [r7, #44] ; 0x2c
8012d3a: 7d1b ldrb r3, [r3, #20]
8012d3c: 2b0a cmp r3, #10
8012d3e: d006 beq.n 8012d4e <tcp_slowtmr+0x5c2>
8012d40: 4b2a ldr r3, [pc, #168] ; (8012dec <tcp_slowtmr+0x660>)
8012d42: f240 52a1 movw r2, #1441 ; 0x5a1
8012d46: 492a ldr r1, [pc, #168] ; (8012df0 <tcp_slowtmr+0x664>)
8012d48: 482a ldr r0, [pc, #168] ; (8012df4 <tcp_slowtmr+0x668>)
8012d4a: f009 fbfd bl 801c548 <iprintf>
pcb_remove = 0;
8012d4e: 2300 movs r3, #0
8012d50: 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) {
8012d54: 4b28 ldr r3, [pc, #160] ; (8012df8 <tcp_slowtmr+0x66c>)
8012d56: 681a ldr r2, [r3, #0]
8012d58: 6afb ldr r3, [r7, #44] ; 0x2c
8012d5a: 6a1b ldr r3, [r3, #32]
8012d5c: 1ad3 subs r3, r2, r3
8012d5e: 2bf0 cmp r3, #240 ; 0xf0
8012d60: d904 bls.n 8012d6c <tcp_slowtmr+0x5e0>
++pcb_remove;
8012d62: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012d66: 3301 adds r3, #1
8012d68: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
/* If the PCB should be removed, do it. */
if (pcb_remove) {
8012d6c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8012d70: 2b00 cmp r3, #0
8012d72: d02f beq.n 8012dd4 <tcp_slowtmr+0x648>
struct tcp_pcb *pcb2;
tcp_pcb_purge(pcb);
8012d74: 6af8 ldr r0, [r7, #44] ; 0x2c
8012d76: f000 fb27 bl 80133c8 <tcp_pcb_purge>
/* Remove PCB from tcp_tw_pcbs list. */
if (prev != NULL) {
8012d7a: 6abb ldr r3, [r7, #40] ; 0x28
8012d7c: 2b00 cmp r3, #0
8012d7e: d010 beq.n 8012da2 <tcp_slowtmr+0x616>
LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
8012d80: 4b1e ldr r3, [pc, #120] ; (8012dfc <tcp_slowtmr+0x670>)
8012d82: 681b ldr r3, [r3, #0]
8012d84: 6afa ldr r2, [r7, #44] ; 0x2c
8012d86: 429a cmp r2, r3
8012d88: d106 bne.n 8012d98 <tcp_slowtmr+0x60c>
8012d8a: 4b18 ldr r3, [pc, #96] ; (8012dec <tcp_slowtmr+0x660>)
8012d8c: f240 52af movw r2, #1455 ; 0x5af
8012d90: 491b ldr r1, [pc, #108] ; (8012e00 <tcp_slowtmr+0x674>)
8012d92: 4818 ldr r0, [pc, #96] ; (8012df4 <tcp_slowtmr+0x668>)
8012d94: f009 fbd8 bl 801c548 <iprintf>
prev->next = pcb->next;
8012d98: 6afb ldr r3, [r7, #44] ; 0x2c
8012d9a: 68da ldr r2, [r3, #12]
8012d9c: 6abb ldr r3, [r7, #40] ; 0x28
8012d9e: 60da str r2, [r3, #12]
8012da0: e00f b.n 8012dc2 <tcp_slowtmr+0x636>
} else {
/* This PCB was the first. */
LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb);
8012da2: 4b16 ldr r3, [pc, #88] ; (8012dfc <tcp_slowtmr+0x670>)
8012da4: 681b ldr r3, [r3, #0]
8012da6: 6afa ldr r2, [r7, #44] ; 0x2c
8012da8: 429a cmp r2, r3
8012daa: d006 beq.n 8012dba <tcp_slowtmr+0x62e>
8012dac: 4b0f ldr r3, [pc, #60] ; (8012dec <tcp_slowtmr+0x660>)
8012dae: f240 52b3 movw r2, #1459 ; 0x5b3
8012db2: 4914 ldr r1, [pc, #80] ; (8012e04 <tcp_slowtmr+0x678>)
8012db4: 480f ldr r0, [pc, #60] ; (8012df4 <tcp_slowtmr+0x668>)
8012db6: f009 fbc7 bl 801c548 <iprintf>
tcp_tw_pcbs = pcb->next;
8012dba: 6afb ldr r3, [r7, #44] ; 0x2c
8012dbc: 68db ldr r3, [r3, #12]
8012dbe: 4a0f ldr r2, [pc, #60] ; (8012dfc <tcp_slowtmr+0x670>)
8012dc0: 6013 str r3, [r2, #0]
}
pcb2 = pcb;
8012dc2: 6afb ldr r3, [r7, #44] ; 0x2c
8012dc4: 61fb str r3, [r7, #28]
pcb = pcb->next;
8012dc6: 6afb ldr r3, [r7, #44] ; 0x2c
8012dc8: 68db ldr r3, [r3, #12]
8012dca: 62fb str r3, [r7, #44] ; 0x2c
tcp_free(pcb2);
8012dcc: 69f8 ldr r0, [r7, #28]
8012dce: f7ff f947 bl 8012060 <tcp_free>
8012dd2: e004 b.n 8012dde <tcp_slowtmr+0x652>
} else {
prev = pcb;
8012dd4: 6afb ldr r3, [r7, #44] ; 0x2c
8012dd6: 62bb str r3, [r7, #40] ; 0x28
pcb = pcb->next;
8012dd8: 6afb ldr r3, [r7, #44] ; 0x2c
8012dda: 68db ldr r3, [r3, #12]
8012ddc: 62fb str r3, [r7, #44] ; 0x2c
while (pcb != NULL) {
8012dde: 6afb ldr r3, [r7, #44] ; 0x2c
8012de0: 2b00 cmp r3, #0
8012de2: d1a9 bne.n 8012d38 <tcp_slowtmr+0x5ac>
}
}
}
8012de4: bf00 nop
8012de6: 3730 adds r7, #48 ; 0x30
8012de8: 46bd mov sp, r7
8012dea: bdb0 pop {r4, r5, r7, pc}
8012dec: 0801e3c8 .word 0x0801e3c8
8012df0: 0801e858 .word 0x0801e858
8012df4: 0801e40c .word 0x0801e40c
8012df8: 2000f7ec .word 0x2000f7ec
8012dfc: 2000f7f8 .word 0x2000f7f8
8012e00: 0801e888 .word 0x0801e888
8012e04: 0801e8b0 .word 0x0801e8b0
08012e08 <tcp_fasttmr>:
*
* Automatically called from tcp_tmr().
*/
void
tcp_fasttmr(void)
{
8012e08: b580 push {r7, lr}
8012e0a: b082 sub sp, #8
8012e0c: af00 add r7, sp, #0
struct tcp_pcb *pcb;
++tcp_timer_ctr;
8012e0e: 4b2d ldr r3, [pc, #180] ; (8012ec4 <tcp_fasttmr+0xbc>)
8012e10: 781b ldrb r3, [r3, #0]
8012e12: 3301 adds r3, #1
8012e14: b2da uxtb r2, r3
8012e16: 4b2b ldr r3, [pc, #172] ; (8012ec4 <tcp_fasttmr+0xbc>)
8012e18: 701a strb r2, [r3, #0]
tcp_fasttmr_start:
pcb = tcp_active_pcbs;
8012e1a: 4b2b ldr r3, [pc, #172] ; (8012ec8 <tcp_fasttmr+0xc0>)
8012e1c: 681b ldr r3, [r3, #0]
8012e1e: 607b str r3, [r7, #4]
while (pcb != NULL) {
8012e20: e048 b.n 8012eb4 <tcp_fasttmr+0xac>
if (pcb->last_timer != tcp_timer_ctr) {
8012e22: 687b ldr r3, [r7, #4]
8012e24: 7f9a ldrb r2, [r3, #30]
8012e26: 4b27 ldr r3, [pc, #156] ; (8012ec4 <tcp_fasttmr+0xbc>)
8012e28: 781b ldrb r3, [r3, #0]
8012e2a: 429a cmp r2, r3
8012e2c: d03f beq.n 8012eae <tcp_fasttmr+0xa6>
struct tcp_pcb *next;
pcb->last_timer = tcp_timer_ctr;
8012e2e: 4b25 ldr r3, [pc, #148] ; (8012ec4 <tcp_fasttmr+0xbc>)
8012e30: 781a ldrb r2, [r3, #0]
8012e32: 687b ldr r3, [r7, #4]
8012e34: 779a strb r2, [r3, #30]
/* send delayed ACKs */
if (pcb->flags & TF_ACK_DELAY) {
8012e36: 687b ldr r3, [r7, #4]
8012e38: 8b5b ldrh r3, [r3, #26]
8012e3a: f003 0301 and.w r3, r3, #1
8012e3e: 2b00 cmp r3, #0
8012e40: d010 beq.n 8012e64 <tcp_fasttmr+0x5c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n"));
tcp_ack_now(pcb);
8012e42: 687b ldr r3, [r7, #4]
8012e44: 8b5b ldrh r3, [r3, #26]
8012e46: f043 0302 orr.w r3, r3, #2
8012e4a: b29a uxth r2, r3
8012e4c: 687b ldr r3, [r7, #4]
8012e4e: 835a strh r2, [r3, #26]
tcp_output(pcb);
8012e50: 6878 ldr r0, [r7, #4]
8012e52: f003 fac7 bl 80163e4 <tcp_output>
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8012e56: 687b ldr r3, [r7, #4]
8012e58: 8b5b ldrh r3, [r3, #26]
8012e5a: f023 0303 bic.w r3, r3, #3
8012e5e: b29a uxth r2, r3
8012e60: 687b ldr r3, [r7, #4]
8012e62: 835a strh r2, [r3, #26]
}
/* send pending FIN */
if (pcb->flags & TF_CLOSEPEND) {
8012e64: 687b ldr r3, [r7, #4]
8012e66: 8b5b ldrh r3, [r3, #26]
8012e68: f003 0308 and.w r3, r3, #8
8012e6c: 2b00 cmp r3, #0
8012e6e: d009 beq.n 8012e84 <tcp_fasttmr+0x7c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n"));
tcp_clear_flags(pcb, TF_CLOSEPEND);
8012e70: 687b ldr r3, [r7, #4]
8012e72: 8b5b ldrh r3, [r3, #26]
8012e74: f023 0308 bic.w r3, r3, #8
8012e78: b29a uxth r2, r3
8012e7a: 687b ldr r3, [r7, #4]
8012e7c: 835a strh r2, [r3, #26]
tcp_close_shutdown_fin(pcb);
8012e7e: 6878 ldr r0, [r7, #4]
8012e80: f7ff fa7e bl 8012380 <tcp_close_shutdown_fin>
}
next = pcb->next;
8012e84: 687b ldr r3, [r7, #4]
8012e86: 68db ldr r3, [r3, #12]
8012e88: 603b str r3, [r7, #0]
/* If there is data which was previously "refused" by upper layer */
if (pcb->refused_data != NULL) {
8012e8a: 687b ldr r3, [r7, #4]
8012e8c: 6f9b ldr r3, [r3, #120] ; 0x78
8012e8e: 2b00 cmp r3, #0
8012e90: d00a beq.n 8012ea8 <tcp_fasttmr+0xa0>
tcp_active_pcbs_changed = 0;
8012e92: 4b0e ldr r3, [pc, #56] ; (8012ecc <tcp_fasttmr+0xc4>)
8012e94: 2200 movs r2, #0
8012e96: 701a strb r2, [r3, #0]
tcp_process_refused_data(pcb);
8012e98: 6878 ldr r0, [r7, #4]
8012e9a: f000 f819 bl 8012ed0 <tcp_process_refused_data>
if (tcp_active_pcbs_changed) {
8012e9e: 4b0b ldr r3, [pc, #44] ; (8012ecc <tcp_fasttmr+0xc4>)
8012ea0: 781b ldrb r3, [r3, #0]
8012ea2: 2b00 cmp r3, #0
8012ea4: d000 beq.n 8012ea8 <tcp_fasttmr+0xa0>
/* application callback has changed the pcb list: restart the loop */
goto tcp_fasttmr_start;
8012ea6: e7b8 b.n 8012e1a <tcp_fasttmr+0x12>
}
}
pcb = next;
8012ea8: 683b ldr r3, [r7, #0]
8012eaa: 607b str r3, [r7, #4]
8012eac: e002 b.n 8012eb4 <tcp_fasttmr+0xac>
} else {
pcb = pcb->next;
8012eae: 687b ldr r3, [r7, #4]
8012eb0: 68db ldr r3, [r3, #12]
8012eb2: 607b str r3, [r7, #4]
while (pcb != NULL) {
8012eb4: 687b ldr r3, [r7, #4]
8012eb6: 2b00 cmp r3, #0
8012eb8: d1b3 bne.n 8012e22 <tcp_fasttmr+0x1a>
}
}
}
8012eba: bf00 nop
8012ebc: 3708 adds r7, #8
8012ebe: 46bd mov sp, r7
8012ec0: bd80 pop {r7, pc}
8012ec2: bf00 nop
8012ec4: 20008716 .word 0x20008716
8012ec8: 2000f7e8 .word 0x2000f7e8
8012ecc: 2000f7e4 .word 0x2000f7e4
08012ed0 <tcp_process_refused_data>:
}
/** Pass pcb->refused_data to the recv callback */
err_t
tcp_process_refused_data(struct tcp_pcb *pcb)
{
8012ed0: b590 push {r4, r7, lr}
8012ed2: b085 sub sp, #20
8012ed4: af00 add r7, sp, #0
8012ed6: 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);
8012ed8: 687b ldr r3, [r7, #4]
8012eda: 2b00 cmp r3, #0
8012edc: d109 bne.n 8012ef2 <tcp_process_refused_data+0x22>
8012ede: 4b37 ldr r3, [pc, #220] ; (8012fbc <tcp_process_refused_data+0xec>)
8012ee0: f240 6209 movw r2, #1545 ; 0x609
8012ee4: 4936 ldr r1, [pc, #216] ; (8012fc0 <tcp_process_refused_data+0xf0>)
8012ee6: 4837 ldr r0, [pc, #220] ; (8012fc4 <tcp_process_refused_data+0xf4>)
8012ee8: f009 fb2e bl 801c548 <iprintf>
8012eec: f06f 030f mvn.w r3, #15
8012ef0: e060 b.n 8012fb4 <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;
8012ef2: 687b ldr r3, [r7, #4]
8012ef4: 6f9b ldr r3, [r3, #120] ; 0x78
8012ef6: 7b5b ldrb r3, [r3, #13]
8012ef8: 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;
8012efa: 687b ldr r3, [r7, #4]
8012efc: 6f9b ldr r3, [r3, #120] ; 0x78
8012efe: 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;
8012f00: 687b ldr r3, [r7, #4]
8012f02: 2200 movs r2, #0
8012f04: 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);
8012f06: 687b ldr r3, [r7, #4]
8012f08: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8012f0c: 2b00 cmp r3, #0
8012f0e: d00b beq.n 8012f28 <tcp_process_refused_data+0x58>
8012f10: 687b ldr r3, [r7, #4]
8012f12: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8012f16: 687b ldr r3, [r7, #4]
8012f18: 6918 ldr r0, [r3, #16]
8012f1a: 2300 movs r3, #0
8012f1c: 68ba ldr r2, [r7, #8]
8012f1e: 6879 ldr r1, [r7, #4]
8012f20: 47a0 blx r4
8012f22: 4603 mov r3, r0
8012f24: 73fb strb r3, [r7, #15]
8012f26: e007 b.n 8012f38 <tcp_process_refused_data+0x68>
8012f28: 2300 movs r3, #0
8012f2a: 68ba ldr r2, [r7, #8]
8012f2c: 6879 ldr r1, [r7, #4]
8012f2e: 2000 movs r0, #0
8012f30: f000 f8a2 bl 8013078 <tcp_recv_null>
8012f34: 4603 mov r3, r0
8012f36: 73fb strb r3, [r7, #15]
if (err == ERR_OK) {
8012f38: f997 300f ldrsb.w r3, [r7, #15]
8012f3c: 2b00 cmp r3, #0
8012f3e: d12a bne.n 8012f96 <tcp_process_refused_data+0xc6>
/* did refused_data include a FIN? */
if ((refused_flags & PBUF_FLAG_TCP_FIN)
8012f40: 7bbb ldrb r3, [r7, #14]
8012f42: f003 0320 and.w r3, r3, #32
8012f46: 2b00 cmp r3, #0
8012f48: d033 beq.n 8012fb2 <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)) {
8012f4a: 687b ldr r3, [r7, #4]
8012f4c: 8d1b ldrh r3, [r3, #40] ; 0x28
8012f4e: f5b3 6f06 cmp.w r3, #2144 ; 0x860
8012f52: d005 beq.n 8012f60 <tcp_process_refused_data+0x90>
pcb->rcv_wnd++;
8012f54: 687b ldr r3, [r7, #4]
8012f56: 8d1b ldrh r3, [r3, #40] ; 0x28
8012f58: 3301 adds r3, #1
8012f5a: b29a uxth r2, r3
8012f5c: 687b ldr r3, [r7, #4]
8012f5e: 851a strh r2, [r3, #40] ; 0x28
}
TCP_EVENT_CLOSED(pcb, err);
8012f60: 687b ldr r3, [r7, #4]
8012f62: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8012f66: 2b00 cmp r3, #0
8012f68: d00b beq.n 8012f82 <tcp_process_refused_data+0xb2>
8012f6a: 687b ldr r3, [r7, #4]
8012f6c: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8012f70: 687b ldr r3, [r7, #4]
8012f72: 6918 ldr r0, [r3, #16]
8012f74: 2300 movs r3, #0
8012f76: 2200 movs r2, #0
8012f78: 6879 ldr r1, [r7, #4]
8012f7a: 47a0 blx r4
8012f7c: 4603 mov r3, r0
8012f7e: 73fb strb r3, [r7, #15]
8012f80: e001 b.n 8012f86 <tcp_process_refused_data+0xb6>
8012f82: 2300 movs r3, #0
8012f84: 73fb strb r3, [r7, #15]
if (err == ERR_ABRT) {
8012f86: f997 300f ldrsb.w r3, [r7, #15]
8012f8a: f113 0f0d cmn.w r3, #13
8012f8e: d110 bne.n 8012fb2 <tcp_process_refused_data+0xe2>
return ERR_ABRT;
8012f90: f06f 030c mvn.w r3, #12
8012f94: e00e b.n 8012fb4 <tcp_process_refused_data+0xe4>
}
}
} else if (err == ERR_ABRT) {
8012f96: f997 300f ldrsb.w r3, [r7, #15]
8012f9a: f113 0f0d cmn.w r3, #13
8012f9e: d102 bne.n 8012fa6 <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;
8012fa0: f06f 030c mvn.w r3, #12
8012fa4: e006 b.n 8012fb4 <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;
8012fa6: 687b ldr r3, [r7, #4]
8012fa8: 68ba ldr r2, [r7, #8]
8012faa: 679a str r2, [r3, #120] ; 0x78
return ERR_INPROGRESS;
8012fac: f06f 0304 mvn.w r3, #4
8012fb0: e000 b.n 8012fb4 <tcp_process_refused_data+0xe4>
}
}
return ERR_OK;
8012fb2: 2300 movs r3, #0
}
8012fb4: 4618 mov r0, r3
8012fb6: 3714 adds r7, #20
8012fb8: 46bd mov sp, r7
8012fba: bd90 pop {r4, r7, pc}
8012fbc: 0801e3c8 .word 0x0801e3c8
8012fc0: 0801e8d8 .word 0x0801e8d8
8012fc4: 0801e40c .word 0x0801e40c
08012fc8 <tcp_segs_free>:
*
* @param seg tcp_seg list of TCP segments to free
*/
void
tcp_segs_free(struct tcp_seg *seg)
{
8012fc8: b580 push {r7, lr}
8012fca: b084 sub sp, #16
8012fcc: af00 add r7, sp, #0
8012fce: 6078 str r0, [r7, #4]
while (seg != NULL) {
8012fd0: e007 b.n 8012fe2 <tcp_segs_free+0x1a>
struct tcp_seg *next = seg->next;
8012fd2: 687b ldr r3, [r7, #4]
8012fd4: 681b ldr r3, [r3, #0]
8012fd6: 60fb str r3, [r7, #12]
tcp_seg_free(seg);
8012fd8: 6878 ldr r0, [r7, #4]
8012fda: f000 f809 bl 8012ff0 <tcp_seg_free>
seg = next;
8012fde: 68fb ldr r3, [r7, #12]
8012fe0: 607b str r3, [r7, #4]
while (seg != NULL) {
8012fe2: 687b ldr r3, [r7, #4]
8012fe4: 2b00 cmp r3, #0
8012fe6: d1f4 bne.n 8012fd2 <tcp_segs_free+0xa>
}
}
8012fe8: bf00 nop
8012fea: 3710 adds r7, #16
8012fec: 46bd mov sp, r7
8012fee: bd80 pop {r7, pc}
08012ff0 <tcp_seg_free>:
*
* @param seg single tcp_seg to free
*/
void
tcp_seg_free(struct tcp_seg *seg)
{
8012ff0: b580 push {r7, lr}
8012ff2: b082 sub sp, #8
8012ff4: af00 add r7, sp, #0
8012ff6: 6078 str r0, [r7, #4]
if (seg != NULL) {
8012ff8: 687b ldr r3, [r7, #4]
8012ffa: 2b00 cmp r3, #0
8012ffc: d00c beq.n 8013018 <tcp_seg_free+0x28>
if (seg->p != NULL) {
8012ffe: 687b ldr r3, [r7, #4]
8013000: 685b ldr r3, [r3, #4]
8013002: 2b00 cmp r3, #0
8013004: d004 beq.n 8013010 <tcp_seg_free+0x20>
pbuf_free(seg->p);
8013006: 687b ldr r3, [r7, #4]
8013008: 685b ldr r3, [r3, #4]
801300a: 4618 mov r0, r3
801300c: f7fe fd6c bl 8011ae8 <pbuf_free>
#if TCP_DEBUG
seg->p = NULL;
#endif /* TCP_DEBUG */
}
memp_free(MEMP_TCP_SEG, seg);
8013010: 6879 ldr r1, [r7, #4]
8013012: 2003 movs r0, #3
8013014: f7fd febc bl 8010d90 <memp_free>
}
}
8013018: bf00 nop
801301a: 3708 adds r7, #8
801301c: 46bd mov sp, r7
801301e: bd80 pop {r7, pc}
08013020 <tcp_seg_copy>:
* @param seg the old tcp_seg
* @return a copy of seg
*/
struct tcp_seg *
tcp_seg_copy(struct tcp_seg *seg)
{
8013020: b580 push {r7, lr}
8013022: b084 sub sp, #16
8013024: af00 add r7, sp, #0
8013026: 6078 str r0, [r7, #4]
struct tcp_seg *cseg;
LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
8013028: 687b ldr r3, [r7, #4]
801302a: 2b00 cmp r3, #0
801302c: d106 bne.n 801303c <tcp_seg_copy+0x1c>
801302e: 4b0f ldr r3, [pc, #60] ; (801306c <tcp_seg_copy+0x4c>)
8013030: f240 6282 movw r2, #1666 ; 0x682
8013034: 490e ldr r1, [pc, #56] ; (8013070 <tcp_seg_copy+0x50>)
8013036: 480f ldr r0, [pc, #60] ; (8013074 <tcp_seg_copy+0x54>)
8013038: f009 fa86 bl 801c548 <iprintf>
cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG);
801303c: 2003 movs r0, #3
801303e: f7fd fe55 bl 8010cec <memp_malloc>
8013042: 60f8 str r0, [r7, #12]
if (cseg == NULL) {
8013044: 68fb ldr r3, [r7, #12]
8013046: 2b00 cmp r3, #0
8013048: d101 bne.n 801304e <tcp_seg_copy+0x2e>
return NULL;
801304a: 2300 movs r3, #0
801304c: e00a b.n 8013064 <tcp_seg_copy+0x44>
}
SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg));
801304e: 2210 movs r2, #16
8013050: 6879 ldr r1, [r7, #4]
8013052: 68f8 ldr r0, [r7, #12]
8013054: f009 fa4b bl 801c4ee <memcpy>
pbuf_ref(cseg->p);
8013058: 68fb ldr r3, [r7, #12]
801305a: 685b ldr r3, [r3, #4]
801305c: 4618 mov r0, r3
801305e: f7fe fde9 bl 8011c34 <pbuf_ref>
return cseg;
8013062: 68fb ldr r3, [r7, #12]
}
8013064: 4618 mov r0, r3
8013066: 3710 adds r7, #16
8013068: 46bd mov sp, r7
801306a: bd80 pop {r7, pc}
801306c: 0801e3c8 .word 0x0801e3c8
8013070: 0801e91c .word 0x0801e91c
8013074: 0801e40c .word 0x0801e40c
08013078 <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)
{
8013078: b580 push {r7, lr}
801307a: b084 sub sp, #16
801307c: af00 add r7, sp, #0
801307e: 60f8 str r0, [r7, #12]
8013080: 60b9 str r1, [r7, #8]
8013082: 607a str r2, [r7, #4]
8013084: 70fb strb r3, [r7, #3]
LWIP_UNUSED_ARG(arg);
LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
8013086: 68bb ldr r3, [r7, #8]
8013088: 2b00 cmp r3, #0
801308a: d109 bne.n 80130a0 <tcp_recv_null+0x28>
801308c: 4b12 ldr r3, [pc, #72] ; (80130d8 <tcp_recv_null+0x60>)
801308e: f44f 62d3 mov.w r2, #1688 ; 0x698
8013092: 4912 ldr r1, [pc, #72] ; (80130dc <tcp_recv_null+0x64>)
8013094: 4812 ldr r0, [pc, #72] ; (80130e0 <tcp_recv_null+0x68>)
8013096: f009 fa57 bl 801c548 <iprintf>
801309a: f06f 030f mvn.w r3, #15
801309e: e016 b.n 80130ce <tcp_recv_null+0x56>
if (p != NULL) {
80130a0: 687b ldr r3, [r7, #4]
80130a2: 2b00 cmp r3, #0
80130a4: d009 beq.n 80130ba <tcp_recv_null+0x42>
tcp_recved(pcb, p->tot_len);
80130a6: 687b ldr r3, [r7, #4]
80130a8: 891b ldrh r3, [r3, #8]
80130aa: 4619 mov r1, r3
80130ac: 68b8 ldr r0, [r7, #8]
80130ae: f7ff fb1d bl 80126ec <tcp_recved>
pbuf_free(p);
80130b2: 6878 ldr r0, [r7, #4]
80130b4: f7fe fd18 bl 8011ae8 <pbuf_free>
80130b8: e008 b.n 80130cc <tcp_recv_null+0x54>
} else if (err == ERR_OK) {
80130ba: f997 3003 ldrsb.w r3, [r7, #3]
80130be: 2b00 cmp r3, #0
80130c0: d104 bne.n 80130cc <tcp_recv_null+0x54>
return tcp_close(pcb);
80130c2: 68b8 ldr r0, [r7, #8]
80130c4: f7ff f9c2 bl 801244c <tcp_close>
80130c8: 4603 mov r3, r0
80130ca: e000 b.n 80130ce <tcp_recv_null+0x56>
}
return ERR_OK;
80130cc: 2300 movs r3, #0
}
80130ce: 4618 mov r0, r3
80130d0: 3710 adds r7, #16
80130d2: 46bd mov sp, r7
80130d4: bd80 pop {r7, pc}
80130d6: bf00 nop
80130d8: 0801e3c8 .word 0x0801e3c8
80130dc: 0801e938 .word 0x0801e938
80130e0: 0801e40c .word 0x0801e40c
080130e4 <tcp_kill_prio>:
*
* @param prio minimum priority
*/
static void
tcp_kill_prio(u8_t prio)
{
80130e4: b580 push {r7, lr}
80130e6: b086 sub sp, #24
80130e8: af00 add r7, sp, #0
80130ea: 4603 mov r3, r0
80130ec: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
u8_t mprio;
mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
80130ee: f997 3007 ldrsb.w r3, [r7, #7]
80130f2: 2b00 cmp r3, #0
80130f4: db01 blt.n 80130fa <tcp_kill_prio+0x16>
80130f6: 79fb ldrb r3, [r7, #7]
80130f8: e000 b.n 80130fc <tcp_kill_prio+0x18>
80130fa: 237f movs r3, #127 ; 0x7f
80130fc: 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) {
80130fe: 7afb ldrb r3, [r7, #11]
8013100: 2b00 cmp r3, #0
8013102: d034 beq.n 801316e <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--;
8013104: 7afb ldrb r3, [r7, #11]
8013106: 3b01 subs r3, #1
8013108: 72fb strb r3, [r7, #11]
inactivity = 0;
801310a: 2300 movs r3, #0
801310c: 60fb str r3, [r7, #12]
inactive = NULL;
801310e: 2300 movs r3, #0
8013110: 613b str r3, [r7, #16]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8013112: 4b19 ldr r3, [pc, #100] ; (8013178 <tcp_kill_prio+0x94>)
8013114: 681b ldr r3, [r3, #0]
8013116: 617b str r3, [r7, #20]
8013118: e01f b.n 801315a <tcp_kill_prio+0x76>
/* lower prio is always a kill candidate */
if ((pcb->prio < mprio) ||
801311a: 697b ldr r3, [r7, #20]
801311c: 7d5b ldrb r3, [r3, #21]
801311e: 7afa ldrb r2, [r7, #11]
8013120: 429a cmp r2, r3
8013122: d80c bhi.n 801313e <tcp_kill_prio+0x5a>
/* longer inactivity is also a kill candidate */
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
8013124: 697b ldr r3, [r7, #20]
8013126: 7d5b ldrb r3, [r3, #21]
if ((pcb->prio < mprio) ||
8013128: 7afa ldrb r2, [r7, #11]
801312a: 429a cmp r2, r3
801312c: d112 bne.n 8013154 <tcp_kill_prio+0x70>
((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
801312e: 4b13 ldr r3, [pc, #76] ; (801317c <tcp_kill_prio+0x98>)
8013130: 681a ldr r2, [r3, #0]
8013132: 697b ldr r3, [r7, #20]
8013134: 6a1b ldr r3, [r3, #32]
8013136: 1ad3 subs r3, r2, r3
8013138: 68fa ldr r2, [r7, #12]
801313a: 429a cmp r2, r3
801313c: d80a bhi.n 8013154 <tcp_kill_prio+0x70>
inactivity = tcp_ticks - pcb->tmr;
801313e: 4b0f ldr r3, [pc, #60] ; (801317c <tcp_kill_prio+0x98>)
8013140: 681a ldr r2, [r3, #0]
8013142: 697b ldr r3, [r7, #20]
8013144: 6a1b ldr r3, [r3, #32]
8013146: 1ad3 subs r3, r2, r3
8013148: 60fb str r3, [r7, #12]
inactive = pcb;
801314a: 697b ldr r3, [r7, #20]
801314c: 613b str r3, [r7, #16]
mprio = pcb->prio;
801314e: 697b ldr r3, [r7, #20]
8013150: 7d5b ldrb r3, [r3, #21]
8013152: 72fb strb r3, [r7, #11]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8013154: 697b ldr r3, [r7, #20]
8013156: 68db ldr r3, [r3, #12]
8013158: 617b str r3, [r7, #20]
801315a: 697b ldr r3, [r7, #20]
801315c: 2b00 cmp r3, #0
801315e: d1dc bne.n 801311a <tcp_kill_prio+0x36>
}
}
if (inactive != NULL) {
8013160: 693b ldr r3, [r7, #16]
8013162: 2b00 cmp r3, #0
8013164: d004 beq.n 8013170 <tcp_kill_prio+0x8c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n",
(void *)inactive, inactivity));
tcp_abort(inactive);
8013166: 6938 ldr r0, [r7, #16]
8013168: f7ff fa5a bl 8012620 <tcp_abort>
801316c: e000 b.n 8013170 <tcp_kill_prio+0x8c>
return;
801316e: bf00 nop
}
}
8013170: 3718 adds r7, #24
8013172: 46bd mov sp, r7
8013174: bd80 pop {r7, pc}
8013176: bf00 nop
8013178: 2000f7e8 .word 0x2000f7e8
801317c: 2000f7ec .word 0x2000f7ec
08013180 <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)
{
8013180: b580 push {r7, lr}
8013182: b086 sub sp, #24
8013184: af00 add r7, sp, #0
8013186: 4603 mov r3, r0
8013188: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
801318a: 79fb ldrb r3, [r7, #7]
801318c: 2b08 cmp r3, #8
801318e: d009 beq.n 80131a4 <tcp_kill_state+0x24>
8013190: 79fb ldrb r3, [r7, #7]
8013192: 2b09 cmp r3, #9
8013194: d006 beq.n 80131a4 <tcp_kill_state+0x24>
8013196: 4b1a ldr r3, [pc, #104] ; (8013200 <tcp_kill_state+0x80>)
8013198: f240 62dd movw r2, #1757 ; 0x6dd
801319c: 4919 ldr r1, [pc, #100] ; (8013204 <tcp_kill_state+0x84>)
801319e: 481a ldr r0, [pc, #104] ; (8013208 <tcp_kill_state+0x88>)
80131a0: f009 f9d2 bl 801c548 <iprintf>
inactivity = 0;
80131a4: 2300 movs r3, #0
80131a6: 60fb str r3, [r7, #12]
inactive = NULL;
80131a8: 2300 movs r3, #0
80131aa: 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) {
80131ac: 4b17 ldr r3, [pc, #92] ; (801320c <tcp_kill_state+0x8c>)
80131ae: 681b ldr r3, [r3, #0]
80131b0: 617b str r3, [r7, #20]
80131b2: e017 b.n 80131e4 <tcp_kill_state+0x64>
if (pcb->state == state) {
80131b4: 697b ldr r3, [r7, #20]
80131b6: 7d1b ldrb r3, [r3, #20]
80131b8: 79fa ldrb r2, [r7, #7]
80131ba: 429a cmp r2, r3
80131bc: d10f bne.n 80131de <tcp_kill_state+0x5e>
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
80131be: 4b14 ldr r3, [pc, #80] ; (8013210 <tcp_kill_state+0x90>)
80131c0: 681a ldr r2, [r3, #0]
80131c2: 697b ldr r3, [r7, #20]
80131c4: 6a1b ldr r3, [r3, #32]
80131c6: 1ad3 subs r3, r2, r3
80131c8: 68fa ldr r2, [r7, #12]
80131ca: 429a cmp r2, r3
80131cc: d807 bhi.n 80131de <tcp_kill_state+0x5e>
inactivity = tcp_ticks - pcb->tmr;
80131ce: 4b10 ldr r3, [pc, #64] ; (8013210 <tcp_kill_state+0x90>)
80131d0: 681a ldr r2, [r3, #0]
80131d2: 697b ldr r3, [r7, #20]
80131d4: 6a1b ldr r3, [r3, #32]
80131d6: 1ad3 subs r3, r2, r3
80131d8: 60fb str r3, [r7, #12]
inactive = pcb;
80131da: 697b ldr r3, [r7, #20]
80131dc: 613b str r3, [r7, #16]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
80131de: 697b ldr r3, [r7, #20]
80131e0: 68db ldr r3, [r3, #12]
80131e2: 617b str r3, [r7, #20]
80131e4: 697b ldr r3, [r7, #20]
80131e6: 2b00 cmp r3, #0
80131e8: d1e4 bne.n 80131b4 <tcp_kill_state+0x34>
}
}
}
if (inactive != NULL) {
80131ea: 693b ldr r3, [r7, #16]
80131ec: 2b00 cmp r3, #0
80131ee: d003 beq.n 80131f8 <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);
80131f0: 2100 movs r1, #0
80131f2: 6938 ldr r0, [r7, #16]
80131f4: f7ff f956 bl 80124a4 <tcp_abandon>
}
}
80131f8: bf00 nop
80131fa: 3718 adds r7, #24
80131fc: 46bd mov sp, r7
80131fe: bd80 pop {r7, pc}
8013200: 0801e3c8 .word 0x0801e3c8
8013204: 0801e954 .word 0x0801e954
8013208: 0801e40c .word 0x0801e40c
801320c: 2000f7e8 .word 0x2000f7e8
8013210: 2000f7ec .word 0x2000f7ec
08013214 <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)
{
8013214: b580 push {r7, lr}
8013216: b084 sub sp, #16
8013218: af00 add r7, sp, #0
struct tcp_pcb *pcb, *inactive;
u32_t inactivity;
inactivity = 0;
801321a: 2300 movs r3, #0
801321c: 607b str r3, [r7, #4]
inactive = NULL;
801321e: 2300 movs r3, #0
8013220: 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) {
8013222: 4b12 ldr r3, [pc, #72] ; (801326c <tcp_kill_timewait+0x58>)
8013224: 681b ldr r3, [r3, #0]
8013226: 60fb str r3, [r7, #12]
8013228: e012 b.n 8013250 <tcp_kill_timewait+0x3c>
if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
801322a: 4b11 ldr r3, [pc, #68] ; (8013270 <tcp_kill_timewait+0x5c>)
801322c: 681a ldr r2, [r3, #0]
801322e: 68fb ldr r3, [r7, #12]
8013230: 6a1b ldr r3, [r3, #32]
8013232: 1ad3 subs r3, r2, r3
8013234: 687a ldr r2, [r7, #4]
8013236: 429a cmp r2, r3
8013238: d807 bhi.n 801324a <tcp_kill_timewait+0x36>
inactivity = tcp_ticks - pcb->tmr;
801323a: 4b0d ldr r3, [pc, #52] ; (8013270 <tcp_kill_timewait+0x5c>)
801323c: 681a ldr r2, [r3, #0]
801323e: 68fb ldr r3, [r7, #12]
8013240: 6a1b ldr r3, [r3, #32]
8013242: 1ad3 subs r3, r2, r3
8013244: 607b str r3, [r7, #4]
inactive = pcb;
8013246: 68fb ldr r3, [r7, #12]
8013248: 60bb str r3, [r7, #8]
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
801324a: 68fb ldr r3, [r7, #12]
801324c: 68db ldr r3, [r3, #12]
801324e: 60fb str r3, [r7, #12]
8013250: 68fb ldr r3, [r7, #12]
8013252: 2b00 cmp r3, #0
8013254: d1e9 bne.n 801322a <tcp_kill_timewait+0x16>
}
}
if (inactive != NULL) {
8013256: 68bb ldr r3, [r7, #8]
8013258: 2b00 cmp r3, #0
801325a: d002 beq.n 8013262 <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);
801325c: 68b8 ldr r0, [r7, #8]
801325e: f7ff f9df bl 8012620 <tcp_abort>
}
}
8013262: bf00 nop
8013264: 3710 adds r7, #16
8013266: 46bd mov sp, r7
8013268: bd80 pop {r7, pc}
801326a: bf00 nop
801326c: 2000f7f8 .word 0x2000f7f8
8013270: 2000f7ec .word 0x2000f7ec
08013274 <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)
{
8013274: b580 push {r7, lr}
8013276: b082 sub sp, #8
8013278: af00 add r7, sp, #0
struct tcp_pcb *pcb = tcp_active_pcbs;
801327a: 4b10 ldr r3, [pc, #64] ; (80132bc <tcp_handle_closepend+0x48>)
801327c: 681b ldr r3, [r3, #0]
801327e: 607b str r3, [r7, #4]
while (pcb != NULL) {
8013280: e014 b.n 80132ac <tcp_handle_closepend+0x38>
struct tcp_pcb *next = pcb->next;
8013282: 687b ldr r3, [r7, #4]
8013284: 68db ldr r3, [r3, #12]
8013286: 603b str r3, [r7, #0]
/* send pending FIN */
if (pcb->flags & TF_CLOSEPEND) {
8013288: 687b ldr r3, [r7, #4]
801328a: 8b5b ldrh r3, [r3, #26]
801328c: f003 0308 and.w r3, r3, #8
8013290: 2b00 cmp r3, #0
8013292: d009 beq.n 80132a8 <tcp_handle_closepend+0x34>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n"));
tcp_clear_flags(pcb, TF_CLOSEPEND);
8013294: 687b ldr r3, [r7, #4]
8013296: 8b5b ldrh r3, [r3, #26]
8013298: f023 0308 bic.w r3, r3, #8
801329c: b29a uxth r2, r3
801329e: 687b ldr r3, [r7, #4]
80132a0: 835a strh r2, [r3, #26]
tcp_close_shutdown_fin(pcb);
80132a2: 6878 ldr r0, [r7, #4]
80132a4: f7ff f86c bl 8012380 <tcp_close_shutdown_fin>
}
pcb = next;
80132a8: 683b ldr r3, [r7, #0]
80132aa: 607b str r3, [r7, #4]
while (pcb != NULL) {
80132ac: 687b ldr r3, [r7, #4]
80132ae: 2b00 cmp r3, #0
80132b0: d1e7 bne.n 8013282 <tcp_handle_closepend+0xe>
}
}
80132b2: bf00 nop
80132b4: 3708 adds r7, #8
80132b6: 46bd mov sp, r7
80132b8: bd80 pop {r7, pc}
80132ba: bf00 nop
80132bc: 2000f7e8 .word 0x2000f7e8
080132c0 <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)
{
80132c0: b580 push {r7, lr}
80132c2: b084 sub sp, #16
80132c4: af00 add r7, sp, #0
80132c6: 4603 mov r3, r0
80132c8: 71fb strb r3, [r7, #7]
struct tcp_pcb *pcb;
LWIP_ASSERT_CORE_LOCKED();
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
80132ca: 2001 movs r0, #1
80132cc: f7fd fd0e bl 8010cec <memp_malloc>
80132d0: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
80132d2: 68fb ldr r3, [r7, #12]
80132d4: 2b00 cmp r3, #0
80132d6: d126 bne.n 8013326 <tcp_alloc+0x66>
/* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */
tcp_handle_closepend();
80132d8: f7ff ffcc bl 8013274 <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();
80132dc: f7ff ff9a bl 8013214 <tcp_kill_timewait>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
80132e0: 2001 movs r0, #1
80132e2: f7fd fd03 bl 8010cec <memp_malloc>
80132e6: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
80132e8: 68fb ldr r3, [r7, #12]
80132ea: 2b00 cmp r3, #0
80132ec: d11b bne.n 8013326 <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);
80132ee: 2009 movs r0, #9
80132f0: f7ff ff46 bl 8013180 <tcp_kill_state>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
80132f4: 2001 movs r0, #1
80132f6: f7fd fcf9 bl 8010cec <memp_malloc>
80132fa: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
80132fc: 68fb ldr r3, [r7, #12]
80132fe: 2b00 cmp r3, #0
8013300: d111 bne.n 8013326 <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);
8013302: 2008 movs r0, #8
8013304: f7ff ff3c bl 8013180 <tcp_kill_state>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
8013308: 2001 movs r0, #1
801330a: f7fd fcef bl 8010cec <memp_malloc>
801330e: 60f8 str r0, [r7, #12]
if (pcb == NULL) {
8013310: 68fb ldr r3, [r7, #12]
8013312: 2b00 cmp r3, #0
8013314: d107 bne.n 8013326 <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);
8013316: 79fb ldrb r3, [r7, #7]
8013318: 4618 mov r0, r3
801331a: f7ff fee3 bl 80130e4 <tcp_kill_prio>
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
801331e: 2001 movs r0, #1
8013320: f7fd fce4 bl 8010cec <memp_malloc>
8013324: 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) {
8013326: 68fb ldr r3, [r7, #12]
8013328: 2b00 cmp r3, #0
801332a: d03f beq.n 80133ac <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));
801332c: 229c movs r2, #156 ; 0x9c
801332e: 2100 movs r1, #0
8013330: 68f8 ldr r0, [r7, #12]
8013332: f009 f900 bl 801c536 <memset>
pcb->prio = prio;
8013336: 68fb ldr r3, [r7, #12]
8013338: 79fa ldrb r2, [r7, #7]
801333a: 755a strb r2, [r3, #21]
pcb->snd_buf = TCP_SND_BUF;
801333c: 68fb ldr r3, [r7, #12]
801333e: f44f 6286 mov.w r2, #1072 ; 0x430
8013342: 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);
8013346: 68fb ldr r3, [r7, #12]
8013348: f44f 6206 mov.w r2, #2144 ; 0x860
801334c: 855a strh r2, [r3, #42] ; 0x2a
801334e: 68fb ldr r3, [r7, #12]
8013350: 8d5a ldrh r2, [r3, #42] ; 0x2a
8013352: 68fb ldr r3, [r7, #12]
8013354: 851a strh r2, [r3, #40] ; 0x28
pcb->ttl = TCP_TTL;
8013356: 68fb ldr r3, [r7, #12]
8013358: 22ff movs r2, #255 ; 0xff
801335a: 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;
801335c: 68fb ldr r3, [r7, #12]
801335e: f44f 7206 mov.w r2, #536 ; 0x218
8013362: 865a strh r2, [r3, #50] ; 0x32
pcb->rto = 3000 / TCP_SLOW_INTERVAL;
8013364: 68fb ldr r3, [r7, #12]
8013366: 2206 movs r2, #6
8013368: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
pcb->sv = 3000 / TCP_SLOW_INTERVAL;
801336c: 68fb ldr r3, [r7, #12]
801336e: 2206 movs r2, #6
8013370: 87da strh r2, [r3, #62] ; 0x3e
pcb->rtime = -1;
8013372: 68fb ldr r3, [r7, #12]
8013374: f64f 72ff movw r2, #65535 ; 0xffff
8013378: 861a strh r2, [r3, #48] ; 0x30
pcb->cwnd = 1;
801337a: 68fb ldr r3, [r7, #12]
801337c: 2201 movs r2, #1
801337e: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->tmr = tcp_ticks;
8013382: 4b0d ldr r3, [pc, #52] ; (80133b8 <tcp_alloc+0xf8>)
8013384: 681a ldr r2, [r3, #0]
8013386: 68fb ldr r3, [r7, #12]
8013388: 621a str r2, [r3, #32]
pcb->last_timer = tcp_timer_ctr;
801338a: 4b0c ldr r3, [pc, #48] ; (80133bc <tcp_alloc+0xfc>)
801338c: 781a ldrb r2, [r3, #0]
801338e: 68fb ldr r3, [r7, #12]
8013390: 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;
8013392: 68fb ldr r3, [r7, #12]
8013394: f44f 6286 mov.w r2, #1072 ; 0x430
8013398: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
#if LWIP_CALLBACK_API
pcb->recv = tcp_recv_null;
801339c: 68fb ldr r3, [r7, #12]
801339e: 4a08 ldr r2, [pc, #32] ; (80133c0 <tcp_alloc+0x100>)
80133a0: f8c3 2084 str.w r2, [r3, #132] ; 0x84
#endif /* LWIP_CALLBACK_API */
/* Init KEEPALIVE timer */
pcb->keep_idle = TCP_KEEPIDLE_DEFAULT;
80133a4: 68fb ldr r3, [r7, #12]
80133a6: 4a07 ldr r2, [pc, #28] ; (80133c4 <tcp_alloc+0x104>)
80133a8: 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;
80133ac: 68fb ldr r3, [r7, #12]
}
80133ae: 4618 mov r0, r3
80133b0: 3710 adds r7, #16
80133b2: 46bd mov sp, r7
80133b4: bd80 pop {r7, pc}
80133b6: bf00 nop
80133b8: 2000f7ec .word 0x2000f7ec
80133bc: 20008716 .word 0x20008716
80133c0: 08013079 .word 0x08013079
80133c4: 006ddd00 .word 0x006ddd00
080133c8 <tcp_pcb_purge>:
*
* @param pcb tcp_pcb to purge. The pcb itself is not deallocated!
*/
void
tcp_pcb_purge(struct tcp_pcb *pcb)
{
80133c8: b580 push {r7, lr}
80133ca: b082 sub sp, #8
80133cc: af00 add r7, sp, #0
80133ce: 6078 str r0, [r7, #4]
LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
80133d0: 687b ldr r3, [r7, #4]
80133d2: 2b00 cmp r3, #0
80133d4: d107 bne.n 80133e6 <tcp_pcb_purge+0x1e>
80133d6: 4b21 ldr r3, [pc, #132] ; (801345c <tcp_pcb_purge+0x94>)
80133d8: f640 0251 movw r2, #2129 ; 0x851
80133dc: 4920 ldr r1, [pc, #128] ; (8013460 <tcp_pcb_purge+0x98>)
80133de: 4821 ldr r0, [pc, #132] ; (8013464 <tcp_pcb_purge+0x9c>)
80133e0: f009 f8b2 bl 801c548 <iprintf>
80133e4: e037 b.n 8013456 <tcp_pcb_purge+0x8e>
if (pcb->state != CLOSED &&
80133e6: 687b ldr r3, [r7, #4]
80133e8: 7d1b ldrb r3, [r3, #20]
80133ea: 2b00 cmp r3, #0
80133ec: d033 beq.n 8013456 <tcp_pcb_purge+0x8e>
pcb->state != TIME_WAIT &&
80133ee: 687b ldr r3, [r7, #4]
80133f0: 7d1b ldrb r3, [r3, #20]
if (pcb->state != CLOSED &&
80133f2: 2b0a cmp r3, #10
80133f4: d02f beq.n 8013456 <tcp_pcb_purge+0x8e>
pcb->state != LISTEN) {
80133f6: 687b ldr r3, [r7, #4]
80133f8: 7d1b ldrb r3, [r3, #20]
pcb->state != TIME_WAIT &&
80133fa: 2b01 cmp r3, #1
80133fc: d02b beq.n 8013456 <tcp_pcb_purge+0x8e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n"));
tcp_backlog_accepted(pcb);
if (pcb->refused_data != NULL) {
80133fe: 687b ldr r3, [r7, #4]
8013400: 6f9b ldr r3, [r3, #120] ; 0x78
8013402: 2b00 cmp r3, #0
8013404: d007 beq.n 8013416 <tcp_pcb_purge+0x4e>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n"));
pbuf_free(pcb->refused_data);
8013406: 687b ldr r3, [r7, #4]
8013408: 6f9b ldr r3, [r3, #120] ; 0x78
801340a: 4618 mov r0, r3
801340c: f7fe fb6c bl 8011ae8 <pbuf_free>
pcb->refused_data = NULL;
8013410: 687b ldr r3, [r7, #4]
8013412: 2200 movs r2, #0
8013414: 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) {
8013416: 687b ldr r3, [r7, #4]
8013418: 6f5b ldr r3, [r3, #116] ; 0x74
801341a: 2b00 cmp r3, #0
801341c: d002 beq.n 8013424 <tcp_pcb_purge+0x5c>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n"));
tcp_free_ooseq(pcb);
801341e: 6878 ldr r0, [r7, #4]
8013420: f000 f986 bl 8013730 <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;
8013424: 687b ldr r3, [r7, #4]
8013426: f64f 72ff movw r2, #65535 ; 0xffff
801342a: 861a strh r2, [r3, #48] ; 0x30
tcp_segs_free(pcb->unsent);
801342c: 687b ldr r3, [r7, #4]
801342e: 6edb ldr r3, [r3, #108] ; 0x6c
8013430: 4618 mov r0, r3
8013432: f7ff fdc9 bl 8012fc8 <tcp_segs_free>
tcp_segs_free(pcb->unacked);
8013436: 687b ldr r3, [r7, #4]
8013438: 6f1b ldr r3, [r3, #112] ; 0x70
801343a: 4618 mov r0, r3
801343c: f7ff fdc4 bl 8012fc8 <tcp_segs_free>
pcb->unacked = pcb->unsent = NULL;
8013440: 687b ldr r3, [r7, #4]
8013442: 2200 movs r2, #0
8013444: 66da str r2, [r3, #108] ; 0x6c
8013446: 687b ldr r3, [r7, #4]
8013448: 6eda ldr r2, [r3, #108] ; 0x6c
801344a: 687b ldr r3, [r7, #4]
801344c: 671a str r2, [r3, #112] ; 0x70
#if TCP_OVERSIZE
pcb->unsent_oversize = 0;
801344e: 687b ldr r3, [r7, #4]
8013450: 2200 movs r2, #0
8013452: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
#endif /* TCP_OVERSIZE */
}
}
8013456: 3708 adds r7, #8
8013458: 46bd mov sp, r7
801345a: bd80 pop {r7, pc}
801345c: 0801e3c8 .word 0x0801e3c8
8013460: 0801ea14 .word 0x0801ea14
8013464: 0801e40c .word 0x0801e40c
08013468 <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)
{
8013468: b580 push {r7, lr}
801346a: b084 sub sp, #16
801346c: af00 add r7, sp, #0
801346e: 6078 str r0, [r7, #4]
8013470: 6039 str r1, [r7, #0]
LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
8013472: 683b ldr r3, [r7, #0]
8013474: 2b00 cmp r3, #0
8013476: d106 bne.n 8013486 <tcp_pcb_remove+0x1e>
8013478: 4b3e ldr r3, [pc, #248] ; (8013574 <tcp_pcb_remove+0x10c>)
801347a: f640 0283 movw r2, #2179 ; 0x883
801347e: 493e ldr r1, [pc, #248] ; (8013578 <tcp_pcb_remove+0x110>)
8013480: 483e ldr r0, [pc, #248] ; (801357c <tcp_pcb_remove+0x114>)
8013482: f009 f861 bl 801c548 <iprintf>
LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
8013486: 687b ldr r3, [r7, #4]
8013488: 2b00 cmp r3, #0
801348a: d106 bne.n 801349a <tcp_pcb_remove+0x32>
801348c: 4b39 ldr r3, [pc, #228] ; (8013574 <tcp_pcb_remove+0x10c>)
801348e: f640 0284 movw r2, #2180 ; 0x884
8013492: 493b ldr r1, [pc, #236] ; (8013580 <tcp_pcb_remove+0x118>)
8013494: 4839 ldr r0, [pc, #228] ; (801357c <tcp_pcb_remove+0x114>)
8013496: f009 f857 bl 801c548 <iprintf>
TCP_RMV(pcblist, pcb);
801349a: 687b ldr r3, [r7, #4]
801349c: 681b ldr r3, [r3, #0]
801349e: 683a ldr r2, [r7, #0]
80134a0: 429a cmp r2, r3
80134a2: d105 bne.n 80134b0 <tcp_pcb_remove+0x48>
80134a4: 687b ldr r3, [r7, #4]
80134a6: 681b ldr r3, [r3, #0]
80134a8: 68da ldr r2, [r3, #12]
80134aa: 687b ldr r3, [r7, #4]
80134ac: 601a str r2, [r3, #0]
80134ae: e013 b.n 80134d8 <tcp_pcb_remove+0x70>
80134b0: 687b ldr r3, [r7, #4]
80134b2: 681b ldr r3, [r3, #0]
80134b4: 60fb str r3, [r7, #12]
80134b6: e00c b.n 80134d2 <tcp_pcb_remove+0x6a>
80134b8: 68fb ldr r3, [r7, #12]
80134ba: 68db ldr r3, [r3, #12]
80134bc: 683a ldr r2, [r7, #0]
80134be: 429a cmp r2, r3
80134c0: d104 bne.n 80134cc <tcp_pcb_remove+0x64>
80134c2: 683b ldr r3, [r7, #0]
80134c4: 68da ldr r2, [r3, #12]
80134c6: 68fb ldr r3, [r7, #12]
80134c8: 60da str r2, [r3, #12]
80134ca: e005 b.n 80134d8 <tcp_pcb_remove+0x70>
80134cc: 68fb ldr r3, [r7, #12]
80134ce: 68db ldr r3, [r3, #12]
80134d0: 60fb str r3, [r7, #12]
80134d2: 68fb ldr r3, [r7, #12]
80134d4: 2b00 cmp r3, #0
80134d6: d1ef bne.n 80134b8 <tcp_pcb_remove+0x50>
80134d8: 683b ldr r3, [r7, #0]
80134da: 2200 movs r2, #0
80134dc: 60da str r2, [r3, #12]
tcp_pcb_purge(pcb);
80134de: 6838 ldr r0, [r7, #0]
80134e0: f7ff ff72 bl 80133c8 <tcp_pcb_purge>
/* if there is an outstanding delayed ACKs, send it */
if ((pcb->state != TIME_WAIT) &&
80134e4: 683b ldr r3, [r7, #0]
80134e6: 7d1b ldrb r3, [r3, #20]
80134e8: 2b0a cmp r3, #10
80134ea: d013 beq.n 8013514 <tcp_pcb_remove+0xac>
(pcb->state != LISTEN) &&
80134ec: 683b ldr r3, [r7, #0]
80134ee: 7d1b ldrb r3, [r3, #20]
if ((pcb->state != TIME_WAIT) &&
80134f0: 2b01 cmp r3, #1
80134f2: d00f beq.n 8013514 <tcp_pcb_remove+0xac>
(pcb->flags & TF_ACK_DELAY)) {
80134f4: 683b ldr r3, [r7, #0]
80134f6: 8b5b ldrh r3, [r3, #26]
80134f8: f003 0301 and.w r3, r3, #1
(pcb->state != LISTEN) &&
80134fc: 2b00 cmp r3, #0
80134fe: d009 beq.n 8013514 <tcp_pcb_remove+0xac>
tcp_ack_now(pcb);
8013500: 683b ldr r3, [r7, #0]
8013502: 8b5b ldrh r3, [r3, #26]
8013504: f043 0302 orr.w r3, r3, #2
8013508: b29a uxth r2, r3
801350a: 683b ldr r3, [r7, #0]
801350c: 835a strh r2, [r3, #26]
tcp_output(pcb);
801350e: 6838 ldr r0, [r7, #0]
8013510: f002 ff68 bl 80163e4 <tcp_output>
}
if (pcb->state != LISTEN) {
8013514: 683b ldr r3, [r7, #0]
8013516: 7d1b ldrb r3, [r3, #20]
8013518: 2b01 cmp r3, #1
801351a: d020 beq.n 801355e <tcp_pcb_remove+0xf6>
LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL);
801351c: 683b ldr r3, [r7, #0]
801351e: 6edb ldr r3, [r3, #108] ; 0x6c
8013520: 2b00 cmp r3, #0
8013522: d006 beq.n 8013532 <tcp_pcb_remove+0xca>
8013524: 4b13 ldr r3, [pc, #76] ; (8013574 <tcp_pcb_remove+0x10c>)
8013526: f640 0293 movw r2, #2195 ; 0x893
801352a: 4916 ldr r1, [pc, #88] ; (8013584 <tcp_pcb_remove+0x11c>)
801352c: 4813 ldr r0, [pc, #76] ; (801357c <tcp_pcb_remove+0x114>)
801352e: f009 f80b bl 801c548 <iprintf>
LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL);
8013532: 683b ldr r3, [r7, #0]
8013534: 6f1b ldr r3, [r3, #112] ; 0x70
8013536: 2b00 cmp r3, #0
8013538: d006 beq.n 8013548 <tcp_pcb_remove+0xe0>
801353a: 4b0e ldr r3, [pc, #56] ; (8013574 <tcp_pcb_remove+0x10c>)
801353c: f640 0294 movw r2, #2196 ; 0x894
8013540: 4911 ldr r1, [pc, #68] ; (8013588 <tcp_pcb_remove+0x120>)
8013542: 480e ldr r0, [pc, #56] ; (801357c <tcp_pcb_remove+0x114>)
8013544: f009 f800 bl 801c548 <iprintf>
#if TCP_QUEUE_OOSEQ
LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL);
8013548: 683b ldr r3, [r7, #0]
801354a: 6f5b ldr r3, [r3, #116] ; 0x74
801354c: 2b00 cmp r3, #0
801354e: d006 beq.n 801355e <tcp_pcb_remove+0xf6>
8013550: 4b08 ldr r3, [pc, #32] ; (8013574 <tcp_pcb_remove+0x10c>)
8013552: f640 0296 movw r2, #2198 ; 0x896
8013556: 490d ldr r1, [pc, #52] ; (801358c <tcp_pcb_remove+0x124>)
8013558: 4808 ldr r0, [pc, #32] ; (801357c <tcp_pcb_remove+0x114>)
801355a: f008 fff5 bl 801c548 <iprintf>
#endif /* TCP_QUEUE_OOSEQ */
}
pcb->state = CLOSED;
801355e: 683b ldr r3, [r7, #0]
8013560: 2200 movs r2, #0
8013562: 751a strb r2, [r3, #20]
/* reset the local port to prevent the pcb from being 'bound' */
pcb->local_port = 0;
8013564: 683b ldr r3, [r7, #0]
8013566: 2200 movs r2, #0
8013568: 82da strh r2, [r3, #22]
LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane());
}
801356a: bf00 nop
801356c: 3710 adds r7, #16
801356e: 46bd mov sp, r7
8013570: bd80 pop {r7, pc}
8013572: bf00 nop
8013574: 0801e3c8 .word 0x0801e3c8
8013578: 0801ea30 .word 0x0801ea30
801357c: 0801e40c .word 0x0801e40c
8013580: 0801ea4c .word 0x0801ea4c
8013584: 0801ea6c .word 0x0801ea6c
8013588: 0801ea84 .word 0x0801ea84
801358c: 0801eaa0 .word 0x0801eaa0
08013590 <tcp_next_iss>:
*
* @return u32_t pseudo random sequence number
*/
u32_t
tcp_next_iss(struct tcp_pcb *pcb)
{
8013590: b580 push {r7, lr}
8013592: b082 sub sp, #8
8013594: af00 add r7, sp, #0
8013596: 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);
8013598: 687b ldr r3, [r7, #4]
801359a: 2b00 cmp r3, #0
801359c: d106 bne.n 80135ac <tcp_next_iss+0x1c>
801359e: 4b0a ldr r3, [pc, #40] ; (80135c8 <tcp_next_iss+0x38>)
80135a0: f640 02af movw r2, #2223 ; 0x8af
80135a4: 4909 ldr r1, [pc, #36] ; (80135cc <tcp_next_iss+0x3c>)
80135a6: 480a ldr r0, [pc, #40] ; (80135d0 <tcp_next_iss+0x40>)
80135a8: f008 ffce bl 801c548 <iprintf>
LWIP_UNUSED_ARG(pcb);
iss += tcp_ticks; /* XXX */
80135ac: 4b09 ldr r3, [pc, #36] ; (80135d4 <tcp_next_iss+0x44>)
80135ae: 681a ldr r2, [r3, #0]
80135b0: 4b09 ldr r3, [pc, #36] ; (80135d8 <tcp_next_iss+0x48>)
80135b2: 681b ldr r3, [r3, #0]
80135b4: 4413 add r3, r2
80135b6: 4a07 ldr r2, [pc, #28] ; (80135d4 <tcp_next_iss+0x44>)
80135b8: 6013 str r3, [r2, #0]
return iss;
80135ba: 4b06 ldr r3, [pc, #24] ; (80135d4 <tcp_next_iss+0x44>)
80135bc: 681b ldr r3, [r3, #0]
#endif /* LWIP_HOOK_TCP_ISN */
}
80135be: 4618 mov r0, r3
80135c0: 3708 adds r7, #8
80135c2: 46bd mov sp, r7
80135c4: bd80 pop {r7, pc}
80135c6: bf00 nop
80135c8: 0801e3c8 .word 0x0801e3c8
80135cc: 0801eab8 .word 0x0801eab8
80135d0: 0801e40c .word 0x0801e40c
80135d4: 20000064 .word 0x20000064
80135d8: 2000f7ec .word 0x2000f7ec
080135dc <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)
{
80135dc: b580 push {r7, lr}
80135de: b086 sub sp, #24
80135e0: af00 add r7, sp, #0
80135e2: 4603 mov r3, r0
80135e4: 60b9 str r1, [r7, #8]
80135e6: 607a str r2, [r7, #4]
80135e8: 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);
80135ea: 687b ldr r3, [r7, #4]
80135ec: 2b00 cmp r3, #0
80135ee: d106 bne.n 80135fe <tcp_eff_send_mss_netif+0x22>
80135f0: 4b14 ldr r3, [pc, #80] ; (8013644 <tcp_eff_send_mss_netif+0x68>)
80135f2: f640 02c5 movw r2, #2245 ; 0x8c5
80135f6: 4914 ldr r1, [pc, #80] ; (8013648 <tcp_eff_send_mss_netif+0x6c>)
80135f8: 4814 ldr r0, [pc, #80] ; (801364c <tcp_eff_send_mss_netif+0x70>)
80135fa: f008 ffa5 bl 801c548 <iprintf>
else
#endif /* LWIP_IPV4 */
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
{
if (outif == NULL) {
80135fe: 68bb ldr r3, [r7, #8]
8013600: 2b00 cmp r3, #0
8013602: d101 bne.n 8013608 <tcp_eff_send_mss_netif+0x2c>
return sendmss;
8013604: 89fb ldrh r3, [r7, #14]
8013606: e019 b.n 801363c <tcp_eff_send_mss_netif+0x60>
}
mtu = outif->mtu;
8013608: 68bb ldr r3, [r7, #8]
801360a: 8d1b ldrh r3, [r3, #40] ; 0x28
801360c: 82fb strh r3, [r7, #22]
}
#endif /* LWIP_IPV4 */
if (mtu != 0) {
801360e: 8afb ldrh r3, [r7, #22]
8013610: 2b00 cmp r3, #0
8013612: d012 beq.n 801363a <tcp_eff_send_mss_netif+0x5e>
else
#endif /* LWIP_IPV4 */
#endif /* LWIP_IPV6 */
#if LWIP_IPV4
{
offset = IP_HLEN + TCP_HLEN;
8013614: 2328 movs r3, #40 ; 0x28
8013616: 82bb strh r3, [r7, #20]
}
#endif /* LWIP_IPV4 */
mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
8013618: 8afa ldrh r2, [r7, #22]
801361a: 8abb ldrh r3, [r7, #20]
801361c: 429a cmp r2, r3
801361e: d904 bls.n 801362a <tcp_eff_send_mss_netif+0x4e>
8013620: 8afa ldrh r2, [r7, #22]
8013622: 8abb ldrh r3, [r7, #20]
8013624: 1ad3 subs r3, r2, r3
8013626: b29b uxth r3, r3
8013628: e000 b.n 801362c <tcp_eff_send_mss_netif+0x50>
801362a: 2300 movs r3, #0
801362c: 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);
801362e: 8a7a ldrh r2, [r7, #18]
8013630: 89fb ldrh r3, [r7, #14]
8013632: 4293 cmp r3, r2
8013634: bf28 it cs
8013636: 4613 movcs r3, r2
8013638: 81fb strh r3, [r7, #14]
}
return sendmss;
801363a: 89fb ldrh r3, [r7, #14]
}
801363c: 4618 mov r0, r3
801363e: 3718 adds r7, #24
8013640: 46bd mov sp, r7
8013642: bd80 pop {r7, pc}
8013644: 0801e3c8 .word 0x0801e3c8
8013648: 0801ead4 .word 0x0801ead4
801364c: 0801e40c .word 0x0801e40c
08013650 <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)
{
8013650: b580 push {r7, lr}
8013652: b084 sub sp, #16
8013654: af00 add r7, sp, #0
8013656: 6078 str r0, [r7, #4]
8013658: 6039 str r1, [r7, #0]
struct tcp_pcb *pcb;
pcb = pcb_list;
801365a: 683b ldr r3, [r7, #0]
801365c: 60fb str r3, [r7, #12]
LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL);
801365e: 687b ldr r3, [r7, #4]
8013660: 2b00 cmp r3, #0
8013662: d119 bne.n 8013698 <tcp_netif_ip_addr_changed_pcblist+0x48>
8013664: 4b10 ldr r3, [pc, #64] ; (80136a8 <tcp_netif_ip_addr_changed_pcblist+0x58>)
8013666: f44f 6210 mov.w r2, #2304 ; 0x900
801366a: 4910 ldr r1, [pc, #64] ; (80136ac <tcp_netif_ip_addr_changed_pcblist+0x5c>)
801366c: 4810 ldr r0, [pc, #64] ; (80136b0 <tcp_netif_ip_addr_changed_pcblist+0x60>)
801366e: f008 ff6b bl 801c548 <iprintf>
while (pcb != NULL) {
8013672: e011 b.n 8013698 <tcp_netif_ip_addr_changed_pcblist+0x48>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&pcb->local_ip, old_addr)
8013674: 68fb ldr r3, [r7, #12]
8013676: 681a ldr r2, [r3, #0]
8013678: 687b ldr r3, [r7, #4]
801367a: 681b ldr r3, [r3, #0]
801367c: 429a cmp r2, r3
801367e: d108 bne.n 8013692 <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;
8013680: 68fb ldr r3, [r7, #12]
8013682: 68db ldr r3, [r3, #12]
8013684: 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);
8013686: 68f8 ldr r0, [r7, #12]
8013688: f7fe ffca bl 8012620 <tcp_abort>
pcb = next;
801368c: 68bb ldr r3, [r7, #8]
801368e: 60fb str r3, [r7, #12]
8013690: e002 b.n 8013698 <tcp_netif_ip_addr_changed_pcblist+0x48>
} else {
pcb = pcb->next;
8013692: 68fb ldr r3, [r7, #12]
8013694: 68db ldr r3, [r3, #12]
8013696: 60fb str r3, [r7, #12]
while (pcb != NULL) {
8013698: 68fb ldr r3, [r7, #12]
801369a: 2b00 cmp r3, #0
801369c: d1ea bne.n 8013674 <tcp_netif_ip_addr_changed_pcblist+0x24>
}
}
}
801369e: bf00 nop
80136a0: 3710 adds r7, #16
80136a2: 46bd mov sp, r7
80136a4: bd80 pop {r7, pc}
80136a6: bf00 nop
80136a8: 0801e3c8 .word 0x0801e3c8
80136ac: 0801eafc .word 0x0801eafc
80136b0: 0801e40c .word 0x0801e40c
080136b4 <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)
{
80136b4: b580 push {r7, lr}
80136b6: b084 sub sp, #16
80136b8: af00 add r7, sp, #0
80136ba: 6078 str r0, [r7, #4]
80136bc: 6039 str r1, [r7, #0]
struct tcp_pcb_listen *lpcb;
if (!ip_addr_isany(old_addr)) {
80136be: 687b ldr r3, [r7, #4]
80136c0: 2b00 cmp r3, #0
80136c2: d02a beq.n 801371a <tcp_netif_ip_addr_changed+0x66>
80136c4: 687b ldr r3, [r7, #4]
80136c6: 681b ldr r3, [r3, #0]
80136c8: 2b00 cmp r3, #0
80136ca: d026 beq.n 801371a <tcp_netif_ip_addr_changed+0x66>
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs);
80136cc: 4b15 ldr r3, [pc, #84] ; (8013724 <tcp_netif_ip_addr_changed+0x70>)
80136ce: 681b ldr r3, [r3, #0]
80136d0: 4619 mov r1, r3
80136d2: 6878 ldr r0, [r7, #4]
80136d4: f7ff ffbc bl 8013650 <tcp_netif_ip_addr_changed_pcblist>
tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs);
80136d8: 4b13 ldr r3, [pc, #76] ; (8013728 <tcp_netif_ip_addr_changed+0x74>)
80136da: 681b ldr r3, [r3, #0]
80136dc: 4619 mov r1, r3
80136de: 6878 ldr r0, [r7, #4]
80136e0: f7ff ffb6 bl 8013650 <tcp_netif_ip_addr_changed_pcblist>
if (!ip_addr_isany(new_addr)) {
80136e4: 683b ldr r3, [r7, #0]
80136e6: 2b00 cmp r3, #0
80136e8: d017 beq.n 801371a <tcp_netif_ip_addr_changed+0x66>
80136ea: 683b ldr r3, [r7, #0]
80136ec: 681b ldr r3, [r3, #0]
80136ee: 2b00 cmp r3, #0
80136f0: d013 beq.n 801371a <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) {
80136f2: 4b0e ldr r3, [pc, #56] ; (801372c <tcp_netif_ip_addr_changed+0x78>)
80136f4: 681b ldr r3, [r3, #0]
80136f6: 60fb str r3, [r7, #12]
80136f8: e00c b.n 8013714 <tcp_netif_ip_addr_changed+0x60>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&lpcb->local_ip, old_addr)) {
80136fa: 68fb ldr r3, [r7, #12]
80136fc: 681a ldr r2, [r3, #0]
80136fe: 687b ldr r3, [r7, #4]
8013700: 681b ldr r3, [r3, #0]
8013702: 429a cmp r2, r3
8013704: d103 bne.n 801370e <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);
8013706: 683b ldr r3, [r7, #0]
8013708: 681a ldr r2, [r3, #0]
801370a: 68fb ldr r3, [r7, #12]
801370c: 601a str r2, [r3, #0]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
801370e: 68fb ldr r3, [r7, #12]
8013710: 68db ldr r3, [r3, #12]
8013712: 60fb str r3, [r7, #12]
8013714: 68fb ldr r3, [r7, #12]
8013716: 2b00 cmp r3, #0
8013718: d1ef bne.n 80136fa <tcp_netif_ip_addr_changed+0x46>
}
}
}
}
}
801371a: bf00 nop
801371c: 3710 adds r7, #16
801371e: 46bd mov sp, r7
8013720: bd80 pop {r7, pc}
8013722: bf00 nop
8013724: 2000f7e8 .word 0x2000f7e8
8013728: 2000f7f4 .word 0x2000f7f4
801372c: 2000f7f0 .word 0x2000f7f0
08013730 <tcp_free_ooseq>:
#if TCP_QUEUE_OOSEQ
/* Free all ooseq pbufs (and possibly reset SACK state) */
void
tcp_free_ooseq(struct tcp_pcb *pcb)
{
8013730: b580 push {r7, lr}
8013732: b082 sub sp, #8
8013734: af00 add r7, sp, #0
8013736: 6078 str r0, [r7, #4]
if (pcb->ooseq) {
8013738: 687b ldr r3, [r7, #4]
801373a: 6f5b ldr r3, [r3, #116] ; 0x74
801373c: 2b00 cmp r3, #0
801373e: d007 beq.n 8013750 <tcp_free_ooseq+0x20>
tcp_segs_free(pcb->ooseq);
8013740: 687b ldr r3, [r7, #4]
8013742: 6f5b ldr r3, [r3, #116] ; 0x74
8013744: 4618 mov r0, r3
8013746: f7ff fc3f bl 8012fc8 <tcp_segs_free>
pcb->ooseq = NULL;
801374a: 687b ldr r3, [r7, #4]
801374c: 2200 movs r2, #0
801374e: 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 */
}
}
8013750: bf00 nop
8013752: 3708 adds r7, #8
8013754: 46bd mov sp, r7
8013756: bd80 pop {r7, pc}
08013758 <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)
{
8013758: b590 push {r4, r7, lr}
801375a: b08d sub sp, #52 ; 0x34
801375c: af04 add r7, sp, #16
801375e: 6078 str r0, [r7, #4]
8013760: 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);
8013762: 687b ldr r3, [r7, #4]
8013764: 2b00 cmp r3, #0
8013766: d105 bne.n 8013774 <tcp_input+0x1c>
8013768: 4b9b ldr r3, [pc, #620] ; (80139d8 <tcp_input+0x280>)
801376a: 2283 movs r2, #131 ; 0x83
801376c: 499b ldr r1, [pc, #620] ; (80139dc <tcp_input+0x284>)
801376e: 489c ldr r0, [pc, #624] ; (80139e0 <tcp_input+0x288>)
8013770: f008 feea bl 801c548 <iprintf>
PERF_START;
TCP_STATS_INC(tcp.recv);
MIB2_STATS_INC(mib2.tcpinsegs);
tcphdr = (struct tcp_hdr *)p->payload;
8013774: 687b ldr r3, [r7, #4]
8013776: 685b ldr r3, [r3, #4]
8013778: 4a9a ldr r2, [pc, #616] ; (80139e4 <tcp_input+0x28c>)
801377a: 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) {
801377c: 687b ldr r3, [r7, #4]
801377e: 895b ldrh r3, [r3, #10]
8013780: 2b13 cmp r3, #19
8013782: f240 83c4 bls.w 8013f0e <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()) ||
8013786: 4b98 ldr r3, [pc, #608] ; (80139e8 <tcp_input+0x290>)
8013788: 695a ldr r2, [r3, #20]
801378a: 4b97 ldr r3, [pc, #604] ; (80139e8 <tcp_input+0x290>)
801378c: 681b ldr r3, [r3, #0]
801378e: 4619 mov r1, r3
8013790: 4610 mov r0, r2
8013792: f007 fe17 bl 801b3c4 <ip4_addr_isbroadcast_u32>
8013796: 4603 mov r3, r0
8013798: 2b00 cmp r3, #0
801379a: f040 83ba bne.w 8013f12 <tcp_input+0x7ba>
ip_addr_ismulticast(ip_current_dest_addr())) {
801379e: 4b92 ldr r3, [pc, #584] ; (80139e8 <tcp_input+0x290>)
80137a0: 695b ldr r3, [r3, #20]
80137a2: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
80137a6: 2be0 cmp r3, #224 ; 0xe0
80137a8: f000 83b3 beq.w 8013f12 <tcp_input+0x7ba>
}
}
#endif /* CHECKSUM_CHECK_TCP */
/* sanity-check header length */
hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr);
80137ac: 4b8d ldr r3, [pc, #564] ; (80139e4 <tcp_input+0x28c>)
80137ae: 681b ldr r3, [r3, #0]
80137b0: 899b ldrh r3, [r3, #12]
80137b2: b29b uxth r3, r3
80137b4: 4618 mov r0, r3
80137b6: f7fc fde3 bl 8010380 <lwip_htons>
80137ba: 4603 mov r3, r0
80137bc: 0b1b lsrs r3, r3, #12
80137be: b29b uxth r3, r3
80137c0: b2db uxtb r3, r3
80137c2: 009b lsls r3, r3, #2
80137c4: 74bb strb r3, [r7, #18]
if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
80137c6: 7cbb ldrb r3, [r7, #18]
80137c8: 2b13 cmp r3, #19
80137ca: f240 83a2 bls.w 8013f12 <tcp_input+0x7ba>
80137ce: 7cbb ldrb r3, [r7, #18]
80137d0: b29a uxth r2, r3
80137d2: 687b ldr r3, [r7, #4]
80137d4: 891b ldrh r3, [r3, #8]
80137d6: 429a cmp r2, r3
80137d8: f200 839b bhi.w 8013f12 <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);
80137dc: 7cbb ldrb r3, [r7, #18]
80137de: b29b uxth r3, r3
80137e0: 3b14 subs r3, #20
80137e2: b29a uxth r2, r3
80137e4: 4b81 ldr r3, [pc, #516] ; (80139ec <tcp_input+0x294>)
80137e6: 801a strh r2, [r3, #0]
tcphdr_opt2 = NULL;
80137e8: 4b81 ldr r3, [pc, #516] ; (80139f0 <tcp_input+0x298>)
80137ea: 2200 movs r2, #0
80137ec: 601a str r2, [r3, #0]
if (p->len >= hdrlen_bytes) {
80137ee: 687b ldr r3, [r7, #4]
80137f0: 895a ldrh r2, [r3, #10]
80137f2: 7cbb ldrb r3, [r7, #18]
80137f4: b29b uxth r3, r3
80137f6: 429a cmp r2, r3
80137f8: d309 bcc.n 801380e <tcp_input+0xb6>
/* all options are in the first pbuf */
tcphdr_opt1len = tcphdr_optlen;
80137fa: 4b7c ldr r3, [pc, #496] ; (80139ec <tcp_input+0x294>)
80137fc: 881a ldrh r2, [r3, #0]
80137fe: 4b7d ldr r3, [pc, #500] ; (80139f4 <tcp_input+0x29c>)
8013800: 801a strh r2, [r3, #0]
pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */
8013802: 7cbb ldrb r3, [r7, #18]
8013804: 4619 mov r1, r3
8013806: 6878 ldr r0, [r7, #4]
8013808: f7fe f8e8 bl 80119dc <pbuf_remove_header>
801380c: e04e b.n 80138ac <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);
801380e: 687b ldr r3, [r7, #4]
8013810: 681b ldr r3, [r3, #0]
8013812: 2b00 cmp r3, #0
8013814: d105 bne.n 8013822 <tcp_input+0xca>
8013816: 4b70 ldr r3, [pc, #448] ; (80139d8 <tcp_input+0x280>)
8013818: 22c2 movs r2, #194 ; 0xc2
801381a: 4977 ldr r1, [pc, #476] ; (80139f8 <tcp_input+0x2a0>)
801381c: 4870 ldr r0, [pc, #448] ; (80139e0 <tcp_input+0x288>)
801381e: f008 fe93 bl 801c548 <iprintf>
/* advance over the TCP header (cannot fail) */
pbuf_remove_header(p, TCP_HLEN);
8013822: 2114 movs r1, #20
8013824: 6878 ldr r0, [r7, #4]
8013826: f7fe f8d9 bl 80119dc <pbuf_remove_header>
/* determine how long the first and second parts of the options are */
tcphdr_opt1len = p->len;
801382a: 687b ldr r3, [r7, #4]
801382c: 895a ldrh r2, [r3, #10]
801382e: 4b71 ldr r3, [pc, #452] ; (80139f4 <tcp_input+0x29c>)
8013830: 801a strh r2, [r3, #0]
opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len);
8013832: 4b6e ldr r3, [pc, #440] ; (80139ec <tcp_input+0x294>)
8013834: 881a ldrh r2, [r3, #0]
8013836: 4b6f ldr r3, [pc, #444] ; (80139f4 <tcp_input+0x29c>)
8013838: 881b ldrh r3, [r3, #0]
801383a: 1ad3 subs r3, r2, r3
801383c: 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);
801383e: 4b6d ldr r3, [pc, #436] ; (80139f4 <tcp_input+0x29c>)
8013840: 881b ldrh r3, [r3, #0]
8013842: 4619 mov r1, r3
8013844: 6878 ldr r0, [r7, #4]
8013846: f7fe f8c9 bl 80119dc <pbuf_remove_header>
/* check that the options fit in the second pbuf */
if (opt2len > p->next->len) {
801384a: 687b ldr r3, [r7, #4]
801384c: 681b ldr r3, [r3, #0]
801384e: 895b ldrh r3, [r3, #10]
8013850: 8a3a ldrh r2, [r7, #16]
8013852: 429a cmp r2, r3
8013854: f200 835f bhi.w 8013f16 <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;
8013858: 687b ldr r3, [r7, #4]
801385a: 681b ldr r3, [r3, #0]
801385c: 685b ldr r3, [r3, #4]
801385e: 4a64 ldr r2, [pc, #400] ; (80139f0 <tcp_input+0x298>)
8013860: 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);
8013862: 687b ldr r3, [r7, #4]
8013864: 681b ldr r3, [r3, #0]
8013866: 8a3a ldrh r2, [r7, #16]
8013868: 4611 mov r1, r2
801386a: 4618 mov r0, r3
801386c: f7fe f8b6 bl 80119dc <pbuf_remove_header>
p->tot_len = (u16_t)(p->tot_len - opt2len);
8013870: 687b ldr r3, [r7, #4]
8013872: 891a ldrh r2, [r3, #8]
8013874: 8a3b ldrh r3, [r7, #16]
8013876: 1ad3 subs r3, r2, r3
8013878: b29a uxth r2, r3
801387a: 687b ldr r3, [r7, #4]
801387c: 811a strh r2, [r3, #8]
LWIP_ASSERT("p->len == 0", p->len == 0);
801387e: 687b ldr r3, [r7, #4]
8013880: 895b ldrh r3, [r3, #10]
8013882: 2b00 cmp r3, #0
8013884: d005 beq.n 8013892 <tcp_input+0x13a>
8013886: 4b54 ldr r3, [pc, #336] ; (80139d8 <tcp_input+0x280>)
8013888: 22df movs r2, #223 ; 0xdf
801388a: 495c ldr r1, [pc, #368] ; (80139fc <tcp_input+0x2a4>)
801388c: 4854 ldr r0, [pc, #336] ; (80139e0 <tcp_input+0x288>)
801388e: f008 fe5b bl 801c548 <iprintf>
LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
8013892: 687b ldr r3, [r7, #4]
8013894: 891a ldrh r2, [r3, #8]
8013896: 687b ldr r3, [r7, #4]
8013898: 681b ldr r3, [r3, #0]
801389a: 891b ldrh r3, [r3, #8]
801389c: 429a cmp r2, r3
801389e: d005 beq.n 80138ac <tcp_input+0x154>
80138a0: 4b4d ldr r3, [pc, #308] ; (80139d8 <tcp_input+0x280>)
80138a2: 22e0 movs r2, #224 ; 0xe0
80138a4: 4956 ldr r1, [pc, #344] ; (8013a00 <tcp_input+0x2a8>)
80138a6: 484e ldr r0, [pc, #312] ; (80139e0 <tcp_input+0x288>)
80138a8: f008 fe4e bl 801c548 <iprintf>
}
/* Convert fields in TCP header to host byte order. */
tcphdr->src = lwip_ntohs(tcphdr->src);
80138ac: 4b4d ldr r3, [pc, #308] ; (80139e4 <tcp_input+0x28c>)
80138ae: 681b ldr r3, [r3, #0]
80138b0: 881b ldrh r3, [r3, #0]
80138b2: b29a uxth r2, r3
80138b4: 4b4b ldr r3, [pc, #300] ; (80139e4 <tcp_input+0x28c>)
80138b6: 681c ldr r4, [r3, #0]
80138b8: 4610 mov r0, r2
80138ba: f7fc fd61 bl 8010380 <lwip_htons>
80138be: 4603 mov r3, r0
80138c0: 8023 strh r3, [r4, #0]
tcphdr->dest = lwip_ntohs(tcphdr->dest);
80138c2: 4b48 ldr r3, [pc, #288] ; (80139e4 <tcp_input+0x28c>)
80138c4: 681b ldr r3, [r3, #0]
80138c6: 885b ldrh r3, [r3, #2]
80138c8: b29a uxth r2, r3
80138ca: 4b46 ldr r3, [pc, #280] ; (80139e4 <tcp_input+0x28c>)
80138cc: 681c ldr r4, [r3, #0]
80138ce: 4610 mov r0, r2
80138d0: f7fc fd56 bl 8010380 <lwip_htons>
80138d4: 4603 mov r3, r0
80138d6: 8063 strh r3, [r4, #2]
seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno);
80138d8: 4b42 ldr r3, [pc, #264] ; (80139e4 <tcp_input+0x28c>)
80138da: 681b ldr r3, [r3, #0]
80138dc: 685a ldr r2, [r3, #4]
80138de: 4b41 ldr r3, [pc, #260] ; (80139e4 <tcp_input+0x28c>)
80138e0: 681c ldr r4, [r3, #0]
80138e2: 4610 mov r0, r2
80138e4: f7fc fd61 bl 80103aa <lwip_htonl>
80138e8: 4603 mov r3, r0
80138ea: 6063 str r3, [r4, #4]
80138ec: 6863 ldr r3, [r4, #4]
80138ee: 4a45 ldr r2, [pc, #276] ; (8013a04 <tcp_input+0x2ac>)
80138f0: 6013 str r3, [r2, #0]
ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno);
80138f2: 4b3c ldr r3, [pc, #240] ; (80139e4 <tcp_input+0x28c>)
80138f4: 681b ldr r3, [r3, #0]
80138f6: 689a ldr r2, [r3, #8]
80138f8: 4b3a ldr r3, [pc, #232] ; (80139e4 <tcp_input+0x28c>)
80138fa: 681c ldr r4, [r3, #0]
80138fc: 4610 mov r0, r2
80138fe: f7fc fd54 bl 80103aa <lwip_htonl>
8013902: 4603 mov r3, r0
8013904: 60a3 str r3, [r4, #8]
8013906: 68a3 ldr r3, [r4, #8]
8013908: 4a3f ldr r2, [pc, #252] ; (8013a08 <tcp_input+0x2b0>)
801390a: 6013 str r3, [r2, #0]
tcphdr->wnd = lwip_ntohs(tcphdr->wnd);
801390c: 4b35 ldr r3, [pc, #212] ; (80139e4 <tcp_input+0x28c>)
801390e: 681b ldr r3, [r3, #0]
8013910: 89db ldrh r3, [r3, #14]
8013912: b29a uxth r2, r3
8013914: 4b33 ldr r3, [pc, #204] ; (80139e4 <tcp_input+0x28c>)
8013916: 681c ldr r4, [r3, #0]
8013918: 4610 mov r0, r2
801391a: f7fc fd31 bl 8010380 <lwip_htons>
801391e: 4603 mov r3, r0
8013920: 81e3 strh r3, [r4, #14]
flags = TCPH_FLAGS(tcphdr);
8013922: 4b30 ldr r3, [pc, #192] ; (80139e4 <tcp_input+0x28c>)
8013924: 681b ldr r3, [r3, #0]
8013926: 899b ldrh r3, [r3, #12]
8013928: b29b uxth r3, r3
801392a: 4618 mov r0, r3
801392c: f7fc fd28 bl 8010380 <lwip_htons>
8013930: 4603 mov r3, r0
8013932: b2db uxtb r3, r3
8013934: f003 033f and.w r3, r3, #63 ; 0x3f
8013938: b2da uxtb r2, r3
801393a: 4b34 ldr r3, [pc, #208] ; (8013a0c <tcp_input+0x2b4>)
801393c: 701a strb r2, [r3, #0]
tcplen = p->tot_len;
801393e: 687b ldr r3, [r7, #4]
8013940: 891a ldrh r2, [r3, #8]
8013942: 4b33 ldr r3, [pc, #204] ; (8013a10 <tcp_input+0x2b8>)
8013944: 801a strh r2, [r3, #0]
if (flags & (TCP_FIN | TCP_SYN)) {
8013946: 4b31 ldr r3, [pc, #196] ; (8013a0c <tcp_input+0x2b4>)
8013948: 781b ldrb r3, [r3, #0]
801394a: f003 0303 and.w r3, r3, #3
801394e: 2b00 cmp r3, #0
8013950: d00c beq.n 801396c <tcp_input+0x214>
tcplen++;
8013952: 4b2f ldr r3, [pc, #188] ; (8013a10 <tcp_input+0x2b8>)
8013954: 881b ldrh r3, [r3, #0]
8013956: 3301 adds r3, #1
8013958: b29a uxth r2, r3
801395a: 4b2d ldr r3, [pc, #180] ; (8013a10 <tcp_input+0x2b8>)
801395c: 801a strh r2, [r3, #0]
if (tcplen < p->tot_len) {
801395e: 687b ldr r3, [r7, #4]
8013960: 891a ldrh r2, [r3, #8]
8013962: 4b2b ldr r3, [pc, #172] ; (8013a10 <tcp_input+0x2b8>)
8013964: 881b ldrh r3, [r3, #0]
8013966: 429a cmp r2, r3
8013968: f200 82d7 bhi.w 8013f1a <tcp_input+0x7c2>
}
}
/* Demultiplex an incoming segment. First, we check if it is destined
for an active connection. */
prev = NULL;
801396c: 2300 movs r3, #0
801396e: 61bb str r3, [r7, #24]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8013970: 4b28 ldr r3, [pc, #160] ; (8013a14 <tcp_input+0x2bc>)
8013972: 681b ldr r3, [r3, #0]
8013974: 61fb str r3, [r7, #28]
8013976: e09d b.n 8013ab4 <tcp_input+0x35c>
LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
8013978: 69fb ldr r3, [r7, #28]
801397a: 7d1b ldrb r3, [r3, #20]
801397c: 2b00 cmp r3, #0
801397e: d105 bne.n 801398c <tcp_input+0x234>
8013980: 4b15 ldr r3, [pc, #84] ; (80139d8 <tcp_input+0x280>)
8013982: 22fb movs r2, #251 ; 0xfb
8013984: 4924 ldr r1, [pc, #144] ; (8013a18 <tcp_input+0x2c0>)
8013986: 4816 ldr r0, [pc, #88] ; (80139e0 <tcp_input+0x288>)
8013988: f008 fdde bl 801c548 <iprintf>
LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
801398c: 69fb ldr r3, [r7, #28]
801398e: 7d1b ldrb r3, [r3, #20]
8013990: 2b0a cmp r3, #10
8013992: d105 bne.n 80139a0 <tcp_input+0x248>
8013994: 4b10 ldr r3, [pc, #64] ; (80139d8 <tcp_input+0x280>)
8013996: 22fc movs r2, #252 ; 0xfc
8013998: 4920 ldr r1, [pc, #128] ; (8013a1c <tcp_input+0x2c4>)
801399a: 4811 ldr r0, [pc, #68] ; (80139e0 <tcp_input+0x288>)
801399c: f008 fdd4 bl 801c548 <iprintf>
LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
80139a0: 69fb ldr r3, [r7, #28]
80139a2: 7d1b ldrb r3, [r3, #20]
80139a4: 2b01 cmp r3, #1
80139a6: d105 bne.n 80139b4 <tcp_input+0x25c>
80139a8: 4b0b ldr r3, [pc, #44] ; (80139d8 <tcp_input+0x280>)
80139aa: 22fd movs r2, #253 ; 0xfd
80139ac: 491c ldr r1, [pc, #112] ; (8013a20 <tcp_input+0x2c8>)
80139ae: 480c ldr r0, [pc, #48] ; (80139e0 <tcp_input+0x288>)
80139b0: f008 fdca bl 801c548 <iprintf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
80139b4: 69fb ldr r3, [r7, #28]
80139b6: 7a1b ldrb r3, [r3, #8]
80139b8: 2b00 cmp r3, #0
80139ba: d033 beq.n 8013a24 <tcp_input+0x2cc>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
80139bc: 69fb ldr r3, [r7, #28]
80139be: 7a1a ldrb r2, [r3, #8]
80139c0: 4b09 ldr r3, [pc, #36] ; (80139e8 <tcp_input+0x290>)
80139c2: 685b ldr r3, [r3, #4]
80139c4: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80139c8: 3301 adds r3, #1
80139ca: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
80139cc: 429a cmp r2, r3
80139ce: d029 beq.n 8013a24 <tcp_input+0x2cc>
prev = pcb;
80139d0: 69fb ldr r3, [r7, #28]
80139d2: 61bb str r3, [r7, #24]
continue;
80139d4: e06b b.n 8013aae <tcp_input+0x356>
80139d6: bf00 nop
80139d8: 0801eb30 .word 0x0801eb30
80139dc: 0801eb64 .word 0x0801eb64
80139e0: 0801eb7c .word 0x0801eb7c
80139e4: 20008728 .word 0x20008728
80139e8: 2000c0b4 .word 0x2000c0b4
80139ec: 2000872c .word 0x2000872c
80139f0: 20008730 .word 0x20008730
80139f4: 2000872e .word 0x2000872e
80139f8: 0801eba4 .word 0x0801eba4
80139fc: 0801ebb4 .word 0x0801ebb4
8013a00: 0801ebc0 .word 0x0801ebc0
8013a04: 20008738 .word 0x20008738
8013a08: 2000873c .word 0x2000873c
8013a0c: 20008744 .word 0x20008744
8013a10: 20008742 .word 0x20008742
8013a14: 2000f7e8 .word 0x2000f7e8
8013a18: 0801ebe0 .word 0x0801ebe0
8013a1c: 0801ec08 .word 0x0801ec08
8013a20: 0801ec34 .word 0x0801ec34
}
if (pcb->remote_port == tcphdr->src &&
8013a24: 69fb ldr r3, [r7, #28]
8013a26: 8b1a ldrh r2, [r3, #24]
8013a28: 4b94 ldr r3, [pc, #592] ; (8013c7c <tcp_input+0x524>)
8013a2a: 681b ldr r3, [r3, #0]
8013a2c: 881b ldrh r3, [r3, #0]
8013a2e: b29b uxth r3, r3
8013a30: 429a cmp r2, r3
8013a32: d13a bne.n 8013aaa <tcp_input+0x352>
pcb->local_port == tcphdr->dest &&
8013a34: 69fb ldr r3, [r7, #28]
8013a36: 8ada ldrh r2, [r3, #22]
8013a38: 4b90 ldr r3, [pc, #576] ; (8013c7c <tcp_input+0x524>)
8013a3a: 681b ldr r3, [r3, #0]
8013a3c: 885b ldrh r3, [r3, #2]
8013a3e: b29b uxth r3, r3
if (pcb->remote_port == tcphdr->src &&
8013a40: 429a cmp r2, r3
8013a42: d132 bne.n 8013aaa <tcp_input+0x352>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
8013a44: 69fb ldr r3, [r7, #28]
8013a46: 685a ldr r2, [r3, #4]
8013a48: 4b8d ldr r3, [pc, #564] ; (8013c80 <tcp_input+0x528>)
8013a4a: 691b ldr r3, [r3, #16]
pcb->local_port == tcphdr->dest &&
8013a4c: 429a cmp r2, r3
8013a4e: d12c bne.n 8013aaa <tcp_input+0x352>
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
8013a50: 69fb ldr r3, [r7, #28]
8013a52: 681a ldr r2, [r3, #0]
8013a54: 4b8a ldr r3, [pc, #552] ; (8013c80 <tcp_input+0x528>)
8013a56: 695b ldr r3, [r3, #20]
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
8013a58: 429a cmp r2, r3
8013a5a: d126 bne.n 8013aaa <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);
8013a5c: 69fb ldr r3, [r7, #28]
8013a5e: 68db ldr r3, [r3, #12]
8013a60: 69fa ldr r2, [r7, #28]
8013a62: 429a cmp r2, r3
8013a64: d106 bne.n 8013a74 <tcp_input+0x31c>
8013a66: 4b87 ldr r3, [pc, #540] ; (8013c84 <tcp_input+0x52c>)
8013a68: f240 120d movw r2, #269 ; 0x10d
8013a6c: 4986 ldr r1, [pc, #536] ; (8013c88 <tcp_input+0x530>)
8013a6e: 4887 ldr r0, [pc, #540] ; (8013c8c <tcp_input+0x534>)
8013a70: f008 fd6a bl 801c548 <iprintf>
if (prev != NULL) {
8013a74: 69bb ldr r3, [r7, #24]
8013a76: 2b00 cmp r3, #0
8013a78: d00a beq.n 8013a90 <tcp_input+0x338>
prev->next = pcb->next;
8013a7a: 69fb ldr r3, [r7, #28]
8013a7c: 68da ldr r2, [r3, #12]
8013a7e: 69bb ldr r3, [r7, #24]
8013a80: 60da str r2, [r3, #12]
pcb->next = tcp_active_pcbs;
8013a82: 4b83 ldr r3, [pc, #524] ; (8013c90 <tcp_input+0x538>)
8013a84: 681a ldr r2, [r3, #0]
8013a86: 69fb ldr r3, [r7, #28]
8013a88: 60da str r2, [r3, #12]
tcp_active_pcbs = pcb;
8013a8a: 4a81 ldr r2, [pc, #516] ; (8013c90 <tcp_input+0x538>)
8013a8c: 69fb ldr r3, [r7, #28]
8013a8e: 6013 str r3, [r2, #0]
} else {
TCP_STATS_INC(tcp.cachehit);
}
LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
8013a90: 69fb ldr r3, [r7, #28]
8013a92: 68db ldr r3, [r3, #12]
8013a94: 69fa ldr r2, [r7, #28]
8013a96: 429a cmp r2, r3
8013a98: d111 bne.n 8013abe <tcp_input+0x366>
8013a9a: 4b7a ldr r3, [pc, #488] ; (8013c84 <tcp_input+0x52c>)
8013a9c: f240 1215 movw r2, #277 ; 0x115
8013aa0: 497c ldr r1, [pc, #496] ; (8013c94 <tcp_input+0x53c>)
8013aa2: 487a ldr r0, [pc, #488] ; (8013c8c <tcp_input+0x534>)
8013aa4: f008 fd50 bl 801c548 <iprintf>
break;
8013aa8: e009 b.n 8013abe <tcp_input+0x366>
}
prev = pcb;
8013aaa: 69fb ldr r3, [r7, #28]
8013aac: 61bb str r3, [r7, #24]
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
8013aae: 69fb ldr r3, [r7, #28]
8013ab0: 68db ldr r3, [r3, #12]
8013ab2: 61fb str r3, [r7, #28]
8013ab4: 69fb ldr r3, [r7, #28]
8013ab6: 2b00 cmp r3, #0
8013ab8: f47f af5e bne.w 8013978 <tcp_input+0x220>
8013abc: e000 b.n 8013ac0 <tcp_input+0x368>
break;
8013abe: bf00 nop
}
if (pcb == NULL) {
8013ac0: 69fb ldr r3, [r7, #28]
8013ac2: 2b00 cmp r3, #0
8013ac4: f040 8095 bne.w 8013bf2 <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) {
8013ac8: 4b73 ldr r3, [pc, #460] ; (8013c98 <tcp_input+0x540>)
8013aca: 681b ldr r3, [r3, #0]
8013acc: 61fb str r3, [r7, #28]
8013ace: e03f b.n 8013b50 <tcp_input+0x3f8>
LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
8013ad0: 69fb ldr r3, [r7, #28]
8013ad2: 7d1b ldrb r3, [r3, #20]
8013ad4: 2b0a cmp r3, #10
8013ad6: d006 beq.n 8013ae6 <tcp_input+0x38e>
8013ad8: 4b6a ldr r3, [pc, #424] ; (8013c84 <tcp_input+0x52c>)
8013ada: f240 121f movw r2, #287 ; 0x11f
8013ade: 496f ldr r1, [pc, #444] ; (8013c9c <tcp_input+0x544>)
8013ae0: 486a ldr r0, [pc, #424] ; (8013c8c <tcp_input+0x534>)
8013ae2: f008 fd31 bl 801c548 <iprintf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8013ae6: 69fb ldr r3, [r7, #28]
8013ae8: 7a1b ldrb r3, [r3, #8]
8013aea: 2b00 cmp r3, #0
8013aec: d009 beq.n 8013b02 <tcp_input+0x3aa>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
8013aee: 69fb ldr r3, [r7, #28]
8013af0: 7a1a ldrb r2, [r3, #8]
8013af2: 4b63 ldr r3, [pc, #396] ; (8013c80 <tcp_input+0x528>)
8013af4: 685b ldr r3, [r3, #4]
8013af6: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8013afa: 3301 adds r3, #1
8013afc: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
8013afe: 429a cmp r2, r3
8013b00: d122 bne.n 8013b48 <tcp_input+0x3f0>
continue;
}
if (pcb->remote_port == tcphdr->src &&
8013b02: 69fb ldr r3, [r7, #28]
8013b04: 8b1a ldrh r2, [r3, #24]
8013b06: 4b5d ldr r3, [pc, #372] ; (8013c7c <tcp_input+0x524>)
8013b08: 681b ldr r3, [r3, #0]
8013b0a: 881b ldrh r3, [r3, #0]
8013b0c: b29b uxth r3, r3
8013b0e: 429a cmp r2, r3
8013b10: d11b bne.n 8013b4a <tcp_input+0x3f2>
pcb->local_port == tcphdr->dest &&
8013b12: 69fb ldr r3, [r7, #28]
8013b14: 8ada ldrh r2, [r3, #22]
8013b16: 4b59 ldr r3, [pc, #356] ; (8013c7c <tcp_input+0x524>)
8013b18: 681b ldr r3, [r3, #0]
8013b1a: 885b ldrh r3, [r3, #2]
8013b1c: b29b uxth r3, r3
if (pcb->remote_port == tcphdr->src &&
8013b1e: 429a cmp r2, r3
8013b20: d113 bne.n 8013b4a <tcp_input+0x3f2>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
8013b22: 69fb ldr r3, [r7, #28]
8013b24: 685a ldr r2, [r3, #4]
8013b26: 4b56 ldr r3, [pc, #344] ; (8013c80 <tcp_input+0x528>)
8013b28: 691b ldr r3, [r3, #16]
pcb->local_port == tcphdr->dest &&
8013b2a: 429a cmp r2, r3
8013b2c: d10d bne.n 8013b4a <tcp_input+0x3f2>
ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
8013b2e: 69fb ldr r3, [r7, #28]
8013b30: 681a ldr r2, [r3, #0]
8013b32: 4b53 ldr r3, [pc, #332] ; (8013c80 <tcp_input+0x528>)
8013b34: 695b ldr r3, [r3, #20]
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
8013b36: 429a cmp r2, r3
8013b38: d107 bne.n 8013b4a <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);
8013b3a: 69f8 ldr r0, [r7, #28]
8013b3c: f000 fb52 bl 80141e4 <tcp_timewait_input>
}
pbuf_free(p);
8013b40: 6878 ldr r0, [r7, #4]
8013b42: f7fd ffd1 bl 8011ae8 <pbuf_free>
return;
8013b46: e1ee b.n 8013f26 <tcp_input+0x7ce>
continue;
8013b48: bf00 nop
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
8013b4a: 69fb ldr r3, [r7, #28]
8013b4c: 68db ldr r3, [r3, #12]
8013b4e: 61fb str r3, [r7, #28]
8013b50: 69fb ldr r3, [r7, #28]
8013b52: 2b00 cmp r3, #0
8013b54: d1bc bne.n 8013ad0 <tcp_input+0x378>
}
}
/* Finally, if we still did not get a match, we check all PCBs that
are LISTENing for incoming connections. */
prev = NULL;
8013b56: 2300 movs r3, #0
8013b58: 61bb str r3, [r7, #24]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
8013b5a: 4b51 ldr r3, [pc, #324] ; (8013ca0 <tcp_input+0x548>)
8013b5c: 681b ldr r3, [r3, #0]
8013b5e: 617b str r3, [r7, #20]
8013b60: e02a b.n 8013bb8 <tcp_input+0x460>
/* check if PCB is bound to specific netif */
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
8013b62: 697b ldr r3, [r7, #20]
8013b64: 7a1b ldrb r3, [r3, #8]
8013b66: 2b00 cmp r3, #0
8013b68: d00c beq.n 8013b84 <tcp_input+0x42c>
(lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
8013b6a: 697b ldr r3, [r7, #20]
8013b6c: 7a1a ldrb r2, [r3, #8]
8013b6e: 4b44 ldr r3, [pc, #272] ; (8013c80 <tcp_input+0x528>)
8013b70: 685b ldr r3, [r3, #4]
8013b72: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
8013b76: 3301 adds r3, #1
8013b78: b2db uxtb r3, r3
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
8013b7a: 429a cmp r2, r3
8013b7c: d002 beq.n 8013b84 <tcp_input+0x42c>
prev = (struct tcp_pcb *)lpcb;
8013b7e: 697b ldr r3, [r7, #20]
8013b80: 61bb str r3, [r7, #24]
continue;
8013b82: e016 b.n 8013bb2 <tcp_input+0x45a>
}
if (lpcb->local_port == tcphdr->dest) {
8013b84: 697b ldr r3, [r7, #20]
8013b86: 8ada ldrh r2, [r3, #22]
8013b88: 4b3c ldr r3, [pc, #240] ; (8013c7c <tcp_input+0x524>)
8013b8a: 681b ldr r3, [r3, #0]
8013b8c: 885b ldrh r3, [r3, #2]
8013b8e: b29b uxth r3, r3
8013b90: 429a cmp r2, r3
8013b92: d10c bne.n 8013bae <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())) {
8013b94: 697b ldr r3, [r7, #20]
8013b96: 681a ldr r2, [r3, #0]
8013b98: 4b39 ldr r3, [pc, #228] ; (8013c80 <tcp_input+0x528>)
8013b9a: 695b ldr r3, [r3, #20]
8013b9c: 429a cmp r2, r3
8013b9e: d00f beq.n 8013bc0 <tcp_input+0x468>
/* found an exact match */
break;
} else if (ip_addr_isany(&lpcb->local_ip)) {
8013ba0: 697b ldr r3, [r7, #20]
8013ba2: 2b00 cmp r3, #0
8013ba4: d00d beq.n 8013bc2 <tcp_input+0x46a>
8013ba6: 697b ldr r3, [r7, #20]
8013ba8: 681b ldr r3, [r3, #0]
8013baa: 2b00 cmp r3, #0
8013bac: d009 beq.n 8013bc2 <tcp_input+0x46a>
break;
#endif /* SO_REUSE */
}
}
}
prev = (struct tcp_pcb *)lpcb;
8013bae: 697b ldr r3, [r7, #20]
8013bb0: 61bb str r3, [r7, #24]
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
8013bb2: 697b ldr r3, [r7, #20]
8013bb4: 68db ldr r3, [r3, #12]
8013bb6: 617b str r3, [r7, #20]
8013bb8: 697b ldr r3, [r7, #20]
8013bba: 2b00 cmp r3, #0
8013bbc: d1d1 bne.n 8013b62 <tcp_input+0x40a>
8013bbe: e000 b.n 8013bc2 <tcp_input+0x46a>
break;
8013bc0: 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) {
8013bc2: 697b ldr r3, [r7, #20]
8013bc4: 2b00 cmp r3, #0
8013bc6: d014 beq.n 8013bf2 <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) {
8013bc8: 69bb ldr r3, [r7, #24]
8013bca: 2b00 cmp r3, #0
8013bcc: d00a beq.n 8013be4 <tcp_input+0x48c>
((struct tcp_pcb_listen *)prev)->next = lpcb->next;
8013bce: 697b ldr r3, [r7, #20]
8013bd0: 68da ldr r2, [r3, #12]
8013bd2: 69bb ldr r3, [r7, #24]
8013bd4: 60da str r2, [r3, #12]
/* our successor is the remainder of the listening list */
lpcb->next = tcp_listen_pcbs.listen_pcbs;
8013bd6: 4b32 ldr r3, [pc, #200] ; (8013ca0 <tcp_input+0x548>)
8013bd8: 681a ldr r2, [r3, #0]
8013bda: 697b ldr r3, [r7, #20]
8013bdc: 60da str r2, [r3, #12]
/* put this listening pcb at the head of the listening list */
tcp_listen_pcbs.listen_pcbs = lpcb;
8013bde: 4a30 ldr r2, [pc, #192] ; (8013ca0 <tcp_input+0x548>)
8013be0: 697b ldr r3, [r7, #20]
8013be2: 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);
8013be4: 6978 ldr r0, [r7, #20]
8013be6: f000 f9ff bl 8013fe8 <tcp_listen_input>
}
pbuf_free(p);
8013bea: 6878 ldr r0, [r7, #4]
8013bec: f7fd ff7c bl 8011ae8 <pbuf_free>
return;
8013bf0: e199 b.n 8013f26 <tcp_input+0x7ce>
tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) {
pbuf_free(p);
return;
}
#endif
if (pcb != NULL) {
8013bf2: 69fb ldr r3, [r7, #28]
8013bf4: 2b00 cmp r3, #0
8013bf6: f000 8160 beq.w 8013eba <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;
8013bfa: 4b2a ldr r3, [pc, #168] ; (8013ca4 <tcp_input+0x54c>)
8013bfc: 2200 movs r2, #0
8013bfe: 601a str r2, [r3, #0]
inseg.len = p->tot_len;
8013c00: 687b ldr r3, [r7, #4]
8013c02: 891a ldrh r2, [r3, #8]
8013c04: 4b27 ldr r3, [pc, #156] ; (8013ca4 <tcp_input+0x54c>)
8013c06: 811a strh r2, [r3, #8]
inseg.p = p;
8013c08: 4a26 ldr r2, [pc, #152] ; (8013ca4 <tcp_input+0x54c>)
8013c0a: 687b ldr r3, [r7, #4]
8013c0c: 6053 str r3, [r2, #4]
inseg.tcphdr = tcphdr;
8013c0e: 4b1b ldr r3, [pc, #108] ; (8013c7c <tcp_input+0x524>)
8013c10: 681b ldr r3, [r3, #0]
8013c12: 4a24 ldr r2, [pc, #144] ; (8013ca4 <tcp_input+0x54c>)
8013c14: 60d3 str r3, [r2, #12]
recv_data = NULL;
8013c16: 4b24 ldr r3, [pc, #144] ; (8013ca8 <tcp_input+0x550>)
8013c18: 2200 movs r2, #0
8013c1a: 601a str r2, [r3, #0]
recv_flags = 0;
8013c1c: 4b23 ldr r3, [pc, #140] ; (8013cac <tcp_input+0x554>)
8013c1e: 2200 movs r2, #0
8013c20: 701a strb r2, [r3, #0]
recv_acked = 0;
8013c22: 4b23 ldr r3, [pc, #140] ; (8013cb0 <tcp_input+0x558>)
8013c24: 2200 movs r2, #0
8013c26: 801a strh r2, [r3, #0]
if (flags & TCP_PSH) {
8013c28: 4b22 ldr r3, [pc, #136] ; (8013cb4 <tcp_input+0x55c>)
8013c2a: 781b ldrb r3, [r3, #0]
8013c2c: f003 0308 and.w r3, r3, #8
8013c30: 2b00 cmp r3, #0
8013c32: d006 beq.n 8013c42 <tcp_input+0x4ea>
p->flags |= PBUF_FLAG_PUSH;
8013c34: 687b ldr r3, [r7, #4]
8013c36: 7b5b ldrb r3, [r3, #13]
8013c38: f043 0301 orr.w r3, r3, #1
8013c3c: b2da uxtb r2, r3
8013c3e: 687b ldr r3, [r7, #4]
8013c40: 735a strb r2, [r3, #13]
}
/* If there is data which was previously "refused" by upper layer */
if (pcb->refused_data != NULL) {
8013c42: 69fb ldr r3, [r7, #28]
8013c44: 6f9b ldr r3, [r3, #120] ; 0x78
8013c46: 2b00 cmp r3, #0
8013c48: d038 beq.n 8013cbc <tcp_input+0x564>
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
8013c4a: 69f8 ldr r0, [r7, #28]
8013c4c: f7ff f940 bl 8012ed0 <tcp_process_refused_data>
8013c50: 4603 mov r3, r0
8013c52: f113 0f0d cmn.w r3, #13
8013c56: d007 beq.n 8013c68 <tcp_input+0x510>
((pcb->refused_data != NULL) && (tcplen > 0))) {
8013c58: 69fb ldr r3, [r7, #28]
8013c5a: 6f9b ldr r3, [r3, #120] ; 0x78
if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
8013c5c: 2b00 cmp r3, #0
8013c5e: d02d beq.n 8013cbc <tcp_input+0x564>
((pcb->refused_data != NULL) && (tcplen > 0))) {
8013c60: 4b15 ldr r3, [pc, #84] ; (8013cb8 <tcp_input+0x560>)
8013c62: 881b ldrh r3, [r3, #0]
8013c64: 2b00 cmp r3, #0
8013c66: d029 beq.n 8013cbc <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) {
8013c68: 69fb ldr r3, [r7, #28]
8013c6a: 8d5b ldrh r3, [r3, #42] ; 0x2a
8013c6c: 2b00 cmp r3, #0
8013c6e: f040 8104 bne.w 8013e7a <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);
8013c72: 69f8 ldr r0, [r7, #28]
8013c74: f003 f9ce bl 8017014 <tcp_send_empty_ack>
}
TCP_STATS_INC(tcp.drop);
MIB2_STATS_INC(mib2.tcpinerrs);
goto aborted;
8013c78: e0ff b.n 8013e7a <tcp_input+0x722>
8013c7a: bf00 nop
8013c7c: 20008728 .word 0x20008728
8013c80: 2000c0b4 .word 0x2000c0b4
8013c84: 0801eb30 .word 0x0801eb30
8013c88: 0801ec5c .word 0x0801ec5c
8013c8c: 0801eb7c .word 0x0801eb7c
8013c90: 2000f7e8 .word 0x2000f7e8
8013c94: 0801ec88 .word 0x0801ec88
8013c98: 2000f7f8 .word 0x2000f7f8
8013c9c: 0801ecb4 .word 0x0801ecb4
8013ca0: 2000f7f0 .word 0x2000f7f0
8013ca4: 20008718 .word 0x20008718
8013ca8: 20008748 .word 0x20008748
8013cac: 20008745 .word 0x20008745
8013cb0: 20008740 .word 0x20008740
8013cb4: 20008744 .word 0x20008744
8013cb8: 20008742 .word 0x20008742
}
}
tcp_input_pcb = pcb;
8013cbc: 4a9b ldr r2, [pc, #620] ; (8013f2c <tcp_input+0x7d4>)
8013cbe: 69fb ldr r3, [r7, #28]
8013cc0: 6013 str r3, [r2, #0]
err = tcp_process(pcb);
8013cc2: 69f8 ldr r0, [r7, #28]
8013cc4: f000 fb0a bl 80142dc <tcp_process>
8013cc8: 4603 mov r3, r0
8013cca: 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) {
8013ccc: f997 3013 ldrsb.w r3, [r7, #19]
8013cd0: f113 0f0d cmn.w r3, #13
8013cd4: f000 80d3 beq.w 8013e7e <tcp_input+0x726>
if (recv_flags & TF_RESET) {
8013cd8: 4b95 ldr r3, [pc, #596] ; (8013f30 <tcp_input+0x7d8>)
8013cda: 781b ldrb r3, [r3, #0]
8013cdc: f003 0308 and.w r3, r3, #8
8013ce0: 2b00 cmp r3, #0
8013ce2: d015 beq.n 8013d10 <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);
8013ce4: 69fb ldr r3, [r7, #28]
8013ce6: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8013cea: 2b00 cmp r3, #0
8013cec: d008 beq.n 8013d00 <tcp_input+0x5a8>
8013cee: 69fb ldr r3, [r7, #28]
8013cf0: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8013cf4: 69fa ldr r2, [r7, #28]
8013cf6: 6912 ldr r2, [r2, #16]
8013cf8: f06f 010d mvn.w r1, #13
8013cfc: 4610 mov r0, r2
8013cfe: 4798 blx r3
tcp_pcb_remove(&tcp_active_pcbs, pcb);
8013d00: 69f9 ldr r1, [r7, #28]
8013d02: 488c ldr r0, [pc, #560] ; (8013f34 <tcp_input+0x7dc>)
8013d04: f7ff fbb0 bl 8013468 <tcp_pcb_remove>
tcp_free(pcb);
8013d08: 69f8 ldr r0, [r7, #28]
8013d0a: f7fe f9a9 bl 8012060 <tcp_free>
8013d0e: e0c1 b.n 8013e94 <tcp_input+0x73c>
} else {
err = ERR_OK;
8013d10: 2300 movs r3, #0
8013d12: 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) {
8013d14: 4b88 ldr r3, [pc, #544] ; (8013f38 <tcp_input+0x7e0>)
8013d16: 881b ldrh r3, [r3, #0]
8013d18: 2b00 cmp r3, #0
8013d1a: d01d beq.n 8013d58 <tcp_input+0x600>
while (acked > 0) {
acked16 = (u16_t)LWIP_MIN(acked, 0xffffu);
acked -= acked16;
#else
{
acked16 = recv_acked;
8013d1c: 4b86 ldr r3, [pc, #536] ; (8013f38 <tcp_input+0x7e0>)
8013d1e: 881b ldrh r3, [r3, #0]
8013d20: 81fb strh r3, [r7, #14]
#endif
TCP_EVENT_SENT(pcb, (u16_t)acked16, err);
8013d22: 69fb ldr r3, [r7, #28]
8013d24: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
8013d28: 2b00 cmp r3, #0
8013d2a: d00a beq.n 8013d42 <tcp_input+0x5ea>
8013d2c: 69fb ldr r3, [r7, #28]
8013d2e: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80
8013d32: 69fa ldr r2, [r7, #28]
8013d34: 6910 ldr r0, [r2, #16]
8013d36: 89fa ldrh r2, [r7, #14]
8013d38: 69f9 ldr r1, [r7, #28]
8013d3a: 4798 blx r3
8013d3c: 4603 mov r3, r0
8013d3e: 74fb strb r3, [r7, #19]
8013d40: e001 b.n 8013d46 <tcp_input+0x5ee>
8013d42: 2300 movs r3, #0
8013d44: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8013d46: f997 3013 ldrsb.w r3, [r7, #19]
8013d4a: f113 0f0d cmn.w r3, #13
8013d4e: f000 8098 beq.w 8013e82 <tcp_input+0x72a>
goto aborted;
}
}
recv_acked = 0;
8013d52: 4b79 ldr r3, [pc, #484] ; (8013f38 <tcp_input+0x7e0>)
8013d54: 2200 movs r2, #0
8013d56: 801a strh r2, [r3, #0]
}
if (tcp_input_delayed_close(pcb)) {
8013d58: 69f8 ldr r0, [r7, #28]
8013d5a: f000 f905 bl 8013f68 <tcp_input_delayed_close>
8013d5e: 4603 mov r3, r0
8013d60: 2b00 cmp r3, #0
8013d62: f040 8090 bne.w 8013e86 <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) {
8013d66: 4b75 ldr r3, [pc, #468] ; (8013f3c <tcp_input+0x7e4>)
8013d68: 681b ldr r3, [r3, #0]
8013d6a: 2b00 cmp r3, #0
8013d6c: d041 beq.n 8013df2 <tcp_input+0x69a>
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL);
8013d6e: 69fb ldr r3, [r7, #28]
8013d70: 6f9b ldr r3, [r3, #120] ; 0x78
8013d72: 2b00 cmp r3, #0
8013d74: d006 beq.n 8013d84 <tcp_input+0x62c>
8013d76: 4b72 ldr r3, [pc, #456] ; (8013f40 <tcp_input+0x7e8>)
8013d78: f44f 72f3 mov.w r2, #486 ; 0x1e6
8013d7c: 4971 ldr r1, [pc, #452] ; (8013f44 <tcp_input+0x7ec>)
8013d7e: 4872 ldr r0, [pc, #456] ; (8013f48 <tcp_input+0x7f0>)
8013d80: f008 fbe2 bl 801c548 <iprintf>
if (pcb->flags & TF_RXCLOSED) {
8013d84: 69fb ldr r3, [r7, #28]
8013d86: 8b5b ldrh r3, [r3, #26]
8013d88: f003 0310 and.w r3, r3, #16
8013d8c: 2b00 cmp r3, #0
8013d8e: d008 beq.n 8013da2 <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);
8013d90: 4b6a ldr r3, [pc, #424] ; (8013f3c <tcp_input+0x7e4>)
8013d92: 681b ldr r3, [r3, #0]
8013d94: 4618 mov r0, r3
8013d96: f7fd fea7 bl 8011ae8 <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);
8013d9a: 69f8 ldr r0, [r7, #28]
8013d9c: f7fe fc40 bl 8012620 <tcp_abort>
goto aborted;
8013da0: e078 b.n 8013e94 <tcp_input+0x73c>
}
/* Notify application that data has been received. */
TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
8013da2: 69fb ldr r3, [r7, #28]
8013da4: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8013da8: 2b00 cmp r3, #0
8013daa: d00c beq.n 8013dc6 <tcp_input+0x66e>
8013dac: 69fb ldr r3, [r7, #28]
8013dae: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8013db2: 69fb ldr r3, [r7, #28]
8013db4: 6918 ldr r0, [r3, #16]
8013db6: 4b61 ldr r3, [pc, #388] ; (8013f3c <tcp_input+0x7e4>)
8013db8: 681a ldr r2, [r3, #0]
8013dba: 2300 movs r3, #0
8013dbc: 69f9 ldr r1, [r7, #28]
8013dbe: 47a0 blx r4
8013dc0: 4603 mov r3, r0
8013dc2: 74fb strb r3, [r7, #19]
8013dc4: e008 b.n 8013dd8 <tcp_input+0x680>
8013dc6: 4b5d ldr r3, [pc, #372] ; (8013f3c <tcp_input+0x7e4>)
8013dc8: 681a ldr r2, [r3, #0]
8013dca: 2300 movs r3, #0
8013dcc: 69f9 ldr r1, [r7, #28]
8013dce: 2000 movs r0, #0
8013dd0: f7ff f952 bl 8013078 <tcp_recv_null>
8013dd4: 4603 mov r3, r0
8013dd6: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8013dd8: f997 3013 ldrsb.w r3, [r7, #19]
8013ddc: f113 0f0d cmn.w r3, #13
8013de0: d053 beq.n 8013e8a <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) {
8013de2: f997 3013 ldrsb.w r3, [r7, #19]
8013de6: 2b00 cmp r3, #0
8013de8: d003 beq.n 8013df2 <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;
8013dea: 4b54 ldr r3, [pc, #336] ; (8013f3c <tcp_input+0x7e4>)
8013dec: 681a ldr r2, [r3, #0]
8013dee: 69fb ldr r3, [r7, #28]
8013df0: 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) {
8013df2: 4b4f ldr r3, [pc, #316] ; (8013f30 <tcp_input+0x7d8>)
8013df4: 781b ldrb r3, [r3, #0]
8013df6: f003 0320 and.w r3, r3, #32
8013dfa: 2b00 cmp r3, #0
8013dfc: d030 beq.n 8013e60 <tcp_input+0x708>
if (pcb->refused_data != NULL) {
8013dfe: 69fb ldr r3, [r7, #28]
8013e00: 6f9b ldr r3, [r3, #120] ; 0x78
8013e02: 2b00 cmp r3, #0
8013e04: d009 beq.n 8013e1a <tcp_input+0x6c2>
/* Delay this if we have refused data. */
pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN;
8013e06: 69fb ldr r3, [r7, #28]
8013e08: 6f9b ldr r3, [r3, #120] ; 0x78
8013e0a: 7b5a ldrb r2, [r3, #13]
8013e0c: 69fb ldr r3, [r7, #28]
8013e0e: 6f9b ldr r3, [r3, #120] ; 0x78
8013e10: f042 0220 orr.w r2, r2, #32
8013e14: b2d2 uxtb r2, r2
8013e16: 735a strb r2, [r3, #13]
8013e18: e022 b.n 8013e60 <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)) {
8013e1a: 69fb ldr r3, [r7, #28]
8013e1c: 8d1b ldrh r3, [r3, #40] ; 0x28
8013e1e: f5b3 6f06 cmp.w r3, #2144 ; 0x860
8013e22: d005 beq.n 8013e30 <tcp_input+0x6d8>
pcb->rcv_wnd++;
8013e24: 69fb ldr r3, [r7, #28]
8013e26: 8d1b ldrh r3, [r3, #40] ; 0x28
8013e28: 3301 adds r3, #1
8013e2a: b29a uxth r2, r3
8013e2c: 69fb ldr r3, [r7, #28]
8013e2e: 851a strh r2, [r3, #40] ; 0x28
}
TCP_EVENT_CLOSED(pcb, err);
8013e30: 69fb ldr r3, [r7, #28]
8013e32: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
8013e36: 2b00 cmp r3, #0
8013e38: d00b beq.n 8013e52 <tcp_input+0x6fa>
8013e3a: 69fb ldr r3, [r7, #28]
8013e3c: f8d3 4084 ldr.w r4, [r3, #132] ; 0x84
8013e40: 69fb ldr r3, [r7, #28]
8013e42: 6918 ldr r0, [r3, #16]
8013e44: 2300 movs r3, #0
8013e46: 2200 movs r2, #0
8013e48: 69f9 ldr r1, [r7, #28]
8013e4a: 47a0 blx r4
8013e4c: 4603 mov r3, r0
8013e4e: 74fb strb r3, [r7, #19]
8013e50: e001 b.n 8013e56 <tcp_input+0x6fe>
8013e52: 2300 movs r3, #0
8013e54: 74fb strb r3, [r7, #19]
if (err == ERR_ABRT) {
8013e56: f997 3013 ldrsb.w r3, [r7, #19]
8013e5a: f113 0f0d cmn.w r3, #13
8013e5e: d016 beq.n 8013e8e <tcp_input+0x736>
goto aborted;
}
}
}
tcp_input_pcb = NULL;
8013e60: 4b32 ldr r3, [pc, #200] ; (8013f2c <tcp_input+0x7d4>)
8013e62: 2200 movs r2, #0
8013e64: 601a str r2, [r3, #0]
if (tcp_input_delayed_close(pcb)) {
8013e66: 69f8 ldr r0, [r7, #28]
8013e68: f000 f87e bl 8013f68 <tcp_input_delayed_close>
8013e6c: 4603 mov r3, r0
8013e6e: 2b00 cmp r3, #0
8013e70: d10f bne.n 8013e92 <tcp_input+0x73a>
goto aborted;
}
/* Try to send something out. */
tcp_output(pcb);
8013e72: 69f8 ldr r0, [r7, #28]
8013e74: f002 fab6 bl 80163e4 <tcp_output>
8013e78: e00c b.n 8013e94 <tcp_input+0x73c>
goto aborted;
8013e7a: bf00 nop
8013e7c: e00a b.n 8013e94 <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:
8013e7e: bf00 nop
8013e80: e008 b.n 8013e94 <tcp_input+0x73c>
goto aborted;
8013e82: bf00 nop
8013e84: e006 b.n 8013e94 <tcp_input+0x73c>
goto aborted;
8013e86: bf00 nop
8013e88: e004 b.n 8013e94 <tcp_input+0x73c>
goto aborted;
8013e8a: bf00 nop
8013e8c: e002 b.n 8013e94 <tcp_input+0x73c>
goto aborted;
8013e8e: bf00 nop
8013e90: e000 b.n 8013e94 <tcp_input+0x73c>
goto aborted;
8013e92: bf00 nop
tcp_input_pcb = NULL;
8013e94: 4b25 ldr r3, [pc, #148] ; (8013f2c <tcp_input+0x7d4>)
8013e96: 2200 movs r2, #0
8013e98: 601a str r2, [r3, #0]
recv_data = NULL;
8013e9a: 4b28 ldr r3, [pc, #160] ; (8013f3c <tcp_input+0x7e4>)
8013e9c: 2200 movs r2, #0
8013e9e: 601a str r2, [r3, #0]
/* give up our reference to inseg.p */
if (inseg.p != NULL) {
8013ea0: 4b2a ldr r3, [pc, #168] ; (8013f4c <tcp_input+0x7f4>)
8013ea2: 685b ldr r3, [r3, #4]
8013ea4: 2b00 cmp r3, #0
8013ea6: d03d beq.n 8013f24 <tcp_input+0x7cc>
pbuf_free(inseg.p);
8013ea8: 4b28 ldr r3, [pc, #160] ; (8013f4c <tcp_input+0x7f4>)
8013eaa: 685b ldr r3, [r3, #4]
8013eac: 4618 mov r0, r3
8013eae: f7fd fe1b bl 8011ae8 <pbuf_free>
inseg.p = NULL;
8013eb2: 4b26 ldr r3, [pc, #152] ; (8013f4c <tcp_input+0x7f4>)
8013eb4: 2200 movs r2, #0
8013eb6: 605a str r2, [r3, #4]
pbuf_free(p);
}
LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane());
PERF_STOP("tcp_input");
return;
8013eb8: e034 b.n 8013f24 <tcp_input+0x7cc>
if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) {
8013eba: 4b25 ldr r3, [pc, #148] ; (8013f50 <tcp_input+0x7f8>)
8013ebc: 681b ldr r3, [r3, #0]
8013ebe: 899b ldrh r3, [r3, #12]
8013ec0: b29b uxth r3, r3
8013ec2: 4618 mov r0, r3
8013ec4: f7fc fa5c bl 8010380 <lwip_htons>
8013ec8: 4603 mov r3, r0
8013eca: b2db uxtb r3, r3
8013ecc: f003 0304 and.w r3, r3, #4
8013ed0: 2b00 cmp r3, #0
8013ed2: d118 bne.n 8013f06 <tcp_input+0x7ae>
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8013ed4: 4b1f ldr r3, [pc, #124] ; (8013f54 <tcp_input+0x7fc>)
8013ed6: 6819 ldr r1, [r3, #0]
8013ed8: 4b1f ldr r3, [pc, #124] ; (8013f58 <tcp_input+0x800>)
8013eda: 881b ldrh r3, [r3, #0]
8013edc: 461a mov r2, r3
8013ede: 4b1f ldr r3, [pc, #124] ; (8013f5c <tcp_input+0x804>)
8013ee0: 681b ldr r3, [r3, #0]
8013ee2: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8013ee4: 4b1a ldr r3, [pc, #104] ; (8013f50 <tcp_input+0x7f8>)
8013ee6: 681b ldr r3, [r3, #0]
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8013ee8: 885b ldrh r3, [r3, #2]
8013eea: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8013eec: 4a18 ldr r2, [pc, #96] ; (8013f50 <tcp_input+0x7f8>)
8013eee: 6812 ldr r2, [r2, #0]
tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
8013ef0: 8812 ldrh r2, [r2, #0]
8013ef2: b292 uxth r2, r2
8013ef4: 9202 str r2, [sp, #8]
8013ef6: 9301 str r3, [sp, #4]
8013ef8: 4b19 ldr r3, [pc, #100] ; (8013f60 <tcp_input+0x808>)
8013efa: 9300 str r3, [sp, #0]
8013efc: 4b19 ldr r3, [pc, #100] ; (8013f64 <tcp_input+0x80c>)
8013efe: 4602 mov r2, r0
8013f00: 2000 movs r0, #0
8013f02: f003 f835 bl 8016f70 <tcp_rst>
pbuf_free(p);
8013f06: 6878 ldr r0, [r7, #4]
8013f08: f7fd fdee bl 8011ae8 <pbuf_free>
return;
8013f0c: e00a b.n 8013f24 <tcp_input+0x7cc>
goto dropped;
8013f0e: bf00 nop
8013f10: e004 b.n 8013f1c <tcp_input+0x7c4>
dropped:
8013f12: bf00 nop
8013f14: e002 b.n 8013f1c <tcp_input+0x7c4>
goto dropped;
8013f16: bf00 nop
8013f18: e000 b.n 8013f1c <tcp_input+0x7c4>
goto dropped;
8013f1a: bf00 nop
TCP_STATS_INC(tcp.drop);
MIB2_STATS_INC(mib2.tcpinerrs);
pbuf_free(p);
8013f1c: 6878 ldr r0, [r7, #4]
8013f1e: f7fd fde3 bl 8011ae8 <pbuf_free>
8013f22: e000 b.n 8013f26 <tcp_input+0x7ce>
return;
8013f24: bf00 nop
}
8013f26: 3724 adds r7, #36 ; 0x24
8013f28: 46bd mov sp, r7
8013f2a: bd90 pop {r4, r7, pc}
8013f2c: 2000f7fc .word 0x2000f7fc
8013f30: 20008745 .word 0x20008745
8013f34: 2000f7e8 .word 0x2000f7e8
8013f38: 20008740 .word 0x20008740
8013f3c: 20008748 .word 0x20008748
8013f40: 0801eb30 .word 0x0801eb30
8013f44: 0801ece4 .word 0x0801ece4
8013f48: 0801eb7c .word 0x0801eb7c
8013f4c: 20008718 .word 0x20008718
8013f50: 20008728 .word 0x20008728
8013f54: 2000873c .word 0x2000873c
8013f58: 20008742 .word 0x20008742
8013f5c: 20008738 .word 0x20008738
8013f60: 2000c0c4 .word 0x2000c0c4
8013f64: 2000c0c8 .word 0x2000c0c8
08013f68 <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)
{
8013f68: b580 push {r7, lr}
8013f6a: b082 sub sp, #8
8013f6c: af00 add r7, sp, #0
8013f6e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
8013f70: 687b ldr r3, [r7, #4]
8013f72: 2b00 cmp r3, #0
8013f74: d106 bne.n 8013f84 <tcp_input_delayed_close+0x1c>
8013f76: 4b17 ldr r3, [pc, #92] ; (8013fd4 <tcp_input_delayed_close+0x6c>)
8013f78: f240 225a movw r2, #602 ; 0x25a
8013f7c: 4916 ldr r1, [pc, #88] ; (8013fd8 <tcp_input_delayed_close+0x70>)
8013f7e: 4817 ldr r0, [pc, #92] ; (8013fdc <tcp_input_delayed_close+0x74>)
8013f80: f008 fae2 bl 801c548 <iprintf>
if (recv_flags & TF_CLOSED) {
8013f84: 4b16 ldr r3, [pc, #88] ; (8013fe0 <tcp_input_delayed_close+0x78>)
8013f86: 781b ldrb r3, [r3, #0]
8013f88: f003 0310 and.w r3, r3, #16
8013f8c: 2b00 cmp r3, #0
8013f8e: d01c beq.n 8013fca <tcp_input_delayed_close+0x62>
/* The connection has been closed and we will deallocate the
PCB. */
if (!(pcb->flags & TF_RXCLOSED)) {
8013f90: 687b ldr r3, [r7, #4]
8013f92: 8b5b ldrh r3, [r3, #26]
8013f94: f003 0310 and.w r3, r3, #16
8013f98: 2b00 cmp r3, #0
8013f9a: d10d bne.n 8013fb8 <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);
8013f9c: 687b ldr r3, [r7, #4]
8013f9e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8013fa2: 2b00 cmp r3, #0
8013fa4: d008 beq.n 8013fb8 <tcp_input_delayed_close+0x50>
8013fa6: 687b ldr r3, [r7, #4]
8013fa8: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90
8013fac: 687a ldr r2, [r7, #4]
8013fae: 6912 ldr r2, [r2, #16]
8013fb0: f06f 010e mvn.w r1, #14
8013fb4: 4610 mov r0, r2
8013fb6: 4798 blx r3
}
tcp_pcb_remove(&tcp_active_pcbs, pcb);
8013fb8: 6879 ldr r1, [r7, #4]
8013fba: 480a ldr r0, [pc, #40] ; (8013fe4 <tcp_input_delayed_close+0x7c>)
8013fbc: f7ff fa54 bl 8013468 <tcp_pcb_remove>
tcp_free(pcb);
8013fc0: 6878 ldr r0, [r7, #4]
8013fc2: f7fe f84d bl 8012060 <tcp_free>
return 1;
8013fc6: 2301 movs r3, #1
8013fc8: e000 b.n 8013fcc <tcp_input_delayed_close+0x64>
}
return 0;
8013fca: 2300 movs r3, #0
}
8013fcc: 4618 mov r0, r3
8013fce: 3708 adds r7, #8
8013fd0: 46bd mov sp, r7
8013fd2: bd80 pop {r7, pc}
8013fd4: 0801eb30 .word 0x0801eb30
8013fd8: 0801ed00 .word 0x0801ed00
8013fdc: 0801eb7c .word 0x0801eb7c
8013fe0: 20008745 .word 0x20008745
8013fe4: 2000f7e8 .word 0x2000f7e8
08013fe8 <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)
{
8013fe8: b590 push {r4, r7, lr}
8013fea: b08b sub sp, #44 ; 0x2c
8013fec: af04 add r7, sp, #16
8013fee: 6078 str r0, [r7, #4]
struct tcp_pcb *npcb;
u32_t iss;
err_t rc;
if (flags & TCP_RST) {
8013ff0: 4b6f ldr r3, [pc, #444] ; (80141b0 <tcp_listen_input+0x1c8>)
8013ff2: 781b ldrb r3, [r3, #0]
8013ff4: f003 0304 and.w r3, r3, #4
8013ff8: 2b00 cmp r3, #0
8013ffa: f040 80d3 bne.w 80141a4 <tcp_listen_input+0x1bc>
/* An incoming RST should be ignored. Return. */
return;
}
LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
8013ffe: 687b ldr r3, [r7, #4]
8014000: 2b00 cmp r3, #0
8014002: d106 bne.n 8014012 <tcp_listen_input+0x2a>
8014004: 4b6b ldr r3, [pc, #428] ; (80141b4 <tcp_listen_input+0x1cc>)
8014006: f240 2281 movw r2, #641 ; 0x281
801400a: 496b ldr r1, [pc, #428] ; (80141b8 <tcp_listen_input+0x1d0>)
801400c: 486b ldr r0, [pc, #428] ; (80141bc <tcp_listen_input+0x1d4>)
801400e: f008 fa9b bl 801c548 <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) {
8014012: 4b67 ldr r3, [pc, #412] ; (80141b0 <tcp_listen_input+0x1c8>)
8014014: 781b ldrb r3, [r3, #0]
8014016: f003 0310 and.w r3, r3, #16
801401a: 2b00 cmp r3, #0
801401c: d019 beq.n 8014052 <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(),
801401e: 4b68 ldr r3, [pc, #416] ; (80141c0 <tcp_listen_input+0x1d8>)
8014020: 6819 ldr r1, [r3, #0]
8014022: 4b68 ldr r3, [pc, #416] ; (80141c4 <tcp_listen_input+0x1dc>)
8014024: 881b ldrh r3, [r3, #0]
8014026: 461a mov r2, r3
8014028: 4b67 ldr r3, [pc, #412] ; (80141c8 <tcp_listen_input+0x1e0>)
801402a: 681b ldr r3, [r3, #0]
801402c: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
801402e: 4b67 ldr r3, [pc, #412] ; (80141cc <tcp_listen_input+0x1e4>)
8014030: 681b ldr r3, [r3, #0]
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014032: 885b ldrh r3, [r3, #2]
8014034: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014036: 4a65 ldr r2, [pc, #404] ; (80141cc <tcp_listen_input+0x1e4>)
8014038: 6812 ldr r2, [r2, #0]
tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
801403a: 8812 ldrh r2, [r2, #0]
801403c: b292 uxth r2, r2
801403e: 9202 str r2, [sp, #8]
8014040: 9301 str r3, [sp, #4]
8014042: 4b63 ldr r3, [pc, #396] ; (80141d0 <tcp_listen_input+0x1e8>)
8014044: 9300 str r3, [sp, #0]
8014046: 4b63 ldr r3, [pc, #396] ; (80141d4 <tcp_listen_input+0x1ec>)
8014048: 4602 mov r2, r0
801404a: 6878 ldr r0, [r7, #4]
801404c: f002 ff90 bl 8016f70 <tcp_rst>
tcp_abandon(npcb, 0);
return;
}
tcp_output(npcb);
}
return;
8014050: e0aa b.n 80141a8 <tcp_listen_input+0x1c0>
} else if (flags & TCP_SYN) {
8014052: 4b57 ldr r3, [pc, #348] ; (80141b0 <tcp_listen_input+0x1c8>)
8014054: 781b ldrb r3, [r3, #0]
8014056: f003 0302 and.w r3, r3, #2
801405a: 2b00 cmp r3, #0
801405c: f000 80a4 beq.w 80141a8 <tcp_listen_input+0x1c0>
npcb = tcp_alloc(pcb->prio);
8014060: 687b ldr r3, [r7, #4]
8014062: 7d5b ldrb r3, [r3, #21]
8014064: 4618 mov r0, r3
8014066: f7ff f92b bl 80132c0 <tcp_alloc>
801406a: 6178 str r0, [r7, #20]
if (npcb == NULL) {
801406c: 697b ldr r3, [r7, #20]
801406e: 2b00 cmp r3, #0
8014070: d111 bne.n 8014096 <tcp_listen_input+0xae>
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
8014072: 687b ldr r3, [r7, #4]
8014074: 699b ldr r3, [r3, #24]
8014076: 2b00 cmp r3, #0
8014078: d00a beq.n 8014090 <tcp_listen_input+0xa8>
801407a: 687b ldr r3, [r7, #4]
801407c: 699b ldr r3, [r3, #24]
801407e: 687a ldr r2, [r7, #4]
8014080: 6910 ldr r0, [r2, #16]
8014082: f04f 32ff mov.w r2, #4294967295
8014086: 2100 movs r1, #0
8014088: 4798 blx r3
801408a: 4603 mov r3, r0
801408c: 73bb strb r3, [r7, #14]
return;
801408e: e08c b.n 80141aa <tcp_listen_input+0x1c2>
TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
8014090: 23f0 movs r3, #240 ; 0xf0
8014092: 73bb strb r3, [r7, #14]
return;
8014094: e089 b.n 80141aa <tcp_listen_input+0x1c2>
ip_addr_copy(npcb->local_ip, *ip_current_dest_addr());
8014096: 4b50 ldr r3, [pc, #320] ; (80141d8 <tcp_listen_input+0x1f0>)
8014098: 695a ldr r2, [r3, #20]
801409a: 697b ldr r3, [r7, #20]
801409c: 601a str r2, [r3, #0]
ip_addr_copy(npcb->remote_ip, *ip_current_src_addr());
801409e: 4b4e ldr r3, [pc, #312] ; (80141d8 <tcp_listen_input+0x1f0>)
80140a0: 691a ldr r2, [r3, #16]
80140a2: 697b ldr r3, [r7, #20]
80140a4: 605a str r2, [r3, #4]
npcb->local_port = pcb->local_port;
80140a6: 687b ldr r3, [r7, #4]
80140a8: 8ada ldrh r2, [r3, #22]
80140aa: 697b ldr r3, [r7, #20]
80140ac: 82da strh r2, [r3, #22]
npcb->remote_port = tcphdr->src;
80140ae: 4b47 ldr r3, [pc, #284] ; (80141cc <tcp_listen_input+0x1e4>)
80140b0: 681b ldr r3, [r3, #0]
80140b2: 881b ldrh r3, [r3, #0]
80140b4: b29a uxth r2, r3
80140b6: 697b ldr r3, [r7, #20]
80140b8: 831a strh r2, [r3, #24]
npcb->state = SYN_RCVD;
80140ba: 697b ldr r3, [r7, #20]
80140bc: 2203 movs r2, #3
80140be: 751a strb r2, [r3, #20]
npcb->rcv_nxt = seqno + 1;
80140c0: 4b41 ldr r3, [pc, #260] ; (80141c8 <tcp_listen_input+0x1e0>)
80140c2: 681b ldr r3, [r3, #0]
80140c4: 1c5a adds r2, r3, #1
80140c6: 697b ldr r3, [r7, #20]
80140c8: 625a str r2, [r3, #36] ; 0x24
npcb->rcv_ann_right_edge = npcb->rcv_nxt;
80140ca: 697b ldr r3, [r7, #20]
80140cc: 6a5a ldr r2, [r3, #36] ; 0x24
80140ce: 697b ldr r3, [r7, #20]
80140d0: 62da str r2, [r3, #44] ; 0x2c
iss = tcp_next_iss(npcb);
80140d2: 6978 ldr r0, [r7, #20]
80140d4: f7ff fa5c bl 8013590 <tcp_next_iss>
80140d8: 6138 str r0, [r7, #16]
npcb->snd_wl2 = iss;
80140da: 697b ldr r3, [r7, #20]
80140dc: 693a ldr r2, [r7, #16]
80140de: 659a str r2, [r3, #88] ; 0x58
npcb->snd_nxt = iss;
80140e0: 697b ldr r3, [r7, #20]
80140e2: 693a ldr r2, [r7, #16]
80140e4: 651a str r2, [r3, #80] ; 0x50
npcb->lastack = iss;
80140e6: 697b ldr r3, [r7, #20]
80140e8: 693a ldr r2, [r7, #16]
80140ea: 645a str r2, [r3, #68] ; 0x44
npcb->snd_lbb = iss;
80140ec: 697b ldr r3, [r7, #20]
80140ee: 693a ldr r2, [r7, #16]
80140f0: 65da str r2, [r3, #92] ; 0x5c
npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */
80140f2: 4b35 ldr r3, [pc, #212] ; (80141c8 <tcp_listen_input+0x1e0>)
80140f4: 681b ldr r3, [r3, #0]
80140f6: 1e5a subs r2, r3, #1
80140f8: 697b ldr r3, [r7, #20]
80140fa: 655a str r2, [r3, #84] ; 0x54
npcb->callback_arg = pcb->callback_arg;
80140fc: 687b ldr r3, [r7, #4]
80140fe: 691a ldr r2, [r3, #16]
8014100: 697b ldr r3, [r7, #20]
8014102: 611a str r2, [r3, #16]
npcb->listener = pcb;
8014104: 697b ldr r3, [r7, #20]
8014106: 687a ldr r2, [r7, #4]
8014108: 67da str r2, [r3, #124] ; 0x7c
npcb->so_options = pcb->so_options & SOF_INHERITED;
801410a: 687b ldr r3, [r7, #4]
801410c: 7a5b ldrb r3, [r3, #9]
801410e: f003 030c and.w r3, r3, #12
8014112: b2da uxtb r2, r3
8014114: 697b ldr r3, [r7, #20]
8014116: 725a strb r2, [r3, #9]
npcb->netif_idx = pcb->netif_idx;
8014118: 687b ldr r3, [r7, #4]
801411a: 7a1a ldrb r2, [r3, #8]
801411c: 697b ldr r3, [r7, #20]
801411e: 721a strb r2, [r3, #8]
TCP_REG_ACTIVE(npcb);
8014120: 4b2e ldr r3, [pc, #184] ; (80141dc <tcp_listen_input+0x1f4>)
8014122: 681a ldr r2, [r3, #0]
8014124: 697b ldr r3, [r7, #20]
8014126: 60da str r2, [r3, #12]
8014128: 4a2c ldr r2, [pc, #176] ; (80141dc <tcp_listen_input+0x1f4>)
801412a: 697b ldr r3, [r7, #20]
801412c: 6013 str r3, [r2, #0]
801412e: f003 f8e1 bl 80172f4 <tcp_timer_needed>
8014132: 4b2b ldr r3, [pc, #172] ; (80141e0 <tcp_listen_input+0x1f8>)
8014134: 2201 movs r2, #1
8014136: 701a strb r2, [r3, #0]
tcp_parseopt(npcb);
8014138: 6978 ldr r0, [r7, #20]
801413a: f001 fd8f bl 8015c5c <tcp_parseopt>
npcb->snd_wnd = tcphdr->wnd;
801413e: 4b23 ldr r3, [pc, #140] ; (80141cc <tcp_listen_input+0x1e4>)
8014140: 681b ldr r3, [r3, #0]
8014142: 89db ldrh r3, [r3, #14]
8014144: b29a uxth r2, r3
8014146: 697b ldr r3, [r7, #20]
8014148: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
npcb->snd_wnd_max = npcb->snd_wnd;
801414c: 697b ldr r3, [r7, #20]
801414e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8014152: 697b ldr r3, [r7, #20]
8014154: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip);
8014158: 697b ldr r3, [r7, #20]
801415a: 8e5c ldrh r4, [r3, #50] ; 0x32
801415c: 697b ldr r3, [r7, #20]
801415e: 3304 adds r3, #4
8014160: 4618 mov r0, r3
8014162: f006 fe7d bl 801ae60 <ip4_route>
8014166: 4601 mov r1, r0
8014168: 697b ldr r3, [r7, #20]
801416a: 3304 adds r3, #4
801416c: 461a mov r2, r3
801416e: 4620 mov r0, r4
8014170: f7ff fa34 bl 80135dc <tcp_eff_send_mss_netif>
8014174: 4603 mov r3, r0
8014176: 461a mov r2, r3
8014178: 697b ldr r3, [r7, #20]
801417a: 865a strh r2, [r3, #50] ; 0x32
rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK);
801417c: 2112 movs r1, #18
801417e: 6978 ldr r0, [r7, #20]
8014180: f002 f842 bl 8016208 <tcp_enqueue_flags>
8014184: 4603 mov r3, r0
8014186: 73fb strb r3, [r7, #15]
if (rc != ERR_OK) {
8014188: f997 300f ldrsb.w r3, [r7, #15]
801418c: 2b00 cmp r3, #0
801418e: d004 beq.n 801419a <tcp_listen_input+0x1b2>
tcp_abandon(npcb, 0);
8014190: 2100 movs r1, #0
8014192: 6978 ldr r0, [r7, #20]
8014194: f7fe f986 bl 80124a4 <tcp_abandon>
return;
8014198: e007 b.n 80141aa <tcp_listen_input+0x1c2>
tcp_output(npcb);
801419a: 6978 ldr r0, [r7, #20]
801419c: f002 f922 bl 80163e4 <tcp_output>
return;
80141a0: bf00 nop
80141a2: e001 b.n 80141a8 <tcp_listen_input+0x1c0>
return;
80141a4: bf00 nop
80141a6: e000 b.n 80141aa <tcp_listen_input+0x1c2>
return;
80141a8: bf00 nop
}
80141aa: 371c adds r7, #28
80141ac: 46bd mov sp, r7
80141ae: bd90 pop {r4, r7, pc}
80141b0: 20008744 .word 0x20008744
80141b4: 0801eb30 .word 0x0801eb30
80141b8: 0801ed28 .word 0x0801ed28
80141bc: 0801eb7c .word 0x0801eb7c
80141c0: 2000873c .word 0x2000873c
80141c4: 20008742 .word 0x20008742
80141c8: 20008738 .word 0x20008738
80141cc: 20008728 .word 0x20008728
80141d0: 2000c0c4 .word 0x2000c0c4
80141d4: 2000c0c8 .word 0x2000c0c8
80141d8: 2000c0b4 .word 0x2000c0b4
80141dc: 2000f7e8 .word 0x2000f7e8
80141e0: 2000f7e4 .word 0x2000f7e4
080141e4 <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)
{
80141e4: b580 push {r7, lr}
80141e6: b086 sub sp, #24
80141e8: af04 add r7, sp, #16
80141ea: 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) {
80141ec: 4b30 ldr r3, [pc, #192] ; (80142b0 <tcp_timewait_input+0xcc>)
80141ee: 781b ldrb r3, [r3, #0]
80141f0: f003 0304 and.w r3, r3, #4
80141f4: 2b00 cmp r3, #0
80141f6: d154 bne.n 80142a2 <tcp_timewait_input+0xbe>
return;
}
LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
80141f8: 687b ldr r3, [r7, #4]
80141fa: 2b00 cmp r3, #0
80141fc: d106 bne.n 801420c <tcp_timewait_input+0x28>
80141fe: 4b2d ldr r3, [pc, #180] ; (80142b4 <tcp_timewait_input+0xd0>)
8014200: f240 22ee movw r2, #750 ; 0x2ee
8014204: 492c ldr r1, [pc, #176] ; (80142b8 <tcp_timewait_input+0xd4>)
8014206: 482d ldr r0, [pc, #180] ; (80142bc <tcp_timewait_input+0xd8>)
8014208: f008 f99e bl 801c548 <iprintf>
/* - fourth, check the SYN bit, */
if (flags & TCP_SYN) {
801420c: 4b28 ldr r3, [pc, #160] ; (80142b0 <tcp_timewait_input+0xcc>)
801420e: 781b ldrb r3, [r3, #0]
8014210: f003 0302 and.w r3, r3, #2
8014214: 2b00 cmp r3, #0
8014216: d02a beq.n 801426e <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)) {
8014218: 4b29 ldr r3, [pc, #164] ; (80142c0 <tcp_timewait_input+0xdc>)
801421a: 681a ldr r2, [r3, #0]
801421c: 687b ldr r3, [r7, #4]
801421e: 6a5b ldr r3, [r3, #36] ; 0x24
8014220: 1ad3 subs r3, r2, r3
8014222: 2b00 cmp r3, #0
8014224: db2d blt.n 8014282 <tcp_timewait_input+0x9e>
8014226: 4b26 ldr r3, [pc, #152] ; (80142c0 <tcp_timewait_input+0xdc>)
8014228: 681a ldr r2, [r3, #0]
801422a: 687b ldr r3, [r7, #4]
801422c: 6a5b ldr r3, [r3, #36] ; 0x24
801422e: 6879 ldr r1, [r7, #4]
8014230: 8d09 ldrh r1, [r1, #40] ; 0x28
8014232: 440b add r3, r1
8014234: 1ad3 subs r3, r2, r3
8014236: 2b00 cmp r3, #0
8014238: dc23 bgt.n 8014282 <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(),
801423a: 4b22 ldr r3, [pc, #136] ; (80142c4 <tcp_timewait_input+0xe0>)
801423c: 6819 ldr r1, [r3, #0]
801423e: 4b22 ldr r3, [pc, #136] ; (80142c8 <tcp_timewait_input+0xe4>)
8014240: 881b ldrh r3, [r3, #0]
8014242: 461a mov r2, r3
8014244: 4b1e ldr r3, [pc, #120] ; (80142c0 <tcp_timewait_input+0xdc>)
8014246: 681b ldr r3, [r3, #0]
8014248: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
801424a: 4b20 ldr r3, [pc, #128] ; (80142cc <tcp_timewait_input+0xe8>)
801424c: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
801424e: 885b ldrh r3, [r3, #2]
8014250: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014252: 4a1e ldr r2, [pc, #120] ; (80142cc <tcp_timewait_input+0xe8>)
8014254: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014256: 8812 ldrh r2, [r2, #0]
8014258: b292 uxth r2, r2
801425a: 9202 str r2, [sp, #8]
801425c: 9301 str r3, [sp, #4]
801425e: 4b1c ldr r3, [pc, #112] ; (80142d0 <tcp_timewait_input+0xec>)
8014260: 9300 str r3, [sp, #0]
8014262: 4b1c ldr r3, [pc, #112] ; (80142d4 <tcp_timewait_input+0xf0>)
8014264: 4602 mov r2, r0
8014266: 6878 ldr r0, [r7, #4]
8014268: f002 fe82 bl 8016f70 <tcp_rst>
return;
801426c: e01c b.n 80142a8 <tcp_timewait_input+0xc4>
}
} else if (flags & TCP_FIN) {
801426e: 4b10 ldr r3, [pc, #64] ; (80142b0 <tcp_timewait_input+0xcc>)
8014270: 781b ldrb r3, [r3, #0]
8014272: f003 0301 and.w r3, r3, #1
8014276: 2b00 cmp r3, #0
8014278: d003 beq.n 8014282 <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;
801427a: 4b17 ldr r3, [pc, #92] ; (80142d8 <tcp_timewait_input+0xf4>)
801427c: 681a ldr r2, [r3, #0]
801427e: 687b ldr r3, [r7, #4]
8014280: 621a str r2, [r3, #32]
}
if ((tcplen > 0)) {
8014282: 4b11 ldr r3, [pc, #68] ; (80142c8 <tcp_timewait_input+0xe4>)
8014284: 881b ldrh r3, [r3, #0]
8014286: 2b00 cmp r3, #0
8014288: d00d beq.n 80142a6 <tcp_timewait_input+0xc2>
/* Acknowledge data, FIN or out-of-window SYN */
tcp_ack_now(pcb);
801428a: 687b ldr r3, [r7, #4]
801428c: 8b5b ldrh r3, [r3, #26]
801428e: f043 0302 orr.w r3, r3, #2
8014292: b29a uxth r2, r3
8014294: 687b ldr r3, [r7, #4]
8014296: 835a strh r2, [r3, #26]
tcp_output(pcb);
8014298: 6878 ldr r0, [r7, #4]
801429a: f002 f8a3 bl 80163e4 <tcp_output>
}
return;
801429e: bf00 nop
80142a0: e001 b.n 80142a6 <tcp_timewait_input+0xc2>
return;
80142a2: bf00 nop
80142a4: e000 b.n 80142a8 <tcp_timewait_input+0xc4>
return;
80142a6: bf00 nop
}
80142a8: 3708 adds r7, #8
80142aa: 46bd mov sp, r7
80142ac: bd80 pop {r7, pc}
80142ae: bf00 nop
80142b0: 20008744 .word 0x20008744
80142b4: 0801eb30 .word 0x0801eb30
80142b8: 0801ed48 .word 0x0801ed48
80142bc: 0801eb7c .word 0x0801eb7c
80142c0: 20008738 .word 0x20008738
80142c4: 2000873c .word 0x2000873c
80142c8: 20008742 .word 0x20008742
80142cc: 20008728 .word 0x20008728
80142d0: 2000c0c4 .word 0x2000c0c4
80142d4: 2000c0c8 .word 0x2000c0c8
80142d8: 2000f7ec .word 0x2000f7ec
080142dc <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)
{
80142dc: b590 push {r4, r7, lr}
80142de: b08d sub sp, #52 ; 0x34
80142e0: af04 add r7, sp, #16
80142e2: 6078 str r0, [r7, #4]
struct tcp_seg *rseg;
u8_t acceptable = 0;
80142e4: 2300 movs r3, #0
80142e6: 76fb strb r3, [r7, #27]
err_t err;
err = ERR_OK;
80142e8: 2300 movs r3, #0
80142ea: 76bb strb r3, [r7, #26]
LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
80142ec: 687b ldr r3, [r7, #4]
80142ee: 2b00 cmp r3, #0
80142f0: d106 bne.n 8014300 <tcp_process+0x24>
80142f2: 4ba5 ldr r3, [pc, #660] ; (8014588 <tcp_process+0x2ac>)
80142f4: f44f 7247 mov.w r2, #796 ; 0x31c
80142f8: 49a4 ldr r1, [pc, #656] ; (801458c <tcp_process+0x2b0>)
80142fa: 48a5 ldr r0, [pc, #660] ; (8014590 <tcp_process+0x2b4>)
80142fc: f008 f924 bl 801c548 <iprintf>
/* Process incoming RST segments. */
if (flags & TCP_RST) {
8014300: 4ba4 ldr r3, [pc, #656] ; (8014594 <tcp_process+0x2b8>)
8014302: 781b ldrb r3, [r3, #0]
8014304: f003 0304 and.w r3, r3, #4
8014308: 2b00 cmp r3, #0
801430a: d04e beq.n 80143aa <tcp_process+0xce>
/* First, determine if the reset is acceptable. */
if (pcb->state == SYN_SENT) {
801430c: 687b ldr r3, [r7, #4]
801430e: 7d1b ldrb r3, [r3, #20]
8014310: 2b02 cmp r3, #2
8014312: d108 bne.n 8014326 <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) {
8014314: 687b ldr r3, [r7, #4]
8014316: 6d1a ldr r2, [r3, #80] ; 0x50
8014318: 4b9f ldr r3, [pc, #636] ; (8014598 <tcp_process+0x2bc>)
801431a: 681b ldr r3, [r3, #0]
801431c: 429a cmp r2, r3
801431e: d123 bne.n 8014368 <tcp_process+0x8c>
acceptable = 1;
8014320: 2301 movs r3, #1
8014322: 76fb strb r3, [r7, #27]
8014324: e020 b.n 8014368 <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) {
8014326: 687b ldr r3, [r7, #4]
8014328: 6a5a ldr r2, [r3, #36] ; 0x24
801432a: 4b9c ldr r3, [pc, #624] ; (801459c <tcp_process+0x2c0>)
801432c: 681b ldr r3, [r3, #0]
801432e: 429a cmp r2, r3
8014330: d102 bne.n 8014338 <tcp_process+0x5c>
acceptable = 1;
8014332: 2301 movs r3, #1
8014334: 76fb strb r3, [r7, #27]
8014336: e017 b.n 8014368 <tcp_process+0x8c>
} else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8014338: 4b98 ldr r3, [pc, #608] ; (801459c <tcp_process+0x2c0>)
801433a: 681a ldr r2, [r3, #0]
801433c: 687b ldr r3, [r7, #4]
801433e: 6a5b ldr r3, [r3, #36] ; 0x24
8014340: 1ad3 subs r3, r2, r3
8014342: 2b00 cmp r3, #0
8014344: db10 blt.n 8014368 <tcp_process+0x8c>
8014346: 4b95 ldr r3, [pc, #596] ; (801459c <tcp_process+0x2c0>)
8014348: 681a ldr r2, [r3, #0]
801434a: 687b ldr r3, [r7, #4]
801434c: 6a5b ldr r3, [r3, #36] ; 0x24
801434e: 6879 ldr r1, [r7, #4]
8014350: 8d09 ldrh r1, [r1, #40] ; 0x28
8014352: 440b add r3, r1
8014354: 1ad3 subs r3, r2, r3
8014356: 2b00 cmp r3, #0
8014358: dc06 bgt.n 8014368 <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);
801435a: 687b ldr r3, [r7, #4]
801435c: 8b5b ldrh r3, [r3, #26]
801435e: f043 0302 orr.w r3, r3, #2
8014362: b29a uxth r2, r3
8014364: 687b ldr r3, [r7, #4]
8014366: 835a strh r2, [r3, #26]
}
}
if (acceptable) {
8014368: 7efb ldrb r3, [r7, #27]
801436a: 2b00 cmp r3, #0
801436c: d01b beq.n 80143a6 <tcp_process+0xca>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n"));
LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
801436e: 687b ldr r3, [r7, #4]
8014370: 7d1b ldrb r3, [r3, #20]
8014372: 2b00 cmp r3, #0
8014374: d106 bne.n 8014384 <tcp_process+0xa8>
8014376: 4b84 ldr r3, [pc, #528] ; (8014588 <tcp_process+0x2ac>)
8014378: f44f 724e mov.w r2, #824 ; 0x338
801437c: 4988 ldr r1, [pc, #544] ; (80145a0 <tcp_process+0x2c4>)
801437e: 4884 ldr r0, [pc, #528] ; (8014590 <tcp_process+0x2b4>)
8014380: f008 f8e2 bl 801c548 <iprintf>
recv_flags |= TF_RESET;
8014384: 4b87 ldr r3, [pc, #540] ; (80145a4 <tcp_process+0x2c8>)
8014386: 781b ldrb r3, [r3, #0]
8014388: f043 0308 orr.w r3, r3, #8
801438c: b2da uxtb r2, r3
801438e: 4b85 ldr r3, [pc, #532] ; (80145a4 <tcp_process+0x2c8>)
8014390: 701a strb r2, [r3, #0]
tcp_clear_flags(pcb, TF_ACK_DELAY);
8014392: 687b ldr r3, [r7, #4]
8014394: 8b5b ldrh r3, [r3, #26]
8014396: f023 0301 bic.w r3, r3, #1
801439a: b29a uxth r2, r3
801439c: 687b ldr r3, [r7, #4]
801439e: 835a strh r2, [r3, #26]
return ERR_RST;
80143a0: f06f 030d mvn.w r3, #13
80143a4: e37a b.n 8014a9c <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;
80143a6: 2300 movs r3, #0
80143a8: e378 b.n 8014a9c <tcp_process+0x7c0>
}
}
if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) {
80143aa: 4b7a ldr r3, [pc, #488] ; (8014594 <tcp_process+0x2b8>)
80143ac: 781b ldrb r3, [r3, #0]
80143ae: f003 0302 and.w r3, r3, #2
80143b2: 2b00 cmp r3, #0
80143b4: d010 beq.n 80143d8 <tcp_process+0xfc>
80143b6: 687b ldr r3, [r7, #4]
80143b8: 7d1b ldrb r3, [r3, #20]
80143ba: 2b02 cmp r3, #2
80143bc: d00c beq.n 80143d8 <tcp_process+0xfc>
80143be: 687b ldr r3, [r7, #4]
80143c0: 7d1b ldrb r3, [r3, #20]
80143c2: 2b03 cmp r3, #3
80143c4: d008 beq.n 80143d8 <tcp_process+0xfc>
/* Cope with new connection attempt after remote end crashed */
tcp_ack_now(pcb);
80143c6: 687b ldr r3, [r7, #4]
80143c8: 8b5b ldrh r3, [r3, #26]
80143ca: f043 0302 orr.w r3, r3, #2
80143ce: b29a uxth r2, r3
80143d0: 687b ldr r3, [r7, #4]
80143d2: 835a strh r2, [r3, #26]
return ERR_OK;
80143d4: 2300 movs r3, #0
80143d6: e361 b.n 8014a9c <tcp_process+0x7c0>
}
if ((pcb->flags & TF_RXCLOSED) == 0) {
80143d8: 687b ldr r3, [r7, #4]
80143da: 8b5b ldrh r3, [r3, #26]
80143dc: f003 0310 and.w r3, r3, #16
80143e0: 2b00 cmp r3, #0
80143e2: d103 bne.n 80143ec <tcp_process+0x110>
/* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */
pcb->tmr = tcp_ticks;
80143e4: 4b70 ldr r3, [pc, #448] ; (80145a8 <tcp_process+0x2cc>)
80143e6: 681a ldr r2, [r3, #0]
80143e8: 687b ldr r3, [r7, #4]
80143ea: 621a str r2, [r3, #32]
}
pcb->keep_cnt_sent = 0;
80143ec: 687b ldr r3, [r7, #4]
80143ee: 2200 movs r2, #0
80143f0: f883 209b strb.w r2, [r3, #155] ; 0x9b
pcb->persist_probe = 0;
80143f4: 687b ldr r3, [r7, #4]
80143f6: 2200 movs r2, #0
80143f8: f883 209a strb.w r2, [r3, #154] ; 0x9a
tcp_parseopt(pcb);
80143fc: 6878 ldr r0, [r7, #4]
80143fe: f001 fc2d bl 8015c5c <tcp_parseopt>
/* Do different things depending on the TCP state. */
switch (pcb->state) {
8014402: 687b ldr r3, [r7, #4]
8014404: 7d1b ldrb r3, [r3, #20]
8014406: 3b02 subs r3, #2
8014408: 2b07 cmp r3, #7
801440a: f200 8337 bhi.w 8014a7c <tcp_process+0x7a0>
801440e: a201 add r2, pc, #4 ; (adr r2, 8014414 <tcp_process+0x138>)
8014410: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8014414: 08014435 .word 0x08014435
8014418: 08014665 .word 0x08014665
801441c: 080147dd .word 0x080147dd
8014420: 08014807 .word 0x08014807
8014424: 0801492b .word 0x0801492b
8014428: 080147dd .word 0x080147dd
801442c: 080149b7 .word 0x080149b7
8014430: 08014a47 .word 0x08014a47
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)
8014434: 4b57 ldr r3, [pc, #348] ; (8014594 <tcp_process+0x2b8>)
8014436: 781b ldrb r3, [r3, #0]
8014438: f003 0310 and.w r3, r3, #16
801443c: 2b00 cmp r3, #0
801443e: f000 80e4 beq.w 801460a <tcp_process+0x32e>
8014442: 4b54 ldr r3, [pc, #336] ; (8014594 <tcp_process+0x2b8>)
8014444: 781b ldrb r3, [r3, #0]
8014446: f003 0302 and.w r3, r3, #2
801444a: 2b00 cmp r3, #0
801444c: f000 80dd beq.w 801460a <tcp_process+0x32e>
&& (ackno == pcb->lastack + 1)) {
8014450: 687b ldr r3, [r7, #4]
8014452: 6c5b ldr r3, [r3, #68] ; 0x44
8014454: 1c5a adds r2, r3, #1
8014456: 4b50 ldr r3, [pc, #320] ; (8014598 <tcp_process+0x2bc>)
8014458: 681b ldr r3, [r3, #0]
801445a: 429a cmp r2, r3
801445c: f040 80d5 bne.w 801460a <tcp_process+0x32e>
pcb->rcv_nxt = seqno + 1;
8014460: 4b4e ldr r3, [pc, #312] ; (801459c <tcp_process+0x2c0>)
8014462: 681b ldr r3, [r3, #0]
8014464: 1c5a adds r2, r3, #1
8014466: 687b ldr r3, [r7, #4]
8014468: 625a str r2, [r3, #36] ; 0x24
pcb->rcv_ann_right_edge = pcb->rcv_nxt;
801446a: 687b ldr r3, [r7, #4]
801446c: 6a5a ldr r2, [r3, #36] ; 0x24
801446e: 687b ldr r3, [r7, #4]
8014470: 62da str r2, [r3, #44] ; 0x2c
pcb->lastack = ackno;
8014472: 4b49 ldr r3, [pc, #292] ; (8014598 <tcp_process+0x2bc>)
8014474: 681a ldr r2, [r3, #0]
8014476: 687b ldr r3, [r7, #4]
8014478: 645a str r2, [r3, #68] ; 0x44
pcb->snd_wnd = tcphdr->wnd;
801447a: 4b4c ldr r3, [pc, #304] ; (80145ac <tcp_process+0x2d0>)
801447c: 681b ldr r3, [r3, #0]
801447e: 89db ldrh r3, [r3, #14]
8014480: b29a uxth r2, r3
8014482: 687b ldr r3, [r7, #4]
8014484: f8a3 2060 strh.w r2, [r3, #96] ; 0x60
pcb->snd_wnd_max = pcb->snd_wnd;
8014488: 687b ldr r3, [r7, #4]
801448a: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
801448e: 687b ldr r3, [r7, #4]
8014490: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
8014494: 4b41 ldr r3, [pc, #260] ; (801459c <tcp_process+0x2c0>)
8014496: 681b ldr r3, [r3, #0]
8014498: 1e5a subs r2, r3, #1
801449a: 687b ldr r3, [r7, #4]
801449c: 655a str r2, [r3, #84] ; 0x54
pcb->state = ESTABLISHED;
801449e: 687b ldr r3, [r7, #4]
80144a0: 2204 movs r2, #4
80144a2: 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);
80144a4: 687b ldr r3, [r7, #4]
80144a6: 8e5c ldrh r4, [r3, #50] ; 0x32
80144a8: 687b ldr r3, [r7, #4]
80144aa: 3304 adds r3, #4
80144ac: 4618 mov r0, r3
80144ae: f006 fcd7 bl 801ae60 <ip4_route>
80144b2: 4601 mov r1, r0
80144b4: 687b ldr r3, [r7, #4]
80144b6: 3304 adds r3, #4
80144b8: 461a mov r2, r3
80144ba: 4620 mov r0, r4
80144bc: f7ff f88e bl 80135dc <tcp_eff_send_mss_netif>
80144c0: 4603 mov r3, r0
80144c2: 461a mov r2, r3
80144c4: 687b ldr r3, [r7, #4]
80144c6: 865a strh r2, [r3, #50] ; 0x32
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
80144c8: 687b ldr r3, [r7, #4]
80144ca: 8e5b ldrh r3, [r3, #50] ; 0x32
80144cc: 009a lsls r2, r3, #2
80144ce: 687b ldr r3, [r7, #4]
80144d0: 8e5b ldrh r3, [r3, #50] ; 0x32
80144d2: 005b lsls r3, r3, #1
80144d4: f241 111c movw r1, #4380 ; 0x111c
80144d8: 428b cmp r3, r1
80144da: bf38 it cc
80144dc: 460b movcc r3, r1
80144de: 429a cmp r2, r3
80144e0: d204 bcs.n 80144ec <tcp_process+0x210>
80144e2: 687b ldr r3, [r7, #4]
80144e4: 8e5b ldrh r3, [r3, #50] ; 0x32
80144e6: 009b lsls r3, r3, #2
80144e8: b29b uxth r3, r3
80144ea: e00d b.n 8014508 <tcp_process+0x22c>
80144ec: 687b ldr r3, [r7, #4]
80144ee: 8e5b ldrh r3, [r3, #50] ; 0x32
80144f0: 005b lsls r3, r3, #1
80144f2: f241 121c movw r2, #4380 ; 0x111c
80144f6: 4293 cmp r3, r2
80144f8: d904 bls.n 8014504 <tcp_process+0x228>
80144fa: 687b ldr r3, [r7, #4]
80144fc: 8e5b ldrh r3, [r3, #50] ; 0x32
80144fe: 005b lsls r3, r3, #1
8014500: b29b uxth r3, r3
8014502: e001 b.n 8014508 <tcp_process+0x22c>
8014504: f241 131c movw r3, #4380 ; 0x111c
8014508: 687a ldr r2, [r7, #4]
801450a: 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));
801450e: 687b ldr r3, [r7, #4]
8014510: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8014514: 2b00 cmp r3, #0
8014516: d106 bne.n 8014526 <tcp_process+0x24a>
8014518: 4b1b ldr r3, [pc, #108] ; (8014588 <tcp_process+0x2ac>)
801451a: f44f 725b mov.w r2, #876 ; 0x36c
801451e: 4924 ldr r1, [pc, #144] ; (80145b0 <tcp_process+0x2d4>)
8014520: 481b ldr r0, [pc, #108] ; (8014590 <tcp_process+0x2b4>)
8014522: f008 f811 bl 801c548 <iprintf>
--pcb->snd_queuelen;
8014526: 687b ldr r3, [r7, #4]
8014528: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
801452c: 3b01 subs r3, #1
801452e: b29a uxth r2, r3
8014530: 687b ldr r3, [r7, #4]
8014532: 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;
8014536: 687b ldr r3, [r7, #4]
8014538: 6f1b ldr r3, [r3, #112] ; 0x70
801453a: 61fb str r3, [r7, #28]
if (rseg == NULL) {
801453c: 69fb ldr r3, [r7, #28]
801453e: 2b00 cmp r3, #0
8014540: d111 bne.n 8014566 <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;
8014542: 687b ldr r3, [r7, #4]
8014544: 6edb ldr r3, [r3, #108] ; 0x6c
8014546: 61fb str r3, [r7, #28]
LWIP_ASSERT("no segment to free", rseg != NULL);
8014548: 69fb ldr r3, [r7, #28]
801454a: 2b00 cmp r3, #0
801454c: d106 bne.n 801455c <tcp_process+0x280>
801454e: 4b0e ldr r3, [pc, #56] ; (8014588 <tcp_process+0x2ac>)
8014550: f44f 725d mov.w r2, #884 ; 0x374
8014554: 4917 ldr r1, [pc, #92] ; (80145b4 <tcp_process+0x2d8>)
8014556: 480e ldr r0, [pc, #56] ; (8014590 <tcp_process+0x2b4>)
8014558: f007 fff6 bl 801c548 <iprintf>
pcb->unsent = rseg->next;
801455c: 69fb ldr r3, [r7, #28]
801455e: 681a ldr r2, [r3, #0]
8014560: 687b ldr r3, [r7, #4]
8014562: 66da str r2, [r3, #108] ; 0x6c
8014564: e003 b.n 801456e <tcp_process+0x292>
} else {
pcb->unacked = rseg->next;
8014566: 69fb ldr r3, [r7, #28]
8014568: 681a ldr r2, [r3, #0]
801456a: 687b ldr r3, [r7, #4]
801456c: 671a str r2, [r3, #112] ; 0x70
}
tcp_seg_free(rseg);
801456e: 69f8 ldr r0, [r7, #28]
8014570: f7fe fd3e bl 8012ff0 <tcp_seg_free>
/* If there's nothing left to acknowledge, stop the retransmit
timer, otherwise reset it to start again */
if (pcb->unacked == NULL) {
8014574: 687b ldr r3, [r7, #4]
8014576: 6f1b ldr r3, [r3, #112] ; 0x70
8014578: 2b00 cmp r3, #0
801457a: d11d bne.n 80145b8 <tcp_process+0x2dc>
pcb->rtime = -1;
801457c: 687b ldr r3, [r7, #4]
801457e: f64f 72ff movw r2, #65535 ; 0xffff
8014582: 861a strh r2, [r3, #48] ; 0x30
8014584: e01f b.n 80145c6 <tcp_process+0x2ea>
8014586: bf00 nop
8014588: 0801eb30 .word 0x0801eb30
801458c: 0801ed68 .word 0x0801ed68
8014590: 0801eb7c .word 0x0801eb7c
8014594: 20008744 .word 0x20008744
8014598: 2000873c .word 0x2000873c
801459c: 20008738 .word 0x20008738
80145a0: 0801ed84 .word 0x0801ed84
80145a4: 20008745 .word 0x20008745
80145a8: 2000f7ec .word 0x2000f7ec
80145ac: 20008728 .word 0x20008728
80145b0: 0801eda4 .word 0x0801eda4
80145b4: 0801edbc .word 0x0801edbc
} else {
pcb->rtime = 0;
80145b8: 687b ldr r3, [r7, #4]
80145ba: 2200 movs r2, #0
80145bc: 861a strh r2, [r3, #48] ; 0x30
pcb->nrtx = 0;
80145be: 687b ldr r3, [r7, #4]
80145c0: 2200 movs r2, #0
80145c2: 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);
80145c6: 687b ldr r3, [r7, #4]
80145c8: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
80145cc: 2b00 cmp r3, #0
80145ce: d00a beq.n 80145e6 <tcp_process+0x30a>
80145d0: 687b ldr r3, [r7, #4]
80145d2: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
80145d6: 687a ldr r2, [r7, #4]
80145d8: 6910 ldr r0, [r2, #16]
80145da: 2200 movs r2, #0
80145dc: 6879 ldr r1, [r7, #4]
80145de: 4798 blx r3
80145e0: 4603 mov r3, r0
80145e2: 76bb strb r3, [r7, #26]
80145e4: e001 b.n 80145ea <tcp_process+0x30e>
80145e6: 2300 movs r3, #0
80145e8: 76bb strb r3, [r7, #26]
if (err == ERR_ABRT) {
80145ea: f997 301a ldrsb.w r3, [r7, #26]
80145ee: f113 0f0d cmn.w r3, #13
80145f2: d102 bne.n 80145fa <tcp_process+0x31e>
return ERR_ABRT;
80145f4: f06f 030c mvn.w r3, #12
80145f8: e250 b.n 8014a9c <tcp_process+0x7c0>
}
tcp_ack_now(pcb);
80145fa: 687b ldr r3, [r7, #4]
80145fc: 8b5b ldrh r3, [r3, #26]
80145fe: f043 0302 orr.w r3, r3, #2
8014602: b29a uxth r2, r3
8014604: 687b ldr r3, [r7, #4]
8014606: 835a strh r2, [r3, #26]
if (pcb->nrtx < TCP_SYNMAXRTX) {
pcb->rtime = 0;
tcp_rexmit_rto(pcb);
}
}
break;
8014608: e23a b.n 8014a80 <tcp_process+0x7a4>
else if (flags & TCP_ACK) {
801460a: 4b9d ldr r3, [pc, #628] ; (8014880 <tcp_process+0x5a4>)
801460c: 781b ldrb r3, [r3, #0]
801460e: f003 0310 and.w r3, r3, #16
8014612: 2b00 cmp r3, #0
8014614: f000 8234 beq.w 8014a80 <tcp_process+0x7a4>
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014618: 4b9a ldr r3, [pc, #616] ; (8014884 <tcp_process+0x5a8>)
801461a: 6819 ldr r1, [r3, #0]
801461c: 4b9a ldr r3, [pc, #616] ; (8014888 <tcp_process+0x5ac>)
801461e: 881b ldrh r3, [r3, #0]
8014620: 461a mov r2, r3
8014622: 4b9a ldr r3, [pc, #616] ; (801488c <tcp_process+0x5b0>)
8014624: 681b ldr r3, [r3, #0]
8014626: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014628: 4b99 ldr r3, [pc, #612] ; (8014890 <tcp_process+0x5b4>)
801462a: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
801462c: 885b ldrh r3, [r3, #2]
801462e: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014630: 4a97 ldr r2, [pc, #604] ; (8014890 <tcp_process+0x5b4>)
8014632: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014634: 8812 ldrh r2, [r2, #0]
8014636: b292 uxth r2, r2
8014638: 9202 str r2, [sp, #8]
801463a: 9301 str r3, [sp, #4]
801463c: 4b95 ldr r3, [pc, #596] ; (8014894 <tcp_process+0x5b8>)
801463e: 9300 str r3, [sp, #0]
8014640: 4b95 ldr r3, [pc, #596] ; (8014898 <tcp_process+0x5bc>)
8014642: 4602 mov r2, r0
8014644: 6878 ldr r0, [r7, #4]
8014646: f002 fc93 bl 8016f70 <tcp_rst>
if (pcb->nrtx < TCP_SYNMAXRTX) {
801464a: 687b ldr r3, [r7, #4]
801464c: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8014650: 2b05 cmp r3, #5
8014652: f200 8215 bhi.w 8014a80 <tcp_process+0x7a4>
pcb->rtime = 0;
8014656: 687b ldr r3, [r7, #4]
8014658: 2200 movs r2, #0
801465a: 861a strh r2, [r3, #48] ; 0x30
tcp_rexmit_rto(pcb);
801465c: 6878 ldr r0, [r7, #4]
801465e: f002 fa51 bl 8016b04 <tcp_rexmit_rto>
break;
8014662: e20d b.n 8014a80 <tcp_process+0x7a4>
case SYN_RCVD:
if (flags & TCP_ACK) {
8014664: 4b86 ldr r3, [pc, #536] ; (8014880 <tcp_process+0x5a4>)
8014666: 781b ldrb r3, [r3, #0]
8014668: f003 0310 and.w r3, r3, #16
801466c: 2b00 cmp r3, #0
801466e: f000 80a1 beq.w 80147b4 <tcp_process+0x4d8>
/* expected ACK number? */
if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8014672: 4b84 ldr r3, [pc, #528] ; (8014884 <tcp_process+0x5a8>)
8014674: 681a ldr r2, [r3, #0]
8014676: 687b ldr r3, [r7, #4]
8014678: 6c5b ldr r3, [r3, #68] ; 0x44
801467a: 1ad3 subs r3, r2, r3
801467c: 3b01 subs r3, #1
801467e: 2b00 cmp r3, #0
8014680: db7e blt.n 8014780 <tcp_process+0x4a4>
8014682: 4b80 ldr r3, [pc, #512] ; (8014884 <tcp_process+0x5a8>)
8014684: 681a ldr r2, [r3, #0]
8014686: 687b ldr r3, [r7, #4]
8014688: 6d1b ldr r3, [r3, #80] ; 0x50
801468a: 1ad3 subs r3, r2, r3
801468c: 2b00 cmp r3, #0
801468e: dc77 bgt.n 8014780 <tcp_process+0x4a4>
pcb->state = ESTABLISHED;
8014690: 687b ldr r3, [r7, #4]
8014692: 2204 movs r2, #4
8014694: 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) {
8014696: 687b ldr r3, [r7, #4]
8014698: 6fdb ldr r3, [r3, #124] ; 0x7c
801469a: 2b00 cmp r3, #0
801469c: d102 bne.n 80146a4 <tcp_process+0x3c8>
/* listen pcb might be closed by now */
err = ERR_VAL;
801469e: 23fa movs r3, #250 ; 0xfa
80146a0: 76bb strb r3, [r7, #26]
80146a2: e01d b.n 80146e0 <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);
80146a4: 687b ldr r3, [r7, #4]
80146a6: 6fdb ldr r3, [r3, #124] ; 0x7c
80146a8: 699b ldr r3, [r3, #24]
80146aa: 2b00 cmp r3, #0
80146ac: d106 bne.n 80146bc <tcp_process+0x3e0>
80146ae: 4b7b ldr r3, [pc, #492] ; (801489c <tcp_process+0x5c0>)
80146b0: f44f 726a mov.w r2, #936 ; 0x3a8
80146b4: 497a ldr r1, [pc, #488] ; (80148a0 <tcp_process+0x5c4>)
80146b6: 487b ldr r0, [pc, #492] ; (80148a4 <tcp_process+0x5c8>)
80146b8: f007 ff46 bl 801c548 <iprintf>
#endif
tcp_backlog_accepted(pcb);
/* Call the accept function. */
TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
80146bc: 687b ldr r3, [r7, #4]
80146be: 6fdb ldr r3, [r3, #124] ; 0x7c
80146c0: 699b ldr r3, [r3, #24]
80146c2: 2b00 cmp r3, #0
80146c4: d00a beq.n 80146dc <tcp_process+0x400>
80146c6: 687b ldr r3, [r7, #4]
80146c8: 6fdb ldr r3, [r3, #124] ; 0x7c
80146ca: 699b ldr r3, [r3, #24]
80146cc: 687a ldr r2, [r7, #4]
80146ce: 6910 ldr r0, [r2, #16]
80146d0: 2200 movs r2, #0
80146d2: 6879 ldr r1, [r7, #4]
80146d4: 4798 blx r3
80146d6: 4603 mov r3, r0
80146d8: 76bb strb r3, [r7, #26]
80146da: e001 b.n 80146e0 <tcp_process+0x404>
80146dc: 23f0 movs r3, #240 ; 0xf0
80146de: 76bb strb r3, [r7, #26]
}
if (err != ERR_OK) {
80146e0: f997 301a ldrsb.w r3, [r7, #26]
80146e4: 2b00 cmp r3, #0
80146e6: d00a beq.n 80146fe <tcp_process+0x422>
/* If the accept function returns with an error, we abort
* the connection. */
/* Already aborted? */
if (err != ERR_ABRT) {
80146e8: f997 301a ldrsb.w r3, [r7, #26]
80146ec: f113 0f0d cmn.w r3, #13
80146f0: d002 beq.n 80146f8 <tcp_process+0x41c>
tcp_abort(pcb);
80146f2: 6878 ldr r0, [r7, #4]
80146f4: f7fd ff94 bl 8012620 <tcp_abort>
}
return ERR_ABRT;
80146f8: f06f 030c mvn.w r3, #12
80146fc: e1ce b.n 8014a9c <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);
80146fe: 6878 ldr r0, [r7, #4]
8014700: f000 fae0 bl 8014cc4 <tcp_receive>
/* Prevent ACK for SYN to generate a sent event */
if (recv_acked != 0) {
8014704: 4b68 ldr r3, [pc, #416] ; (80148a8 <tcp_process+0x5cc>)
8014706: 881b ldrh r3, [r3, #0]
8014708: 2b00 cmp r3, #0
801470a: d005 beq.n 8014718 <tcp_process+0x43c>
recv_acked--;
801470c: 4b66 ldr r3, [pc, #408] ; (80148a8 <tcp_process+0x5cc>)
801470e: 881b ldrh r3, [r3, #0]
8014710: 3b01 subs r3, #1
8014712: b29a uxth r2, r3
8014714: 4b64 ldr r3, [pc, #400] ; (80148a8 <tcp_process+0x5cc>)
8014716: 801a strh r2, [r3, #0]
}
pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
8014718: 687b ldr r3, [r7, #4]
801471a: 8e5b ldrh r3, [r3, #50] ; 0x32
801471c: 009a lsls r2, r3, #2
801471e: 687b ldr r3, [r7, #4]
8014720: 8e5b ldrh r3, [r3, #50] ; 0x32
8014722: 005b lsls r3, r3, #1
8014724: f241 111c movw r1, #4380 ; 0x111c
8014728: 428b cmp r3, r1
801472a: bf38 it cc
801472c: 460b movcc r3, r1
801472e: 429a cmp r2, r3
8014730: d204 bcs.n 801473c <tcp_process+0x460>
8014732: 687b ldr r3, [r7, #4]
8014734: 8e5b ldrh r3, [r3, #50] ; 0x32
8014736: 009b lsls r3, r3, #2
8014738: b29b uxth r3, r3
801473a: e00d b.n 8014758 <tcp_process+0x47c>
801473c: 687b ldr r3, [r7, #4]
801473e: 8e5b ldrh r3, [r3, #50] ; 0x32
8014740: 005b lsls r3, r3, #1
8014742: f241 121c movw r2, #4380 ; 0x111c
8014746: 4293 cmp r3, r2
8014748: d904 bls.n 8014754 <tcp_process+0x478>
801474a: 687b ldr r3, [r7, #4]
801474c: 8e5b ldrh r3, [r3, #50] ; 0x32
801474e: 005b lsls r3, r3, #1
8014750: b29b uxth r3, r3
8014752: e001 b.n 8014758 <tcp_process+0x47c>
8014754: f241 131c movw r3, #4380 ; 0x111c
8014758: 687a ldr r2, [r7, #4]
801475a: 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) {
801475e: 4b53 ldr r3, [pc, #332] ; (80148ac <tcp_process+0x5d0>)
8014760: 781b ldrb r3, [r3, #0]
8014762: f003 0320 and.w r3, r3, #32
8014766: 2b00 cmp r3, #0
8014768: d037 beq.n 80147da <tcp_process+0x4fe>
tcp_ack_now(pcb);
801476a: 687b ldr r3, [r7, #4]
801476c: 8b5b ldrh r3, [r3, #26]
801476e: f043 0302 orr.w r3, r3, #2
8014772: b29a uxth r2, r3
8014774: 687b ldr r3, [r7, #4]
8014776: 835a strh r2, [r3, #26]
pcb->state = CLOSE_WAIT;
8014778: 687b ldr r3, [r7, #4]
801477a: 2207 movs r2, #7
801477c: 751a strb r2, [r3, #20]
if (recv_flags & TF_GOT_FIN) {
801477e: e02c b.n 80147da <tcp_process+0x4fe>
}
} else {
/* incorrect ACK number, send RST */
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014780: 4b40 ldr r3, [pc, #256] ; (8014884 <tcp_process+0x5a8>)
8014782: 6819 ldr r1, [r3, #0]
8014784: 4b40 ldr r3, [pc, #256] ; (8014888 <tcp_process+0x5ac>)
8014786: 881b ldrh r3, [r3, #0]
8014788: 461a mov r2, r3
801478a: 4b40 ldr r3, [pc, #256] ; (801488c <tcp_process+0x5b0>)
801478c: 681b ldr r3, [r3, #0]
801478e: 18d0 adds r0, r2, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014790: 4b3f ldr r3, [pc, #252] ; (8014890 <tcp_process+0x5b4>)
8014792: 681b ldr r3, [r3, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
8014794: 885b ldrh r3, [r3, #2]
8014796: b29b uxth r3, r3
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
8014798: 4a3d ldr r2, [pc, #244] ; (8014890 <tcp_process+0x5b4>)
801479a: 6812 ldr r2, [r2, #0]
tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
801479c: 8812 ldrh r2, [r2, #0]
801479e: b292 uxth r2, r2
80147a0: 9202 str r2, [sp, #8]
80147a2: 9301 str r3, [sp, #4]
80147a4: 4b3b ldr r3, [pc, #236] ; (8014894 <tcp_process+0x5b8>)
80147a6: 9300 str r3, [sp, #0]
80147a8: 4b3b ldr r3, [pc, #236] ; (8014898 <tcp_process+0x5bc>)
80147aa: 4602 mov r2, r0
80147ac: 6878 ldr r0, [r7, #4]
80147ae: f002 fbdf bl 8016f70 <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;
80147b2: e167 b.n 8014a84 <tcp_process+0x7a8>
} else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
80147b4: 4b32 ldr r3, [pc, #200] ; (8014880 <tcp_process+0x5a4>)
80147b6: 781b ldrb r3, [r3, #0]
80147b8: f003 0302 and.w r3, r3, #2
80147bc: 2b00 cmp r3, #0
80147be: f000 8161 beq.w 8014a84 <tcp_process+0x7a8>
80147c2: 687b ldr r3, [r7, #4]
80147c4: 6a5b ldr r3, [r3, #36] ; 0x24
80147c6: 1e5a subs r2, r3, #1
80147c8: 4b30 ldr r3, [pc, #192] ; (801488c <tcp_process+0x5b0>)
80147ca: 681b ldr r3, [r3, #0]
80147cc: 429a cmp r2, r3
80147ce: f040 8159 bne.w 8014a84 <tcp_process+0x7a8>
tcp_rexmit(pcb);
80147d2: 6878 ldr r0, [r7, #4]
80147d4: f002 f9b8 bl 8016b48 <tcp_rexmit>
break;
80147d8: e154 b.n 8014a84 <tcp_process+0x7a8>
80147da: e153 b.n 8014a84 <tcp_process+0x7a8>
case CLOSE_WAIT:
/* FALLTHROUGH */
case ESTABLISHED:
tcp_receive(pcb);
80147dc: 6878 ldr r0, [r7, #4]
80147de: f000 fa71 bl 8014cc4 <tcp_receive>
if (recv_flags & TF_GOT_FIN) { /* passive close */
80147e2: 4b32 ldr r3, [pc, #200] ; (80148ac <tcp_process+0x5d0>)
80147e4: 781b ldrb r3, [r3, #0]
80147e6: f003 0320 and.w r3, r3, #32
80147ea: 2b00 cmp r3, #0
80147ec: f000 814c beq.w 8014a88 <tcp_process+0x7ac>
tcp_ack_now(pcb);
80147f0: 687b ldr r3, [r7, #4]
80147f2: 8b5b ldrh r3, [r3, #26]
80147f4: f043 0302 orr.w r3, r3, #2
80147f8: b29a uxth r2, r3
80147fa: 687b ldr r3, [r7, #4]
80147fc: 835a strh r2, [r3, #26]
pcb->state = CLOSE_WAIT;
80147fe: 687b ldr r3, [r7, #4]
8014800: 2207 movs r2, #7
8014802: 751a strb r2, [r3, #20]
}
break;
8014804: e140 b.n 8014a88 <tcp_process+0x7ac>
case FIN_WAIT_1:
tcp_receive(pcb);
8014806: 6878 ldr r0, [r7, #4]
8014808: f000 fa5c bl 8014cc4 <tcp_receive>
if (recv_flags & TF_GOT_FIN) {
801480c: 4b27 ldr r3, [pc, #156] ; (80148ac <tcp_process+0x5d0>)
801480e: 781b ldrb r3, [r3, #0]
8014810: f003 0320 and.w r3, r3, #32
8014814: 2b00 cmp r3, #0
8014816: d071 beq.n 80148fc <tcp_process+0x620>
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
8014818: 4b19 ldr r3, [pc, #100] ; (8014880 <tcp_process+0x5a4>)
801481a: 781b ldrb r3, [r3, #0]
801481c: f003 0310 and.w r3, r3, #16
8014820: 2b00 cmp r3, #0
8014822: d060 beq.n 80148e6 <tcp_process+0x60a>
8014824: 687b ldr r3, [r7, #4]
8014826: 6d1a ldr r2, [r3, #80] ; 0x50
8014828: 4b16 ldr r3, [pc, #88] ; (8014884 <tcp_process+0x5a8>)
801482a: 681b ldr r3, [r3, #0]
801482c: 429a cmp r2, r3
801482e: d15a bne.n 80148e6 <tcp_process+0x60a>
pcb->unsent == NULL) {
8014830: 687b ldr r3, [r7, #4]
8014832: 6edb ldr r3, [r3, #108] ; 0x6c
if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
8014834: 2b00 cmp r3, #0
8014836: d156 bne.n 80148e6 <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);
8014838: 687b ldr r3, [r7, #4]
801483a: 8b5b ldrh r3, [r3, #26]
801483c: f043 0302 orr.w r3, r3, #2
8014840: b29a uxth r2, r3
8014842: 687b ldr r3, [r7, #4]
8014844: 835a strh r2, [r3, #26]
tcp_pcb_purge(pcb);
8014846: 6878 ldr r0, [r7, #4]
8014848: f7fe fdbe bl 80133c8 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
801484c: 4b18 ldr r3, [pc, #96] ; (80148b0 <tcp_process+0x5d4>)
801484e: 681b ldr r3, [r3, #0]
8014850: 687a ldr r2, [r7, #4]
8014852: 429a cmp r2, r3
8014854: d105 bne.n 8014862 <tcp_process+0x586>
8014856: 4b16 ldr r3, [pc, #88] ; (80148b0 <tcp_process+0x5d4>)
8014858: 681b ldr r3, [r3, #0]
801485a: 68db ldr r3, [r3, #12]
801485c: 4a14 ldr r2, [pc, #80] ; (80148b0 <tcp_process+0x5d4>)
801485e: 6013 str r3, [r2, #0]
8014860: e02e b.n 80148c0 <tcp_process+0x5e4>
8014862: 4b13 ldr r3, [pc, #76] ; (80148b0 <tcp_process+0x5d4>)
8014864: 681b ldr r3, [r3, #0]
8014866: 617b str r3, [r7, #20]
8014868: e027 b.n 80148ba <tcp_process+0x5de>
801486a: 697b ldr r3, [r7, #20]
801486c: 68db ldr r3, [r3, #12]
801486e: 687a ldr r2, [r7, #4]
8014870: 429a cmp r2, r3
8014872: d11f bne.n 80148b4 <tcp_process+0x5d8>
8014874: 687b ldr r3, [r7, #4]
8014876: 68da ldr r2, [r3, #12]
8014878: 697b ldr r3, [r7, #20]
801487a: 60da str r2, [r3, #12]
801487c: e020 b.n 80148c0 <tcp_process+0x5e4>
801487e: bf00 nop
8014880: 20008744 .word 0x20008744
8014884: 2000873c .word 0x2000873c
8014888: 20008742 .word 0x20008742
801488c: 20008738 .word 0x20008738
8014890: 20008728 .word 0x20008728
8014894: 2000c0c4 .word 0x2000c0c4
8014898: 2000c0c8 .word 0x2000c0c8
801489c: 0801eb30 .word 0x0801eb30
80148a0: 0801edd0 .word 0x0801edd0
80148a4: 0801eb7c .word 0x0801eb7c
80148a8: 20008740 .word 0x20008740
80148ac: 20008745 .word 0x20008745
80148b0: 2000f7e8 .word 0x2000f7e8
80148b4: 697b ldr r3, [r7, #20]
80148b6: 68db ldr r3, [r3, #12]
80148b8: 617b str r3, [r7, #20]
80148ba: 697b ldr r3, [r7, #20]
80148bc: 2b00 cmp r3, #0
80148be: d1d4 bne.n 801486a <tcp_process+0x58e>
80148c0: 687b ldr r3, [r7, #4]
80148c2: 2200 movs r2, #0
80148c4: 60da str r2, [r3, #12]
80148c6: 4b77 ldr r3, [pc, #476] ; (8014aa4 <tcp_process+0x7c8>)
80148c8: 2201 movs r2, #1
80148ca: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
80148cc: 687b ldr r3, [r7, #4]
80148ce: 220a movs r2, #10
80148d0: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
80148d2: 4b75 ldr r3, [pc, #468] ; (8014aa8 <tcp_process+0x7cc>)
80148d4: 681a ldr r2, [r3, #0]
80148d6: 687b ldr r3, [r7, #4]
80148d8: 60da str r2, [r3, #12]
80148da: 4a73 ldr r2, [pc, #460] ; (8014aa8 <tcp_process+0x7cc>)
80148dc: 687b ldr r3, [r7, #4]
80148de: 6013 str r3, [r2, #0]
80148e0: f002 fd08 bl 80172f4 <tcp_timer_needed>
}
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
pcb->unsent == NULL) {
pcb->state = FIN_WAIT_2;
}
break;
80148e4: e0d2 b.n 8014a8c <tcp_process+0x7b0>
tcp_ack_now(pcb);
80148e6: 687b ldr r3, [r7, #4]
80148e8: 8b5b ldrh r3, [r3, #26]
80148ea: f043 0302 orr.w r3, r3, #2
80148ee: b29a uxth r2, r3
80148f0: 687b ldr r3, [r7, #4]
80148f2: 835a strh r2, [r3, #26]
pcb->state = CLOSING;
80148f4: 687b ldr r3, [r7, #4]
80148f6: 2208 movs r2, #8
80148f8: 751a strb r2, [r3, #20]
break;
80148fa: e0c7 b.n 8014a8c <tcp_process+0x7b0>
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
80148fc: 4b6b ldr r3, [pc, #428] ; (8014aac <tcp_process+0x7d0>)
80148fe: 781b ldrb r3, [r3, #0]
8014900: f003 0310 and.w r3, r3, #16
8014904: 2b00 cmp r3, #0
8014906: f000 80c1 beq.w 8014a8c <tcp_process+0x7b0>
801490a: 687b ldr r3, [r7, #4]
801490c: 6d1a ldr r2, [r3, #80] ; 0x50
801490e: 4b68 ldr r3, [pc, #416] ; (8014ab0 <tcp_process+0x7d4>)
8014910: 681b ldr r3, [r3, #0]
8014912: 429a cmp r2, r3
8014914: f040 80ba bne.w 8014a8c <tcp_process+0x7b0>
pcb->unsent == NULL) {
8014918: 687b ldr r3, [r7, #4]
801491a: 6edb ldr r3, [r3, #108] ; 0x6c
} else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
801491c: 2b00 cmp r3, #0
801491e: f040 80b5 bne.w 8014a8c <tcp_process+0x7b0>
pcb->state = FIN_WAIT_2;
8014922: 687b ldr r3, [r7, #4]
8014924: 2206 movs r2, #6
8014926: 751a strb r2, [r3, #20]
break;
8014928: e0b0 b.n 8014a8c <tcp_process+0x7b0>
case FIN_WAIT_2:
tcp_receive(pcb);
801492a: 6878 ldr r0, [r7, #4]
801492c: f000 f9ca bl 8014cc4 <tcp_receive>
if (recv_flags & TF_GOT_FIN) {
8014930: 4b60 ldr r3, [pc, #384] ; (8014ab4 <tcp_process+0x7d8>)
8014932: 781b ldrb r3, [r3, #0]
8014934: f003 0320 and.w r3, r3, #32
8014938: 2b00 cmp r3, #0
801493a: f000 80a9 beq.w 8014a90 <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);
801493e: 687b ldr r3, [r7, #4]
8014940: 8b5b ldrh r3, [r3, #26]
8014942: f043 0302 orr.w r3, r3, #2
8014946: b29a uxth r2, r3
8014948: 687b ldr r3, [r7, #4]
801494a: 835a strh r2, [r3, #26]
tcp_pcb_purge(pcb);
801494c: 6878 ldr r0, [r7, #4]
801494e: f7fe fd3b bl 80133c8 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
8014952: 4b59 ldr r3, [pc, #356] ; (8014ab8 <tcp_process+0x7dc>)
8014954: 681b ldr r3, [r3, #0]
8014956: 687a ldr r2, [r7, #4]
8014958: 429a cmp r2, r3
801495a: d105 bne.n 8014968 <tcp_process+0x68c>
801495c: 4b56 ldr r3, [pc, #344] ; (8014ab8 <tcp_process+0x7dc>)
801495e: 681b ldr r3, [r3, #0]
8014960: 68db ldr r3, [r3, #12]
8014962: 4a55 ldr r2, [pc, #340] ; (8014ab8 <tcp_process+0x7dc>)
8014964: 6013 str r3, [r2, #0]
8014966: e013 b.n 8014990 <tcp_process+0x6b4>
8014968: 4b53 ldr r3, [pc, #332] ; (8014ab8 <tcp_process+0x7dc>)
801496a: 681b ldr r3, [r3, #0]
801496c: 613b str r3, [r7, #16]
801496e: e00c b.n 801498a <tcp_process+0x6ae>
8014970: 693b ldr r3, [r7, #16]
8014972: 68db ldr r3, [r3, #12]
8014974: 687a ldr r2, [r7, #4]
8014976: 429a cmp r2, r3
8014978: d104 bne.n 8014984 <tcp_process+0x6a8>
801497a: 687b ldr r3, [r7, #4]
801497c: 68da ldr r2, [r3, #12]
801497e: 693b ldr r3, [r7, #16]
8014980: 60da str r2, [r3, #12]
8014982: e005 b.n 8014990 <tcp_process+0x6b4>
8014984: 693b ldr r3, [r7, #16]
8014986: 68db ldr r3, [r3, #12]
8014988: 613b str r3, [r7, #16]
801498a: 693b ldr r3, [r7, #16]
801498c: 2b00 cmp r3, #0
801498e: d1ef bne.n 8014970 <tcp_process+0x694>
8014990: 687b ldr r3, [r7, #4]
8014992: 2200 movs r2, #0
8014994: 60da str r2, [r3, #12]
8014996: 4b43 ldr r3, [pc, #268] ; (8014aa4 <tcp_process+0x7c8>)
8014998: 2201 movs r2, #1
801499a: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
801499c: 687b ldr r3, [r7, #4]
801499e: 220a movs r2, #10
80149a0: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
80149a2: 4b41 ldr r3, [pc, #260] ; (8014aa8 <tcp_process+0x7cc>)
80149a4: 681a ldr r2, [r3, #0]
80149a6: 687b ldr r3, [r7, #4]
80149a8: 60da str r2, [r3, #12]
80149aa: 4a3f ldr r2, [pc, #252] ; (8014aa8 <tcp_process+0x7cc>)
80149ac: 687b ldr r3, [r7, #4]
80149ae: 6013 str r3, [r2, #0]
80149b0: f002 fca0 bl 80172f4 <tcp_timer_needed>
}
break;
80149b4: e06c b.n 8014a90 <tcp_process+0x7b4>
case CLOSING:
tcp_receive(pcb);
80149b6: 6878 ldr r0, [r7, #4]
80149b8: f000 f984 bl 8014cc4 <tcp_receive>
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
80149bc: 4b3b ldr r3, [pc, #236] ; (8014aac <tcp_process+0x7d0>)
80149be: 781b ldrb r3, [r3, #0]
80149c0: f003 0310 and.w r3, r3, #16
80149c4: 2b00 cmp r3, #0
80149c6: d065 beq.n 8014a94 <tcp_process+0x7b8>
80149c8: 687b ldr r3, [r7, #4]
80149ca: 6d1a ldr r2, [r3, #80] ; 0x50
80149cc: 4b38 ldr r3, [pc, #224] ; (8014ab0 <tcp_process+0x7d4>)
80149ce: 681b ldr r3, [r3, #0]
80149d0: 429a cmp r2, r3
80149d2: d15f bne.n 8014a94 <tcp_process+0x7b8>
80149d4: 687b ldr r3, [r7, #4]
80149d6: 6edb ldr r3, [r3, #108] ; 0x6c
80149d8: 2b00 cmp r3, #0
80149da: d15b bne.n 8014a94 <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);
80149dc: 6878 ldr r0, [r7, #4]
80149de: f7fe fcf3 bl 80133c8 <tcp_pcb_purge>
TCP_RMV_ACTIVE(pcb);
80149e2: 4b35 ldr r3, [pc, #212] ; (8014ab8 <tcp_process+0x7dc>)
80149e4: 681b ldr r3, [r3, #0]
80149e6: 687a ldr r2, [r7, #4]
80149e8: 429a cmp r2, r3
80149ea: d105 bne.n 80149f8 <tcp_process+0x71c>
80149ec: 4b32 ldr r3, [pc, #200] ; (8014ab8 <tcp_process+0x7dc>)
80149ee: 681b ldr r3, [r3, #0]
80149f0: 68db ldr r3, [r3, #12]
80149f2: 4a31 ldr r2, [pc, #196] ; (8014ab8 <tcp_process+0x7dc>)
80149f4: 6013 str r3, [r2, #0]
80149f6: e013 b.n 8014a20 <tcp_process+0x744>
80149f8: 4b2f ldr r3, [pc, #188] ; (8014ab8 <tcp_process+0x7dc>)
80149fa: 681b ldr r3, [r3, #0]
80149fc: 60fb str r3, [r7, #12]
80149fe: e00c b.n 8014a1a <tcp_process+0x73e>
8014a00: 68fb ldr r3, [r7, #12]
8014a02: 68db ldr r3, [r3, #12]
8014a04: 687a ldr r2, [r7, #4]
8014a06: 429a cmp r2, r3
8014a08: d104 bne.n 8014a14 <tcp_process+0x738>
8014a0a: 687b ldr r3, [r7, #4]
8014a0c: 68da ldr r2, [r3, #12]
8014a0e: 68fb ldr r3, [r7, #12]
8014a10: 60da str r2, [r3, #12]
8014a12: e005 b.n 8014a20 <tcp_process+0x744>
8014a14: 68fb ldr r3, [r7, #12]
8014a16: 68db ldr r3, [r3, #12]
8014a18: 60fb str r3, [r7, #12]
8014a1a: 68fb ldr r3, [r7, #12]
8014a1c: 2b00 cmp r3, #0
8014a1e: d1ef bne.n 8014a00 <tcp_process+0x724>
8014a20: 687b ldr r3, [r7, #4]
8014a22: 2200 movs r2, #0
8014a24: 60da str r2, [r3, #12]
8014a26: 4b1f ldr r3, [pc, #124] ; (8014aa4 <tcp_process+0x7c8>)
8014a28: 2201 movs r2, #1
8014a2a: 701a strb r2, [r3, #0]
pcb->state = TIME_WAIT;
8014a2c: 687b ldr r3, [r7, #4]
8014a2e: 220a movs r2, #10
8014a30: 751a strb r2, [r3, #20]
TCP_REG(&tcp_tw_pcbs, pcb);
8014a32: 4b1d ldr r3, [pc, #116] ; (8014aa8 <tcp_process+0x7cc>)
8014a34: 681a ldr r2, [r3, #0]
8014a36: 687b ldr r3, [r7, #4]
8014a38: 60da str r2, [r3, #12]
8014a3a: 4a1b ldr r2, [pc, #108] ; (8014aa8 <tcp_process+0x7cc>)
8014a3c: 687b ldr r3, [r7, #4]
8014a3e: 6013 str r3, [r2, #0]
8014a40: f002 fc58 bl 80172f4 <tcp_timer_needed>
}
break;
8014a44: e026 b.n 8014a94 <tcp_process+0x7b8>
case LAST_ACK:
tcp_receive(pcb);
8014a46: 6878 ldr r0, [r7, #4]
8014a48: f000 f93c bl 8014cc4 <tcp_receive>
if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
8014a4c: 4b17 ldr r3, [pc, #92] ; (8014aac <tcp_process+0x7d0>)
8014a4e: 781b ldrb r3, [r3, #0]
8014a50: f003 0310 and.w r3, r3, #16
8014a54: 2b00 cmp r3, #0
8014a56: d01f beq.n 8014a98 <tcp_process+0x7bc>
8014a58: 687b ldr r3, [r7, #4]
8014a5a: 6d1a ldr r2, [r3, #80] ; 0x50
8014a5c: 4b14 ldr r3, [pc, #80] ; (8014ab0 <tcp_process+0x7d4>)
8014a5e: 681b ldr r3, [r3, #0]
8014a60: 429a cmp r2, r3
8014a62: d119 bne.n 8014a98 <tcp_process+0x7bc>
8014a64: 687b ldr r3, [r7, #4]
8014a66: 6edb ldr r3, [r3, #108] ; 0x6c
8014a68: 2b00 cmp r3, #0
8014a6a: d115 bne.n 8014a98 <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;
8014a6c: 4b11 ldr r3, [pc, #68] ; (8014ab4 <tcp_process+0x7d8>)
8014a6e: 781b ldrb r3, [r3, #0]
8014a70: f043 0310 orr.w r3, r3, #16
8014a74: b2da uxtb r2, r3
8014a76: 4b0f ldr r3, [pc, #60] ; (8014ab4 <tcp_process+0x7d8>)
8014a78: 701a strb r2, [r3, #0]
}
break;
8014a7a: e00d b.n 8014a98 <tcp_process+0x7bc>
default:
break;
8014a7c: bf00 nop
8014a7e: e00c b.n 8014a9a <tcp_process+0x7be>
break;
8014a80: bf00 nop
8014a82: e00a b.n 8014a9a <tcp_process+0x7be>
break;
8014a84: bf00 nop
8014a86: e008 b.n 8014a9a <tcp_process+0x7be>
break;
8014a88: bf00 nop
8014a8a: e006 b.n 8014a9a <tcp_process+0x7be>
break;
8014a8c: bf00 nop
8014a8e: e004 b.n 8014a9a <tcp_process+0x7be>
break;
8014a90: bf00 nop
8014a92: e002 b.n 8014a9a <tcp_process+0x7be>
break;
8014a94: bf00 nop
8014a96: e000 b.n 8014a9a <tcp_process+0x7be>
break;
8014a98: bf00 nop
}
return ERR_OK;
8014a9a: 2300 movs r3, #0
}
8014a9c: 4618 mov r0, r3
8014a9e: 3724 adds r7, #36 ; 0x24
8014aa0: 46bd mov sp, r7
8014aa2: bd90 pop {r4, r7, pc}
8014aa4: 2000f7e4 .word 0x2000f7e4
8014aa8: 2000f7f8 .word 0x2000f7f8
8014aac: 20008744 .word 0x20008744
8014ab0: 2000873c .word 0x2000873c
8014ab4: 20008745 .word 0x20008745
8014ab8: 2000f7e8 .word 0x2000f7e8
08014abc <tcp_oos_insert_segment>:
*
* Called from tcp_receive()
*/
static void
tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next)
{
8014abc: b590 push {r4, r7, lr}
8014abe: b085 sub sp, #20
8014ac0: af00 add r7, sp, #0
8014ac2: 6078 str r0, [r7, #4]
8014ac4: 6039 str r1, [r7, #0]
struct tcp_seg *old_seg;
LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
8014ac6: 687b ldr r3, [r7, #4]
8014ac8: 2b00 cmp r3, #0
8014aca: d106 bne.n 8014ada <tcp_oos_insert_segment+0x1e>
8014acc: 4b3b ldr r3, [pc, #236] ; (8014bbc <tcp_oos_insert_segment+0x100>)
8014ace: f240 421f movw r2, #1055 ; 0x41f
8014ad2: 493b ldr r1, [pc, #236] ; (8014bc0 <tcp_oos_insert_segment+0x104>)
8014ad4: 483b ldr r0, [pc, #236] ; (8014bc4 <tcp_oos_insert_segment+0x108>)
8014ad6: f007 fd37 bl 801c548 <iprintf>
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
8014ada: 687b ldr r3, [r7, #4]
8014adc: 68db ldr r3, [r3, #12]
8014ade: 899b ldrh r3, [r3, #12]
8014ae0: b29b uxth r3, r3
8014ae2: 4618 mov r0, r3
8014ae4: f7fb fc4c bl 8010380 <lwip_htons>
8014ae8: 4603 mov r3, r0
8014aea: b2db uxtb r3, r3
8014aec: f003 0301 and.w r3, r3, #1
8014af0: 2b00 cmp r3, #0
8014af2: d028 beq.n 8014b46 <tcp_oos_insert_segment+0x8a>
/* received segment overlaps all following segments */
tcp_segs_free(next);
8014af4: 6838 ldr r0, [r7, #0]
8014af6: f7fe fa67 bl 8012fc8 <tcp_segs_free>
next = NULL;
8014afa: 2300 movs r3, #0
8014afc: 603b str r3, [r7, #0]
8014afe: e056 b.n 8014bae <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) {
8014b00: 683b ldr r3, [r7, #0]
8014b02: 68db ldr r3, [r3, #12]
8014b04: 899b ldrh r3, [r3, #12]
8014b06: b29b uxth r3, r3
8014b08: 4618 mov r0, r3
8014b0a: f7fb fc39 bl 8010380 <lwip_htons>
8014b0e: 4603 mov r3, r0
8014b10: b2db uxtb r3, r3
8014b12: f003 0301 and.w r3, r3, #1
8014b16: 2b00 cmp r3, #0
8014b18: d00d beq.n 8014b36 <tcp_oos_insert_segment+0x7a>
TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN);
8014b1a: 687b ldr r3, [r7, #4]
8014b1c: 68db ldr r3, [r3, #12]
8014b1e: 899b ldrh r3, [r3, #12]
8014b20: b29c uxth r4, r3
8014b22: 2001 movs r0, #1
8014b24: f7fb fc2c bl 8010380 <lwip_htons>
8014b28: 4603 mov r3, r0
8014b2a: 461a mov r2, r3
8014b2c: 687b ldr r3, [r7, #4]
8014b2e: 68db ldr r3, [r3, #12]
8014b30: 4322 orrs r2, r4
8014b32: b292 uxth r2, r2
8014b34: 819a strh r2, [r3, #12]
}
old_seg = next;
8014b36: 683b ldr r3, [r7, #0]
8014b38: 60fb str r3, [r7, #12]
next = next->next;
8014b3a: 683b ldr r3, [r7, #0]
8014b3c: 681b ldr r3, [r3, #0]
8014b3e: 603b str r3, [r7, #0]
tcp_seg_free(old_seg);
8014b40: 68f8 ldr r0, [r7, #12]
8014b42: f7fe fa55 bl 8012ff0 <tcp_seg_free>
while (next &&
8014b46: 683b ldr r3, [r7, #0]
8014b48: 2b00 cmp r3, #0
8014b4a: d00e beq.n 8014b6a <tcp_oos_insert_segment+0xae>
TCP_SEQ_GEQ((seqno + cseg->len),
8014b4c: 687b ldr r3, [r7, #4]
8014b4e: 891b ldrh r3, [r3, #8]
8014b50: 461a mov r2, r3
8014b52: 4b1d ldr r3, [pc, #116] ; (8014bc8 <tcp_oos_insert_segment+0x10c>)
8014b54: 681b ldr r3, [r3, #0]
8014b56: 441a add r2, r3
8014b58: 683b ldr r3, [r7, #0]
8014b5a: 68db ldr r3, [r3, #12]
8014b5c: 685b ldr r3, [r3, #4]
8014b5e: 6839 ldr r1, [r7, #0]
8014b60: 8909 ldrh r1, [r1, #8]
8014b62: 440b add r3, r1
8014b64: 1ad3 subs r3, r2, r3
while (next &&
8014b66: 2b00 cmp r3, #0
8014b68: daca bge.n 8014b00 <tcp_oos_insert_segment+0x44>
}
if (next &&
8014b6a: 683b ldr r3, [r7, #0]
8014b6c: 2b00 cmp r3, #0
8014b6e: d01e beq.n 8014bae <tcp_oos_insert_segment+0xf2>
TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
8014b70: 687b ldr r3, [r7, #4]
8014b72: 891b ldrh r3, [r3, #8]
8014b74: 461a mov r2, r3
8014b76: 4b14 ldr r3, [pc, #80] ; (8014bc8 <tcp_oos_insert_segment+0x10c>)
8014b78: 681b ldr r3, [r3, #0]
8014b7a: 441a add r2, r3
8014b7c: 683b ldr r3, [r7, #0]
8014b7e: 68db ldr r3, [r3, #12]
8014b80: 685b ldr r3, [r3, #4]
8014b82: 1ad3 subs r3, r2, r3
if (next &&
8014b84: 2b00 cmp r3, #0
8014b86: dd12 ble.n 8014bae <tcp_oos_insert_segment+0xf2>
/* We need to trim the incoming segment. */
cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
8014b88: 683b ldr r3, [r7, #0]
8014b8a: 68db ldr r3, [r3, #12]
8014b8c: 685b ldr r3, [r3, #4]
8014b8e: b29a uxth r2, r3
8014b90: 4b0d ldr r3, [pc, #52] ; (8014bc8 <tcp_oos_insert_segment+0x10c>)
8014b92: 681b ldr r3, [r3, #0]
8014b94: b29b uxth r3, r3
8014b96: 1ad3 subs r3, r2, r3
8014b98: b29a uxth r2, r3
8014b9a: 687b ldr r3, [r7, #4]
8014b9c: 811a strh r2, [r3, #8]
pbuf_realloc(cseg->p, cseg->len);
8014b9e: 687b ldr r3, [r7, #4]
8014ba0: 685a ldr r2, [r3, #4]
8014ba2: 687b ldr r3, [r7, #4]
8014ba4: 891b ldrh r3, [r3, #8]
8014ba6: 4619 mov r1, r3
8014ba8: 4610 mov r0, r2
8014baa: f7fc fe17 bl 80117dc <pbuf_realloc>
}
}
cseg->next = next;
8014bae: 687b ldr r3, [r7, #4]
8014bb0: 683a ldr r2, [r7, #0]
8014bb2: 601a str r2, [r3, #0]
}
8014bb4: bf00 nop
8014bb6: 3714 adds r7, #20
8014bb8: 46bd mov sp, r7
8014bba: bd90 pop {r4, r7, pc}
8014bbc: 0801eb30 .word 0x0801eb30
8014bc0: 0801edf0 .word 0x0801edf0
8014bc4: 0801eb7c .word 0x0801eb7c
8014bc8: 20008738 .word 0x20008738
08014bcc <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)
{
8014bcc: b5b0 push {r4, r5, r7, lr}
8014bce: b086 sub sp, #24
8014bd0: af00 add r7, sp, #0
8014bd2: 60f8 str r0, [r7, #12]
8014bd4: 60b9 str r1, [r7, #8]
8014bd6: 607a str r2, [r7, #4]
8014bd8: 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 &&
8014bda: e03e b.n 8014c5a <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;
8014bdc: 68bb ldr r3, [r7, #8]
8014bde: 617b str r3, [r7, #20]
seg_list = seg_list->next;
8014be0: 68bb ldr r3, [r7, #8]
8014be2: 681b ldr r3, [r3, #0]
8014be4: 60bb str r3, [r7, #8]
clen = pbuf_clen(next->p);
8014be6: 697b ldr r3, [r7, #20]
8014be8: 685b ldr r3, [r3, #4]
8014bea: 4618 mov r0, r3
8014bec: f7fd f80a bl 8011c04 <pbuf_clen>
8014bf0: 4603 mov r3, r0
8014bf2: 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));
8014bf4: 68fb ldr r3, [r7, #12]
8014bf6: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8014bfa: 8a7a ldrh r2, [r7, #18]
8014bfc: 429a cmp r2, r3
8014bfe: d906 bls.n 8014c0e <tcp_free_acked_segments+0x42>
8014c00: 4b2a ldr r3, [pc, #168] ; (8014cac <tcp_free_acked_segments+0xe0>)
8014c02: f240 4257 movw r2, #1111 ; 0x457
8014c06: 492a ldr r1, [pc, #168] ; (8014cb0 <tcp_free_acked_segments+0xe4>)
8014c08: 482a ldr r0, [pc, #168] ; (8014cb4 <tcp_free_acked_segments+0xe8>)
8014c0a: f007 fc9d bl 801c548 <iprintf>
pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen);
8014c0e: 68fb ldr r3, [r7, #12]
8014c10: f8b3 2066 ldrh.w r2, [r3, #102] ; 0x66
8014c14: 8a7b ldrh r3, [r7, #18]
8014c16: 1ad3 subs r3, r2, r3
8014c18: b29a uxth r2, r3
8014c1a: 68fb ldr r3, [r7, #12]
8014c1c: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
recv_acked = (tcpwnd_size_t)(recv_acked + next->len);
8014c20: 697b ldr r3, [r7, #20]
8014c22: 891a ldrh r2, [r3, #8]
8014c24: 4b24 ldr r3, [pc, #144] ; (8014cb8 <tcp_free_acked_segments+0xec>)
8014c26: 881b ldrh r3, [r3, #0]
8014c28: 4413 add r3, r2
8014c2a: b29a uxth r2, r3
8014c2c: 4b22 ldr r3, [pc, #136] ; (8014cb8 <tcp_free_acked_segments+0xec>)
8014c2e: 801a strh r2, [r3, #0]
tcp_seg_free(next);
8014c30: 6978 ldr r0, [r7, #20]
8014c32: f7fe f9dd bl 8012ff0 <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) {
8014c36: 68fb ldr r3, [r7, #12]
8014c38: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8014c3c: 2b00 cmp r3, #0
8014c3e: d00c beq.n 8014c5a <tcp_free_acked_segments+0x8e>
LWIP_ASSERT("tcp_receive: valid queue length",
8014c40: 68bb ldr r3, [r7, #8]
8014c42: 2b00 cmp r3, #0
8014c44: d109 bne.n 8014c5a <tcp_free_acked_segments+0x8e>
8014c46: 683b ldr r3, [r7, #0]
8014c48: 2b00 cmp r3, #0
8014c4a: d106 bne.n 8014c5a <tcp_free_acked_segments+0x8e>
8014c4c: 4b17 ldr r3, [pc, #92] ; (8014cac <tcp_free_acked_segments+0xe0>)
8014c4e: f240 4262 movw r2, #1122 ; 0x462
8014c52: 491a ldr r1, [pc, #104] ; (8014cbc <tcp_free_acked_segments+0xf0>)
8014c54: 4817 ldr r0, [pc, #92] ; (8014cb4 <tcp_free_acked_segments+0xe8>)
8014c56: f007 fc77 bl 801c548 <iprintf>
while (seg_list != NULL &&
8014c5a: 68bb ldr r3, [r7, #8]
8014c5c: 2b00 cmp r3, #0
8014c5e: d020 beq.n 8014ca2 <tcp_free_acked_segments+0xd6>
TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
8014c60: 68bb ldr r3, [r7, #8]
8014c62: 68db ldr r3, [r3, #12]
8014c64: 685b ldr r3, [r3, #4]
8014c66: 4618 mov r0, r3
8014c68: f7fb fb9f bl 80103aa <lwip_htonl>
8014c6c: 4604 mov r4, r0
8014c6e: 68bb ldr r3, [r7, #8]
8014c70: 891b ldrh r3, [r3, #8]
8014c72: 461d mov r5, r3
8014c74: 68bb ldr r3, [r7, #8]
8014c76: 68db ldr r3, [r3, #12]
8014c78: 899b ldrh r3, [r3, #12]
8014c7a: b29b uxth r3, r3
8014c7c: 4618 mov r0, r3
8014c7e: f7fb fb7f bl 8010380 <lwip_htons>
8014c82: 4603 mov r3, r0
8014c84: b2db uxtb r3, r3
8014c86: f003 0303 and.w r3, r3, #3
8014c8a: 2b00 cmp r3, #0
8014c8c: d001 beq.n 8014c92 <tcp_free_acked_segments+0xc6>
8014c8e: 2301 movs r3, #1
8014c90: e000 b.n 8014c94 <tcp_free_acked_segments+0xc8>
8014c92: 2300 movs r3, #0
8014c94: 442b add r3, r5
8014c96: 18e2 adds r2, r4, r3
8014c98: 4b09 ldr r3, [pc, #36] ; (8014cc0 <tcp_free_acked_segments+0xf4>)
8014c9a: 681b ldr r3, [r3, #0]
8014c9c: 1ad3 subs r3, r2, r3
while (seg_list != NULL &&
8014c9e: 2b00 cmp r3, #0
8014ca0: dd9c ble.n 8014bdc <tcp_free_acked_segments+0x10>
seg_list != NULL || dbg_other_seg_list != NULL);
}
}
return seg_list;
8014ca2: 68bb ldr r3, [r7, #8]
}
8014ca4: 4618 mov r0, r3
8014ca6: 3718 adds r7, #24
8014ca8: 46bd mov sp, r7
8014caa: bdb0 pop {r4, r5, r7, pc}
8014cac: 0801eb30 .word 0x0801eb30
8014cb0: 0801ee18 .word 0x0801ee18
8014cb4: 0801eb7c .word 0x0801eb7c
8014cb8: 20008740 .word 0x20008740
8014cbc: 0801ee40 .word 0x0801ee40
8014cc0: 2000873c .word 0x2000873c
08014cc4 <tcp_receive>:
*
* Called from tcp_process().
*/
static void
tcp_receive(struct tcp_pcb *pcb)
{
8014cc4: b5b0 push {r4, r5, r7, lr}
8014cc6: b094 sub sp, #80 ; 0x50
8014cc8: af00 add r7, sp, #0
8014cca: 6078 str r0, [r7, #4]
s16_t m;
u32_t right_wnd_edge;
int found_dupack = 0;
8014ccc: 2300 movs r3, #0
8014cce: 64bb str r3, [r7, #72] ; 0x48
LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
8014cd0: 687b ldr r3, [r7, #4]
8014cd2: 2b00 cmp r3, #0
8014cd4: d106 bne.n 8014ce4 <tcp_receive+0x20>
8014cd6: 4ba6 ldr r3, [pc, #664] ; (8014f70 <tcp_receive+0x2ac>)
8014cd8: f240 427b movw r2, #1147 ; 0x47b
8014cdc: 49a5 ldr r1, [pc, #660] ; (8014f74 <tcp_receive+0x2b0>)
8014cde: 48a6 ldr r0, [pc, #664] ; (8014f78 <tcp_receive+0x2b4>)
8014ce0: f007 fc32 bl 801c548 <iprintf>
LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
8014ce4: 687b ldr r3, [r7, #4]
8014ce6: 7d1b ldrb r3, [r3, #20]
8014ce8: 2b03 cmp r3, #3
8014cea: d806 bhi.n 8014cfa <tcp_receive+0x36>
8014cec: 4ba0 ldr r3, [pc, #640] ; (8014f70 <tcp_receive+0x2ac>)
8014cee: f240 427c movw r2, #1148 ; 0x47c
8014cf2: 49a2 ldr r1, [pc, #648] ; (8014f7c <tcp_receive+0x2b8>)
8014cf4: 48a0 ldr r0, [pc, #640] ; (8014f78 <tcp_receive+0x2b4>)
8014cf6: f007 fc27 bl 801c548 <iprintf>
if (flags & TCP_ACK) {
8014cfa: 4ba1 ldr r3, [pc, #644] ; (8014f80 <tcp_receive+0x2bc>)
8014cfc: 781b ldrb r3, [r3, #0]
8014cfe: f003 0310 and.w r3, r3, #16
8014d02: 2b00 cmp r3, #0
8014d04: f000 8263 beq.w 80151ce <tcp_receive+0x50a>
right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2;
8014d08: 687b ldr r3, [r7, #4]
8014d0a: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8014d0e: 461a mov r2, r3
8014d10: 687b ldr r3, [r7, #4]
8014d12: 6d9b ldr r3, [r3, #88] ; 0x58
8014d14: 4413 add r3, r2
8014d16: 633b str r3, [r7, #48] ; 0x30
/* Update window. */
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
8014d18: 687b ldr r3, [r7, #4]
8014d1a: 6d5a ldr r2, [r3, #84] ; 0x54
8014d1c: 4b99 ldr r3, [pc, #612] ; (8014f84 <tcp_receive+0x2c0>)
8014d1e: 681b ldr r3, [r3, #0]
8014d20: 1ad3 subs r3, r2, r3
8014d22: 2b00 cmp r3, #0
8014d24: db1b blt.n 8014d5e <tcp_receive+0x9a>
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
8014d26: 687b ldr r3, [r7, #4]
8014d28: 6d5a ldr r2, [r3, #84] ; 0x54
8014d2a: 4b96 ldr r3, [pc, #600] ; (8014f84 <tcp_receive+0x2c0>)
8014d2c: 681b ldr r3, [r3, #0]
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
8014d2e: 429a cmp r2, r3
8014d30: d106 bne.n 8014d40 <tcp_receive+0x7c>
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
8014d32: 687b ldr r3, [r7, #4]
8014d34: 6d9a ldr r2, [r3, #88] ; 0x58
8014d36: 4b94 ldr r3, [pc, #592] ; (8014f88 <tcp_receive+0x2c4>)
8014d38: 681b ldr r3, [r3, #0]
8014d3a: 1ad3 subs r3, r2, r3
8014d3c: 2b00 cmp r3, #0
8014d3e: db0e blt.n 8014d5e <tcp_receive+0x9a>
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
8014d40: 687b ldr r3, [r7, #4]
8014d42: 6d9a ldr r2, [r3, #88] ; 0x58
8014d44: 4b90 ldr r3, [pc, #576] ; (8014f88 <tcp_receive+0x2c4>)
8014d46: 681b ldr r3, [r3, #0]
(pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
8014d48: 429a cmp r2, r3
8014d4a: d125 bne.n 8014d98 <tcp_receive+0xd4>
(pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
8014d4c: 4b8f ldr r3, [pc, #572] ; (8014f8c <tcp_receive+0x2c8>)
8014d4e: 681b ldr r3, [r3, #0]
8014d50: 89db ldrh r3, [r3, #14]
8014d52: b29a uxth r2, r3
8014d54: 687b ldr r3, [r7, #4]
8014d56: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8014d5a: 429a cmp r2, r3
8014d5c: d91c bls.n 8014d98 <tcp_receive+0xd4>
pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd);
8014d5e: 4b8b ldr r3, [pc, #556] ; (8014f8c <tcp_receive+0x2c8>)
8014d60: 681b ldr r3, [r3, #0]
8014d62: 89db ldrh r3, [r3, #14]
8014d64: b29a uxth r2, r3
8014d66: 687b ldr r3, [r7, #4]
8014d68: 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) {
8014d6c: 687b ldr r3, [r7, #4]
8014d6e: f8b3 2062 ldrh.w r2, [r3, #98] ; 0x62
8014d72: 687b ldr r3, [r7, #4]
8014d74: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8014d78: 429a cmp r2, r3
8014d7a: d205 bcs.n 8014d88 <tcp_receive+0xc4>
pcb->snd_wnd_max = pcb->snd_wnd;
8014d7c: 687b ldr r3, [r7, #4]
8014d7e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
8014d82: 687b ldr r3, [r7, #4]
8014d84: f8a3 2062 strh.w r2, [r3, #98] ; 0x62
}
pcb->snd_wl1 = seqno;
8014d88: 4b7e ldr r3, [pc, #504] ; (8014f84 <tcp_receive+0x2c0>)
8014d8a: 681a ldr r2, [r3, #0]
8014d8c: 687b ldr r3, [r7, #4]
8014d8e: 655a str r2, [r3, #84] ; 0x54
pcb->snd_wl2 = ackno;
8014d90: 4b7d ldr r3, [pc, #500] ; (8014f88 <tcp_receive+0x2c4>)
8014d92: 681a ldr r2, [r3, #0]
8014d94: 687b ldr r3, [r7, #4]
8014d96: 659a str r2, [r3, #88] ; 0x58
* If it only passes 1, should reset dupack counter
*
*/
/* Clause 1 */
if (TCP_SEQ_LEQ(ackno, pcb->lastack)) {
8014d98: 4b7b ldr r3, [pc, #492] ; (8014f88 <tcp_receive+0x2c4>)
8014d9a: 681a ldr r2, [r3, #0]
8014d9c: 687b ldr r3, [r7, #4]
8014d9e: 6c5b ldr r3, [r3, #68] ; 0x44
8014da0: 1ad3 subs r3, r2, r3
8014da2: 2b00 cmp r3, #0
8014da4: dc58 bgt.n 8014e58 <tcp_receive+0x194>
/* Clause 2 */
if (tcplen == 0) {
8014da6: 4b7a ldr r3, [pc, #488] ; (8014f90 <tcp_receive+0x2cc>)
8014da8: 881b ldrh r3, [r3, #0]
8014daa: 2b00 cmp r3, #0
8014dac: d14b bne.n 8014e46 <tcp_receive+0x182>
/* Clause 3 */
if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) {
8014dae: 687b ldr r3, [r7, #4]
8014db0: 6d9b ldr r3, [r3, #88] ; 0x58
8014db2: 687a ldr r2, [r7, #4]
8014db4: f8b2 2060 ldrh.w r2, [r2, #96] ; 0x60
8014db8: 4413 add r3, r2
8014dba: 6b3a ldr r2, [r7, #48] ; 0x30
8014dbc: 429a cmp r2, r3
8014dbe: d142 bne.n 8014e46 <tcp_receive+0x182>
/* Clause 4 */
if (pcb->rtime >= 0) {
8014dc0: 687b ldr r3, [r7, #4]
8014dc2: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
8014dc6: 2b00 cmp r3, #0
8014dc8: db3d blt.n 8014e46 <tcp_receive+0x182>
/* Clause 5 */
if (pcb->lastack == ackno) {
8014dca: 687b ldr r3, [r7, #4]
8014dcc: 6c5a ldr r2, [r3, #68] ; 0x44
8014dce: 4b6e ldr r3, [pc, #440] ; (8014f88 <tcp_receive+0x2c4>)
8014dd0: 681b ldr r3, [r3, #0]
8014dd2: 429a cmp r2, r3
8014dd4: d137 bne.n 8014e46 <tcp_receive+0x182>
found_dupack = 1;
8014dd6: 2301 movs r3, #1
8014dd8: 64bb str r3, [r7, #72] ; 0x48
if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) {
8014dda: 687b ldr r3, [r7, #4]
8014ddc: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8014de0: 2bff cmp r3, #255 ; 0xff
8014de2: d007 beq.n 8014df4 <tcp_receive+0x130>
++pcb->dupacks;
8014de4: 687b ldr r3, [r7, #4]
8014de6: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8014dea: 3301 adds r3, #1
8014dec: b2da uxtb r2, r3
8014dee: 687b ldr r3, [r7, #4]
8014df0: f883 2043 strb.w r2, [r3, #67] ; 0x43
}
if (pcb->dupacks > 3) {
8014df4: 687b ldr r3, [r7, #4]
8014df6: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8014dfa: 2b03 cmp r3, #3
8014dfc: d91b bls.n 8014e36 <tcp_receive+0x172>
/* Inflate the congestion window */
TCP_WND_INC(pcb->cwnd, pcb->mss);
8014dfe: 687b ldr r3, [r7, #4]
8014e00: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8014e04: 687b ldr r3, [r7, #4]
8014e06: 8e5b ldrh r3, [r3, #50] ; 0x32
8014e08: 4413 add r3, r2
8014e0a: b29a uxth r2, r3
8014e0c: 687b ldr r3, [r7, #4]
8014e0e: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8014e12: 429a cmp r2, r3
8014e14: d30a bcc.n 8014e2c <tcp_receive+0x168>
8014e16: 687b ldr r3, [r7, #4]
8014e18: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8014e1c: 687b ldr r3, [r7, #4]
8014e1e: 8e5b ldrh r3, [r3, #50] ; 0x32
8014e20: 4413 add r3, r2
8014e22: b29a uxth r2, r3
8014e24: 687b ldr r3, [r7, #4]
8014e26: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8014e2a: e004 b.n 8014e36 <tcp_receive+0x172>
8014e2c: 687b ldr r3, [r7, #4]
8014e2e: f64f 72ff movw r2, #65535 ; 0xffff
8014e32: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
}
if (pcb->dupacks >= 3) {
8014e36: 687b ldr r3, [r7, #4]
8014e38: f893 3043 ldrb.w r3, [r3, #67] ; 0x43
8014e3c: 2b02 cmp r3, #2
8014e3e: d902 bls.n 8014e46 <tcp_receive+0x182>
/* Do fast retransmit (checked via TF_INFR, not via dupacks count) */
tcp_rexmit_fast(pcb);
8014e40: 6878 ldr r0, [r7, #4]
8014e42: f001 feed bl 8016c20 <tcp_rexmit_fast>
}
}
}
/* If Clause (1) or more is true, but not a duplicate ack, reset
* count of consecutive duplicate acks */
if (!found_dupack) {
8014e46: 6cbb ldr r3, [r7, #72] ; 0x48
8014e48: 2b00 cmp r3, #0
8014e4a: f040 8160 bne.w 801510e <tcp_receive+0x44a>
pcb->dupacks = 0;
8014e4e: 687b ldr r3, [r7, #4]
8014e50: 2200 movs r2, #0
8014e52: f883 2043 strb.w r2, [r3, #67] ; 0x43
8014e56: e15a b.n 801510e <tcp_receive+0x44a>
}
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8014e58: 4b4b ldr r3, [pc, #300] ; (8014f88 <tcp_receive+0x2c4>)
8014e5a: 681a ldr r2, [r3, #0]
8014e5c: 687b ldr r3, [r7, #4]
8014e5e: 6c5b ldr r3, [r3, #68] ; 0x44
8014e60: 1ad3 subs r3, r2, r3
8014e62: 3b01 subs r3, #1
8014e64: 2b00 cmp r3, #0
8014e66: f2c0 814d blt.w 8015104 <tcp_receive+0x440>
8014e6a: 4b47 ldr r3, [pc, #284] ; (8014f88 <tcp_receive+0x2c4>)
8014e6c: 681a ldr r2, [r3, #0]
8014e6e: 687b ldr r3, [r7, #4]
8014e70: 6d1b ldr r3, [r3, #80] ; 0x50
8014e72: 1ad3 subs r3, r2, r3
8014e74: 2b00 cmp r3, #0
8014e76: f300 8145 bgt.w 8015104 <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) {
8014e7a: 687b ldr r3, [r7, #4]
8014e7c: 8b5b ldrh r3, [r3, #26]
8014e7e: f003 0304 and.w r3, r3, #4
8014e82: 2b00 cmp r3, #0
8014e84: d010 beq.n 8014ea8 <tcp_receive+0x1e4>
tcp_clear_flags(pcb, TF_INFR);
8014e86: 687b ldr r3, [r7, #4]
8014e88: 8b5b ldrh r3, [r3, #26]
8014e8a: f023 0304 bic.w r3, r3, #4
8014e8e: b29a uxth r2, r3
8014e90: 687b ldr r3, [r7, #4]
8014e92: 835a strh r2, [r3, #26]
pcb->cwnd = pcb->ssthresh;
8014e94: 687b ldr r3, [r7, #4]
8014e96: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
8014e9a: 687b ldr r3, [r7, #4]
8014e9c: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
pcb->bytes_acked = 0;
8014ea0: 687b ldr r3, [r7, #4]
8014ea2: 2200 movs r2, #0
8014ea4: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
}
/* Reset the number of retransmissions. */
pcb->nrtx = 0;
8014ea8: 687b ldr r3, [r7, #4]
8014eaa: 2200 movs r2, #0
8014eac: f883 2042 strb.w r2, [r3, #66] ; 0x42
/* Reset the retransmission time-out. */
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
8014eb0: 687b ldr r3, [r7, #4]
8014eb2: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8014eb6: 10db asrs r3, r3, #3
8014eb8: b21b sxth r3, r3
8014eba: b29a uxth r2, r3
8014ebc: 687b ldr r3, [r7, #4]
8014ebe: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8014ec2: b29b uxth r3, r3
8014ec4: 4413 add r3, r2
8014ec6: b29b uxth r3, r3
8014ec8: b21a sxth r2, r3
8014eca: 687b ldr r3, [r7, #4]
8014ecc: f8a3 2040 strh.w r2, [r3, #64] ; 0x40
/* Record how much data this ACK acks */
acked = (tcpwnd_size_t)(ackno - pcb->lastack);
8014ed0: 4b2d ldr r3, [pc, #180] ; (8014f88 <tcp_receive+0x2c4>)
8014ed2: 681b ldr r3, [r3, #0]
8014ed4: b29a uxth r2, r3
8014ed6: 687b ldr r3, [r7, #4]
8014ed8: 6c5b ldr r3, [r3, #68] ; 0x44
8014eda: b29b uxth r3, r3
8014edc: 1ad3 subs r3, r2, r3
8014ede: 85fb strh r3, [r7, #46] ; 0x2e
/* Reset the fast retransmit variables. */
pcb->dupacks = 0;
8014ee0: 687b ldr r3, [r7, #4]
8014ee2: 2200 movs r2, #0
8014ee4: f883 2043 strb.w r2, [r3, #67] ; 0x43
pcb->lastack = ackno;
8014ee8: 4b27 ldr r3, [pc, #156] ; (8014f88 <tcp_receive+0x2c4>)
8014eea: 681a ldr r2, [r3, #0]
8014eec: 687b ldr r3, [r7, #4]
8014eee: 645a str r2, [r3, #68] ; 0x44
/* Update the congestion control variables (cwnd and
ssthresh). */
if (pcb->state >= ESTABLISHED) {
8014ef0: 687b ldr r3, [r7, #4]
8014ef2: 7d1b ldrb r3, [r3, #20]
8014ef4: 2b03 cmp r3, #3
8014ef6: f240 8096 bls.w 8015026 <tcp_receive+0x362>
if (pcb->cwnd < pcb->ssthresh) {
8014efa: 687b ldr r3, [r7, #4]
8014efc: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8014f00: 687b ldr r3, [r7, #4]
8014f02: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
8014f06: 429a cmp r2, r3
8014f08: d244 bcs.n 8014f94 <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;
8014f0a: 687b ldr r3, [r7, #4]
8014f0c: 8b5b ldrh r3, [r3, #26]
8014f0e: f403 6300 and.w r3, r3, #2048 ; 0x800
8014f12: 2b00 cmp r3, #0
8014f14: d001 beq.n 8014f1a <tcp_receive+0x256>
8014f16: 2301 movs r3, #1
8014f18: e000 b.n 8014f1c <tcp_receive+0x258>
8014f1a: 2302 movs r3, #2
8014f1c: 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));
8014f20: f897 302d ldrb.w r3, [r7, #45] ; 0x2d
8014f24: b29a uxth r2, r3
8014f26: 687b ldr r3, [r7, #4]
8014f28: 8e5b ldrh r3, [r3, #50] ; 0x32
8014f2a: fb12 f303 smulbb r3, r2, r3
8014f2e: b29b uxth r3, r3
8014f30: 8dfa ldrh r2, [r7, #46] ; 0x2e
8014f32: 4293 cmp r3, r2
8014f34: bf28 it cs
8014f36: 4613 movcs r3, r2
8014f38: 857b strh r3, [r7, #42] ; 0x2a
TCP_WND_INC(pcb->cwnd, increase);
8014f3a: 687b ldr r3, [r7, #4]
8014f3c: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8014f40: 8d7b ldrh r3, [r7, #42] ; 0x2a
8014f42: 4413 add r3, r2
8014f44: b29a uxth r2, r3
8014f46: 687b ldr r3, [r7, #4]
8014f48: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8014f4c: 429a cmp r2, r3
8014f4e: d309 bcc.n 8014f64 <tcp_receive+0x2a0>
8014f50: 687b ldr r3, [r7, #4]
8014f52: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8014f56: 8d7b ldrh r3, [r7, #42] ; 0x2a
8014f58: 4413 add r3, r2
8014f5a: b29a uxth r2, r3
8014f5c: 687b ldr r3, [r7, #4]
8014f5e: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8014f62: e060 b.n 8015026 <tcp_receive+0x362>
8014f64: 687b ldr r3, [r7, #4]
8014f66: f64f 72ff movw r2, #65535 ; 0xffff
8014f6a: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
8014f6e: e05a b.n 8015026 <tcp_receive+0x362>
8014f70: 0801eb30 .word 0x0801eb30
8014f74: 0801ee60 .word 0x0801ee60
8014f78: 0801eb7c .word 0x0801eb7c
8014f7c: 0801ee7c .word 0x0801ee7c
8014f80: 20008744 .word 0x20008744
8014f84: 20008738 .word 0x20008738
8014f88: 2000873c .word 0x2000873c
8014f8c: 20008728 .word 0x20008728
8014f90: 20008742 .word 0x20008742
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);
8014f94: 687b ldr r3, [r7, #4]
8014f96: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8014f9a: 8dfb ldrh r3, [r7, #46] ; 0x2e
8014f9c: 4413 add r3, r2
8014f9e: b29a uxth r2, r3
8014fa0: 687b ldr r3, [r7, #4]
8014fa2: f8b3 306a ldrh.w r3, [r3, #106] ; 0x6a
8014fa6: 429a cmp r2, r3
8014fa8: d309 bcc.n 8014fbe <tcp_receive+0x2fa>
8014faa: 687b ldr r3, [r7, #4]
8014fac: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8014fb0: 8dfb ldrh r3, [r7, #46] ; 0x2e
8014fb2: 4413 add r3, r2
8014fb4: b29a uxth r2, r3
8014fb6: 687b ldr r3, [r7, #4]
8014fb8: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
8014fbc: e004 b.n 8014fc8 <tcp_receive+0x304>
8014fbe: 687b ldr r3, [r7, #4]
8014fc0: f64f 72ff movw r2, #65535 ; 0xffff
8014fc4: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
if (pcb->bytes_acked >= pcb->cwnd) {
8014fc8: 687b ldr r3, [r7, #4]
8014fca: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8014fce: 687b ldr r3, [r7, #4]
8014fd0: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8014fd4: 429a cmp r2, r3
8014fd6: d326 bcc.n 8015026 <tcp_receive+0x362>
pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd);
8014fd8: 687b ldr r3, [r7, #4]
8014fda: f8b3 206a ldrh.w r2, [r3, #106] ; 0x6a
8014fde: 687b ldr r3, [r7, #4]
8014fe0: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8014fe4: 1ad3 subs r3, r2, r3
8014fe6: b29a uxth r2, r3
8014fe8: 687b ldr r3, [r7, #4]
8014fea: f8a3 206a strh.w r2, [r3, #106] ; 0x6a
TCP_WND_INC(pcb->cwnd, pcb->mss);
8014fee: 687b ldr r3, [r7, #4]
8014ff0: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8014ff4: 687b ldr r3, [r7, #4]
8014ff6: 8e5b ldrh r3, [r3, #50] ; 0x32
8014ff8: 4413 add r3, r2
8014ffa: b29a uxth r2, r3
8014ffc: 687b ldr r3, [r7, #4]
8014ffe: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8015002: 429a cmp r2, r3
8015004: d30a bcc.n 801501c <tcp_receive+0x358>
8015006: 687b ldr r3, [r7, #4]
8015008: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
801500c: 687b ldr r3, [r7, #4]
801500e: 8e5b ldrh r3, [r3, #50] ; 0x32
8015010: 4413 add r3, r2
8015012: b29a uxth r2, r3
8015014: 687b ldr r3, [r7, #4]
8015016: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
801501a: e004 b.n 8015026 <tcp_receive+0x362>
801501c: 687b ldr r3, [r7, #4]
801501e: f64f 72ff movw r2, #65535 ; 0xffff
8015022: 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);
8015026: 687b ldr r3, [r7, #4]
8015028: 6f19 ldr r1, [r3, #112] ; 0x70
801502a: 687b ldr r3, [r7, #4]
801502c: 6edb ldr r3, [r3, #108] ; 0x6c
801502e: 4a98 ldr r2, [pc, #608] ; (8015290 <tcp_receive+0x5cc>)
8015030: 6878 ldr r0, [r7, #4]
8015032: f7ff fdcb bl 8014bcc <tcp_free_acked_segments>
8015036: 4602 mov r2, r0
8015038: 687b ldr r3, [r7, #4]
801503a: 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);
801503c: 687b ldr r3, [r7, #4]
801503e: 6ed9 ldr r1, [r3, #108] ; 0x6c
8015040: 687b ldr r3, [r7, #4]
8015042: 6f1b ldr r3, [r3, #112] ; 0x70
8015044: 4a93 ldr r2, [pc, #588] ; (8015294 <tcp_receive+0x5d0>)
8015046: 6878 ldr r0, [r7, #4]
8015048: f7ff fdc0 bl 8014bcc <tcp_free_acked_segments>
801504c: 4602 mov r2, r0
801504e: 687b ldr r3, [r7, #4]
8015050: 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) {
8015052: 687b ldr r3, [r7, #4]
8015054: 6f1b ldr r3, [r3, #112] ; 0x70
8015056: 2b00 cmp r3, #0
8015058: d104 bne.n 8015064 <tcp_receive+0x3a0>
pcb->rtime = -1;
801505a: 687b ldr r3, [r7, #4]
801505c: f64f 72ff movw r2, #65535 ; 0xffff
8015060: 861a strh r2, [r3, #48] ; 0x30
8015062: e002 b.n 801506a <tcp_receive+0x3a6>
} else {
pcb->rtime = 0;
8015064: 687b ldr r3, [r7, #4]
8015066: 2200 movs r2, #0
8015068: 861a strh r2, [r3, #48] ; 0x30
}
pcb->polltmr = 0;
801506a: 687b ldr r3, [r7, #4]
801506c: 2200 movs r2, #0
801506e: 771a strb r2, [r3, #28]
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
8015070: 687b ldr r3, [r7, #4]
8015072: 6edb ldr r3, [r3, #108] ; 0x6c
8015074: 2b00 cmp r3, #0
8015076: d103 bne.n 8015080 <tcp_receive+0x3bc>
pcb->unsent_oversize = 0;
8015078: 687b ldr r3, [r7, #4]
801507a: 2200 movs r2, #0
801507c: 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);
8015080: 687b ldr r3, [r7, #4]
8015082: f8b3 2064 ldrh.w r2, [r3, #100] ; 0x64
8015086: 4b84 ldr r3, [pc, #528] ; (8015298 <tcp_receive+0x5d4>)
8015088: 881b ldrh r3, [r3, #0]
801508a: 4413 add r3, r2
801508c: b29a uxth r2, r3
801508e: 687b ldr r3, [r7, #4]
8015090: f8a3 2064 strh.w r2, [r3, #100] ; 0x64
/* check if this ACK ends our retransmission of in-flight data */
if (pcb->flags & TF_RTO) {
8015094: 687b ldr r3, [r7, #4]
8015096: 8b5b ldrh r3, [r3, #26]
8015098: f403 6300 and.w r3, r3, #2048 ; 0x800
801509c: 2b00 cmp r3, #0
801509e: d035 beq.n 801510c <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) {
80150a0: 687b ldr r3, [r7, #4]
80150a2: 6f1b ldr r3, [r3, #112] ; 0x70
80150a4: 2b00 cmp r3, #0
80150a6: d118 bne.n 80150da <tcp_receive+0x416>
if ((pcb->unsent == NULL) ||
80150a8: 687b ldr r3, [r7, #4]
80150aa: 6edb ldr r3, [r3, #108] ; 0x6c
80150ac: 2b00 cmp r3, #0
80150ae: d00c beq.n 80150ca <tcp_receive+0x406>
(TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) {
80150b0: 687b ldr r3, [r7, #4]
80150b2: 6cdc ldr r4, [r3, #76] ; 0x4c
80150b4: 687b ldr r3, [r7, #4]
80150b6: 6edb ldr r3, [r3, #108] ; 0x6c
80150b8: 68db ldr r3, [r3, #12]
80150ba: 685b ldr r3, [r3, #4]
80150bc: 4618 mov r0, r3
80150be: f7fb f974 bl 80103aa <lwip_htonl>
80150c2: 4603 mov r3, r0
80150c4: 1ae3 subs r3, r4, r3
if ((pcb->unsent == NULL) ||
80150c6: 2b00 cmp r3, #0
80150c8: dc20 bgt.n 801510c <tcp_receive+0x448>
tcp_clear_flags(pcb, TF_RTO);
80150ca: 687b ldr r3, [r7, #4]
80150cc: 8b5b ldrh r3, [r3, #26]
80150ce: f423 6300 bic.w r3, r3, #2048 ; 0x800
80150d2: b29a uxth r2, r3
80150d4: 687b ldr r3, [r7, #4]
80150d6: 835a strh r2, [r3, #26]
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
80150d8: e018 b.n 801510c <tcp_receive+0x448>
}
} else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) {
80150da: 687b ldr r3, [r7, #4]
80150dc: 6cdc ldr r4, [r3, #76] ; 0x4c
80150de: 687b ldr r3, [r7, #4]
80150e0: 6f1b ldr r3, [r3, #112] ; 0x70
80150e2: 68db ldr r3, [r3, #12]
80150e4: 685b ldr r3, [r3, #4]
80150e6: 4618 mov r0, r3
80150e8: f7fb f95f bl 80103aa <lwip_htonl>
80150ec: 4603 mov r3, r0
80150ee: 1ae3 subs r3, r4, r3
80150f0: 2b00 cmp r3, #0
80150f2: dc0b bgt.n 801510c <tcp_receive+0x448>
tcp_clear_flags(pcb, TF_RTO);
80150f4: 687b ldr r3, [r7, #4]
80150f6: 8b5b ldrh r3, [r3, #26]
80150f8: f423 6300 bic.w r3, r3, #2048 ; 0x800
80150fc: b29a uxth r2, r3
80150fe: 687b ldr r3, [r7, #4]
8015100: 835a strh r2, [r3, #26]
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
8015102: e003 b.n 801510c <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);
8015104: 6878 ldr r0, [r7, #4]
8015106: f001 ff85 bl 8017014 <tcp_send_empty_ack>
801510a: e000 b.n 801510e <tcp_receive+0x44a>
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
801510c: 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)) {
801510e: 687b ldr r3, [r7, #4]
8015110: 6b5b ldr r3, [r3, #52] ; 0x34
8015112: 2b00 cmp r3, #0
8015114: d05b beq.n 80151ce <tcp_receive+0x50a>
8015116: 687b ldr r3, [r7, #4]
8015118: 6b9a ldr r2, [r3, #56] ; 0x38
801511a: 4b60 ldr r3, [pc, #384] ; (801529c <tcp_receive+0x5d8>)
801511c: 681b ldr r3, [r3, #0]
801511e: 1ad3 subs r3, r2, r3
8015120: 2b00 cmp r3, #0
8015122: da54 bge.n 80151ce <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);
8015124: 4b5e ldr r3, [pc, #376] ; (80152a0 <tcp_receive+0x5dc>)
8015126: 681b ldr r3, [r3, #0]
8015128: b29a uxth r2, r3
801512a: 687b ldr r3, [r7, #4]
801512c: 6b5b ldr r3, [r3, #52] ; 0x34
801512e: b29b uxth r3, r3
8015130: 1ad3 subs r3, r2, r3
8015132: b29b uxth r3, r3
8015134: 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));
8015138: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
801513c: 687b ldr r3, [r7, #4]
801513e: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8015142: 10db asrs r3, r3, #3
8015144: b21b sxth r3, r3
8015146: b29b uxth r3, r3
8015148: 1ad3 subs r3, r2, r3
801514a: b29b uxth r3, r3
801514c: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
pcb->sa = (s16_t)(pcb->sa + m);
8015150: 687b ldr r3, [r7, #4]
8015152: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
8015156: b29a uxth r2, r3
8015158: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
801515c: 4413 add r3, r2
801515e: b29b uxth r3, r3
8015160: b21a sxth r2, r3
8015162: 687b ldr r3, [r7, #4]
8015164: 879a strh r2, [r3, #60] ; 0x3c
if (m < 0) {
8015166: f9b7 304e ldrsh.w r3, [r7, #78] ; 0x4e
801516a: 2b00 cmp r3, #0
801516c: da05 bge.n 801517a <tcp_receive+0x4b6>
m = (s16_t) - m;
801516e: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
8015172: 425b negs r3, r3
8015174: b29b uxth r3, r3
8015176: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
}
m = (s16_t)(m - (pcb->sv >> 2));
801517a: f8b7 204e ldrh.w r2, [r7, #78] ; 0x4e
801517e: 687b ldr r3, [r7, #4]
8015180: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8015184: 109b asrs r3, r3, #2
8015186: b21b sxth r3, r3
8015188: b29b uxth r3, r3
801518a: 1ad3 subs r3, r2, r3
801518c: b29b uxth r3, r3
801518e: f8a7 304e strh.w r3, [r7, #78] ; 0x4e
pcb->sv = (s16_t)(pcb->sv + m);
8015192: 687b ldr r3, [r7, #4]
8015194: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
8015198: b29a uxth r2, r3
801519a: f8b7 304e ldrh.w r3, [r7, #78] ; 0x4e
801519e: 4413 add r3, r2
80151a0: b29b uxth r3, r3
80151a2: b21a sxth r2, r3
80151a4: 687b ldr r3, [r7, #4]
80151a6: 87da strh r2, [r3, #62] ; 0x3e
pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
80151a8: 687b ldr r3, [r7, #4]
80151aa: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c
80151ae: 10db asrs r3, r3, #3
80151b0: b21b sxth r3, r3
80151b2: b29a uxth r2, r3
80151b4: 687b ldr r3, [r7, #4]
80151b6: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e
80151ba: b29b uxth r3, r3
80151bc: 4413 add r3, r2
80151be: b29b uxth r3, r3
80151c0: b21a sxth r2, r3
80151c2: 687b ldr r3, [r7, #4]
80151c4: 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;
80151c8: 687b ldr r3, [r7, #4]
80151ca: 2200 movs r2, #0
80151cc: 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)) {
80151ce: 4b35 ldr r3, [pc, #212] ; (80152a4 <tcp_receive+0x5e0>)
80151d0: 881b ldrh r3, [r3, #0]
80151d2: 2b00 cmp r3, #0
80151d4: f000 84e1 beq.w 8015b9a <tcp_receive+0xed6>
80151d8: 687b ldr r3, [r7, #4]
80151da: 7d1b ldrb r3, [r3, #20]
80151dc: 2b06 cmp r3, #6
80151de: f200 84dc bhi.w 8015b9a <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)) {
80151e2: 687b ldr r3, [r7, #4]
80151e4: 6a5a ldr r2, [r3, #36] ; 0x24
80151e6: 4b30 ldr r3, [pc, #192] ; (80152a8 <tcp_receive+0x5e4>)
80151e8: 681b ldr r3, [r3, #0]
80151ea: 1ad3 subs r3, r2, r3
80151ec: 3b01 subs r3, #1
80151ee: 2b00 cmp r3, #0
80151f0: f2c0 808e blt.w 8015310 <tcp_receive+0x64c>
80151f4: 687b ldr r3, [r7, #4]
80151f6: 6a5a ldr r2, [r3, #36] ; 0x24
80151f8: 4b2a ldr r3, [pc, #168] ; (80152a4 <tcp_receive+0x5e0>)
80151fa: 881b ldrh r3, [r3, #0]
80151fc: 4619 mov r1, r3
80151fe: 4b2a ldr r3, [pc, #168] ; (80152a8 <tcp_receive+0x5e4>)
8015200: 681b ldr r3, [r3, #0]
8015202: 440b add r3, r1
8015204: 1ad3 subs r3, r2, r3
8015206: 3301 adds r3, #1
8015208: 2b00 cmp r3, #0
801520a: f300 8081 bgt.w 8015310 <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;
801520e: 4b27 ldr r3, [pc, #156] ; (80152ac <tcp_receive+0x5e8>)
8015210: 685b ldr r3, [r3, #4]
8015212: 647b str r3, [r7, #68] ; 0x44
u32_t off32 = pcb->rcv_nxt - seqno;
8015214: 687b ldr r3, [r7, #4]
8015216: 6a5a ldr r2, [r3, #36] ; 0x24
8015218: 4b23 ldr r3, [pc, #140] ; (80152a8 <tcp_receive+0x5e4>)
801521a: 681b ldr r3, [r3, #0]
801521c: 1ad3 subs r3, r2, r3
801521e: 627b str r3, [r7, #36] ; 0x24
u16_t new_tot_len, off;
LWIP_ASSERT("inseg.p != NULL", inseg.p);
8015220: 4b22 ldr r3, [pc, #136] ; (80152ac <tcp_receive+0x5e8>)
8015222: 685b ldr r3, [r3, #4]
8015224: 2b00 cmp r3, #0
8015226: d106 bne.n 8015236 <tcp_receive+0x572>
8015228: 4b21 ldr r3, [pc, #132] ; (80152b0 <tcp_receive+0x5ec>)
801522a: f240 5294 movw r2, #1428 ; 0x594
801522e: 4921 ldr r1, [pc, #132] ; (80152b4 <tcp_receive+0x5f0>)
8015230: 4821 ldr r0, [pc, #132] ; (80152b8 <tcp_receive+0x5f4>)
8015232: f007 f989 bl 801c548 <iprintf>
LWIP_ASSERT("insane offset!", (off32 < 0xffff));
8015236: 6a7b ldr r3, [r7, #36] ; 0x24
8015238: f64f 72fe movw r2, #65534 ; 0xfffe
801523c: 4293 cmp r3, r2
801523e: d906 bls.n 801524e <tcp_receive+0x58a>
8015240: 4b1b ldr r3, [pc, #108] ; (80152b0 <tcp_receive+0x5ec>)
8015242: f240 5295 movw r2, #1429 ; 0x595
8015246: 491d ldr r1, [pc, #116] ; (80152bc <tcp_receive+0x5f8>)
8015248: 481b ldr r0, [pc, #108] ; (80152b8 <tcp_receive+0x5f4>)
801524a: f007 f97d bl 801c548 <iprintf>
off = (u16_t)off32;
801524e: 6a7b ldr r3, [r7, #36] ; 0x24
8015250: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
8015254: 4b15 ldr r3, [pc, #84] ; (80152ac <tcp_receive+0x5e8>)
8015256: 685b ldr r3, [r3, #4]
8015258: 891b ldrh r3, [r3, #8]
801525a: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
801525e: 429a cmp r2, r3
8015260: d906 bls.n 8015270 <tcp_receive+0x5ac>
8015262: 4b13 ldr r3, [pc, #76] ; (80152b0 <tcp_receive+0x5ec>)
8015264: f240 5297 movw r2, #1431 ; 0x597
8015268: 4915 ldr r1, [pc, #84] ; (80152c0 <tcp_receive+0x5fc>)
801526a: 4813 ldr r0, [pc, #76] ; (80152b8 <tcp_receive+0x5f4>)
801526c: f007 f96c bl 801c548 <iprintf>
inseg.len -= off;
8015270: 4b0e ldr r3, [pc, #56] ; (80152ac <tcp_receive+0x5e8>)
8015272: 891a ldrh r2, [r3, #8]
8015274: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
8015278: 1ad3 subs r3, r2, r3
801527a: b29a uxth r2, r3
801527c: 4b0b ldr r3, [pc, #44] ; (80152ac <tcp_receive+0x5e8>)
801527e: 811a strh r2, [r3, #8]
new_tot_len = (u16_t)(inseg.p->tot_len - off);
8015280: 4b0a ldr r3, [pc, #40] ; (80152ac <tcp_receive+0x5e8>)
8015282: 685b ldr r3, [r3, #4]
8015284: 891a ldrh r2, [r3, #8]
8015286: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
801528a: 1ad3 subs r3, r2, r3
801528c: 847b strh r3, [r7, #34] ; 0x22
while (p->len < off) {
801528e: e029 b.n 80152e4 <tcp_receive+0x620>
8015290: 0801ee98 .word 0x0801ee98
8015294: 0801eea0 .word 0x0801eea0
8015298: 20008740 .word 0x20008740
801529c: 2000873c .word 0x2000873c
80152a0: 2000f7ec .word 0x2000f7ec
80152a4: 20008742 .word 0x20008742
80152a8: 20008738 .word 0x20008738
80152ac: 20008718 .word 0x20008718
80152b0: 0801eb30 .word 0x0801eb30
80152b4: 0801eea8 .word 0x0801eea8
80152b8: 0801eb7c .word 0x0801eb7c
80152bc: 0801eeb8 .word 0x0801eeb8
80152c0: 0801eec8 .word 0x0801eec8
off -= p->len;
80152c4: 6c7b ldr r3, [r7, #68] ; 0x44
80152c6: 895b ldrh r3, [r3, #10]
80152c8: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
80152cc: 1ad3 subs r3, r2, r3
80152ce: 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;
80152d2: 6c7b ldr r3, [r7, #68] ; 0x44
80152d4: 8c7a ldrh r2, [r7, #34] ; 0x22
80152d6: 811a strh r2, [r3, #8]
p->len = 0;
80152d8: 6c7b ldr r3, [r7, #68] ; 0x44
80152da: 2200 movs r2, #0
80152dc: 815a strh r2, [r3, #10]
p = p->next;
80152de: 6c7b ldr r3, [r7, #68] ; 0x44
80152e0: 681b ldr r3, [r3, #0]
80152e2: 647b str r3, [r7, #68] ; 0x44
while (p->len < off) {
80152e4: 6c7b ldr r3, [r7, #68] ; 0x44
80152e6: 895b ldrh r3, [r3, #10]
80152e8: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
80152ec: 429a cmp r2, r3
80152ee: d8e9 bhi.n 80152c4 <tcp_receive+0x600>
}
/* cannot fail... */
pbuf_remove_header(p, off);
80152f0: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
80152f4: 4619 mov r1, r3
80152f6: 6c78 ldr r0, [r7, #68] ; 0x44
80152f8: f7fc fb70 bl 80119dc <pbuf_remove_header>
inseg.tcphdr->seqno = seqno = pcb->rcv_nxt;
80152fc: 687b ldr r3, [r7, #4]
80152fe: 6a5b ldr r3, [r3, #36] ; 0x24
8015300: 4a91 ldr r2, [pc, #580] ; (8015548 <tcp_receive+0x884>)
8015302: 6013 str r3, [r2, #0]
8015304: 4b91 ldr r3, [pc, #580] ; (801554c <tcp_receive+0x888>)
8015306: 68db ldr r3, [r3, #12]
8015308: 4a8f ldr r2, [pc, #572] ; (8015548 <tcp_receive+0x884>)
801530a: 6812 ldr r2, [r2, #0]
801530c: 605a str r2, [r3, #4]
if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
801530e: e00d b.n 801532c <tcp_receive+0x668>
} else {
if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
8015310: 4b8d ldr r3, [pc, #564] ; (8015548 <tcp_receive+0x884>)
8015312: 681a ldr r2, [r3, #0]
8015314: 687b ldr r3, [r7, #4]
8015316: 6a5b ldr r3, [r3, #36] ; 0x24
8015318: 1ad3 subs r3, r2, r3
801531a: 2b00 cmp r3, #0
801531c: da06 bge.n 801532c <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);
801531e: 687b ldr r3, [r7, #4]
8015320: 8b5b ldrh r3, [r3, #26]
8015322: f043 0302 orr.w r3, r3, #2
8015326: b29a uxth r2, r3
8015328: 687b ldr r3, [r7, #4]
801532a: 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,
801532c: 4b86 ldr r3, [pc, #536] ; (8015548 <tcp_receive+0x884>)
801532e: 681a ldr r2, [r3, #0]
8015330: 687b ldr r3, [r7, #4]
8015332: 6a5b ldr r3, [r3, #36] ; 0x24
8015334: 1ad3 subs r3, r2, r3
8015336: 2b00 cmp r3, #0
8015338: f2c0 842a blt.w 8015b90 <tcp_receive+0xecc>
801533c: 4b82 ldr r3, [pc, #520] ; (8015548 <tcp_receive+0x884>)
801533e: 681a ldr r2, [r3, #0]
8015340: 687b ldr r3, [r7, #4]
8015342: 6a5b ldr r3, [r3, #36] ; 0x24
8015344: 6879 ldr r1, [r7, #4]
8015346: 8d09 ldrh r1, [r1, #40] ; 0x28
8015348: 440b add r3, r1
801534a: 1ad3 subs r3, r2, r3
801534c: 3301 adds r3, #1
801534e: 2b00 cmp r3, #0
8015350: f300 841e bgt.w 8015b90 <tcp_receive+0xecc>
pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
if (pcb->rcv_nxt == seqno) {
8015354: 687b ldr r3, [r7, #4]
8015356: 6a5a ldr r2, [r3, #36] ; 0x24
8015358: 4b7b ldr r3, [pc, #492] ; (8015548 <tcp_receive+0x884>)
801535a: 681b ldr r3, [r3, #0]
801535c: 429a cmp r2, r3
801535e: f040 829a bne.w 8015896 <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);
8015362: 4b7a ldr r3, [pc, #488] ; (801554c <tcp_receive+0x888>)
8015364: 891c ldrh r4, [r3, #8]
8015366: 4b79 ldr r3, [pc, #484] ; (801554c <tcp_receive+0x888>)
8015368: 68db ldr r3, [r3, #12]
801536a: 899b ldrh r3, [r3, #12]
801536c: b29b uxth r3, r3
801536e: 4618 mov r0, r3
8015370: f7fb f806 bl 8010380 <lwip_htons>
8015374: 4603 mov r3, r0
8015376: b2db uxtb r3, r3
8015378: f003 0303 and.w r3, r3, #3
801537c: 2b00 cmp r3, #0
801537e: d001 beq.n 8015384 <tcp_receive+0x6c0>
8015380: 2301 movs r3, #1
8015382: e000 b.n 8015386 <tcp_receive+0x6c2>
8015384: 2300 movs r3, #0
8015386: 4423 add r3, r4
8015388: b29a uxth r2, r3
801538a: 4b71 ldr r3, [pc, #452] ; (8015550 <tcp_receive+0x88c>)
801538c: 801a strh r2, [r3, #0]
if (tcplen > pcb->rcv_wnd) {
801538e: 687b ldr r3, [r7, #4]
8015390: 8d1a ldrh r2, [r3, #40] ; 0x28
8015392: 4b6f ldr r3, [pc, #444] ; (8015550 <tcp_receive+0x88c>)
8015394: 881b ldrh r3, [r3, #0]
8015396: 429a cmp r2, r3
8015398: d275 bcs.n 8015486 <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) {
801539a: 4b6c ldr r3, [pc, #432] ; (801554c <tcp_receive+0x888>)
801539c: 68db ldr r3, [r3, #12]
801539e: 899b ldrh r3, [r3, #12]
80153a0: b29b uxth r3, r3
80153a2: 4618 mov r0, r3
80153a4: f7fa ffec bl 8010380 <lwip_htons>
80153a8: 4603 mov r3, r0
80153aa: b2db uxtb r3, r3
80153ac: f003 0301 and.w r3, r3, #1
80153b0: 2b00 cmp r3, #0
80153b2: d01f beq.n 80153f4 <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);
80153b4: 4b65 ldr r3, [pc, #404] ; (801554c <tcp_receive+0x888>)
80153b6: 68db ldr r3, [r3, #12]
80153b8: 899b ldrh r3, [r3, #12]
80153ba: b29b uxth r3, r3
80153bc: b21b sxth r3, r3
80153be: f423 537c bic.w r3, r3, #16128 ; 0x3f00
80153c2: b21c sxth r4, r3
80153c4: 4b61 ldr r3, [pc, #388] ; (801554c <tcp_receive+0x888>)
80153c6: 68db ldr r3, [r3, #12]
80153c8: 899b ldrh r3, [r3, #12]
80153ca: b29b uxth r3, r3
80153cc: 4618 mov r0, r3
80153ce: f7fa ffd7 bl 8010380 <lwip_htons>
80153d2: 4603 mov r3, r0
80153d4: b2db uxtb r3, r3
80153d6: b29b uxth r3, r3
80153d8: f003 033e and.w r3, r3, #62 ; 0x3e
80153dc: b29b uxth r3, r3
80153de: 4618 mov r0, r3
80153e0: f7fa ffce bl 8010380 <lwip_htons>
80153e4: 4603 mov r3, r0
80153e6: b21b sxth r3, r3
80153e8: 4323 orrs r3, r4
80153ea: b21a sxth r2, r3
80153ec: 4b57 ldr r3, [pc, #348] ; (801554c <tcp_receive+0x888>)
80153ee: 68db ldr r3, [r3, #12]
80153f0: b292 uxth r2, r2
80153f2: 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;
80153f4: 687b ldr r3, [r7, #4]
80153f6: 8d1a ldrh r2, [r3, #40] ; 0x28
80153f8: 4b54 ldr r3, [pc, #336] ; (801554c <tcp_receive+0x888>)
80153fa: 811a strh r2, [r3, #8]
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
80153fc: 4b53 ldr r3, [pc, #332] ; (801554c <tcp_receive+0x888>)
80153fe: 68db ldr r3, [r3, #12]
8015400: 899b ldrh r3, [r3, #12]
8015402: b29b uxth r3, r3
8015404: 4618 mov r0, r3
8015406: f7fa ffbb bl 8010380 <lwip_htons>
801540a: 4603 mov r3, r0
801540c: b2db uxtb r3, r3
801540e: f003 0302 and.w r3, r3, #2
8015412: 2b00 cmp r3, #0
8015414: d005 beq.n 8015422 <tcp_receive+0x75e>
inseg.len -= 1;
8015416: 4b4d ldr r3, [pc, #308] ; (801554c <tcp_receive+0x888>)
8015418: 891b ldrh r3, [r3, #8]
801541a: 3b01 subs r3, #1
801541c: b29a uxth r2, r3
801541e: 4b4b ldr r3, [pc, #300] ; (801554c <tcp_receive+0x888>)
8015420: 811a strh r2, [r3, #8]
}
pbuf_realloc(inseg.p, inseg.len);
8015422: 4b4a ldr r3, [pc, #296] ; (801554c <tcp_receive+0x888>)
8015424: 685a ldr r2, [r3, #4]
8015426: 4b49 ldr r3, [pc, #292] ; (801554c <tcp_receive+0x888>)
8015428: 891b ldrh r3, [r3, #8]
801542a: 4619 mov r1, r3
801542c: 4610 mov r0, r2
801542e: f7fc f9d5 bl 80117dc <pbuf_realloc>
tcplen = TCP_TCPLEN(&inseg);
8015432: 4b46 ldr r3, [pc, #280] ; (801554c <tcp_receive+0x888>)
8015434: 891c ldrh r4, [r3, #8]
8015436: 4b45 ldr r3, [pc, #276] ; (801554c <tcp_receive+0x888>)
8015438: 68db ldr r3, [r3, #12]
801543a: 899b ldrh r3, [r3, #12]
801543c: b29b uxth r3, r3
801543e: 4618 mov r0, r3
8015440: f7fa ff9e bl 8010380 <lwip_htons>
8015444: 4603 mov r3, r0
8015446: b2db uxtb r3, r3
8015448: f003 0303 and.w r3, r3, #3
801544c: 2b00 cmp r3, #0
801544e: d001 beq.n 8015454 <tcp_receive+0x790>
8015450: 2301 movs r3, #1
8015452: e000 b.n 8015456 <tcp_receive+0x792>
8015454: 2300 movs r3, #0
8015456: 4423 add r3, r4
8015458: b29a uxth r2, r3
801545a: 4b3d ldr r3, [pc, #244] ; (8015550 <tcp_receive+0x88c>)
801545c: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
801545e: 4b3c ldr r3, [pc, #240] ; (8015550 <tcp_receive+0x88c>)
8015460: 881b ldrh r3, [r3, #0]
8015462: 461a mov r2, r3
8015464: 4b38 ldr r3, [pc, #224] ; (8015548 <tcp_receive+0x884>)
8015466: 681b ldr r3, [r3, #0]
8015468: 441a add r2, r3
801546a: 687b ldr r3, [r7, #4]
801546c: 6a5b ldr r3, [r3, #36] ; 0x24
801546e: 6879 ldr r1, [r7, #4]
8015470: 8d09 ldrh r1, [r1, #40] ; 0x28
8015472: 440b add r3, r1
8015474: 429a cmp r2, r3
8015476: d006 beq.n 8015486 <tcp_receive+0x7c2>
8015478: 4b36 ldr r3, [pc, #216] ; (8015554 <tcp_receive+0x890>)
801547a: f240 52cc movw r2, #1484 ; 0x5cc
801547e: 4936 ldr r1, [pc, #216] ; (8015558 <tcp_receive+0x894>)
8015480: 4836 ldr r0, [pc, #216] ; (801555c <tcp_receive+0x898>)
8015482: f007 f861 bl 801c548 <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) {
8015486: 687b ldr r3, [r7, #4]
8015488: 6f5b ldr r3, [r3, #116] ; 0x74
801548a: 2b00 cmp r3, #0
801548c: f000 80e7 beq.w 801565e <tcp_receive+0x99a>
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
8015490: 4b2e ldr r3, [pc, #184] ; (801554c <tcp_receive+0x888>)
8015492: 68db ldr r3, [r3, #12]
8015494: 899b ldrh r3, [r3, #12]
8015496: b29b uxth r3, r3
8015498: 4618 mov r0, r3
801549a: f7fa ff71 bl 8010380 <lwip_htons>
801549e: 4603 mov r3, r0
80154a0: b2db uxtb r3, r3
80154a2: f003 0301 and.w r3, r3, #1
80154a6: 2b00 cmp r3, #0
80154a8: d010 beq.n 80154cc <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) {
80154aa: e00a b.n 80154c2 <tcp_receive+0x7fe>
struct tcp_seg *old_ooseq = pcb->ooseq;
80154ac: 687b ldr r3, [r7, #4]
80154ae: 6f5b ldr r3, [r3, #116] ; 0x74
80154b0: 60fb str r3, [r7, #12]
pcb->ooseq = pcb->ooseq->next;
80154b2: 687b ldr r3, [r7, #4]
80154b4: 6f5b ldr r3, [r3, #116] ; 0x74
80154b6: 681a ldr r2, [r3, #0]
80154b8: 687b ldr r3, [r7, #4]
80154ba: 675a str r2, [r3, #116] ; 0x74
tcp_seg_free(old_ooseq);
80154bc: 68f8 ldr r0, [r7, #12]
80154be: f7fd fd97 bl 8012ff0 <tcp_seg_free>
while (pcb->ooseq != NULL) {
80154c2: 687b ldr r3, [r7, #4]
80154c4: 6f5b ldr r3, [r3, #116] ; 0x74
80154c6: 2b00 cmp r3, #0
80154c8: d1f0 bne.n 80154ac <tcp_receive+0x7e8>
80154ca: e0c8 b.n 801565e <tcp_receive+0x99a>
}
} else {
struct tcp_seg *next = pcb->ooseq;
80154cc: 687b ldr r3, [r7, #4]
80154ce: 6f5b ldr r3, [r3, #116] ; 0x74
80154d0: 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 &&
80154d2: e052 b.n 801557a <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 &&
80154d4: 6bfb ldr r3, [r7, #60] ; 0x3c
80154d6: 68db ldr r3, [r3, #12]
80154d8: 899b ldrh r3, [r3, #12]
80154da: b29b uxth r3, r3
80154dc: 4618 mov r0, r3
80154de: f7fa ff4f bl 8010380 <lwip_htons>
80154e2: 4603 mov r3, r0
80154e4: b2db uxtb r3, r3
80154e6: f003 0301 and.w r3, r3, #1
80154ea: 2b00 cmp r3, #0
80154ec: d03d beq.n 801556a <tcp_receive+0x8a6>
(TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) {
80154ee: 4b17 ldr r3, [pc, #92] ; (801554c <tcp_receive+0x888>)
80154f0: 68db ldr r3, [r3, #12]
80154f2: 899b ldrh r3, [r3, #12]
80154f4: b29b uxth r3, r3
80154f6: 4618 mov r0, r3
80154f8: f7fa ff42 bl 8010380 <lwip_htons>
80154fc: 4603 mov r3, r0
80154fe: b2db uxtb r3, r3
8015500: f003 0302 and.w r3, r3, #2
if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
8015504: 2b00 cmp r3, #0
8015506: d130 bne.n 801556a <tcp_receive+0x8a6>
TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN);
8015508: 4b10 ldr r3, [pc, #64] ; (801554c <tcp_receive+0x888>)
801550a: 68db ldr r3, [r3, #12]
801550c: 899b ldrh r3, [r3, #12]
801550e: b29c uxth r4, r3
8015510: 2001 movs r0, #1
8015512: f7fa ff35 bl 8010380 <lwip_htons>
8015516: 4603 mov r3, r0
8015518: 461a mov r2, r3
801551a: 4b0c ldr r3, [pc, #48] ; (801554c <tcp_receive+0x888>)
801551c: 68db ldr r3, [r3, #12]
801551e: 4322 orrs r2, r4
8015520: b292 uxth r2, r2
8015522: 819a strh r2, [r3, #12]
tcplen = TCP_TCPLEN(&inseg);
8015524: 4b09 ldr r3, [pc, #36] ; (801554c <tcp_receive+0x888>)
8015526: 891c ldrh r4, [r3, #8]
8015528: 4b08 ldr r3, [pc, #32] ; (801554c <tcp_receive+0x888>)
801552a: 68db ldr r3, [r3, #12]
801552c: 899b ldrh r3, [r3, #12]
801552e: b29b uxth r3, r3
8015530: 4618 mov r0, r3
8015532: f7fa ff25 bl 8010380 <lwip_htons>
8015536: 4603 mov r3, r0
8015538: b2db uxtb r3, r3
801553a: f003 0303 and.w r3, r3, #3
801553e: 2b00 cmp r3, #0
8015540: d00e beq.n 8015560 <tcp_receive+0x89c>
8015542: 2301 movs r3, #1
8015544: e00d b.n 8015562 <tcp_receive+0x89e>
8015546: bf00 nop
8015548: 20008738 .word 0x20008738
801554c: 20008718 .word 0x20008718
8015550: 20008742 .word 0x20008742
8015554: 0801eb30 .word 0x0801eb30
8015558: 0801eed8 .word 0x0801eed8
801555c: 0801eb7c .word 0x0801eb7c
8015560: 2300 movs r3, #0
8015562: 4423 add r3, r4
8015564: b29a uxth r2, r3
8015566: 4b98 ldr r3, [pc, #608] ; (80157c8 <tcp_receive+0xb04>)
8015568: 801a strh r2, [r3, #0]
}
tmp = next;
801556a: 6bfb ldr r3, [r7, #60] ; 0x3c
801556c: 613b str r3, [r7, #16]
next = next->next;
801556e: 6bfb ldr r3, [r7, #60] ; 0x3c
8015570: 681b ldr r3, [r3, #0]
8015572: 63fb str r3, [r7, #60] ; 0x3c
tcp_seg_free(tmp);
8015574: 6938 ldr r0, [r7, #16]
8015576: f7fd fd3b bl 8012ff0 <tcp_seg_free>
while (next &&
801557a: 6bfb ldr r3, [r7, #60] ; 0x3c
801557c: 2b00 cmp r3, #0
801557e: d00e beq.n 801559e <tcp_receive+0x8da>
TCP_SEQ_GEQ(seqno + tcplen,
8015580: 4b91 ldr r3, [pc, #580] ; (80157c8 <tcp_receive+0xb04>)
8015582: 881b ldrh r3, [r3, #0]
8015584: 461a mov r2, r3
8015586: 4b91 ldr r3, [pc, #580] ; (80157cc <tcp_receive+0xb08>)
8015588: 681b ldr r3, [r3, #0]
801558a: 441a add r2, r3
801558c: 6bfb ldr r3, [r7, #60] ; 0x3c
801558e: 68db ldr r3, [r3, #12]
8015590: 685b ldr r3, [r3, #4]
8015592: 6bf9 ldr r1, [r7, #60] ; 0x3c
8015594: 8909 ldrh r1, [r1, #8]
8015596: 440b add r3, r1
8015598: 1ad3 subs r3, r2, r3
while (next &&
801559a: 2b00 cmp r3, #0
801559c: da9a bge.n 80154d4 <tcp_receive+0x810>
}
/* Now trim right side of inseg if it overlaps with the first
* segment on ooseq */
if (next &&
801559e: 6bfb ldr r3, [r7, #60] ; 0x3c
80155a0: 2b00 cmp r3, #0
80155a2: d059 beq.n 8015658 <tcp_receive+0x994>
TCP_SEQ_GT(seqno + tcplen,
80155a4: 4b88 ldr r3, [pc, #544] ; (80157c8 <tcp_receive+0xb04>)
80155a6: 881b ldrh r3, [r3, #0]
80155a8: 461a mov r2, r3
80155aa: 4b88 ldr r3, [pc, #544] ; (80157cc <tcp_receive+0xb08>)
80155ac: 681b ldr r3, [r3, #0]
80155ae: 441a add r2, r3
80155b0: 6bfb ldr r3, [r7, #60] ; 0x3c
80155b2: 68db ldr r3, [r3, #12]
80155b4: 685b ldr r3, [r3, #4]
80155b6: 1ad3 subs r3, r2, r3
if (next &&
80155b8: 2b00 cmp r3, #0
80155ba: dd4d ble.n 8015658 <tcp_receive+0x994>
next->tcphdr->seqno)) {
/* inseg cannot have FIN here (already processed above) */
inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
80155bc: 6bfb ldr r3, [r7, #60] ; 0x3c
80155be: 68db ldr r3, [r3, #12]
80155c0: 685b ldr r3, [r3, #4]
80155c2: b29a uxth r2, r3
80155c4: 4b81 ldr r3, [pc, #516] ; (80157cc <tcp_receive+0xb08>)
80155c6: 681b ldr r3, [r3, #0]
80155c8: b29b uxth r3, r3
80155ca: 1ad3 subs r3, r2, r3
80155cc: b29a uxth r2, r3
80155ce: 4b80 ldr r3, [pc, #512] ; (80157d0 <tcp_receive+0xb0c>)
80155d0: 811a strh r2, [r3, #8]
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
80155d2: 4b7f ldr r3, [pc, #508] ; (80157d0 <tcp_receive+0xb0c>)
80155d4: 68db ldr r3, [r3, #12]
80155d6: 899b ldrh r3, [r3, #12]
80155d8: b29b uxth r3, r3
80155da: 4618 mov r0, r3
80155dc: f7fa fed0 bl 8010380 <lwip_htons>
80155e0: 4603 mov r3, r0
80155e2: b2db uxtb r3, r3
80155e4: f003 0302 and.w r3, r3, #2
80155e8: 2b00 cmp r3, #0
80155ea: d005 beq.n 80155f8 <tcp_receive+0x934>
inseg.len -= 1;
80155ec: 4b78 ldr r3, [pc, #480] ; (80157d0 <tcp_receive+0xb0c>)
80155ee: 891b ldrh r3, [r3, #8]
80155f0: 3b01 subs r3, #1
80155f2: b29a uxth r2, r3
80155f4: 4b76 ldr r3, [pc, #472] ; (80157d0 <tcp_receive+0xb0c>)
80155f6: 811a strh r2, [r3, #8]
}
pbuf_realloc(inseg.p, inseg.len);
80155f8: 4b75 ldr r3, [pc, #468] ; (80157d0 <tcp_receive+0xb0c>)
80155fa: 685a ldr r2, [r3, #4]
80155fc: 4b74 ldr r3, [pc, #464] ; (80157d0 <tcp_receive+0xb0c>)
80155fe: 891b ldrh r3, [r3, #8]
8015600: 4619 mov r1, r3
8015602: 4610 mov r0, r2
8015604: f7fc f8ea bl 80117dc <pbuf_realloc>
tcplen = TCP_TCPLEN(&inseg);
8015608: 4b71 ldr r3, [pc, #452] ; (80157d0 <tcp_receive+0xb0c>)
801560a: 891c ldrh r4, [r3, #8]
801560c: 4b70 ldr r3, [pc, #448] ; (80157d0 <tcp_receive+0xb0c>)
801560e: 68db ldr r3, [r3, #12]
8015610: 899b ldrh r3, [r3, #12]
8015612: b29b uxth r3, r3
8015614: 4618 mov r0, r3
8015616: f7fa feb3 bl 8010380 <lwip_htons>
801561a: 4603 mov r3, r0
801561c: b2db uxtb r3, r3
801561e: f003 0303 and.w r3, r3, #3
8015622: 2b00 cmp r3, #0
8015624: d001 beq.n 801562a <tcp_receive+0x966>
8015626: 2301 movs r3, #1
8015628: e000 b.n 801562c <tcp_receive+0x968>
801562a: 2300 movs r3, #0
801562c: 4423 add r3, r4
801562e: b29a uxth r2, r3
8015630: 4b65 ldr r3, [pc, #404] ; (80157c8 <tcp_receive+0xb04>)
8015632: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n",
8015634: 4b64 ldr r3, [pc, #400] ; (80157c8 <tcp_receive+0xb04>)
8015636: 881b ldrh r3, [r3, #0]
8015638: 461a mov r2, r3
801563a: 4b64 ldr r3, [pc, #400] ; (80157cc <tcp_receive+0xb08>)
801563c: 681b ldr r3, [r3, #0]
801563e: 441a add r2, r3
8015640: 6bfb ldr r3, [r7, #60] ; 0x3c
8015642: 68db ldr r3, [r3, #12]
8015644: 685b ldr r3, [r3, #4]
8015646: 429a cmp r2, r3
8015648: d006 beq.n 8015658 <tcp_receive+0x994>
801564a: 4b62 ldr r3, [pc, #392] ; (80157d4 <tcp_receive+0xb10>)
801564c: f240 52fd movw r2, #1533 ; 0x5fd
8015650: 4961 ldr r1, [pc, #388] ; (80157d8 <tcp_receive+0xb14>)
8015652: 4862 ldr r0, [pc, #392] ; (80157dc <tcp_receive+0xb18>)
8015654: f006 ff78 bl 801c548 <iprintf>
(seqno + tcplen) == next->tcphdr->seqno);
}
pcb->ooseq = next;
8015658: 687b ldr r3, [r7, #4]
801565a: 6bfa ldr r2, [r7, #60] ; 0x3c
801565c: 675a str r2, [r3, #116] ; 0x74
}
}
#endif /* TCP_QUEUE_OOSEQ */
pcb->rcv_nxt = seqno + tcplen;
801565e: 4b5a ldr r3, [pc, #360] ; (80157c8 <tcp_receive+0xb04>)
8015660: 881b ldrh r3, [r3, #0]
8015662: 461a mov r2, r3
8015664: 4b59 ldr r3, [pc, #356] ; (80157cc <tcp_receive+0xb08>)
8015666: 681b ldr r3, [r3, #0]
8015668: 441a add r2, r3
801566a: 687b ldr r3, [r7, #4]
801566c: 625a str r2, [r3, #36] ; 0x24
/* Update the receiver's (our) window. */
LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
801566e: 687b ldr r3, [r7, #4]
8015670: 8d1a ldrh r2, [r3, #40] ; 0x28
8015672: 4b55 ldr r3, [pc, #340] ; (80157c8 <tcp_receive+0xb04>)
8015674: 881b ldrh r3, [r3, #0]
8015676: 429a cmp r2, r3
8015678: d206 bcs.n 8015688 <tcp_receive+0x9c4>
801567a: 4b56 ldr r3, [pc, #344] ; (80157d4 <tcp_receive+0xb10>)
801567c: f240 6207 movw r2, #1543 ; 0x607
8015680: 4957 ldr r1, [pc, #348] ; (80157e0 <tcp_receive+0xb1c>)
8015682: 4856 ldr r0, [pc, #344] ; (80157dc <tcp_receive+0xb18>)
8015684: f006 ff60 bl 801c548 <iprintf>
pcb->rcv_wnd -= tcplen;
8015688: 687b ldr r3, [r7, #4]
801568a: 8d1a ldrh r2, [r3, #40] ; 0x28
801568c: 4b4e ldr r3, [pc, #312] ; (80157c8 <tcp_receive+0xb04>)
801568e: 881b ldrh r3, [r3, #0]
8015690: 1ad3 subs r3, r2, r3
8015692: b29a uxth r2, r3
8015694: 687b ldr r3, [r7, #4]
8015696: 851a strh r2, [r3, #40] ; 0x28
tcp_update_rcv_ann_wnd(pcb);
8015698: 6878 ldr r0, [r7, #4]
801569a: f7fc ffcd bl 8012638 <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) {
801569e: 4b4c ldr r3, [pc, #304] ; (80157d0 <tcp_receive+0xb0c>)
80156a0: 685b ldr r3, [r3, #4]
80156a2: 891b ldrh r3, [r3, #8]
80156a4: 2b00 cmp r3, #0
80156a6: d006 beq.n 80156b6 <tcp_receive+0x9f2>
recv_data = inseg.p;
80156a8: 4b49 ldr r3, [pc, #292] ; (80157d0 <tcp_receive+0xb0c>)
80156aa: 685b ldr r3, [r3, #4]
80156ac: 4a4d ldr r2, [pc, #308] ; (80157e4 <tcp_receive+0xb20>)
80156ae: 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;
80156b0: 4b47 ldr r3, [pc, #284] ; (80157d0 <tcp_receive+0xb0c>)
80156b2: 2200 movs r2, #0
80156b4: 605a str r2, [r3, #4]
}
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
80156b6: 4b46 ldr r3, [pc, #280] ; (80157d0 <tcp_receive+0xb0c>)
80156b8: 68db ldr r3, [r3, #12]
80156ba: 899b ldrh r3, [r3, #12]
80156bc: b29b uxth r3, r3
80156be: 4618 mov r0, r3
80156c0: f7fa fe5e bl 8010380 <lwip_htons>
80156c4: 4603 mov r3, r0
80156c6: b2db uxtb r3, r3
80156c8: f003 0301 and.w r3, r3, #1
80156cc: 2b00 cmp r3, #0
80156ce: f000 80b8 beq.w 8015842 <tcp_receive+0xb7e>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n"));
recv_flags |= TF_GOT_FIN;
80156d2: 4b45 ldr r3, [pc, #276] ; (80157e8 <tcp_receive+0xb24>)
80156d4: 781b ldrb r3, [r3, #0]
80156d6: f043 0320 orr.w r3, r3, #32
80156da: b2da uxtb r2, r3
80156dc: 4b42 ldr r3, [pc, #264] ; (80157e8 <tcp_receive+0xb24>)
80156de: 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 &&
80156e0: e0af b.n 8015842 <tcp_receive+0xb7e>
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
struct tcp_seg *cseg = pcb->ooseq;
80156e2: 687b ldr r3, [r7, #4]
80156e4: 6f5b ldr r3, [r3, #116] ; 0x74
80156e6: 60bb str r3, [r7, #8]
seqno = pcb->ooseq->tcphdr->seqno;
80156e8: 687b ldr r3, [r7, #4]
80156ea: 6f5b ldr r3, [r3, #116] ; 0x74
80156ec: 68db ldr r3, [r3, #12]
80156ee: 685b ldr r3, [r3, #4]
80156f0: 4a36 ldr r2, [pc, #216] ; (80157cc <tcp_receive+0xb08>)
80156f2: 6013 str r3, [r2, #0]
pcb->rcv_nxt += TCP_TCPLEN(cseg);
80156f4: 68bb ldr r3, [r7, #8]
80156f6: 891b ldrh r3, [r3, #8]
80156f8: 461c mov r4, r3
80156fa: 68bb ldr r3, [r7, #8]
80156fc: 68db ldr r3, [r3, #12]
80156fe: 899b ldrh r3, [r3, #12]
8015700: b29b uxth r3, r3
8015702: 4618 mov r0, r3
8015704: f7fa fe3c bl 8010380 <lwip_htons>
8015708: 4603 mov r3, r0
801570a: b2db uxtb r3, r3
801570c: f003 0303 and.w r3, r3, #3
8015710: 2b00 cmp r3, #0
8015712: d001 beq.n 8015718 <tcp_receive+0xa54>
8015714: 2301 movs r3, #1
8015716: e000 b.n 801571a <tcp_receive+0xa56>
8015718: 2300 movs r3, #0
801571a: 191a adds r2, r3, r4
801571c: 687b ldr r3, [r7, #4]
801571e: 6a5b ldr r3, [r3, #36] ; 0x24
8015720: 441a add r2, r3
8015722: 687b ldr r3, [r7, #4]
8015724: 625a str r2, [r3, #36] ; 0x24
LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
8015726: 687b ldr r3, [r7, #4]
8015728: 8d1b ldrh r3, [r3, #40] ; 0x28
801572a: 461c mov r4, r3
801572c: 68bb ldr r3, [r7, #8]
801572e: 891b ldrh r3, [r3, #8]
8015730: 461d mov r5, r3
8015732: 68bb ldr r3, [r7, #8]
8015734: 68db ldr r3, [r3, #12]
8015736: 899b ldrh r3, [r3, #12]
8015738: b29b uxth r3, r3
801573a: 4618 mov r0, r3
801573c: f7fa fe20 bl 8010380 <lwip_htons>
8015740: 4603 mov r3, r0
8015742: b2db uxtb r3, r3
8015744: f003 0303 and.w r3, r3, #3
8015748: 2b00 cmp r3, #0
801574a: d001 beq.n 8015750 <tcp_receive+0xa8c>
801574c: 2301 movs r3, #1
801574e: e000 b.n 8015752 <tcp_receive+0xa8e>
8015750: 2300 movs r3, #0
8015752: 442b add r3, r5
8015754: 429c cmp r4, r3
8015756: d206 bcs.n 8015766 <tcp_receive+0xaa2>
8015758: 4b1e ldr r3, [pc, #120] ; (80157d4 <tcp_receive+0xb10>)
801575a: f240 622c movw r2, #1580 ; 0x62c
801575e: 4923 ldr r1, [pc, #140] ; (80157ec <tcp_receive+0xb28>)
8015760: 481e ldr r0, [pc, #120] ; (80157dc <tcp_receive+0xb18>)
8015762: f006 fef1 bl 801c548 <iprintf>
pcb->rcv_wnd >= TCP_TCPLEN(cseg));
pcb->rcv_wnd -= TCP_TCPLEN(cseg);
8015766: 68bb ldr r3, [r7, #8]
8015768: 891b ldrh r3, [r3, #8]
801576a: 461c mov r4, r3
801576c: 68bb ldr r3, [r7, #8]
801576e: 68db ldr r3, [r3, #12]
8015770: 899b ldrh r3, [r3, #12]
8015772: b29b uxth r3, r3
8015774: 4618 mov r0, r3
8015776: f7fa fe03 bl 8010380 <lwip_htons>
801577a: 4603 mov r3, r0
801577c: b2db uxtb r3, r3
801577e: f003 0303 and.w r3, r3, #3
8015782: 2b00 cmp r3, #0
8015784: d001 beq.n 801578a <tcp_receive+0xac6>
8015786: 2301 movs r3, #1
8015788: e000 b.n 801578c <tcp_receive+0xac8>
801578a: 2300 movs r3, #0
801578c: 1919 adds r1, r3, r4
801578e: 687b ldr r3, [r7, #4]
8015790: 8d1a ldrh r2, [r3, #40] ; 0x28
8015792: b28b uxth r3, r1
8015794: 1ad3 subs r3, r2, r3
8015796: b29a uxth r2, r3
8015798: 687b ldr r3, [r7, #4]
801579a: 851a strh r2, [r3, #40] ; 0x28
tcp_update_rcv_ann_wnd(pcb);
801579c: 6878 ldr r0, [r7, #4]
801579e: f7fc ff4b bl 8012638 <tcp_update_rcv_ann_wnd>
if (cseg->p->tot_len > 0) {
80157a2: 68bb ldr r3, [r7, #8]
80157a4: 685b ldr r3, [r3, #4]
80157a6: 891b ldrh r3, [r3, #8]
80157a8: 2b00 cmp r3, #0
80157aa: d028 beq.n 80157fe <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) {
80157ac: 4b0d ldr r3, [pc, #52] ; (80157e4 <tcp_receive+0xb20>)
80157ae: 681b ldr r3, [r3, #0]
80157b0: 2b00 cmp r3, #0
80157b2: d01d beq.n 80157f0 <tcp_receive+0xb2c>
pbuf_cat(recv_data, cseg->p);
80157b4: 4b0b ldr r3, [pc, #44] ; (80157e4 <tcp_receive+0xb20>)
80157b6: 681a ldr r2, [r3, #0]
80157b8: 68bb ldr r3, [r7, #8]
80157ba: 685b ldr r3, [r3, #4]
80157bc: 4619 mov r1, r3
80157be: 4610 mov r0, r2
80157c0: f7fc fa60 bl 8011c84 <pbuf_cat>
80157c4: e018 b.n 80157f8 <tcp_receive+0xb34>
80157c6: bf00 nop
80157c8: 20008742 .word 0x20008742
80157cc: 20008738 .word 0x20008738
80157d0: 20008718 .word 0x20008718
80157d4: 0801eb30 .word 0x0801eb30
80157d8: 0801ef10 .word 0x0801ef10
80157dc: 0801eb7c .word 0x0801eb7c
80157e0: 0801ef4c .word 0x0801ef4c
80157e4: 20008748 .word 0x20008748
80157e8: 20008745 .word 0x20008745
80157ec: 0801ef6c .word 0x0801ef6c
} else {
recv_data = cseg->p;
80157f0: 68bb ldr r3, [r7, #8]
80157f2: 685b ldr r3, [r3, #4]
80157f4: 4a70 ldr r2, [pc, #448] ; (80159b8 <tcp_receive+0xcf4>)
80157f6: 6013 str r3, [r2, #0]
}
cseg->p = NULL;
80157f8: 68bb ldr r3, [r7, #8]
80157fa: 2200 movs r2, #0
80157fc: 605a str r2, [r3, #4]
}
if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
80157fe: 68bb ldr r3, [r7, #8]
8015800: 68db ldr r3, [r3, #12]
8015802: 899b ldrh r3, [r3, #12]
8015804: b29b uxth r3, r3
8015806: 4618 mov r0, r3
8015808: f7fa fdba bl 8010380 <lwip_htons>
801580c: 4603 mov r3, r0
801580e: b2db uxtb r3, r3
8015810: f003 0301 and.w r3, r3, #1
8015814: 2b00 cmp r3, #0
8015816: d00d beq.n 8015834 <tcp_receive+0xb70>
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n"));
recv_flags |= TF_GOT_FIN;
8015818: 4b68 ldr r3, [pc, #416] ; (80159bc <tcp_receive+0xcf8>)
801581a: 781b ldrb r3, [r3, #0]
801581c: f043 0320 orr.w r3, r3, #32
8015820: b2da uxtb r2, r3
8015822: 4b66 ldr r3, [pc, #408] ; (80159bc <tcp_receive+0xcf8>)
8015824: 701a strb r2, [r3, #0]
if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */
8015826: 687b ldr r3, [r7, #4]
8015828: 7d1b ldrb r3, [r3, #20]
801582a: 2b04 cmp r3, #4
801582c: d102 bne.n 8015834 <tcp_receive+0xb70>
pcb->state = CLOSE_WAIT;
801582e: 687b ldr r3, [r7, #4]
8015830: 2207 movs r2, #7
8015832: 751a strb r2, [r3, #20]
}
}
pcb->ooseq = cseg->next;
8015834: 68bb ldr r3, [r7, #8]
8015836: 681a ldr r2, [r3, #0]
8015838: 687b ldr r3, [r7, #4]
801583a: 675a str r2, [r3, #116] ; 0x74
tcp_seg_free(cseg);
801583c: 68b8 ldr r0, [r7, #8]
801583e: f7fd fbd7 bl 8012ff0 <tcp_seg_free>
while (pcb->ooseq != NULL &&
8015842: 687b ldr r3, [r7, #4]
8015844: 6f5b ldr r3, [r3, #116] ; 0x74
8015846: 2b00 cmp r3, #0
8015848: d008 beq.n 801585c <tcp_receive+0xb98>
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
801584a: 687b ldr r3, [r7, #4]
801584c: 6f5b ldr r3, [r3, #116] ; 0x74
801584e: 68db ldr r3, [r3, #12]
8015850: 685a ldr r2, [r3, #4]
8015852: 687b ldr r3, [r7, #4]
8015854: 6a5b ldr r3, [r3, #36] ; 0x24
while (pcb->ooseq != NULL &&
8015856: 429a cmp r2, r3
8015858: f43f af43 beq.w 80156e2 <tcp_receive+0xa1e>
#endif /* LWIP_TCP_SACK_OUT */
#endif /* TCP_QUEUE_OOSEQ */
/* Acknowledge the segment(s). */
tcp_ack(pcb);
801585c: 687b ldr r3, [r7, #4]
801585e: 8b5b ldrh r3, [r3, #26]
8015860: f003 0301 and.w r3, r3, #1
8015864: 2b00 cmp r3, #0
8015866: d00e beq.n 8015886 <tcp_receive+0xbc2>
8015868: 687b ldr r3, [r7, #4]
801586a: 8b5b ldrh r3, [r3, #26]
801586c: f023 0301 bic.w r3, r3, #1
8015870: b29a uxth r2, r3
8015872: 687b ldr r3, [r7, #4]
8015874: 835a strh r2, [r3, #26]
8015876: 687b ldr r3, [r7, #4]
8015878: 8b5b ldrh r3, [r3, #26]
801587a: f043 0302 orr.w r3, r3, #2
801587e: b29a uxth r2, r3
8015880: 687b ldr r3, [r7, #4]
8015882: 835a strh r2, [r3, #26]
if (pcb->rcv_nxt == seqno) {
8015884: e188 b.n 8015b98 <tcp_receive+0xed4>
tcp_ack(pcb);
8015886: 687b ldr r3, [r7, #4]
8015888: 8b5b ldrh r3, [r3, #26]
801588a: f043 0301 orr.w r3, r3, #1
801588e: b29a uxth r2, r3
8015890: 687b ldr r3, [r7, #4]
8015892: 835a strh r2, [r3, #26]
if (pcb->rcv_nxt == seqno) {
8015894: e180 b.n 8015b98 <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) {
8015896: 687b ldr r3, [r7, #4]
8015898: 6f5b ldr r3, [r3, #116] ; 0x74
801589a: 2b00 cmp r3, #0
801589c: d106 bne.n 80158ac <tcp_receive+0xbe8>
pcb->ooseq = tcp_seg_copy(&inseg);
801589e: 4848 ldr r0, [pc, #288] ; (80159c0 <tcp_receive+0xcfc>)
80158a0: f7fd fbbe bl 8013020 <tcp_seg_copy>
80158a4: 4602 mov r2, r0
80158a6: 687b ldr r3, [r7, #4]
80158a8: 675a str r2, [r3, #116] ; 0x74
80158aa: e16d b.n 8015b88 <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;
80158ac: 2300 movs r3, #0
80158ae: 637b str r3, [r7, #52] ; 0x34
for (next = pcb->ooseq; next != NULL; next = next->next) {
80158b0: 687b ldr r3, [r7, #4]
80158b2: 6f5b ldr r3, [r3, #116] ; 0x74
80158b4: 63bb str r3, [r7, #56] ; 0x38
80158b6: e157 b.n 8015b68 <tcp_receive+0xea4>
if (seqno == next->tcphdr->seqno) {
80158b8: 6bbb ldr r3, [r7, #56] ; 0x38
80158ba: 68db ldr r3, [r3, #12]
80158bc: 685a ldr r2, [r3, #4]
80158be: 4b41 ldr r3, [pc, #260] ; (80159c4 <tcp_receive+0xd00>)
80158c0: 681b ldr r3, [r3, #0]
80158c2: 429a cmp r2, r3
80158c4: d11d bne.n 8015902 <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) {
80158c6: 4b3e ldr r3, [pc, #248] ; (80159c0 <tcp_receive+0xcfc>)
80158c8: 891a ldrh r2, [r3, #8]
80158ca: 6bbb ldr r3, [r7, #56] ; 0x38
80158cc: 891b ldrh r3, [r3, #8]
80158ce: 429a cmp r2, r3
80158d0: f240 814f bls.w 8015b72 <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);
80158d4: 483a ldr r0, [pc, #232] ; (80159c0 <tcp_receive+0xcfc>)
80158d6: f7fd fba3 bl 8013020 <tcp_seg_copy>
80158da: 6178 str r0, [r7, #20]
if (cseg != NULL) {
80158dc: 697b ldr r3, [r7, #20]
80158de: 2b00 cmp r3, #0
80158e0: f000 8149 beq.w 8015b76 <tcp_receive+0xeb2>
if (prev != NULL) {
80158e4: 6b7b ldr r3, [r7, #52] ; 0x34
80158e6: 2b00 cmp r3, #0
80158e8: d003 beq.n 80158f2 <tcp_receive+0xc2e>
prev->next = cseg;
80158ea: 6b7b ldr r3, [r7, #52] ; 0x34
80158ec: 697a ldr r2, [r7, #20]
80158ee: 601a str r2, [r3, #0]
80158f0: e002 b.n 80158f8 <tcp_receive+0xc34>
} else {
pcb->ooseq = cseg;
80158f2: 687b ldr r3, [r7, #4]
80158f4: 697a ldr r2, [r7, #20]
80158f6: 675a str r2, [r3, #116] ; 0x74
}
tcp_oos_insert_segment(cseg, next);
80158f8: 6bb9 ldr r1, [r7, #56] ; 0x38
80158fa: 6978 ldr r0, [r7, #20]
80158fc: f7ff f8de bl 8014abc <tcp_oos_insert_segment>
}
break;
8015900: e139 b.n 8015b76 <tcp_receive+0xeb2>
segment was smaller than the old one; in either
case, we ditch the incoming segment. */
break;
}
} else {
if (prev == NULL) {
8015902: 6b7b ldr r3, [r7, #52] ; 0x34
8015904: 2b00 cmp r3, #0
8015906: d117 bne.n 8015938 <tcp_receive+0xc74>
if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {
8015908: 4b2e ldr r3, [pc, #184] ; (80159c4 <tcp_receive+0xd00>)
801590a: 681a ldr r2, [r3, #0]
801590c: 6bbb ldr r3, [r7, #56] ; 0x38
801590e: 68db ldr r3, [r3, #12]
8015910: 685b ldr r3, [r3, #4]
8015912: 1ad3 subs r3, r2, r3
8015914: 2b00 cmp r3, #0
8015916: da57 bge.n 80159c8 <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);
8015918: 4829 ldr r0, [pc, #164] ; (80159c0 <tcp_receive+0xcfc>)
801591a: f7fd fb81 bl 8013020 <tcp_seg_copy>
801591e: 61b8 str r0, [r7, #24]
if (cseg != NULL) {
8015920: 69bb ldr r3, [r7, #24]
8015922: 2b00 cmp r3, #0
8015924: f000 8129 beq.w 8015b7a <tcp_receive+0xeb6>
pcb->ooseq = cseg;
8015928: 687b ldr r3, [r7, #4]
801592a: 69ba ldr r2, [r7, #24]
801592c: 675a str r2, [r3, #116] ; 0x74
tcp_oos_insert_segment(cseg, next);
801592e: 6bb9 ldr r1, [r7, #56] ; 0x38
8015930: 69b8 ldr r0, [r7, #24]
8015932: f7ff f8c3 bl 8014abc <tcp_oos_insert_segment>
}
break;
8015936: e120 b.n 8015b7a <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)) {
8015938: 4b22 ldr r3, [pc, #136] ; (80159c4 <tcp_receive+0xd00>)
801593a: 681a ldr r2, [r3, #0]
801593c: 6b7b ldr r3, [r7, #52] ; 0x34
801593e: 68db ldr r3, [r3, #12]
8015940: 685b ldr r3, [r3, #4]
8015942: 1ad3 subs r3, r2, r3
8015944: 3b01 subs r3, #1
8015946: 2b00 cmp r3, #0
8015948: db3e blt.n 80159c8 <tcp_receive+0xd04>
801594a: 4b1e ldr r3, [pc, #120] ; (80159c4 <tcp_receive+0xd00>)
801594c: 681a ldr r2, [r3, #0]
801594e: 6bbb ldr r3, [r7, #56] ; 0x38
8015950: 68db ldr r3, [r3, #12]
8015952: 685b ldr r3, [r3, #4]
8015954: 1ad3 subs r3, r2, r3
8015956: 3301 adds r3, #1
8015958: 2b00 cmp r3, #0
801595a: dc35 bgt.n 80159c8 <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);
801595c: 4818 ldr r0, [pc, #96] ; (80159c0 <tcp_receive+0xcfc>)
801595e: f7fd fb5f bl 8013020 <tcp_seg_copy>
8015962: 61f8 str r0, [r7, #28]
if (cseg != NULL) {
8015964: 69fb ldr r3, [r7, #28]
8015966: 2b00 cmp r3, #0
8015968: f000 8109 beq.w 8015b7e <tcp_receive+0xeba>
if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) {
801596c: 6b7b ldr r3, [r7, #52] ; 0x34
801596e: 68db ldr r3, [r3, #12]
8015970: 685b ldr r3, [r3, #4]
8015972: 6b7a ldr r2, [r7, #52] ; 0x34
8015974: 8912 ldrh r2, [r2, #8]
8015976: 441a add r2, r3
8015978: 4b12 ldr r3, [pc, #72] ; (80159c4 <tcp_receive+0xd00>)
801597a: 681b ldr r3, [r3, #0]
801597c: 1ad3 subs r3, r2, r3
801597e: 2b00 cmp r3, #0
8015980: dd12 ble.n 80159a8 <tcp_receive+0xce4>
/* We need to trim the prev segment. */
prev->len = (u16_t)(seqno - prev->tcphdr->seqno);
8015982: 4b10 ldr r3, [pc, #64] ; (80159c4 <tcp_receive+0xd00>)
8015984: 681b ldr r3, [r3, #0]
8015986: b29a uxth r2, r3
8015988: 6b7b ldr r3, [r7, #52] ; 0x34
801598a: 68db ldr r3, [r3, #12]
801598c: 685b ldr r3, [r3, #4]
801598e: b29b uxth r3, r3
8015990: 1ad3 subs r3, r2, r3
8015992: b29a uxth r2, r3
8015994: 6b7b ldr r3, [r7, #52] ; 0x34
8015996: 811a strh r2, [r3, #8]
pbuf_realloc(prev->p, prev->len);
8015998: 6b7b ldr r3, [r7, #52] ; 0x34
801599a: 685a ldr r2, [r3, #4]
801599c: 6b7b ldr r3, [r7, #52] ; 0x34
801599e: 891b ldrh r3, [r3, #8]
80159a0: 4619 mov r1, r3
80159a2: 4610 mov r0, r2
80159a4: f7fb ff1a bl 80117dc <pbuf_realloc>
}
prev->next = cseg;
80159a8: 6b7b ldr r3, [r7, #52] ; 0x34
80159aa: 69fa ldr r2, [r7, #28]
80159ac: 601a str r2, [r3, #0]
tcp_oos_insert_segment(cseg, next);
80159ae: 6bb9 ldr r1, [r7, #56] ; 0x38
80159b0: 69f8 ldr r0, [r7, #28]
80159b2: f7ff f883 bl 8014abc <tcp_oos_insert_segment>
}
break;
80159b6: e0e2 b.n 8015b7e <tcp_receive+0xeba>
80159b8: 20008748 .word 0x20008748
80159bc: 20008745 .word 0x20008745
80159c0: 20008718 .word 0x20008718
80159c4: 20008738 .word 0x20008738
#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;
80159c8: 6bbb ldr r3, [r7, #56] ; 0x38
80159ca: 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 &&
80159cc: 6bbb ldr r3, [r7, #56] ; 0x38
80159ce: 681b ldr r3, [r3, #0]
80159d0: 2b00 cmp r3, #0
80159d2: f040 80c6 bne.w 8015b62 <tcp_receive+0xe9e>
TCP_SEQ_GT(seqno, next->tcphdr->seqno)) {
80159d6: 4b80 ldr r3, [pc, #512] ; (8015bd8 <tcp_receive+0xf14>)
80159d8: 681a ldr r2, [r3, #0]
80159da: 6bbb ldr r3, [r7, #56] ; 0x38
80159dc: 68db ldr r3, [r3, #12]
80159de: 685b ldr r3, [r3, #4]
80159e0: 1ad3 subs r3, r2, r3
if (next->next == NULL &&
80159e2: 2b00 cmp r3, #0
80159e4: f340 80bd ble.w 8015b62 <tcp_receive+0xe9e>
if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
80159e8: 6bbb ldr r3, [r7, #56] ; 0x38
80159ea: 68db ldr r3, [r3, #12]
80159ec: 899b ldrh r3, [r3, #12]
80159ee: b29b uxth r3, r3
80159f0: 4618 mov r0, r3
80159f2: f7fa fcc5 bl 8010380 <lwip_htons>
80159f6: 4603 mov r3, r0
80159f8: b2db uxtb r3, r3
80159fa: f003 0301 and.w r3, r3, #1
80159fe: 2b00 cmp r3, #0
8015a00: f040 80bf bne.w 8015b82 <tcp_receive+0xebe>
/* segment "next" already contains all data */
break;
}
next->next = tcp_seg_copy(&inseg);
8015a04: 4875 ldr r0, [pc, #468] ; (8015bdc <tcp_receive+0xf18>)
8015a06: f7fd fb0b bl 8013020 <tcp_seg_copy>
8015a0a: 4602 mov r2, r0
8015a0c: 6bbb ldr r3, [r7, #56] ; 0x38
8015a0e: 601a str r2, [r3, #0]
if (next->next != NULL) {
8015a10: 6bbb ldr r3, [r7, #56] ; 0x38
8015a12: 681b ldr r3, [r3, #0]
8015a14: 2b00 cmp r3, #0
8015a16: f000 80b6 beq.w 8015b86 <tcp_receive+0xec2>
if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) {
8015a1a: 6bbb ldr r3, [r7, #56] ; 0x38
8015a1c: 68db ldr r3, [r3, #12]
8015a1e: 685b ldr r3, [r3, #4]
8015a20: 6bba ldr r2, [r7, #56] ; 0x38
8015a22: 8912 ldrh r2, [r2, #8]
8015a24: 441a add r2, r3
8015a26: 4b6c ldr r3, [pc, #432] ; (8015bd8 <tcp_receive+0xf14>)
8015a28: 681b ldr r3, [r3, #0]
8015a2a: 1ad3 subs r3, r2, r3
8015a2c: 2b00 cmp r3, #0
8015a2e: dd12 ble.n 8015a56 <tcp_receive+0xd92>
/* We need to trim the last segment. */
next->len = (u16_t)(seqno - next->tcphdr->seqno);
8015a30: 4b69 ldr r3, [pc, #420] ; (8015bd8 <tcp_receive+0xf14>)
8015a32: 681b ldr r3, [r3, #0]
8015a34: b29a uxth r2, r3
8015a36: 6bbb ldr r3, [r7, #56] ; 0x38
8015a38: 68db ldr r3, [r3, #12]
8015a3a: 685b ldr r3, [r3, #4]
8015a3c: b29b uxth r3, r3
8015a3e: 1ad3 subs r3, r2, r3
8015a40: b29a uxth r2, r3
8015a42: 6bbb ldr r3, [r7, #56] ; 0x38
8015a44: 811a strh r2, [r3, #8]
pbuf_realloc(next->p, next->len);
8015a46: 6bbb ldr r3, [r7, #56] ; 0x38
8015a48: 685a ldr r2, [r3, #4]
8015a4a: 6bbb ldr r3, [r7, #56] ; 0x38
8015a4c: 891b ldrh r3, [r3, #8]
8015a4e: 4619 mov r1, r3
8015a50: 4610 mov r0, r2
8015a52: f7fb fec3 bl 80117dc <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)) {
8015a56: 4b62 ldr r3, [pc, #392] ; (8015be0 <tcp_receive+0xf1c>)
8015a58: 881b ldrh r3, [r3, #0]
8015a5a: 461a mov r2, r3
8015a5c: 4b5e ldr r3, [pc, #376] ; (8015bd8 <tcp_receive+0xf14>)
8015a5e: 681b ldr r3, [r3, #0]
8015a60: 441a add r2, r3
8015a62: 687b ldr r3, [r7, #4]
8015a64: 6a5b ldr r3, [r3, #36] ; 0x24
8015a66: 6879 ldr r1, [r7, #4]
8015a68: 8d09 ldrh r1, [r1, #40] ; 0x28
8015a6a: 440b add r3, r1
8015a6c: 1ad3 subs r3, r2, r3
8015a6e: 2b00 cmp r3, #0
8015a70: f340 8089 ble.w 8015b86 <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) {
8015a74: 6bbb ldr r3, [r7, #56] ; 0x38
8015a76: 681b ldr r3, [r3, #0]
8015a78: 68db ldr r3, [r3, #12]
8015a7a: 899b ldrh r3, [r3, #12]
8015a7c: b29b uxth r3, r3
8015a7e: 4618 mov r0, r3
8015a80: f7fa fc7e bl 8010380 <lwip_htons>
8015a84: 4603 mov r3, r0
8015a86: b2db uxtb r3, r3
8015a88: f003 0301 and.w r3, r3, #1
8015a8c: 2b00 cmp r3, #0
8015a8e: d022 beq.n 8015ad6 <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);
8015a90: 6bbb ldr r3, [r7, #56] ; 0x38
8015a92: 681b ldr r3, [r3, #0]
8015a94: 68db ldr r3, [r3, #12]
8015a96: 899b ldrh r3, [r3, #12]
8015a98: b29b uxth r3, r3
8015a9a: b21b sxth r3, r3
8015a9c: f423 537c bic.w r3, r3, #16128 ; 0x3f00
8015aa0: b21c sxth r4, r3
8015aa2: 6bbb ldr r3, [r7, #56] ; 0x38
8015aa4: 681b ldr r3, [r3, #0]
8015aa6: 68db ldr r3, [r3, #12]
8015aa8: 899b ldrh r3, [r3, #12]
8015aaa: b29b uxth r3, r3
8015aac: 4618 mov r0, r3
8015aae: f7fa fc67 bl 8010380 <lwip_htons>
8015ab2: 4603 mov r3, r0
8015ab4: b2db uxtb r3, r3
8015ab6: b29b uxth r3, r3
8015ab8: f003 033e and.w r3, r3, #62 ; 0x3e
8015abc: b29b uxth r3, r3
8015abe: 4618 mov r0, r3
8015ac0: f7fa fc5e bl 8010380 <lwip_htons>
8015ac4: 4603 mov r3, r0
8015ac6: b21b sxth r3, r3
8015ac8: 4323 orrs r3, r4
8015aca: b21a sxth r2, r3
8015acc: 6bbb ldr r3, [r7, #56] ; 0x38
8015ace: 681b ldr r3, [r3, #0]
8015ad0: 68db ldr r3, [r3, #12]
8015ad2: b292 uxth r2, r2
8015ad4: 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);
8015ad6: 687b ldr r3, [r7, #4]
8015ad8: 6a5b ldr r3, [r3, #36] ; 0x24
8015ada: b29a uxth r2, r3
8015adc: 687b ldr r3, [r7, #4]
8015ade: 8d1b ldrh r3, [r3, #40] ; 0x28
8015ae0: 4413 add r3, r2
8015ae2: b299 uxth r1, r3
8015ae4: 4b3c ldr r3, [pc, #240] ; (8015bd8 <tcp_receive+0xf14>)
8015ae6: 681b ldr r3, [r3, #0]
8015ae8: b29a uxth r2, r3
8015aea: 6bbb ldr r3, [r7, #56] ; 0x38
8015aec: 681b ldr r3, [r3, #0]
8015aee: 1a8a subs r2, r1, r2
8015af0: b292 uxth r2, r2
8015af2: 811a strh r2, [r3, #8]
pbuf_realloc(next->next->p, next->next->len);
8015af4: 6bbb ldr r3, [r7, #56] ; 0x38
8015af6: 681b ldr r3, [r3, #0]
8015af8: 685a ldr r2, [r3, #4]
8015afa: 6bbb ldr r3, [r7, #56] ; 0x38
8015afc: 681b ldr r3, [r3, #0]
8015afe: 891b ldrh r3, [r3, #8]
8015b00: 4619 mov r1, r3
8015b02: 4610 mov r0, r2
8015b04: f7fb fe6a bl 80117dc <pbuf_realloc>
tcplen = TCP_TCPLEN(next->next);
8015b08: 6bbb ldr r3, [r7, #56] ; 0x38
8015b0a: 681b ldr r3, [r3, #0]
8015b0c: 891c ldrh r4, [r3, #8]
8015b0e: 6bbb ldr r3, [r7, #56] ; 0x38
8015b10: 681b ldr r3, [r3, #0]
8015b12: 68db ldr r3, [r3, #12]
8015b14: 899b ldrh r3, [r3, #12]
8015b16: b29b uxth r3, r3
8015b18: 4618 mov r0, r3
8015b1a: f7fa fc31 bl 8010380 <lwip_htons>
8015b1e: 4603 mov r3, r0
8015b20: b2db uxtb r3, r3
8015b22: f003 0303 and.w r3, r3, #3
8015b26: 2b00 cmp r3, #0
8015b28: d001 beq.n 8015b2e <tcp_receive+0xe6a>
8015b2a: 2301 movs r3, #1
8015b2c: e000 b.n 8015b30 <tcp_receive+0xe6c>
8015b2e: 2300 movs r3, #0
8015b30: 4423 add r3, r4
8015b32: b29a uxth r2, r3
8015b34: 4b2a ldr r3, [pc, #168] ; (8015be0 <tcp_receive+0xf1c>)
8015b36: 801a strh r2, [r3, #0]
LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
8015b38: 4b29 ldr r3, [pc, #164] ; (8015be0 <tcp_receive+0xf1c>)
8015b3a: 881b ldrh r3, [r3, #0]
8015b3c: 461a mov r2, r3
8015b3e: 4b26 ldr r3, [pc, #152] ; (8015bd8 <tcp_receive+0xf14>)
8015b40: 681b ldr r3, [r3, #0]
8015b42: 441a add r2, r3
8015b44: 687b ldr r3, [r7, #4]
8015b46: 6a5b ldr r3, [r3, #36] ; 0x24
8015b48: 6879 ldr r1, [r7, #4]
8015b4a: 8d09 ldrh r1, [r1, #40] ; 0x28
8015b4c: 440b add r3, r1
8015b4e: 429a cmp r2, r3
8015b50: d019 beq.n 8015b86 <tcp_receive+0xec2>
8015b52: 4b24 ldr r3, [pc, #144] ; (8015be4 <tcp_receive+0xf20>)
8015b54: f240 62f9 movw r2, #1785 ; 0x6f9
8015b58: 4923 ldr r1, [pc, #140] ; (8015be8 <tcp_receive+0xf24>)
8015b5a: 4824 ldr r0, [pc, #144] ; (8015bec <tcp_receive+0xf28>)
8015b5c: f006 fcf4 bl 801c548 <iprintf>
(seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd));
}
}
break;
8015b60: e011 b.n 8015b86 <tcp_receive+0xec2>
for (next = pcb->ooseq; next != NULL; next = next->next) {
8015b62: 6bbb ldr r3, [r7, #56] ; 0x38
8015b64: 681b ldr r3, [r3, #0]
8015b66: 63bb str r3, [r7, #56] ; 0x38
8015b68: 6bbb ldr r3, [r7, #56] ; 0x38
8015b6a: 2b00 cmp r3, #0
8015b6c: f47f aea4 bne.w 80158b8 <tcp_receive+0xbf4>
8015b70: e00a b.n 8015b88 <tcp_receive+0xec4>
break;
8015b72: bf00 nop
8015b74: e008 b.n 8015b88 <tcp_receive+0xec4>
break;
8015b76: bf00 nop
8015b78: e006 b.n 8015b88 <tcp_receive+0xec4>
break;
8015b7a: bf00 nop
8015b7c: e004 b.n 8015b88 <tcp_receive+0xec4>
break;
8015b7e: bf00 nop
8015b80: e002 b.n 8015b88 <tcp_receive+0xec4>
break;
8015b82: bf00 nop
8015b84: e000 b.n 8015b88 <tcp_receive+0xec4>
break;
8015b86: 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);
8015b88: 6878 ldr r0, [r7, #4]
8015b8a: f001 fa43 bl 8017014 <tcp_send_empty_ack>
if (pcb->rcv_nxt == seqno) {
8015b8e: e003 b.n 8015b98 <tcp_receive+0xed4>
}
} else {
/* The incoming segment is not within the window. */
tcp_send_empty_ack(pcb);
8015b90: 6878 ldr r0, [r7, #4]
8015b92: f001 fa3f bl 8017014 <tcp_send_empty_ack>
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
8015b96: e01a b.n 8015bce <tcp_receive+0xf0a>
8015b98: e019 b.n 8015bce <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)) {
8015b9a: 4b0f ldr r3, [pc, #60] ; (8015bd8 <tcp_receive+0xf14>)
8015b9c: 681a ldr r2, [r3, #0]
8015b9e: 687b ldr r3, [r7, #4]
8015ba0: 6a5b ldr r3, [r3, #36] ; 0x24
8015ba2: 1ad3 subs r3, r2, r3
8015ba4: 2b00 cmp r3, #0
8015ba6: db0a blt.n 8015bbe <tcp_receive+0xefa>
8015ba8: 4b0b ldr r3, [pc, #44] ; (8015bd8 <tcp_receive+0xf14>)
8015baa: 681a ldr r2, [r3, #0]
8015bac: 687b ldr r3, [r7, #4]
8015bae: 6a5b ldr r3, [r3, #36] ; 0x24
8015bb0: 6879 ldr r1, [r7, #4]
8015bb2: 8d09 ldrh r1, [r1, #40] ; 0x28
8015bb4: 440b add r3, r1
8015bb6: 1ad3 subs r3, r2, r3
8015bb8: 3301 adds r3, #1
8015bba: 2b00 cmp r3, #0
8015bbc: dd07 ble.n 8015bce <tcp_receive+0xf0a>
tcp_ack_now(pcb);
8015bbe: 687b ldr r3, [r7, #4]
8015bc0: 8b5b ldrh r3, [r3, #26]
8015bc2: f043 0302 orr.w r3, r3, #2
8015bc6: b29a uxth r2, r3
8015bc8: 687b ldr r3, [r7, #4]
8015bca: 835a strh r2, [r3, #26]
}
}
}
8015bcc: e7ff b.n 8015bce <tcp_receive+0xf0a>
8015bce: bf00 nop
8015bd0: 3750 adds r7, #80 ; 0x50
8015bd2: 46bd mov sp, r7
8015bd4: bdb0 pop {r4, r5, r7, pc}
8015bd6: bf00 nop
8015bd8: 20008738 .word 0x20008738
8015bdc: 20008718 .word 0x20008718
8015be0: 20008742 .word 0x20008742
8015be4: 0801eb30 .word 0x0801eb30
8015be8: 0801eed8 .word 0x0801eed8
8015bec: 0801eb7c .word 0x0801eb7c
08015bf0 <tcp_get_next_optbyte>:
static u8_t
tcp_get_next_optbyte(void)
{
8015bf0: b480 push {r7}
8015bf2: b083 sub sp, #12
8015bf4: af00 add r7, sp, #0
u16_t optidx = tcp_optidx++;
8015bf6: 4b15 ldr r3, [pc, #84] ; (8015c4c <tcp_get_next_optbyte+0x5c>)
8015bf8: 881b ldrh r3, [r3, #0]
8015bfa: 1c5a adds r2, r3, #1
8015bfc: b291 uxth r1, r2
8015bfe: 4a13 ldr r2, [pc, #76] ; (8015c4c <tcp_get_next_optbyte+0x5c>)
8015c00: 8011 strh r1, [r2, #0]
8015c02: 80fb strh r3, [r7, #6]
if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) {
8015c04: 4b12 ldr r3, [pc, #72] ; (8015c50 <tcp_get_next_optbyte+0x60>)
8015c06: 681b ldr r3, [r3, #0]
8015c08: 2b00 cmp r3, #0
8015c0a: d004 beq.n 8015c16 <tcp_get_next_optbyte+0x26>
8015c0c: 4b11 ldr r3, [pc, #68] ; (8015c54 <tcp_get_next_optbyte+0x64>)
8015c0e: 881b ldrh r3, [r3, #0]
8015c10: 88fa ldrh r2, [r7, #6]
8015c12: 429a cmp r2, r3
8015c14: d208 bcs.n 8015c28 <tcp_get_next_optbyte+0x38>
u8_t *opts = (u8_t *)tcphdr + TCP_HLEN;
8015c16: 4b10 ldr r3, [pc, #64] ; (8015c58 <tcp_get_next_optbyte+0x68>)
8015c18: 681b ldr r3, [r3, #0]
8015c1a: 3314 adds r3, #20
8015c1c: 603b str r3, [r7, #0]
return opts[optidx];
8015c1e: 88fb ldrh r3, [r7, #6]
8015c20: 683a ldr r2, [r7, #0]
8015c22: 4413 add r3, r2
8015c24: 781b ldrb r3, [r3, #0]
8015c26: e00b b.n 8015c40 <tcp_get_next_optbyte+0x50>
} else {
u8_t idx = (u8_t)(optidx - tcphdr_opt1len);
8015c28: 88fb ldrh r3, [r7, #6]
8015c2a: b2da uxtb r2, r3
8015c2c: 4b09 ldr r3, [pc, #36] ; (8015c54 <tcp_get_next_optbyte+0x64>)
8015c2e: 881b ldrh r3, [r3, #0]
8015c30: b2db uxtb r3, r3
8015c32: 1ad3 subs r3, r2, r3
8015c34: 717b strb r3, [r7, #5]
return tcphdr_opt2[idx];
8015c36: 4b06 ldr r3, [pc, #24] ; (8015c50 <tcp_get_next_optbyte+0x60>)
8015c38: 681a ldr r2, [r3, #0]
8015c3a: 797b ldrb r3, [r7, #5]
8015c3c: 4413 add r3, r2
8015c3e: 781b ldrb r3, [r3, #0]
}
}
8015c40: 4618 mov r0, r3
8015c42: 370c adds r7, #12
8015c44: 46bd mov sp, r7
8015c46: f85d 7b04 ldr.w r7, [sp], #4
8015c4a: 4770 bx lr
8015c4c: 20008734 .word 0x20008734
8015c50: 20008730 .word 0x20008730
8015c54: 2000872e .word 0x2000872e
8015c58: 20008728 .word 0x20008728
08015c5c <tcp_parseopt>:
*
* @param pcb the tcp_pcb for which a segment arrived
*/
static void
tcp_parseopt(struct tcp_pcb *pcb)
{
8015c5c: b580 push {r7, lr}
8015c5e: b084 sub sp, #16
8015c60: af00 add r7, sp, #0
8015c62: 6078 str r0, [r7, #4]
u16_t mss;
#if LWIP_TCP_TIMESTAMPS
u32_t tsval;
#endif
LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
8015c64: 687b ldr r3, [r7, #4]
8015c66: 2b00 cmp r3, #0
8015c68: d106 bne.n 8015c78 <tcp_parseopt+0x1c>
8015c6a: 4b31 ldr r3, [pc, #196] ; (8015d30 <tcp_parseopt+0xd4>)
8015c6c: f240 727d movw r2, #1917 ; 0x77d
8015c70: 4930 ldr r1, [pc, #192] ; (8015d34 <tcp_parseopt+0xd8>)
8015c72: 4831 ldr r0, [pc, #196] ; (8015d38 <tcp_parseopt+0xdc>)
8015c74: f006 fc68 bl 801c548 <iprintf>
/* Parse the TCP MSS option, if present. */
if (tcphdr_optlen != 0) {
8015c78: 4b30 ldr r3, [pc, #192] ; (8015d3c <tcp_parseopt+0xe0>)
8015c7a: 881b ldrh r3, [r3, #0]
8015c7c: 2b00 cmp r3, #0
8015c7e: d053 beq.n 8015d28 <tcp_parseopt+0xcc>
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
8015c80: 4b2f ldr r3, [pc, #188] ; (8015d40 <tcp_parseopt+0xe4>)
8015c82: 2200 movs r2, #0
8015c84: 801a strh r2, [r3, #0]
8015c86: e043 b.n 8015d10 <tcp_parseopt+0xb4>
u8_t opt = tcp_get_next_optbyte();
8015c88: f7ff ffb2 bl 8015bf0 <tcp_get_next_optbyte>
8015c8c: 4603 mov r3, r0
8015c8e: 73fb strb r3, [r7, #15]
switch (opt) {
8015c90: 7bfb ldrb r3, [r7, #15]
8015c92: 2b01 cmp r3, #1
8015c94: d03c beq.n 8015d10 <tcp_parseopt+0xb4>
8015c96: 2b02 cmp r3, #2
8015c98: d002 beq.n 8015ca0 <tcp_parseopt+0x44>
8015c9a: 2b00 cmp r3, #0
8015c9c: d03f beq.n 8015d1e <tcp_parseopt+0xc2>
8015c9e: e026 b.n 8015cee <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) {
8015ca0: f7ff ffa6 bl 8015bf0 <tcp_get_next_optbyte>
8015ca4: 4603 mov r3, r0
8015ca6: 2b04 cmp r3, #4
8015ca8: d13b bne.n 8015d22 <tcp_parseopt+0xc6>
8015caa: 4b25 ldr r3, [pc, #148] ; (8015d40 <tcp_parseopt+0xe4>)
8015cac: 881b ldrh r3, [r3, #0]
8015cae: 3302 adds r3, #2
8015cb0: 4a22 ldr r2, [pc, #136] ; (8015d3c <tcp_parseopt+0xe0>)
8015cb2: 8812 ldrh r2, [r2, #0]
8015cb4: 4293 cmp r3, r2
8015cb6: dc34 bgt.n 8015d22 <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);
8015cb8: f7ff ff9a bl 8015bf0 <tcp_get_next_optbyte>
8015cbc: 4603 mov r3, r0
8015cbe: b29b uxth r3, r3
8015cc0: 021b lsls r3, r3, #8
8015cc2: 81bb strh r3, [r7, #12]
mss |= tcp_get_next_optbyte();
8015cc4: f7ff ff94 bl 8015bf0 <tcp_get_next_optbyte>
8015cc8: 4603 mov r3, r0
8015cca: b29a uxth r2, r3
8015ccc: 89bb ldrh r3, [r7, #12]
8015cce: 4313 orrs r3, r2
8015cd0: 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;
8015cd2: 89bb ldrh r3, [r7, #12]
8015cd4: f5b3 7f06 cmp.w r3, #536 ; 0x218
8015cd8: d804 bhi.n 8015ce4 <tcp_parseopt+0x88>
8015cda: 89bb ldrh r3, [r7, #12]
8015cdc: 2b00 cmp r3, #0
8015cde: d001 beq.n 8015ce4 <tcp_parseopt+0x88>
8015ce0: 89ba ldrh r2, [r7, #12]
8015ce2: e001 b.n 8015ce8 <tcp_parseopt+0x8c>
8015ce4: f44f 7206 mov.w r2, #536 ; 0x218
8015ce8: 687b ldr r3, [r7, #4]
8015cea: 865a strh r2, [r3, #50] ; 0x32
break;
8015cec: e010 b.n 8015d10 <tcp_parseopt+0xb4>
}
break;
#endif /* LWIP_TCP_SACK_OUT */
default:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n"));
data = tcp_get_next_optbyte();
8015cee: f7ff ff7f bl 8015bf0 <tcp_get_next_optbyte>
8015cf2: 4603 mov r3, r0
8015cf4: 72fb strb r3, [r7, #11]
if (data < 2) {
8015cf6: 7afb ldrb r3, [r7, #11]
8015cf8: 2b01 cmp r3, #1
8015cfa: d914 bls.n 8015d26 <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;
8015cfc: 7afb ldrb r3, [r7, #11]
8015cfe: b29a uxth r2, r3
8015d00: 4b0f ldr r3, [pc, #60] ; (8015d40 <tcp_parseopt+0xe4>)
8015d02: 881b ldrh r3, [r3, #0]
8015d04: 4413 add r3, r2
8015d06: b29b uxth r3, r3
8015d08: 3b02 subs r3, #2
8015d0a: b29a uxth r2, r3
8015d0c: 4b0c ldr r3, [pc, #48] ; (8015d40 <tcp_parseopt+0xe4>)
8015d0e: 801a strh r2, [r3, #0]
for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
8015d10: 4b0b ldr r3, [pc, #44] ; (8015d40 <tcp_parseopt+0xe4>)
8015d12: 881a ldrh r2, [r3, #0]
8015d14: 4b09 ldr r3, [pc, #36] ; (8015d3c <tcp_parseopt+0xe0>)
8015d16: 881b ldrh r3, [r3, #0]
8015d18: 429a cmp r2, r3
8015d1a: d3b5 bcc.n 8015c88 <tcp_parseopt+0x2c>
8015d1c: e004 b.n 8015d28 <tcp_parseopt+0xcc>
return;
8015d1e: bf00 nop
8015d20: e002 b.n 8015d28 <tcp_parseopt+0xcc>
return;
8015d22: bf00 nop
8015d24: e000 b.n 8015d28 <tcp_parseopt+0xcc>
return;
8015d26: bf00 nop
}
}
}
}
8015d28: 3710 adds r7, #16
8015d2a: 46bd mov sp, r7
8015d2c: bd80 pop {r7, pc}
8015d2e: bf00 nop
8015d30: 0801eb30 .word 0x0801eb30
8015d34: 0801ef94 .word 0x0801ef94
8015d38: 0801eb7c .word 0x0801eb7c
8015d3c: 2000872c .word 0x2000872c
8015d40: 20008734 .word 0x20008734
08015d44 <tcp_trigger_input_pcb_close>:
void
tcp_trigger_input_pcb_close(void)
{
8015d44: b480 push {r7}
8015d46: af00 add r7, sp, #0
recv_flags |= TF_CLOSED;
8015d48: 4b05 ldr r3, [pc, #20] ; (8015d60 <tcp_trigger_input_pcb_close+0x1c>)
8015d4a: 781b ldrb r3, [r3, #0]
8015d4c: f043 0310 orr.w r3, r3, #16
8015d50: b2da uxtb r2, r3
8015d52: 4b03 ldr r3, [pc, #12] ; (8015d60 <tcp_trigger_input_pcb_close+0x1c>)
8015d54: 701a strb r2, [r3, #0]
}
8015d56: bf00 nop
8015d58: 46bd mov sp, r7
8015d5a: f85d 7b04 ldr.w r7, [sp], #4
8015d5e: 4770 bx lr
8015d60: 20008745 .word 0x20008745
08015d64 <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)
{
8015d64: b580 push {r7, lr}
8015d66: b084 sub sp, #16
8015d68: af00 add r7, sp, #0
8015d6a: 60f8 str r0, [r7, #12]
8015d6c: 60b9 str r1, [r7, #8]
8015d6e: 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)) {
8015d70: 68fb ldr r3, [r7, #12]
8015d72: 2b00 cmp r3, #0
8015d74: d00a beq.n 8015d8c <tcp_route+0x28>
8015d76: 68fb ldr r3, [r7, #12]
8015d78: 7a1b ldrb r3, [r3, #8]
8015d7a: 2b00 cmp r3, #0
8015d7c: d006 beq.n 8015d8c <tcp_route+0x28>
return netif_get_by_index(pcb->netif_idx);
8015d7e: 68fb ldr r3, [r7, #12]
8015d80: 7a1b ldrb r3, [r3, #8]
8015d82: 4618 mov r0, r3
8015d84: f7fb fb26 bl 80113d4 <netif_get_by_index>
8015d88: 4603 mov r3, r0
8015d8a: e003 b.n 8015d94 <tcp_route+0x30>
} else {
return ip_route(src, dst);
8015d8c: 6878 ldr r0, [r7, #4]
8015d8e: f005 f867 bl 801ae60 <ip4_route>
8015d92: 4603 mov r3, r0
}
}
8015d94: 4618 mov r0, r3
8015d96: 3710 adds r7, #16
8015d98: 46bd mov sp, r7
8015d9a: bd80 pop {r7, pc}
08015d9c <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)
{
8015d9c: b590 push {r4, r7, lr}
8015d9e: b087 sub sp, #28
8015da0: af00 add r7, sp, #0
8015da2: 60f8 str r0, [r7, #12]
8015da4: 60b9 str r1, [r7, #8]
8015da6: 603b str r3, [r7, #0]
8015da8: 4613 mov r3, r2
8015daa: 71fb strb r3, [r7, #7]
struct tcp_seg *seg;
u8_t optlen;
LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
8015dac: 68fb ldr r3, [r7, #12]
8015dae: 2b00 cmp r3, #0
8015db0: d105 bne.n 8015dbe <tcp_create_segment+0x22>
8015db2: 4b44 ldr r3, [pc, #272] ; (8015ec4 <tcp_create_segment+0x128>)
8015db4: 22a3 movs r2, #163 ; 0xa3
8015db6: 4944 ldr r1, [pc, #272] ; (8015ec8 <tcp_create_segment+0x12c>)
8015db8: 4844 ldr r0, [pc, #272] ; (8015ecc <tcp_create_segment+0x130>)
8015dba: f006 fbc5 bl 801c548 <iprintf>
LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
8015dbe: 68bb ldr r3, [r7, #8]
8015dc0: 2b00 cmp r3, #0
8015dc2: d105 bne.n 8015dd0 <tcp_create_segment+0x34>
8015dc4: 4b3f ldr r3, [pc, #252] ; (8015ec4 <tcp_create_segment+0x128>)
8015dc6: 22a4 movs r2, #164 ; 0xa4
8015dc8: 4941 ldr r1, [pc, #260] ; (8015ed0 <tcp_create_segment+0x134>)
8015dca: 4840 ldr r0, [pc, #256] ; (8015ecc <tcp_create_segment+0x130>)
8015dcc: f006 fbbc bl 801c548 <iprintf>
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
8015dd0: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
8015dd4: 009b lsls r3, r3, #2
8015dd6: b2db uxtb r3, r3
8015dd8: f003 0304 and.w r3, r3, #4
8015ddc: 75fb strb r3, [r7, #23]
if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) {
8015dde: 2003 movs r0, #3
8015de0: f7fa ff84 bl 8010cec <memp_malloc>
8015de4: 6138 str r0, [r7, #16]
8015de6: 693b ldr r3, [r7, #16]
8015de8: 2b00 cmp r3, #0
8015dea: d104 bne.n 8015df6 <tcp_create_segment+0x5a>
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n"));
pbuf_free(p);
8015dec: 68b8 ldr r0, [r7, #8]
8015dee: f7fb fe7b bl 8011ae8 <pbuf_free>
return NULL;
8015df2: 2300 movs r3, #0
8015df4: e061 b.n 8015eba <tcp_create_segment+0x11e>
}
seg->flags = optflags;
8015df6: 693b ldr r3, [r7, #16]
8015df8: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
8015dfc: 729a strb r2, [r3, #10]
seg->next = NULL;
8015dfe: 693b ldr r3, [r7, #16]
8015e00: 2200 movs r2, #0
8015e02: 601a str r2, [r3, #0]
seg->p = p;
8015e04: 693b ldr r3, [r7, #16]
8015e06: 68ba ldr r2, [r7, #8]
8015e08: 605a str r2, [r3, #4]
LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
8015e0a: 68bb ldr r3, [r7, #8]
8015e0c: 891a ldrh r2, [r3, #8]
8015e0e: 7dfb ldrb r3, [r7, #23]
8015e10: b29b uxth r3, r3
8015e12: 429a cmp r2, r3
8015e14: d205 bcs.n 8015e22 <tcp_create_segment+0x86>
8015e16: 4b2b ldr r3, [pc, #172] ; (8015ec4 <tcp_create_segment+0x128>)
8015e18: 22b0 movs r2, #176 ; 0xb0
8015e1a: 492e ldr r1, [pc, #184] ; (8015ed4 <tcp_create_segment+0x138>)
8015e1c: 482b ldr r0, [pc, #172] ; (8015ecc <tcp_create_segment+0x130>)
8015e1e: f006 fb93 bl 801c548 <iprintf>
seg->len = p->tot_len - optlen;
8015e22: 68bb ldr r3, [r7, #8]
8015e24: 891a ldrh r2, [r3, #8]
8015e26: 7dfb ldrb r3, [r7, #23]
8015e28: b29b uxth r3, r3
8015e2a: 1ad3 subs r3, r2, r3
8015e2c: b29a uxth r2, r3
8015e2e: 693b ldr r3, [r7, #16]
8015e30: 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)) {
8015e32: 2114 movs r1, #20
8015e34: 68b8 ldr r0, [r7, #8]
8015e36: f7fb fdc1 bl 80119bc <pbuf_add_header>
8015e3a: 4603 mov r3, r0
8015e3c: 2b00 cmp r3, #0
8015e3e: d004 beq.n 8015e4a <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);
8015e40: 6938 ldr r0, [r7, #16]
8015e42: f7fd f8d5 bl 8012ff0 <tcp_seg_free>
return NULL;
8015e46: 2300 movs r3, #0
8015e48: e037 b.n 8015eba <tcp_create_segment+0x11e>
}
seg->tcphdr = (struct tcp_hdr *)seg->p->payload;
8015e4a: 693b ldr r3, [r7, #16]
8015e4c: 685b ldr r3, [r3, #4]
8015e4e: 685a ldr r2, [r3, #4]
8015e50: 693b ldr r3, [r7, #16]
8015e52: 60da str r2, [r3, #12]
seg->tcphdr->src = lwip_htons(pcb->local_port);
8015e54: 68fb ldr r3, [r7, #12]
8015e56: 8ada ldrh r2, [r3, #22]
8015e58: 693b ldr r3, [r7, #16]
8015e5a: 68dc ldr r4, [r3, #12]
8015e5c: 4610 mov r0, r2
8015e5e: f7fa fa8f bl 8010380 <lwip_htons>
8015e62: 4603 mov r3, r0
8015e64: 8023 strh r3, [r4, #0]
seg->tcphdr->dest = lwip_htons(pcb->remote_port);
8015e66: 68fb ldr r3, [r7, #12]
8015e68: 8b1a ldrh r2, [r3, #24]
8015e6a: 693b ldr r3, [r7, #16]
8015e6c: 68dc ldr r4, [r3, #12]
8015e6e: 4610 mov r0, r2
8015e70: f7fa fa86 bl 8010380 <lwip_htons>
8015e74: 4603 mov r3, r0
8015e76: 8063 strh r3, [r4, #2]
seg->tcphdr->seqno = lwip_htonl(seqno);
8015e78: 693b ldr r3, [r7, #16]
8015e7a: 68dc ldr r4, [r3, #12]
8015e7c: 6838 ldr r0, [r7, #0]
8015e7e: f7fa fa94 bl 80103aa <lwip_htonl>
8015e82: 4603 mov r3, r0
8015e84: 6063 str r3, [r4, #4]
/* ackno is set in tcp_output */
TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags);
8015e86: 7dfb ldrb r3, [r7, #23]
8015e88: 089b lsrs r3, r3, #2
8015e8a: b2db uxtb r3, r3
8015e8c: b29b uxth r3, r3
8015e8e: 3305 adds r3, #5
8015e90: b29b uxth r3, r3
8015e92: 031b lsls r3, r3, #12
8015e94: b29a uxth r2, r3
8015e96: 79fb ldrb r3, [r7, #7]
8015e98: b29b uxth r3, r3
8015e9a: 4313 orrs r3, r2
8015e9c: b29a uxth r2, r3
8015e9e: 693b ldr r3, [r7, #16]
8015ea0: 68dc ldr r4, [r3, #12]
8015ea2: 4610 mov r0, r2
8015ea4: f7fa fa6c bl 8010380 <lwip_htons>
8015ea8: 4603 mov r3, r0
8015eaa: 81a3 strh r3, [r4, #12]
/* wnd and chksum are set in tcp_output */
seg->tcphdr->urgp = 0;
8015eac: 693b ldr r3, [r7, #16]
8015eae: 68db ldr r3, [r3, #12]
8015eb0: 2200 movs r2, #0
8015eb2: 749a strb r2, [r3, #18]
8015eb4: 2200 movs r2, #0
8015eb6: 74da strb r2, [r3, #19]
return seg;
8015eb8: 693b ldr r3, [r7, #16]
}
8015eba: 4618 mov r0, r3
8015ebc: 371c adds r7, #28
8015ebe: 46bd mov sp, r7
8015ec0: bd90 pop {r4, r7, pc}
8015ec2: bf00 nop
8015ec4: 0801efb0 .word 0x0801efb0
8015ec8: 0801efe4 .word 0x0801efe4
8015ecc: 0801f004 .word 0x0801f004
8015ed0: 0801f02c .word 0x0801f02c
8015ed4: 0801f050 .word 0x0801f050
08015ed8 <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)
{
8015ed8: b590 push {r4, r7, lr}
8015eda: b08b sub sp, #44 ; 0x2c
8015edc: af02 add r7, sp, #8
8015ede: 6078 str r0, [r7, #4]
8015ee0: 460b mov r3, r1
8015ee2: 807b strh r3, [r7, #2]
struct tcp_seg *seg = NULL, *useg = NULL;
8015ee4: 2300 movs r3, #0
8015ee6: 61fb str r3, [r7, #28]
8015ee8: 2300 movs r3, #0
8015eea: 617b str r3, [r7, #20]
struct pbuf *p = NULL;
8015eec: 2300 movs r3, #0
8015eee: 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);
8015ef0: 687b ldr r3, [r7, #4]
8015ef2: 2b00 cmp r3, #0
8015ef4: d106 bne.n 8015f04 <tcp_split_unsent_seg+0x2c>
8015ef6: 4b95 ldr r3, [pc, #596] ; (801614c <tcp_split_unsent_seg+0x274>)
8015ef8: f240 324b movw r2, #843 ; 0x34b
8015efc: 4994 ldr r1, [pc, #592] ; (8016150 <tcp_split_unsent_seg+0x278>)
8015efe: 4895 ldr r0, [pc, #596] ; (8016154 <tcp_split_unsent_seg+0x27c>)
8015f00: f006 fb22 bl 801c548 <iprintf>
useg = pcb->unsent;
8015f04: 687b ldr r3, [r7, #4]
8015f06: 6edb ldr r3, [r3, #108] ; 0x6c
8015f08: 617b str r3, [r7, #20]
if (useg == NULL) {
8015f0a: 697b ldr r3, [r7, #20]
8015f0c: 2b00 cmp r3, #0
8015f0e: d102 bne.n 8015f16 <tcp_split_unsent_seg+0x3e>
return ERR_MEM;
8015f10: f04f 33ff mov.w r3, #4294967295
8015f14: e116 b.n 8016144 <tcp_split_unsent_seg+0x26c>
}
if (split == 0) {
8015f16: 887b ldrh r3, [r7, #2]
8015f18: 2b00 cmp r3, #0
8015f1a: d109 bne.n 8015f30 <tcp_split_unsent_seg+0x58>
LWIP_ASSERT("Can't split segment into length 0", 0);
8015f1c: 4b8b ldr r3, [pc, #556] ; (801614c <tcp_split_unsent_seg+0x274>)
8015f1e: f240 3253 movw r2, #851 ; 0x353
8015f22: 498d ldr r1, [pc, #564] ; (8016158 <tcp_split_unsent_seg+0x280>)
8015f24: 488b ldr r0, [pc, #556] ; (8016154 <tcp_split_unsent_seg+0x27c>)
8015f26: f006 fb0f bl 801c548 <iprintf>
return ERR_VAL;
8015f2a: f06f 0305 mvn.w r3, #5
8015f2e: e109 b.n 8016144 <tcp_split_unsent_seg+0x26c>
}
if (useg->len <= split) {
8015f30: 697b ldr r3, [r7, #20]
8015f32: 891b ldrh r3, [r3, #8]
8015f34: 887a ldrh r2, [r7, #2]
8015f36: 429a cmp r2, r3
8015f38: d301 bcc.n 8015f3e <tcp_split_unsent_seg+0x66>
return ERR_OK;
8015f3a: 2300 movs r3, #0
8015f3c: e102 b.n 8016144 <tcp_split_unsent_seg+0x26c>
}
LWIP_ASSERT("split <= mss", split <= pcb->mss);
8015f3e: 687b ldr r3, [r7, #4]
8015f40: 8e5b ldrh r3, [r3, #50] ; 0x32
8015f42: 887a ldrh r2, [r7, #2]
8015f44: 429a cmp r2, r3
8015f46: d906 bls.n 8015f56 <tcp_split_unsent_seg+0x7e>
8015f48: 4b80 ldr r3, [pc, #512] ; (801614c <tcp_split_unsent_seg+0x274>)
8015f4a: f240 325b movw r2, #859 ; 0x35b
8015f4e: 4983 ldr r1, [pc, #524] ; (801615c <tcp_split_unsent_seg+0x284>)
8015f50: 4880 ldr r0, [pc, #512] ; (8016154 <tcp_split_unsent_seg+0x27c>)
8015f52: f006 faf9 bl 801c548 <iprintf>
LWIP_ASSERT("useg->len > 0", useg->len > 0);
8015f56: 697b ldr r3, [r7, #20]
8015f58: 891b ldrh r3, [r3, #8]
8015f5a: 2b00 cmp r3, #0
8015f5c: d106 bne.n 8015f6c <tcp_split_unsent_seg+0x94>
8015f5e: 4b7b ldr r3, [pc, #492] ; (801614c <tcp_split_unsent_seg+0x274>)
8015f60: f44f 7257 mov.w r2, #860 ; 0x35c
8015f64: 497e ldr r1, [pc, #504] ; (8016160 <tcp_split_unsent_seg+0x288>)
8015f66: 487b ldr r0, [pc, #492] ; (8016154 <tcp_split_unsent_seg+0x27c>)
8015f68: f006 faee bl 801c548 <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;
8015f6c: 697b ldr r3, [r7, #20]
8015f6e: 7a9b ldrb r3, [r3, #10]
8015f70: 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);
8015f72: 7bfb ldrb r3, [r7, #15]
8015f74: 009b lsls r3, r3, #2
8015f76: b2db uxtb r3, r3
8015f78: f003 0304 and.w r3, r3, #4
8015f7c: 73bb strb r3, [r7, #14]
remainder = useg->len - split;
8015f7e: 697b ldr r3, [r7, #20]
8015f80: 891a ldrh r2, [r3, #8]
8015f82: 887b ldrh r3, [r7, #2]
8015f84: 1ad3 subs r3, r2, r3
8015f86: 81bb strh r3, [r7, #12]
/* Create new pbuf for the remainder of the split */
p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM);
8015f88: 7bbb ldrb r3, [r7, #14]
8015f8a: b29a uxth r2, r3
8015f8c: 89bb ldrh r3, [r7, #12]
8015f8e: 4413 add r3, r2
8015f90: b29b uxth r3, r3
8015f92: f44f 7220 mov.w r2, #640 ; 0x280
8015f96: 4619 mov r1, r3
8015f98: 2036 movs r0, #54 ; 0x36
8015f9a: f7fb fac5 bl 8011528 <pbuf_alloc>
8015f9e: 6138 str r0, [r7, #16]
if (p == NULL) {
8015fa0: 693b ldr r3, [r7, #16]
8015fa2: 2b00 cmp r3, #0
8015fa4: f000 80b7 beq.w 8016116 <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;
8015fa8: 697b ldr r3, [r7, #20]
8015faa: 685b ldr r3, [r3, #4]
8015fac: 891a ldrh r2, [r3, #8]
8015fae: 697b ldr r3, [r7, #20]
8015fb0: 891b ldrh r3, [r3, #8]
8015fb2: 1ad3 subs r3, r2, r3
8015fb4: b29a uxth r2, r3
8015fb6: 887b ldrh r3, [r7, #2]
8015fb8: 4413 add r3, r2
8015fba: 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) {
8015fbc: 697b ldr r3, [r7, #20]
8015fbe: 6858 ldr r0, [r3, #4]
8015fc0: 693b ldr r3, [r7, #16]
8015fc2: 685a ldr r2, [r3, #4]
8015fc4: 7bbb ldrb r3, [r7, #14]
8015fc6: 18d1 adds r1, r2, r3
8015fc8: 897b ldrh r3, [r7, #10]
8015fca: 89ba ldrh r2, [r7, #12]
8015fcc: f7fb ff92 bl 8011ef4 <pbuf_copy_partial>
8015fd0: 4603 mov r3, r0
8015fd2: 461a mov r2, r3
8015fd4: 89bb ldrh r3, [r7, #12]
8015fd6: 4293 cmp r3, r2
8015fd8: f040 809f bne.w 801611a <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);
8015fdc: 697b ldr r3, [r7, #20]
8015fde: 68db ldr r3, [r3, #12]
8015fe0: 899b ldrh r3, [r3, #12]
8015fe2: b29b uxth r3, r3
8015fe4: 4618 mov r0, r3
8015fe6: f7fa f9cb bl 8010380 <lwip_htons>
8015fea: 4603 mov r3, r0
8015fec: b2db uxtb r3, r3
8015fee: f003 033f and.w r3, r3, #63 ; 0x3f
8015ff2: 76fb strb r3, [r7, #27]
remainder_flags = 0; /* ACK added in tcp_output() */
8015ff4: 2300 movs r3, #0
8015ff6: 76bb strb r3, [r7, #26]
if (split_flags & TCP_PSH) {
8015ff8: 7efb ldrb r3, [r7, #27]
8015ffa: f003 0308 and.w r3, r3, #8
8015ffe: 2b00 cmp r3, #0
8016000: d007 beq.n 8016012 <tcp_split_unsent_seg+0x13a>
split_flags &= ~TCP_PSH;
8016002: 7efb ldrb r3, [r7, #27]
8016004: f023 0308 bic.w r3, r3, #8
8016008: 76fb strb r3, [r7, #27]
remainder_flags |= TCP_PSH;
801600a: 7ebb ldrb r3, [r7, #26]
801600c: f043 0308 orr.w r3, r3, #8
8016010: 76bb strb r3, [r7, #26]
}
if (split_flags & TCP_FIN) {
8016012: 7efb ldrb r3, [r7, #27]
8016014: f003 0301 and.w r3, r3, #1
8016018: 2b00 cmp r3, #0
801601a: d007 beq.n 801602c <tcp_split_unsent_seg+0x154>
split_flags &= ~TCP_FIN;
801601c: 7efb ldrb r3, [r7, #27]
801601e: f023 0301 bic.w r3, r3, #1
8016022: 76fb strb r3, [r7, #27]
remainder_flags |= TCP_FIN;
8016024: 7ebb ldrb r3, [r7, #26]
8016026: f043 0301 orr.w r3, r3, #1
801602a: 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);
801602c: 697b ldr r3, [r7, #20]
801602e: 68db ldr r3, [r3, #12]
8016030: 685b ldr r3, [r3, #4]
8016032: 4618 mov r0, r3
8016034: f7fa f9b9 bl 80103aa <lwip_htonl>
8016038: 4602 mov r2, r0
801603a: 887b ldrh r3, [r7, #2]
801603c: 18d1 adds r1, r2, r3
801603e: 7eba ldrb r2, [r7, #26]
8016040: 7bfb ldrb r3, [r7, #15]
8016042: 9300 str r3, [sp, #0]
8016044: 460b mov r3, r1
8016046: 6939 ldr r1, [r7, #16]
8016048: 6878 ldr r0, [r7, #4]
801604a: f7ff fea7 bl 8015d9c <tcp_create_segment>
801604e: 61f8 str r0, [r7, #28]
if (seg == NULL) {
8016050: 69fb ldr r3, [r7, #28]
8016052: 2b00 cmp r3, #0
8016054: d063 beq.n 801611e <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);
8016056: 697b ldr r3, [r7, #20]
8016058: 685b ldr r3, [r3, #4]
801605a: 4618 mov r0, r3
801605c: f7fb fdd2 bl 8011c04 <pbuf_clen>
8016060: 4603 mov r3, r0
8016062: 461a mov r2, r3
8016064: 687b ldr r3, [r7, #4]
8016066: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
801606a: 1a9b subs r3, r3, r2
801606c: b29a uxth r2, r3
801606e: 687b ldr r3, [r7, #4]
8016070: 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);
8016074: 697b ldr r3, [r7, #20]
8016076: 6858 ldr r0, [r3, #4]
8016078: 697b ldr r3, [r7, #20]
801607a: 685b ldr r3, [r3, #4]
801607c: 891a ldrh r2, [r3, #8]
801607e: 89bb ldrh r3, [r7, #12]
8016080: 1ad3 subs r3, r2, r3
8016082: b29b uxth r3, r3
8016084: 4619 mov r1, r3
8016086: f7fb fba9 bl 80117dc <pbuf_realloc>
useg->len -= remainder;
801608a: 697b ldr r3, [r7, #20]
801608c: 891a ldrh r2, [r3, #8]
801608e: 89bb ldrh r3, [r7, #12]
8016090: 1ad3 subs r3, r2, r3
8016092: b29a uxth r2, r3
8016094: 697b ldr r3, [r7, #20]
8016096: 811a strh r2, [r3, #8]
TCPH_SET_FLAG(useg->tcphdr, split_flags);
8016098: 697b ldr r3, [r7, #20]
801609a: 68db ldr r3, [r3, #12]
801609c: 899b ldrh r3, [r3, #12]
801609e: b29c uxth r4, r3
80160a0: 7efb ldrb r3, [r7, #27]
80160a2: b29b uxth r3, r3
80160a4: 4618 mov r0, r3
80160a6: f7fa f96b bl 8010380 <lwip_htons>
80160aa: 4603 mov r3, r0
80160ac: 461a mov r2, r3
80160ae: 697b ldr r3, [r7, #20]
80160b0: 68db ldr r3, [r3, #12]
80160b2: 4322 orrs r2, r4
80160b4: b292 uxth r2, r2
80160b6: 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);
80160b8: 697b ldr r3, [r7, #20]
80160ba: 685b ldr r3, [r3, #4]
80160bc: 4618 mov r0, r3
80160be: f7fb fda1 bl 8011c04 <pbuf_clen>
80160c2: 4603 mov r3, r0
80160c4: 461a mov r2, r3
80160c6: 687b ldr r3, [r7, #4]
80160c8: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
80160cc: 4413 add r3, r2
80160ce: b29a uxth r2, r3
80160d0: 687b ldr r3, [r7, #4]
80160d2: 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);
80160d6: 69fb ldr r3, [r7, #28]
80160d8: 685b ldr r3, [r3, #4]
80160da: 4618 mov r0, r3
80160dc: f7fb fd92 bl 8011c04 <pbuf_clen>
80160e0: 4603 mov r3, r0
80160e2: 461a mov r2, r3
80160e4: 687b ldr r3, [r7, #4]
80160e6: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
80160ea: 4413 add r3, r2
80160ec: b29a uxth r2, r3
80160ee: 687b ldr r3, [r7, #4]
80160f0: f8a3 2066 strh.w r2, [r3, #102] ; 0x66
/* Finally insert remainder into queue after split (which stays head) */
seg->next = useg->next;
80160f4: 697b ldr r3, [r7, #20]
80160f6: 681a ldr r2, [r3, #0]
80160f8: 69fb ldr r3, [r7, #28]
80160fa: 601a str r2, [r3, #0]
useg->next = seg;
80160fc: 697b ldr r3, [r7, #20]
80160fe: 69fa ldr r2, [r7, #28]
8016100: 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) {
8016102: 69fb ldr r3, [r7, #28]
8016104: 681b ldr r3, [r3, #0]
8016106: 2b00 cmp r3, #0
8016108: d103 bne.n 8016112 <tcp_split_unsent_seg+0x23a>
pcb->unsent_oversize = 0;
801610a: 687b ldr r3, [r7, #4]
801610c: 2200 movs r2, #0
801610e: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
}
#endif /* TCP_OVERSIZE */
return ERR_OK;
8016112: 2300 movs r3, #0
8016114: e016 b.n 8016144 <tcp_split_unsent_seg+0x26c>
goto memerr;
8016116: bf00 nop
8016118: e002 b.n 8016120 <tcp_split_unsent_seg+0x248>
goto memerr;
801611a: bf00 nop
801611c: e000 b.n 8016120 <tcp_split_unsent_seg+0x248>
goto memerr;
801611e: bf00 nop
memerr:
TCP_STATS_INC(tcp.memerr);
LWIP_ASSERT("seg == NULL", seg == NULL);
8016120: 69fb ldr r3, [r7, #28]
8016122: 2b00 cmp r3, #0
8016124: d006 beq.n 8016134 <tcp_split_unsent_seg+0x25c>
8016126: 4b09 ldr r3, [pc, #36] ; (801614c <tcp_split_unsent_seg+0x274>)
8016128: f44f 7276 mov.w r2, #984 ; 0x3d8
801612c: 490d ldr r1, [pc, #52] ; (8016164 <tcp_split_unsent_seg+0x28c>)
801612e: 4809 ldr r0, [pc, #36] ; (8016154 <tcp_split_unsent_seg+0x27c>)
8016130: f006 fa0a bl 801c548 <iprintf>
if (p != NULL) {
8016134: 693b ldr r3, [r7, #16]
8016136: 2b00 cmp r3, #0
8016138: d002 beq.n 8016140 <tcp_split_unsent_seg+0x268>
pbuf_free(p);
801613a: 6938 ldr r0, [r7, #16]
801613c: f7fb fcd4 bl 8011ae8 <pbuf_free>
}
return ERR_MEM;
8016140: f04f 33ff mov.w r3, #4294967295
}
8016144: 4618 mov r0, r3
8016146: 3724 adds r7, #36 ; 0x24
8016148: 46bd mov sp, r7
801614a: bd90 pop {r4, r7, pc}
801614c: 0801efb0 .word 0x0801efb0
8016150: 0801f344 .word 0x0801f344
8016154: 0801f004 .word 0x0801f004
8016158: 0801f368 .word 0x0801f368
801615c: 0801f38c .word 0x0801f38c
8016160: 0801f39c .word 0x0801f39c
8016164: 0801f3ac .word 0x0801f3ac
08016168 <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)
{
8016168: b590 push {r4, r7, lr}
801616a: b085 sub sp, #20
801616c: af00 add r7, sp, #0
801616e: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
8016170: 687b ldr r3, [r7, #4]
8016172: 2b00 cmp r3, #0
8016174: d106 bne.n 8016184 <tcp_send_fin+0x1c>
8016176: 4b21 ldr r3, [pc, #132] ; (80161fc <tcp_send_fin+0x94>)
8016178: f240 32eb movw r2, #1003 ; 0x3eb
801617c: 4920 ldr r1, [pc, #128] ; (8016200 <tcp_send_fin+0x98>)
801617e: 4821 ldr r0, [pc, #132] ; (8016204 <tcp_send_fin+0x9c>)
8016180: f006 f9e2 bl 801c548 <iprintf>
/* first, try to add the fin to the last unsent segment */
if (pcb->unsent != NULL) {
8016184: 687b ldr r3, [r7, #4]
8016186: 6edb ldr r3, [r3, #108] ; 0x6c
8016188: 2b00 cmp r3, #0
801618a: d02e beq.n 80161ea <tcp_send_fin+0x82>
struct tcp_seg *last_unsent;
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
801618c: 687b ldr r3, [r7, #4]
801618e: 6edb ldr r3, [r3, #108] ; 0x6c
8016190: 60fb str r3, [r7, #12]
8016192: e002 b.n 801619a <tcp_send_fin+0x32>
last_unsent = last_unsent->next);
8016194: 68fb ldr r3, [r7, #12]
8016196: 681b ldr r3, [r3, #0]
8016198: 60fb str r3, [r7, #12]
for (last_unsent = pcb->unsent; last_unsent->next != NULL;
801619a: 68fb ldr r3, [r7, #12]
801619c: 681b ldr r3, [r3, #0]
801619e: 2b00 cmp r3, #0
80161a0: d1f8 bne.n 8016194 <tcp_send_fin+0x2c>
if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) {
80161a2: 68fb ldr r3, [r7, #12]
80161a4: 68db ldr r3, [r3, #12]
80161a6: 899b ldrh r3, [r3, #12]
80161a8: b29b uxth r3, r3
80161aa: 4618 mov r0, r3
80161ac: f7fa f8e8 bl 8010380 <lwip_htons>
80161b0: 4603 mov r3, r0
80161b2: b2db uxtb r3, r3
80161b4: f003 0307 and.w r3, r3, #7
80161b8: 2b00 cmp r3, #0
80161ba: d116 bne.n 80161ea <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);
80161bc: 68fb ldr r3, [r7, #12]
80161be: 68db ldr r3, [r3, #12]
80161c0: 899b ldrh r3, [r3, #12]
80161c2: b29c uxth r4, r3
80161c4: 2001 movs r0, #1
80161c6: f7fa f8db bl 8010380 <lwip_htons>
80161ca: 4603 mov r3, r0
80161cc: 461a mov r2, r3
80161ce: 68fb ldr r3, [r7, #12]
80161d0: 68db ldr r3, [r3, #12]
80161d2: 4322 orrs r2, r4
80161d4: b292 uxth r2, r2
80161d6: 819a strh r2, [r3, #12]
tcp_set_flags(pcb, TF_FIN);
80161d8: 687b ldr r3, [r7, #4]
80161da: 8b5b ldrh r3, [r3, #26]
80161dc: f043 0320 orr.w r3, r3, #32
80161e0: b29a uxth r2, r3
80161e2: 687b ldr r3, [r7, #4]
80161e4: 835a strh r2, [r3, #26]
return ERR_OK;
80161e6: 2300 movs r3, #0
80161e8: e004 b.n 80161f4 <tcp_send_fin+0x8c>
}
}
/* no data, no length, flags, copy=1, no optdata */
return tcp_enqueue_flags(pcb, TCP_FIN);
80161ea: 2101 movs r1, #1
80161ec: 6878 ldr r0, [r7, #4]
80161ee: f000 f80b bl 8016208 <tcp_enqueue_flags>
80161f2: 4603 mov r3, r0
}
80161f4: 4618 mov r0, r3
80161f6: 3714 adds r7, #20
80161f8: 46bd mov sp, r7
80161fa: bd90 pop {r4, r7, pc}
80161fc: 0801efb0 .word 0x0801efb0
8016200: 0801f3b8 .word 0x0801f3b8
8016204: 0801f004 .word 0x0801f004
08016208 <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)
{
8016208: b580 push {r7, lr}
801620a: b08a sub sp, #40 ; 0x28
801620c: af02 add r7, sp, #8
801620e: 6078 str r0, [r7, #4]
8016210: 460b mov r3, r1
8016212: 70fb strb r3, [r7, #3]
struct pbuf *p;
struct tcp_seg *seg;
u8_t optflags = 0;
8016214: 2300 movs r3, #0
8016216: 77fb strb r3, [r7, #31]
u8_t optlen = 0;
8016218: 2300 movs r3, #0
801621a: 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)",
801621c: 78fb ldrb r3, [r7, #3]
801621e: f003 0303 and.w r3, r3, #3
8016222: 2b00 cmp r3, #0
8016224: d106 bne.n 8016234 <tcp_enqueue_flags+0x2c>
8016226: 4b67 ldr r3, [pc, #412] ; (80163c4 <tcp_enqueue_flags+0x1bc>)
8016228: f240 4212 movw r2, #1042 ; 0x412
801622c: 4966 ldr r1, [pc, #408] ; (80163c8 <tcp_enqueue_flags+0x1c0>)
801622e: 4867 ldr r0, [pc, #412] ; (80163cc <tcp_enqueue_flags+0x1c4>)
8016230: f006 f98a bl 801c548 <iprintf>
(flags & (TCP_SYN | TCP_FIN)) != 0);
LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
8016234: 687b ldr r3, [r7, #4]
8016236: 2b00 cmp r3, #0
8016238: d106 bne.n 8016248 <tcp_enqueue_flags+0x40>
801623a: 4b62 ldr r3, [pc, #392] ; (80163c4 <tcp_enqueue_flags+0x1bc>)
801623c: f240 4213 movw r2, #1043 ; 0x413
8016240: 4963 ldr r1, [pc, #396] ; (80163d0 <tcp_enqueue_flags+0x1c8>)
8016242: 4862 ldr r0, [pc, #392] ; (80163cc <tcp_enqueue_flags+0x1c4>)
8016244: f006 f980 bl 801c548 <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) {
8016248: 78fb ldrb r3, [r7, #3]
801624a: f003 0302 and.w r3, r3, #2
801624e: 2b00 cmp r3, #0
8016250: d001 beq.n 8016256 <tcp_enqueue_flags+0x4e>
optflags = TF_SEG_OPTS_MSS;
8016252: 2301 movs r3, #1
8016254: 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);
8016256: 7ffb ldrb r3, [r7, #31]
8016258: 009b lsls r3, r3, #2
801625a: b2db uxtb r3, r3
801625c: f003 0304 and.w r3, r3, #4
8016260: 75fb strb r3, [r7, #23]
/* Allocate pbuf with room for TCP header + options */
if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
8016262: 7dfb ldrb r3, [r7, #23]
8016264: b29b uxth r3, r3
8016266: f44f 7220 mov.w r2, #640 ; 0x280
801626a: 4619 mov r1, r3
801626c: 2036 movs r0, #54 ; 0x36
801626e: f7fb f95b bl 8011528 <pbuf_alloc>
8016272: 6138 str r0, [r7, #16]
8016274: 693b ldr r3, [r7, #16]
8016276: 2b00 cmp r3, #0
8016278: d109 bne.n 801628e <tcp_enqueue_flags+0x86>
tcp_set_flags(pcb, TF_NAGLEMEMERR);
801627a: 687b ldr r3, [r7, #4]
801627c: 8b5b ldrh r3, [r3, #26]
801627e: f043 0380 orr.w r3, r3, #128 ; 0x80
8016282: b29a uxth r2, r3
8016284: 687b ldr r3, [r7, #4]
8016286: 835a strh r2, [r3, #26]
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
8016288: f04f 33ff mov.w r3, #4294967295
801628c: e095 b.n 80163ba <tcp_enqueue_flags+0x1b2>
}
LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
801628e: 693b ldr r3, [r7, #16]
8016290: 895a ldrh r2, [r3, #10]
8016292: 7dfb ldrb r3, [r7, #23]
8016294: b29b uxth r3, r3
8016296: 429a cmp r2, r3
8016298: d206 bcs.n 80162a8 <tcp_enqueue_flags+0xa0>
801629a: 4b4a ldr r3, [pc, #296] ; (80163c4 <tcp_enqueue_flags+0x1bc>)
801629c: f240 423a movw r2, #1082 ; 0x43a
80162a0: 494c ldr r1, [pc, #304] ; (80163d4 <tcp_enqueue_flags+0x1cc>)
80162a2: 484a ldr r0, [pc, #296] ; (80163cc <tcp_enqueue_flags+0x1c4>)
80162a4: f006 f950 bl 801c548 <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) {
80162a8: 687b ldr r3, [r7, #4]
80162aa: 6dd9 ldr r1, [r3, #92] ; 0x5c
80162ac: 78fa ldrb r2, [r7, #3]
80162ae: 7ffb ldrb r3, [r7, #31]
80162b0: 9300 str r3, [sp, #0]
80162b2: 460b mov r3, r1
80162b4: 6939 ldr r1, [r7, #16]
80162b6: 6878 ldr r0, [r7, #4]
80162b8: f7ff fd70 bl 8015d9c <tcp_create_segment>
80162bc: 60f8 str r0, [r7, #12]
80162be: 68fb ldr r3, [r7, #12]
80162c0: 2b00 cmp r3, #0
80162c2: d109 bne.n 80162d8 <tcp_enqueue_flags+0xd0>
tcp_set_flags(pcb, TF_NAGLEMEMERR);
80162c4: 687b ldr r3, [r7, #4]
80162c6: 8b5b ldrh r3, [r3, #26]
80162c8: f043 0380 orr.w r3, r3, #128 ; 0x80
80162cc: b29a uxth r2, r3
80162ce: 687b ldr r3, [r7, #4]
80162d0: 835a strh r2, [r3, #26]
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
80162d2: f04f 33ff mov.w r3, #4294967295
80162d6: e070 b.n 80163ba <tcp_enqueue_flags+0x1b2>
}
LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
80162d8: 68fb ldr r3, [r7, #12]
80162da: 68db ldr r3, [r3, #12]
80162dc: f003 0303 and.w r3, r3, #3
80162e0: 2b00 cmp r3, #0
80162e2: d006 beq.n 80162f2 <tcp_enqueue_flags+0xea>
80162e4: 4b37 ldr r3, [pc, #220] ; (80163c4 <tcp_enqueue_flags+0x1bc>)
80162e6: f240 4242 movw r2, #1090 ; 0x442
80162ea: 493b ldr r1, [pc, #236] ; (80163d8 <tcp_enqueue_flags+0x1d0>)
80162ec: 4837 ldr r0, [pc, #220] ; (80163cc <tcp_enqueue_flags+0x1c4>)
80162ee: f006 f92b bl 801c548 <iprintf>
LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
80162f2: 68fb ldr r3, [r7, #12]
80162f4: 891b ldrh r3, [r3, #8]
80162f6: 2b00 cmp r3, #0
80162f8: d006 beq.n 8016308 <tcp_enqueue_flags+0x100>
80162fa: 4b32 ldr r3, [pc, #200] ; (80163c4 <tcp_enqueue_flags+0x1bc>)
80162fc: f240 4243 movw r2, #1091 ; 0x443
8016300: 4936 ldr r1, [pc, #216] ; (80163dc <tcp_enqueue_flags+0x1d4>)
8016302: 4832 ldr r0, [pc, #200] ; (80163cc <tcp_enqueue_flags+0x1c4>)
8016304: f006 f920 bl 801c548 <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) {
8016308: 687b ldr r3, [r7, #4]
801630a: 6edb ldr r3, [r3, #108] ; 0x6c
801630c: 2b00 cmp r3, #0
801630e: d103 bne.n 8016318 <tcp_enqueue_flags+0x110>
pcb->unsent = seg;
8016310: 687b ldr r3, [r7, #4]
8016312: 68fa ldr r2, [r7, #12]
8016314: 66da str r2, [r3, #108] ; 0x6c
8016316: e00d b.n 8016334 <tcp_enqueue_flags+0x12c>
} else {
struct tcp_seg *useg;
for (useg = pcb->unsent; useg->next != NULL; useg = useg->next);
8016318: 687b ldr r3, [r7, #4]
801631a: 6edb ldr r3, [r3, #108] ; 0x6c
801631c: 61bb str r3, [r7, #24]
801631e: e002 b.n 8016326 <tcp_enqueue_flags+0x11e>
8016320: 69bb ldr r3, [r7, #24]
8016322: 681b ldr r3, [r3, #0]
8016324: 61bb str r3, [r7, #24]
8016326: 69bb ldr r3, [r7, #24]
8016328: 681b ldr r3, [r3, #0]
801632a: 2b00 cmp r3, #0
801632c: d1f8 bne.n 8016320 <tcp_enqueue_flags+0x118>
useg->next = seg;
801632e: 69bb ldr r3, [r7, #24]
8016330: 68fa ldr r2, [r7, #12]
8016332: 601a str r2, [r3, #0]
}
#if TCP_OVERSIZE
/* The new unsent tail has no space */
pcb->unsent_oversize = 0;
8016334: 687b ldr r3, [r7, #4]
8016336: 2200 movs r2, #0
8016338: 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)) {
801633c: 78fb ldrb r3, [r7, #3]
801633e: f003 0302 and.w r3, r3, #2
8016342: 2b00 cmp r3, #0
8016344: d104 bne.n 8016350 <tcp_enqueue_flags+0x148>
8016346: 78fb ldrb r3, [r7, #3]
8016348: f003 0301 and.w r3, r3, #1
801634c: 2b00 cmp r3, #0
801634e: d004 beq.n 801635a <tcp_enqueue_flags+0x152>
pcb->snd_lbb++;
8016350: 687b ldr r3, [r7, #4]
8016352: 6ddb ldr r3, [r3, #92] ; 0x5c
8016354: 1c5a adds r2, r3, #1
8016356: 687b ldr r3, [r7, #4]
8016358: 65da str r2, [r3, #92] ; 0x5c
/* optlen does not influence snd_buf */
}
if (flags & TCP_FIN) {
801635a: 78fb ldrb r3, [r7, #3]
801635c: f003 0301 and.w r3, r3, #1
8016360: 2b00 cmp r3, #0
8016362: d006 beq.n 8016372 <tcp_enqueue_flags+0x16a>
tcp_set_flags(pcb, TF_FIN);
8016364: 687b ldr r3, [r7, #4]
8016366: 8b5b ldrh r3, [r3, #26]
8016368: f043 0320 orr.w r3, r3, #32
801636c: b29a uxth r2, r3
801636e: 687b ldr r3, [r7, #4]
8016370: 835a strh r2, [r3, #26]
}
/* update number of segments on the queues */
pcb->snd_queuelen += pbuf_clen(seg->p);
8016372: 68fb ldr r3, [r7, #12]
8016374: 685b ldr r3, [r3, #4]
8016376: 4618 mov r0, r3
8016378: f7fb fc44 bl 8011c04 <pbuf_clen>
801637c: 4603 mov r3, r0
801637e: 461a mov r2, r3
8016380: 687b ldr r3, [r7, #4]
8016382: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8016386: 4413 add r3, r2
8016388: b29a uxth r2, r3
801638a: 687b ldr r3, [r7, #4]
801638c: 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) {
8016390: 687b ldr r3, [r7, #4]
8016392: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
8016396: 2b00 cmp r3, #0
8016398: d00e beq.n 80163b8 <tcp_enqueue_flags+0x1b0>
LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
801639a: 687b ldr r3, [r7, #4]
801639c: 6f1b ldr r3, [r3, #112] ; 0x70
801639e: 2b00 cmp r3, #0
80163a0: d10a bne.n 80163b8 <tcp_enqueue_flags+0x1b0>
80163a2: 687b ldr r3, [r7, #4]
80163a4: 6edb ldr r3, [r3, #108] ; 0x6c
80163a6: 2b00 cmp r3, #0
80163a8: d106 bne.n 80163b8 <tcp_enqueue_flags+0x1b0>
80163aa: 4b06 ldr r3, [pc, #24] ; (80163c4 <tcp_enqueue_flags+0x1bc>)
80163ac: f240 4266 movw r2, #1126 ; 0x466
80163b0: 490b ldr r1, [pc, #44] ; (80163e0 <tcp_enqueue_flags+0x1d8>)
80163b2: 4806 ldr r0, [pc, #24] ; (80163cc <tcp_enqueue_flags+0x1c4>)
80163b4: f006 f8c8 bl 801c548 <iprintf>
pcb->unacked != NULL || pcb->unsent != NULL);
}
return ERR_OK;
80163b8: 2300 movs r3, #0
}
80163ba: 4618 mov r0, r3
80163bc: 3720 adds r7, #32
80163be: 46bd mov sp, r7
80163c0: bd80 pop {r7, pc}
80163c2: bf00 nop
80163c4: 0801efb0 .word 0x0801efb0
80163c8: 0801f3d4 .word 0x0801f3d4
80163cc: 0801f004 .word 0x0801f004
80163d0: 0801f42c .word 0x0801f42c
80163d4: 0801f44c .word 0x0801f44c
80163d8: 0801f488 .word 0x0801f488
80163dc: 0801f4a0 .word 0x0801f4a0
80163e0: 0801f4cc .word 0x0801f4cc
080163e4 <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)
{
80163e4: b5b0 push {r4, r5, r7, lr}
80163e6: b08a sub sp, #40 ; 0x28
80163e8: af00 add r7, sp, #0
80163ea: 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);
80163ec: 687b ldr r3, [r7, #4]
80163ee: 2b00 cmp r3, #0
80163f0: d106 bne.n 8016400 <tcp_output+0x1c>
80163f2: 4ba0 ldr r3, [pc, #640] ; (8016674 <tcp_output+0x290>)
80163f4: f240 42e1 movw r2, #1249 ; 0x4e1
80163f8: 499f ldr r1, [pc, #636] ; (8016678 <tcp_output+0x294>)
80163fa: 48a0 ldr r0, [pc, #640] ; (801667c <tcp_output+0x298>)
80163fc: f006 f8a4 bl 801c548 <iprintf>
/* pcb->state LISTEN not allowed here */
LWIP_ASSERT("don't call tcp_output for listen-pcbs",
8016400: 687b ldr r3, [r7, #4]
8016402: 7d1b ldrb r3, [r3, #20]
8016404: 2b01 cmp r3, #1
8016406: d106 bne.n 8016416 <tcp_output+0x32>
8016408: 4b9a ldr r3, [pc, #616] ; (8016674 <tcp_output+0x290>)
801640a: f240 42e4 movw r2, #1252 ; 0x4e4
801640e: 499c ldr r1, [pc, #624] ; (8016680 <tcp_output+0x29c>)
8016410: 489a ldr r0, [pc, #616] ; (801667c <tcp_output+0x298>)
8016412: f006 f899 bl 801c548 <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) {
8016416: 4b9b ldr r3, [pc, #620] ; (8016684 <tcp_output+0x2a0>)
8016418: 681b ldr r3, [r3, #0]
801641a: 687a ldr r2, [r7, #4]
801641c: 429a cmp r2, r3
801641e: d101 bne.n 8016424 <tcp_output+0x40>
return ERR_OK;
8016420: 2300 movs r3, #0
8016422: e1d2 b.n 80167ca <tcp_output+0x3e6>
}
wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
8016424: 687b ldr r3, [r7, #4]
8016426: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60
801642a: 687b ldr r3, [r7, #4]
801642c: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8016430: 429a cmp r2, r3
8016432: d203 bcs.n 801643c <tcp_output+0x58>
8016434: 687b ldr r3, [r7, #4]
8016436: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
801643a: e002 b.n 8016442 <tcp_output+0x5e>
801643c: 687b ldr r3, [r7, #4]
801643e: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8016442: 61bb str r3, [r7, #24]
seg = pcb->unsent;
8016444: 687b ldr r3, [r7, #4]
8016446: 6edb ldr r3, [r3, #108] ; 0x6c
8016448: 627b str r3, [r7, #36] ; 0x24
if (seg == NULL) {
801644a: 6a7b ldr r3, [r7, #36] ; 0x24
801644c: 2b00 cmp r3, #0
801644e: d10b bne.n 8016468 <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) {
8016450: 687b ldr r3, [r7, #4]
8016452: 8b5b ldrh r3, [r3, #26]
8016454: f003 0302 and.w r3, r3, #2
8016458: 2b00 cmp r3, #0
801645a: f000 81a9 beq.w 80167b0 <tcp_output+0x3cc>
return tcp_send_empty_ack(pcb);
801645e: 6878 ldr r0, [r7, #4]
8016460: f000 fdd8 bl 8017014 <tcp_send_empty_ack>
8016464: 4603 mov r3, r0
8016466: e1b0 b.n 80167ca <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);
8016468: 6879 ldr r1, [r7, #4]
801646a: 687b ldr r3, [r7, #4]
801646c: 3304 adds r3, #4
801646e: 461a mov r2, r3
8016470: 6878 ldr r0, [r7, #4]
8016472: f7ff fc77 bl 8015d64 <tcp_route>
8016476: 6178 str r0, [r7, #20]
if (netif == NULL) {
8016478: 697b ldr r3, [r7, #20]
801647a: 2b00 cmp r3, #0
801647c: d102 bne.n 8016484 <tcp_output+0xa0>
return ERR_RTE;
801647e: f06f 0303 mvn.w r3, #3
8016482: e1a2 b.n 80167ca <tcp_output+0x3e6>
}
/* If we don't have a local IP address, we get one from netif */
if (ip_addr_isany(&pcb->local_ip)) {
8016484: 687b ldr r3, [r7, #4]
8016486: 2b00 cmp r3, #0
8016488: d003 beq.n 8016492 <tcp_output+0xae>
801648a: 687b ldr r3, [r7, #4]
801648c: 681b ldr r3, [r3, #0]
801648e: 2b00 cmp r3, #0
8016490: d111 bne.n 80164b6 <tcp_output+0xd2>
const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip);
8016492: 697b ldr r3, [r7, #20]
8016494: 2b00 cmp r3, #0
8016496: d002 beq.n 801649e <tcp_output+0xba>
8016498: 697b ldr r3, [r7, #20]
801649a: 3304 adds r3, #4
801649c: e000 b.n 80164a0 <tcp_output+0xbc>
801649e: 2300 movs r3, #0
80164a0: 613b str r3, [r7, #16]
if (local_ip == NULL) {
80164a2: 693b ldr r3, [r7, #16]
80164a4: 2b00 cmp r3, #0
80164a6: d102 bne.n 80164ae <tcp_output+0xca>
return ERR_RTE;
80164a8: f06f 0303 mvn.w r3, #3
80164ac: e18d b.n 80167ca <tcp_output+0x3e6>
}
ip_addr_copy(pcb->local_ip, *local_ip);
80164ae: 693b ldr r3, [r7, #16]
80164b0: 681a ldr r2, [r3, #0]
80164b2: 687b ldr r3, [r7, #4]
80164b4: 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) {
80164b6: 6a7b ldr r3, [r7, #36] ; 0x24
80164b8: 68db ldr r3, [r3, #12]
80164ba: 685b ldr r3, [r3, #4]
80164bc: 4618 mov r0, r3
80164be: f7f9 ff74 bl 80103aa <lwip_htonl>
80164c2: 4602 mov r2, r0
80164c4: 687b ldr r3, [r7, #4]
80164c6: 6c5b ldr r3, [r3, #68] ; 0x44
80164c8: 1ad3 subs r3, r2, r3
80164ca: 6a7a ldr r2, [r7, #36] ; 0x24
80164cc: 8912 ldrh r2, [r2, #8]
80164ce: 4413 add r3, r2
80164d0: 69ba ldr r2, [r7, #24]
80164d2: 429a cmp r2, r3
80164d4: d227 bcs.n 8016526 <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) {
80164d6: 687b ldr r3, [r7, #4]
80164d8: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
80164dc: 461a mov r2, r3
80164de: 69bb ldr r3, [r7, #24]
80164e0: 4293 cmp r3, r2
80164e2: d114 bne.n 801650e <tcp_output+0x12a>
80164e4: 687b ldr r3, [r7, #4]
80164e6: 6f1b ldr r3, [r3, #112] ; 0x70
80164e8: 2b00 cmp r3, #0
80164ea: d110 bne.n 801650e <tcp_output+0x12a>
80164ec: 687b ldr r3, [r7, #4]
80164ee: f893 3099 ldrb.w r3, [r3, #153] ; 0x99
80164f2: 2b00 cmp r3, #0
80164f4: d10b bne.n 801650e <tcp_output+0x12a>
pcb->persist_cnt = 0;
80164f6: 687b ldr r3, [r7, #4]
80164f8: 2200 movs r2, #0
80164fa: f883 2098 strb.w r2, [r3, #152] ; 0x98
pcb->persist_backoff = 1;
80164fe: 687b ldr r3, [r7, #4]
8016500: 2201 movs r2, #1
8016502: f883 2099 strb.w r2, [r3, #153] ; 0x99
pcb->persist_probe = 0;
8016506: 687b ldr r3, [r7, #4]
8016508: 2200 movs r2, #0
801650a: 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) {
801650e: 687b ldr r3, [r7, #4]
8016510: 8b5b ldrh r3, [r3, #26]
8016512: f003 0302 and.w r3, r3, #2
8016516: 2b00 cmp r3, #0
8016518: f000 814c beq.w 80167b4 <tcp_output+0x3d0>
return tcp_send_empty_ack(pcb);
801651c: 6878 ldr r0, [r7, #4]
801651e: f000 fd79 bl 8017014 <tcp_send_empty_ack>
8016522: 4603 mov r3, r0
8016524: e151 b.n 80167ca <tcp_output+0x3e6>
}
goto output_done;
}
/* Stop persist timer, above conditions are not active */
pcb->persist_backoff = 0;
8016526: 687b ldr r3, [r7, #4]
8016528: 2200 movs r2, #0
801652a: f883 2099 strb.w r2, [r3, #153] ; 0x99
/* useg should point to last segment on unacked queue */
useg = pcb->unacked;
801652e: 687b ldr r3, [r7, #4]
8016530: 6f1b ldr r3, [r3, #112] ; 0x70
8016532: 623b str r3, [r7, #32]
if (useg != NULL) {
8016534: 6a3b ldr r3, [r7, #32]
8016536: 2b00 cmp r3, #0
8016538: f000 811b beq.w 8016772 <tcp_output+0x38e>
for (; useg->next != NULL; useg = useg->next);
801653c: e002 b.n 8016544 <tcp_output+0x160>
801653e: 6a3b ldr r3, [r7, #32]
8016540: 681b ldr r3, [r3, #0]
8016542: 623b str r3, [r7, #32]
8016544: 6a3b ldr r3, [r7, #32]
8016546: 681b ldr r3, [r3, #0]
8016548: 2b00 cmp r3, #0
801654a: d1f8 bne.n 801653e <tcp_output+0x15a>
}
/* data available and window allows it to be sent? */
while (seg != NULL &&
801654c: e111 b.n 8016772 <tcp_output+0x38e>
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
LWIP_ASSERT("RST not expected here!",
801654e: 6a7b ldr r3, [r7, #36] ; 0x24
8016550: 68db ldr r3, [r3, #12]
8016552: 899b ldrh r3, [r3, #12]
8016554: b29b uxth r3, r3
8016556: 4618 mov r0, r3
8016558: f7f9 ff12 bl 8010380 <lwip_htons>
801655c: 4603 mov r3, r0
801655e: b2db uxtb r3, r3
8016560: f003 0304 and.w r3, r3, #4
8016564: 2b00 cmp r3, #0
8016566: d006 beq.n 8016576 <tcp_output+0x192>
8016568: 4b42 ldr r3, [pc, #264] ; (8016674 <tcp_output+0x290>)
801656a: f240 5237 movw r2, #1335 ; 0x537
801656e: 4946 ldr r1, [pc, #280] ; (8016688 <tcp_output+0x2a4>)
8016570: 4842 ldr r0, [pc, #264] ; (801667c <tcp_output+0x298>)
8016572: f005 ffe9 bl 801c548 <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) &&
8016576: 687b ldr r3, [r7, #4]
8016578: 6f1b ldr r3, [r3, #112] ; 0x70
801657a: 2b00 cmp r3, #0
801657c: d01f beq.n 80165be <tcp_output+0x1da>
801657e: 687b ldr r3, [r7, #4]
8016580: 8b5b ldrh r3, [r3, #26]
8016582: f003 0344 and.w r3, r3, #68 ; 0x44
8016586: 2b00 cmp r3, #0
8016588: d119 bne.n 80165be <tcp_output+0x1da>
801658a: 687b ldr r3, [r7, #4]
801658c: 6edb ldr r3, [r3, #108] ; 0x6c
801658e: 2b00 cmp r3, #0
8016590: d00b beq.n 80165aa <tcp_output+0x1c6>
8016592: 687b ldr r3, [r7, #4]
8016594: 6edb ldr r3, [r3, #108] ; 0x6c
8016596: 681b ldr r3, [r3, #0]
8016598: 2b00 cmp r3, #0
801659a: d110 bne.n 80165be <tcp_output+0x1da>
801659c: 687b ldr r3, [r7, #4]
801659e: 6edb ldr r3, [r3, #108] ; 0x6c
80165a0: 891a ldrh r2, [r3, #8]
80165a2: 687b ldr r3, [r7, #4]
80165a4: 8e5b ldrh r3, [r3, #50] ; 0x32
80165a6: 429a cmp r2, r3
80165a8: d209 bcs.n 80165be <tcp_output+0x1da>
80165aa: 687b ldr r3, [r7, #4]
80165ac: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64
80165b0: 2b00 cmp r3, #0
80165b2: d004 beq.n 80165be <tcp_output+0x1da>
80165b4: 687b ldr r3, [r7, #4]
80165b6: f8b3 3066 ldrh.w r3, [r3, #102] ; 0x66
80165ba: 2b08 cmp r3, #8
80165bc: d901 bls.n 80165c2 <tcp_output+0x1de>
80165be: 2301 movs r3, #1
80165c0: e000 b.n 80165c4 <tcp_output+0x1e0>
80165c2: 2300 movs r3, #0
80165c4: 2b00 cmp r3, #0
80165c6: d106 bne.n 80165d6 <tcp_output+0x1f2>
((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) {
80165c8: 687b ldr r3, [r7, #4]
80165ca: 8b5b ldrh r3, [r3, #26]
80165cc: f003 03a0 and.w r3, r3, #160 ; 0xa0
if ((tcp_do_output_nagle(pcb) == 0) &&
80165d0: 2b00 cmp r3, #0
80165d2: f000 80e3 beq.w 801679c <tcp_output+0x3b8>
pcb->lastack,
lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i));
++i;
#endif /* TCP_CWND_DEBUG */
if (pcb->state != SYN_SENT) {
80165d6: 687b ldr r3, [r7, #4]
80165d8: 7d1b ldrb r3, [r3, #20]
80165da: 2b02 cmp r3, #2
80165dc: d00d beq.n 80165fa <tcp_output+0x216>
TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
80165de: 6a7b ldr r3, [r7, #36] ; 0x24
80165e0: 68db ldr r3, [r3, #12]
80165e2: 899b ldrh r3, [r3, #12]
80165e4: b29c uxth r4, r3
80165e6: 2010 movs r0, #16
80165e8: f7f9 feca bl 8010380 <lwip_htons>
80165ec: 4603 mov r3, r0
80165ee: 461a mov r2, r3
80165f0: 6a7b ldr r3, [r7, #36] ; 0x24
80165f2: 68db ldr r3, [r3, #12]
80165f4: 4322 orrs r2, r4
80165f6: b292 uxth r2, r2
80165f8: 819a strh r2, [r3, #12]
}
err = tcp_output_segment(seg, pcb, netif);
80165fa: 697a ldr r2, [r7, #20]
80165fc: 6879 ldr r1, [r7, #4]
80165fe: 6a78 ldr r0, [r7, #36] ; 0x24
8016600: f000 f908 bl 8016814 <tcp_output_segment>
8016604: 4603 mov r3, r0
8016606: 73fb strb r3, [r7, #15]
if (err != ERR_OK) {
8016608: f997 300f ldrsb.w r3, [r7, #15]
801660c: 2b00 cmp r3, #0
801660e: d009 beq.n 8016624 <tcp_output+0x240>
/* segment could not be sent, for whatever reason */
tcp_set_flags(pcb, TF_NAGLEMEMERR);
8016610: 687b ldr r3, [r7, #4]
8016612: 8b5b ldrh r3, [r3, #26]
8016614: f043 0380 orr.w r3, r3, #128 ; 0x80
8016618: b29a uxth r2, r3
801661a: 687b ldr r3, [r7, #4]
801661c: 835a strh r2, [r3, #26]
return err;
801661e: f997 300f ldrsb.w r3, [r7, #15]
8016622: e0d2 b.n 80167ca <tcp_output+0x3e6>
}
#if TCP_OVERSIZE_DBGCHECK
seg->oversize_left = 0;
#endif /* TCP_OVERSIZE_DBGCHECK */
pcb->unsent = seg->next;
8016624: 6a7b ldr r3, [r7, #36] ; 0x24
8016626: 681a ldr r2, [r3, #0]
8016628: 687b ldr r3, [r7, #4]
801662a: 66da str r2, [r3, #108] ; 0x6c
if (pcb->state != SYN_SENT) {
801662c: 687b ldr r3, [r7, #4]
801662e: 7d1b ldrb r3, [r3, #20]
8016630: 2b02 cmp r3, #2
8016632: d006 beq.n 8016642 <tcp_output+0x25e>
tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8016634: 687b ldr r3, [r7, #4]
8016636: 8b5b ldrh r3, [r3, #26]
8016638: f023 0303 bic.w r3, r3, #3
801663c: b29a uxth r2, r3
801663e: 687b ldr r3, [r7, #4]
8016640: 835a strh r2, [r3, #26]
}
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
8016642: 6a7b ldr r3, [r7, #36] ; 0x24
8016644: 68db ldr r3, [r3, #12]
8016646: 685b ldr r3, [r3, #4]
8016648: 4618 mov r0, r3
801664a: f7f9 feae bl 80103aa <lwip_htonl>
801664e: 4604 mov r4, r0
8016650: 6a7b ldr r3, [r7, #36] ; 0x24
8016652: 891b ldrh r3, [r3, #8]
8016654: 461d mov r5, r3
8016656: 6a7b ldr r3, [r7, #36] ; 0x24
8016658: 68db ldr r3, [r3, #12]
801665a: 899b ldrh r3, [r3, #12]
801665c: b29b uxth r3, r3
801665e: 4618 mov r0, r3
8016660: f7f9 fe8e bl 8010380 <lwip_htons>
8016664: 4603 mov r3, r0
8016666: b2db uxtb r3, r3
8016668: f003 0303 and.w r3, r3, #3
801666c: 2b00 cmp r3, #0
801666e: d00d beq.n 801668c <tcp_output+0x2a8>
8016670: 2301 movs r3, #1
8016672: e00c b.n 801668e <tcp_output+0x2aa>
8016674: 0801efb0 .word 0x0801efb0
8016678: 0801f4f4 .word 0x0801f4f4
801667c: 0801f004 .word 0x0801f004
8016680: 0801f50c .word 0x0801f50c
8016684: 2000f7fc .word 0x2000f7fc
8016688: 0801f534 .word 0x0801f534
801668c: 2300 movs r3, #0
801668e: 442b add r3, r5
8016690: 4423 add r3, r4
8016692: 60bb str r3, [r7, #8]
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
8016694: 687b ldr r3, [r7, #4]
8016696: 6d1a ldr r2, [r3, #80] ; 0x50
8016698: 68bb ldr r3, [r7, #8]
801669a: 1ad3 subs r3, r2, r3
801669c: 2b00 cmp r3, #0
801669e: da02 bge.n 80166a6 <tcp_output+0x2c2>
pcb->snd_nxt = snd_nxt;
80166a0: 687b ldr r3, [r7, #4]
80166a2: 68ba ldr r2, [r7, #8]
80166a4: 651a str r2, [r3, #80] ; 0x50
}
/* put segment on unacknowledged list if length > 0 */
if (TCP_TCPLEN(seg) > 0) {
80166a6: 6a7b ldr r3, [r7, #36] ; 0x24
80166a8: 891b ldrh r3, [r3, #8]
80166aa: 461c mov r4, r3
80166ac: 6a7b ldr r3, [r7, #36] ; 0x24
80166ae: 68db ldr r3, [r3, #12]
80166b0: 899b ldrh r3, [r3, #12]
80166b2: b29b uxth r3, r3
80166b4: 4618 mov r0, r3
80166b6: f7f9 fe63 bl 8010380 <lwip_htons>
80166ba: 4603 mov r3, r0
80166bc: b2db uxtb r3, r3
80166be: f003 0303 and.w r3, r3, #3
80166c2: 2b00 cmp r3, #0
80166c4: d001 beq.n 80166ca <tcp_output+0x2e6>
80166c6: 2301 movs r3, #1
80166c8: e000 b.n 80166cc <tcp_output+0x2e8>
80166ca: 2300 movs r3, #0
80166cc: 4423 add r3, r4
80166ce: 2b00 cmp r3, #0
80166d0: d049 beq.n 8016766 <tcp_output+0x382>
seg->next = NULL;
80166d2: 6a7b ldr r3, [r7, #36] ; 0x24
80166d4: 2200 movs r2, #0
80166d6: 601a str r2, [r3, #0]
/* unacked list is empty? */
if (pcb->unacked == NULL) {
80166d8: 687b ldr r3, [r7, #4]
80166da: 6f1b ldr r3, [r3, #112] ; 0x70
80166dc: 2b00 cmp r3, #0
80166de: d105 bne.n 80166ec <tcp_output+0x308>
pcb->unacked = seg;
80166e0: 687b ldr r3, [r7, #4]
80166e2: 6a7a ldr r2, [r7, #36] ; 0x24
80166e4: 671a str r2, [r3, #112] ; 0x70
useg = seg;
80166e6: 6a7b ldr r3, [r7, #36] ; 0x24
80166e8: 623b str r3, [r7, #32]
80166ea: e03f b.n 801676c <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))) {
80166ec: 6a7b ldr r3, [r7, #36] ; 0x24
80166ee: 68db ldr r3, [r3, #12]
80166f0: 685b ldr r3, [r3, #4]
80166f2: 4618 mov r0, r3
80166f4: f7f9 fe59 bl 80103aa <lwip_htonl>
80166f8: 4604 mov r4, r0
80166fa: 6a3b ldr r3, [r7, #32]
80166fc: 68db ldr r3, [r3, #12]
80166fe: 685b ldr r3, [r3, #4]
8016700: 4618 mov r0, r3
8016702: f7f9 fe52 bl 80103aa <lwip_htonl>
8016706: 4603 mov r3, r0
8016708: 1ae3 subs r3, r4, r3
801670a: 2b00 cmp r3, #0
801670c: da24 bge.n 8016758 <tcp_output+0x374>
/* add segment to before tail of unacked list, keeping the list sorted */
struct tcp_seg **cur_seg = &(pcb->unacked);
801670e: 687b ldr r3, [r7, #4]
8016710: 3370 adds r3, #112 ; 0x70
8016712: 61fb str r3, [r7, #28]
while (*cur_seg &&
8016714: e002 b.n 801671c <tcp_output+0x338>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
cur_seg = &((*cur_seg)->next );
8016716: 69fb ldr r3, [r7, #28]
8016718: 681b ldr r3, [r3, #0]
801671a: 61fb str r3, [r7, #28]
while (*cur_seg &&
801671c: 69fb ldr r3, [r7, #28]
801671e: 681b ldr r3, [r3, #0]
8016720: 2b00 cmp r3, #0
8016722: d011 beq.n 8016748 <tcp_output+0x364>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
8016724: 69fb ldr r3, [r7, #28]
8016726: 681b ldr r3, [r3, #0]
8016728: 68db ldr r3, [r3, #12]
801672a: 685b ldr r3, [r3, #4]
801672c: 4618 mov r0, r3
801672e: f7f9 fe3c bl 80103aa <lwip_htonl>
8016732: 4604 mov r4, r0
8016734: 6a7b ldr r3, [r7, #36] ; 0x24
8016736: 68db ldr r3, [r3, #12]
8016738: 685b ldr r3, [r3, #4]
801673a: 4618 mov r0, r3
801673c: f7f9 fe35 bl 80103aa <lwip_htonl>
8016740: 4603 mov r3, r0
8016742: 1ae3 subs r3, r4, r3
while (*cur_seg &&
8016744: 2b00 cmp r3, #0
8016746: dbe6 blt.n 8016716 <tcp_output+0x332>
}
seg->next = (*cur_seg);
8016748: 69fb ldr r3, [r7, #28]
801674a: 681a ldr r2, [r3, #0]
801674c: 6a7b ldr r3, [r7, #36] ; 0x24
801674e: 601a str r2, [r3, #0]
(*cur_seg) = seg;
8016750: 69fb ldr r3, [r7, #28]
8016752: 6a7a ldr r2, [r7, #36] ; 0x24
8016754: 601a str r2, [r3, #0]
8016756: e009 b.n 801676c <tcp_output+0x388>
} else {
/* add segment to tail of unacked list */
useg->next = seg;
8016758: 6a3b ldr r3, [r7, #32]
801675a: 6a7a ldr r2, [r7, #36] ; 0x24
801675c: 601a str r2, [r3, #0]
useg = useg->next;
801675e: 6a3b ldr r3, [r7, #32]
8016760: 681b ldr r3, [r3, #0]
8016762: 623b str r3, [r7, #32]
8016764: e002 b.n 801676c <tcp_output+0x388>
}
}
/* do not queue empty segments on the unacked list */
} else {
tcp_seg_free(seg);
8016766: 6a78 ldr r0, [r7, #36] ; 0x24
8016768: f7fc fc42 bl 8012ff0 <tcp_seg_free>
}
seg = pcb->unsent;
801676c: 687b ldr r3, [r7, #4]
801676e: 6edb ldr r3, [r3, #108] ; 0x6c
8016770: 627b str r3, [r7, #36] ; 0x24
while (seg != NULL &&
8016772: 6a7b ldr r3, [r7, #36] ; 0x24
8016774: 2b00 cmp r3, #0
8016776: d012 beq.n 801679e <tcp_output+0x3ba>
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
8016778: 6a7b ldr r3, [r7, #36] ; 0x24
801677a: 68db ldr r3, [r3, #12]
801677c: 685b ldr r3, [r3, #4]
801677e: 4618 mov r0, r3
8016780: f7f9 fe13 bl 80103aa <lwip_htonl>
8016784: 4602 mov r2, r0
8016786: 687b ldr r3, [r7, #4]
8016788: 6c5b ldr r3, [r3, #68] ; 0x44
801678a: 1ad3 subs r3, r2, r3
801678c: 6a7a ldr r2, [r7, #36] ; 0x24
801678e: 8912 ldrh r2, [r2, #8]
8016790: 4413 add r3, r2
while (seg != NULL &&
8016792: 69ba ldr r2, [r7, #24]
8016794: 429a cmp r2, r3
8016796: f4bf aeda bcs.w 801654e <tcp_output+0x16a>
801679a: e000 b.n 801679e <tcp_output+0x3ba>
break;
801679c: bf00 nop
}
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
801679e: 687b ldr r3, [r7, #4]
80167a0: 6edb ldr r3, [r3, #108] ; 0x6c
80167a2: 2b00 cmp r3, #0
80167a4: d108 bne.n 80167b8 <tcp_output+0x3d4>
/* last unsent has been removed, reset unsent_oversize */
pcb->unsent_oversize = 0;
80167a6: 687b ldr r3, [r7, #4]
80167a8: 2200 movs r2, #0
80167aa: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
80167ae: e004 b.n 80167ba <tcp_output+0x3d6>
goto output_done;
80167b0: bf00 nop
80167b2: e002 b.n 80167ba <tcp_output+0x3d6>
goto output_done;
80167b4: bf00 nop
80167b6: e000 b.n 80167ba <tcp_output+0x3d6>
}
#endif /* TCP_OVERSIZE */
output_done:
80167b8: bf00 nop
tcp_clear_flags(pcb, TF_NAGLEMEMERR);
80167ba: 687b ldr r3, [r7, #4]
80167bc: 8b5b ldrh r3, [r3, #26]
80167be: f023 0380 bic.w r3, r3, #128 ; 0x80
80167c2: b29a uxth r2, r3
80167c4: 687b ldr r3, [r7, #4]
80167c6: 835a strh r2, [r3, #26]
return ERR_OK;
80167c8: 2300 movs r3, #0
}
80167ca: 4618 mov r0, r3
80167cc: 3728 adds r7, #40 ; 0x28
80167ce: 46bd mov sp, r7
80167d0: bdb0 pop {r4, r5, r7, pc}
80167d2: bf00 nop
080167d4 <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)
{
80167d4: b580 push {r7, lr}
80167d6: b082 sub sp, #8
80167d8: af00 add r7, sp, #0
80167da: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
80167dc: 687b ldr r3, [r7, #4]
80167de: 2b00 cmp r3, #0
80167e0: d106 bne.n 80167f0 <tcp_output_segment_busy+0x1c>
80167e2: 4b09 ldr r3, [pc, #36] ; (8016808 <tcp_output_segment_busy+0x34>)
80167e4: f240 529a movw r2, #1434 ; 0x59a
80167e8: 4908 ldr r1, [pc, #32] ; (801680c <tcp_output_segment_busy+0x38>)
80167ea: 4809 ldr r0, [pc, #36] ; (8016810 <tcp_output_segment_busy+0x3c>)
80167ec: f005 feac bl 801c548 <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) {
80167f0: 687b ldr r3, [r7, #4]
80167f2: 685b ldr r3, [r3, #4]
80167f4: 7b9b ldrb r3, [r3, #14]
80167f6: 2b01 cmp r3, #1
80167f8: d001 beq.n 80167fe <tcp_output_segment_busy+0x2a>
/* other reference found */
return 1;
80167fa: 2301 movs r3, #1
80167fc: e000 b.n 8016800 <tcp_output_segment_busy+0x2c>
}
/* no other references found */
return 0;
80167fe: 2300 movs r3, #0
}
8016800: 4618 mov r0, r3
8016802: 3708 adds r7, #8
8016804: 46bd mov sp, r7
8016806: bd80 pop {r7, pc}
8016808: 0801efb0 .word 0x0801efb0
801680c: 0801f54c .word 0x0801f54c
8016810: 0801f004 .word 0x0801f004
08016814 <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)
{
8016814: b5b0 push {r4, r5, r7, lr}
8016816: b08c sub sp, #48 ; 0x30
8016818: af04 add r7, sp, #16
801681a: 60f8 str r0, [r7, #12]
801681c: 60b9 str r1, [r7, #8]
801681e: 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);
8016820: 68fb ldr r3, [r7, #12]
8016822: 2b00 cmp r3, #0
8016824: d106 bne.n 8016834 <tcp_output_segment+0x20>
8016826: 4b64 ldr r3, [pc, #400] ; (80169b8 <tcp_output_segment+0x1a4>)
8016828: f44f 62b7 mov.w r2, #1464 ; 0x5b8
801682c: 4963 ldr r1, [pc, #396] ; (80169bc <tcp_output_segment+0x1a8>)
801682e: 4864 ldr r0, [pc, #400] ; (80169c0 <tcp_output_segment+0x1ac>)
8016830: f005 fe8a bl 801c548 <iprintf>
LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
8016834: 68bb ldr r3, [r7, #8]
8016836: 2b00 cmp r3, #0
8016838: d106 bne.n 8016848 <tcp_output_segment+0x34>
801683a: 4b5f ldr r3, [pc, #380] ; (80169b8 <tcp_output_segment+0x1a4>)
801683c: f240 52b9 movw r2, #1465 ; 0x5b9
8016840: 4960 ldr r1, [pc, #384] ; (80169c4 <tcp_output_segment+0x1b0>)
8016842: 485f ldr r0, [pc, #380] ; (80169c0 <tcp_output_segment+0x1ac>)
8016844: f005 fe80 bl 801c548 <iprintf>
LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
8016848: 687b ldr r3, [r7, #4]
801684a: 2b00 cmp r3, #0
801684c: d106 bne.n 801685c <tcp_output_segment+0x48>
801684e: 4b5a ldr r3, [pc, #360] ; (80169b8 <tcp_output_segment+0x1a4>)
8016850: f240 52ba movw r2, #1466 ; 0x5ba
8016854: 495c ldr r1, [pc, #368] ; (80169c8 <tcp_output_segment+0x1b4>)
8016856: 485a ldr r0, [pc, #360] ; (80169c0 <tcp_output_segment+0x1ac>)
8016858: f005 fe76 bl 801c548 <iprintf>
if (tcp_output_segment_busy(seg)) {
801685c: 68f8 ldr r0, [r7, #12]
801685e: f7ff ffb9 bl 80167d4 <tcp_output_segment_busy>
8016862: 4603 mov r3, r0
8016864: 2b00 cmp r3, #0
8016866: d001 beq.n 801686c <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;
8016868: 2300 movs r3, #0
801686a: e0a0 b.n 80169ae <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);
801686c: 68bb ldr r3, [r7, #8]
801686e: 6a5a ldr r2, [r3, #36] ; 0x24
8016870: 68fb ldr r3, [r7, #12]
8016872: 68dc ldr r4, [r3, #12]
8016874: 4610 mov r0, r2
8016876: f7f9 fd98 bl 80103aa <lwip_htonl>
801687a: 4603 mov r3, r0
801687c: 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)));
801687e: 68bb ldr r3, [r7, #8]
8016880: 8d5a ldrh r2, [r3, #42] ; 0x2a
8016882: 68fb ldr r3, [r7, #12]
8016884: 68dc ldr r4, [r3, #12]
8016886: 4610 mov r0, r2
8016888: f7f9 fd7a bl 8010380 <lwip_htons>
801688c: 4603 mov r3, r0
801688e: 81e3 strh r3, [r4, #14]
}
pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
8016890: 68bb ldr r3, [r7, #8]
8016892: 6a5b ldr r3, [r3, #36] ; 0x24
8016894: 68ba ldr r2, [r7, #8]
8016896: 8d52 ldrh r2, [r2, #42] ; 0x2a
8016898: 441a add r2, r3
801689a: 68bb ldr r3, [r7, #8]
801689c: 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);
801689e: 68fb ldr r3, [r7, #12]
80168a0: 68db ldr r3, [r3, #12]
80168a2: 3314 adds r3, #20
80168a4: 61fb str r3, [r7, #28]
if (seg->flags & TF_SEG_OPTS_MSS) {
80168a6: 68fb ldr r3, [r7, #12]
80168a8: 7a9b ldrb r3, [r3, #10]
80168aa: f003 0301 and.w r3, r3, #1
80168ae: 2b00 cmp r3, #0
80168b0: d015 beq.n 80168de <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);
80168b2: 68bb ldr r3, [r7, #8]
80168b4: 3304 adds r3, #4
80168b6: 461a mov r2, r3
80168b8: 6879 ldr r1, [r7, #4]
80168ba: f44f 7006 mov.w r0, #536 ; 0x218
80168be: f7fc fe8d bl 80135dc <tcp_eff_send_mss_netif>
80168c2: 4603 mov r3, r0
80168c4: 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);
80168c6: 8b7b ldrh r3, [r7, #26]
80168c8: f043 7301 orr.w r3, r3, #33816576 ; 0x2040000
80168cc: 4618 mov r0, r3
80168ce: f7f9 fd6c bl 80103aa <lwip_htonl>
80168d2: 4602 mov r2, r0
80168d4: 69fb ldr r3, [r7, #28]
80168d6: 601a str r2, [r3, #0]
opts += 1;
80168d8: 69fb ldr r3, [r7, #28]
80168da: 3304 adds r3, #4
80168dc: 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) {
80168de: 68bb ldr r3, [r7, #8]
80168e0: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30
80168e4: 2b00 cmp r3, #0
80168e6: da02 bge.n 80168ee <tcp_output_segment+0xda>
pcb->rtime = 0;
80168e8: 68bb ldr r3, [r7, #8]
80168ea: 2200 movs r2, #0
80168ec: 861a strh r2, [r3, #48] ; 0x30
}
if (pcb->rttest == 0) {
80168ee: 68bb ldr r3, [r7, #8]
80168f0: 6b5b ldr r3, [r3, #52] ; 0x34
80168f2: 2b00 cmp r3, #0
80168f4: d10c bne.n 8016910 <tcp_output_segment+0xfc>
pcb->rttest = tcp_ticks;
80168f6: 4b35 ldr r3, [pc, #212] ; (80169cc <tcp_output_segment+0x1b8>)
80168f8: 681a ldr r2, [r3, #0]
80168fa: 68bb ldr r3, [r7, #8]
80168fc: 635a str r2, [r3, #52] ; 0x34
pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno);
80168fe: 68fb ldr r3, [r7, #12]
8016900: 68db ldr r3, [r3, #12]
8016902: 685b ldr r3, [r3, #4]
8016904: 4618 mov r0, r3
8016906: f7f9 fd50 bl 80103aa <lwip_htonl>
801690a: 4602 mov r2, r0
801690c: 68bb ldr r3, [r7, #8]
801690e: 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);
8016910: 68fb ldr r3, [r7, #12]
8016912: 68db ldr r3, [r3, #12]
8016914: 461a mov r2, r3
8016916: 68fb ldr r3, [r7, #12]
8016918: 685b ldr r3, [r3, #4]
801691a: 685b ldr r3, [r3, #4]
801691c: 1ad3 subs r3, r2, r3
801691e: 833b strh r3, [r7, #24]
if (len == 0) {
/** Exclude retransmitted segments from this count. */
MIB2_STATS_INC(mib2.tcpoutsegs);
}
seg->p->len -= len;
8016920: 68fb ldr r3, [r7, #12]
8016922: 685b ldr r3, [r3, #4]
8016924: 8959 ldrh r1, [r3, #10]
8016926: 68fb ldr r3, [r7, #12]
8016928: 685b ldr r3, [r3, #4]
801692a: 8b3a ldrh r2, [r7, #24]
801692c: 1a8a subs r2, r1, r2
801692e: b292 uxth r2, r2
8016930: 815a strh r2, [r3, #10]
seg->p->tot_len -= len;
8016932: 68fb ldr r3, [r7, #12]
8016934: 685b ldr r3, [r3, #4]
8016936: 8919 ldrh r1, [r3, #8]
8016938: 68fb ldr r3, [r7, #12]
801693a: 685b ldr r3, [r3, #4]
801693c: 8b3a ldrh r2, [r7, #24]
801693e: 1a8a subs r2, r1, r2
8016940: b292 uxth r2, r2
8016942: 811a strh r2, [r3, #8]
seg->p->payload = seg->tcphdr;
8016944: 68fb ldr r3, [r7, #12]
8016946: 685b ldr r3, [r3, #4]
8016948: 68fa ldr r2, [r7, #12]
801694a: 68d2 ldr r2, [r2, #12]
801694c: 605a str r2, [r3, #4]
seg->tcphdr->chksum = 0;
801694e: 68fb ldr r3, [r7, #12]
8016950: 68db ldr r3, [r3, #12]
8016952: 2200 movs r2, #0
8016954: 741a strb r2, [r3, #16]
8016956: 2200 movs r2, #0
8016958: 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));
801695a: 68fb ldr r3, [r7, #12]
801695c: 68db ldr r3, [r3, #12]
801695e: f103 0214 add.w r2, r3, #20
8016962: 68fb ldr r3, [r7, #12]
8016964: 7a9b ldrb r3, [r3, #10]
8016966: 009b lsls r3, r3, #2
8016968: f003 0304 and.w r3, r3, #4
801696c: 4413 add r3, r2
801696e: 69fa ldr r2, [r7, #28]
8016970: 429a cmp r2, r3
8016972: d006 beq.n 8016982 <tcp_output_segment+0x16e>
8016974: 4b10 ldr r3, [pc, #64] ; (80169b8 <tcp_output_segment+0x1a4>)
8016976: f240 621c movw r2, #1564 ; 0x61c
801697a: 4915 ldr r1, [pc, #84] ; (80169d0 <tcp_output_segment+0x1bc>)
801697c: 4810 ldr r0, [pc, #64] ; (80169c0 <tcp_output_segment+0x1ac>)
801697e: f005 fde3 bl 801c548 <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,
8016982: 68fb ldr r3, [r7, #12]
8016984: 6858 ldr r0, [r3, #4]
8016986: 68b9 ldr r1, [r7, #8]
8016988: 68bb ldr r3, [r7, #8]
801698a: 1d1c adds r4, r3, #4
801698c: 68bb ldr r3, [r7, #8]
801698e: 7add ldrb r5, [r3, #11]
8016990: 68bb ldr r3, [r7, #8]
8016992: 7a9b ldrb r3, [r3, #10]
8016994: 687a ldr r2, [r7, #4]
8016996: 9202 str r2, [sp, #8]
8016998: 2206 movs r2, #6
801699a: 9201 str r2, [sp, #4]
801699c: 9300 str r3, [sp, #0]
801699e: 462b mov r3, r5
80169a0: 4622 mov r2, r4
80169a2: f004 fc37 bl 801b214 <ip4_output_if>
80169a6: 4603 mov r3, r0
80169a8: 75fb strb r3, [r7, #23]
seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum);
seg->chksum_swapped = 1;
}
#endif
return err;
80169aa: f997 3017 ldrsb.w r3, [r7, #23]
}
80169ae: 4618 mov r0, r3
80169b0: 3720 adds r7, #32
80169b2: 46bd mov sp, r7
80169b4: bdb0 pop {r4, r5, r7, pc}
80169b6: bf00 nop
80169b8: 0801efb0 .word 0x0801efb0
80169bc: 0801f574 .word 0x0801f574
80169c0: 0801f004 .word 0x0801f004
80169c4: 0801f594 .word 0x0801f594
80169c8: 0801f5b4 .word 0x0801f5b4
80169cc: 2000f7ec .word 0x2000f7ec
80169d0: 0801f5d8 .word 0x0801f5d8
080169d4 <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)
{
80169d4: b5b0 push {r4, r5, r7, lr}
80169d6: b084 sub sp, #16
80169d8: af00 add r7, sp, #0
80169da: 6078 str r0, [r7, #4]
struct tcp_seg *seg;
LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
80169dc: 687b ldr r3, [r7, #4]
80169de: 2b00 cmp r3, #0
80169e0: d106 bne.n 80169f0 <tcp_rexmit_rto_prepare+0x1c>
80169e2: 4b31 ldr r3, [pc, #196] ; (8016aa8 <tcp_rexmit_rto_prepare+0xd4>)
80169e4: f240 6263 movw r2, #1635 ; 0x663
80169e8: 4930 ldr r1, [pc, #192] ; (8016aac <tcp_rexmit_rto_prepare+0xd8>)
80169ea: 4831 ldr r0, [pc, #196] ; (8016ab0 <tcp_rexmit_rto_prepare+0xdc>)
80169ec: f005 fdac bl 801c548 <iprintf>
if (pcb->unacked == NULL) {
80169f0: 687b ldr r3, [r7, #4]
80169f2: 6f1b ldr r3, [r3, #112] ; 0x70
80169f4: 2b00 cmp r3, #0
80169f6: d102 bne.n 80169fe <tcp_rexmit_rto_prepare+0x2a>
return ERR_VAL;
80169f8: f06f 0305 mvn.w r3, #5
80169fc: e050 b.n 8016aa0 <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) {
80169fe: 687b ldr r3, [r7, #4]
8016a00: 6f1b ldr r3, [r3, #112] ; 0x70
8016a02: 60fb str r3, [r7, #12]
8016a04: e00b b.n 8016a1e <tcp_rexmit_rto_prepare+0x4a>
if (tcp_output_segment_busy(seg)) {
8016a06: 68f8 ldr r0, [r7, #12]
8016a08: f7ff fee4 bl 80167d4 <tcp_output_segment_busy>
8016a0c: 4603 mov r3, r0
8016a0e: 2b00 cmp r3, #0
8016a10: d002 beq.n 8016a18 <tcp_rexmit_rto_prepare+0x44>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
return ERR_VAL;
8016a12: f06f 0305 mvn.w r3, #5
8016a16: e043 b.n 8016aa0 <tcp_rexmit_rto_prepare+0xcc>
for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
8016a18: 68fb ldr r3, [r7, #12]
8016a1a: 681b ldr r3, [r3, #0]
8016a1c: 60fb str r3, [r7, #12]
8016a1e: 68fb ldr r3, [r7, #12]
8016a20: 681b ldr r3, [r3, #0]
8016a22: 2b00 cmp r3, #0
8016a24: d1ef bne.n 8016a06 <tcp_rexmit_rto_prepare+0x32>
}
}
if (tcp_output_segment_busy(seg)) {
8016a26: 68f8 ldr r0, [r7, #12]
8016a28: f7ff fed4 bl 80167d4 <tcp_output_segment_busy>
8016a2c: 4603 mov r3, r0
8016a2e: 2b00 cmp r3, #0
8016a30: d002 beq.n 8016a38 <tcp_rexmit_rto_prepare+0x64>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n"));
return ERR_VAL;
8016a32: f06f 0305 mvn.w r3, #5
8016a36: e033 b.n 8016aa0 <tcp_rexmit_rto_prepare+0xcc>
}
/* concatenate unsent queue after unacked queue */
seg->next = pcb->unsent;
8016a38: 687b ldr r3, [r7, #4]
8016a3a: 6eda ldr r2, [r3, #108] ; 0x6c
8016a3c: 68fb ldr r3, [r7, #12]
8016a3e: 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;
8016a40: 687b ldr r3, [r7, #4]
8016a42: 6f1a ldr r2, [r3, #112] ; 0x70
8016a44: 687b ldr r3, [r7, #4]
8016a46: 66da str r2, [r3, #108] ; 0x6c
/* unacked queue is now empty */
pcb->unacked = NULL;
8016a48: 687b ldr r3, [r7, #4]
8016a4a: 2200 movs r2, #0
8016a4c: 671a str r2, [r3, #112] ; 0x70
/* Mark RTO in-progress */
tcp_set_flags(pcb, TF_RTO);
8016a4e: 687b ldr r3, [r7, #4]
8016a50: 8b5b ldrh r3, [r3, #26]
8016a52: f443 6300 orr.w r3, r3, #2048 ; 0x800
8016a56: b29a uxth r2, r3
8016a58: 687b ldr r3, [r7, #4]
8016a5a: 835a strh r2, [r3, #26]
/* Record the next byte following retransmit */
pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
8016a5c: 68fb ldr r3, [r7, #12]
8016a5e: 68db ldr r3, [r3, #12]
8016a60: 685b ldr r3, [r3, #4]
8016a62: 4618 mov r0, r3
8016a64: f7f9 fca1 bl 80103aa <lwip_htonl>
8016a68: 4604 mov r4, r0
8016a6a: 68fb ldr r3, [r7, #12]
8016a6c: 891b ldrh r3, [r3, #8]
8016a6e: 461d mov r5, r3
8016a70: 68fb ldr r3, [r7, #12]
8016a72: 68db ldr r3, [r3, #12]
8016a74: 899b ldrh r3, [r3, #12]
8016a76: b29b uxth r3, r3
8016a78: 4618 mov r0, r3
8016a7a: f7f9 fc81 bl 8010380 <lwip_htons>
8016a7e: 4603 mov r3, r0
8016a80: b2db uxtb r3, r3
8016a82: f003 0303 and.w r3, r3, #3
8016a86: 2b00 cmp r3, #0
8016a88: d001 beq.n 8016a8e <tcp_rexmit_rto_prepare+0xba>
8016a8a: 2301 movs r3, #1
8016a8c: e000 b.n 8016a90 <tcp_rexmit_rto_prepare+0xbc>
8016a8e: 2300 movs r3, #0
8016a90: 442b add r3, r5
8016a92: 18e2 adds r2, r4, r3
8016a94: 687b ldr r3, [r7, #4]
8016a96: 64da str r2, [r3, #76] ; 0x4c
/* Don't take any RTT measurements after retransmitting. */
pcb->rttest = 0;
8016a98: 687b ldr r3, [r7, #4]
8016a9a: 2200 movs r2, #0
8016a9c: 635a str r2, [r3, #52] ; 0x34
return ERR_OK;
8016a9e: 2300 movs r3, #0
}
8016aa0: 4618 mov r0, r3
8016aa2: 3710 adds r7, #16
8016aa4: 46bd mov sp, r7
8016aa6: bdb0 pop {r4, r5, r7, pc}
8016aa8: 0801efb0 .word 0x0801efb0
8016aac: 0801f5ec .word 0x0801f5ec
8016ab0: 0801f004 .word 0x0801f004
08016ab4 <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)
{
8016ab4: b580 push {r7, lr}
8016ab6: b082 sub sp, #8
8016ab8: af00 add r7, sp, #0
8016aba: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
8016abc: 687b ldr r3, [r7, #4]
8016abe: 2b00 cmp r3, #0
8016ac0: d106 bne.n 8016ad0 <tcp_rexmit_rto_commit+0x1c>
8016ac2: 4b0d ldr r3, [pc, #52] ; (8016af8 <tcp_rexmit_rto_commit+0x44>)
8016ac4: f44f 62d3 mov.w r2, #1688 ; 0x698
8016ac8: 490c ldr r1, [pc, #48] ; (8016afc <tcp_rexmit_rto_commit+0x48>)
8016aca: 480d ldr r0, [pc, #52] ; (8016b00 <tcp_rexmit_rto_commit+0x4c>)
8016acc: f005 fd3c bl 801c548 <iprintf>
/* increment number of retransmissions */
if (pcb->nrtx < 0xFF) {
8016ad0: 687b ldr r3, [r7, #4]
8016ad2: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8016ad6: 2bff cmp r3, #255 ; 0xff
8016ad8: d007 beq.n 8016aea <tcp_rexmit_rto_commit+0x36>
++pcb->nrtx;
8016ada: 687b ldr r3, [r7, #4]
8016adc: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8016ae0: 3301 adds r3, #1
8016ae2: b2da uxtb r2, r3
8016ae4: 687b ldr r3, [r7, #4]
8016ae6: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Do the actual retransmission */
tcp_output(pcb);
8016aea: 6878 ldr r0, [r7, #4]
8016aec: f7ff fc7a bl 80163e4 <tcp_output>
}
8016af0: bf00 nop
8016af2: 3708 adds r7, #8
8016af4: 46bd mov sp, r7
8016af6: bd80 pop {r7, pc}
8016af8: 0801efb0 .word 0x0801efb0
8016afc: 0801f610 .word 0x0801f610
8016b00: 0801f004 .word 0x0801f004
08016b04 <tcp_rexmit_rto>:
*
* @param pcb the tcp_pcb for which to re-enqueue all unacked segments
*/
void
tcp_rexmit_rto(struct tcp_pcb *pcb)
{
8016b04: b580 push {r7, lr}
8016b06: b082 sub sp, #8
8016b08: af00 add r7, sp, #0
8016b0a: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
8016b0c: 687b ldr r3, [r7, #4]
8016b0e: 2b00 cmp r3, #0
8016b10: d106 bne.n 8016b20 <tcp_rexmit_rto+0x1c>
8016b12: 4b0a ldr r3, [pc, #40] ; (8016b3c <tcp_rexmit_rto+0x38>)
8016b14: f240 62ad movw r2, #1709 ; 0x6ad
8016b18: 4909 ldr r1, [pc, #36] ; (8016b40 <tcp_rexmit_rto+0x3c>)
8016b1a: 480a ldr r0, [pc, #40] ; (8016b44 <tcp_rexmit_rto+0x40>)
8016b1c: f005 fd14 bl 801c548 <iprintf>
if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) {
8016b20: 6878 ldr r0, [r7, #4]
8016b22: f7ff ff57 bl 80169d4 <tcp_rexmit_rto_prepare>
8016b26: 4603 mov r3, r0
8016b28: 2b00 cmp r3, #0
8016b2a: d102 bne.n 8016b32 <tcp_rexmit_rto+0x2e>
tcp_rexmit_rto_commit(pcb);
8016b2c: 6878 ldr r0, [r7, #4]
8016b2e: f7ff ffc1 bl 8016ab4 <tcp_rexmit_rto_commit>
}
}
8016b32: bf00 nop
8016b34: 3708 adds r7, #8
8016b36: 46bd mov sp, r7
8016b38: bd80 pop {r7, pc}
8016b3a: bf00 nop
8016b3c: 0801efb0 .word 0x0801efb0
8016b40: 0801f634 .word 0x0801f634
8016b44: 0801f004 .word 0x0801f004
08016b48 <tcp_rexmit>:
*
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
*/
err_t
tcp_rexmit(struct tcp_pcb *pcb)
{
8016b48: b590 push {r4, r7, lr}
8016b4a: b085 sub sp, #20
8016b4c: af00 add r7, sp, #0
8016b4e: 6078 str r0, [r7, #4]
struct tcp_seg *seg;
struct tcp_seg **cur_seg;
LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
8016b50: 687b ldr r3, [r7, #4]
8016b52: 2b00 cmp r3, #0
8016b54: d106 bne.n 8016b64 <tcp_rexmit+0x1c>
8016b56: 4b2f ldr r3, [pc, #188] ; (8016c14 <tcp_rexmit+0xcc>)
8016b58: f240 62c1 movw r2, #1729 ; 0x6c1
8016b5c: 492e ldr r1, [pc, #184] ; (8016c18 <tcp_rexmit+0xd0>)
8016b5e: 482f ldr r0, [pc, #188] ; (8016c1c <tcp_rexmit+0xd4>)
8016b60: f005 fcf2 bl 801c548 <iprintf>
if (pcb->unacked == NULL) {
8016b64: 687b ldr r3, [r7, #4]
8016b66: 6f1b ldr r3, [r3, #112] ; 0x70
8016b68: 2b00 cmp r3, #0
8016b6a: d102 bne.n 8016b72 <tcp_rexmit+0x2a>
return ERR_VAL;
8016b6c: f06f 0305 mvn.w r3, #5
8016b70: e04c b.n 8016c0c <tcp_rexmit+0xc4>
}
seg = pcb->unacked;
8016b72: 687b ldr r3, [r7, #4]
8016b74: 6f1b ldr r3, [r3, #112] ; 0x70
8016b76: 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)) {
8016b78: 68b8 ldr r0, [r7, #8]
8016b7a: f7ff fe2b bl 80167d4 <tcp_output_segment_busy>
8016b7e: 4603 mov r3, r0
8016b80: 2b00 cmp r3, #0
8016b82: d002 beq.n 8016b8a <tcp_rexmit+0x42>
LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n"));
return ERR_VAL;
8016b84: f06f 0305 mvn.w r3, #5
8016b88: e040 b.n 8016c0c <tcp_rexmit+0xc4>
}
/* Move the first unacked segment to the unsent queue */
/* Keep the unsent queue sorted. */
pcb->unacked = seg->next;
8016b8a: 68bb ldr r3, [r7, #8]
8016b8c: 681a ldr r2, [r3, #0]
8016b8e: 687b ldr r3, [r7, #4]
8016b90: 671a str r2, [r3, #112] ; 0x70
cur_seg = &(pcb->unsent);
8016b92: 687b ldr r3, [r7, #4]
8016b94: 336c adds r3, #108 ; 0x6c
8016b96: 60fb str r3, [r7, #12]
while (*cur_seg &&
8016b98: e002 b.n 8016ba0 <tcp_rexmit+0x58>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
cur_seg = &((*cur_seg)->next );
8016b9a: 68fb ldr r3, [r7, #12]
8016b9c: 681b ldr r3, [r3, #0]
8016b9e: 60fb str r3, [r7, #12]
while (*cur_seg &&
8016ba0: 68fb ldr r3, [r7, #12]
8016ba2: 681b ldr r3, [r3, #0]
8016ba4: 2b00 cmp r3, #0
8016ba6: d011 beq.n 8016bcc <tcp_rexmit+0x84>
TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
8016ba8: 68fb ldr r3, [r7, #12]
8016baa: 681b ldr r3, [r3, #0]
8016bac: 68db ldr r3, [r3, #12]
8016bae: 685b ldr r3, [r3, #4]
8016bb0: 4618 mov r0, r3
8016bb2: f7f9 fbfa bl 80103aa <lwip_htonl>
8016bb6: 4604 mov r4, r0
8016bb8: 68bb ldr r3, [r7, #8]
8016bba: 68db ldr r3, [r3, #12]
8016bbc: 685b ldr r3, [r3, #4]
8016bbe: 4618 mov r0, r3
8016bc0: f7f9 fbf3 bl 80103aa <lwip_htonl>
8016bc4: 4603 mov r3, r0
8016bc6: 1ae3 subs r3, r4, r3
while (*cur_seg &&
8016bc8: 2b00 cmp r3, #0
8016bca: dbe6 blt.n 8016b9a <tcp_rexmit+0x52>
}
seg->next = *cur_seg;
8016bcc: 68fb ldr r3, [r7, #12]
8016bce: 681a ldr r2, [r3, #0]
8016bd0: 68bb ldr r3, [r7, #8]
8016bd2: 601a str r2, [r3, #0]
*cur_seg = seg;
8016bd4: 68fb ldr r3, [r7, #12]
8016bd6: 68ba ldr r2, [r7, #8]
8016bd8: 601a str r2, [r3, #0]
#if TCP_OVERSIZE
if (seg->next == NULL) {
8016bda: 68bb ldr r3, [r7, #8]
8016bdc: 681b ldr r3, [r3, #0]
8016bde: 2b00 cmp r3, #0
8016be0: d103 bne.n 8016bea <tcp_rexmit+0xa2>
/* the retransmitted segment is last in unsent, so reset unsent_oversize */
pcb->unsent_oversize = 0;
8016be2: 687b ldr r3, [r7, #4]
8016be4: 2200 movs r2, #0
8016be6: f8a3 2068 strh.w r2, [r3, #104] ; 0x68
}
#endif /* TCP_OVERSIZE */
if (pcb->nrtx < 0xFF) {
8016bea: 687b ldr r3, [r7, #4]
8016bec: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8016bf0: 2bff cmp r3, #255 ; 0xff
8016bf2: d007 beq.n 8016c04 <tcp_rexmit+0xbc>
++pcb->nrtx;
8016bf4: 687b ldr r3, [r7, #4]
8016bf6: f893 3042 ldrb.w r3, [r3, #66] ; 0x42
8016bfa: 3301 adds r3, #1
8016bfc: b2da uxtb r2, r3
8016bfe: 687b ldr r3, [r7, #4]
8016c00: f883 2042 strb.w r2, [r3, #66] ; 0x42
}
/* Don't take any rtt measurements after retransmitting. */
pcb->rttest = 0;
8016c04: 687b ldr r3, [r7, #4]
8016c06: 2200 movs r2, #0
8016c08: 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;
8016c0a: 2300 movs r3, #0
}
8016c0c: 4618 mov r0, r3
8016c0e: 3714 adds r7, #20
8016c10: 46bd mov sp, r7
8016c12: bd90 pop {r4, r7, pc}
8016c14: 0801efb0 .word 0x0801efb0
8016c18: 0801f650 .word 0x0801f650
8016c1c: 0801f004 .word 0x0801f004
08016c20 <tcp_rexmit_fast>:
*
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
*/
void
tcp_rexmit_fast(struct tcp_pcb *pcb)
{
8016c20: b580 push {r7, lr}
8016c22: b082 sub sp, #8
8016c24: af00 add r7, sp, #0
8016c26: 6078 str r0, [r7, #4]
LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
8016c28: 687b ldr r3, [r7, #4]
8016c2a: 2b00 cmp r3, #0
8016c2c: d106 bne.n 8016c3c <tcp_rexmit_fast+0x1c>
8016c2e: 4b2f ldr r3, [pc, #188] ; (8016cec <tcp_rexmit_fast+0xcc>)
8016c30: f240 62f9 movw r2, #1785 ; 0x6f9
8016c34: 492e ldr r1, [pc, #184] ; (8016cf0 <tcp_rexmit_fast+0xd0>)
8016c36: 482f ldr r0, [pc, #188] ; (8016cf4 <tcp_rexmit_fast+0xd4>)
8016c38: f005 fc86 bl 801c548 <iprintf>
if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) {
8016c3c: 687b ldr r3, [r7, #4]
8016c3e: 6f1b ldr r3, [r3, #112] ; 0x70
8016c40: 2b00 cmp r3, #0
8016c42: d04f beq.n 8016ce4 <tcp_rexmit_fast+0xc4>
8016c44: 687b ldr r3, [r7, #4]
8016c46: 8b5b ldrh r3, [r3, #26]
8016c48: f003 0304 and.w r3, r3, #4
8016c4c: 2b00 cmp r3, #0
8016c4e: d149 bne.n 8016ce4 <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) {
8016c50: 6878 ldr r0, [r7, #4]
8016c52: f7ff ff79 bl 8016b48 <tcp_rexmit>
8016c56: 4603 mov r3, r0
8016c58: 2b00 cmp r3, #0
8016c5a: d143 bne.n 8016ce4 <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;
8016c5c: 687b ldr r3, [r7, #4]
8016c5e: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48
8016c62: 687b ldr r3, [r7, #4]
8016c64: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8016c68: 429a cmp r2, r3
8016c6a: d208 bcs.n 8016c7e <tcp_rexmit_fast+0x5e>
8016c6c: 687b ldr r3, [r7, #4]
8016c6e: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48
8016c72: 2b00 cmp r3, #0
8016c74: da00 bge.n 8016c78 <tcp_rexmit_fast+0x58>
8016c76: 3301 adds r3, #1
8016c78: 105b asrs r3, r3, #1
8016c7a: b29b uxth r3, r3
8016c7c: e007 b.n 8016c8e <tcp_rexmit_fast+0x6e>
8016c7e: 687b ldr r3, [r7, #4]
8016c80: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60
8016c84: 2b00 cmp r3, #0
8016c86: da00 bge.n 8016c8a <tcp_rexmit_fast+0x6a>
8016c88: 3301 adds r3, #1
8016c8a: 105b asrs r3, r3, #1
8016c8c: b29b uxth r3, r3
8016c8e: 687a ldr r2, [r7, #4]
8016c90: f8a2 304a strh.w r3, [r2, #74] ; 0x4a
/* The minimum value for ssthresh should be 2 MSS */
if (pcb->ssthresh < (2U * pcb->mss)) {
8016c94: 687b ldr r3, [r7, #4]
8016c96: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a
8016c9a: 461a mov r2, r3
8016c9c: 687b ldr r3, [r7, #4]
8016c9e: 8e5b ldrh r3, [r3, #50] ; 0x32
8016ca0: 005b lsls r3, r3, #1
8016ca2: 429a cmp r2, r3
8016ca4: d206 bcs.n 8016cb4 <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;
8016ca6: 687b ldr r3, [r7, #4]
8016ca8: 8e5b ldrh r3, [r3, #50] ; 0x32
8016caa: 005b lsls r3, r3, #1
8016cac: b29a uxth r2, r3
8016cae: 687b ldr r3, [r7, #4]
8016cb0: f8a3 204a strh.w r2, [r3, #74] ; 0x4a
}
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
8016cb4: 687b ldr r3, [r7, #4]
8016cb6: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a
8016cba: 687b ldr r3, [r7, #4]
8016cbc: 8e5b ldrh r3, [r3, #50] ; 0x32
8016cbe: 4619 mov r1, r3
8016cc0: 0049 lsls r1, r1, #1
8016cc2: 440b add r3, r1
8016cc4: b29b uxth r3, r3
8016cc6: 4413 add r3, r2
8016cc8: b29a uxth r2, r3
8016cca: 687b ldr r3, [r7, #4]
8016ccc: f8a3 2048 strh.w r2, [r3, #72] ; 0x48
tcp_set_flags(pcb, TF_INFR);
8016cd0: 687b ldr r3, [r7, #4]
8016cd2: 8b5b ldrh r3, [r3, #26]
8016cd4: f043 0304 orr.w r3, r3, #4
8016cd8: b29a uxth r2, r3
8016cda: 687b ldr r3, [r7, #4]
8016cdc: 835a strh r2, [r3, #26]
/* Reset the retransmission timer to prevent immediate rto retransmissions */
pcb->rtime = 0;
8016cde: 687b ldr r3, [r7, #4]
8016ce0: 2200 movs r2, #0
8016ce2: 861a strh r2, [r3, #48] ; 0x30
}
}
}
8016ce4: bf00 nop
8016ce6: 3708 adds r7, #8
8016ce8: 46bd mov sp, r7
8016cea: bd80 pop {r7, pc}
8016cec: 0801efb0 .word 0x0801efb0
8016cf0: 0801f668 .word 0x0801f668
8016cf4: 0801f004 .word 0x0801f004
08016cf8 <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)
{
8016cf8: b580 push {r7, lr}
8016cfa: b086 sub sp, #24
8016cfc: af00 add r7, sp, #0
8016cfe: 60f8 str r0, [r7, #12]
8016d00: 607b str r3, [r7, #4]
8016d02: 460b mov r3, r1
8016d04: 817b strh r3, [r7, #10]
8016d06: 4613 mov r3, r2
8016d08: 813b strh r3, [r7, #8]
struct tcp_hdr *tcphdr;
struct pbuf *p;
p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM);
8016d0a: 897a ldrh r2, [r7, #10]
8016d0c: 893b ldrh r3, [r7, #8]
8016d0e: 4413 add r3, r2
8016d10: b29b uxth r3, r3
8016d12: 3314 adds r3, #20
8016d14: b29b uxth r3, r3
8016d16: f44f 7220 mov.w r2, #640 ; 0x280
8016d1a: 4619 mov r1, r3
8016d1c: 2022 movs r0, #34 ; 0x22
8016d1e: f7fa fc03 bl 8011528 <pbuf_alloc>
8016d22: 6178 str r0, [r7, #20]
if (p != NULL) {
8016d24: 697b ldr r3, [r7, #20]
8016d26: 2b00 cmp r3, #0
8016d28: d04e beq.n 8016dc8 <tcp_output_alloc_header_common+0xd0>
LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
8016d2a: 697b ldr r3, [r7, #20]
8016d2c: 895b ldrh r3, [r3, #10]
8016d2e: 461a mov r2, r3
8016d30: 897b ldrh r3, [r7, #10]
8016d32: 3314 adds r3, #20
8016d34: 429a cmp r2, r3
8016d36: da06 bge.n 8016d46 <tcp_output_alloc_header_common+0x4e>
8016d38: 4b26 ldr r3, [pc, #152] ; (8016dd4 <tcp_output_alloc_header_common+0xdc>)
8016d3a: f240 7224 movw r2, #1828 ; 0x724
8016d3e: 4926 ldr r1, [pc, #152] ; (8016dd8 <tcp_output_alloc_header_common+0xe0>)
8016d40: 4826 ldr r0, [pc, #152] ; (8016ddc <tcp_output_alloc_header_common+0xe4>)
8016d42: f005 fc01 bl 801c548 <iprintf>
(p->len >= TCP_HLEN + optlen));
tcphdr = (struct tcp_hdr *)p->payload;
8016d46: 697b ldr r3, [r7, #20]
8016d48: 685b ldr r3, [r3, #4]
8016d4a: 613b str r3, [r7, #16]
tcphdr->src = lwip_htons(src_port);
8016d4c: 8c3b ldrh r3, [r7, #32]
8016d4e: 4618 mov r0, r3
8016d50: f7f9 fb16 bl 8010380 <lwip_htons>
8016d54: 4603 mov r3, r0
8016d56: 461a mov r2, r3
8016d58: 693b ldr r3, [r7, #16]
8016d5a: 801a strh r2, [r3, #0]
tcphdr->dest = lwip_htons(dst_port);
8016d5c: 8cbb ldrh r3, [r7, #36] ; 0x24
8016d5e: 4618 mov r0, r3
8016d60: f7f9 fb0e bl 8010380 <lwip_htons>
8016d64: 4603 mov r3, r0
8016d66: 461a mov r2, r3
8016d68: 693b ldr r3, [r7, #16]
8016d6a: 805a strh r2, [r3, #2]
tcphdr->seqno = seqno_be;
8016d6c: 693b ldr r3, [r7, #16]
8016d6e: 687a ldr r2, [r7, #4]
8016d70: 605a str r2, [r3, #4]
tcphdr->ackno = lwip_htonl(ackno);
8016d72: 68f8 ldr r0, [r7, #12]
8016d74: f7f9 fb19 bl 80103aa <lwip_htonl>
8016d78: 4602 mov r2, r0
8016d7a: 693b ldr r3, [r7, #16]
8016d7c: 609a str r2, [r3, #8]
TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags);
8016d7e: 897b ldrh r3, [r7, #10]
8016d80: 089b lsrs r3, r3, #2
8016d82: b29b uxth r3, r3
8016d84: 3305 adds r3, #5
8016d86: b29b uxth r3, r3
8016d88: 031b lsls r3, r3, #12
8016d8a: b29a uxth r2, r3
8016d8c: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
8016d90: b29b uxth r3, r3
8016d92: 4313 orrs r3, r2
8016d94: b29b uxth r3, r3
8016d96: 4618 mov r0, r3
8016d98: f7f9 faf2 bl 8010380 <lwip_htons>
8016d9c: 4603 mov r3, r0
8016d9e: 461a mov r2, r3
8016da0: 693b ldr r3, [r7, #16]
8016da2: 819a strh r2, [r3, #12]
tcphdr->wnd = lwip_htons(wnd);
8016da4: 8dbb ldrh r3, [r7, #44] ; 0x2c
8016da6: 4618 mov r0, r3
8016da8: f7f9 faea bl 8010380 <lwip_htons>
8016dac: 4603 mov r3, r0
8016dae: 461a mov r2, r3
8016db0: 693b ldr r3, [r7, #16]
8016db2: 81da strh r2, [r3, #14]
tcphdr->chksum = 0;
8016db4: 693b ldr r3, [r7, #16]
8016db6: 2200 movs r2, #0
8016db8: 741a strb r2, [r3, #16]
8016dba: 2200 movs r2, #0
8016dbc: 745a strb r2, [r3, #17]
tcphdr->urgp = 0;
8016dbe: 693b ldr r3, [r7, #16]
8016dc0: 2200 movs r2, #0
8016dc2: 749a strb r2, [r3, #18]
8016dc4: 2200 movs r2, #0
8016dc6: 74da strb r2, [r3, #19]
}
return p;
8016dc8: 697b ldr r3, [r7, #20]
}
8016dca: 4618 mov r0, r3
8016dcc: 3718 adds r7, #24
8016dce: 46bd mov sp, r7
8016dd0: bd80 pop {r7, pc}
8016dd2: bf00 nop
8016dd4: 0801efb0 .word 0x0801efb0
8016dd8: 0801f688 .word 0x0801f688
8016ddc: 0801f004 .word 0x0801f004
08016de0 <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 */)
{
8016de0: b5b0 push {r4, r5, r7, lr}
8016de2: b08a sub sp, #40 ; 0x28
8016de4: af04 add r7, sp, #16
8016de6: 60f8 str r0, [r7, #12]
8016de8: 607b str r3, [r7, #4]
8016dea: 460b mov r3, r1
8016dec: 817b strh r3, [r7, #10]
8016dee: 4613 mov r3, r2
8016df0: 813b strh r3, [r7, #8]
struct pbuf *p;
LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
8016df2: 68fb ldr r3, [r7, #12]
8016df4: 2b00 cmp r3, #0
8016df6: d106 bne.n 8016e06 <tcp_output_alloc_header+0x26>
8016df8: 4b15 ldr r3, [pc, #84] ; (8016e50 <tcp_output_alloc_header+0x70>)
8016dfa: f240 7242 movw r2, #1858 ; 0x742
8016dfe: 4915 ldr r1, [pc, #84] ; (8016e54 <tcp_output_alloc_header+0x74>)
8016e00: 4815 ldr r0, [pc, #84] ; (8016e58 <tcp_output_alloc_header+0x78>)
8016e02: f005 fba1 bl 801c548 <iprintf>
p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen,
8016e06: 68fb ldr r3, [r7, #12]
8016e08: 6a58 ldr r0, [r3, #36] ; 0x24
8016e0a: 68fb ldr r3, [r7, #12]
8016e0c: 8adb ldrh r3, [r3, #22]
8016e0e: 68fa ldr r2, [r7, #12]
8016e10: 8b12 ldrh r2, [r2, #24]
8016e12: 68f9 ldr r1, [r7, #12]
8016e14: 8d49 ldrh r1, [r1, #42] ; 0x2a
8016e16: 893d ldrh r5, [r7, #8]
8016e18: 897c ldrh r4, [r7, #10]
8016e1a: 9103 str r1, [sp, #12]
8016e1c: 2110 movs r1, #16
8016e1e: 9102 str r1, [sp, #8]
8016e20: 9201 str r2, [sp, #4]
8016e22: 9300 str r3, [sp, #0]
8016e24: 687b ldr r3, [r7, #4]
8016e26: 462a mov r2, r5
8016e28: 4621 mov r1, r4
8016e2a: f7ff ff65 bl 8016cf8 <tcp_output_alloc_header_common>
8016e2e: 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) {
8016e30: 697b ldr r3, [r7, #20]
8016e32: 2b00 cmp r3, #0
8016e34: d006 beq.n 8016e44 <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;
8016e36: 68fb ldr r3, [r7, #12]
8016e38: 6a5b ldr r3, [r3, #36] ; 0x24
8016e3a: 68fa ldr r2, [r7, #12]
8016e3c: 8d52 ldrh r2, [r2, #42] ; 0x2a
8016e3e: 441a add r2, r3
8016e40: 68fb ldr r3, [r7, #12]
8016e42: 62da str r2, [r3, #44] ; 0x2c
}
return p;
8016e44: 697b ldr r3, [r7, #20]
}
8016e46: 4618 mov r0, r3
8016e48: 3718 adds r7, #24
8016e4a: 46bd mov sp, r7
8016e4c: bdb0 pop {r4, r5, r7, pc}
8016e4e: bf00 nop
8016e50: 0801efb0 .word 0x0801efb0
8016e54: 0801f6b8 .word 0x0801f6b8
8016e58: 0801f004 .word 0x0801f004
08016e5c <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)
{
8016e5c: b580 push {r7, lr}
8016e5e: b088 sub sp, #32
8016e60: af00 add r7, sp, #0
8016e62: 60f8 str r0, [r7, #12]
8016e64: 60b9 str r1, [r7, #8]
8016e66: 4611 mov r1, r2
8016e68: 461a mov r2, r3
8016e6a: 460b mov r3, r1
8016e6c: 71fb strb r3, [r7, #7]
8016e6e: 4613 mov r3, r2
8016e70: 71bb strb r3, [r7, #6]
struct tcp_hdr *tcphdr;
u32_t *opts;
u16_t sacks_len = 0;
8016e72: 2300 movs r3, #0
8016e74: 83fb strh r3, [r7, #30]
LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
8016e76: 68bb ldr r3, [r7, #8]
8016e78: 2b00 cmp r3, #0
8016e7a: d106 bne.n 8016e8a <tcp_output_fill_options+0x2e>
8016e7c: 4b13 ldr r3, [pc, #76] ; (8016ecc <tcp_output_fill_options+0x70>)
8016e7e: f240 7256 movw r2, #1878 ; 0x756
8016e82: 4913 ldr r1, [pc, #76] ; (8016ed0 <tcp_output_fill_options+0x74>)
8016e84: 4813 ldr r0, [pc, #76] ; (8016ed4 <tcp_output_fill_options+0x78>)
8016e86: f005 fb5f bl 801c548 <iprintf>
tcphdr = (struct tcp_hdr *)p->payload;
8016e8a: 68bb ldr r3, [r7, #8]
8016e8c: 685b ldr r3, [r3, #4]
8016e8e: 61bb str r3, [r7, #24]
opts = (u32_t *)(void *)(tcphdr + 1);
8016e90: 69bb ldr r3, [r7, #24]
8016e92: 3314 adds r3, #20
8016e94: 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));
8016e96: 69bb ldr r3, [r7, #24]
8016e98: f103 0214 add.w r2, r3, #20
8016e9c: 8bfb ldrh r3, [r7, #30]
8016e9e: 009b lsls r3, r3, #2
8016ea0: 4619 mov r1, r3
8016ea2: 79fb ldrb r3, [r7, #7]
8016ea4: 009b lsls r3, r3, #2
8016ea6: f003 0304 and.w r3, r3, #4
8016eaa: 440b add r3, r1
8016eac: 4413 add r3, r2
8016eae: 697a ldr r2, [r7, #20]
8016eb0: 429a cmp r2, r3
8016eb2: d006 beq.n 8016ec2 <tcp_output_fill_options+0x66>
8016eb4: 4b05 ldr r3, [pc, #20] ; (8016ecc <tcp_output_fill_options+0x70>)
8016eb6: f240 7275 movw r2, #1909 ; 0x775
8016eba: 4907 ldr r1, [pc, #28] ; (8016ed8 <tcp_output_fill_options+0x7c>)
8016ebc: 4805 ldr r0, [pc, #20] ; (8016ed4 <tcp_output_fill_options+0x78>)
8016ebe: f005 fb43 bl 801c548 <iprintf>
LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */
LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */
}
8016ec2: bf00 nop
8016ec4: 3720 adds r7, #32
8016ec6: 46bd mov sp, r7
8016ec8: bd80 pop {r7, pc}
8016eca: bf00 nop
8016ecc: 0801efb0 .word 0x0801efb0
8016ed0: 0801f6e0 .word 0x0801f6e0
8016ed4: 0801f004 .word 0x0801f004
8016ed8: 0801f5d8 .word 0x0801f5d8
08016edc <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)
{
8016edc: b580 push {r7, lr}
8016ede: b08a sub sp, #40 ; 0x28
8016ee0: af04 add r7, sp, #16
8016ee2: 60f8 str r0, [r7, #12]
8016ee4: 60b9 str r1, [r7, #8]
8016ee6: 607a str r2, [r7, #4]
8016ee8: 603b str r3, [r7, #0]
err_t err;
struct netif *netif;
LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
8016eea: 68bb ldr r3, [r7, #8]
8016eec: 2b00 cmp r3, #0
8016eee: d106 bne.n 8016efe <tcp_output_control_segment+0x22>
8016ef0: 4b1c ldr r3, [pc, #112] ; (8016f64 <tcp_output_control_segment+0x88>)
8016ef2: f240 7287 movw r2, #1927 ; 0x787
8016ef6: 491c ldr r1, [pc, #112] ; (8016f68 <tcp_output_control_segment+0x8c>)
8016ef8: 481c ldr r0, [pc, #112] ; (8016f6c <tcp_output_control_segment+0x90>)
8016efa: f005 fb25 bl 801c548 <iprintf>
netif = tcp_route(pcb, src, dst);
8016efe: 683a ldr r2, [r7, #0]
8016f00: 6879 ldr r1, [r7, #4]
8016f02: 68f8 ldr r0, [r7, #12]
8016f04: f7fe ff2e bl 8015d64 <tcp_route>
8016f08: 6138 str r0, [r7, #16]
if (netif == NULL) {
8016f0a: 693b ldr r3, [r7, #16]
8016f0c: 2b00 cmp r3, #0
8016f0e: d102 bne.n 8016f16 <tcp_output_control_segment+0x3a>
err = ERR_RTE;
8016f10: 23fc movs r3, #252 ; 0xfc
8016f12: 75fb strb r3, [r7, #23]
8016f14: e01c b.n 8016f50 <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) {
8016f16: 68fb ldr r3, [r7, #12]
8016f18: 2b00 cmp r3, #0
8016f1a: d006 beq.n 8016f2a <tcp_output_control_segment+0x4e>
NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints)));
ttl = pcb->ttl;
8016f1c: 68fb ldr r3, [r7, #12]
8016f1e: 7adb ldrb r3, [r3, #11]
8016f20: 75bb strb r3, [r7, #22]
tos = pcb->tos;
8016f22: 68fb ldr r3, [r7, #12]
8016f24: 7a9b ldrb r3, [r3, #10]
8016f26: 757b strb r3, [r7, #21]
8016f28: e003 b.n 8016f32 <tcp_output_control_segment+0x56>
} else {
/* Send output with hardcoded TTL/HL since we have no access to the pcb */
ttl = TCP_TTL;
8016f2a: 23ff movs r3, #255 ; 0xff
8016f2c: 75bb strb r3, [r7, #22]
tos = 0;
8016f2e: 2300 movs r3, #0
8016f30: 757b strb r3, [r7, #21]
}
TCP_STATS_INC(tcp.xmit);
err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif);
8016f32: 7dba ldrb r2, [r7, #22]
8016f34: 693b ldr r3, [r7, #16]
8016f36: 9302 str r3, [sp, #8]
8016f38: 2306 movs r3, #6
8016f3a: 9301 str r3, [sp, #4]
8016f3c: 7d7b ldrb r3, [r7, #21]
8016f3e: 9300 str r3, [sp, #0]
8016f40: 4613 mov r3, r2
8016f42: 683a ldr r2, [r7, #0]
8016f44: 6879 ldr r1, [r7, #4]
8016f46: 68b8 ldr r0, [r7, #8]
8016f48: f004 f964 bl 801b214 <ip4_output_if>
8016f4c: 4603 mov r3, r0
8016f4e: 75fb strb r3, [r7, #23]
NETIF_RESET_HINTS(netif);
}
pbuf_free(p);
8016f50: 68b8 ldr r0, [r7, #8]
8016f52: f7fa fdc9 bl 8011ae8 <pbuf_free>
return err;
8016f56: f997 3017 ldrsb.w r3, [r7, #23]
}
8016f5a: 4618 mov r0, r3
8016f5c: 3718 adds r7, #24
8016f5e: 46bd mov sp, r7
8016f60: bd80 pop {r7, pc}
8016f62: bf00 nop
8016f64: 0801efb0 .word 0x0801efb0
8016f68: 0801f708 .word 0x0801f708
8016f6c: 0801f004 .word 0x0801f004
08016f70 <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)
{
8016f70: b590 push {r4, r7, lr}
8016f72: b08b sub sp, #44 ; 0x2c
8016f74: af04 add r7, sp, #16
8016f76: 60f8 str r0, [r7, #12]
8016f78: 60b9 str r1, [r7, #8]
8016f7a: 607a str r2, [r7, #4]
8016f7c: 603b str r3, [r7, #0]
struct pbuf *p;
u16_t wnd;
u8_t optlen;
LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
8016f7e: 683b ldr r3, [r7, #0]
8016f80: 2b00 cmp r3, #0
8016f82: d106 bne.n 8016f92 <tcp_rst+0x22>
8016f84: 4b1f ldr r3, [pc, #124] ; (8017004 <tcp_rst+0x94>)
8016f86: f240 72c4 movw r2, #1988 ; 0x7c4
8016f8a: 491f ldr r1, [pc, #124] ; (8017008 <tcp_rst+0x98>)
8016f8c: 481f ldr r0, [pc, #124] ; (801700c <tcp_rst+0x9c>)
8016f8e: f005 fadb bl 801c548 <iprintf>
LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
8016f92: 6abb ldr r3, [r7, #40] ; 0x28
8016f94: 2b00 cmp r3, #0
8016f96: d106 bne.n 8016fa6 <tcp_rst+0x36>
8016f98: 4b1a ldr r3, [pc, #104] ; (8017004 <tcp_rst+0x94>)
8016f9a: f240 72c5 movw r2, #1989 ; 0x7c5
8016f9e: 491c ldr r1, [pc, #112] ; (8017010 <tcp_rst+0xa0>)
8016fa0: 481a ldr r0, [pc, #104] ; (801700c <tcp_rst+0x9c>)
8016fa2: f005 fad1 bl 801c548 <iprintf>
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
8016fa6: 2300 movs r3, #0
8016fa8: 75fb strb r3, [r7, #23]
#if LWIP_WND_SCALE
wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF));
#else
wnd = PP_HTONS(TCP_WND);
8016faa: f246 0308 movw r3, #24584 ; 0x6008
8016fae: 82bb strh r3, [r7, #20]
#endif
p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port,
8016fb0: 7dfb ldrb r3, [r7, #23]
8016fb2: b29c uxth r4, r3
8016fb4: 68b8 ldr r0, [r7, #8]
8016fb6: f7f9 f9f8 bl 80103aa <lwip_htonl>
8016fba: 4602 mov r2, r0
8016fbc: 8abb ldrh r3, [r7, #20]
8016fbe: 9303 str r3, [sp, #12]
8016fc0: 2314 movs r3, #20
8016fc2: 9302 str r3, [sp, #8]
8016fc4: 8e3b ldrh r3, [r7, #48] ; 0x30
8016fc6: 9301 str r3, [sp, #4]
8016fc8: 8dbb ldrh r3, [r7, #44] ; 0x2c
8016fca: 9300 str r3, [sp, #0]
8016fcc: 4613 mov r3, r2
8016fce: 2200 movs r2, #0
8016fd0: 4621 mov r1, r4
8016fd2: 6878 ldr r0, [r7, #4]
8016fd4: f7ff fe90 bl 8016cf8 <tcp_output_alloc_header_common>
8016fd8: 6138 str r0, [r7, #16]
remote_port, TCP_RST | TCP_ACK, wnd);
if (p == NULL) {
8016fda: 693b ldr r3, [r7, #16]
8016fdc: 2b00 cmp r3, #0
8016fde: d00c beq.n 8016ffa <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);
8016fe0: 7dfb ldrb r3, [r7, #23]
8016fe2: 2200 movs r2, #0
8016fe4: 6939 ldr r1, [r7, #16]
8016fe6: 68f8 ldr r0, [r7, #12]
8016fe8: f7ff ff38 bl 8016e5c <tcp_output_fill_options>
MIB2_STATS_INC(mib2.tcpoutrsts);
tcp_output_control_segment(pcb, p, local_ip, remote_ip);
8016fec: 6abb ldr r3, [r7, #40] ; 0x28
8016fee: 683a ldr r2, [r7, #0]
8016ff0: 6939 ldr r1, [r7, #16]
8016ff2: 68f8 ldr r0, [r7, #12]
8016ff4: f7ff ff72 bl 8016edc <tcp_output_control_segment>
8016ff8: e000 b.n 8016ffc <tcp_rst+0x8c>
return;
8016ffa: bf00 nop
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno));
}
8016ffc: 371c adds r7, #28
8016ffe: 46bd mov sp, r7
8017000: bd90 pop {r4, r7, pc}
8017002: bf00 nop
8017004: 0801efb0 .word 0x0801efb0
8017008: 0801f734 .word 0x0801f734
801700c: 0801f004 .word 0x0801f004
8017010: 0801f750 .word 0x0801f750
08017014 <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)
{
8017014: b590 push {r4, r7, lr}
8017016: b087 sub sp, #28
8017018: af00 add r7, sp, #0
801701a: 6078 str r0, [r7, #4]
err_t err;
struct pbuf *p;
u8_t optlen, optflags = 0;
801701c: 2300 movs r3, #0
801701e: 75fb strb r3, [r7, #23]
u8_t num_sacks = 0;
8017020: 2300 movs r3, #0
8017022: 75bb strb r3, [r7, #22]
LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
8017024: 687b ldr r3, [r7, #4]
8017026: 2b00 cmp r3, #0
8017028: d106 bne.n 8017038 <tcp_send_empty_ack+0x24>
801702a: 4b28 ldr r3, [pc, #160] ; (80170cc <tcp_send_empty_ack+0xb8>)
801702c: f240 72ea movw r2, #2026 ; 0x7ea
8017030: 4927 ldr r1, [pc, #156] ; (80170d0 <tcp_send_empty_ack+0xbc>)
8017032: 4828 ldr r0, [pc, #160] ; (80170d4 <tcp_send_empty_ack+0xc0>)
8017034: f005 fa88 bl 801c548 <iprintf>
#if LWIP_TCP_TIMESTAMPS
if (pcb->flags & TF_TIMESTAMP) {
optflags = TF_SEG_OPTS_TS;
}
#endif
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
8017038: 7dfb ldrb r3, [r7, #23]
801703a: 009b lsls r3, r3, #2
801703c: b2db uxtb r3, r3
801703e: f003 0304 and.w r3, r3, #4
8017042: 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));
8017044: 7d7b ldrb r3, [r7, #21]
8017046: b29c uxth r4, r3
8017048: 687b ldr r3, [r7, #4]
801704a: 6d1b ldr r3, [r3, #80] ; 0x50
801704c: 4618 mov r0, r3
801704e: f7f9 f9ac bl 80103aa <lwip_htonl>
8017052: 4603 mov r3, r0
8017054: 2200 movs r2, #0
8017056: 4621 mov r1, r4
8017058: 6878 ldr r0, [r7, #4]
801705a: f7ff fec1 bl 8016de0 <tcp_output_alloc_header>
801705e: 6138 str r0, [r7, #16]
if (p == NULL) {
8017060: 693b ldr r3, [r7, #16]
8017062: 2b00 cmp r3, #0
8017064: d109 bne.n 801707a <tcp_send_empty_ack+0x66>
/* let tcp_fasttmr retry sending this ACK */
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
8017066: 687b ldr r3, [r7, #4]
8017068: 8b5b ldrh r3, [r3, #26]
801706a: f043 0303 orr.w r3, r3, #3
801706e: b29a uxth r2, r3
8017070: 687b ldr r3, [r7, #4]
8017072: 835a strh r2, [r3, #26]
LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n"));
return ERR_BUF;
8017074: f06f 0301 mvn.w r3, #1
8017078: e023 b.n 80170c2 <tcp_send_empty_ack+0xae>
}
tcp_output_fill_options(pcb, p, optflags, num_sacks);
801707a: 7dbb ldrb r3, [r7, #22]
801707c: 7dfa ldrb r2, [r7, #23]
801707e: 6939 ldr r1, [r7, #16]
8017080: 6878 ldr r0, [r7, #4]
8017082: f7ff feeb bl 8016e5c <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);
8017086: 687a ldr r2, [r7, #4]
8017088: 687b ldr r3, [r7, #4]
801708a: 3304 adds r3, #4
801708c: 6939 ldr r1, [r7, #16]
801708e: 6878 ldr r0, [r7, #4]
8017090: f7ff ff24 bl 8016edc <tcp_output_control_segment>
8017094: 4603 mov r3, r0
8017096: 73fb strb r3, [r7, #15]
if (err != ERR_OK) {
8017098: f997 300f ldrsb.w r3, [r7, #15]
801709c: 2b00 cmp r3, #0
801709e: d007 beq.n 80170b0 <tcp_send_empty_ack+0x9c>
/* let tcp_fasttmr retry sending this ACK */
tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
80170a0: 687b ldr r3, [r7, #4]
80170a2: 8b5b ldrh r3, [r3, #26]
80170a4: f043 0303 orr.w r3, r3, #3
80170a8: b29a uxth r2, r3
80170aa: 687b ldr r3, [r7, #4]
80170ac: 835a strh r2, [r3, #26]
80170ae: e006 b.n 80170be <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);
80170b0: 687b ldr r3, [r7, #4]
80170b2: 8b5b ldrh r3, [r3, #26]
80170b4: f023 0303 bic.w r3, r3, #3
80170b8: b29a uxth r2, r3
80170ba: 687b ldr r3, [r7, #4]
80170bc: 835a strh r2, [r3, #26]
}
return err;
80170be: f997 300f ldrsb.w r3, [r7, #15]
}
80170c2: 4618 mov r0, r3
80170c4: 371c adds r7, #28
80170c6: 46bd mov sp, r7
80170c8: bd90 pop {r4, r7, pc}
80170ca: bf00 nop
80170cc: 0801efb0 .word 0x0801efb0
80170d0: 0801f76c .word 0x0801f76c
80170d4: 0801f004 .word 0x0801f004
080170d8 <tcp_keepalive>:
*
* @param pcb the tcp_pcb for which to send a keepalive packet
*/
err_t
tcp_keepalive(struct tcp_pcb *pcb)
{
80170d8: b590 push {r4, r7, lr}
80170da: b087 sub sp, #28
80170dc: af00 add r7, sp, #0
80170de: 6078 str r0, [r7, #4]
err_t err;
struct pbuf *p;
u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
80170e0: 2300 movs r3, #0
80170e2: 75fb strb r3, [r7, #23]
LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
80170e4: 687b ldr r3, [r7, #4]
80170e6: 2b00 cmp r3, #0
80170e8: d106 bne.n 80170f8 <tcp_keepalive+0x20>
80170ea: 4b18 ldr r3, [pc, #96] ; (801714c <tcp_keepalive+0x74>)
80170ec: f640 0224 movw r2, #2084 ; 0x824
80170f0: 4917 ldr r1, [pc, #92] ; (8017150 <tcp_keepalive+0x78>)
80170f2: 4818 ldr r0, [pc, #96] ; (8017154 <tcp_keepalive+0x7c>)
80170f4: f005 fa28 bl 801c548 <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));
80170f8: 7dfb ldrb r3, [r7, #23]
80170fa: b29c uxth r4, r3
80170fc: 687b ldr r3, [r7, #4]
80170fe: 6d1b ldr r3, [r3, #80] ; 0x50
8017100: 3b01 subs r3, #1
8017102: 4618 mov r0, r3
8017104: f7f9 f951 bl 80103aa <lwip_htonl>
8017108: 4603 mov r3, r0
801710a: 2200 movs r2, #0
801710c: 4621 mov r1, r4
801710e: 6878 ldr r0, [r7, #4]
8017110: f7ff fe66 bl 8016de0 <tcp_output_alloc_header>
8017114: 6138 str r0, [r7, #16]
if (p == NULL) {
8017116: 693b ldr r3, [r7, #16]
8017118: 2b00 cmp r3, #0
801711a: d102 bne.n 8017122 <tcp_keepalive+0x4a>
LWIP_DEBUGF(TCP_DEBUG,
("tcp_keepalive: could not allocate memory for pbuf\n"));
return ERR_MEM;
801711c: f04f 33ff mov.w r3, #4294967295
8017120: e010 b.n 8017144 <tcp_keepalive+0x6c>
}
tcp_output_fill_options(pcb, p, 0, optlen);
8017122: 7dfb ldrb r3, [r7, #23]
8017124: 2200 movs r2, #0
8017126: 6939 ldr r1, [r7, #16]
8017128: 6878 ldr r0, [r7, #4]
801712a: f7ff fe97 bl 8016e5c <tcp_output_fill_options>
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
801712e: 687a ldr r2, [r7, #4]
8017130: 687b ldr r3, [r7, #4]
8017132: 3304 adds r3, #4
8017134: 6939 ldr r1, [r7, #16]
8017136: 6878 ldr r0, [r7, #4]
8017138: f7ff fed0 bl 8016edc <tcp_output_control_segment>
801713c: 4603 mov r3, r0
801713e: 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;
8017140: f997 300f ldrsb.w r3, [r7, #15]
}
8017144: 4618 mov r0, r3
8017146: 371c adds r7, #28
8017148: 46bd mov sp, r7
801714a: bd90 pop {r4, r7, pc}
801714c: 0801efb0 .word 0x0801efb0
8017150: 0801f78c .word 0x0801f78c
8017154: 0801f004 .word 0x0801f004
08017158 <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)
{
8017158: b590 push {r4, r7, lr}
801715a: b08b sub sp, #44 ; 0x2c
801715c: af00 add r7, sp, #0
801715e: 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);
8017160: 2300 movs r3, #0
8017162: f887 3027 strb.w r3, [r7, #39] ; 0x27
LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
8017166: 687b ldr r3, [r7, #4]
8017168: 2b00 cmp r3, #0
801716a: d106 bne.n 801717a <tcp_zero_window_probe+0x22>
801716c: 4b4c ldr r3, [pc, #304] ; (80172a0 <tcp_zero_window_probe+0x148>)
801716e: f640 024f movw r2, #2127 ; 0x84f
8017172: 494c ldr r1, [pc, #304] ; (80172a4 <tcp_zero_window_probe+0x14c>)
8017174: 484c ldr r0, [pc, #304] ; (80172a8 <tcp_zero_window_probe+0x150>)
8017176: f005 f9e7 bl 801c548 <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;
801717a: 687b ldr r3, [r7, #4]
801717c: 6edb ldr r3, [r3, #108] ; 0x6c
801717e: 623b str r3, [r7, #32]
if (seg == NULL) {
8017180: 6a3b ldr r3, [r7, #32]
8017182: 2b00 cmp r3, #0
8017184: d101 bne.n 801718a <tcp_zero_window_probe+0x32>
/* Not expected, persist timer should be off when the send buffer is empty */
return ERR_OK;
8017186: 2300 movs r3, #0
8017188: e086 b.n 8017298 <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) {
801718a: 687b ldr r3, [r7, #4]
801718c: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
8017190: 2bff cmp r3, #255 ; 0xff
8017192: d007 beq.n 80171a4 <tcp_zero_window_probe+0x4c>
++pcb->persist_probe;
8017194: 687b ldr r3, [r7, #4]
8017196: f893 309a ldrb.w r3, [r3, #154] ; 0x9a
801719a: 3301 adds r3, #1
801719c: b2da uxtb r2, r3
801719e: 687b ldr r3, [r7, #4]
80171a0: f883 209a strb.w r2, [r3, #154] ; 0x9a
}
is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
80171a4: 6a3b ldr r3, [r7, #32]
80171a6: 68db ldr r3, [r3, #12]
80171a8: 899b ldrh r3, [r3, #12]
80171aa: b29b uxth r3, r3
80171ac: 4618 mov r0, r3
80171ae: f7f9 f8e7 bl 8010380 <lwip_htons>
80171b2: 4603 mov r3, r0
80171b4: b2db uxtb r3, r3
80171b6: f003 0301 and.w r3, r3, #1
80171ba: 2b00 cmp r3, #0
80171bc: d005 beq.n 80171ca <tcp_zero_window_probe+0x72>
80171be: 6a3b ldr r3, [r7, #32]
80171c0: 891b ldrh r3, [r3, #8]
80171c2: 2b00 cmp r3, #0
80171c4: d101 bne.n 80171ca <tcp_zero_window_probe+0x72>
80171c6: 2301 movs r3, #1
80171c8: e000 b.n 80171cc <tcp_zero_window_probe+0x74>
80171ca: 2300 movs r3, #0
80171cc: 77fb strb r3, [r7, #31]
/* we want to send one seqno: either FIN or data (no options) */
len = is_fin ? 0 : 1;
80171ce: 7ffb ldrb r3, [r7, #31]
80171d0: 2b00 cmp r3, #0
80171d2: bf0c ite eq
80171d4: 2301 moveq r3, #1
80171d6: 2300 movne r3, #0
80171d8: b2db uxtb r3, r3
80171da: 83bb strh r3, [r7, #28]
p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno);
80171dc: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80171e0: b299 uxth r1, r3
80171e2: 6a3b ldr r3, [r7, #32]
80171e4: 68db ldr r3, [r3, #12]
80171e6: 685b ldr r3, [r3, #4]
80171e8: 8bba ldrh r2, [r7, #28]
80171ea: 6878 ldr r0, [r7, #4]
80171ec: f7ff fdf8 bl 8016de0 <tcp_output_alloc_header>
80171f0: 61b8 str r0, [r7, #24]
if (p == NULL) {
80171f2: 69bb ldr r3, [r7, #24]
80171f4: 2b00 cmp r3, #0
80171f6: d102 bne.n 80171fe <tcp_zero_window_probe+0xa6>
LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n"));
return ERR_MEM;
80171f8: f04f 33ff mov.w r3, #4294967295
80171fc: e04c b.n 8017298 <tcp_zero_window_probe+0x140>
}
tcphdr = (struct tcp_hdr *)p->payload;
80171fe: 69bb ldr r3, [r7, #24]
8017200: 685b ldr r3, [r3, #4]
8017202: 617b str r3, [r7, #20]
if (is_fin) {
8017204: 7ffb ldrb r3, [r7, #31]
8017206: 2b00 cmp r3, #0
8017208: d011 beq.n 801722e <tcp_zero_window_probe+0xd6>
/* FIN segment, no data */
TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
801720a: 697b ldr r3, [r7, #20]
801720c: 899b ldrh r3, [r3, #12]
801720e: b29b uxth r3, r3
8017210: b21b sxth r3, r3
8017212: f423 537c bic.w r3, r3, #16128 ; 0x3f00
8017216: b21c sxth r4, r3
8017218: 2011 movs r0, #17
801721a: f7f9 f8b1 bl 8010380 <lwip_htons>
801721e: 4603 mov r3, r0
8017220: b21b sxth r3, r3
8017222: 4323 orrs r3, r4
8017224: b21b sxth r3, r3
8017226: b29a uxth r2, r3
8017228: 697b ldr r3, [r7, #20]
801722a: 819a strh r2, [r3, #12]
801722c: e010 b.n 8017250 <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);
801722e: 69bb ldr r3, [r7, #24]
8017230: 685b ldr r3, [r3, #4]
8017232: 3314 adds r3, #20
8017234: 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);
8017236: 6a3b ldr r3, [r7, #32]
8017238: 6858 ldr r0, [r3, #4]
801723a: 6a3b ldr r3, [r7, #32]
801723c: 685b ldr r3, [r3, #4]
801723e: 891a ldrh r2, [r3, #8]
8017240: 6a3b ldr r3, [r7, #32]
8017242: 891b ldrh r3, [r3, #8]
8017244: 1ad3 subs r3, r2, r3
8017246: b29b uxth r3, r3
8017248: 2201 movs r2, #1
801724a: 6939 ldr r1, [r7, #16]
801724c: f7fa fe52 bl 8011ef4 <pbuf_copy_partial>
}
/* The byte may be acknowledged without the window being opened. */
snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1;
8017250: 6a3b ldr r3, [r7, #32]
8017252: 68db ldr r3, [r3, #12]
8017254: 685b ldr r3, [r3, #4]
8017256: 4618 mov r0, r3
8017258: f7f9 f8a7 bl 80103aa <lwip_htonl>
801725c: 4603 mov r3, r0
801725e: 3301 adds r3, #1
8017260: 60fb str r3, [r7, #12]
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
8017262: 687b ldr r3, [r7, #4]
8017264: 6d1a ldr r2, [r3, #80] ; 0x50
8017266: 68fb ldr r3, [r7, #12]
8017268: 1ad3 subs r3, r2, r3
801726a: 2b00 cmp r3, #0
801726c: da02 bge.n 8017274 <tcp_zero_window_probe+0x11c>
pcb->snd_nxt = snd_nxt;
801726e: 687b ldr r3, [r7, #4]
8017270: 68fa ldr r2, [r7, #12]
8017272: 651a str r2, [r3, #80] ; 0x50
}
tcp_output_fill_options(pcb, p, 0, optlen);
8017274: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8017278: 2200 movs r2, #0
801727a: 69b9 ldr r1, [r7, #24]
801727c: 6878 ldr r0, [r7, #4]
801727e: f7ff fded bl 8016e5c <tcp_output_fill_options>
err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
8017282: 687a ldr r2, [r7, #4]
8017284: 687b ldr r3, [r7, #4]
8017286: 3304 adds r3, #4
8017288: 69b9 ldr r1, [r7, #24]
801728a: 6878 ldr r0, [r7, #4]
801728c: f7ff fe26 bl 8016edc <tcp_output_control_segment>
8017290: 4603 mov r3, r0
8017292: 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;
8017294: f997 300b ldrsb.w r3, [r7, #11]
}
8017298: 4618 mov r0, r3
801729a: 372c adds r7, #44 ; 0x2c
801729c: 46bd mov sp, r7
801729e: bd90 pop {r4, r7, pc}
80172a0: 0801efb0 .word 0x0801efb0
80172a4: 0801f7a8 .word 0x0801f7a8
80172a8: 0801f004 .word 0x0801f004
080172ac <tcpip_tcp_timer>:
*
* @param arg unused argument
*/
static void
tcpip_tcp_timer(void *arg)
{
80172ac: b580 push {r7, lr}
80172ae: b082 sub sp, #8
80172b0: af00 add r7, sp, #0
80172b2: 6078 str r0, [r7, #4]
LWIP_UNUSED_ARG(arg);
/* call TCP timer handler */
tcp_tmr();
80172b4: f7fa ff0c bl 80120d0 <tcp_tmr>
/* timer still needed? */
if (tcp_active_pcbs || tcp_tw_pcbs) {
80172b8: 4b0a ldr r3, [pc, #40] ; (80172e4 <tcpip_tcp_timer+0x38>)
80172ba: 681b ldr r3, [r3, #0]
80172bc: 2b00 cmp r3, #0
80172be: d103 bne.n 80172c8 <tcpip_tcp_timer+0x1c>
80172c0: 4b09 ldr r3, [pc, #36] ; (80172e8 <tcpip_tcp_timer+0x3c>)
80172c2: 681b ldr r3, [r3, #0]
80172c4: 2b00 cmp r3, #0
80172c6: d005 beq.n 80172d4 <tcpip_tcp_timer+0x28>
/* restart timer */
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
80172c8: 2200 movs r2, #0
80172ca: 4908 ldr r1, [pc, #32] ; (80172ec <tcpip_tcp_timer+0x40>)
80172cc: 20fa movs r0, #250 ; 0xfa
80172ce: f000 f8f1 bl 80174b4 <sys_timeout>
80172d2: e002 b.n 80172da <tcpip_tcp_timer+0x2e>
} else {
/* disable timer */
tcpip_tcp_timer_active = 0;
80172d4: 4b06 ldr r3, [pc, #24] ; (80172f0 <tcpip_tcp_timer+0x44>)
80172d6: 2200 movs r2, #0
80172d8: 601a str r2, [r3, #0]
}
}
80172da: bf00 nop
80172dc: 3708 adds r7, #8
80172de: 46bd mov sp, r7
80172e0: bd80 pop {r7, pc}
80172e2: bf00 nop
80172e4: 2000f7e8 .word 0x2000f7e8
80172e8: 2000f7f8 .word 0x2000f7f8
80172ec: 080172ad .word 0x080172ad
80172f0: 20008754 .word 0x20008754
080172f4 <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)
{
80172f4: b580 push {r7, lr}
80172f6: 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)) {
80172f8: 4b0a ldr r3, [pc, #40] ; (8017324 <tcp_timer_needed+0x30>)
80172fa: 681b ldr r3, [r3, #0]
80172fc: 2b00 cmp r3, #0
80172fe: d10f bne.n 8017320 <tcp_timer_needed+0x2c>
8017300: 4b09 ldr r3, [pc, #36] ; (8017328 <tcp_timer_needed+0x34>)
8017302: 681b ldr r3, [r3, #0]
8017304: 2b00 cmp r3, #0
8017306: d103 bne.n 8017310 <tcp_timer_needed+0x1c>
8017308: 4b08 ldr r3, [pc, #32] ; (801732c <tcp_timer_needed+0x38>)
801730a: 681b ldr r3, [r3, #0]
801730c: 2b00 cmp r3, #0
801730e: d007 beq.n 8017320 <tcp_timer_needed+0x2c>
/* enable and start timer */
tcpip_tcp_timer_active = 1;
8017310: 4b04 ldr r3, [pc, #16] ; (8017324 <tcp_timer_needed+0x30>)
8017312: 2201 movs r2, #1
8017314: 601a str r2, [r3, #0]
sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
8017316: 2200 movs r2, #0
8017318: 4905 ldr r1, [pc, #20] ; (8017330 <tcp_timer_needed+0x3c>)
801731a: 20fa movs r0, #250 ; 0xfa
801731c: f000 f8ca bl 80174b4 <sys_timeout>
}
}
8017320: bf00 nop
8017322: bd80 pop {r7, pc}
8017324: 20008754 .word 0x20008754
8017328: 2000f7e8 .word 0x2000f7e8
801732c: 2000f7f8 .word 0x2000f7f8
8017330: 080172ad .word 0x080172ad
08017334 <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
{
8017334: b580 push {r7, lr}
8017336: b086 sub sp, #24
8017338: af00 add r7, sp, #0
801733a: 60f8 str r0, [r7, #12]
801733c: 60b9 str r1, [r7, #8]
801733e: 607a str r2, [r7, #4]
struct sys_timeo *timeout, *t;
timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT);
8017340: 200a movs r0, #10
8017342: f7f9 fcd3 bl 8010cec <memp_malloc>
8017346: 6138 str r0, [r7, #16]
if (timeout == NULL) {
8017348: 693b ldr r3, [r7, #16]
801734a: 2b00 cmp r3, #0
801734c: d109 bne.n 8017362 <sys_timeout_abs+0x2e>
LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
801734e: 693b ldr r3, [r7, #16]
8017350: 2b00 cmp r3, #0
8017352: d151 bne.n 80173f8 <sys_timeout_abs+0xc4>
8017354: 4b2a ldr r3, [pc, #168] ; (8017400 <sys_timeout_abs+0xcc>)
8017356: 22be movs r2, #190 ; 0xbe
8017358: 492a ldr r1, [pc, #168] ; (8017404 <sys_timeout_abs+0xd0>)
801735a: 482b ldr r0, [pc, #172] ; (8017408 <sys_timeout_abs+0xd4>)
801735c: f005 f8f4 bl 801c548 <iprintf>
return;
8017360: e04a b.n 80173f8 <sys_timeout_abs+0xc4>
}
timeout->next = NULL;
8017362: 693b ldr r3, [r7, #16]
8017364: 2200 movs r2, #0
8017366: 601a str r2, [r3, #0]
timeout->h = handler;
8017368: 693b ldr r3, [r7, #16]
801736a: 68ba ldr r2, [r7, #8]
801736c: 609a str r2, [r3, #8]
timeout->arg = arg;
801736e: 693b ldr r3, [r7, #16]
8017370: 687a ldr r2, [r7, #4]
8017372: 60da str r2, [r3, #12]
timeout->time = abs_time;
8017374: 693b ldr r3, [r7, #16]
8017376: 68fa ldr r2, [r7, #12]
8017378: 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) {
801737a: 4b24 ldr r3, [pc, #144] ; (801740c <sys_timeout_abs+0xd8>)
801737c: 681b ldr r3, [r3, #0]
801737e: 2b00 cmp r3, #0
8017380: d103 bne.n 801738a <sys_timeout_abs+0x56>
next_timeout = timeout;
8017382: 4a22 ldr r2, [pc, #136] ; (801740c <sys_timeout_abs+0xd8>)
8017384: 693b ldr r3, [r7, #16]
8017386: 6013 str r3, [r2, #0]
return;
8017388: e037 b.n 80173fa <sys_timeout_abs+0xc6>
}
if (TIME_LESS_THAN(timeout->time, next_timeout->time)) {
801738a: 693b ldr r3, [r7, #16]
801738c: 685a ldr r2, [r3, #4]
801738e: 4b1f ldr r3, [pc, #124] ; (801740c <sys_timeout_abs+0xd8>)
8017390: 681b ldr r3, [r3, #0]
8017392: 685b ldr r3, [r3, #4]
8017394: 1ad3 subs r3, r2, r3
8017396: 0fdb lsrs r3, r3, #31
8017398: f003 0301 and.w r3, r3, #1
801739c: b2db uxtb r3, r3
801739e: 2b00 cmp r3, #0
80173a0: d007 beq.n 80173b2 <sys_timeout_abs+0x7e>
timeout->next = next_timeout;
80173a2: 4b1a ldr r3, [pc, #104] ; (801740c <sys_timeout_abs+0xd8>)
80173a4: 681a ldr r2, [r3, #0]
80173a6: 693b ldr r3, [r7, #16]
80173a8: 601a str r2, [r3, #0]
next_timeout = timeout;
80173aa: 4a18 ldr r2, [pc, #96] ; (801740c <sys_timeout_abs+0xd8>)
80173ac: 693b ldr r3, [r7, #16]
80173ae: 6013 str r3, [r2, #0]
80173b0: e023 b.n 80173fa <sys_timeout_abs+0xc6>
} else {
for (t = next_timeout; t != NULL; t = t->next) {
80173b2: 4b16 ldr r3, [pc, #88] ; (801740c <sys_timeout_abs+0xd8>)
80173b4: 681b ldr r3, [r3, #0]
80173b6: 617b str r3, [r7, #20]
80173b8: e01a b.n 80173f0 <sys_timeout_abs+0xbc>
if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) {
80173ba: 697b ldr r3, [r7, #20]
80173bc: 681b ldr r3, [r3, #0]
80173be: 2b00 cmp r3, #0
80173c0: d00b beq.n 80173da <sys_timeout_abs+0xa6>
80173c2: 693b ldr r3, [r7, #16]
80173c4: 685a ldr r2, [r3, #4]
80173c6: 697b ldr r3, [r7, #20]
80173c8: 681b ldr r3, [r3, #0]
80173ca: 685b ldr r3, [r3, #4]
80173cc: 1ad3 subs r3, r2, r3
80173ce: 0fdb lsrs r3, r3, #31
80173d0: f003 0301 and.w r3, r3, #1
80173d4: b2db uxtb r3, r3
80173d6: 2b00 cmp r3, #0
80173d8: d007 beq.n 80173ea <sys_timeout_abs+0xb6>
timeout->next = t->next;
80173da: 697b ldr r3, [r7, #20]
80173dc: 681a ldr r2, [r3, #0]
80173de: 693b ldr r3, [r7, #16]
80173e0: 601a str r2, [r3, #0]
t->next = timeout;
80173e2: 697b ldr r3, [r7, #20]
80173e4: 693a ldr r2, [r7, #16]
80173e6: 601a str r2, [r3, #0]
break;
80173e8: e007 b.n 80173fa <sys_timeout_abs+0xc6>
for (t = next_timeout; t != NULL; t = t->next) {
80173ea: 697b ldr r3, [r7, #20]
80173ec: 681b ldr r3, [r3, #0]
80173ee: 617b str r3, [r7, #20]
80173f0: 697b ldr r3, [r7, #20]
80173f2: 2b00 cmp r3, #0
80173f4: d1e1 bne.n 80173ba <sys_timeout_abs+0x86>
80173f6: e000 b.n 80173fa <sys_timeout_abs+0xc6>
return;
80173f8: bf00 nop
}
}
}
}
80173fa: 3718 adds r7, #24
80173fc: 46bd mov sp, r7
80173fe: bd80 pop {r7, pc}
8017400: 0801f7cc .word 0x0801f7cc
8017404: 0801f800 .word 0x0801f800
8017408: 0801f840 .word 0x0801f840
801740c: 2000874c .word 0x2000874c
08017410 <lwip_cyclic_timer>:
#if !LWIP_TESTMODE
static
#endif
void
lwip_cyclic_timer(void *arg)
{
8017410: b580 push {r7, lr}
8017412: b086 sub sp, #24
8017414: af00 add r7, sp, #0
8017416: 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;
8017418: 687b ldr r3, [r7, #4]
801741a: 617b str r3, [r7, #20]
#if LWIP_DEBUG_TIMERNAMES
LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name));
#endif
cyclic->handler();
801741c: 697b ldr r3, [r7, #20]
801741e: 685b ldr r3, [r3, #4]
8017420: 4798 blx r3
now = sys_now();
8017422: f7f5 fcef bl 800ce04 <sys_now>
8017426: 6138 str r0, [r7, #16]
next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
8017428: 697b ldr r3, [r7, #20]
801742a: 681a ldr r2, [r3, #0]
801742c: 4b0f ldr r3, [pc, #60] ; (801746c <lwip_cyclic_timer+0x5c>)
801742e: 681b ldr r3, [r3, #0]
8017430: 4413 add r3, r2
8017432: 60fb str r3, [r7, #12]
if (TIME_LESS_THAN(next_timeout_time, now)) {
8017434: 68fa ldr r2, [r7, #12]
8017436: 693b ldr r3, [r7, #16]
8017438: 1ad3 subs r3, r2, r3
801743a: 0fdb lsrs r3, r3, #31
801743c: f003 0301 and.w r3, r3, #1
8017440: b2db uxtb r3, r3
8017442: 2b00 cmp r3, #0
8017444: d009 beq.n 801745a <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);
8017446: 697b ldr r3, [r7, #20]
8017448: 681a ldr r2, [r3, #0]
801744a: 693b ldr r3, [r7, #16]
801744c: 4413 add r3, r2
801744e: 687a ldr r2, [r7, #4]
8017450: 4907 ldr r1, [pc, #28] ; (8017470 <lwip_cyclic_timer+0x60>)
8017452: 4618 mov r0, r3
8017454: f7ff ff6e bl 8017334 <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
}
}
8017458: e004 b.n 8017464 <lwip_cyclic_timer+0x54>
sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
801745a: 687a ldr r2, [r7, #4]
801745c: 4904 ldr r1, [pc, #16] ; (8017470 <lwip_cyclic_timer+0x60>)
801745e: 68f8 ldr r0, [r7, #12]
8017460: f7ff ff68 bl 8017334 <sys_timeout_abs>
}
8017464: bf00 nop
8017466: 3718 adds r7, #24
8017468: 46bd mov sp, r7
801746a: bd80 pop {r7, pc}
801746c: 20008750 .word 0x20008750
8017470: 08017411 .word 0x08017411
08017474 <sys_timeouts_init>:
/** Initialize this module */
void sys_timeouts_init(void)
{
8017474: b580 push {r7, lr}
8017476: b082 sub sp, #8
8017478: 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++) {
801747a: 2301 movs r3, #1
801747c: 607b str r3, [r7, #4]
801747e: e00e b.n 801749e <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]));
8017480: 4a0a ldr r2, [pc, #40] ; (80174ac <sys_timeouts_init+0x38>)
8017482: 687b ldr r3, [r7, #4]
8017484: f852 0033 ldr.w r0, [r2, r3, lsl #3]
8017488: 687b ldr r3, [r7, #4]
801748a: 00db lsls r3, r3, #3
801748c: 4a07 ldr r2, [pc, #28] ; (80174ac <sys_timeouts_init+0x38>)
801748e: 4413 add r3, r2
8017490: 461a mov r2, r3
8017492: 4907 ldr r1, [pc, #28] ; (80174b0 <sys_timeouts_init+0x3c>)
8017494: f000 f80e bl 80174b4 <sys_timeout>
for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
8017498: 687b ldr r3, [r7, #4]
801749a: 3301 adds r3, #1
801749c: 607b str r3, [r7, #4]
801749e: 687b ldr r3, [r7, #4]
80174a0: 2b04 cmp r3, #4
80174a2: d9ed bls.n 8017480 <sys_timeouts_init+0xc>
}
}
80174a4: bf00 nop
80174a6: 3708 adds r7, #8
80174a8: 46bd mov sp, r7
80174aa: bd80 pop {r7, pc}
80174ac: 080226c0 .word 0x080226c0
80174b0: 08017411 .word 0x08017411
080174b4 <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 */
{
80174b4: b580 push {r7, lr}
80174b6: b086 sub sp, #24
80174b8: af00 add r7, sp, #0
80174ba: 60f8 str r0, [r7, #12]
80174bc: 60b9 str r1, [r7, #8]
80174be: 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));
80174c0: 68fb ldr r3, [r7, #12]
80174c2: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
80174c6: d306 bcc.n 80174d6 <sys_timeout+0x22>
80174c8: 4b0a ldr r3, [pc, #40] ; (80174f4 <sys_timeout+0x40>)
80174ca: f240 1229 movw r2, #297 ; 0x129
80174ce: 490a ldr r1, [pc, #40] ; (80174f8 <sys_timeout+0x44>)
80174d0: 480a ldr r0, [pc, #40] ; (80174fc <sys_timeout+0x48>)
80174d2: f005 f839 bl 801c548 <iprintf>
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
80174d6: f7f5 fc95 bl 800ce04 <sys_now>
80174da: 4602 mov r2, r0
80174dc: 68fb ldr r3, [r7, #12]
80174de: 4413 add r3, r2
80174e0: 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);
80174e2: 687a ldr r2, [r7, #4]
80174e4: 68b9 ldr r1, [r7, #8]
80174e6: 6978 ldr r0, [r7, #20]
80174e8: f7ff ff24 bl 8017334 <sys_timeout_abs>
#endif
}
80174ec: bf00 nop
80174ee: 3718 adds r7, #24
80174f0: 46bd mov sp, r7
80174f2: bd80 pop {r7, pc}
80174f4: 0801f7cc .word 0x0801f7cc
80174f8: 0801f868 .word 0x0801f868
80174fc: 0801f840 .word 0x0801f840
08017500 <sys_check_timeouts>:
*
* Must be called periodically from your main loop.
*/
void
sys_check_timeouts(void)
{
8017500: b580 push {r7, lr}
8017502: b084 sub sp, #16
8017504: 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();
8017506: f7f5 fc7d bl 800ce04 <sys_now>
801750a: 60f8 str r0, [r7, #12]
sys_timeout_handler handler;
void *arg;
PBUF_CHECK_FREE_OOSEQ();
tmptimeout = next_timeout;
801750c: 4b17 ldr r3, [pc, #92] ; (801756c <sys_check_timeouts+0x6c>)
801750e: 681b ldr r3, [r3, #0]
8017510: 60bb str r3, [r7, #8]
if (tmptimeout == NULL) {
8017512: 68bb ldr r3, [r7, #8]
8017514: 2b00 cmp r3, #0
8017516: d022 beq.n 801755e <sys_check_timeouts+0x5e>
return;
}
if (TIME_LESS_THAN(now, tmptimeout->time)) {
8017518: 68bb ldr r3, [r7, #8]
801751a: 685b ldr r3, [r3, #4]
801751c: 68fa ldr r2, [r7, #12]
801751e: 1ad3 subs r3, r2, r3
8017520: 0fdb lsrs r3, r3, #31
8017522: f003 0301 and.w r3, r3, #1
8017526: b2db uxtb r3, r3
8017528: 2b00 cmp r3, #0
801752a: d11a bne.n 8017562 <sys_check_timeouts+0x62>
return;
}
/* Timeout has expired */
next_timeout = tmptimeout->next;
801752c: 68bb ldr r3, [r7, #8]
801752e: 681b ldr r3, [r3, #0]
8017530: 4a0e ldr r2, [pc, #56] ; (801756c <sys_check_timeouts+0x6c>)
8017532: 6013 str r3, [r2, #0]
handler = tmptimeout->h;
8017534: 68bb ldr r3, [r7, #8]
8017536: 689b ldr r3, [r3, #8]
8017538: 607b str r3, [r7, #4]
arg = tmptimeout->arg;
801753a: 68bb ldr r3, [r7, #8]
801753c: 68db ldr r3, [r3, #12]
801753e: 603b str r3, [r7, #0]
current_timeout_due_time = tmptimeout->time;
8017540: 68bb ldr r3, [r7, #8]
8017542: 685b ldr r3, [r3, #4]
8017544: 4a0a ldr r2, [pc, #40] ; (8017570 <sys_check_timeouts+0x70>)
8017546: 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);
8017548: 68b9 ldr r1, [r7, #8]
801754a: 200a movs r0, #10
801754c: f7f9 fc20 bl 8010d90 <memp_free>
if (handler != NULL) {
8017550: 687b ldr r3, [r7, #4]
8017552: 2b00 cmp r3, #0
8017554: d0da beq.n 801750c <sys_check_timeouts+0xc>
handler(arg);
8017556: 687b ldr r3, [r7, #4]
8017558: 6838 ldr r0, [r7, #0]
801755a: 4798 blx r3
do {
801755c: e7d6 b.n 801750c <sys_check_timeouts+0xc>
return;
801755e: bf00 nop
8017560: e000 b.n 8017564 <sys_check_timeouts+0x64>
return;
8017562: bf00 nop
}
LWIP_TCPIP_THREAD_ALIVE();
/* Repeat until all expired timers have been called */
} while (1);
}
8017564: 3710 adds r7, #16
8017566: 46bd mov sp, r7
8017568: bd80 pop {r7, pc}
801756a: bf00 nop
801756c: 2000874c .word 0x2000874c
8017570: 20008750 .word 0x20008750
08017574 <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)
{
8017574: b580 push {r7, lr}
8017576: b082 sub sp, #8
8017578: af00 add r7, sp, #0
u32_t now;
LWIP_ASSERT_CORE_LOCKED();
if (next_timeout == NULL) {
801757a: 4b16 ldr r3, [pc, #88] ; (80175d4 <sys_timeouts_sleeptime+0x60>)
801757c: 681b ldr r3, [r3, #0]
801757e: 2b00 cmp r3, #0
8017580: d102 bne.n 8017588 <sys_timeouts_sleeptime+0x14>
return SYS_TIMEOUTS_SLEEPTIME_INFINITE;
8017582: f04f 33ff mov.w r3, #4294967295
8017586: e020 b.n 80175ca <sys_timeouts_sleeptime+0x56>
}
now = sys_now();
8017588: f7f5 fc3c bl 800ce04 <sys_now>
801758c: 6078 str r0, [r7, #4]
if (TIME_LESS_THAN(next_timeout->time, now)) {
801758e: 4b11 ldr r3, [pc, #68] ; (80175d4 <sys_timeouts_sleeptime+0x60>)
8017590: 681b ldr r3, [r3, #0]
8017592: 685a ldr r2, [r3, #4]
8017594: 687b ldr r3, [r7, #4]
8017596: 1ad3 subs r3, r2, r3
8017598: 0fdb lsrs r3, r3, #31
801759a: f003 0301 and.w r3, r3, #1
801759e: b2db uxtb r3, r3
80175a0: 2b00 cmp r3, #0
80175a2: d001 beq.n 80175a8 <sys_timeouts_sleeptime+0x34>
return 0;
80175a4: 2300 movs r3, #0
80175a6: e010 b.n 80175ca <sys_timeouts_sleeptime+0x56>
} else {
u32_t ret = (u32_t)(next_timeout->time - now);
80175a8: 4b0a ldr r3, [pc, #40] ; (80175d4 <sys_timeouts_sleeptime+0x60>)
80175aa: 681b ldr r3, [r3, #0]
80175ac: 685a ldr r2, [r3, #4]
80175ae: 687b ldr r3, [r7, #4]
80175b0: 1ad3 subs r3, r2, r3
80175b2: 603b str r3, [r7, #0]
LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT);
80175b4: 683b ldr r3, [r7, #0]
80175b6: 2b00 cmp r3, #0
80175b8: da06 bge.n 80175c8 <sys_timeouts_sleeptime+0x54>
80175ba: 4b07 ldr r3, [pc, #28] ; (80175d8 <sys_timeouts_sleeptime+0x64>)
80175bc: f44f 72dc mov.w r2, #440 ; 0x1b8
80175c0: 4906 ldr r1, [pc, #24] ; (80175dc <sys_timeouts_sleeptime+0x68>)
80175c2: 4807 ldr r0, [pc, #28] ; (80175e0 <sys_timeouts_sleeptime+0x6c>)
80175c4: f004 ffc0 bl 801c548 <iprintf>
return ret;
80175c8: 683b ldr r3, [r7, #0]
}
}
80175ca: 4618 mov r0, r3
80175cc: 3708 adds r7, #8
80175ce: 46bd mov sp, r7
80175d0: bd80 pop {r7, pc}
80175d2: bf00 nop
80175d4: 2000874c .word 0x2000874c
80175d8: 0801f7cc .word 0x0801f7cc
80175dc: 0801f8a0 .word 0x0801f8a0
80175e0: 0801f840 .word 0x0801f840
080175e4 <udp_init>:
/**
* Initialize this module.
*/
void
udp_init(void)
{
80175e4: b580 push {r7, lr}
80175e6: af00 add r7, sp, #0
#ifdef LWIP_RAND
udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
80175e8: f004 ffc6 bl 801c578 <rand>
80175ec: 4603 mov r3, r0
80175ee: b29b uxth r3, r3
80175f0: f3c3 030d ubfx r3, r3, #0, #14
80175f4: b29b uxth r3, r3
80175f6: f5a3 4380 sub.w r3, r3, #16384 ; 0x4000
80175fa: b29a uxth r2, r3
80175fc: 4b01 ldr r3, [pc, #4] ; (8017604 <udp_init+0x20>)
80175fe: 801a strh r2, [r3, #0]
#endif /* LWIP_RAND */
}
8017600: bf00 nop
8017602: bd80 pop {r7, pc}
8017604: 20000068 .word 0x20000068
08017608 <udp_new_port>:
*
* @return a new (free) local UDP port number
*/
static u16_t
udp_new_port(void)
{
8017608: b480 push {r7}
801760a: b083 sub sp, #12
801760c: af00 add r7, sp, #0
u16_t n = 0;
801760e: 2300 movs r3, #0
8017610: 80fb strh r3, [r7, #6]
struct udp_pcb *pcb;
again:
if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) {
8017612: 4b17 ldr r3, [pc, #92] ; (8017670 <udp_new_port+0x68>)
8017614: 881b ldrh r3, [r3, #0]
8017616: 1c5a adds r2, r3, #1
8017618: b291 uxth r1, r2
801761a: 4a15 ldr r2, [pc, #84] ; (8017670 <udp_new_port+0x68>)
801761c: 8011 strh r1, [r2, #0]
801761e: f64f 72ff movw r2, #65535 ; 0xffff
8017622: 4293 cmp r3, r2
8017624: d103 bne.n 801762e <udp_new_port+0x26>
udp_port = UDP_LOCAL_PORT_RANGE_START;
8017626: 4b12 ldr r3, [pc, #72] ; (8017670 <udp_new_port+0x68>)
8017628: f44f 4240 mov.w r2, #49152 ; 0xc000
801762c: 801a strh r2, [r3, #0]
}
/* Check all PCBs. */
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
801762e: 4b11 ldr r3, [pc, #68] ; (8017674 <udp_new_port+0x6c>)
8017630: 681b ldr r3, [r3, #0]
8017632: 603b str r3, [r7, #0]
8017634: e011 b.n 801765a <udp_new_port+0x52>
if (pcb->local_port == udp_port) {
8017636: 683b ldr r3, [r7, #0]
8017638: 8a5a ldrh r2, [r3, #18]
801763a: 4b0d ldr r3, [pc, #52] ; (8017670 <udp_new_port+0x68>)
801763c: 881b ldrh r3, [r3, #0]
801763e: 429a cmp r2, r3
8017640: d108 bne.n 8017654 <udp_new_port+0x4c>
if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) {
8017642: 88fb ldrh r3, [r7, #6]
8017644: 3301 adds r3, #1
8017646: 80fb strh r3, [r7, #6]
8017648: 88fb ldrh r3, [r7, #6]
801764a: f5b3 4f80 cmp.w r3, #16384 ; 0x4000
801764e: d3e0 bcc.n 8017612 <udp_new_port+0xa>
return 0;
8017650: 2300 movs r3, #0
8017652: e007 b.n 8017664 <udp_new_port+0x5c>
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
8017654: 683b ldr r3, [r7, #0]
8017656: 68db ldr r3, [r3, #12]
8017658: 603b str r3, [r7, #0]
801765a: 683b ldr r3, [r7, #0]
801765c: 2b00 cmp r3, #0
801765e: d1ea bne.n 8017636 <udp_new_port+0x2e>
}
goto again;
}
}
return udp_port;
8017660: 4b03 ldr r3, [pc, #12] ; (8017670 <udp_new_port+0x68>)
8017662: 881b ldrh r3, [r3, #0]
}
8017664: 4618 mov r0, r3
8017666: 370c adds r7, #12
8017668: 46bd mov sp, r7
801766a: f85d 7b04 ldr.w r7, [sp], #4
801766e: 4770 bx lr
8017670: 20000068 .word 0x20000068
8017674: 2000f800 .word 0x2000f800
08017678 <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)
{
8017678: b580 push {r7, lr}
801767a: b084 sub sp, #16
801767c: af00 add r7, sp, #0
801767e: 60f8 str r0, [r7, #12]
8017680: 60b9 str r1, [r7, #8]
8017682: 4613 mov r3, r2
8017684: 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);
8017686: 68fb ldr r3, [r7, #12]
8017688: 2b00 cmp r3, #0
801768a: d105 bne.n 8017698 <udp_input_local_match+0x20>
801768c: 4b27 ldr r3, [pc, #156] ; (801772c <udp_input_local_match+0xb4>)
801768e: 2287 movs r2, #135 ; 0x87
8017690: 4927 ldr r1, [pc, #156] ; (8017730 <udp_input_local_match+0xb8>)
8017692: 4828 ldr r0, [pc, #160] ; (8017734 <udp_input_local_match+0xbc>)
8017694: f004 ff58 bl 801c548 <iprintf>
LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
8017698: 68bb ldr r3, [r7, #8]
801769a: 2b00 cmp r3, #0
801769c: d105 bne.n 80176aa <udp_input_local_match+0x32>
801769e: 4b23 ldr r3, [pc, #140] ; (801772c <udp_input_local_match+0xb4>)
80176a0: 2288 movs r2, #136 ; 0x88
80176a2: 4925 ldr r1, [pc, #148] ; (8017738 <udp_input_local_match+0xc0>)
80176a4: 4823 ldr r0, [pc, #140] ; (8017734 <udp_input_local_match+0xbc>)
80176a6: f004 ff4f bl 801c548 <iprintf>
/* check if PCB is bound to specific netif */
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
80176aa: 68fb ldr r3, [r7, #12]
80176ac: 7a1b ldrb r3, [r3, #8]
80176ae: 2b00 cmp r3, #0
80176b0: d00b beq.n 80176ca <udp_input_local_match+0x52>
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
80176b2: 68fb ldr r3, [r7, #12]
80176b4: 7a1a ldrb r2, [r3, #8]
80176b6: 4b21 ldr r3, [pc, #132] ; (801773c <udp_input_local_match+0xc4>)
80176b8: 685b ldr r3, [r3, #4]
80176ba: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
80176be: 3301 adds r3, #1
80176c0: b2db uxtb r3, r3
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
80176c2: 429a cmp r2, r3
80176c4: d001 beq.n 80176ca <udp_input_local_match+0x52>
return 0;
80176c6: 2300 movs r3, #0
80176c8: e02b b.n 8017722 <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) {
80176ca: 79fb ldrb r3, [r7, #7]
80176cc: 2b00 cmp r3, #0
80176ce: d018 beq.n 8017702 <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)) ||
80176d0: 68fb ldr r3, [r7, #12]
80176d2: 2b00 cmp r3, #0
80176d4: d013 beq.n 80176fe <udp_input_local_match+0x86>
80176d6: 68fb ldr r3, [r7, #12]
80176d8: 681b ldr r3, [r3, #0]
80176da: 2b00 cmp r3, #0
80176dc: d00f beq.n 80176fe <udp_input_local_match+0x86>
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
80176de: 4b17 ldr r3, [pc, #92] ; (801773c <udp_input_local_match+0xc4>)
80176e0: 695b ldr r3, [r3, #20]
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
80176e2: f1b3 3fff cmp.w r3, #4294967295
80176e6: d00a beq.n 80176fe <udp_input_local_match+0x86>
ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) {
80176e8: 68fb ldr r3, [r7, #12]
80176ea: 681a ldr r2, [r3, #0]
80176ec: 4b13 ldr r3, [pc, #76] ; (801773c <udp_input_local_match+0xc4>)
80176ee: 695b ldr r3, [r3, #20]
80176f0: 405a eors r2, r3
80176f2: 68bb ldr r3, [r7, #8]
80176f4: 3308 adds r3, #8
80176f6: 681b ldr r3, [r3, #0]
80176f8: 4013 ands r3, r2
((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
80176fa: 2b00 cmp r3, #0
80176fc: d110 bne.n 8017720 <udp_input_local_match+0xa8>
return 1;
80176fe: 2301 movs r3, #1
8017700: e00f b.n 8017722 <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())) {
8017702: 68fb ldr r3, [r7, #12]
8017704: 2b00 cmp r3, #0
8017706: d009 beq.n 801771c <udp_input_local_match+0xa4>
8017708: 68fb ldr r3, [r7, #12]
801770a: 681b ldr r3, [r3, #0]
801770c: 2b00 cmp r3, #0
801770e: d005 beq.n 801771c <udp_input_local_match+0xa4>
8017710: 68fb ldr r3, [r7, #12]
8017712: 681a ldr r2, [r3, #0]
8017714: 4b09 ldr r3, [pc, #36] ; (801773c <udp_input_local_match+0xc4>)
8017716: 695b ldr r3, [r3, #20]
8017718: 429a cmp r2, r3
801771a: d101 bne.n 8017720 <udp_input_local_match+0xa8>
return 1;
801771c: 2301 movs r3, #1
801771e: e000 b.n 8017722 <udp_input_local_match+0xaa>
}
}
return 0;
8017720: 2300 movs r3, #0
}
8017722: 4618 mov r0, r3
8017724: 3710 adds r7, #16
8017726: 46bd mov sp, r7
8017728: bd80 pop {r7, pc}
801772a: bf00 nop
801772c: 0801f8b4 .word 0x0801f8b4
8017730: 0801f8e4 .word 0x0801f8e4
8017734: 0801f908 .word 0x0801f908
8017738: 0801f930 .word 0x0801f930
801773c: 2000c0b4 .word 0x2000c0b4
08017740 <udp_input>:
* @param inp network interface on which the datagram was received.
*
*/
void
udp_input(struct pbuf *p, struct netif *inp)
{
8017740: b590 push {r4, r7, lr}
8017742: b08d sub sp, #52 ; 0x34
8017744: af02 add r7, sp, #8
8017746: 6078 str r0, [r7, #4]
8017748: 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;
801774a: 2300 movs r3, #0
801774c: 76fb strb r3, [r7, #27]
LWIP_UNUSED_ARG(inp);
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
801774e: 687b ldr r3, [r7, #4]
8017750: 2b00 cmp r3, #0
8017752: d105 bne.n 8017760 <udp_input+0x20>
8017754: 4b7c ldr r3, [pc, #496] ; (8017948 <udp_input+0x208>)
8017756: 22cf movs r2, #207 ; 0xcf
8017758: 497c ldr r1, [pc, #496] ; (801794c <udp_input+0x20c>)
801775a: 487d ldr r0, [pc, #500] ; (8017950 <udp_input+0x210>)
801775c: f004 fef4 bl 801c548 <iprintf>
LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
8017760: 683b ldr r3, [r7, #0]
8017762: 2b00 cmp r3, #0
8017764: d105 bne.n 8017772 <udp_input+0x32>
8017766: 4b78 ldr r3, [pc, #480] ; (8017948 <udp_input+0x208>)
8017768: 22d0 movs r2, #208 ; 0xd0
801776a: 497a ldr r1, [pc, #488] ; (8017954 <udp_input+0x214>)
801776c: 4878 ldr r0, [pc, #480] ; (8017950 <udp_input+0x210>)
801776e: f004 feeb bl 801c548 <iprintf>
PERF_START;
UDP_STATS_INC(udp.recv);
/* Check minimum length (UDP header) */
if (p->len < UDP_HLEN) {
8017772: 687b ldr r3, [r7, #4]
8017774: 895b ldrh r3, [r3, #10]
8017776: 2b07 cmp r3, #7
8017778: d803 bhi.n 8017782 <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);
801777a: 6878 ldr r0, [r7, #4]
801777c: f7fa f9b4 bl 8011ae8 <pbuf_free>
goto end;
8017780: e0de b.n 8017940 <udp_input+0x200>
}
udphdr = (struct udp_hdr *)p->payload;
8017782: 687b ldr r3, [r7, #4]
8017784: 685b ldr r3, [r3, #4]
8017786: 617b str r3, [r7, #20]
/* is broadcast packet ? */
broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif());
8017788: 4b73 ldr r3, [pc, #460] ; (8017958 <udp_input+0x218>)
801778a: 695a ldr r2, [r3, #20]
801778c: 4b72 ldr r3, [pc, #456] ; (8017958 <udp_input+0x218>)
801778e: 681b ldr r3, [r3, #0]
8017790: 4619 mov r1, r3
8017792: 4610 mov r0, r2
8017794: f003 fe16 bl 801b3c4 <ip4_addr_isbroadcast_u32>
8017798: 4603 mov r3, r0
801779a: 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);
801779c: 697b ldr r3, [r7, #20]
801779e: 881b ldrh r3, [r3, #0]
80177a0: b29b uxth r3, r3
80177a2: 4618 mov r0, r3
80177a4: f7f8 fdec bl 8010380 <lwip_htons>
80177a8: 4603 mov r3, r0
80177aa: 823b strh r3, [r7, #16]
dest = lwip_ntohs(udphdr->dest);
80177ac: 697b ldr r3, [r7, #20]
80177ae: 885b ldrh r3, [r3, #2]
80177b0: b29b uxth r3, r3
80177b2: 4618 mov r0, r3
80177b4: f7f8 fde4 bl 8010380 <lwip_htons>
80177b8: 4603 mov r3, r0
80177ba: 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;
80177bc: 2300 movs r3, #0
80177be: 627b str r3, [r7, #36] ; 0x24
prev = NULL;
80177c0: 2300 movs r3, #0
80177c2: 623b str r3, [r7, #32]
uncon_pcb = NULL;
80177c4: 2300 movs r3, #0
80177c6: 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) {
80177c8: 4b64 ldr r3, [pc, #400] ; (801795c <udp_input+0x21c>)
80177ca: 681b ldr r3, [r3, #0]
80177cc: 627b str r3, [r7, #36] ; 0x24
80177ce: e054 b.n 801787a <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) &&
80177d0: 6a7b ldr r3, [r7, #36] ; 0x24
80177d2: 8a5b ldrh r3, [r3, #18]
80177d4: 89fa ldrh r2, [r7, #14]
80177d6: 429a cmp r2, r3
80177d8: d14a bne.n 8017870 <udp_input+0x130>
(udp_input_local_match(pcb, inp, broadcast) != 0)) {
80177da: 7cfb ldrb r3, [r7, #19]
80177dc: 461a mov r2, r3
80177de: 6839 ldr r1, [r7, #0]
80177e0: 6a78 ldr r0, [r7, #36] ; 0x24
80177e2: f7ff ff49 bl 8017678 <udp_input_local_match>
80177e6: 4603 mov r3, r0
if ((pcb->local_port == dest) &&
80177e8: 2b00 cmp r3, #0
80177ea: d041 beq.n 8017870 <udp_input+0x130>
if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) {
80177ec: 6a7b ldr r3, [r7, #36] ; 0x24
80177ee: 7c1b ldrb r3, [r3, #16]
80177f0: f003 0304 and.w r3, r3, #4
80177f4: 2b00 cmp r3, #0
80177f6: d11d bne.n 8017834 <udp_input+0xf4>
if (uncon_pcb == NULL) {
80177f8: 69fb ldr r3, [r7, #28]
80177fa: 2b00 cmp r3, #0
80177fc: d102 bne.n 8017804 <udp_input+0xc4>
/* the first unconnected matching PCB */
uncon_pcb = pcb;
80177fe: 6a7b ldr r3, [r7, #36] ; 0x24
8017800: 61fb str r3, [r7, #28]
8017802: e017 b.n 8017834 <udp_input+0xf4>
#if LWIP_IPV4
} else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) {
8017804: 7cfb ldrb r3, [r7, #19]
8017806: 2b00 cmp r3, #0
8017808: d014 beq.n 8017834 <udp_input+0xf4>
801780a: 4b53 ldr r3, [pc, #332] ; (8017958 <udp_input+0x218>)
801780c: 695b ldr r3, [r3, #20]
801780e: f1b3 3fff cmp.w r3, #4294967295
8017812: d10f bne.n 8017834 <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))) {
8017814: 69fb ldr r3, [r7, #28]
8017816: 681a ldr r2, [r3, #0]
8017818: 683b ldr r3, [r7, #0]
801781a: 3304 adds r3, #4
801781c: 681b ldr r3, [r3, #0]
801781e: 429a cmp r2, r3
8017820: d008 beq.n 8017834 <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))) {
8017822: 6a7b ldr r3, [r7, #36] ; 0x24
8017824: 681a ldr r2, [r3, #0]
8017826: 683b ldr r3, [r7, #0]
8017828: 3304 adds r3, #4
801782a: 681b ldr r3, [r3, #0]
801782c: 429a cmp r2, r3
801782e: d101 bne.n 8017834 <udp_input+0xf4>
/* better match */
uncon_pcb = pcb;
8017830: 6a7b ldr r3, [r7, #36] ; 0x24
8017832: 61fb str r3, [r7, #28]
}
#endif /* SO_REUSE */
}
/* compare PCB remote addr+port to UDP source addr+port */
if ((pcb->remote_port == src) &&
8017834: 6a7b ldr r3, [r7, #36] ; 0x24
8017836: 8a9b ldrh r3, [r3, #20]
8017838: 8a3a ldrh r2, [r7, #16]
801783a: 429a cmp r2, r3
801783c: d118 bne.n 8017870 <udp_input+0x130>
(ip_addr_isany_val(pcb->remote_ip) ||
801783e: 6a7b ldr r3, [r7, #36] ; 0x24
8017840: 685b ldr r3, [r3, #4]
if ((pcb->remote_port == src) &&
8017842: 2b00 cmp r3, #0
8017844: d005 beq.n 8017852 <udp_input+0x112>
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) {
8017846: 6a7b ldr r3, [r7, #36] ; 0x24
8017848: 685a ldr r2, [r3, #4]
801784a: 4b43 ldr r3, [pc, #268] ; (8017958 <udp_input+0x218>)
801784c: 691b ldr r3, [r3, #16]
(ip_addr_isany_val(pcb->remote_ip) ||
801784e: 429a cmp r2, r3
8017850: d10e bne.n 8017870 <udp_input+0x130>
/* the first fully matching PCB */
if (prev != NULL) {
8017852: 6a3b ldr r3, [r7, #32]
8017854: 2b00 cmp r3, #0
8017856: d014 beq.n 8017882 <udp_input+0x142>
/* move the pcb to the front of udp_pcbs so that is
found faster next time */
prev->next = pcb->next;
8017858: 6a7b ldr r3, [r7, #36] ; 0x24
801785a: 68da ldr r2, [r3, #12]
801785c: 6a3b ldr r3, [r7, #32]
801785e: 60da str r2, [r3, #12]
pcb->next = udp_pcbs;
8017860: 4b3e ldr r3, [pc, #248] ; (801795c <udp_input+0x21c>)
8017862: 681a ldr r2, [r3, #0]
8017864: 6a7b ldr r3, [r7, #36] ; 0x24
8017866: 60da str r2, [r3, #12]
udp_pcbs = pcb;
8017868: 4a3c ldr r2, [pc, #240] ; (801795c <udp_input+0x21c>)
801786a: 6a7b ldr r3, [r7, #36] ; 0x24
801786c: 6013 str r3, [r2, #0]
} else {
UDP_STATS_INC(udp.cachehit);
}
break;
801786e: e008 b.n 8017882 <udp_input+0x142>
}
}
prev = pcb;
8017870: 6a7b ldr r3, [r7, #36] ; 0x24
8017872: 623b str r3, [r7, #32]
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
8017874: 6a7b ldr r3, [r7, #36] ; 0x24
8017876: 68db ldr r3, [r3, #12]
8017878: 627b str r3, [r7, #36] ; 0x24
801787a: 6a7b ldr r3, [r7, #36] ; 0x24
801787c: 2b00 cmp r3, #0
801787e: d1a7 bne.n 80177d0 <udp_input+0x90>
8017880: e000 b.n 8017884 <udp_input+0x144>
break;
8017882: bf00 nop
}
/* no fully matching pcb found? then look for an unconnected pcb */
if (pcb == NULL) {
8017884: 6a7b ldr r3, [r7, #36] ; 0x24
8017886: 2b00 cmp r3, #0
8017888: d101 bne.n 801788e <udp_input+0x14e>
pcb = uncon_pcb;
801788a: 69fb ldr r3, [r7, #28]
801788c: 627b str r3, [r7, #36] ; 0x24
}
/* Check checksum if this is a match or if it was directed at us. */
if (pcb != NULL) {
801788e: 6a7b ldr r3, [r7, #36] ; 0x24
8017890: 2b00 cmp r3, #0
8017892: d002 beq.n 801789a <udp_input+0x15a>
for_us = 1;
8017894: 2301 movs r3, #1
8017896: 76fb strb r3, [r7, #27]
8017898: e00a b.n 80178b0 <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());
801789a: 683b ldr r3, [r7, #0]
801789c: 3304 adds r3, #4
801789e: 681a ldr r2, [r3, #0]
80178a0: 4b2d ldr r3, [pc, #180] ; (8017958 <udp_input+0x218>)
80178a2: 695b ldr r3, [r3, #20]
80178a4: 429a cmp r2, r3
80178a6: bf0c ite eq
80178a8: 2301 moveq r3, #1
80178aa: 2300 movne r3, #0
80178ac: b2db uxtb r3, r3
80178ae: 76fb strb r3, [r7, #27]
}
#endif /* LWIP_IPV4 */
}
if (for_us) {
80178b0: 7efb ldrb r3, [r7, #27]
80178b2: 2b00 cmp r3, #0
80178b4: d041 beq.n 801793a <udp_input+0x1fa>
}
}
}
}
#endif /* CHECKSUM_CHECK_UDP */
if (pbuf_remove_header(p, UDP_HLEN)) {
80178b6: 2108 movs r1, #8
80178b8: 6878 ldr r0, [r7, #4]
80178ba: f7fa f88f bl 80119dc <pbuf_remove_header>
80178be: 4603 mov r3, r0
80178c0: 2b00 cmp r3, #0
80178c2: d00a beq.n 80178da <udp_input+0x19a>
/* Can we cope with this failing? Just assert for now */
LWIP_ASSERT("pbuf_remove_header failed\n", 0);
80178c4: 4b20 ldr r3, [pc, #128] ; (8017948 <udp_input+0x208>)
80178c6: f44f 72b8 mov.w r2, #368 ; 0x170
80178ca: 4925 ldr r1, [pc, #148] ; (8017960 <udp_input+0x220>)
80178cc: 4820 ldr r0, [pc, #128] ; (8017950 <udp_input+0x210>)
80178ce: f004 fe3b bl 801c548 <iprintf>
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
80178d2: 6878 ldr r0, [r7, #4]
80178d4: f7fa f908 bl 8011ae8 <pbuf_free>
goto end;
80178d8: e032 b.n 8017940 <udp_input+0x200>
}
if (pcb != NULL) {
80178da: 6a7b ldr r3, [r7, #36] ; 0x24
80178dc: 2b00 cmp r3, #0
80178de: d012 beq.n 8017906 <udp_input+0x1c6>
}
}
}
#endif /* SO_REUSE && SO_REUSE_RXTOALL */
/* callback */
if (pcb->recv != NULL) {
80178e0: 6a7b ldr r3, [r7, #36] ; 0x24
80178e2: 699b ldr r3, [r3, #24]
80178e4: 2b00 cmp r3, #0
80178e6: d00a beq.n 80178fe <udp_input+0x1be>
/* now the recv function is responsible for freeing p */
pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src);
80178e8: 6a7b ldr r3, [r7, #36] ; 0x24
80178ea: 699c ldr r4, [r3, #24]
80178ec: 6a7b ldr r3, [r7, #36] ; 0x24
80178ee: 69d8 ldr r0, [r3, #28]
80178f0: 8a3b ldrh r3, [r7, #16]
80178f2: 9300 str r3, [sp, #0]
80178f4: 4b1b ldr r3, [pc, #108] ; (8017964 <udp_input+0x224>)
80178f6: 687a ldr r2, [r7, #4]
80178f8: 6a79 ldr r1, [r7, #36] ; 0x24
80178fa: 47a0 blx r4
} else {
pbuf_free(p);
}
end:
PERF_STOP("udp_input");
return;
80178fc: e021 b.n 8017942 <udp_input+0x202>
pbuf_free(p);
80178fe: 6878 ldr r0, [r7, #4]
8017900: f7fa f8f2 bl 8011ae8 <pbuf_free>
goto end;
8017904: e01c b.n 8017940 <udp_input+0x200>
if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) {
8017906: 7cfb ldrb r3, [r7, #19]
8017908: 2b00 cmp r3, #0
801790a: d112 bne.n 8017932 <udp_input+0x1f2>
801790c: 4b12 ldr r3, [pc, #72] ; (8017958 <udp_input+0x218>)
801790e: 695b ldr r3, [r3, #20]
8017910: f003 03f0 and.w r3, r3, #240 ; 0xf0
8017914: 2be0 cmp r3, #224 ; 0xe0
8017916: d00c beq.n 8017932 <udp_input+0x1f2>
pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN));
8017918: 4b0f ldr r3, [pc, #60] ; (8017958 <udp_input+0x218>)
801791a: 899b ldrh r3, [r3, #12]
801791c: 3308 adds r3, #8
801791e: b29b uxth r3, r3
8017920: b21b sxth r3, r3
8017922: 4619 mov r1, r3
8017924: 6878 ldr r0, [r7, #4]
8017926: f7fa f8cc bl 8011ac2 <pbuf_header_force>
icmp_port_unreach(ip_current_is_v6(), p);
801792a: 2103 movs r1, #3
801792c: 6878 ldr r0, [r7, #4]
801792e: f003 fa0d bl 801ad4c <icmp_dest_unreach>
pbuf_free(p);
8017932: 6878 ldr r0, [r7, #4]
8017934: f7fa f8d8 bl 8011ae8 <pbuf_free>
return;
8017938: e003 b.n 8017942 <udp_input+0x202>
pbuf_free(p);
801793a: 6878 ldr r0, [r7, #4]
801793c: f7fa f8d4 bl 8011ae8 <pbuf_free>
return;
8017940: bf00 nop
UDP_STATS_INC(udp.drop);
MIB2_STATS_INC(mib2.udpinerrors);
pbuf_free(p);
PERF_STOP("udp_input");
#endif /* CHECKSUM_CHECK_UDP */
}
8017942: 372c adds r7, #44 ; 0x2c
8017944: 46bd mov sp, r7
8017946: bd90 pop {r4, r7, pc}
8017948: 0801f8b4 .word 0x0801f8b4
801794c: 0801f958 .word 0x0801f958
8017950: 0801f908 .word 0x0801f908
8017954: 0801f970 .word 0x0801f970
8017958: 2000c0b4 .word 0x2000c0b4
801795c: 2000f800 .word 0x2000f800
8017960: 0801f98c .word 0x0801f98c
8017964: 2000c0c4 .word 0x2000c0c4
08017968 <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)
{
8017968: b580 push {r7, lr}
801796a: b088 sub sp, #32
801796c: af02 add r7, sp, #8
801796e: 60f8 str r0, [r7, #12]
8017970: 60b9 str r1, [r7, #8]
8017972: 607a str r2, [r7, #4]
8017974: 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);
8017976: 68fb ldr r3, [r7, #12]
8017978: 2b00 cmp r3, #0
801797a: d109 bne.n 8017990 <udp_sendto_if+0x28>
801797c: 4b2e ldr r3, [pc, #184] ; (8017a38 <udp_sendto_if+0xd0>)
801797e: f44f 7220 mov.w r2, #640 ; 0x280
8017982: 492e ldr r1, [pc, #184] ; (8017a3c <udp_sendto_if+0xd4>)
8017984: 482e ldr r0, [pc, #184] ; (8017a40 <udp_sendto_if+0xd8>)
8017986: f004 fddf bl 801c548 <iprintf>
801798a: f06f 030f mvn.w r3, #15
801798e: e04f b.n 8017a30 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
8017990: 68bb ldr r3, [r7, #8]
8017992: 2b00 cmp r3, #0
8017994: d109 bne.n 80179aa <udp_sendto_if+0x42>
8017996: 4b28 ldr r3, [pc, #160] ; (8017a38 <udp_sendto_if+0xd0>)
8017998: f240 2281 movw r2, #641 ; 0x281
801799c: 4929 ldr r1, [pc, #164] ; (8017a44 <udp_sendto_if+0xdc>)
801799e: 4828 ldr r0, [pc, #160] ; (8017a40 <udp_sendto_if+0xd8>)
80179a0: f004 fdd2 bl 801c548 <iprintf>
80179a4: f06f 030f mvn.w r3, #15
80179a8: e042 b.n 8017a30 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
80179aa: 687b ldr r3, [r7, #4]
80179ac: 2b00 cmp r3, #0
80179ae: d109 bne.n 80179c4 <udp_sendto_if+0x5c>
80179b0: 4b21 ldr r3, [pc, #132] ; (8017a38 <udp_sendto_if+0xd0>)
80179b2: f240 2282 movw r2, #642 ; 0x282
80179b6: 4924 ldr r1, [pc, #144] ; (8017a48 <udp_sendto_if+0xe0>)
80179b8: 4821 ldr r0, [pc, #132] ; (8017a40 <udp_sendto_if+0xd8>)
80179ba: f004 fdc5 bl 801c548 <iprintf>
80179be: f06f 030f mvn.w r3, #15
80179c2: e035 b.n 8017a30 <udp_sendto_if+0xc8>
LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
80179c4: 6a3b ldr r3, [r7, #32]
80179c6: 2b00 cmp r3, #0
80179c8: d109 bne.n 80179de <udp_sendto_if+0x76>
80179ca: 4b1b ldr r3, [pc, #108] ; (8017a38 <udp_sendto_if+0xd0>)
80179cc: f240 2283 movw r2, #643 ; 0x283
80179d0: 491e ldr r1, [pc, #120] ; (8017a4c <udp_sendto_if+0xe4>)
80179d2: 481b ldr r0, [pc, #108] ; (8017a40 <udp_sendto_if+0xd8>)
80179d4: f004 fdb8 bl 801c548 <iprintf>
80179d8: f06f 030f mvn.w r3, #15
80179dc: e028 b.n 8017a30 <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)) ||
80179de: 68fb ldr r3, [r7, #12]
80179e0: 2b00 cmp r3, #0
80179e2: d009 beq.n 80179f8 <udp_sendto_if+0x90>
80179e4: 68fb ldr r3, [r7, #12]
80179e6: 681b ldr r3, [r3, #0]
80179e8: 2b00 cmp r3, #0
80179ea: d005 beq.n 80179f8 <udp_sendto_if+0x90>
ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) {
80179ec: 68fb ldr r3, [r7, #12]
80179ee: 681b ldr r3, [r3, #0]
80179f0: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
80179f4: 2be0 cmp r3, #224 ; 0xe0
80179f6: d103 bne.n 8017a00 <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);
80179f8: 6a3b ldr r3, [r7, #32]
80179fa: 3304 adds r3, #4
80179fc: 617b str r3, [r7, #20]
80179fe: e00b b.n 8017a18 <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))) {
8017a00: 68fb ldr r3, [r7, #12]
8017a02: 681a ldr r2, [r3, #0]
8017a04: 6a3b ldr r3, [r7, #32]
8017a06: 3304 adds r3, #4
8017a08: 681b ldr r3, [r3, #0]
8017a0a: 429a cmp r2, r3
8017a0c: d002 beq.n 8017a14 <udp_sendto_if+0xac>
/* local_ip doesn't match, drop the packet */
return ERR_RTE;
8017a0e: f06f 0303 mvn.w r3, #3
8017a12: e00d b.n 8017a30 <udp_sendto_if+0xc8>
}
/* use UDP PCB local IP address as source address */
src_ip = &pcb->local_ip;
8017a14: 68fb ldr r3, [r7, #12]
8017a16: 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);
8017a18: 887a ldrh r2, [r7, #2]
8017a1a: 697b ldr r3, [r7, #20]
8017a1c: 9301 str r3, [sp, #4]
8017a1e: 6a3b ldr r3, [r7, #32]
8017a20: 9300 str r3, [sp, #0]
8017a22: 4613 mov r3, r2
8017a24: 687a ldr r2, [r7, #4]
8017a26: 68b9 ldr r1, [r7, #8]
8017a28: 68f8 ldr r0, [r7, #12]
8017a2a: f000 f811 bl 8017a50 <udp_sendto_if_src>
8017a2e: 4603 mov r3, r0
#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */
}
8017a30: 4618 mov r0, r3
8017a32: 3718 adds r7, #24
8017a34: 46bd mov sp, r7
8017a36: bd80 pop {r7, pc}
8017a38: 0801f8b4 .word 0x0801f8b4
8017a3c: 0801fa28 .word 0x0801fa28
8017a40: 0801f908 .word 0x0801f908
8017a44: 0801fa44 .word 0x0801fa44
8017a48: 0801fa60 .word 0x0801fa60
8017a4c: 0801fa80 .word 0x0801fa80
08017a50 <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)
{
8017a50: b580 push {r7, lr}
8017a52: b08c sub sp, #48 ; 0x30
8017a54: af04 add r7, sp, #16
8017a56: 60f8 str r0, [r7, #12]
8017a58: 60b9 str r1, [r7, #8]
8017a5a: 607a str r2, [r7, #4]
8017a5c: 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);
8017a5e: 68fb ldr r3, [r7, #12]
8017a60: 2b00 cmp r3, #0
8017a62: d109 bne.n 8017a78 <udp_sendto_if_src+0x28>
8017a64: 4b65 ldr r3, [pc, #404] ; (8017bfc <udp_sendto_if_src+0x1ac>)
8017a66: f240 22d1 movw r2, #721 ; 0x2d1
8017a6a: 4965 ldr r1, [pc, #404] ; (8017c00 <udp_sendto_if_src+0x1b0>)
8017a6c: 4865 ldr r0, [pc, #404] ; (8017c04 <udp_sendto_if_src+0x1b4>)
8017a6e: f004 fd6b bl 801c548 <iprintf>
8017a72: f06f 030f mvn.w r3, #15
8017a76: e0bc b.n 8017bf2 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
8017a78: 68bb ldr r3, [r7, #8]
8017a7a: 2b00 cmp r3, #0
8017a7c: d109 bne.n 8017a92 <udp_sendto_if_src+0x42>
8017a7e: 4b5f ldr r3, [pc, #380] ; (8017bfc <udp_sendto_if_src+0x1ac>)
8017a80: f240 22d2 movw r2, #722 ; 0x2d2
8017a84: 4960 ldr r1, [pc, #384] ; (8017c08 <udp_sendto_if_src+0x1b8>)
8017a86: 485f ldr r0, [pc, #380] ; (8017c04 <udp_sendto_if_src+0x1b4>)
8017a88: f004 fd5e bl 801c548 <iprintf>
8017a8c: f06f 030f mvn.w r3, #15
8017a90: e0af b.n 8017bf2 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
8017a92: 687b ldr r3, [r7, #4]
8017a94: 2b00 cmp r3, #0
8017a96: d109 bne.n 8017aac <udp_sendto_if_src+0x5c>
8017a98: 4b58 ldr r3, [pc, #352] ; (8017bfc <udp_sendto_if_src+0x1ac>)
8017a9a: f240 22d3 movw r2, #723 ; 0x2d3
8017a9e: 495b ldr r1, [pc, #364] ; (8017c0c <udp_sendto_if_src+0x1bc>)
8017aa0: 4858 ldr r0, [pc, #352] ; (8017c04 <udp_sendto_if_src+0x1b4>)
8017aa2: f004 fd51 bl 801c548 <iprintf>
8017aa6: f06f 030f mvn.w r3, #15
8017aaa: e0a2 b.n 8017bf2 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
8017aac: 6afb ldr r3, [r7, #44] ; 0x2c
8017aae: 2b00 cmp r3, #0
8017ab0: d109 bne.n 8017ac6 <udp_sendto_if_src+0x76>
8017ab2: 4b52 ldr r3, [pc, #328] ; (8017bfc <udp_sendto_if_src+0x1ac>)
8017ab4: f44f 7235 mov.w r2, #724 ; 0x2d4
8017ab8: 4955 ldr r1, [pc, #340] ; (8017c10 <udp_sendto_if_src+0x1c0>)
8017aba: 4852 ldr r0, [pc, #328] ; (8017c04 <udp_sendto_if_src+0x1b4>)
8017abc: f004 fd44 bl 801c548 <iprintf>
8017ac0: f06f 030f mvn.w r3, #15
8017ac4: e095 b.n 8017bf2 <udp_sendto_if_src+0x1a2>
LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
8017ac6: 6abb ldr r3, [r7, #40] ; 0x28
8017ac8: 2b00 cmp r3, #0
8017aca: d109 bne.n 8017ae0 <udp_sendto_if_src+0x90>
8017acc: 4b4b ldr r3, [pc, #300] ; (8017bfc <udp_sendto_if_src+0x1ac>)
8017ace: f240 22d5 movw r2, #725 ; 0x2d5
8017ad2: 4950 ldr r1, [pc, #320] ; (8017c14 <udp_sendto_if_src+0x1c4>)
8017ad4: 484b ldr r0, [pc, #300] ; (8017c04 <udp_sendto_if_src+0x1b4>)
8017ad6: f004 fd37 bl 801c548 <iprintf>
8017ada: f06f 030f mvn.w r3, #15
8017ade: e088 b.n 8017bf2 <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) {
8017ae0: 68fb ldr r3, [r7, #12]
8017ae2: 8a5b ldrh r3, [r3, #18]
8017ae4: 2b00 cmp r3, #0
8017ae6: d10f bne.n 8017b08 <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);
8017ae8: 68f9 ldr r1, [r7, #12]
8017aea: 68fb ldr r3, [r7, #12]
8017aec: 8a5b ldrh r3, [r3, #18]
8017aee: 461a mov r2, r3
8017af0: 68f8 ldr r0, [r7, #12]
8017af2: f000 f893 bl 8017c1c <udp_bind>
8017af6: 4603 mov r3, r0
8017af8: 76fb strb r3, [r7, #27]
if (err != ERR_OK) {
8017afa: f997 301b ldrsb.w r3, [r7, #27]
8017afe: 2b00 cmp r3, #0
8017b00: d002 beq.n 8017b08 <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;
8017b02: f997 301b ldrsb.w r3, [r7, #27]
8017b06: e074 b.n 8017bf2 <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) {
8017b08: 68bb ldr r3, [r7, #8]
8017b0a: 891b ldrh r3, [r3, #8]
8017b0c: f64f 72f7 movw r2, #65527 ; 0xfff7
8017b10: 4293 cmp r3, r2
8017b12: d902 bls.n 8017b1a <udp_sendto_if_src+0xca>
return ERR_MEM;
8017b14: f04f 33ff mov.w r3, #4294967295
8017b18: e06b b.n 8017bf2 <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)) {
8017b1a: 2108 movs r1, #8
8017b1c: 68b8 ldr r0, [r7, #8]
8017b1e: f7f9 ff4d bl 80119bc <pbuf_add_header>
8017b22: 4603 mov r3, r0
8017b24: 2b00 cmp r3, #0
8017b26: d015 beq.n 8017b54 <udp_sendto_if_src+0x104>
/* allocate header in a separate new pbuf */
q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
8017b28: f44f 7220 mov.w r2, #640 ; 0x280
8017b2c: 2108 movs r1, #8
8017b2e: 2022 movs r0, #34 ; 0x22
8017b30: f7f9 fcfa bl 8011528 <pbuf_alloc>
8017b34: 61f8 str r0, [r7, #28]
/* new header pbuf could not be allocated? */
if (q == NULL) {
8017b36: 69fb ldr r3, [r7, #28]
8017b38: 2b00 cmp r3, #0
8017b3a: d102 bne.n 8017b42 <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;
8017b3c: f04f 33ff mov.w r3, #4294967295
8017b40: e057 b.n 8017bf2 <udp_sendto_if_src+0x1a2>
}
if (p->tot_len != 0) {
8017b42: 68bb ldr r3, [r7, #8]
8017b44: 891b ldrh r3, [r3, #8]
8017b46: 2b00 cmp r3, #0
8017b48: d006 beq.n 8017b58 <udp_sendto_if_src+0x108>
/* chain header q in front of given pbuf p (only if p contains data) */
pbuf_chain(q, p);
8017b4a: 68b9 ldr r1, [r7, #8]
8017b4c: 69f8 ldr r0, [r7, #28]
8017b4e: f7fa f8ef bl 8011d30 <pbuf_chain>
8017b52: e001 b.n 8017b58 <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;
8017b54: 68bb ldr r3, [r7, #8]
8017b56: 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",
8017b58: 69fb ldr r3, [r7, #28]
8017b5a: 895b ldrh r3, [r3, #10]
8017b5c: 2b07 cmp r3, #7
8017b5e: d806 bhi.n 8017b6e <udp_sendto_if_src+0x11e>
8017b60: 4b26 ldr r3, [pc, #152] ; (8017bfc <udp_sendto_if_src+0x1ac>)
8017b62: f240 320e movw r2, #782 ; 0x30e
8017b66: 492c ldr r1, [pc, #176] ; (8017c18 <udp_sendto_if_src+0x1c8>)
8017b68: 4826 ldr r0, [pc, #152] ; (8017c04 <udp_sendto_if_src+0x1b4>)
8017b6a: f004 fced bl 801c548 <iprintf>
(q->len >= sizeof(struct udp_hdr)));
/* q now represents the packet to be sent */
udphdr = (struct udp_hdr *)q->payload;
8017b6e: 69fb ldr r3, [r7, #28]
8017b70: 685b ldr r3, [r3, #4]
8017b72: 617b str r3, [r7, #20]
udphdr->src = lwip_htons(pcb->local_port);
8017b74: 68fb ldr r3, [r7, #12]
8017b76: 8a5b ldrh r3, [r3, #18]
8017b78: 4618 mov r0, r3
8017b7a: f7f8 fc01 bl 8010380 <lwip_htons>
8017b7e: 4603 mov r3, r0
8017b80: 461a mov r2, r3
8017b82: 697b ldr r3, [r7, #20]
8017b84: 801a strh r2, [r3, #0]
udphdr->dest = lwip_htons(dst_port);
8017b86: 887b ldrh r3, [r7, #2]
8017b88: 4618 mov r0, r3
8017b8a: f7f8 fbf9 bl 8010380 <lwip_htons>
8017b8e: 4603 mov r3, r0
8017b90: 461a mov r2, r3
8017b92: 697b ldr r3, [r7, #20]
8017b94: 805a strh r2, [r3, #2]
/* in UDP, 0 checksum means 'no checksum' */
udphdr->chksum = 0x0000;
8017b96: 697b ldr r3, [r7, #20]
8017b98: 2200 movs r2, #0
8017b9a: 719a strb r2, [r3, #6]
8017b9c: 2200 movs r2, #0
8017b9e: 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);
8017ba0: 69fb ldr r3, [r7, #28]
8017ba2: 891b ldrh r3, [r3, #8]
8017ba4: 4618 mov r0, r3
8017ba6: f7f8 fbeb bl 8010380 <lwip_htons>
8017baa: 4603 mov r3, r0
8017bac: 461a mov r2, r3
8017bae: 697b ldr r3, [r7, #20]
8017bb0: 809a strh r2, [r3, #4]
}
udphdr->chksum = udpchksum;
}
}
#endif /* CHECKSUM_GEN_UDP */
ip_proto = IP_PROTO_UDP;
8017bb2: 2311 movs r3, #17
8017bb4: 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;
8017bb6: 68fb ldr r3, [r7, #12]
8017bb8: 7adb ldrb r3, [r3, #11]
8017bba: 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);
8017bbc: 68fb ldr r3, [r7, #12]
8017bbe: 7a9b ldrb r3, [r3, #10]
8017bc0: 7cb9 ldrb r1, [r7, #18]
8017bc2: 6aba ldr r2, [r7, #40] ; 0x28
8017bc4: 9202 str r2, [sp, #8]
8017bc6: 7cfa ldrb r2, [r7, #19]
8017bc8: 9201 str r2, [sp, #4]
8017bca: 9300 str r3, [sp, #0]
8017bcc: 460b mov r3, r1
8017bce: 687a ldr r2, [r7, #4]
8017bd0: 6af9 ldr r1, [r7, #44] ; 0x2c
8017bd2: 69f8 ldr r0, [r7, #28]
8017bd4: f003 fb48 bl 801b268 <ip4_output_if_src>
8017bd8: 4603 mov r3, r0
8017bda: 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) {
8017bdc: 69fa ldr r2, [r7, #28]
8017bde: 68bb ldr r3, [r7, #8]
8017be0: 429a cmp r2, r3
8017be2: d004 beq.n 8017bee <udp_sendto_if_src+0x19e>
/* free the header pbuf */
pbuf_free(q);
8017be4: 69f8 ldr r0, [r7, #28]
8017be6: f7f9 ff7f bl 8011ae8 <pbuf_free>
q = NULL;
8017bea: 2300 movs r3, #0
8017bec: 61fb str r3, [r7, #28]
/* p is still referenced by the caller, and will live on */
}
UDP_STATS_INC(udp.xmit);
return err;
8017bee: f997 301b ldrsb.w r3, [r7, #27]
}
8017bf2: 4618 mov r0, r3
8017bf4: 3720 adds r7, #32
8017bf6: 46bd mov sp, r7
8017bf8: bd80 pop {r7, pc}
8017bfa: bf00 nop
8017bfc: 0801f8b4 .word 0x0801f8b4
8017c00: 0801faa0 .word 0x0801faa0
8017c04: 0801f908 .word 0x0801f908
8017c08: 0801fac0 .word 0x0801fac0
8017c0c: 0801fae0 .word 0x0801fae0
8017c10: 0801fb04 .word 0x0801fb04
8017c14: 0801fb28 .word 0x0801fb28
8017c18: 0801fb4c .word 0x0801fb4c
08017c1c <udp_bind>:
*
* @see udp_disconnect()
*/
err_t
udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
{
8017c1c: b580 push {r7, lr}
8017c1e: b086 sub sp, #24
8017c20: af00 add r7, sp, #0
8017c22: 60f8 str r0, [r7, #12]
8017c24: 60b9 str r1, [r7, #8]
8017c26: 4613 mov r3, r2
8017c28: 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) {
8017c2a: 68bb ldr r3, [r7, #8]
8017c2c: 2b00 cmp r3, #0
8017c2e: d101 bne.n 8017c34 <udp_bind+0x18>
ipaddr = IP4_ADDR_ANY;
8017c30: 4b39 ldr r3, [pc, #228] ; (8017d18 <udp_bind+0xfc>)
8017c32: 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);
8017c34: 68fb ldr r3, [r7, #12]
8017c36: 2b00 cmp r3, #0
8017c38: d109 bne.n 8017c4e <udp_bind+0x32>
8017c3a: 4b38 ldr r3, [pc, #224] ; (8017d1c <udp_bind+0x100>)
8017c3c: f240 32b7 movw r2, #951 ; 0x3b7
8017c40: 4937 ldr r1, [pc, #220] ; (8017d20 <udp_bind+0x104>)
8017c42: 4838 ldr r0, [pc, #224] ; (8017d24 <udp_bind+0x108>)
8017c44: f004 fc80 bl 801c548 <iprintf>
8017c48: f06f 030f mvn.w r3, #15
8017c4c: e060 b.n 8017d10 <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;
8017c4e: 2300 movs r3, #0
8017c50: 74fb strb r3, [r7, #19]
/* Check for double bind and rebind of the same pcb */
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8017c52: 4b35 ldr r3, [pc, #212] ; (8017d28 <udp_bind+0x10c>)
8017c54: 681b ldr r3, [r3, #0]
8017c56: 617b str r3, [r7, #20]
8017c58: e009 b.n 8017c6e <udp_bind+0x52>
/* is this UDP PCB already on active list? */
if (pcb == ipcb) {
8017c5a: 68fa ldr r2, [r7, #12]
8017c5c: 697b ldr r3, [r7, #20]
8017c5e: 429a cmp r2, r3
8017c60: d102 bne.n 8017c68 <udp_bind+0x4c>
rebind = 1;
8017c62: 2301 movs r3, #1
8017c64: 74fb strb r3, [r7, #19]
break;
8017c66: e005 b.n 8017c74 <udp_bind+0x58>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8017c68: 697b ldr r3, [r7, #20]
8017c6a: 68db ldr r3, [r3, #12]
8017c6c: 617b str r3, [r7, #20]
8017c6e: 697b ldr r3, [r7, #20]
8017c70: 2b00 cmp r3, #0
8017c72: d1f2 bne.n 8017c5a <udp_bind+0x3e>
ipaddr = &zoned_ipaddr;
}
#endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
/* no port specified? */
if (port == 0) {
8017c74: 88fb ldrh r3, [r7, #6]
8017c76: 2b00 cmp r3, #0
8017c78: d109 bne.n 8017c8e <udp_bind+0x72>
port = udp_new_port();
8017c7a: f7ff fcc5 bl 8017608 <udp_new_port>
8017c7e: 4603 mov r3, r0
8017c80: 80fb strh r3, [r7, #6]
if (port == 0) {
8017c82: 88fb ldrh r3, [r7, #6]
8017c84: 2b00 cmp r3, #0
8017c86: d12c bne.n 8017ce2 <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;
8017c88: f06f 0307 mvn.w r3, #7
8017c8c: e040 b.n 8017d10 <udp_bind+0xf4>
}
} else {
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8017c8e: 4b26 ldr r3, [pc, #152] ; (8017d28 <udp_bind+0x10c>)
8017c90: 681b ldr r3, [r3, #0]
8017c92: 617b str r3, [r7, #20]
8017c94: e022 b.n 8017cdc <udp_bind+0xc0>
if (pcb != ipcb) {
8017c96: 68fa ldr r2, [r7, #12]
8017c98: 697b ldr r3, [r7, #20]
8017c9a: 429a cmp r2, r3
8017c9c: d01b beq.n 8017cd6 <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) &&
8017c9e: 697b ldr r3, [r7, #20]
8017ca0: 8a5b ldrh r3, [r3, #18]
8017ca2: 88fa ldrh r2, [r7, #6]
8017ca4: 429a cmp r2, r3
8017ca6: d116 bne.n 8017cd6 <udp_bind+0xba>
/* IP address matches or any IP used? */
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
8017ca8: 697b ldr r3, [r7, #20]
8017caa: 681a ldr r2, [r3, #0]
8017cac: 68bb ldr r3, [r7, #8]
8017cae: 681b ldr r3, [r3, #0]
if ((ipcb->local_port == port) &&
8017cb0: 429a cmp r2, r3
8017cb2: d00d beq.n 8017cd0 <udp_bind+0xb4>
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
8017cb4: 68bb ldr r3, [r7, #8]
8017cb6: 2b00 cmp r3, #0
8017cb8: d00a beq.n 8017cd0 <udp_bind+0xb4>
8017cba: 68bb ldr r3, [r7, #8]
8017cbc: 681b ldr r3, [r3, #0]
8017cbe: 2b00 cmp r3, #0
8017cc0: d006 beq.n 8017cd0 <udp_bind+0xb4>
ip_addr_isany(&ipcb->local_ip))) {
8017cc2: 697b ldr r3, [r7, #20]
(ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
8017cc4: 2b00 cmp r3, #0
8017cc6: d003 beq.n 8017cd0 <udp_bind+0xb4>
ip_addr_isany(&ipcb->local_ip))) {
8017cc8: 697b ldr r3, [r7, #20]
8017cca: 681b ldr r3, [r3, #0]
8017ccc: 2b00 cmp r3, #0
8017cce: d102 bne.n 8017cd6 <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;
8017cd0: f06f 0307 mvn.w r3, #7
8017cd4: e01c b.n 8017d10 <udp_bind+0xf4>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8017cd6: 697b ldr r3, [r7, #20]
8017cd8: 68db ldr r3, [r3, #12]
8017cda: 617b str r3, [r7, #20]
8017cdc: 697b ldr r3, [r7, #20]
8017cde: 2b00 cmp r3, #0
8017ce0: d1d9 bne.n 8017c96 <udp_bind+0x7a>
}
}
}
}
ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
8017ce2: 68bb ldr r3, [r7, #8]
8017ce4: 2b00 cmp r3, #0
8017ce6: d002 beq.n 8017cee <udp_bind+0xd2>
8017ce8: 68bb ldr r3, [r7, #8]
8017cea: 681b ldr r3, [r3, #0]
8017cec: e000 b.n 8017cf0 <udp_bind+0xd4>
8017cee: 2300 movs r3, #0
8017cf0: 68fa ldr r2, [r7, #12]
8017cf2: 6013 str r3, [r2, #0]
pcb->local_port = port;
8017cf4: 68fb ldr r3, [r7, #12]
8017cf6: 88fa ldrh r2, [r7, #6]
8017cf8: 825a strh r2, [r3, #18]
mib2_udp_bind(pcb);
/* pcb not active yet? */
if (rebind == 0) {
8017cfa: 7cfb ldrb r3, [r7, #19]
8017cfc: 2b00 cmp r3, #0
8017cfe: d106 bne.n 8017d0e <udp_bind+0xf2>
/* place the PCB on the active list if not already there */
pcb->next = udp_pcbs;
8017d00: 4b09 ldr r3, [pc, #36] ; (8017d28 <udp_bind+0x10c>)
8017d02: 681a ldr r2, [r3, #0]
8017d04: 68fb ldr r3, [r7, #12]
8017d06: 60da str r2, [r3, #12]
udp_pcbs = pcb;
8017d08: 4a07 ldr r2, [pc, #28] ; (8017d28 <udp_bind+0x10c>)
8017d0a: 68fb ldr r3, [r7, #12]
8017d0c: 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;
8017d0e: 2300 movs r3, #0
}
8017d10: 4618 mov r0, r3
8017d12: 3718 adds r7, #24
8017d14: 46bd mov sp, r7
8017d16: bd80 pop {r7, pc}
8017d18: 080226e8 .word 0x080226e8
8017d1c: 0801f8b4 .word 0x0801f8b4
8017d20: 0801fb7c .word 0x0801fb7c
8017d24: 0801f908 .word 0x0801f908
8017d28: 2000f800 .word 0x2000f800
08017d2c <udp_connect>:
*
* @see udp_disconnect()
*/
err_t
udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
{
8017d2c: b580 push {r7, lr}
8017d2e: b086 sub sp, #24
8017d30: af00 add r7, sp, #0
8017d32: 60f8 str r0, [r7, #12]
8017d34: 60b9 str r1, [r7, #8]
8017d36: 4613 mov r3, r2
8017d38: 80fb strh r3, [r7, #6]
struct udp_pcb *ipcb;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
8017d3a: 68fb ldr r3, [r7, #12]
8017d3c: 2b00 cmp r3, #0
8017d3e: d109 bne.n 8017d54 <udp_connect+0x28>
8017d40: 4b2c ldr r3, [pc, #176] ; (8017df4 <udp_connect+0xc8>)
8017d42: f240 4235 movw r2, #1077 ; 0x435
8017d46: 492c ldr r1, [pc, #176] ; (8017df8 <udp_connect+0xcc>)
8017d48: 482c ldr r0, [pc, #176] ; (8017dfc <udp_connect+0xd0>)
8017d4a: f004 fbfd bl 801c548 <iprintf>
8017d4e: f06f 030f mvn.w r3, #15
8017d52: e04b b.n 8017dec <udp_connect+0xc0>
LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
8017d54: 68bb ldr r3, [r7, #8]
8017d56: 2b00 cmp r3, #0
8017d58: d109 bne.n 8017d6e <udp_connect+0x42>
8017d5a: 4b26 ldr r3, [pc, #152] ; (8017df4 <udp_connect+0xc8>)
8017d5c: f240 4236 movw r2, #1078 ; 0x436
8017d60: 4927 ldr r1, [pc, #156] ; (8017e00 <udp_connect+0xd4>)
8017d62: 4826 ldr r0, [pc, #152] ; (8017dfc <udp_connect+0xd0>)
8017d64: f004 fbf0 bl 801c548 <iprintf>
8017d68: f06f 030f mvn.w r3, #15
8017d6c: e03e b.n 8017dec <udp_connect+0xc0>
if (pcb->local_port == 0) {
8017d6e: 68fb ldr r3, [r7, #12]
8017d70: 8a5b ldrh r3, [r3, #18]
8017d72: 2b00 cmp r3, #0
8017d74: d10f bne.n 8017d96 <udp_connect+0x6a>
err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
8017d76: 68f9 ldr r1, [r7, #12]
8017d78: 68fb ldr r3, [r7, #12]
8017d7a: 8a5b ldrh r3, [r3, #18]
8017d7c: 461a mov r2, r3
8017d7e: 68f8 ldr r0, [r7, #12]
8017d80: f7ff ff4c bl 8017c1c <udp_bind>
8017d84: 4603 mov r3, r0
8017d86: 74fb strb r3, [r7, #19]
if (err != ERR_OK) {
8017d88: f997 3013 ldrsb.w r3, [r7, #19]
8017d8c: 2b00 cmp r3, #0
8017d8e: d002 beq.n 8017d96 <udp_connect+0x6a>
return err;
8017d90: f997 3013 ldrsb.w r3, [r7, #19]
8017d94: e02a b.n 8017dec <udp_connect+0xc0>
}
}
ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr);
8017d96: 68bb ldr r3, [r7, #8]
8017d98: 2b00 cmp r3, #0
8017d9a: d002 beq.n 8017da2 <udp_connect+0x76>
8017d9c: 68bb ldr r3, [r7, #8]
8017d9e: 681b ldr r3, [r3, #0]
8017da0: e000 b.n 8017da4 <udp_connect+0x78>
8017da2: 2300 movs r3, #0
8017da4: 68fa ldr r2, [r7, #12]
8017da6: 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;
8017da8: 68fb ldr r3, [r7, #12]
8017daa: 88fa ldrh r2, [r7, #6]
8017dac: 829a strh r2, [r3, #20]
pcb->flags |= UDP_FLAGS_CONNECTED;
8017dae: 68fb ldr r3, [r7, #12]
8017db0: 7c1b ldrb r3, [r3, #16]
8017db2: f043 0304 orr.w r3, r3, #4
8017db6: b2da uxtb r2, r3
8017db8: 68fb ldr r3, [r7, #12]
8017dba: 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) {
8017dbc: 4b11 ldr r3, [pc, #68] ; (8017e04 <udp_connect+0xd8>)
8017dbe: 681b ldr r3, [r3, #0]
8017dc0: 617b str r3, [r7, #20]
8017dc2: e008 b.n 8017dd6 <udp_connect+0xaa>
if (pcb == ipcb) {
8017dc4: 68fa ldr r2, [r7, #12]
8017dc6: 697b ldr r3, [r7, #20]
8017dc8: 429a cmp r2, r3
8017dca: d101 bne.n 8017dd0 <udp_connect+0xa4>
/* already on the list, just return */
return ERR_OK;
8017dcc: 2300 movs r3, #0
8017dce: e00d b.n 8017dec <udp_connect+0xc0>
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
8017dd0: 697b ldr r3, [r7, #20]
8017dd2: 68db ldr r3, [r3, #12]
8017dd4: 617b str r3, [r7, #20]
8017dd6: 697b ldr r3, [r7, #20]
8017dd8: 2b00 cmp r3, #0
8017dda: d1f3 bne.n 8017dc4 <udp_connect+0x98>
}
}
/* PCB not yet on the list, add PCB now */
pcb->next = udp_pcbs;
8017ddc: 4b09 ldr r3, [pc, #36] ; (8017e04 <udp_connect+0xd8>)
8017dde: 681a ldr r2, [r3, #0]
8017de0: 68fb ldr r3, [r7, #12]
8017de2: 60da str r2, [r3, #12]
udp_pcbs = pcb;
8017de4: 4a07 ldr r2, [pc, #28] ; (8017e04 <udp_connect+0xd8>)
8017de6: 68fb ldr r3, [r7, #12]
8017de8: 6013 str r3, [r2, #0]
return ERR_OK;
8017dea: 2300 movs r3, #0
}
8017dec: 4618 mov r0, r3
8017dee: 3718 adds r7, #24
8017df0: 46bd mov sp, r7
8017df2: bd80 pop {r7, pc}
8017df4: 0801f8b4 .word 0x0801f8b4
8017df8: 0801fb94 .word 0x0801fb94
8017dfc: 0801f908 .word 0x0801f908
8017e00: 0801fbb0 .word 0x0801fbb0
8017e04: 2000f800 .word 0x2000f800
08017e08 <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)
{
8017e08: b580 push {r7, lr}
8017e0a: b084 sub sp, #16
8017e0c: af00 add r7, sp, #0
8017e0e: 60f8 str r0, [r7, #12]
8017e10: 60b9 str r1, [r7, #8]
8017e12: 607a str r2, [r7, #4]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
8017e14: 68fb ldr r3, [r7, #12]
8017e16: 2b00 cmp r3, #0
8017e18: d107 bne.n 8017e2a <udp_recv+0x22>
8017e1a: 4b08 ldr r3, [pc, #32] ; (8017e3c <udp_recv+0x34>)
8017e1c: f240 428a movw r2, #1162 ; 0x48a
8017e20: 4907 ldr r1, [pc, #28] ; (8017e40 <udp_recv+0x38>)
8017e22: 4808 ldr r0, [pc, #32] ; (8017e44 <udp_recv+0x3c>)
8017e24: f004 fb90 bl 801c548 <iprintf>
8017e28: e005 b.n 8017e36 <udp_recv+0x2e>
/* remember recv() callback and user data */
pcb->recv = recv;
8017e2a: 68fb ldr r3, [r7, #12]
8017e2c: 68ba ldr r2, [r7, #8]
8017e2e: 619a str r2, [r3, #24]
pcb->recv_arg = recv_arg;
8017e30: 68fb ldr r3, [r7, #12]
8017e32: 687a ldr r2, [r7, #4]
8017e34: 61da str r2, [r3, #28]
}
8017e36: 3710 adds r7, #16
8017e38: 46bd mov sp, r7
8017e3a: bd80 pop {r7, pc}
8017e3c: 0801f8b4 .word 0x0801f8b4
8017e40: 0801fbe8 .word 0x0801fbe8
8017e44: 0801f908 .word 0x0801f908
08017e48 <udp_remove>:
*
* @see udp_new()
*/
void
udp_remove(struct udp_pcb *pcb)
{
8017e48: b580 push {r7, lr}
8017e4a: b084 sub sp, #16
8017e4c: af00 add r7, sp, #0
8017e4e: 6078 str r0, [r7, #4]
struct udp_pcb *pcb2;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
8017e50: 687b ldr r3, [r7, #4]
8017e52: 2b00 cmp r3, #0
8017e54: d107 bne.n 8017e66 <udp_remove+0x1e>
8017e56: 4b19 ldr r3, [pc, #100] ; (8017ebc <udp_remove+0x74>)
8017e58: f240 42a1 movw r2, #1185 ; 0x4a1
8017e5c: 4918 ldr r1, [pc, #96] ; (8017ec0 <udp_remove+0x78>)
8017e5e: 4819 ldr r0, [pc, #100] ; (8017ec4 <udp_remove+0x7c>)
8017e60: f004 fb72 bl 801c548 <iprintf>
8017e64: e026 b.n 8017eb4 <udp_remove+0x6c>
mib2_udp_unbind(pcb);
/* pcb to be removed is first in list? */
if (udp_pcbs == pcb) {
8017e66: 4b18 ldr r3, [pc, #96] ; (8017ec8 <udp_remove+0x80>)
8017e68: 681b ldr r3, [r3, #0]
8017e6a: 687a ldr r2, [r7, #4]
8017e6c: 429a cmp r2, r3
8017e6e: d105 bne.n 8017e7c <udp_remove+0x34>
/* make list start at 2nd pcb */
udp_pcbs = udp_pcbs->next;
8017e70: 4b15 ldr r3, [pc, #84] ; (8017ec8 <udp_remove+0x80>)
8017e72: 681b ldr r3, [r3, #0]
8017e74: 68db ldr r3, [r3, #12]
8017e76: 4a14 ldr r2, [pc, #80] ; (8017ec8 <udp_remove+0x80>)
8017e78: 6013 str r3, [r2, #0]
8017e7a: e017 b.n 8017eac <udp_remove+0x64>
/* pcb not 1st in list */
} else {
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
8017e7c: 4b12 ldr r3, [pc, #72] ; (8017ec8 <udp_remove+0x80>)
8017e7e: 681b ldr r3, [r3, #0]
8017e80: 60fb str r3, [r7, #12]
8017e82: e010 b.n 8017ea6 <udp_remove+0x5e>
/* find pcb in udp_pcbs list */
if (pcb2->next != NULL && pcb2->next == pcb) {
8017e84: 68fb ldr r3, [r7, #12]
8017e86: 68db ldr r3, [r3, #12]
8017e88: 2b00 cmp r3, #0
8017e8a: d009 beq.n 8017ea0 <udp_remove+0x58>
8017e8c: 68fb ldr r3, [r7, #12]
8017e8e: 68db ldr r3, [r3, #12]
8017e90: 687a ldr r2, [r7, #4]
8017e92: 429a cmp r2, r3
8017e94: d104 bne.n 8017ea0 <udp_remove+0x58>
/* remove pcb from list */
pcb2->next = pcb->next;
8017e96: 687b ldr r3, [r7, #4]
8017e98: 68da ldr r2, [r3, #12]
8017e9a: 68fb ldr r3, [r7, #12]
8017e9c: 60da str r2, [r3, #12]
break;
8017e9e: e005 b.n 8017eac <udp_remove+0x64>
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
8017ea0: 68fb ldr r3, [r7, #12]
8017ea2: 68db ldr r3, [r3, #12]
8017ea4: 60fb str r3, [r7, #12]
8017ea6: 68fb ldr r3, [r7, #12]
8017ea8: 2b00 cmp r3, #0
8017eaa: d1eb bne.n 8017e84 <udp_remove+0x3c>
}
}
}
memp_free(MEMP_UDP_PCB, pcb);
8017eac: 6879 ldr r1, [r7, #4]
8017eae: 2000 movs r0, #0
8017eb0: f7f8 ff6e bl 8010d90 <memp_free>
}
8017eb4: 3710 adds r7, #16
8017eb6: 46bd mov sp, r7
8017eb8: bd80 pop {r7, pc}
8017eba: bf00 nop
8017ebc: 0801f8b4 .word 0x0801f8b4
8017ec0: 0801fc00 .word 0x0801fc00
8017ec4: 0801f908 .word 0x0801f908
8017ec8: 2000f800 .word 0x2000f800
08017ecc <udp_new>:
*
* @see udp_remove()
*/
struct udp_pcb *
udp_new(void)
{
8017ecc: b580 push {r7, lr}
8017ece: b082 sub sp, #8
8017ed0: af00 add r7, sp, #0
struct udp_pcb *pcb;
LWIP_ASSERT_CORE_LOCKED();
pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB);
8017ed2: 2000 movs r0, #0
8017ed4: f7f8 ff0a bl 8010cec <memp_malloc>
8017ed8: 6078 str r0, [r7, #4]
/* could allocate UDP PCB? */
if (pcb != NULL) {
8017eda: 687b ldr r3, [r7, #4]
8017edc: 2b00 cmp r3, #0
8017ede: d007 beq.n 8017ef0 <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));
8017ee0: 2220 movs r2, #32
8017ee2: 2100 movs r1, #0
8017ee4: 6878 ldr r0, [r7, #4]
8017ee6: f004 fb26 bl 801c536 <memset>
pcb->ttl = UDP_TTL;
8017eea: 687b ldr r3, [r7, #4]
8017eec: 22ff movs r2, #255 ; 0xff
8017eee: 72da strb r2, [r3, #11]
#if LWIP_MULTICAST_TX_OPTIONS
udp_set_multicast_ttl(pcb, UDP_TTL);
#endif /* LWIP_MULTICAST_TX_OPTIONS */
}
return pcb;
8017ef0: 687b ldr r3, [r7, #4]
}
8017ef2: 4618 mov r0, r3
8017ef4: 3708 adds r7, #8
8017ef6: 46bd mov sp, r7
8017ef8: bd80 pop {r7, pc}
...
08017efc <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)
{
8017efc: b480 push {r7}
8017efe: b085 sub sp, #20
8017f00: af00 add r7, sp, #0
8017f02: 6078 str r0, [r7, #4]
8017f04: 6039 str r1, [r7, #0]
struct udp_pcb *upcb;
if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) {
8017f06: 687b ldr r3, [r7, #4]
8017f08: 2b00 cmp r3, #0
8017f0a: d01e beq.n 8017f4a <udp_netif_ip_addr_changed+0x4e>
8017f0c: 687b ldr r3, [r7, #4]
8017f0e: 681b ldr r3, [r3, #0]
8017f10: 2b00 cmp r3, #0
8017f12: d01a beq.n 8017f4a <udp_netif_ip_addr_changed+0x4e>
8017f14: 683b ldr r3, [r7, #0]
8017f16: 2b00 cmp r3, #0
8017f18: d017 beq.n 8017f4a <udp_netif_ip_addr_changed+0x4e>
8017f1a: 683b ldr r3, [r7, #0]
8017f1c: 681b ldr r3, [r3, #0]
8017f1e: 2b00 cmp r3, #0
8017f20: d013 beq.n 8017f4a <udp_netif_ip_addr_changed+0x4e>
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
8017f22: 4b0d ldr r3, [pc, #52] ; (8017f58 <udp_netif_ip_addr_changed+0x5c>)
8017f24: 681b ldr r3, [r3, #0]
8017f26: 60fb str r3, [r7, #12]
8017f28: e00c b.n 8017f44 <udp_netif_ip_addr_changed+0x48>
/* PCB bound to current local interface address? */
if (ip_addr_cmp(&upcb->local_ip, old_addr)) {
8017f2a: 68fb ldr r3, [r7, #12]
8017f2c: 681a ldr r2, [r3, #0]
8017f2e: 687b ldr r3, [r7, #4]
8017f30: 681b ldr r3, [r3, #0]
8017f32: 429a cmp r2, r3
8017f34: d103 bne.n 8017f3e <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);
8017f36: 683b ldr r3, [r7, #0]
8017f38: 681a ldr r2, [r3, #0]
8017f3a: 68fb ldr r3, [r7, #12]
8017f3c: 601a str r2, [r3, #0]
for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
8017f3e: 68fb ldr r3, [r7, #12]
8017f40: 68db ldr r3, [r3, #12]
8017f42: 60fb str r3, [r7, #12]
8017f44: 68fb ldr r3, [r7, #12]
8017f46: 2b00 cmp r3, #0
8017f48: d1ef bne.n 8017f2a <udp_netif_ip_addr_changed+0x2e>
}
}
}
}
8017f4a: bf00 nop
8017f4c: 3714 adds r7, #20
8017f4e: 46bd mov sp, r7
8017f50: f85d 7b04 ldr.w r7, [sp], #4
8017f54: 4770 bx lr
8017f56: bf00 nop
8017f58: 2000f800 .word 0x2000f800
08017f5c <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)
{
8017f5c: b580 push {r7, lr}
8017f5e: af00 add r7, sp, #0
if (dhcp_pcb_refcount == 0) {
8017f60: 4b20 ldr r3, [pc, #128] ; (8017fe4 <dhcp_inc_pcb_refcount+0x88>)
8017f62: 781b ldrb r3, [r3, #0]
8017f64: 2b00 cmp r3, #0
8017f66: d133 bne.n 8017fd0 <dhcp_inc_pcb_refcount+0x74>
LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL);
8017f68: 4b1f ldr r3, [pc, #124] ; (8017fe8 <dhcp_inc_pcb_refcount+0x8c>)
8017f6a: 681b ldr r3, [r3, #0]
8017f6c: 2b00 cmp r3, #0
8017f6e: d005 beq.n 8017f7c <dhcp_inc_pcb_refcount+0x20>
8017f70: 4b1e ldr r3, [pc, #120] ; (8017fec <dhcp_inc_pcb_refcount+0x90>)
8017f72: 22e5 movs r2, #229 ; 0xe5
8017f74: 491e ldr r1, [pc, #120] ; (8017ff0 <dhcp_inc_pcb_refcount+0x94>)
8017f76: 481f ldr r0, [pc, #124] ; (8017ff4 <dhcp_inc_pcb_refcount+0x98>)
8017f78: f004 fae6 bl 801c548 <iprintf>
/* allocate UDP PCB */
dhcp_pcb = udp_new();
8017f7c: f7ff ffa6 bl 8017ecc <udp_new>
8017f80: 4602 mov r2, r0
8017f82: 4b19 ldr r3, [pc, #100] ; (8017fe8 <dhcp_inc_pcb_refcount+0x8c>)
8017f84: 601a str r2, [r3, #0]
if (dhcp_pcb == NULL) {
8017f86: 4b18 ldr r3, [pc, #96] ; (8017fe8 <dhcp_inc_pcb_refcount+0x8c>)
8017f88: 681b ldr r3, [r3, #0]
8017f8a: 2b00 cmp r3, #0
8017f8c: d102 bne.n 8017f94 <dhcp_inc_pcb_refcount+0x38>
return ERR_MEM;
8017f8e: f04f 33ff mov.w r3, #4294967295
8017f92: e024 b.n 8017fde <dhcp_inc_pcb_refcount+0x82>
}
ip_set_option(dhcp_pcb, SOF_BROADCAST);
8017f94: 4b14 ldr r3, [pc, #80] ; (8017fe8 <dhcp_inc_pcb_refcount+0x8c>)
8017f96: 681b ldr r3, [r3, #0]
8017f98: 7a5a ldrb r2, [r3, #9]
8017f9a: 4b13 ldr r3, [pc, #76] ; (8017fe8 <dhcp_inc_pcb_refcount+0x8c>)
8017f9c: 681b ldr r3, [r3, #0]
8017f9e: f042 0220 orr.w r2, r2, #32
8017fa2: b2d2 uxtb r2, r2
8017fa4: 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);
8017fa6: 4b10 ldr r3, [pc, #64] ; (8017fe8 <dhcp_inc_pcb_refcount+0x8c>)
8017fa8: 681b ldr r3, [r3, #0]
8017faa: 2244 movs r2, #68 ; 0x44
8017fac: 4912 ldr r1, [pc, #72] ; (8017ff8 <dhcp_inc_pcb_refcount+0x9c>)
8017fae: 4618 mov r0, r3
8017fb0: f7ff fe34 bl 8017c1c <udp_bind>
udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER);
8017fb4: 4b0c ldr r3, [pc, #48] ; (8017fe8 <dhcp_inc_pcb_refcount+0x8c>)
8017fb6: 681b ldr r3, [r3, #0]
8017fb8: 2243 movs r2, #67 ; 0x43
8017fba: 490f ldr r1, [pc, #60] ; (8017ff8 <dhcp_inc_pcb_refcount+0x9c>)
8017fbc: 4618 mov r0, r3
8017fbe: f7ff feb5 bl 8017d2c <udp_connect>
udp_recv(dhcp_pcb, dhcp_recv, NULL);
8017fc2: 4b09 ldr r3, [pc, #36] ; (8017fe8 <dhcp_inc_pcb_refcount+0x8c>)
8017fc4: 681b ldr r3, [r3, #0]
8017fc6: 2200 movs r2, #0
8017fc8: 490c ldr r1, [pc, #48] ; (8017ffc <dhcp_inc_pcb_refcount+0xa0>)
8017fca: 4618 mov r0, r3
8017fcc: f7ff ff1c bl 8017e08 <udp_recv>
}
dhcp_pcb_refcount++;
8017fd0: 4b04 ldr r3, [pc, #16] ; (8017fe4 <dhcp_inc_pcb_refcount+0x88>)
8017fd2: 781b ldrb r3, [r3, #0]
8017fd4: 3301 adds r3, #1
8017fd6: b2da uxtb r2, r3
8017fd8: 4b02 ldr r3, [pc, #8] ; (8017fe4 <dhcp_inc_pcb_refcount+0x88>)
8017fda: 701a strb r2, [r3, #0]
return ERR_OK;
8017fdc: 2300 movs r3, #0
}
8017fde: 4618 mov r0, r3
8017fe0: bd80 pop {r7, pc}
8017fe2: bf00 nop
8017fe4: 2000875c .word 0x2000875c
8017fe8: 20008758 .word 0x20008758
8017fec: 0801fc18 .word 0x0801fc18
8017ff0: 0801fc50 .word 0x0801fc50
8017ff4: 0801fc78 .word 0x0801fc78
8017ff8: 080226e8 .word 0x080226e8
8017ffc: 080198b9 .word 0x080198b9
08018000 <dhcp_dec_pcb_refcount>:
/** Free DHCP PCB if the last netif stops using it */
static void
dhcp_dec_pcb_refcount(void)
{
8018000: b580 push {r7, lr}
8018002: af00 add r7, sp, #0
LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
8018004: 4b0e ldr r3, [pc, #56] ; (8018040 <dhcp_dec_pcb_refcount+0x40>)
8018006: 781b ldrb r3, [r3, #0]
8018008: 2b00 cmp r3, #0
801800a: d105 bne.n 8018018 <dhcp_dec_pcb_refcount+0x18>
801800c: 4b0d ldr r3, [pc, #52] ; (8018044 <dhcp_dec_pcb_refcount+0x44>)
801800e: 22ff movs r2, #255 ; 0xff
8018010: 490d ldr r1, [pc, #52] ; (8018048 <dhcp_dec_pcb_refcount+0x48>)
8018012: 480e ldr r0, [pc, #56] ; (801804c <dhcp_dec_pcb_refcount+0x4c>)
8018014: f004 fa98 bl 801c548 <iprintf>
dhcp_pcb_refcount--;
8018018: 4b09 ldr r3, [pc, #36] ; (8018040 <dhcp_dec_pcb_refcount+0x40>)
801801a: 781b ldrb r3, [r3, #0]
801801c: 3b01 subs r3, #1
801801e: b2da uxtb r2, r3
8018020: 4b07 ldr r3, [pc, #28] ; (8018040 <dhcp_dec_pcb_refcount+0x40>)
8018022: 701a strb r2, [r3, #0]
if (dhcp_pcb_refcount == 0) {
8018024: 4b06 ldr r3, [pc, #24] ; (8018040 <dhcp_dec_pcb_refcount+0x40>)
8018026: 781b ldrb r3, [r3, #0]
8018028: 2b00 cmp r3, #0
801802a: d107 bne.n 801803c <dhcp_dec_pcb_refcount+0x3c>
udp_remove(dhcp_pcb);
801802c: 4b08 ldr r3, [pc, #32] ; (8018050 <dhcp_dec_pcb_refcount+0x50>)
801802e: 681b ldr r3, [r3, #0]
8018030: 4618 mov r0, r3
8018032: f7ff ff09 bl 8017e48 <udp_remove>
dhcp_pcb = NULL;
8018036: 4b06 ldr r3, [pc, #24] ; (8018050 <dhcp_dec_pcb_refcount+0x50>)
8018038: 2200 movs r2, #0
801803a: 601a str r2, [r3, #0]
}
}
801803c: bf00 nop
801803e: bd80 pop {r7, pc}
8018040: 2000875c .word 0x2000875c
8018044: 0801fc18 .word 0x0801fc18
8018048: 0801fca0 .word 0x0801fca0
801804c: 0801fc78 .word 0x0801fc78
8018050: 20008758 .word 0x20008758
08018054 <dhcp_handle_nak>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_nak(struct netif *netif)
{
8018054: b580 push {r7, lr}
8018056: b084 sub sp, #16
8018058: af00 add r7, sp, #0
801805a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
801805c: 687b ldr r3, [r7, #4]
801805e: 6a5b ldr r3, [r3, #36] ; 0x24
8018060: 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);
8018062: 210c movs r1, #12
8018064: 68f8 ldr r0, [r7, #12]
8018066: f001 f869 bl 801913c <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);
801806a: 4b06 ldr r3, [pc, #24] ; (8018084 <dhcp_handle_nak+0x30>)
801806c: 4a05 ldr r2, [pc, #20] ; (8018084 <dhcp_handle_nak+0x30>)
801806e: 4905 ldr r1, [pc, #20] ; (8018084 <dhcp_handle_nak+0x30>)
8018070: 6878 ldr r0, [r7, #4]
8018072: f7f9 f82f bl 80110d4 <netif_set_addr>
/* We can immediately restart discovery */
dhcp_discover(netif);
8018076: 6878 ldr r0, [r7, #4]
8018078: f000 fc5c bl 8018934 <dhcp_discover>
}
801807c: bf00 nop
801807e: 3710 adds r7, #16
8018080: 46bd mov sp, r7
8018082: bd80 pop {r7, pc}
8018084: 080226e8 .word 0x080226e8
08018088 <dhcp_check>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_check(struct netif *netif)
{
8018088: b580 push {r7, lr}
801808a: b084 sub sp, #16
801808c: af00 add r7, sp, #0
801808e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018090: 687b ldr r3, [r7, #4]
8018092: 6a5b ldr r3, [r3, #36] ; 0x24
8018094: 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);
8018096: 2108 movs r1, #8
8018098: 68f8 ldr r0, [r7, #12]
801809a: f001 f84f bl 801913c <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);
801809e: 68fb ldr r3, [r7, #12]
80180a0: 331c adds r3, #28
80180a2: 2200 movs r2, #0
80180a4: 4619 mov r1, r3
80180a6: 6878 ldr r0, [r7, #4]
80180a8: f002 fb4e bl 801a748 <etharp_query>
80180ac: 4603 mov r3, r0
80180ae: 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) {
80180b0: 68fb ldr r3, [r7, #12]
80180b2: 799b ldrb r3, [r3, #6]
80180b4: 2bff cmp r3, #255 ; 0xff
80180b6: d005 beq.n 80180c4 <dhcp_check+0x3c>
dhcp->tries++;
80180b8: 68fb ldr r3, [r7, #12]
80180ba: 799b ldrb r3, [r3, #6]
80180bc: 3301 adds r3, #1
80180be: b2da uxtb r2, r3
80180c0: 68fb ldr r3, [r7, #12]
80180c2: 719a strb r2, [r3, #6]
}
msecs = 500;
80180c4: f44f 73fa mov.w r3, #500 ; 0x1f4
80180c8: 813b strh r3, [r7, #8]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
80180ca: 893b ldrh r3, [r7, #8]
80180cc: f203 13f3 addw r3, r3, #499 ; 0x1f3
80180d0: 4a06 ldr r2, [pc, #24] ; (80180ec <dhcp_check+0x64>)
80180d2: fb82 1203 smull r1, r2, r2, r3
80180d6: 1152 asrs r2, r2, #5
80180d8: 17db asrs r3, r3, #31
80180da: 1ad3 subs r3, r2, r3
80180dc: b29a uxth r2, r3
80180de: 68fb ldr r3, [r7, #12]
80180e0: 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));
}
80180e2: bf00 nop
80180e4: 3710 adds r7, #16
80180e6: 46bd mov sp, r7
80180e8: bd80 pop {r7, pc}
80180ea: bf00 nop
80180ec: 10624dd3 .word 0x10624dd3
080180f0 <dhcp_handle_offer>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in)
{
80180f0: b580 push {r7, lr}
80180f2: b084 sub sp, #16
80180f4: af00 add r7, sp, #0
80180f6: 6078 str r0, [r7, #4]
80180f8: 6039 str r1, [r7, #0]
struct dhcp *dhcp = netif_dhcp_data(netif);
80180fa: 687b ldr r3, [r7, #4]
80180fc: 6a5b ldr r3, [r3, #36] ; 0x24
80180fe: 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)) {
8018100: 4b0c ldr r3, [pc, #48] ; (8018134 <dhcp_handle_offer+0x44>)
8018102: 789b ldrb r3, [r3, #2]
8018104: 2b00 cmp r3, #0
8018106: d011 beq.n 801812c <dhcp_handle_offer+0x3c>
dhcp->request_timeout = 0; /* stop timer */
8018108: 68fb ldr r3, [r7, #12]
801810a: 2200 movs r2, #0
801810c: 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)));
801810e: 4b0a ldr r3, [pc, #40] ; (8018138 <dhcp_handle_offer+0x48>)
8018110: 689b ldr r3, [r3, #8]
8018112: 4618 mov r0, r3
8018114: f7f8 f949 bl 80103aa <lwip_htonl>
8018118: 4602 mov r2, r0
801811a: 68fb ldr r3, [r7, #12]
801811c: 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);
801811e: 683b ldr r3, [r7, #0]
8018120: 691a ldr r2, [r3, #16]
8018122: 68fb ldr r3, [r7, #12]
8018124: 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);
8018126: 6878 ldr r0, [r7, #4]
8018128: f000 f808 bl 801813c <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));
}
}
801812c: bf00 nop
801812e: 3710 adds r7, #16
8018130: 46bd mov sp, r7
8018132: bd80 pop {r7, pc}
8018134: 2000f804 .word 0x2000f804
8018138: 2000f80c .word 0x2000f80c
0801813c <dhcp_select>:
* @param netif the netif under DHCP control
* @return lwIP specific error (see error.h)
*/
static err_t
dhcp_select(struct netif *netif)
{
801813c: b5b0 push {r4, r5, r7, lr}
801813e: b08a sub sp, #40 ; 0x28
8018140: af02 add r7, sp, #8
8018142: 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;);
8018144: 687b ldr r3, [r7, #4]
8018146: 2b00 cmp r3, #0
8018148: d109 bne.n 801815e <dhcp_select+0x22>
801814a: 4b71 ldr r3, [pc, #452] ; (8018310 <dhcp_select+0x1d4>)
801814c: f240 1277 movw r2, #375 ; 0x177
8018150: 4970 ldr r1, [pc, #448] ; (8018314 <dhcp_select+0x1d8>)
8018152: 4871 ldr r0, [pc, #452] ; (8018318 <dhcp_select+0x1dc>)
8018154: f004 f9f8 bl 801c548 <iprintf>
8018158: f06f 030f mvn.w r3, #15
801815c: e0d3 b.n 8018306 <dhcp_select+0x1ca>
dhcp = netif_dhcp_data(netif);
801815e: 687b ldr r3, [r7, #4]
8018160: 6a5b ldr r3, [r3, #36] ; 0x24
8018162: 61bb str r3, [r7, #24]
LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
8018164: 69bb ldr r3, [r7, #24]
8018166: 2b00 cmp r3, #0
8018168: d109 bne.n 801817e <dhcp_select+0x42>
801816a: 4b69 ldr r3, [pc, #420] ; (8018310 <dhcp_select+0x1d4>)
801816c: f240 1279 movw r2, #377 ; 0x179
8018170: 496a ldr r1, [pc, #424] ; (801831c <dhcp_select+0x1e0>)
8018172: 4869 ldr r0, [pc, #420] ; (8018318 <dhcp_select+0x1dc>)
8018174: f004 f9e8 bl 801c548 <iprintf>
8018178: f06f 0305 mvn.w r3, #5
801817c: e0c3 b.n 8018306 <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);
801817e: 2101 movs r1, #1
8018180: 69b8 ldr r0, [r7, #24]
8018182: f000 ffdb bl 801913c <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
8018186: f107 030c add.w r3, r7, #12
801818a: 2203 movs r2, #3
801818c: 69b9 ldr r1, [r7, #24]
801818e: 6878 ldr r0, [r7, #4]
8018190: f001 fc5e bl 8019a50 <dhcp_create_msg>
8018194: 6178 str r0, [r7, #20]
if (p_out != NULL) {
8018196: 697b ldr r3, [r7, #20]
8018198: 2b00 cmp r3, #0
801819a: f000 8085 beq.w 80182a8 <dhcp_select+0x16c>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
801819e: 697b ldr r3, [r7, #20]
80181a0: 685b ldr r3, [r3, #4]
80181a2: 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);
80181a4: 89b8 ldrh r0, [r7, #12]
80181a6: 693b ldr r3, [r7, #16]
80181a8: f103 01f0 add.w r1, r3, #240 ; 0xf0
80181ac: 2302 movs r3, #2
80181ae: 2239 movs r2, #57 ; 0x39
80181b0: f000 ffde bl 8019170 <dhcp_option>
80181b4: 4603 mov r3, r0
80181b6: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
80181b8: 89b8 ldrh r0, [r7, #12]
80181ba: 693b ldr r3, [r7, #16]
80181bc: f103 01f0 add.w r1, r3, #240 ; 0xf0
80181c0: 687b ldr r3, [r7, #4]
80181c2: 8d1b ldrh r3, [r3, #40] ; 0x28
80181c4: 461a mov r2, r3
80181c6: f001 f82d bl 8019224 <dhcp_option_short>
80181ca: 4603 mov r3, r0
80181cc: 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);
80181ce: 89b8 ldrh r0, [r7, #12]
80181d0: 693b ldr r3, [r7, #16]
80181d2: f103 01f0 add.w r1, r3, #240 ; 0xf0
80181d6: 2304 movs r3, #4
80181d8: 2232 movs r2, #50 ; 0x32
80181da: f000 ffc9 bl 8019170 <dhcp_option>
80181de: 4603 mov r3, r0
80181e0: 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)));
80181e2: 89bc ldrh r4, [r7, #12]
80181e4: 693b ldr r3, [r7, #16]
80181e6: f103 05f0 add.w r5, r3, #240 ; 0xf0
80181ea: 69bb ldr r3, [r7, #24]
80181ec: 69db ldr r3, [r3, #28]
80181ee: 4618 mov r0, r3
80181f0: f7f8 f8db bl 80103aa <lwip_htonl>
80181f4: 4603 mov r3, r0
80181f6: 461a mov r2, r3
80181f8: 4629 mov r1, r5
80181fa: 4620 mov r0, r4
80181fc: f001 f844 bl 8019288 <dhcp_option_long>
8018200: 4603 mov r3, r0
8018202: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
8018204: 89b8 ldrh r0, [r7, #12]
8018206: 693b ldr r3, [r7, #16]
8018208: f103 01f0 add.w r1, r3, #240 ; 0xf0
801820c: 2304 movs r3, #4
801820e: 2236 movs r2, #54 ; 0x36
8018210: f000 ffae bl 8019170 <dhcp_option>
8018214: 4603 mov r3, r0
8018216: 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))));
8018218: 89bc ldrh r4, [r7, #12]
801821a: 693b ldr r3, [r7, #16]
801821c: f103 05f0 add.w r5, r3, #240 ; 0xf0
8018220: 69bb ldr r3, [r7, #24]
8018222: 699b ldr r3, [r3, #24]
8018224: 4618 mov r0, r3
8018226: f7f8 f8c0 bl 80103aa <lwip_htonl>
801822a: 4603 mov r3, r0
801822c: 461a mov r2, r3
801822e: 4629 mov r1, r5
8018230: 4620 mov r0, r4
8018232: f001 f829 bl 8019288 <dhcp_option_long>
8018236: 4603 mov r3, r0
8018238: 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));
801823a: 89b8 ldrh r0, [r7, #12]
801823c: 693b ldr r3, [r7, #16]
801823e: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018242: 2303 movs r3, #3
8018244: 2237 movs r2, #55 ; 0x37
8018246: f000 ff93 bl 8019170 <dhcp_option>
801824a: 4603 mov r3, r0
801824c: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
801824e: 2300 movs r3, #0
8018250: 77bb strb r3, [r7, #30]
8018252: e00e b.n 8018272 <dhcp_select+0x136>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
8018254: 89b8 ldrh r0, [r7, #12]
8018256: 693b ldr r3, [r7, #16]
8018258: f103 01f0 add.w r1, r3, #240 ; 0xf0
801825c: 7fbb ldrb r3, [r7, #30]
801825e: 4a30 ldr r2, [pc, #192] ; (8018320 <dhcp_select+0x1e4>)
8018260: 5cd3 ldrb r3, [r2, r3]
8018262: 461a mov r2, r3
8018264: f000 ffb8 bl 80191d8 <dhcp_option_byte>
8018268: 4603 mov r3, r0
801826a: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
801826c: 7fbb ldrb r3, [r7, #30]
801826e: 3301 adds r3, #1
8018270: 77bb strb r3, [r7, #30]
8018272: 7fbb ldrb r3, [r7, #30]
8018274: 2b02 cmp r3, #2
8018276: d9ed bls.n 8018254 <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);
8018278: 89b8 ldrh r0, [r7, #12]
801827a: 693b ldr r3, [r7, #16]
801827c: 33f0 adds r3, #240 ; 0xf0
801827e: 697a ldr r2, [r7, #20]
8018280: 4619 mov r1, r3
8018282: f001 fcbb bl 8019bfc <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);
8018286: 4b27 ldr r3, [pc, #156] ; (8018324 <dhcp_select+0x1e8>)
8018288: 6818 ldr r0, [r3, #0]
801828a: 4b27 ldr r3, [pc, #156] ; (8018328 <dhcp_select+0x1ec>)
801828c: 9301 str r3, [sp, #4]
801828e: 687b ldr r3, [r7, #4]
8018290: 9300 str r3, [sp, #0]
8018292: 2343 movs r3, #67 ; 0x43
8018294: 4a25 ldr r2, [pc, #148] ; (801832c <dhcp_select+0x1f0>)
8018296: 6979 ldr r1, [r7, #20]
8018298: f7ff fbda bl 8017a50 <udp_sendto_if_src>
801829c: 4603 mov r3, r0
801829e: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
80182a0: 6978 ldr r0, [r7, #20]
80182a2: f7f9 fc21 bl 8011ae8 <pbuf_free>
80182a6: e001 b.n 80182ac <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;
80182a8: 23ff movs r3, #255 ; 0xff
80182aa: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
80182ac: 69bb ldr r3, [r7, #24]
80182ae: 799b ldrb r3, [r3, #6]
80182b0: 2bff cmp r3, #255 ; 0xff
80182b2: d005 beq.n 80182c0 <dhcp_select+0x184>
dhcp->tries++;
80182b4: 69bb ldr r3, [r7, #24]
80182b6: 799b ldrb r3, [r3, #6]
80182b8: 3301 adds r3, #1
80182ba: b2da uxtb r2, r3
80182bc: 69bb ldr r3, [r7, #24]
80182be: 719a strb r2, [r3, #6]
}
msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
80182c0: 69bb ldr r3, [r7, #24]
80182c2: 799b ldrb r3, [r3, #6]
80182c4: 2b05 cmp r3, #5
80182c6: d80d bhi.n 80182e4 <dhcp_select+0x1a8>
80182c8: 69bb ldr r3, [r7, #24]
80182ca: 799b ldrb r3, [r3, #6]
80182cc: 461a mov r2, r3
80182ce: 2301 movs r3, #1
80182d0: 4093 lsls r3, r2
80182d2: b29b uxth r3, r3
80182d4: 461a mov r2, r3
80182d6: 0152 lsls r2, r2, #5
80182d8: 1ad2 subs r2, r2, r3
80182da: 0092 lsls r2, r2, #2
80182dc: 4413 add r3, r2
80182de: 00db lsls r3, r3, #3
80182e0: b29b uxth r3, r3
80182e2: e001 b.n 80182e8 <dhcp_select+0x1ac>
80182e4: f64e 2360 movw r3, #60000 ; 0xea60
80182e8: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
80182ea: 89fb ldrh r3, [r7, #14]
80182ec: f203 13f3 addw r3, r3, #499 ; 0x1f3
80182f0: 4a0f ldr r2, [pc, #60] ; (8018330 <dhcp_select+0x1f4>)
80182f2: fb82 1203 smull r1, r2, r2, r3
80182f6: 1152 asrs r2, r2, #5
80182f8: 17db asrs r3, r3, #31
80182fa: 1ad3 subs r3, r2, r3
80182fc: b29a uxth r2, r3
80182fe: 69bb ldr r3, [r7, #24]
8018300: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs));
return result;
8018302: f997 301f ldrsb.w r3, [r7, #31]
}
8018306: 4618 mov r0, r3
8018308: 3720 adds r7, #32
801830a: 46bd mov sp, r7
801830c: bdb0 pop {r4, r5, r7, pc}
801830e: bf00 nop
8018310: 0801fc18 .word 0x0801fc18
8018314: 0801fcc4 .word 0x0801fcc4
8018318: 0801fc78 .word 0x0801fc78
801831c: 0801fce0 .word 0x0801fce0
8018320: 2000006c .word 0x2000006c
8018324: 20008758 .word 0x20008758
8018328: 080226e8 .word 0x080226e8
801832c: 080226ec .word 0x080226ec
8018330: 10624dd3 .word 0x10624dd3
08018334 <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)
{
8018334: b580 push {r7, lr}
8018336: b082 sub sp, #8
8018338: 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) {
801833a: 4b27 ldr r3, [pc, #156] ; (80183d8 <dhcp_coarse_tmr+0xa4>)
801833c: 681b ldr r3, [r3, #0]
801833e: 607b str r3, [r7, #4]
8018340: e042 b.n 80183c8 <dhcp_coarse_tmr+0x94>
/* only act on DHCP configured interfaces */
struct dhcp *dhcp = netif_dhcp_data(netif);
8018342: 687b ldr r3, [r7, #4]
8018344: 6a5b ldr r3, [r3, #36] ; 0x24
8018346: 603b str r3, [r7, #0]
if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) {
8018348: 683b ldr r3, [r7, #0]
801834a: 2b00 cmp r3, #0
801834c: d039 beq.n 80183c2 <dhcp_coarse_tmr+0x8e>
801834e: 683b ldr r3, [r7, #0]
8018350: 795b ldrb r3, [r3, #5]
8018352: 2b00 cmp r3, #0
8018354: d035 beq.n 80183c2 <dhcp_coarse_tmr+0x8e>
/* compare lease time to expire timeout */
if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) {
8018356: 683b ldr r3, [r7, #0]
8018358: 8a9b ldrh r3, [r3, #20]
801835a: 2b00 cmp r3, #0
801835c: d012 beq.n 8018384 <dhcp_coarse_tmr+0x50>
801835e: 683b ldr r3, [r7, #0]
8018360: 8a5b ldrh r3, [r3, #18]
8018362: 3301 adds r3, #1
8018364: b29a uxth r2, r3
8018366: 683b ldr r3, [r7, #0]
8018368: 825a strh r2, [r3, #18]
801836a: 683b ldr r3, [r7, #0]
801836c: 8a5a ldrh r2, [r3, #18]
801836e: 683b ldr r3, [r7, #0]
8018370: 8a9b ldrh r3, [r3, #20]
8018372: 429a cmp r2, r3
8018374: d106 bne.n 8018384 <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);
8018376: 6878 ldr r0, [r7, #4]
8018378: f000 fe46 bl 8019008 <dhcp_release_and_stop>
dhcp_start(netif);
801837c: 6878 ldr r0, [r7, #4]
801837e: f000 f96b bl 8018658 <dhcp_start>
8018382: e01e b.n 80183c2 <dhcp_coarse_tmr+0x8e>
/* timer is active (non zero), and triggers (zeroes) now? */
} else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) {
8018384: 683b ldr r3, [r7, #0]
8018386: 8a1b ldrh r3, [r3, #16]
8018388: 2b00 cmp r3, #0
801838a: d00b beq.n 80183a4 <dhcp_coarse_tmr+0x70>
801838c: 683b ldr r3, [r7, #0]
801838e: 8a1b ldrh r3, [r3, #16]
8018390: 1e5a subs r2, r3, #1
8018392: b291 uxth r1, r2
8018394: 683a ldr r2, [r7, #0]
8018396: 8211 strh r1, [r2, #16]
8018398: 2b01 cmp r3, #1
801839a: d103 bne.n 80183a4 <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);
801839c: 6878 ldr r0, [r7, #4]
801839e: f000 f8c7 bl 8018530 <dhcp_t2_timeout>
80183a2: e00e b.n 80183c2 <dhcp_coarse_tmr+0x8e>
/* timer is active (non zero), and triggers (zeroes) now */
} else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) {
80183a4: 683b ldr r3, [r7, #0]
80183a6: 89db ldrh r3, [r3, #14]
80183a8: 2b00 cmp r3, #0
80183aa: d00a beq.n 80183c2 <dhcp_coarse_tmr+0x8e>
80183ac: 683b ldr r3, [r7, #0]
80183ae: 89db ldrh r3, [r3, #14]
80183b0: 1e5a subs r2, r3, #1
80183b2: b291 uxth r1, r2
80183b4: 683a ldr r2, [r7, #0]
80183b6: 81d1 strh r1, [r2, #14]
80183b8: 2b01 cmp r3, #1
80183ba: d102 bne.n 80183c2 <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);
80183bc: 6878 ldr r0, [r7, #4]
80183be: f000 f888 bl 80184d2 <dhcp_t1_timeout>
NETIF_FOREACH(netif) {
80183c2: 687b ldr r3, [r7, #4]
80183c4: 681b ldr r3, [r3, #0]
80183c6: 607b str r3, [r7, #4]
80183c8: 687b ldr r3, [r7, #4]
80183ca: 2b00 cmp r3, #0
80183cc: d1b9 bne.n 8018342 <dhcp_coarse_tmr+0xe>
}
}
}
}
80183ce: bf00 nop
80183d0: 3708 adds r7, #8
80183d2: 46bd mov sp, r7
80183d4: bd80 pop {r7, pc}
80183d6: bf00 nop
80183d8: 2000f7d8 .word 0x2000f7d8
080183dc <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)
{
80183dc: b580 push {r7, lr}
80183de: b082 sub sp, #8
80183e0: af00 add r7, sp, #0
struct netif *netif;
/* loop through netif's */
NETIF_FOREACH(netif) {
80183e2: 4b16 ldr r3, [pc, #88] ; (801843c <dhcp_fine_tmr+0x60>)
80183e4: 681b ldr r3, [r3, #0]
80183e6: 607b str r3, [r7, #4]
80183e8: e020 b.n 801842c <dhcp_fine_tmr+0x50>
struct dhcp *dhcp = netif_dhcp_data(netif);
80183ea: 687b ldr r3, [r7, #4]
80183ec: 6a5b ldr r3, [r3, #36] ; 0x24
80183ee: 603b str r3, [r7, #0]
/* only act on DHCP configured interfaces */
if (dhcp != NULL) {
80183f0: 683b ldr r3, [r7, #0]
80183f2: 2b00 cmp r3, #0
80183f4: d017 beq.n 8018426 <dhcp_fine_tmr+0x4a>
/* timer is active (non zero), and is about to trigger now */
if (dhcp->request_timeout > 1) {
80183f6: 683b ldr r3, [r7, #0]
80183f8: 891b ldrh r3, [r3, #8]
80183fa: 2b01 cmp r3, #1
80183fc: d906 bls.n 801840c <dhcp_fine_tmr+0x30>
dhcp->request_timeout--;
80183fe: 683b ldr r3, [r7, #0]
8018400: 891b ldrh r3, [r3, #8]
8018402: 3b01 subs r3, #1
8018404: b29a uxth r2, r3
8018406: 683b ldr r3, [r7, #0]
8018408: 811a strh r2, [r3, #8]
801840a: e00c b.n 8018426 <dhcp_fine_tmr+0x4a>
} else if (dhcp->request_timeout == 1) {
801840c: 683b ldr r3, [r7, #0]
801840e: 891b ldrh r3, [r3, #8]
8018410: 2b01 cmp r3, #1
8018412: d108 bne.n 8018426 <dhcp_fine_tmr+0x4a>
dhcp->request_timeout--;
8018414: 683b ldr r3, [r7, #0]
8018416: 891b ldrh r3, [r3, #8]
8018418: 3b01 subs r3, #1
801841a: b29a uxth r2, r3
801841c: 683b ldr r3, [r7, #0]
801841e: 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);
8018420: 6878 ldr r0, [r7, #4]
8018422: f000 f80d bl 8018440 <dhcp_timeout>
NETIF_FOREACH(netif) {
8018426: 687b ldr r3, [r7, #4]
8018428: 681b ldr r3, [r3, #0]
801842a: 607b str r3, [r7, #4]
801842c: 687b ldr r3, [r7, #4]
801842e: 2b00 cmp r3, #0
8018430: d1db bne.n 80183ea <dhcp_fine_tmr+0xe>
}
}
}
}
8018432: bf00 nop
8018434: 3708 adds r7, #8
8018436: 46bd mov sp, r7
8018438: bd80 pop {r7, pc}
801843a: bf00 nop
801843c: 2000f7d8 .word 0x2000f7d8
08018440 <dhcp_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_timeout(struct netif *netif)
{
8018440: b580 push {r7, lr}
8018442: b084 sub sp, #16
8018444: af00 add r7, sp, #0
8018446: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018448: 687b ldr r3, [r7, #4]
801844a: 6a5b ldr r3, [r3, #36] ; 0x24
801844c: 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)) {
801844e: 68fb ldr r3, [r7, #12]
8018450: 795b ldrb r3, [r3, #5]
8018452: 2b0c cmp r3, #12
8018454: d003 beq.n 801845e <dhcp_timeout+0x1e>
8018456: 68fb ldr r3, [r7, #12]
8018458: 795b ldrb r3, [r3, #5]
801845a: 2b06 cmp r3, #6
801845c: d103 bne.n 8018466 <dhcp_timeout+0x26>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n"));
dhcp_discover(netif);
801845e: 6878 ldr r0, [r7, #4]
8018460: f000 fa68 bl 8018934 <dhcp_discover>
dhcp_reboot(netif);
} else {
dhcp_discover(netif);
}
}
}
8018464: e031 b.n 80184ca <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_REQUESTING) {
8018466: 68fb ldr r3, [r7, #12]
8018468: 795b ldrb r3, [r3, #5]
801846a: 2b01 cmp r3, #1
801846c: d10e bne.n 801848c <dhcp_timeout+0x4c>
if (dhcp->tries <= 5) {
801846e: 68fb ldr r3, [r7, #12]
8018470: 799b ldrb r3, [r3, #6]
8018472: 2b05 cmp r3, #5
8018474: d803 bhi.n 801847e <dhcp_timeout+0x3e>
dhcp_select(netif);
8018476: 6878 ldr r0, [r7, #4]
8018478: f7ff fe60 bl 801813c <dhcp_select>
}
801847c: e025 b.n 80184ca <dhcp_timeout+0x8a>
dhcp_release_and_stop(netif);
801847e: 6878 ldr r0, [r7, #4]
8018480: f000 fdc2 bl 8019008 <dhcp_release_and_stop>
dhcp_start(netif);
8018484: 6878 ldr r0, [r7, #4]
8018486: f000 f8e7 bl 8018658 <dhcp_start>
}
801848a: e01e b.n 80184ca <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_CHECKING) {
801848c: 68fb ldr r3, [r7, #12]
801848e: 795b ldrb r3, [r3, #5]
8018490: 2b08 cmp r3, #8
8018492: d10b bne.n 80184ac <dhcp_timeout+0x6c>
if (dhcp->tries <= 1) {
8018494: 68fb ldr r3, [r7, #12]
8018496: 799b ldrb r3, [r3, #6]
8018498: 2b01 cmp r3, #1
801849a: d803 bhi.n 80184a4 <dhcp_timeout+0x64>
dhcp_check(netif);
801849c: 6878 ldr r0, [r7, #4]
801849e: f7ff fdf3 bl 8018088 <dhcp_check>
}
80184a2: e012 b.n 80184ca <dhcp_timeout+0x8a>
dhcp_bind(netif);
80184a4: 6878 ldr r0, [r7, #4]
80184a6: f000 fae7 bl 8018a78 <dhcp_bind>
}
80184aa: e00e b.n 80184ca <dhcp_timeout+0x8a>
} else if (dhcp->state == DHCP_STATE_REBOOTING) {
80184ac: 68fb ldr r3, [r7, #12]
80184ae: 795b ldrb r3, [r3, #5]
80184b0: 2b03 cmp r3, #3
80184b2: d10a bne.n 80184ca <dhcp_timeout+0x8a>
if (dhcp->tries < REBOOT_TRIES) {
80184b4: 68fb ldr r3, [r7, #12]
80184b6: 799b ldrb r3, [r3, #6]
80184b8: 2b01 cmp r3, #1
80184ba: d803 bhi.n 80184c4 <dhcp_timeout+0x84>
dhcp_reboot(netif);
80184bc: 6878 ldr r0, [r7, #4]
80184be: f000 fced bl 8018e9c <dhcp_reboot>
}
80184c2: e002 b.n 80184ca <dhcp_timeout+0x8a>
dhcp_discover(netif);
80184c4: 6878 ldr r0, [r7, #4]
80184c6: f000 fa35 bl 8018934 <dhcp_discover>
}
80184ca: bf00 nop
80184cc: 3710 adds r7, #16
80184ce: 46bd mov sp, r7
80184d0: bd80 pop {r7, pc}
080184d2 <dhcp_t1_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_t1_timeout(struct netif *netif)
{
80184d2: b580 push {r7, lr}
80184d4: b084 sub sp, #16
80184d6: af00 add r7, sp, #0
80184d8: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
80184da: 687b ldr r3, [r7, #4]
80184dc: 6a5b ldr r3, [r3, #36] ; 0x24
80184de: 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) ||
80184e0: 68fb ldr r3, [r7, #12]
80184e2: 795b ldrb r3, [r3, #5]
80184e4: 2b01 cmp r3, #1
80184e6: d007 beq.n 80184f8 <dhcp_t1_timeout+0x26>
80184e8: 68fb ldr r3, [r7, #12]
80184ea: 795b ldrb r3, [r3, #5]
80184ec: 2b0a cmp r3, #10
80184ee: d003 beq.n 80184f8 <dhcp_t1_timeout+0x26>
(dhcp->state == DHCP_STATE_RENEWING)) {
80184f0: 68fb ldr r3, [r7, #12]
80184f2: 795b ldrb r3, [r3, #5]
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
80184f4: 2b05 cmp r3, #5
80184f6: d117 bne.n 8018528 <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);
80184f8: 6878 ldr r0, [r7, #4]
80184fa: f000 fb97 bl 8018c2c <dhcp_renew>
/* Calculate next timeout */
if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
80184fe: 68fb ldr r3, [r7, #12]
8018500: 899b ldrh r3, [r3, #12]
8018502: 461a mov r2, r3
8018504: 68fb ldr r3, [r7, #12]
8018506: 8a5b ldrh r3, [r3, #18]
8018508: 1ad3 subs r3, r2, r3
801850a: 2b01 cmp r3, #1
801850c: dd0c ble.n 8018528 <dhcp_t1_timeout+0x56>
dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
801850e: 68fb ldr r3, [r7, #12]
8018510: 899b ldrh r3, [r3, #12]
8018512: 461a mov r2, r3
8018514: 68fb ldr r3, [r7, #12]
8018516: 8a5b ldrh r3, [r3, #18]
8018518: 1ad3 subs r3, r2, r3
801851a: 2b00 cmp r3, #0
801851c: da00 bge.n 8018520 <dhcp_t1_timeout+0x4e>
801851e: 3301 adds r3, #1
8018520: 105b asrs r3, r3, #1
8018522: b29a uxth r2, r3
8018524: 68fb ldr r3, [r7, #12]
8018526: 81da strh r2, [r3, #14]
}
}
}
8018528: bf00 nop
801852a: 3710 adds r7, #16
801852c: 46bd mov sp, r7
801852e: bd80 pop {r7, pc}
08018530 <dhcp_t2_timeout>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_t2_timeout(struct netif *netif)
{
8018530: b580 push {r7, lr}
8018532: b084 sub sp, #16
8018534: af00 add r7, sp, #0
8018536: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018538: 687b ldr r3, [r7, #4]
801853a: 6a5b ldr r3, [r3, #36] ; 0x24
801853c: 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) ||
801853e: 68fb ldr r3, [r7, #12]
8018540: 795b ldrb r3, [r3, #5]
8018542: 2b01 cmp r3, #1
8018544: d00b beq.n 801855e <dhcp_t2_timeout+0x2e>
8018546: 68fb ldr r3, [r7, #12]
8018548: 795b ldrb r3, [r3, #5]
801854a: 2b0a cmp r3, #10
801854c: d007 beq.n 801855e <dhcp_t2_timeout+0x2e>
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
801854e: 68fb ldr r3, [r7, #12]
8018550: 795b ldrb r3, [r3, #5]
if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
8018552: 2b05 cmp r3, #5
8018554: d003 beq.n 801855e <dhcp_t2_timeout+0x2e>
(dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
8018556: 68fb ldr r3, [r7, #12]
8018558: 795b ldrb r3, [r3, #5]
801855a: 2b04 cmp r3, #4
801855c: d117 bne.n 801858e <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);
801855e: 6878 ldr r0, [r7, #4]
8018560: f000 fc00 bl 8018d64 <dhcp_rebind>
/* Calculate next timeout */
if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
8018564: 68fb ldr r3, [r7, #12]
8018566: 8a9b ldrh r3, [r3, #20]
8018568: 461a mov r2, r3
801856a: 68fb ldr r3, [r7, #12]
801856c: 8a5b ldrh r3, [r3, #18]
801856e: 1ad3 subs r3, r2, r3
8018570: 2b01 cmp r3, #1
8018572: dd0c ble.n 801858e <dhcp_t2_timeout+0x5e>
dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
8018574: 68fb ldr r3, [r7, #12]
8018576: 8a9b ldrh r3, [r3, #20]
8018578: 461a mov r2, r3
801857a: 68fb ldr r3, [r7, #12]
801857c: 8a5b ldrh r3, [r3, #18]
801857e: 1ad3 subs r3, r2, r3
8018580: 2b00 cmp r3, #0
8018582: da00 bge.n 8018586 <dhcp_t2_timeout+0x56>
8018584: 3301 adds r3, #1
8018586: 105b asrs r3, r3, #1
8018588: b29a uxth r2, r3
801858a: 68fb ldr r3, [r7, #12]
801858c: 821a strh r2, [r3, #16]
}
}
}
801858e: bf00 nop
8018590: 3710 adds r7, #16
8018592: 46bd mov sp, r7
8018594: bd80 pop {r7, pc}
...
08018598 <dhcp_handle_ack>:
*
* @param netif the netif under DHCP control
*/
static void
dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in)
{
8018598: b580 push {r7, lr}
801859a: b084 sub sp, #16
801859c: af00 add r7, sp, #0
801859e: 6078 str r0, [r7, #4]
80185a0: 6039 str r1, [r7, #0]
struct dhcp *dhcp = netif_dhcp_data(netif);
80185a2: 687b ldr r3, [r7, #4]
80185a4: 6a5b ldr r3, [r3, #36] ; 0x24
80185a6: 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);
80185a8: 68fb ldr r3, [r7, #12]
80185aa: 2200 movs r2, #0
80185ac: 621a str r2, [r3, #32]
ip4_addr_set_zero(&dhcp->offered_gw_addr);
80185ae: 68fb ldr r3, [r7, #12]
80185b0: 2200 movs r2, #0
80185b2: 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)) {
80185b4: 4b26 ldr r3, [pc, #152] ; (8018650 <dhcp_handle_ack+0xb8>)
80185b6: 78db ldrb r3, [r3, #3]
80185b8: 2b00 cmp r3, #0
80185ba: d003 beq.n 80185c4 <dhcp_handle_ack+0x2c>
/* remember offered lease time */
dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME);
80185bc: 4b25 ldr r3, [pc, #148] ; (8018654 <dhcp_handle_ack+0xbc>)
80185be: 68da ldr r2, [r3, #12]
80185c0: 68fb ldr r3, [r7, #12]
80185c2: 629a str r2, [r3, #40] ; 0x28
}
/* renewal period given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) {
80185c4: 4b22 ldr r3, [pc, #136] ; (8018650 <dhcp_handle_ack+0xb8>)
80185c6: 791b ldrb r3, [r3, #4]
80185c8: 2b00 cmp r3, #0
80185ca: d004 beq.n 80185d6 <dhcp_handle_ack+0x3e>
/* remember given renewal period */
dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1);
80185cc: 4b21 ldr r3, [pc, #132] ; (8018654 <dhcp_handle_ack+0xbc>)
80185ce: 691a ldr r2, [r3, #16]
80185d0: 68fb ldr r3, [r7, #12]
80185d2: 62da str r2, [r3, #44] ; 0x2c
80185d4: e004 b.n 80185e0 <dhcp_handle_ack+0x48>
} else {
/* calculate safe periods for renewal */
dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2;
80185d6: 68fb ldr r3, [r7, #12]
80185d8: 6a9b ldr r3, [r3, #40] ; 0x28
80185da: 085a lsrs r2, r3, #1
80185dc: 68fb ldr r3, [r7, #12]
80185de: 62da str r2, [r3, #44] ; 0x2c
}
/* renewal period given? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) {
80185e0: 4b1b ldr r3, [pc, #108] ; (8018650 <dhcp_handle_ack+0xb8>)
80185e2: 795b ldrb r3, [r3, #5]
80185e4: 2b00 cmp r3, #0
80185e6: d004 beq.n 80185f2 <dhcp_handle_ack+0x5a>
/* remember given rebind period */
dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2);
80185e8: 4b1a ldr r3, [pc, #104] ; (8018654 <dhcp_handle_ack+0xbc>)
80185ea: 695a ldr r2, [r3, #20]
80185ec: 68fb ldr r3, [r7, #12]
80185ee: 631a str r2, [r3, #48] ; 0x30
80185f0: e007 b.n 8018602 <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;
80185f2: 68fb ldr r3, [r7, #12]
80185f4: 6a9a ldr r2, [r3, #40] ; 0x28
80185f6: 4613 mov r3, r2
80185f8: 00db lsls r3, r3, #3
80185fa: 1a9b subs r3, r3, r2
80185fc: 08da lsrs r2, r3, #3
80185fe: 68fb ldr r3, [r7, #12]
8018600: 631a str r2, [r3, #48] ; 0x30
}
/* (y)our internet address */
ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
8018602: 683b ldr r3, [r7, #0]
8018604: 691a ldr r2, [r3, #16]
8018606: 68fb ldr r3, [r7, #12]
8018608: 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)) {
801860a: 4b11 ldr r3, [pc, #68] ; (8018650 <dhcp_handle_ack+0xb8>)
801860c: 799b ldrb r3, [r3, #6]
801860e: 2b00 cmp r3, #0
8018610: d00b beq.n 801862a <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)));
8018612: 4b10 ldr r3, [pc, #64] ; (8018654 <dhcp_handle_ack+0xbc>)
8018614: 699b ldr r3, [r3, #24]
8018616: 4618 mov r0, r3
8018618: f7f7 fec7 bl 80103aa <lwip_htonl>
801861c: 4602 mov r2, r0
801861e: 68fb ldr r3, [r7, #12]
8018620: 621a str r2, [r3, #32]
dhcp->subnet_mask_given = 1;
8018622: 68fb ldr r3, [r7, #12]
8018624: 2201 movs r2, #1
8018626: 71da strb r2, [r3, #7]
8018628: e002 b.n 8018630 <dhcp_handle_ack+0x98>
} else {
dhcp->subnet_mask_given = 0;
801862a: 68fb ldr r3, [r7, #12]
801862c: 2200 movs r2, #0
801862e: 71da strb r2, [r3, #7]
}
/* gateway router */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) {
8018630: 4b07 ldr r3, [pc, #28] ; (8018650 <dhcp_handle_ack+0xb8>)
8018632: 79db ldrb r3, [r3, #7]
8018634: 2b00 cmp r3, #0
8018636: d007 beq.n 8018648 <dhcp_handle_ack+0xb0>
ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER)));
8018638: 4b06 ldr r3, [pc, #24] ; (8018654 <dhcp_handle_ack+0xbc>)
801863a: 69db ldr r3, [r3, #28]
801863c: 4618 mov r0, r3
801863e: f7f7 feb4 bl 80103aa <lwip_htonl>
8018642: 4602 mov r2, r0
8018644: 68fb ldr r3, [r7, #12]
8018646: 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 */
}
8018648: bf00 nop
801864a: 3710 adds r7, #16
801864c: 46bd mov sp, r7
801864e: bd80 pop {r7, pc}
8018650: 2000f804 .word 0x2000f804
8018654: 2000f80c .word 0x2000f80c
08018658 <dhcp_start>:
* - ERR_OK - No error
* - ERR_MEM - Out of memory
*/
err_t
dhcp_start(struct netif *netif)
{
8018658: b580 push {r7, lr}
801865a: b084 sub sp, #16
801865c: af00 add r7, sp, #0
801865e: 6078 str r0, [r7, #4]
struct dhcp *dhcp;
err_t result;
LWIP_ASSERT_CORE_LOCKED();
LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
8018660: 687b ldr r3, [r7, #4]
8018662: 2b00 cmp r3, #0
8018664: d109 bne.n 801867a <dhcp_start+0x22>
8018666: 4b37 ldr r3, [pc, #220] ; (8018744 <dhcp_start+0xec>)
8018668: f240 22e7 movw r2, #743 ; 0x2e7
801866c: 4936 ldr r1, [pc, #216] ; (8018748 <dhcp_start+0xf0>)
801866e: 4837 ldr r0, [pc, #220] ; (801874c <dhcp_start+0xf4>)
8018670: f003 ff6a bl 801c548 <iprintf>
8018674: f06f 030f mvn.w r3, #15
8018678: e060 b.n 801873c <dhcp_start+0xe4>
LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
801867a: 687b ldr r3, [r7, #4]
801867c: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8018680: f003 0301 and.w r3, r3, #1
8018684: 2b00 cmp r3, #0
8018686: d109 bne.n 801869c <dhcp_start+0x44>
8018688: 4b2e ldr r3, [pc, #184] ; (8018744 <dhcp_start+0xec>)
801868a: f44f 723a mov.w r2, #744 ; 0x2e8
801868e: 4930 ldr r1, [pc, #192] ; (8018750 <dhcp_start+0xf8>)
8018690: 482e ldr r0, [pc, #184] ; (801874c <dhcp_start+0xf4>)
8018692: f003 ff59 bl 801c548 <iprintf>
8018696: f06f 030f mvn.w r3, #15
801869a: e04f b.n 801873c <dhcp_start+0xe4>
dhcp = netif_dhcp_data(netif);
801869c: 687b ldr r3, [r7, #4]
801869e: 6a5b ldr r3, [r3, #36] ; 0x24
80186a0: 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) {
80186a2: 687b ldr r3, [r7, #4]
80186a4: 8d1b ldrh r3, [r3, #40] ; 0x28
80186a6: f5b3 7f10 cmp.w r3, #576 ; 0x240
80186aa: d202 bcs.n 80186b2 <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;
80186ac: f04f 33ff mov.w r3, #4294967295
80186b0: e044 b.n 801873c <dhcp_start+0xe4>
}
/* no DHCP client attached yet? */
if (dhcp == NULL) {
80186b2: 68fb ldr r3, [r7, #12]
80186b4: 2b00 cmp r3, #0
80186b6: d10d bne.n 80186d4 <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));
80186b8: 2034 movs r0, #52 ; 0x34
80186ba: f7f8 f995 bl 80109e8 <mem_malloc>
80186be: 60f8 str r0, [r7, #12]
if (dhcp == NULL) {
80186c0: 68fb ldr r3, [r7, #12]
80186c2: 2b00 cmp r3, #0
80186c4: d102 bne.n 80186cc <dhcp_start+0x74>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n"));
return ERR_MEM;
80186c6: f04f 33ff mov.w r3, #4294967295
80186ca: e037 b.n 801873c <dhcp_start+0xe4>
}
/* store this dhcp client in the netif */
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
80186cc: 687b ldr r3, [r7, #4]
80186ce: 68fa ldr r2, [r7, #12]
80186d0: 625a str r2, [r3, #36] ; 0x24
80186d2: e005 b.n 80186e0 <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) {
80186d4: 68fb ldr r3, [r7, #12]
80186d6: 791b ldrb r3, [r3, #4]
80186d8: 2b00 cmp r3, #0
80186da: d001 beq.n 80186e0 <dhcp_start+0x88>
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
80186dc: f7ff fc90 bl 8018000 <dhcp_dec_pcb_refcount>
}
/* dhcp is cleared below, no need to reset flag*/
}
/* clear data structure */
memset(dhcp, 0, sizeof(struct dhcp));
80186e0: 2234 movs r2, #52 ; 0x34
80186e2: 2100 movs r1, #0
80186e4: 68f8 ldr r0, [r7, #12]
80186e6: f003 ff26 bl 801c536 <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 */
80186ea: f7ff fc37 bl 8017f5c <dhcp_inc_pcb_refcount>
80186ee: 4603 mov r3, r0
80186f0: 2b00 cmp r3, #0
80186f2: d002 beq.n 80186fa <dhcp_start+0xa2>
return ERR_MEM;
80186f4: f04f 33ff mov.w r3, #4294967295
80186f8: e020 b.n 801873c <dhcp_start+0xe4>
}
dhcp->pcb_allocated = 1;
80186fa: 68fb ldr r3, [r7, #12]
80186fc: 2201 movs r2, #1
80186fe: 711a strb r2, [r3, #4]
if (!netif_is_link_up(netif)) {
8018700: 687b ldr r3, [r7, #4]
8018702: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8018706: f003 0304 and.w r3, r3, #4
801870a: 2b00 cmp r3, #0
801870c: d105 bne.n 801871a <dhcp_start+0xc2>
/* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */
dhcp_set_state(dhcp, DHCP_STATE_INIT);
801870e: 2102 movs r1, #2
8018710: 68f8 ldr r0, [r7, #12]
8018712: f000 fd13 bl 801913c <dhcp_set_state>
return ERR_OK;
8018716: 2300 movs r3, #0
8018718: e010 b.n 801873c <dhcp_start+0xe4>
}
/* (re)start the DHCP negotiation */
result = dhcp_discover(netif);
801871a: 6878 ldr r0, [r7, #4]
801871c: f000 f90a bl 8018934 <dhcp_discover>
8018720: 4603 mov r3, r0
8018722: 72fb strb r3, [r7, #11]
if (result != ERR_OK) {
8018724: f997 300b ldrsb.w r3, [r7, #11]
8018728: 2b00 cmp r3, #0
801872a: d005 beq.n 8018738 <dhcp_start+0xe0>
/* free resources allocated above */
dhcp_release_and_stop(netif);
801872c: 6878 ldr r0, [r7, #4]
801872e: f000 fc6b bl 8019008 <dhcp_release_and_stop>
return ERR_MEM;
8018732: f04f 33ff mov.w r3, #4294967295
8018736: e001 b.n 801873c <dhcp_start+0xe4>
}
return result;
8018738: f997 300b ldrsb.w r3, [r7, #11]
}
801873c: 4618 mov r0, r3
801873e: 3710 adds r7, #16
8018740: 46bd mov sp, r7
8018742: bd80 pop {r7, pc}
8018744: 0801fc18 .word 0x0801fc18
8018748: 0801fcfc .word 0x0801fcfc
801874c: 0801fc78 .word 0x0801fc78
8018750: 0801fd40 .word 0x0801fd40
08018754 <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)
{
8018754: b580 push {r7, lr}
8018756: b084 sub sp, #16
8018758: af00 add r7, sp, #0
801875a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
801875c: 687b ldr r3, [r7, #4]
801875e: 6a5b ldr r3, [r3, #36] ; 0x24
8018760: 60fb str r3, [r7, #12]
if (!dhcp) {
8018762: 68fb ldr r3, [r7, #12]
8018764: 2b00 cmp r3, #0
8018766: d037 beq.n 80187d8 <dhcp_network_changed+0x84>
return;
}
switch (dhcp->state) {
8018768: 68fb ldr r3, [r7, #12]
801876a: 795b ldrb r3, [r3, #5]
801876c: 2b0a cmp r3, #10
801876e: d820 bhi.n 80187b2 <dhcp_network_changed+0x5e>
8018770: a201 add r2, pc, #4 ; (adr r2, 8018778 <dhcp_network_changed+0x24>)
8018772: f852 f023 ldr.w pc, [r2, r3, lsl #2]
8018776: bf00 nop
8018778: 080187dd .word 0x080187dd
801877c: 080187b3 .word 0x080187b3
8018780: 080187b3 .word 0x080187b3
8018784: 080187a5 .word 0x080187a5
8018788: 080187a5 .word 0x080187a5
801878c: 080187a5 .word 0x080187a5
8018790: 080187b3 .word 0x080187b3
8018794: 080187b3 .word 0x080187b3
8018798: 080187b3 .word 0x080187b3
801879c: 080187b3 .word 0x080187b3
80187a0: 080187a5 .word 0x080187a5
case DHCP_STATE_REBINDING:
case DHCP_STATE_RENEWING:
case DHCP_STATE_BOUND:
case DHCP_STATE_REBOOTING:
dhcp->tries = 0;
80187a4: 68fb ldr r3, [r7, #12]
80187a6: 2200 movs r2, #0
80187a8: 719a strb r2, [r3, #6]
dhcp_reboot(netif);
80187aa: 6878 ldr r0, [r7, #4]
80187ac: f000 fb76 bl 8018e9c <dhcp_reboot>
break;
80187b0: e015 b.n 80187de <dhcp_network_changed+0x8a>
case DHCP_STATE_OFF:
/* stay off */
break;
default:
LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
80187b2: 68fb ldr r3, [r7, #12]
80187b4: 795b ldrb r3, [r3, #5]
80187b6: 2b0c cmp r3, #12
80187b8: d906 bls.n 80187c8 <dhcp_network_changed+0x74>
80187ba: 4b0a ldr r3, [pc, #40] ; (80187e4 <dhcp_network_changed+0x90>)
80187bc: f240 326d movw r2, #877 ; 0x36d
80187c0: 4909 ldr r1, [pc, #36] ; (80187e8 <dhcp_network_changed+0x94>)
80187c2: 480a ldr r0, [pc, #40] ; (80187ec <dhcp_network_changed+0x98>)
80187c4: f003 fec0 bl 801c548 <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;
80187c8: 68fb ldr r3, [r7, #12]
80187ca: 2200 movs r2, #0
80187cc: 719a strb r2, [r3, #6]
dhcp_discover(netif);
80187ce: 6878 ldr r0, [r7, #4]
80187d0: f000 f8b0 bl 8018934 <dhcp_discover>
break;
80187d4: bf00 nop
80187d6: e002 b.n 80187de <dhcp_network_changed+0x8a>
return;
80187d8: bf00 nop
80187da: e000 b.n 80187de <dhcp_network_changed+0x8a>
break;
80187dc: bf00 nop
}
}
80187de: 3710 adds r7, #16
80187e0: 46bd mov sp, r7
80187e2: bd80 pop {r7, pc}
80187e4: 0801fc18 .word 0x0801fc18
80187e8: 0801fd64 .word 0x0801fd64
80187ec: 0801fc78 .word 0x0801fc78
080187f0 <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)
{
80187f0: b580 push {r7, lr}
80187f2: b084 sub sp, #16
80187f4: af00 add r7, sp, #0
80187f6: 6078 str r0, [r7, #4]
80187f8: 6039 str r1, [r7, #0]
struct dhcp *dhcp;
LWIP_ERROR("netif != NULL", (netif != NULL), return;);
80187fa: 687b ldr r3, [r7, #4]
80187fc: 2b00 cmp r3, #0
80187fe: d107 bne.n 8018810 <dhcp_arp_reply+0x20>
8018800: 4b0e ldr r3, [pc, #56] ; (801883c <dhcp_arp_reply+0x4c>)
8018802: f240 328b movw r2, #907 ; 0x38b
8018806: 490e ldr r1, [pc, #56] ; (8018840 <dhcp_arp_reply+0x50>)
8018808: 480e ldr r0, [pc, #56] ; (8018844 <dhcp_arp_reply+0x54>)
801880a: f003 fe9d bl 801c548 <iprintf>
801880e: e012 b.n 8018836 <dhcp_arp_reply+0x46>
dhcp = netif_dhcp_data(netif);
8018810: 687b ldr r3, [r7, #4]
8018812: 6a5b ldr r3, [r3, #36] ; 0x24
8018814: 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)) {
8018816: 68fb ldr r3, [r7, #12]
8018818: 2b00 cmp r3, #0
801881a: d00c beq.n 8018836 <dhcp_arp_reply+0x46>
801881c: 68fb ldr r3, [r7, #12]
801881e: 795b ldrb r3, [r3, #5]
8018820: 2b08 cmp r3, #8
8018822: d108 bne.n 8018836 <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)) {
8018824: 683b ldr r3, [r7, #0]
8018826: 681a ldr r2, [r3, #0]
8018828: 68fb ldr r3, [r7, #12]
801882a: 69db ldr r3, [r3, #28]
801882c: 429a cmp r2, r3
801882e: d102 bne.n 8018836 <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);
8018830: 6878 ldr r0, [r7, #4]
8018832: f000 f809 bl 8018848 <dhcp_decline>
}
}
}
8018836: 3710 adds r7, #16
8018838: 46bd mov sp, r7
801883a: bd80 pop {r7, pc}
801883c: 0801fc18 .word 0x0801fc18
8018840: 0801fcfc .word 0x0801fcfc
8018844: 0801fc78 .word 0x0801fc78
08018848 <dhcp_decline>:
*
* @param netif the netif under DHCP control
*/
static err_t
dhcp_decline(struct netif *netif)
{
8018848: b5b0 push {r4, r5, r7, lr}
801884a: b08a sub sp, #40 ; 0x28
801884c: af02 add r7, sp, #8
801884e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018850: 687b ldr r3, [r7, #4]
8018852: 6a5b ldr r3, [r3, #36] ; 0x24
8018854: 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);
8018856: 210c movs r1, #12
8018858: 69b8 ldr r0, [r7, #24]
801885a: f000 fc6f bl 801913c <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len);
801885e: f107 030c add.w r3, r7, #12
8018862: 2204 movs r2, #4
8018864: 69b9 ldr r1, [r7, #24]
8018866: 6878 ldr r0, [r7, #4]
8018868: f001 f8f2 bl 8019a50 <dhcp_create_msg>
801886c: 6178 str r0, [r7, #20]
if (p_out != NULL) {
801886e: 697b ldr r3, [r7, #20]
8018870: 2b00 cmp r3, #0
8018872: d035 beq.n 80188e0 <dhcp_decline+0x98>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
8018874: 697b ldr r3, [r7, #20]
8018876: 685b ldr r3, [r3, #4]
8018878: 613b str r3, [r7, #16]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
801887a: 89b8 ldrh r0, [r7, #12]
801887c: 693b ldr r3, [r7, #16]
801887e: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018882: 2304 movs r3, #4
8018884: 2232 movs r2, #50 ; 0x32
8018886: f000 fc73 bl 8019170 <dhcp_option>
801888a: 4603 mov r3, r0
801888c: 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)));
801888e: 89bc ldrh r4, [r7, #12]
8018890: 693b ldr r3, [r7, #16]
8018892: f103 05f0 add.w r5, r3, #240 ; 0xf0
8018896: 69bb ldr r3, [r7, #24]
8018898: 69db ldr r3, [r3, #28]
801889a: 4618 mov r0, r3
801889c: f7f7 fd85 bl 80103aa <lwip_htonl>
80188a0: 4603 mov r3, r0
80188a2: 461a mov r2, r3
80188a4: 4629 mov r1, r5
80188a6: 4620 mov r0, r4
80188a8: f000 fcee bl 8019288 <dhcp_option_long>
80188ac: 4603 mov r3, r0
80188ae: 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);
80188b0: 89b8 ldrh r0, [r7, #12]
80188b2: 693b ldr r3, [r7, #16]
80188b4: 33f0 adds r3, #240 ; 0xf0
80188b6: 697a ldr r2, [r7, #20]
80188b8: 4619 mov r1, r3
80188ba: f001 f99f bl 8019bfc <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);
80188be: 4b19 ldr r3, [pc, #100] ; (8018924 <dhcp_decline+0xdc>)
80188c0: 6818 ldr r0, [r3, #0]
80188c2: 4b19 ldr r3, [pc, #100] ; (8018928 <dhcp_decline+0xe0>)
80188c4: 9301 str r3, [sp, #4]
80188c6: 687b ldr r3, [r7, #4]
80188c8: 9300 str r3, [sp, #0]
80188ca: 2343 movs r3, #67 ; 0x43
80188cc: 4a17 ldr r2, [pc, #92] ; (801892c <dhcp_decline+0xe4>)
80188ce: 6979 ldr r1, [r7, #20]
80188d0: f7ff f8be bl 8017a50 <udp_sendto_if_src>
80188d4: 4603 mov r3, r0
80188d6: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
80188d8: 6978 ldr r0, [r7, #20]
80188da: f7f9 f905 bl 8011ae8 <pbuf_free>
80188de: e001 b.n 80188e4 <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;
80188e0: 23ff movs r3, #255 ; 0xff
80188e2: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
80188e4: 69bb ldr r3, [r7, #24]
80188e6: 799b ldrb r3, [r3, #6]
80188e8: 2bff cmp r3, #255 ; 0xff
80188ea: d005 beq.n 80188f8 <dhcp_decline+0xb0>
dhcp->tries++;
80188ec: 69bb ldr r3, [r7, #24]
80188ee: 799b ldrb r3, [r3, #6]
80188f0: 3301 adds r3, #1
80188f2: b2da uxtb r2, r3
80188f4: 69bb ldr r3, [r7, #24]
80188f6: 719a strb r2, [r3, #6]
}
msecs = 10 * 1000;
80188f8: f242 7310 movw r3, #10000 ; 0x2710
80188fc: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
80188fe: 89fb ldrh r3, [r7, #14]
8018900: f203 13f3 addw r3, r3, #499 ; 0x1f3
8018904: 4a0a ldr r2, [pc, #40] ; (8018930 <dhcp_decline+0xe8>)
8018906: fb82 1203 smull r1, r2, r2, r3
801890a: 1152 asrs r2, r2, #5
801890c: 17db asrs r3, r3, #31
801890e: 1ad3 subs r3, r2, r3
8018910: b29a uxth r2, r3
8018912: 69bb ldr r3, [r7, #24]
8018914: 811a strh r2, [r3, #8]
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs));
return result;
8018916: f997 301f ldrsb.w r3, [r7, #31]
}
801891a: 4618 mov r0, r3
801891c: 3720 adds r7, #32
801891e: 46bd mov sp, r7
8018920: bdb0 pop {r4, r5, r7, pc}
8018922: bf00 nop
8018924: 20008758 .word 0x20008758
8018928: 080226e8 .word 0x080226e8
801892c: 080226ec .word 0x080226ec
8018930: 10624dd3 .word 0x10624dd3
08018934 <dhcp_discover>:
*
* @param netif the netif under DHCP control
*/
static err_t
dhcp_discover(struct netif *netif)
{
8018934: b580 push {r7, lr}
8018936: b08a sub sp, #40 ; 0x28
8018938: af02 add r7, sp, #8
801893a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
801893c: 687b ldr r3, [r7, #4]
801893e: 6a5b ldr r3, [r3, #36] ; 0x24
8018940: 61bb str r3, [r7, #24]
err_t result = ERR_OK;
8018942: 2300 movs r3, #0
8018944: 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);
8018946: 69bb ldr r3, [r7, #24]
8018948: 2200 movs r2, #0
801894a: 61da str r2, [r3, #28]
dhcp_set_state(dhcp, DHCP_STATE_SELECTING);
801894c: 2106 movs r1, #6
801894e: 69b8 ldr r0, [r7, #24]
8018950: f000 fbf4 bl 801913c <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len);
8018954: f107 0308 add.w r3, r7, #8
8018958: 2201 movs r2, #1
801895a: 69b9 ldr r1, [r7, #24]
801895c: 6878 ldr r0, [r7, #4]
801895e: f001 f877 bl 8019a50 <dhcp_create_msg>
8018962: 6138 str r0, [r7, #16]
if (p_out != NULL) {
8018964: 693b ldr r3, [r7, #16]
8018966: 2b00 cmp r3, #0
8018968: d04b beq.n 8018a02 <dhcp_discover+0xce>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
801896a: 693b ldr r3, [r7, #16]
801896c: 685b ldr r3, [r3, #4]
801896e: 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);
8018970: 8938 ldrh r0, [r7, #8]
8018972: 68fb ldr r3, [r7, #12]
8018974: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018978: 2302 movs r3, #2
801897a: 2239 movs r2, #57 ; 0x39
801897c: f000 fbf8 bl 8019170 <dhcp_option>
8018980: 4603 mov r3, r0
8018982: 813b strh r3, [r7, #8]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
8018984: 8938 ldrh r0, [r7, #8]
8018986: 68fb ldr r3, [r7, #12]
8018988: f103 01f0 add.w r1, r3, #240 ; 0xf0
801898c: 687b ldr r3, [r7, #4]
801898e: 8d1b ldrh r3, [r3, #40] ; 0x28
8018990: 461a mov r2, r3
8018992: f000 fc47 bl 8019224 <dhcp_option_short>
8018996: 4603 mov r3, r0
8018998: 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));
801899a: 8938 ldrh r0, [r7, #8]
801899c: 68fb ldr r3, [r7, #12]
801899e: f103 01f0 add.w r1, r3, #240 ; 0xf0
80189a2: 2303 movs r3, #3
80189a4: 2237 movs r2, #55 ; 0x37
80189a6: f000 fbe3 bl 8019170 <dhcp_option>
80189aa: 4603 mov r3, r0
80189ac: 813b strh r3, [r7, #8]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
80189ae: 2300 movs r3, #0
80189b0: 77fb strb r3, [r7, #31]
80189b2: e00e b.n 80189d2 <dhcp_discover+0x9e>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
80189b4: 8938 ldrh r0, [r7, #8]
80189b6: 68fb ldr r3, [r7, #12]
80189b8: f103 01f0 add.w r1, r3, #240 ; 0xf0
80189bc: 7ffb ldrb r3, [r7, #31]
80189be: 4a29 ldr r2, [pc, #164] ; (8018a64 <dhcp_discover+0x130>)
80189c0: 5cd3 ldrb r3, [r2, r3]
80189c2: 461a mov r2, r3
80189c4: f000 fc08 bl 80191d8 <dhcp_option_byte>
80189c8: 4603 mov r3, r0
80189ca: 813b strh r3, [r7, #8]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
80189cc: 7ffb ldrb r3, [r7, #31]
80189ce: 3301 adds r3, #1
80189d0: 77fb strb r3, [r7, #31]
80189d2: 7ffb ldrb r3, [r7, #31]
80189d4: 2b02 cmp r3, #2
80189d6: d9ed bls.n 80189b4 <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);
80189d8: 8938 ldrh r0, [r7, #8]
80189da: 68fb ldr r3, [r7, #12]
80189dc: 33f0 adds r3, #240 ; 0xf0
80189de: 693a ldr r2, [r7, #16]
80189e0: 4619 mov r1, r3
80189e2: f001 f90b bl 8019bfc <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);
80189e6: 4b20 ldr r3, [pc, #128] ; (8018a68 <dhcp_discover+0x134>)
80189e8: 6818 ldr r0, [r3, #0]
80189ea: 4b20 ldr r3, [pc, #128] ; (8018a6c <dhcp_discover+0x138>)
80189ec: 9301 str r3, [sp, #4]
80189ee: 687b ldr r3, [r7, #4]
80189f0: 9300 str r3, [sp, #0]
80189f2: 2343 movs r3, #67 ; 0x43
80189f4: 4a1e ldr r2, [pc, #120] ; (8018a70 <dhcp_discover+0x13c>)
80189f6: 6939 ldr r1, [r7, #16]
80189f8: f7ff f82a bl 8017a50 <udp_sendto_if_src>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n"));
pbuf_free(p_out);
80189fc: 6938 ldr r0, [r7, #16]
80189fe: f7f9 f873 bl 8011ae8 <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) {
8018a02: 69bb ldr r3, [r7, #24]
8018a04: 799b ldrb r3, [r3, #6]
8018a06: 2bff cmp r3, #255 ; 0xff
8018a08: d005 beq.n 8018a16 <dhcp_discover+0xe2>
dhcp->tries++;
8018a0a: 69bb ldr r3, [r7, #24]
8018a0c: 799b ldrb r3, [r3, #6]
8018a0e: 3301 adds r3, #1
8018a10: b2da uxtb r2, r3
8018a12: 69bb ldr r3, [r7, #24]
8018a14: 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);
8018a16: 69bb ldr r3, [r7, #24]
8018a18: 799b ldrb r3, [r3, #6]
8018a1a: 2b05 cmp r3, #5
8018a1c: d80d bhi.n 8018a3a <dhcp_discover+0x106>
8018a1e: 69bb ldr r3, [r7, #24]
8018a20: 799b ldrb r3, [r3, #6]
8018a22: 461a mov r2, r3
8018a24: 2301 movs r3, #1
8018a26: 4093 lsls r3, r2
8018a28: b29b uxth r3, r3
8018a2a: 461a mov r2, r3
8018a2c: 0152 lsls r2, r2, #5
8018a2e: 1ad2 subs r2, r2, r3
8018a30: 0092 lsls r2, r2, #2
8018a32: 4413 add r3, r2
8018a34: 00db lsls r3, r3, #3
8018a36: b29b uxth r3, r3
8018a38: e001 b.n 8018a3e <dhcp_discover+0x10a>
8018a3a: f64e 2360 movw r3, #60000 ; 0xea60
8018a3e: 817b strh r3, [r7, #10]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
8018a40: 897b ldrh r3, [r7, #10]
8018a42: f203 13f3 addw r3, r3, #499 ; 0x1f3
8018a46: 4a0b ldr r2, [pc, #44] ; (8018a74 <dhcp_discover+0x140>)
8018a48: fb82 1203 smull r1, r2, r2, r3
8018a4c: 1152 asrs r2, r2, #5
8018a4e: 17db asrs r3, r3, #31
8018a50: 1ad3 subs r3, r2, r3
8018a52: b29a uxth r2, r3
8018a54: 69bb ldr r3, [r7, #24]
8018a56: 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;
8018a58: f997 3017 ldrsb.w r3, [r7, #23]
}
8018a5c: 4618 mov r0, r3
8018a5e: 3720 adds r7, #32
8018a60: 46bd mov sp, r7
8018a62: bd80 pop {r7, pc}
8018a64: 2000006c .word 0x2000006c
8018a68: 20008758 .word 0x20008758
8018a6c: 080226e8 .word 0x080226e8
8018a70: 080226ec .word 0x080226ec
8018a74: 10624dd3 .word 0x10624dd3
08018a78 <dhcp_bind>:
*
* @param netif network interface to bind to the offered address
*/
static void
dhcp_bind(struct netif *netif)
{
8018a78: b580 push {r7, lr}
8018a7a: b088 sub sp, #32
8018a7c: af00 add r7, sp, #0
8018a7e: 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;);
8018a80: 687b ldr r3, [r7, #4]
8018a82: 2b00 cmp r3, #0
8018a84: d107 bne.n 8018a96 <dhcp_bind+0x1e>
8018a86: 4b64 ldr r3, [pc, #400] ; (8018c18 <dhcp_bind+0x1a0>)
8018a88: f240 4215 movw r2, #1045 ; 0x415
8018a8c: 4963 ldr r1, [pc, #396] ; (8018c1c <dhcp_bind+0x1a4>)
8018a8e: 4864 ldr r0, [pc, #400] ; (8018c20 <dhcp_bind+0x1a8>)
8018a90: f003 fd5a bl 801c548 <iprintf>
8018a94: e0bc b.n 8018c10 <dhcp_bind+0x198>
dhcp = netif_dhcp_data(netif);
8018a96: 687b ldr r3, [r7, #4]
8018a98: 6a5b ldr r3, [r3, #36] ; 0x24
8018a9a: 61bb str r3, [r7, #24]
LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
8018a9c: 69bb ldr r3, [r7, #24]
8018a9e: 2b00 cmp r3, #0
8018aa0: d107 bne.n 8018ab2 <dhcp_bind+0x3a>
8018aa2: 4b5d ldr r3, [pc, #372] ; (8018c18 <dhcp_bind+0x1a0>)
8018aa4: f240 4217 movw r2, #1047 ; 0x417
8018aa8: 495e ldr r1, [pc, #376] ; (8018c24 <dhcp_bind+0x1ac>)
8018aaa: 485d ldr r0, [pc, #372] ; (8018c20 <dhcp_bind+0x1a8>)
8018aac: f003 fd4c bl 801c548 <iprintf>
8018ab0: e0ae b.n 8018c10 <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;
8018ab2: 69bb ldr r3, [r7, #24]
8018ab4: 2200 movs r2, #0
8018ab6: 825a strh r2, [r3, #18]
if (dhcp->offered_t0_lease != 0xffffffffUL) {
8018ab8: 69bb ldr r3, [r7, #24]
8018aba: 6a9b ldr r3, [r3, #40] ; 0x28
8018abc: f1b3 3fff cmp.w r3, #4294967295
8018ac0: d019 beq.n 8018af6 <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;
8018ac2: 69bb ldr r3, [r7, #24]
8018ac4: 6a9b ldr r3, [r3, #40] ; 0x28
8018ac6: 331e adds r3, #30
8018ac8: 4a57 ldr r2, [pc, #348] ; (8018c28 <dhcp_bind+0x1b0>)
8018aca: fba2 2303 umull r2, r3, r2, r3
8018ace: 095b lsrs r3, r3, #5
8018ad0: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
8018ad2: 69fb ldr r3, [r7, #28]
8018ad4: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8018ad8: d302 bcc.n 8018ae0 <dhcp_bind+0x68>
timeout = 0xffff;
8018ada: f64f 73ff movw r3, #65535 ; 0xffff
8018ade: 61fb str r3, [r7, #28]
}
dhcp->t0_timeout = (u16_t)timeout;
8018ae0: 69fb ldr r3, [r7, #28]
8018ae2: b29a uxth r2, r3
8018ae4: 69bb ldr r3, [r7, #24]
8018ae6: 829a strh r2, [r3, #20]
if (dhcp->t0_timeout == 0) {
8018ae8: 69bb ldr r3, [r7, #24]
8018aea: 8a9b ldrh r3, [r3, #20]
8018aec: 2b00 cmp r3, #0
8018aee: d102 bne.n 8018af6 <dhcp_bind+0x7e>
dhcp->t0_timeout = 1;
8018af0: 69bb ldr r3, [r7, #24]
8018af2: 2201 movs r2, #1
8018af4: 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) {
8018af6: 69bb ldr r3, [r7, #24]
8018af8: 6adb ldr r3, [r3, #44] ; 0x2c
8018afa: f1b3 3fff cmp.w r3, #4294967295
8018afe: d01d beq.n 8018b3c <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;
8018b00: 69bb ldr r3, [r7, #24]
8018b02: 6adb ldr r3, [r3, #44] ; 0x2c
8018b04: 331e adds r3, #30
8018b06: 4a48 ldr r2, [pc, #288] ; (8018c28 <dhcp_bind+0x1b0>)
8018b08: fba2 2303 umull r2, r3, r2, r3
8018b0c: 095b lsrs r3, r3, #5
8018b0e: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
8018b10: 69fb ldr r3, [r7, #28]
8018b12: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8018b16: d302 bcc.n 8018b1e <dhcp_bind+0xa6>
timeout = 0xffff;
8018b18: f64f 73ff movw r3, #65535 ; 0xffff
8018b1c: 61fb str r3, [r7, #28]
}
dhcp->t1_timeout = (u16_t)timeout;
8018b1e: 69fb ldr r3, [r7, #28]
8018b20: b29a uxth r2, r3
8018b22: 69bb ldr r3, [r7, #24]
8018b24: 815a strh r2, [r3, #10]
if (dhcp->t1_timeout == 0) {
8018b26: 69bb ldr r3, [r7, #24]
8018b28: 895b ldrh r3, [r3, #10]
8018b2a: 2b00 cmp r3, #0
8018b2c: d102 bne.n 8018b34 <dhcp_bind+0xbc>
dhcp->t1_timeout = 1;
8018b2e: 69bb ldr r3, [r7, #24]
8018b30: 2201 movs r2, #1
8018b32: 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;
8018b34: 69bb ldr r3, [r7, #24]
8018b36: 895a ldrh r2, [r3, #10]
8018b38: 69bb ldr r3, [r7, #24]
8018b3a: 81da strh r2, [r3, #14]
}
/* set renewal period timer */
if (dhcp->offered_t2_rebind != 0xffffffffUL) {
8018b3c: 69bb ldr r3, [r7, #24]
8018b3e: 6b1b ldr r3, [r3, #48] ; 0x30
8018b40: f1b3 3fff cmp.w r3, #4294967295
8018b44: d01d beq.n 8018b82 <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;
8018b46: 69bb ldr r3, [r7, #24]
8018b48: 6b1b ldr r3, [r3, #48] ; 0x30
8018b4a: 331e adds r3, #30
8018b4c: 4a36 ldr r2, [pc, #216] ; (8018c28 <dhcp_bind+0x1b0>)
8018b4e: fba2 2303 umull r2, r3, r2, r3
8018b52: 095b lsrs r3, r3, #5
8018b54: 61fb str r3, [r7, #28]
if (timeout > 0xffff) {
8018b56: 69fb ldr r3, [r7, #28]
8018b58: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8018b5c: d302 bcc.n 8018b64 <dhcp_bind+0xec>
timeout = 0xffff;
8018b5e: f64f 73ff movw r3, #65535 ; 0xffff
8018b62: 61fb str r3, [r7, #28]
}
dhcp->t2_timeout = (u16_t)timeout;
8018b64: 69fb ldr r3, [r7, #28]
8018b66: b29a uxth r2, r3
8018b68: 69bb ldr r3, [r7, #24]
8018b6a: 819a strh r2, [r3, #12]
if (dhcp->t2_timeout == 0) {
8018b6c: 69bb ldr r3, [r7, #24]
8018b6e: 899b ldrh r3, [r3, #12]
8018b70: 2b00 cmp r3, #0
8018b72: d102 bne.n 8018b7a <dhcp_bind+0x102>
dhcp->t2_timeout = 1;
8018b74: 69bb ldr r3, [r7, #24]
8018b76: 2201 movs r2, #1
8018b78: 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;
8018b7a: 69bb ldr r3, [r7, #24]
8018b7c: 899a ldrh r2, [r3, #12]
8018b7e: 69bb ldr r3, [r7, #24]
8018b80: 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)) {
8018b82: 69bb ldr r3, [r7, #24]
8018b84: 895a ldrh r2, [r3, #10]
8018b86: 69bb ldr r3, [r7, #24]
8018b88: 899b ldrh r3, [r3, #12]
8018b8a: 429a cmp r2, r3
8018b8c: d306 bcc.n 8018b9c <dhcp_bind+0x124>
8018b8e: 69bb ldr r3, [r7, #24]
8018b90: 899b ldrh r3, [r3, #12]
8018b92: 2b00 cmp r3, #0
8018b94: d002 beq.n 8018b9c <dhcp_bind+0x124>
dhcp->t1_timeout = 0;
8018b96: 69bb ldr r3, [r7, #24]
8018b98: 2200 movs r2, #0
8018b9a: 815a strh r2, [r3, #10]
}
if (dhcp->subnet_mask_given) {
8018b9c: 69bb ldr r3, [r7, #24]
8018b9e: 79db ldrb r3, [r3, #7]
8018ba0: 2b00 cmp r3, #0
8018ba2: d003 beq.n 8018bac <dhcp_bind+0x134>
/* copy offered network mask */
ip4_addr_copy(sn_mask, dhcp->offered_sn_mask);
8018ba4: 69bb ldr r3, [r7, #24]
8018ba6: 6a1b ldr r3, [r3, #32]
8018ba8: 613b str r3, [r7, #16]
8018baa: e014 b.n 8018bd6 <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);
8018bac: 69bb ldr r3, [r7, #24]
8018bae: 331c adds r3, #28
8018bb0: 781b ldrb r3, [r3, #0]
8018bb2: 75fb strb r3, [r7, #23]
if (first_octet <= 127) {
8018bb4: f997 3017 ldrsb.w r3, [r7, #23]
8018bb8: 2b00 cmp r3, #0
8018bba: db02 blt.n 8018bc2 <dhcp_bind+0x14a>
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL));
8018bbc: 23ff movs r3, #255 ; 0xff
8018bbe: 613b str r3, [r7, #16]
8018bc0: e009 b.n 8018bd6 <dhcp_bind+0x15e>
} else if (first_octet >= 192) {
8018bc2: 7dfb ldrb r3, [r7, #23]
8018bc4: 2bbf cmp r3, #191 ; 0xbf
8018bc6: d903 bls.n 8018bd0 <dhcp_bind+0x158>
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL));
8018bc8: f06f 437f mvn.w r3, #4278190080 ; 0xff000000
8018bcc: 613b str r3, [r7, #16]
8018bce: e002 b.n 8018bd6 <dhcp_bind+0x15e>
} else {
ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL));
8018bd0: f64f 73ff movw r3, #65535 ; 0xffff
8018bd4: 613b str r3, [r7, #16]
}
}
ip4_addr_copy(gw_addr, dhcp->offered_gw_addr);
8018bd6: 69bb ldr r3, [r7, #24]
8018bd8: 6a5b ldr r3, [r3, #36] ; 0x24
8018bda: 60fb str r3, [r7, #12]
/* gateway address not given? */
if (ip4_addr_isany_val(gw_addr)) {
8018bdc: 68fb ldr r3, [r7, #12]
8018bde: 2b00 cmp r3, #0
8018be0: d108 bne.n 8018bf4 <dhcp_bind+0x17c>
/* copy network address */
ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask);
8018be2: 69bb ldr r3, [r7, #24]
8018be4: 69da ldr r2, [r3, #28]
8018be6: 693b ldr r3, [r7, #16]
8018be8: 4013 ands r3, r2
8018bea: 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));
8018bec: 68fb ldr r3, [r7, #12]
8018bee: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
8018bf2: 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);
8018bf4: 210a movs r1, #10
8018bf6: 69b8 ldr r0, [r7, #24]
8018bf8: f000 faa0 bl 801913c <dhcp_set_state>
netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr);
8018bfc: 69bb ldr r3, [r7, #24]
8018bfe: f103 011c add.w r1, r3, #28
8018c02: f107 030c add.w r3, r7, #12
8018c06: f107 0210 add.w r2, r7, #16
8018c0a: 6878 ldr r0, [r7, #4]
8018c0c: f7f8 fa62 bl 80110d4 <netif_set_addr>
/* interface is used by routing now that an address is set */
}
8018c10: 3720 adds r7, #32
8018c12: 46bd mov sp, r7
8018c14: bd80 pop {r7, pc}
8018c16: bf00 nop
8018c18: 0801fc18 .word 0x0801fc18
8018c1c: 0801fd78 .word 0x0801fd78
8018c20: 0801fc78 .word 0x0801fc78
8018c24: 0801fd94 .word 0x0801fd94
8018c28: 88888889 .word 0x88888889
08018c2c <dhcp_renew>:
*
* @param netif network interface which must renew its lease
*/
err_t
dhcp_renew(struct netif *netif)
{
8018c2c: b580 push {r7, lr}
8018c2e: b08a sub sp, #40 ; 0x28
8018c30: af02 add r7, sp, #8
8018c32: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018c34: 687b ldr r3, [r7, #4]
8018c36: 6a5b ldr r3, [r3, #36] ; 0x24
8018c38: 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);
8018c3a: 2105 movs r1, #5
8018c3c: 69b8 ldr r0, [r7, #24]
8018c3e: f000 fa7d bl 801913c <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
8018c42: f107 030c add.w r3, r7, #12
8018c46: 2203 movs r2, #3
8018c48: 69b9 ldr r1, [r7, #24]
8018c4a: 6878 ldr r0, [r7, #4]
8018c4c: f000 ff00 bl 8019a50 <dhcp_create_msg>
8018c50: 6178 str r0, [r7, #20]
if (p_out != NULL) {
8018c52: 697b ldr r3, [r7, #20]
8018c54: 2b00 cmp r3, #0
8018c56: d04e beq.n 8018cf6 <dhcp_renew+0xca>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
8018c58: 697b ldr r3, [r7, #20]
8018c5a: 685b ldr r3, [r3, #4]
8018c5c: 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);
8018c5e: 89b8 ldrh r0, [r7, #12]
8018c60: 693b ldr r3, [r7, #16]
8018c62: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018c66: 2302 movs r3, #2
8018c68: 2239 movs r2, #57 ; 0x39
8018c6a: f000 fa81 bl 8019170 <dhcp_option>
8018c6e: 4603 mov r3, r0
8018c70: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
8018c72: 89b8 ldrh r0, [r7, #12]
8018c74: 693b ldr r3, [r7, #16]
8018c76: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018c7a: 687b ldr r3, [r7, #4]
8018c7c: 8d1b ldrh r3, [r3, #40] ; 0x28
8018c7e: 461a mov r2, r3
8018c80: f000 fad0 bl 8019224 <dhcp_option_short>
8018c84: 4603 mov r3, r0
8018c86: 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));
8018c88: 89b8 ldrh r0, [r7, #12]
8018c8a: 693b ldr r3, [r7, #16]
8018c8c: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018c90: 2303 movs r3, #3
8018c92: 2237 movs r2, #55 ; 0x37
8018c94: f000 fa6c bl 8019170 <dhcp_option>
8018c98: 4603 mov r3, r0
8018c9a: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
8018c9c: 2300 movs r3, #0
8018c9e: 77bb strb r3, [r7, #30]
8018ca0: e00e b.n 8018cc0 <dhcp_renew+0x94>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
8018ca2: 89b8 ldrh r0, [r7, #12]
8018ca4: 693b ldr r3, [r7, #16]
8018ca6: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018caa: 7fbb ldrb r3, [r7, #30]
8018cac: 4a2a ldr r2, [pc, #168] ; (8018d58 <dhcp_renew+0x12c>)
8018cae: 5cd3 ldrb r3, [r2, r3]
8018cb0: 461a mov r2, r3
8018cb2: f000 fa91 bl 80191d8 <dhcp_option_byte>
8018cb6: 4603 mov r3, r0
8018cb8: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
8018cba: 7fbb ldrb r3, [r7, #30]
8018cbc: 3301 adds r3, #1
8018cbe: 77bb strb r3, [r7, #30]
8018cc0: 7fbb ldrb r3, [r7, #30]
8018cc2: 2b02 cmp r3, #2
8018cc4: d9ed bls.n 8018ca2 <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);
8018cc6: 89b8 ldrh r0, [r7, #12]
8018cc8: 693b ldr r3, [r7, #16]
8018cca: 33f0 adds r3, #240 ; 0xf0
8018ccc: 697a ldr r2, [r7, #20]
8018cce: 4619 mov r1, r3
8018cd0: f000 ff94 bl 8019bfc <dhcp_option_trailer>
result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
8018cd4: 4b21 ldr r3, [pc, #132] ; (8018d5c <dhcp_renew+0x130>)
8018cd6: 6818 ldr r0, [r3, #0]
8018cd8: 69bb ldr r3, [r7, #24]
8018cda: f103 0218 add.w r2, r3, #24
8018cde: 687b ldr r3, [r7, #4]
8018ce0: 9300 str r3, [sp, #0]
8018ce2: 2343 movs r3, #67 ; 0x43
8018ce4: 6979 ldr r1, [r7, #20]
8018ce6: f7fe fe3f bl 8017968 <udp_sendto_if>
8018cea: 4603 mov r3, r0
8018cec: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
8018cee: 6978 ldr r0, [r7, #20]
8018cf0: f7f8 fefa bl 8011ae8 <pbuf_free>
8018cf4: e001 b.n 8018cfa <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;
8018cf6: 23ff movs r3, #255 ; 0xff
8018cf8: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
8018cfa: 69bb ldr r3, [r7, #24]
8018cfc: 799b ldrb r3, [r3, #6]
8018cfe: 2bff cmp r3, #255 ; 0xff
8018d00: d005 beq.n 8018d0e <dhcp_renew+0xe2>
dhcp->tries++;
8018d02: 69bb ldr r3, [r7, #24]
8018d04: 799b ldrb r3, [r3, #6]
8018d06: 3301 adds r3, #1
8018d08: b2da uxtb r2, r3
8018d0a: 69bb ldr r3, [r7, #24]
8018d0c: 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);
8018d0e: 69bb ldr r3, [r7, #24]
8018d10: 799b ldrb r3, [r3, #6]
8018d12: 2b09 cmp r3, #9
8018d14: d80a bhi.n 8018d2c <dhcp_renew+0x100>
8018d16: 69bb ldr r3, [r7, #24]
8018d18: 799b ldrb r3, [r3, #6]
8018d1a: b29b uxth r3, r3
8018d1c: 461a mov r2, r3
8018d1e: 0152 lsls r2, r2, #5
8018d20: 1ad2 subs r2, r2, r3
8018d22: 0092 lsls r2, r2, #2
8018d24: 4413 add r3, r2
8018d26: 011b lsls r3, r3, #4
8018d28: b29b uxth r3, r3
8018d2a: e001 b.n 8018d30 <dhcp_renew+0x104>
8018d2c: f644 6320 movw r3, #20000 ; 0x4e20
8018d30: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
8018d32: 89fb ldrh r3, [r7, #14]
8018d34: f203 13f3 addw r3, r3, #499 ; 0x1f3
8018d38: 4a09 ldr r2, [pc, #36] ; (8018d60 <dhcp_renew+0x134>)
8018d3a: fb82 1203 smull r1, r2, r2, r3
8018d3e: 1152 asrs r2, r2, #5
8018d40: 17db asrs r3, r3, #31
8018d42: 1ad3 subs r3, r2, r3
8018d44: b29a uxth r2, r3
8018d46: 69bb ldr r3, [r7, #24]
8018d48: 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;
8018d4a: f997 301f ldrsb.w r3, [r7, #31]
}
8018d4e: 4618 mov r0, r3
8018d50: 3720 adds r7, #32
8018d52: 46bd mov sp, r7
8018d54: bd80 pop {r7, pc}
8018d56: bf00 nop
8018d58: 2000006c .word 0x2000006c
8018d5c: 20008758 .word 0x20008758
8018d60: 10624dd3 .word 0x10624dd3
08018d64 <dhcp_rebind>:
*
* @param netif network interface which must rebind with a DHCP server
*/
static err_t
dhcp_rebind(struct netif *netif)
{
8018d64: b580 push {r7, lr}
8018d66: b08a sub sp, #40 ; 0x28
8018d68: af02 add r7, sp, #8
8018d6a: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018d6c: 687b ldr r3, [r7, #4]
8018d6e: 6a5b ldr r3, [r3, #36] ; 0x24
8018d70: 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);
8018d72: 2104 movs r1, #4
8018d74: 69b8 ldr r0, [r7, #24]
8018d76: f000 f9e1 bl 801913c <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
8018d7a: f107 030c add.w r3, r7, #12
8018d7e: 2203 movs r2, #3
8018d80: 69b9 ldr r1, [r7, #24]
8018d82: 6878 ldr r0, [r7, #4]
8018d84: f000 fe64 bl 8019a50 <dhcp_create_msg>
8018d88: 6178 str r0, [r7, #20]
if (p_out != NULL) {
8018d8a: 697b ldr r3, [r7, #20]
8018d8c: 2b00 cmp r3, #0
8018d8e: d04c beq.n 8018e2a <dhcp_rebind+0xc6>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
8018d90: 697b ldr r3, [r7, #20]
8018d92: 685b ldr r3, [r3, #4]
8018d94: 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);
8018d96: 89b8 ldrh r0, [r7, #12]
8018d98: 693b ldr r3, [r7, #16]
8018d9a: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018d9e: 2302 movs r3, #2
8018da0: 2239 movs r2, #57 ; 0x39
8018da2: f000 f9e5 bl 8019170 <dhcp_option>
8018da6: 4603 mov r3, r0
8018da8: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
8018daa: 89b8 ldrh r0, [r7, #12]
8018dac: 693b ldr r3, [r7, #16]
8018dae: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018db2: 687b ldr r3, [r7, #4]
8018db4: 8d1b ldrh r3, [r3, #40] ; 0x28
8018db6: 461a mov r2, r3
8018db8: f000 fa34 bl 8019224 <dhcp_option_short>
8018dbc: 4603 mov r3, r0
8018dbe: 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));
8018dc0: 89b8 ldrh r0, [r7, #12]
8018dc2: 693b ldr r3, [r7, #16]
8018dc4: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018dc8: 2303 movs r3, #3
8018dca: 2237 movs r2, #55 ; 0x37
8018dcc: f000 f9d0 bl 8019170 <dhcp_option>
8018dd0: 4603 mov r3, r0
8018dd2: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
8018dd4: 2300 movs r3, #0
8018dd6: 77bb strb r3, [r7, #30]
8018dd8: e00e b.n 8018df8 <dhcp_rebind+0x94>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
8018dda: 89b8 ldrh r0, [r7, #12]
8018ddc: 693b ldr r3, [r7, #16]
8018dde: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018de2: 7fbb ldrb r3, [r7, #30]
8018de4: 4a29 ldr r2, [pc, #164] ; (8018e8c <dhcp_rebind+0x128>)
8018de6: 5cd3 ldrb r3, [r2, r3]
8018de8: 461a mov r2, r3
8018dea: f000 f9f5 bl 80191d8 <dhcp_option_byte>
8018dee: 4603 mov r3, r0
8018df0: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
8018df2: 7fbb ldrb r3, [r7, #30]
8018df4: 3301 adds r3, #1
8018df6: 77bb strb r3, [r7, #30]
8018df8: 7fbb ldrb r3, [r7, #30]
8018dfa: 2b02 cmp r3, #2
8018dfc: d9ed bls.n 8018dda <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);
8018dfe: 89b8 ldrh r0, [r7, #12]
8018e00: 693b ldr r3, [r7, #16]
8018e02: 33f0 adds r3, #240 ; 0xf0
8018e04: 697a ldr r2, [r7, #20]
8018e06: 4619 mov r1, r3
8018e08: f000 fef8 bl 8019bfc <dhcp_option_trailer>
/* broadcast to server */
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
8018e0c: 4b20 ldr r3, [pc, #128] ; (8018e90 <dhcp_rebind+0x12c>)
8018e0e: 6818 ldr r0, [r3, #0]
8018e10: 687b ldr r3, [r7, #4]
8018e12: 9300 str r3, [sp, #0]
8018e14: 2343 movs r3, #67 ; 0x43
8018e16: 4a1f ldr r2, [pc, #124] ; (8018e94 <dhcp_rebind+0x130>)
8018e18: 6979 ldr r1, [r7, #20]
8018e1a: f7fe fda5 bl 8017968 <udp_sendto_if>
8018e1e: 4603 mov r3, r0
8018e20: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
8018e22: 6978 ldr r0, [r7, #20]
8018e24: f7f8 fe60 bl 8011ae8 <pbuf_free>
8018e28: e001 b.n 8018e2e <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;
8018e2a: 23ff movs r3, #255 ; 0xff
8018e2c: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
8018e2e: 69bb ldr r3, [r7, #24]
8018e30: 799b ldrb r3, [r3, #6]
8018e32: 2bff cmp r3, #255 ; 0xff
8018e34: d005 beq.n 8018e42 <dhcp_rebind+0xde>
dhcp->tries++;
8018e36: 69bb ldr r3, [r7, #24]
8018e38: 799b ldrb r3, [r3, #6]
8018e3a: 3301 adds r3, #1
8018e3c: b2da uxtb r2, r3
8018e3e: 69bb ldr r3, [r7, #24]
8018e40: 719a strb r2, [r3, #6]
}
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
8018e42: 69bb ldr r3, [r7, #24]
8018e44: 799b ldrb r3, [r3, #6]
8018e46: 2b09 cmp r3, #9
8018e48: d80a bhi.n 8018e60 <dhcp_rebind+0xfc>
8018e4a: 69bb ldr r3, [r7, #24]
8018e4c: 799b ldrb r3, [r3, #6]
8018e4e: b29b uxth r3, r3
8018e50: 461a mov r2, r3
8018e52: 0152 lsls r2, r2, #5
8018e54: 1ad2 subs r2, r2, r3
8018e56: 0092 lsls r2, r2, #2
8018e58: 4413 add r3, r2
8018e5a: 00db lsls r3, r3, #3
8018e5c: b29b uxth r3, r3
8018e5e: e001 b.n 8018e64 <dhcp_rebind+0x100>
8018e60: f242 7310 movw r3, #10000 ; 0x2710
8018e64: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
8018e66: 89fb ldrh r3, [r7, #14]
8018e68: f203 13f3 addw r3, r3, #499 ; 0x1f3
8018e6c: 4a0a ldr r2, [pc, #40] ; (8018e98 <dhcp_rebind+0x134>)
8018e6e: fb82 1203 smull r1, r2, r2, r3
8018e72: 1152 asrs r2, r2, #5
8018e74: 17db asrs r3, r3, #31
8018e76: 1ad3 subs r3, r2, r3
8018e78: b29a uxth r2, r3
8018e7a: 69bb ldr r3, [r7, #24]
8018e7c: 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;
8018e7e: f997 301f ldrsb.w r3, [r7, #31]
}
8018e82: 4618 mov r0, r3
8018e84: 3720 adds r7, #32
8018e86: 46bd mov sp, r7
8018e88: bd80 pop {r7, pc}
8018e8a: bf00 nop
8018e8c: 2000006c .word 0x2000006c
8018e90: 20008758 .word 0x20008758
8018e94: 080226ec .word 0x080226ec
8018e98: 10624dd3 .word 0x10624dd3
08018e9c <dhcp_reboot>:
*
* @param netif network interface which must reboot
*/
static err_t
dhcp_reboot(struct netif *netif)
{
8018e9c: b5b0 push {r4, r5, r7, lr}
8018e9e: b08a sub sp, #40 ; 0x28
8018ea0: af02 add r7, sp, #8
8018ea2: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8018ea4: 687b ldr r3, [r7, #4]
8018ea6: 6a5b ldr r3, [r3, #36] ; 0x24
8018ea8: 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);
8018eaa: 2103 movs r1, #3
8018eac: 69b8 ldr r0, [r7, #24]
8018eae: f000 f945 bl 801913c <dhcp_set_state>
/* create and initialize the DHCP message header */
p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
8018eb2: f107 030c add.w r3, r7, #12
8018eb6: 2203 movs r2, #3
8018eb8: 69b9 ldr r1, [r7, #24]
8018eba: 6878 ldr r0, [r7, #4]
8018ebc: f000 fdc8 bl 8019a50 <dhcp_create_msg>
8018ec0: 6178 str r0, [r7, #20]
if (p_out != NULL) {
8018ec2: 697b ldr r3, [r7, #20]
8018ec4: 2b00 cmp r3, #0
8018ec6: d066 beq.n 8018f96 <dhcp_reboot+0xfa>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
8018ec8: 697b ldr r3, [r7, #20]
8018eca: 685b ldr r3, [r3, #4]
8018ecc: 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);
8018ece: 89b8 ldrh r0, [r7, #12]
8018ed0: 693b ldr r3, [r7, #16]
8018ed2: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018ed6: 2302 movs r3, #2
8018ed8: 2239 movs r2, #57 ; 0x39
8018eda: f000 f949 bl 8019170 <dhcp_option>
8018ede: 4603 mov r3, r0
8018ee0: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED);
8018ee2: 89b8 ldrh r0, [r7, #12]
8018ee4: 693b ldr r3, [r7, #16]
8018ee6: 33f0 adds r3, #240 ; 0xf0
8018ee8: f44f 7210 mov.w r2, #576 ; 0x240
8018eec: 4619 mov r1, r3
8018eee: f000 f999 bl 8019224 <dhcp_option_short>
8018ef2: 4603 mov r3, r0
8018ef4: 81bb strh r3, [r7, #12]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
8018ef6: 89b8 ldrh r0, [r7, #12]
8018ef8: 693b ldr r3, [r7, #16]
8018efa: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018efe: 2304 movs r3, #4
8018f00: 2232 movs r2, #50 ; 0x32
8018f02: f000 f935 bl 8019170 <dhcp_option>
8018f06: 4603 mov r3, r0
8018f08: 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)));
8018f0a: 89bc ldrh r4, [r7, #12]
8018f0c: 693b ldr r3, [r7, #16]
8018f0e: f103 05f0 add.w r5, r3, #240 ; 0xf0
8018f12: 69bb ldr r3, [r7, #24]
8018f14: 69db ldr r3, [r3, #28]
8018f16: 4618 mov r0, r3
8018f18: f7f7 fa47 bl 80103aa <lwip_htonl>
8018f1c: 4603 mov r3, r0
8018f1e: 461a mov r2, r3
8018f20: 4629 mov r1, r5
8018f22: 4620 mov r0, r4
8018f24: f000 f9b0 bl 8019288 <dhcp_option_long>
8018f28: 4603 mov r3, r0
8018f2a: 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));
8018f2c: 89b8 ldrh r0, [r7, #12]
8018f2e: 693b ldr r3, [r7, #16]
8018f30: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018f34: 2303 movs r3, #3
8018f36: 2237 movs r2, #55 ; 0x37
8018f38: f000 f91a bl 8019170 <dhcp_option>
8018f3c: 4603 mov r3, r0
8018f3e: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
8018f40: 2300 movs r3, #0
8018f42: 77bb strb r3, [r7, #30]
8018f44: e00e b.n 8018f64 <dhcp_reboot+0xc8>
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
8018f46: 89b8 ldrh r0, [r7, #12]
8018f48: 693b ldr r3, [r7, #16]
8018f4a: f103 01f0 add.w r1, r3, #240 ; 0xf0
8018f4e: 7fbb ldrb r3, [r7, #30]
8018f50: 4a29 ldr r2, [pc, #164] ; (8018ff8 <dhcp_reboot+0x15c>)
8018f52: 5cd3 ldrb r3, [r2, r3]
8018f54: 461a mov r2, r3
8018f56: f000 f93f bl 80191d8 <dhcp_option_byte>
8018f5a: 4603 mov r3, r0
8018f5c: 81bb strh r3, [r7, #12]
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
8018f5e: 7fbb ldrb r3, [r7, #30]
8018f60: 3301 adds r3, #1
8018f62: 77bb strb r3, [r7, #30]
8018f64: 7fbb ldrb r3, [r7, #30]
8018f66: 2b02 cmp r3, #2
8018f68: d9ed bls.n 8018f46 <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);
8018f6a: 89b8 ldrh r0, [r7, #12]
8018f6c: 693b ldr r3, [r7, #16]
8018f6e: 33f0 adds r3, #240 ; 0xf0
8018f70: 697a ldr r2, [r7, #20]
8018f72: 4619 mov r1, r3
8018f74: f000 fe42 bl 8019bfc <dhcp_option_trailer>
/* broadcast to server */
result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
8018f78: 4b20 ldr r3, [pc, #128] ; (8018ffc <dhcp_reboot+0x160>)
8018f7a: 6818 ldr r0, [r3, #0]
8018f7c: 687b ldr r3, [r7, #4]
8018f7e: 9300 str r3, [sp, #0]
8018f80: 2343 movs r3, #67 ; 0x43
8018f82: 4a1f ldr r2, [pc, #124] ; (8019000 <dhcp_reboot+0x164>)
8018f84: 6979 ldr r1, [r7, #20]
8018f86: f7fe fcef bl 8017968 <udp_sendto_if>
8018f8a: 4603 mov r3, r0
8018f8c: 77fb strb r3, [r7, #31]
pbuf_free(p_out);
8018f8e: 6978 ldr r0, [r7, #20]
8018f90: f7f8 fdaa bl 8011ae8 <pbuf_free>
8018f94: e001 b.n 8018f9a <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;
8018f96: 23ff movs r3, #255 ; 0xff
8018f98: 77fb strb r3, [r7, #31]
}
if (dhcp->tries < 255) {
8018f9a: 69bb ldr r3, [r7, #24]
8018f9c: 799b ldrb r3, [r3, #6]
8018f9e: 2bff cmp r3, #255 ; 0xff
8018fa0: d005 beq.n 8018fae <dhcp_reboot+0x112>
dhcp->tries++;
8018fa2: 69bb ldr r3, [r7, #24]
8018fa4: 799b ldrb r3, [r3, #6]
8018fa6: 3301 adds r3, #1
8018fa8: b2da uxtb r2, r3
8018faa: 69bb ldr r3, [r7, #24]
8018fac: 719a strb r2, [r3, #6]
}
msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
8018fae: 69bb ldr r3, [r7, #24]
8018fb0: 799b ldrb r3, [r3, #6]
8018fb2: 2b09 cmp r3, #9
8018fb4: d80a bhi.n 8018fcc <dhcp_reboot+0x130>
8018fb6: 69bb ldr r3, [r7, #24]
8018fb8: 799b ldrb r3, [r3, #6]
8018fba: b29b uxth r3, r3
8018fbc: 461a mov r2, r3
8018fbe: 0152 lsls r2, r2, #5
8018fc0: 1ad2 subs r2, r2, r3
8018fc2: 0092 lsls r2, r2, #2
8018fc4: 4413 add r3, r2
8018fc6: 00db lsls r3, r3, #3
8018fc8: b29b uxth r3, r3
8018fca: e001 b.n 8018fd0 <dhcp_reboot+0x134>
8018fcc: f242 7310 movw r3, #10000 ; 0x2710
8018fd0: 81fb strh r3, [r7, #14]
dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
8018fd2: 89fb ldrh r3, [r7, #14]
8018fd4: f203 13f3 addw r3, r3, #499 ; 0x1f3
8018fd8: 4a0a ldr r2, [pc, #40] ; (8019004 <dhcp_reboot+0x168>)
8018fda: fb82 1203 smull r1, r2, r2, r3
8018fde: 1152 asrs r2, r2, #5
8018fe0: 17db asrs r3, r3, #31
8018fe2: 1ad3 subs r3, r2, r3
8018fe4: b29a uxth r2, r3
8018fe6: 69bb ldr r3, [r7, #24]
8018fe8: 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;
8018fea: f997 301f ldrsb.w r3, [r7, #31]
}
8018fee: 4618 mov r0, r3
8018ff0: 3720 adds r7, #32
8018ff2: 46bd mov sp, r7
8018ff4: bdb0 pop {r4, r5, r7, pc}
8018ff6: bf00 nop
8018ff8: 2000006c .word 0x2000006c
8018ffc: 20008758 .word 0x20008758
8019000: 080226ec .word 0x080226ec
8019004: 10624dd3 .word 0x10624dd3
08019008 <dhcp_release_and_stop>:
*
* @param netif network interface
*/
void
dhcp_release_and_stop(struct netif *netif)
{
8019008: b5b0 push {r4, r5, r7, lr}
801900a: b08a sub sp, #40 ; 0x28
801900c: af02 add r7, sp, #8
801900e: 6078 str r0, [r7, #4]
struct dhcp *dhcp = netif_dhcp_data(netif);
8019010: 687b ldr r3, [r7, #4]
8019012: 6a5b ldr r3, [r3, #36] ; 0x24
8019014: 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) {
8019016: 69fb ldr r3, [r7, #28]
8019018: 2b00 cmp r3, #0
801901a: f000 8084 beq.w 8019126 <dhcp_release_and_stop+0x11e>
return;
}
/* already off? -> nothing to do */
if (dhcp->state == DHCP_STATE_OFF) {
801901e: 69fb ldr r3, [r7, #28]
8019020: 795b ldrb r3, [r3, #5]
8019022: 2b00 cmp r3, #0
8019024: f000 8081 beq.w 801912a <dhcp_release_and_stop+0x122>
return;
}
ip_addr_copy(server_ip_addr, dhcp->server_ip_addr);
8019028: 69fb ldr r3, [r7, #28]
801902a: 699b ldr r3, [r3, #24]
801902c: 613b str r3, [r7, #16]
/* clean old DHCP offer */
ip_addr_set_zero_ip4(&dhcp->server_ip_addr);
801902e: 69fb ldr r3, [r7, #28]
8019030: 2200 movs r2, #0
8019032: 619a str r2, [r3, #24]
ip4_addr_set_zero(&dhcp->offered_ip_addr);
8019034: 69fb ldr r3, [r7, #28]
8019036: 2200 movs r2, #0
8019038: 61da str r2, [r3, #28]
ip4_addr_set_zero(&dhcp->offered_sn_mask);
801903a: 69fb ldr r3, [r7, #28]
801903c: 2200 movs r2, #0
801903e: 621a str r2, [r3, #32]
ip4_addr_set_zero(&dhcp->offered_gw_addr);
8019040: 69fb ldr r3, [r7, #28]
8019042: 2200 movs r2, #0
8019044: 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;
8019046: 69fb ldr r3, [r7, #28]
8019048: 2200 movs r2, #0
801904a: 631a str r2, [r3, #48] ; 0x30
801904c: 69fb ldr r3, [r7, #28]
801904e: 6b1a ldr r2, [r3, #48] ; 0x30
8019050: 69fb ldr r3, [r7, #28]
8019052: 62da str r2, [r3, #44] ; 0x2c
8019054: 69fb ldr r3, [r7, #28]
8019056: 6ada ldr r2, [r3, #44] ; 0x2c
8019058: 69fb ldr r3, [r7, #28]
801905a: 629a str r2, [r3, #40] ; 0x28
dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0;
801905c: 69fb ldr r3, [r7, #28]
801905e: 2200 movs r2, #0
8019060: 829a strh r2, [r3, #20]
8019062: 69fb ldr r3, [r7, #28]
8019064: 8a9a ldrh r2, [r3, #20]
8019066: 69fb ldr r3, [r7, #28]
8019068: 825a strh r2, [r3, #18]
801906a: 69fb ldr r3, [r7, #28]
801906c: 8a5a ldrh r2, [r3, #18]
801906e: 69fb ldr r3, [r7, #28]
8019070: 821a strh r2, [r3, #16]
8019072: 69fb ldr r3, [r7, #28]
8019074: 8a1a ldrh r2, [r3, #16]
8019076: 69fb ldr r3, [r7, #28]
8019078: 81da strh r2, [r3, #14]
/* send release message when current IP was assigned via DHCP */
if (dhcp_supplied_address(netif)) {
801907a: 6878 ldr r0, [r7, #4]
801907c: f000 fdec bl 8019c58 <dhcp_supplied_address>
8019080: 4603 mov r3, r0
8019082: 2b00 cmp r3, #0
8019084: d03b beq.n 80190fe <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);
8019086: f107 030e add.w r3, r7, #14
801908a: 2207 movs r2, #7
801908c: 69f9 ldr r1, [r7, #28]
801908e: 6878 ldr r0, [r7, #4]
8019090: f000 fcde bl 8019a50 <dhcp_create_msg>
8019094: 61b8 str r0, [r7, #24]
if (p_out != NULL) {
8019096: 69bb ldr r3, [r7, #24]
8019098: 2b00 cmp r3, #0
801909a: d030 beq.n 80190fe <dhcp_release_and_stop+0xf6>
struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
801909c: 69bb ldr r3, [r7, #24]
801909e: 685b ldr r3, [r3, #4]
80190a0: 617b str r3, [r7, #20]
options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
80190a2: 89f8 ldrh r0, [r7, #14]
80190a4: 697b ldr r3, [r7, #20]
80190a6: f103 01f0 add.w r1, r3, #240 ; 0xf0
80190aa: 2304 movs r3, #4
80190ac: 2236 movs r2, #54 ; 0x36
80190ae: f000 f85f bl 8019170 <dhcp_option>
80190b2: 4603 mov r3, r0
80190b4: 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))));
80190b6: 89fc ldrh r4, [r7, #14]
80190b8: 697b ldr r3, [r7, #20]
80190ba: f103 05f0 add.w r5, r3, #240 ; 0xf0
80190be: 693b ldr r3, [r7, #16]
80190c0: 4618 mov r0, r3
80190c2: f7f7 f972 bl 80103aa <lwip_htonl>
80190c6: 4603 mov r3, r0
80190c8: 461a mov r2, r3
80190ca: 4629 mov r1, r5
80190cc: 4620 mov r0, r4
80190ce: f000 f8db bl 8019288 <dhcp_option_long>
80190d2: 4603 mov r3, r0
80190d4: 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);
80190d6: 89f8 ldrh r0, [r7, #14]
80190d8: 697b ldr r3, [r7, #20]
80190da: 33f0 adds r3, #240 ; 0xf0
80190dc: 69ba ldr r2, [r7, #24]
80190de: 4619 mov r1, r3
80190e0: f000 fd8c bl 8019bfc <dhcp_option_trailer>
udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
80190e4: 4b13 ldr r3, [pc, #76] ; (8019134 <dhcp_release_and_stop+0x12c>)
80190e6: 6818 ldr r0, [r3, #0]
80190e8: f107 0210 add.w r2, r7, #16
80190ec: 687b ldr r3, [r7, #4]
80190ee: 9300 str r3, [sp, #0]
80190f0: 2343 movs r3, #67 ; 0x43
80190f2: 69b9 ldr r1, [r7, #24]
80190f4: f7fe fc38 bl 8017968 <udp_sendto_if>
pbuf_free(p_out);
80190f8: 69b8 ldr r0, [r7, #24]
80190fa: f7f8 fcf5 bl 8011ae8 <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);
80190fe: 4b0e ldr r3, [pc, #56] ; (8019138 <dhcp_release_and_stop+0x130>)
8019100: 4a0d ldr r2, [pc, #52] ; (8019138 <dhcp_release_and_stop+0x130>)
8019102: 490d ldr r1, [pc, #52] ; (8019138 <dhcp_release_and_stop+0x130>)
8019104: 6878 ldr r0, [r7, #4]
8019106: f7f7 ffe5 bl 80110d4 <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);
801910a: 2100 movs r1, #0
801910c: 69f8 ldr r0, [r7, #28]
801910e: f000 f815 bl 801913c <dhcp_set_state>
if (dhcp->pcb_allocated != 0) {
8019112: 69fb ldr r3, [r7, #28]
8019114: 791b ldrb r3, [r3, #4]
8019116: 2b00 cmp r3, #0
8019118: d008 beq.n 801912c <dhcp_release_and_stop+0x124>
dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
801911a: f7fe ff71 bl 8018000 <dhcp_dec_pcb_refcount>
dhcp->pcb_allocated = 0;
801911e: 69fb ldr r3, [r7, #28]
8019120: 2200 movs r2, #0
8019122: 711a strb r2, [r3, #4]
8019124: e002 b.n 801912c <dhcp_release_and_stop+0x124>
return;
8019126: bf00 nop
8019128: e000 b.n 801912c <dhcp_release_and_stop+0x124>
return;
801912a: bf00 nop
}
}
801912c: 3720 adds r7, #32
801912e: 46bd mov sp, r7
8019130: bdb0 pop {r4, r5, r7, pc}
8019132: bf00 nop
8019134: 20008758 .word 0x20008758
8019138: 080226e8 .word 0x080226e8
0801913c <dhcp_set_state>:
*
* If the state changed, reset the number of tries.
*/
static void
dhcp_set_state(struct dhcp *dhcp, u8_t new_state)
{
801913c: b480 push {r7}
801913e: b083 sub sp, #12
8019140: af00 add r7, sp, #0
8019142: 6078 str r0, [r7, #4]
8019144: 460b mov r3, r1
8019146: 70fb strb r3, [r7, #3]
if (new_state != dhcp->state) {
8019148: 687b ldr r3, [r7, #4]
801914a: 795b ldrb r3, [r3, #5]
801914c: 78fa ldrb r2, [r7, #3]
801914e: 429a cmp r2, r3
8019150: d008 beq.n 8019164 <dhcp_set_state+0x28>
dhcp->state = new_state;
8019152: 687b ldr r3, [r7, #4]
8019154: 78fa ldrb r2, [r7, #3]
8019156: 715a strb r2, [r3, #5]
dhcp->tries = 0;
8019158: 687b ldr r3, [r7, #4]
801915a: 2200 movs r2, #0
801915c: 719a strb r2, [r3, #6]
dhcp->request_timeout = 0;
801915e: 687b ldr r3, [r7, #4]
8019160: 2200 movs r2, #0
8019162: 811a strh r2, [r3, #8]
}
}
8019164: bf00 nop
8019166: 370c adds r7, #12
8019168: 46bd mov sp, r7
801916a: f85d 7b04 ldr.w r7, [sp], #4
801916e: 4770 bx lr
08019170 <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)
{
8019170: b580 push {r7, lr}
8019172: b082 sub sp, #8
8019174: af00 add r7, sp, #0
8019176: 6039 str r1, [r7, #0]
8019178: 4611 mov r1, r2
801917a: 461a mov r2, r3
801917c: 4603 mov r3, r0
801917e: 80fb strh r3, [r7, #6]
8019180: 460b mov r3, r1
8019182: 717b strb r3, [r7, #5]
8019184: 4613 mov r3, r2
8019186: 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);
8019188: 88fa ldrh r2, [r7, #6]
801918a: 793b ldrb r3, [r7, #4]
801918c: 4413 add r3, r2
801918e: 3302 adds r3, #2
8019190: 2b44 cmp r3, #68 ; 0x44
8019192: d906 bls.n 80191a2 <dhcp_option+0x32>
8019194: 4b0d ldr r3, [pc, #52] ; (80191cc <dhcp_option+0x5c>)
8019196: f240 529a movw r2, #1434 ; 0x59a
801919a: 490d ldr r1, [pc, #52] ; (80191d0 <dhcp_option+0x60>)
801919c: 480d ldr r0, [pc, #52] ; (80191d4 <dhcp_option+0x64>)
801919e: f003 f9d3 bl 801c548 <iprintf>
options[options_out_len++] = option_type;
80191a2: 88fb ldrh r3, [r7, #6]
80191a4: 1c5a adds r2, r3, #1
80191a6: 80fa strh r2, [r7, #6]
80191a8: 461a mov r2, r3
80191aa: 683b ldr r3, [r7, #0]
80191ac: 4413 add r3, r2
80191ae: 797a ldrb r2, [r7, #5]
80191b0: 701a strb r2, [r3, #0]
options[options_out_len++] = option_len;
80191b2: 88fb ldrh r3, [r7, #6]
80191b4: 1c5a adds r2, r3, #1
80191b6: 80fa strh r2, [r7, #6]
80191b8: 461a mov r2, r3
80191ba: 683b ldr r3, [r7, #0]
80191bc: 4413 add r3, r2
80191be: 793a ldrb r2, [r7, #4]
80191c0: 701a strb r2, [r3, #0]
return options_out_len;
80191c2: 88fb ldrh r3, [r7, #6]
}
80191c4: 4618 mov r0, r3
80191c6: 3708 adds r7, #8
80191c8: 46bd mov sp, r7
80191ca: bd80 pop {r7, pc}
80191cc: 0801fc18 .word 0x0801fc18
80191d0: 0801fdac .word 0x0801fdac
80191d4: 0801fc78 .word 0x0801fc78
080191d8 <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)
{
80191d8: b580 push {r7, lr}
80191da: b082 sub sp, #8
80191dc: af00 add r7, sp, #0
80191de: 4603 mov r3, r0
80191e0: 6039 str r1, [r7, #0]
80191e2: 80fb strh r3, [r7, #6]
80191e4: 4613 mov r3, r2
80191e6: 717b strb r3, [r7, #5]
LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
80191e8: 88fb ldrh r3, [r7, #6]
80191ea: 2b43 cmp r3, #67 ; 0x43
80191ec: d906 bls.n 80191fc <dhcp_option_byte+0x24>
80191ee: 4b0a ldr r3, [pc, #40] ; (8019218 <dhcp_option_byte+0x40>)
80191f0: f240 52a6 movw r2, #1446 ; 0x5a6
80191f4: 4909 ldr r1, [pc, #36] ; (801921c <dhcp_option_byte+0x44>)
80191f6: 480a ldr r0, [pc, #40] ; (8019220 <dhcp_option_byte+0x48>)
80191f8: f003 f9a6 bl 801c548 <iprintf>
options[options_out_len++] = value;
80191fc: 88fb ldrh r3, [r7, #6]
80191fe: 1c5a adds r2, r3, #1
8019200: 80fa strh r2, [r7, #6]
8019202: 461a mov r2, r3
8019204: 683b ldr r3, [r7, #0]
8019206: 4413 add r3, r2
8019208: 797a ldrb r2, [r7, #5]
801920a: 701a strb r2, [r3, #0]
return options_out_len;
801920c: 88fb ldrh r3, [r7, #6]
}
801920e: 4618 mov r0, r3
8019210: 3708 adds r7, #8
8019212: 46bd mov sp, r7
8019214: bd80 pop {r7, pc}
8019216: bf00 nop
8019218: 0801fc18 .word 0x0801fc18
801921c: 0801fdf0 .word 0x0801fdf0
8019220: 0801fc78 .word 0x0801fc78
08019224 <dhcp_option_short>:
static u16_t
dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value)
{
8019224: b580 push {r7, lr}
8019226: b082 sub sp, #8
8019228: af00 add r7, sp, #0
801922a: 4603 mov r3, r0
801922c: 6039 str r1, [r7, #0]
801922e: 80fb strh r3, [r7, #6]
8019230: 4613 mov r3, r2
8019232: 80bb strh r3, [r7, #4]
LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
8019234: 88fb ldrh r3, [r7, #6]
8019236: 3302 adds r3, #2
8019238: 2b44 cmp r3, #68 ; 0x44
801923a: d906 bls.n 801924a <dhcp_option_short+0x26>
801923c: 4b0f ldr r3, [pc, #60] ; (801927c <dhcp_option_short+0x58>)
801923e: f240 52ae movw r2, #1454 ; 0x5ae
8019242: 490f ldr r1, [pc, #60] ; (8019280 <dhcp_option_short+0x5c>)
8019244: 480f ldr r0, [pc, #60] ; (8019284 <dhcp_option_short+0x60>)
8019246: f003 f97f bl 801c548 <iprintf>
options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8);
801924a: 88bb ldrh r3, [r7, #4]
801924c: 0a1b lsrs r3, r3, #8
801924e: b29a uxth r2, r3
8019250: 88fb ldrh r3, [r7, #6]
8019252: 1c59 adds r1, r3, #1
8019254: 80f9 strh r1, [r7, #6]
8019256: 4619 mov r1, r3
8019258: 683b ldr r3, [r7, #0]
801925a: 440b add r3, r1
801925c: b2d2 uxtb r2, r2
801925e: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t) (value & 0x00ffU);
8019260: 88fb ldrh r3, [r7, #6]
8019262: 1c5a adds r2, r3, #1
8019264: 80fa strh r2, [r7, #6]
8019266: 461a mov r2, r3
8019268: 683b ldr r3, [r7, #0]
801926a: 4413 add r3, r2
801926c: 88ba ldrh r2, [r7, #4]
801926e: b2d2 uxtb r2, r2
8019270: 701a strb r2, [r3, #0]
return options_out_len;
8019272: 88fb ldrh r3, [r7, #6]
}
8019274: 4618 mov r0, r3
8019276: 3708 adds r7, #8
8019278: 46bd mov sp, r7
801927a: bd80 pop {r7, pc}
801927c: 0801fc18 .word 0x0801fc18
8019280: 0801fe28 .word 0x0801fe28
8019284: 0801fc78 .word 0x0801fc78
08019288 <dhcp_option_long>:
static u16_t
dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value)
{
8019288: b580 push {r7, lr}
801928a: b084 sub sp, #16
801928c: af00 add r7, sp, #0
801928e: 4603 mov r3, r0
8019290: 60b9 str r1, [r7, #8]
8019292: 607a str r2, [r7, #4]
8019294: 81fb strh r3, [r7, #14]
LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
8019296: 89fb ldrh r3, [r7, #14]
8019298: 3304 adds r3, #4
801929a: 2b44 cmp r3, #68 ; 0x44
801929c: d906 bls.n 80192ac <dhcp_option_long+0x24>
801929e: 4b19 ldr r3, [pc, #100] ; (8019304 <dhcp_option_long+0x7c>)
80192a0: f240 52b7 movw r2, #1463 ; 0x5b7
80192a4: 4918 ldr r1, [pc, #96] ; (8019308 <dhcp_option_long+0x80>)
80192a6: 4819 ldr r0, [pc, #100] ; (801930c <dhcp_option_long+0x84>)
80192a8: f003 f94e bl 801c548 <iprintf>
options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24);
80192ac: 687b ldr r3, [r7, #4]
80192ae: 0e1a lsrs r2, r3, #24
80192b0: 89fb ldrh r3, [r7, #14]
80192b2: 1c59 adds r1, r3, #1
80192b4: 81f9 strh r1, [r7, #14]
80192b6: 4619 mov r1, r3
80192b8: 68bb ldr r3, [r7, #8]
80192ba: 440b add r3, r1
80192bc: b2d2 uxtb r2, r2
80192be: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16);
80192c0: 687b ldr r3, [r7, #4]
80192c2: 0c1a lsrs r2, r3, #16
80192c4: 89fb ldrh r3, [r7, #14]
80192c6: 1c59 adds r1, r3, #1
80192c8: 81f9 strh r1, [r7, #14]
80192ca: 4619 mov r1, r3
80192cc: 68bb ldr r3, [r7, #8]
80192ce: 440b add r3, r1
80192d0: b2d2 uxtb r2, r2
80192d2: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8);
80192d4: 687b ldr r3, [r7, #4]
80192d6: 0a1a lsrs r2, r3, #8
80192d8: 89fb ldrh r3, [r7, #14]
80192da: 1c59 adds r1, r3, #1
80192dc: 81f9 strh r1, [r7, #14]
80192de: 4619 mov r1, r3
80192e0: 68bb ldr r3, [r7, #8]
80192e2: 440b add r3, r1
80192e4: b2d2 uxtb r2, r2
80192e6: 701a strb r2, [r3, #0]
options[options_out_len++] = (u8_t)((value & 0x000000ffUL));
80192e8: 89fb ldrh r3, [r7, #14]
80192ea: 1c5a adds r2, r3, #1
80192ec: 81fa strh r2, [r7, #14]
80192ee: 461a mov r2, r3
80192f0: 68bb ldr r3, [r7, #8]
80192f2: 4413 add r3, r2
80192f4: 687a ldr r2, [r7, #4]
80192f6: b2d2 uxtb r2, r2
80192f8: 701a strb r2, [r3, #0]
return options_out_len;
80192fa: 89fb ldrh r3, [r7, #14]
}
80192fc: 4618 mov r0, r3
80192fe: 3710 adds r7, #16
8019300: 46bd mov sp, r7
8019302: bd80 pop {r7, pc}
8019304: 0801fc18 .word 0x0801fc18
8019308: 0801fe64 .word 0x0801fe64
801930c: 0801fc78 .word 0x0801fc78
08019310 <dhcp_parse_reply>:
* use that further on.
*
*/
static err_t
dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp)
{
8019310: b580 push {r7, lr}
8019312: b090 sub sp, #64 ; 0x40
8019314: af00 add r7, sp, #0
8019316: 6078 str r0, [r7, #4]
8019318: 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;
801931a: 2300 movs r3, #0
801931c: 62fb str r3, [r7, #44] ; 0x2c
int parse_sname_as_options = 0;
801931e: 2300 movs r3, #0
8019320: 62bb str r3, [r7, #40] ; 0x28
#endif
LWIP_UNUSED_ARG(dhcp);
/* clear received options */
dhcp_clear_all_options(dhcp);
8019322: 2208 movs r2, #8
8019324: 2100 movs r1, #0
8019326: 48be ldr r0, [pc, #760] ; (8019620 <dhcp_parse_reply+0x310>)
8019328: f003 f905 bl 801c536 <memset>
/* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */
if (p->len < DHCP_SNAME_OFS) {
801932c: 687b ldr r3, [r7, #4]
801932e: 895b ldrh r3, [r3, #10]
8019330: 2b2b cmp r3, #43 ; 0x2b
8019332: d802 bhi.n 801933a <dhcp_parse_reply+0x2a>
return ERR_BUF;
8019334: f06f 0301 mvn.w r3, #1
8019338: e2a8 b.n 801988c <dhcp_parse_reply+0x57c>
}
msg_in = (struct dhcp_msg *)p->payload;
801933a: 687b ldr r3, [r7, #4]
801933c: 685b ldr r3, [r3, #4]
801933e: 61bb str r3, [r7, #24]
#endif /* LWIP_DHCP_BOOTP_FILE */
/* parse options */
/* start with options field */
options_idx = DHCP_OPTIONS_OFS;
8019340: 23f0 movs r3, #240 ; 0xf0
8019342: 86fb strh r3, [r7, #54] ; 0x36
/* parse options to the end of the received packet */
options_idx_max = p->tot_len;
8019344: 687b ldr r3, [r7, #4]
8019346: 891b ldrh r3, [r3, #8]
8019348: 86bb strh r3, [r7, #52] ; 0x34
again:
q = p;
801934a: 687b ldr r3, [r7, #4]
801934c: 633b str r3, [r7, #48] ; 0x30
while ((q != NULL) && (options_idx >= q->len)) {
801934e: e00c b.n 801936a <dhcp_parse_reply+0x5a>
options_idx = (u16_t)(options_idx - q->len);
8019350: 6b3b ldr r3, [r7, #48] ; 0x30
8019352: 895b ldrh r3, [r3, #10]
8019354: 8efa ldrh r2, [r7, #54] ; 0x36
8019356: 1ad3 subs r3, r2, r3
8019358: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = (u16_t)(options_idx_max - q->len);
801935a: 6b3b ldr r3, [r7, #48] ; 0x30
801935c: 895b ldrh r3, [r3, #10]
801935e: 8eba ldrh r2, [r7, #52] ; 0x34
8019360: 1ad3 subs r3, r2, r3
8019362: 86bb strh r3, [r7, #52] ; 0x34
q = q->next;
8019364: 6b3b ldr r3, [r7, #48] ; 0x30
8019366: 681b ldr r3, [r3, #0]
8019368: 633b str r3, [r7, #48] ; 0x30
while ((q != NULL) && (options_idx >= q->len)) {
801936a: 6b3b ldr r3, [r7, #48] ; 0x30
801936c: 2b00 cmp r3, #0
801936e: d004 beq.n 801937a <dhcp_parse_reply+0x6a>
8019370: 6b3b ldr r3, [r7, #48] ; 0x30
8019372: 895b ldrh r3, [r3, #10]
8019374: 8efa ldrh r2, [r7, #54] ; 0x36
8019376: 429a cmp r2, r3
8019378: d2ea bcs.n 8019350 <dhcp_parse_reply+0x40>
}
if (q == NULL) {
801937a: 6b3b ldr r3, [r7, #48] ; 0x30
801937c: 2b00 cmp r3, #0
801937e: d102 bne.n 8019386 <dhcp_parse_reply+0x76>
return ERR_BUF;
8019380: f06f 0301 mvn.w r3, #1
8019384: e282 b.n 801988c <dhcp_parse_reply+0x57c>
}
offset = options_idx;
8019386: 8efb ldrh r3, [r7, #54] ; 0x36
8019388: 877b strh r3, [r7, #58] ; 0x3a
offset_max = options_idx_max;
801938a: 8ebb ldrh r3, [r7, #52] ; 0x34
801938c: 873b strh r3, [r7, #56] ; 0x38
options = (u8_t *)q->payload;
801938e: 6b3b ldr r3, [r7, #48] ; 0x30
8019390: 685b ldr r3, [r3, #4]
8019392: 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)) {
8019394: e23a b.n 801980c <dhcp_parse_reply+0x4fc>
u8_t op = options[offset];
8019396: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019398: 6bfa ldr r2, [r7, #60] ; 0x3c
801939a: 4413 add r3, r2
801939c: 781b ldrb r3, [r3, #0]
801939e: 75fb strb r3, [r7, #23]
u8_t len;
u8_t decode_len = 0;
80193a0: 2300 movs r3, #0
80193a2: f887 3026 strb.w r3, [r7, #38] ; 0x26
int decode_idx = -1;
80193a6: f04f 33ff mov.w r3, #4294967295
80193aa: 623b str r3, [r7, #32]
u16_t val_offset = (u16_t)(offset + 2);
80193ac: 8f7b ldrh r3, [r7, #58] ; 0x3a
80193ae: 3302 adds r3, #2
80193b0: 83fb strh r3, [r7, #30]
if (val_offset < offset) {
80193b2: 8bfa ldrh r2, [r7, #30]
80193b4: 8f7b ldrh r3, [r7, #58] ; 0x3a
80193b6: 429a cmp r2, r3
80193b8: d202 bcs.n 80193c0 <dhcp_parse_reply+0xb0>
/* overflow */
return ERR_BUF;
80193ba: f06f 0301 mvn.w r3, #1
80193be: e265 b.n 801988c <dhcp_parse_reply+0x57c>
}
/* len byte might be in the next pbuf */
if ((offset + 1) < q->len) {
80193c0: 8f7b ldrh r3, [r7, #58] ; 0x3a
80193c2: 3301 adds r3, #1
80193c4: 6b3a ldr r2, [r7, #48] ; 0x30
80193c6: 8952 ldrh r2, [r2, #10]
80193c8: 4293 cmp r3, r2
80193ca: da07 bge.n 80193dc <dhcp_parse_reply+0xcc>
len = options[offset + 1];
80193cc: 8f7b ldrh r3, [r7, #58] ; 0x3a
80193ce: 3301 adds r3, #1
80193d0: 6bfa ldr r2, [r7, #60] ; 0x3c
80193d2: 4413 add r3, r2
80193d4: 781b ldrb r3, [r3, #0]
80193d6: f887 3027 strb.w r3, [r7, #39] ; 0x27
80193da: e00b b.n 80193f4 <dhcp_parse_reply+0xe4>
} else {
len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0);
80193dc: 6b3b ldr r3, [r7, #48] ; 0x30
80193de: 681b ldr r3, [r3, #0]
80193e0: 2b00 cmp r3, #0
80193e2: d004 beq.n 80193ee <dhcp_parse_reply+0xde>
80193e4: 6b3b ldr r3, [r7, #48] ; 0x30
80193e6: 681b ldr r3, [r3, #0]
80193e8: 685b ldr r3, [r3, #4]
80193ea: 781b ldrb r3, [r3, #0]
80193ec: e000 b.n 80193f0 <dhcp_parse_reply+0xe0>
80193ee: 2300 movs r3, #0
80193f0: 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;
80193f4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80193f8: f887 3026 strb.w r3, [r7, #38] ; 0x26
switch (op) {
80193fc: 7dfb ldrb r3, [r7, #23]
80193fe: 2b3b cmp r3, #59 ; 0x3b
8019400: f200 812d bhi.w 801965e <dhcp_parse_reply+0x34e>
8019404: a201 add r2, pc, #4 ; (adr r2, 801940c <dhcp_parse_reply+0xfc>)
8019406: f852 f023 ldr.w pc, [r2, r3, lsl #2]
801940a: bf00 nop
801940c: 080194fd .word 0x080194fd
8019410: 0801950d .word 0x0801950d
8019414: 0801965f .word 0x0801965f
8019418: 0801952f .word 0x0801952f
801941c: 0801965f .word 0x0801965f
8019420: 0801965f .word 0x0801965f
8019424: 0801965f .word 0x0801965f
8019428: 0801965f .word 0x0801965f
801942c: 0801965f .word 0x0801965f
8019430: 0801965f .word 0x0801965f
8019434: 0801965f .word 0x0801965f
8019438: 0801965f .word 0x0801965f
801943c: 0801965f .word 0x0801965f
8019440: 0801965f .word 0x0801965f
8019444: 0801965f .word 0x0801965f
8019448: 0801965f .word 0x0801965f
801944c: 0801965f .word 0x0801965f
8019450: 0801965f .word 0x0801965f
8019454: 0801965f .word 0x0801965f
8019458: 0801965f .word 0x0801965f
801945c: 0801965f .word 0x0801965f
8019460: 0801965f .word 0x0801965f
8019464: 0801965f .word 0x0801965f
8019468: 0801965f .word 0x0801965f
801946c: 0801965f .word 0x0801965f
8019470: 0801965f .word 0x0801965f
8019474: 0801965f .word 0x0801965f
8019478: 0801965f .word 0x0801965f
801947c: 0801965f .word 0x0801965f
8019480: 0801965f .word 0x0801965f
8019484: 0801965f .word 0x0801965f
8019488: 0801965f .word 0x0801965f
801948c: 0801965f .word 0x0801965f
8019490: 0801965f .word 0x0801965f
8019494: 0801965f .word 0x0801965f
8019498: 0801965f .word 0x0801965f
801949c: 0801965f .word 0x0801965f
80194a0: 0801965f .word 0x0801965f
80194a4: 0801965f .word 0x0801965f
80194a8: 0801965f .word 0x0801965f
80194ac: 0801965f .word 0x0801965f
80194b0: 0801965f .word 0x0801965f
80194b4: 0801965f .word 0x0801965f
80194b8: 0801965f .word 0x0801965f
80194bc: 0801965f .word 0x0801965f
80194c0: 0801965f .word 0x0801965f
80194c4: 0801965f .word 0x0801965f
80194c8: 0801965f .word 0x0801965f
80194cc: 0801965f .word 0x0801965f
80194d0: 0801965f .word 0x0801965f
80194d4: 0801965f .word 0x0801965f
80194d8: 0801955b .word 0x0801955b
80194dc: 0801957d .word 0x0801957d
80194e0: 080195b9 .word 0x080195b9
80194e4: 080195db .word 0x080195db
80194e8: 0801965f .word 0x0801965f
80194ec: 0801965f .word 0x0801965f
80194f0: 0801965f .word 0x0801965f
80194f4: 080195fd .word 0x080195fd
80194f8: 0801963d .word 0x0801963d
/* case(DHCP_OPTION_END): handled above */
case (DHCP_OPTION_PAD):
/* special option: no len encoded */
decode_len = len = 0;
80194fc: 2300 movs r3, #0
80194fe: f887 3027 strb.w r3, [r7, #39] ; 0x27
8019502: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019506: f887 3026 strb.w r3, [r7, #38] ; 0x26
/* will be increased below */
break;
801950a: e0ac b.n 8019666 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_SUBNET_MASK):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
801950c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019510: 2b04 cmp r3, #4
8019512: d009 beq.n 8019528 <dhcp_parse_reply+0x218>
8019514: 4b43 ldr r3, [pc, #268] ; (8019624 <dhcp_parse_reply+0x314>)
8019516: f240 622e movw r2, #1582 ; 0x62e
801951a: 4943 ldr r1, [pc, #268] ; (8019628 <dhcp_parse_reply+0x318>)
801951c: 4843 ldr r0, [pc, #268] ; (801962c <dhcp_parse_reply+0x31c>)
801951e: f003 f813 bl 801c548 <iprintf>
8019522: f06f 0305 mvn.w r3, #5
8019526: e1b1 b.n 801988c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_SUBNET_MASK;
8019528: 2306 movs r3, #6
801952a: 623b str r3, [r7, #32]
break;
801952c: e09b b.n 8019666 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_ROUTER):
decode_len = 4; /* only copy the first given router */
801952e: 2304 movs r3, #4
8019530: f887 3026 strb.w r3, [r7, #38] ; 0x26
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
8019534: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
8019538: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
801953c: 429a cmp r2, r3
801953e: d209 bcs.n 8019554 <dhcp_parse_reply+0x244>
8019540: 4b38 ldr r3, [pc, #224] ; (8019624 <dhcp_parse_reply+0x314>)
8019542: f240 6233 movw r2, #1587 ; 0x633
8019546: 493a ldr r1, [pc, #232] ; (8019630 <dhcp_parse_reply+0x320>)
8019548: 4838 ldr r0, [pc, #224] ; (801962c <dhcp_parse_reply+0x31c>)
801954a: f002 fffd bl 801c548 <iprintf>
801954e: f06f 0305 mvn.w r3, #5
8019552: e19b b.n 801988c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_ROUTER;
8019554: 2307 movs r3, #7
8019556: 623b str r3, [r7, #32]
break;
8019558: e085 b.n 8019666 <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;);
801955a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801955e: 2b04 cmp r3, #4
8019560: d009 beq.n 8019576 <dhcp_parse_reply+0x266>
8019562: 4b30 ldr r3, [pc, #192] ; (8019624 <dhcp_parse_reply+0x314>)
8019564: f240 6241 movw r2, #1601 ; 0x641
8019568: 492f ldr r1, [pc, #188] ; (8019628 <dhcp_parse_reply+0x318>)
801956a: 4830 ldr r0, [pc, #192] ; (801962c <dhcp_parse_reply+0x31c>)
801956c: f002 ffec bl 801c548 <iprintf>
8019570: f06f 0305 mvn.w r3, #5
8019574: e18a b.n 801988c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_LEASE_TIME;
8019576: 2303 movs r3, #3
8019578: 623b str r3, [r7, #32]
break;
801957a: e074 b.n 8019666 <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;);
801957c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019580: 2b01 cmp r3, #1
8019582: d009 beq.n 8019598 <dhcp_parse_reply+0x288>
8019584: 4b27 ldr r3, [pc, #156] ; (8019624 <dhcp_parse_reply+0x314>)
8019586: f240 624f movw r2, #1615 ; 0x64f
801958a: 492a ldr r1, [pc, #168] ; (8019634 <dhcp_parse_reply+0x324>)
801958c: 4827 ldr r0, [pc, #156] ; (801962c <dhcp_parse_reply+0x31c>)
801958e: f002 ffdb bl 801c548 <iprintf>
8019592: f06f 0305 mvn.w r3, #5
8019596: e179 b.n 801988c <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;);
8019598: 8efb ldrh r3, [r7, #54] ; 0x36
801959a: 2bf0 cmp r3, #240 ; 0xf0
801959c: d009 beq.n 80195b2 <dhcp_parse_reply+0x2a2>
801959e: 4b21 ldr r3, [pc, #132] ; (8019624 <dhcp_parse_reply+0x314>)
80195a0: f240 6251 movw r2, #1617 ; 0x651
80195a4: 4924 ldr r1, [pc, #144] ; (8019638 <dhcp_parse_reply+0x328>)
80195a6: 4821 ldr r0, [pc, #132] ; (801962c <dhcp_parse_reply+0x31c>)
80195a8: f002 ffce bl 801c548 <iprintf>
80195ac: f06f 0305 mvn.w r3, #5
80195b0: e16c b.n 801988c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_OVERLOAD;
80195b2: 2300 movs r3, #0
80195b4: 623b str r3, [r7, #32]
break;
80195b6: e056 b.n 8019666 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_MESSAGE_TYPE):
LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
80195b8: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80195bc: 2b01 cmp r3, #1
80195be: d009 beq.n 80195d4 <dhcp_parse_reply+0x2c4>
80195c0: 4b18 ldr r3, [pc, #96] ; (8019624 <dhcp_parse_reply+0x314>)
80195c2: f240 6255 movw r2, #1621 ; 0x655
80195c6: 491b ldr r1, [pc, #108] ; (8019634 <dhcp_parse_reply+0x324>)
80195c8: 4818 ldr r0, [pc, #96] ; (801962c <dhcp_parse_reply+0x31c>)
80195ca: f002 ffbd bl 801c548 <iprintf>
80195ce: f06f 0305 mvn.w r3, #5
80195d2: e15b b.n 801988c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_MSG_TYPE;
80195d4: 2301 movs r3, #1
80195d6: 623b str r3, [r7, #32]
break;
80195d8: e045 b.n 8019666 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_SERVER_ID):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
80195da: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
80195de: 2b04 cmp r3, #4
80195e0: d009 beq.n 80195f6 <dhcp_parse_reply+0x2e6>
80195e2: 4b10 ldr r3, [pc, #64] ; (8019624 <dhcp_parse_reply+0x314>)
80195e4: f240 6259 movw r2, #1625 ; 0x659
80195e8: 490f ldr r1, [pc, #60] ; (8019628 <dhcp_parse_reply+0x318>)
80195ea: 4810 ldr r0, [pc, #64] ; (801962c <dhcp_parse_reply+0x31c>)
80195ec: f002 ffac bl 801c548 <iprintf>
80195f0: f06f 0305 mvn.w r3, #5
80195f4: e14a b.n 801988c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_SERVER_ID;
80195f6: 2302 movs r3, #2
80195f8: 623b str r3, [r7, #32]
break;
80195fa: e034 b.n 8019666 <dhcp_parse_reply+0x356>
case (DHCP_OPTION_T1):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
80195fc: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019600: 2b04 cmp r3, #4
8019602: d009 beq.n 8019618 <dhcp_parse_reply+0x308>
8019604: 4b07 ldr r3, [pc, #28] ; (8019624 <dhcp_parse_reply+0x314>)
8019606: f240 625d movw r2, #1629 ; 0x65d
801960a: 4907 ldr r1, [pc, #28] ; (8019628 <dhcp_parse_reply+0x318>)
801960c: 4807 ldr r0, [pc, #28] ; (801962c <dhcp_parse_reply+0x31c>)
801960e: f002 ff9b bl 801c548 <iprintf>
8019612: f06f 0305 mvn.w r3, #5
8019616: e139 b.n 801988c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_T1;
8019618: 2304 movs r3, #4
801961a: 623b str r3, [r7, #32]
break;
801961c: e023 b.n 8019666 <dhcp_parse_reply+0x356>
801961e: bf00 nop
8019620: 2000f804 .word 0x2000f804
8019624: 0801fc18 .word 0x0801fc18
8019628: 0801fea0 .word 0x0801fea0
801962c: 0801fc78 .word 0x0801fc78
8019630: 0801feac .word 0x0801feac
8019634: 0801fec0 .word 0x0801fec0
8019638: 0801fecc .word 0x0801fecc
case (DHCP_OPTION_T2):
LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
801963c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019640: 2b04 cmp r3, #4
8019642: d009 beq.n 8019658 <dhcp_parse_reply+0x348>
8019644: 4b93 ldr r3, [pc, #588] ; (8019894 <dhcp_parse_reply+0x584>)
8019646: f240 6261 movw r2, #1633 ; 0x661
801964a: 4993 ldr r1, [pc, #588] ; (8019898 <dhcp_parse_reply+0x588>)
801964c: 4893 ldr r0, [pc, #588] ; (801989c <dhcp_parse_reply+0x58c>)
801964e: f002 ff7b bl 801c548 <iprintf>
8019652: f06f 0305 mvn.w r3, #5
8019656: e119 b.n 801988c <dhcp_parse_reply+0x57c>
decode_idx = DHCP_OPTION_IDX_T2;
8019658: 2305 movs r3, #5
801965a: 623b str r3, [r7, #32]
break;
801965c: e003 b.n 8019666 <dhcp_parse_reply+0x356>
default:
decode_len = 0;
801965e: 2300 movs r3, #0
8019660: 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;
8019664: bf00 nop
}
if (op == DHCP_OPTION_PAD) {
8019666: 7dfb ldrb r3, [r7, #23]
8019668: 2b00 cmp r3, #0
801966a: d103 bne.n 8019674 <dhcp_parse_reply+0x364>
offset++;
801966c: 8f7b ldrh r3, [r7, #58] ; 0x3a
801966e: 3301 adds r3, #1
8019670: 877b strh r3, [r7, #58] ; 0x3a
8019672: e0a1 b.n 80197b8 <dhcp_parse_reply+0x4a8>
} else {
if (offset + len + 2 > 0xFFFF) {
8019674: 8f7a ldrh r2, [r7, #58] ; 0x3a
8019676: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801967a: 4413 add r3, r2
801967c: 3302 adds r3, #2
801967e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
8019682: db02 blt.n 801968a <dhcp_parse_reply+0x37a>
/* overflow */
return ERR_BUF;
8019684: f06f 0301 mvn.w r3, #1
8019688: e100 b.n 801988c <dhcp_parse_reply+0x57c>
}
offset = (u16_t)(offset + len + 2);
801968a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801968e: b29a uxth r2, r3
8019690: 8f7b ldrh r3, [r7, #58] ; 0x3a
8019692: 4413 add r3, r2
8019694: b29b uxth r3, r3
8019696: 3302 adds r3, #2
8019698: 877b strh r3, [r7, #58] ; 0x3a
if (decode_len > 0) {
801969a: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
801969e: 2b00 cmp r3, #0
80196a0: f000 808a beq.w 80197b8 <dhcp_parse_reply+0x4a8>
u32_t value = 0;
80196a4: 2300 movs r3, #0
80196a6: 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);
80196a8: 6a3b ldr r3, [r7, #32]
80196aa: 2b00 cmp r3, #0
80196ac: db02 blt.n 80196b4 <dhcp_parse_reply+0x3a4>
80196ae: 6a3b ldr r3, [r7, #32]
80196b0: 2b07 cmp r3, #7
80196b2: dd06 ble.n 80196c2 <dhcp_parse_reply+0x3b2>
80196b4: 4b77 ldr r3, [pc, #476] ; (8019894 <dhcp_parse_reply+0x584>)
80196b6: f44f 62cf mov.w r2, #1656 ; 0x678
80196ba: 4979 ldr r1, [pc, #484] ; (80198a0 <dhcp_parse_reply+0x590>)
80196bc: 4877 ldr r0, [pc, #476] ; (801989c <dhcp_parse_reply+0x58c>)
80196be: f002 ff43 bl 801c548 <iprintf>
if (!dhcp_option_given(dhcp, decode_idx)) {
80196c2: 4a78 ldr r2, [pc, #480] ; (80198a4 <dhcp_parse_reply+0x594>)
80196c4: 6a3b ldr r3, [r7, #32]
80196c6: 4413 add r3, r2
80196c8: 781b ldrb r3, [r3, #0]
80196ca: 2b00 cmp r3, #0
80196cc: d174 bne.n 80197b8 <dhcp_parse_reply+0x4a8>
copy_len = LWIP_MIN(decode_len, 4);
80196ce: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
80196d2: 2b04 cmp r3, #4
80196d4: bf28 it cs
80196d6: 2304 movcs r3, #4
80196d8: b2db uxtb r3, r3
80196da: 82bb strh r3, [r7, #20]
if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) {
80196dc: 8bfb ldrh r3, [r7, #30]
80196de: 8aba ldrh r2, [r7, #20]
80196e0: f107 0108 add.w r1, r7, #8
80196e4: 6b38 ldr r0, [r7, #48] ; 0x30
80196e6: f7f8 fc05 bl 8011ef4 <pbuf_copy_partial>
80196ea: 4603 mov r3, r0
80196ec: 461a mov r2, r3
80196ee: 8abb ldrh r3, [r7, #20]
80196f0: 4293 cmp r3, r2
80196f2: d002 beq.n 80196fa <dhcp_parse_reply+0x3ea>
return ERR_BUF;
80196f4: f06f 0301 mvn.w r3, #1
80196f8: e0c8 b.n 801988c <dhcp_parse_reply+0x57c>
}
if (decode_len > 4) {
80196fa: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
80196fe: 2b04 cmp r3, #4
8019700: d933 bls.n 801976a <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;);
8019702: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019706: f003 0303 and.w r3, r3, #3
801970a: b2db uxtb r3, r3
801970c: 2b00 cmp r3, #0
801970e: d009 beq.n 8019724 <dhcp_parse_reply+0x414>
8019710: 4b60 ldr r3, [pc, #384] ; (8019894 <dhcp_parse_reply+0x584>)
8019712: f240 6281 movw r2, #1665 ; 0x681
8019716: 4964 ldr r1, [pc, #400] ; (80198a8 <dhcp_parse_reply+0x598>)
8019718: 4860 ldr r0, [pc, #384] ; (801989c <dhcp_parse_reply+0x58c>)
801971a: f002 ff15 bl 801c548 <iprintf>
801971e: f06f 0305 mvn.w r3, #5
8019722: e0b3 b.n 801988c <dhcp_parse_reply+0x57c>
dhcp_got_option(dhcp, decode_idx);
8019724: 4a5f ldr r2, [pc, #380] ; (80198a4 <dhcp_parse_reply+0x594>)
8019726: 6a3b ldr r3, [r7, #32]
8019728: 4413 add r3, r2
801972a: 2201 movs r2, #1
801972c: 701a strb r2, [r3, #0]
dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value));
801972e: 68bb ldr r3, [r7, #8]
8019730: 4618 mov r0, r3
8019732: f7f6 fe3a bl 80103aa <lwip_htonl>
8019736: 4601 mov r1, r0
8019738: 4a5c ldr r2, [pc, #368] ; (80198ac <dhcp_parse_reply+0x59c>)
801973a: 6a3b ldr r3, [r7, #32]
801973c: f842 1023 str.w r1, [r2, r3, lsl #2]
decode_len = (u8_t)(decode_len - 4);
8019740: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019744: 3b04 subs r3, #4
8019746: f887 3026 strb.w r3, [r7, #38] ; 0x26
next_val_offset = (u16_t)(val_offset + 4);
801974a: 8bfb ldrh r3, [r7, #30]
801974c: 3304 adds r3, #4
801974e: 827b strh r3, [r7, #18]
if (next_val_offset < val_offset) {
8019750: 8a7a ldrh r2, [r7, #18]
8019752: 8bfb ldrh r3, [r7, #30]
8019754: 429a cmp r2, r3
8019756: d202 bcs.n 801975e <dhcp_parse_reply+0x44e>
/* overflow */
return ERR_BUF;
8019758: f06f 0301 mvn.w r3, #1
801975c: e096 b.n 801988c <dhcp_parse_reply+0x57c>
}
val_offset = next_val_offset;
801975e: 8a7b ldrh r3, [r7, #18]
8019760: 83fb strh r3, [r7, #30]
decode_idx++;
8019762: 6a3b ldr r3, [r7, #32]
8019764: 3301 adds r3, #1
8019766: 623b str r3, [r7, #32]
goto decode_next;
8019768: e79e b.n 80196a8 <dhcp_parse_reply+0x398>
} else if (decode_len == 4) {
801976a: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
801976e: 2b04 cmp r3, #4
8019770: d106 bne.n 8019780 <dhcp_parse_reply+0x470>
value = lwip_ntohl(value);
8019772: 68bb ldr r3, [r7, #8]
8019774: 4618 mov r0, r3
8019776: f7f6 fe18 bl 80103aa <lwip_htonl>
801977a: 4603 mov r3, r0
801977c: 60bb str r3, [r7, #8]
801977e: e011 b.n 80197a4 <dhcp_parse_reply+0x494>
} else {
LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
8019780: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
8019784: 2b01 cmp r3, #1
8019786: d009 beq.n 801979c <dhcp_parse_reply+0x48c>
8019788: 4b42 ldr r3, [pc, #264] ; (8019894 <dhcp_parse_reply+0x584>)
801978a: f44f 62d2 mov.w r2, #1680 ; 0x690
801978e: 4948 ldr r1, [pc, #288] ; (80198b0 <dhcp_parse_reply+0x5a0>)
8019790: 4842 ldr r0, [pc, #264] ; (801989c <dhcp_parse_reply+0x58c>)
8019792: f002 fed9 bl 801c548 <iprintf>
8019796: f06f 0305 mvn.w r3, #5
801979a: e077 b.n 801988c <dhcp_parse_reply+0x57c>
value = ((u8_t *)&value)[0];
801979c: f107 0308 add.w r3, r7, #8
80197a0: 781b ldrb r3, [r3, #0]
80197a2: 60bb str r3, [r7, #8]
}
dhcp_got_option(dhcp, decode_idx);
80197a4: 4a3f ldr r2, [pc, #252] ; (80198a4 <dhcp_parse_reply+0x594>)
80197a6: 6a3b ldr r3, [r7, #32]
80197a8: 4413 add r3, r2
80197aa: 2201 movs r2, #1
80197ac: 701a strb r2, [r3, #0]
dhcp_set_option_value(dhcp, decode_idx, value);
80197ae: 68ba ldr r2, [r7, #8]
80197b0: 493e ldr r1, [pc, #248] ; (80198ac <dhcp_parse_reply+0x59c>)
80197b2: 6a3b ldr r3, [r7, #32]
80197b4: f841 2023 str.w r2, [r1, r3, lsl #2]
}
}
}
if (offset >= q->len) {
80197b8: 6b3b ldr r3, [r7, #48] ; 0x30
80197ba: 895b ldrh r3, [r3, #10]
80197bc: 8f7a ldrh r2, [r7, #58] ; 0x3a
80197be: 429a cmp r2, r3
80197c0: d324 bcc.n 801980c <dhcp_parse_reply+0x4fc>
offset = (u16_t)(offset - q->len);
80197c2: 6b3b ldr r3, [r7, #48] ; 0x30
80197c4: 895b ldrh r3, [r3, #10]
80197c6: 8f7a ldrh r2, [r7, #58] ; 0x3a
80197c8: 1ad3 subs r3, r2, r3
80197ca: 877b strh r3, [r7, #58] ; 0x3a
offset_max = (u16_t)(offset_max - q->len);
80197cc: 6b3b ldr r3, [r7, #48] ; 0x30
80197ce: 895b ldrh r3, [r3, #10]
80197d0: 8f3a ldrh r2, [r7, #56] ; 0x38
80197d2: 1ad3 subs r3, r2, r3
80197d4: 873b strh r3, [r7, #56] ; 0x38
if (offset < offset_max) {
80197d6: 8f7a ldrh r2, [r7, #58] ; 0x3a
80197d8: 8f3b ldrh r3, [r7, #56] ; 0x38
80197da: 429a cmp r2, r3
80197dc: d213 bcs.n 8019806 <dhcp_parse_reply+0x4f6>
q = q->next;
80197de: 6b3b ldr r3, [r7, #48] ; 0x30
80197e0: 681b ldr r3, [r3, #0]
80197e2: 633b str r3, [r7, #48] ; 0x30
LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
80197e4: 6b3b ldr r3, [r7, #48] ; 0x30
80197e6: 2b00 cmp r3, #0
80197e8: d109 bne.n 80197fe <dhcp_parse_reply+0x4ee>
80197ea: 4b2a ldr r3, [pc, #168] ; (8019894 <dhcp_parse_reply+0x584>)
80197ec: f240 629d movw r2, #1693 ; 0x69d
80197f0: 4930 ldr r1, [pc, #192] ; (80198b4 <dhcp_parse_reply+0x5a4>)
80197f2: 482a ldr r0, [pc, #168] ; (801989c <dhcp_parse_reply+0x58c>)
80197f4: f002 fea8 bl 801c548 <iprintf>
80197f8: f06f 0305 mvn.w r3, #5
80197fc: e046 b.n 801988c <dhcp_parse_reply+0x57c>
options = (u8_t *)q->payload;
80197fe: 6b3b ldr r3, [r7, #48] ; 0x30
8019800: 685b ldr r3, [r3, #4]
8019802: 63fb str r3, [r7, #60] ; 0x3c
8019804: e002 b.n 801980c <dhcp_parse_reply+0x4fc>
} else {
/* We've run out of bytes, probably no end marker. Don't proceed. */
return ERR_BUF;
8019806: f06f 0301 mvn.w r3, #1
801980a: e03f b.n 801988c <dhcp_parse_reply+0x57c>
while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
801980c: 6b3b ldr r3, [r7, #48] ; 0x30
801980e: 2b00 cmp r3, #0
8019810: d00a beq.n 8019828 <dhcp_parse_reply+0x518>
8019812: 8f7a ldrh r2, [r7, #58] ; 0x3a
8019814: 8f3b ldrh r3, [r7, #56] ; 0x38
8019816: 429a cmp r2, r3
8019818: d206 bcs.n 8019828 <dhcp_parse_reply+0x518>
801981a: 8f7b ldrh r3, [r7, #58] ; 0x3a
801981c: 6bfa ldr r2, [r7, #60] ; 0x3c
801981e: 4413 add r3, r2
8019820: 781b ldrb r3, [r3, #0]
8019822: 2bff cmp r3, #255 ; 0xff
8019824: f47f adb7 bne.w 8019396 <dhcp_parse_reply+0x86>
}
}
}
/* is this an overloaded message? */
if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) {
8019828: 4b1e ldr r3, [pc, #120] ; (80198a4 <dhcp_parse_reply+0x594>)
801982a: 781b ldrb r3, [r3, #0]
801982c: 2b00 cmp r3, #0
801982e: d018 beq.n 8019862 <dhcp_parse_reply+0x552>
u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD);
8019830: 4b1e ldr r3, [pc, #120] ; (80198ac <dhcp_parse_reply+0x59c>)
8019832: 681b ldr r3, [r3, #0]
8019834: 60fb str r3, [r7, #12]
dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD);
8019836: 4b1b ldr r3, [pc, #108] ; (80198a4 <dhcp_parse_reply+0x594>)
8019838: 2200 movs r2, #0
801983a: 701a strb r2, [r3, #0]
if (overload == DHCP_OVERLOAD_FILE) {
801983c: 68fb ldr r3, [r7, #12]
801983e: 2b01 cmp r3, #1
8019840: d102 bne.n 8019848 <dhcp_parse_reply+0x538>
parse_file_as_options = 1;
8019842: 2301 movs r3, #1
8019844: 62fb str r3, [r7, #44] ; 0x2c
8019846: e00c b.n 8019862 <dhcp_parse_reply+0x552>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n"));
} else if (overload == DHCP_OVERLOAD_SNAME) {
8019848: 68fb ldr r3, [r7, #12]
801984a: 2b02 cmp r3, #2
801984c: d102 bne.n 8019854 <dhcp_parse_reply+0x544>
parse_sname_as_options = 1;
801984e: 2301 movs r3, #1
8019850: 62bb str r3, [r7, #40] ; 0x28
8019852: e006 b.n 8019862 <dhcp_parse_reply+0x552>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n"));
} else if (overload == DHCP_OVERLOAD_SNAME_FILE) {
8019854: 68fb ldr r3, [r7, #12]
8019856: 2b03 cmp r3, #3
8019858: d103 bne.n 8019862 <dhcp_parse_reply+0x552>
parse_sname_as_options = 1;
801985a: 2301 movs r3, #1
801985c: 62bb str r3, [r7, #40] ; 0x28
parse_file_as_options = 1;
801985e: 2301 movs r3, #1
8019860: 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) {
8019862: 6afb ldr r3, [r7, #44] ; 0x2c
8019864: 2b00 cmp r3, #0
8019866: d006 beq.n 8019876 <dhcp_parse_reply+0x566>
/* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */
parse_file_as_options = 0;
8019868: 2300 movs r3, #0
801986a: 62fb str r3, [r7, #44] ; 0x2c
options_idx = DHCP_FILE_OFS;
801986c: 236c movs r3, #108 ; 0x6c
801986e: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN;
8019870: 23ec movs r3, #236 ; 0xec
8019872: 86bb strh r3, [r7, #52] ; 0x34
#if LWIP_DHCP_BOOTP_FILE
file_overloaded = 1;
#endif
goto again;
8019874: e569 b.n 801934a <dhcp_parse_reply+0x3a>
} else if (parse_sname_as_options) {
8019876: 6abb ldr r3, [r7, #40] ; 0x28
8019878: 2b00 cmp r3, #0
801987a: d006 beq.n 801988a <dhcp_parse_reply+0x57a>
parse_sname_as_options = 0;
801987c: 2300 movs r3, #0
801987e: 62bb str r3, [r7, #40] ; 0x28
options_idx = DHCP_SNAME_OFS;
8019880: 232c movs r3, #44 ; 0x2c
8019882: 86fb strh r3, [r7, #54] ; 0x36
options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN;
8019884: 236c movs r3, #108 ; 0x6c
8019886: 86bb strh r3, [r7, #52] ; 0x34
goto again;
8019888: e55f b.n 801934a <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;
801988a: 2300 movs r3, #0
}
801988c: 4618 mov r0, r3
801988e: 3740 adds r7, #64 ; 0x40
8019890: 46bd mov sp, r7
8019892: bd80 pop {r7, pc}
8019894: 0801fc18 .word 0x0801fc18
8019898: 0801fea0 .word 0x0801fea0
801989c: 0801fc78 .word 0x0801fc78
80198a0: 0801fee4 .word 0x0801fee4
80198a4: 2000f804 .word 0x2000f804
80198a8: 0801fef8 .word 0x0801fef8
80198ac: 2000f80c .word 0x2000f80c
80198b0: 0801ff10 .word 0x0801ff10
80198b4: 0801ff24 .word 0x0801ff24
080198b8 <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)
{
80198b8: b580 push {r7, lr}
80198ba: b08a sub sp, #40 ; 0x28
80198bc: af00 add r7, sp, #0
80198be: 60f8 str r0, [r7, #12]
80198c0: 60b9 str r1, [r7, #8]
80198c2: 607a str r2, [r7, #4]
80198c4: 603b str r3, [r7, #0]
struct netif *netif = ip_current_input_netif();
80198c6: 4b5f ldr r3, [pc, #380] ; (8019a44 <dhcp_recv+0x18c>)
80198c8: 685b ldr r3, [r3, #4]
80198ca: 623b str r3, [r7, #32]
struct dhcp *dhcp = netif_dhcp_data(netif);
80198cc: 6a3b ldr r3, [r7, #32]
80198ce: 6a5b ldr r3, [r3, #36] ; 0x24
80198d0: 61fb str r3, [r7, #28]
struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload;
80198d2: 687b ldr r3, [r7, #4]
80198d4: 685b ldr r3, [r3, #4]
80198d6: 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)) {
80198d8: 69fb ldr r3, [r7, #28]
80198da: 2b00 cmp r3, #0
80198dc: f000 809d beq.w 8019a1a <dhcp_recv+0x162>
80198e0: 69fb ldr r3, [r7, #28]
80198e2: 791b ldrb r3, [r3, #4]
80198e4: 2b00 cmp r3, #0
80198e6: f000 8098 beq.w 8019a1a <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) {
80198ea: 687b ldr r3, [r7, #4]
80198ec: 895b ldrh r3, [r3, #10]
80198ee: 2b2b cmp r3, #43 ; 0x2b
80198f0: f240 8095 bls.w 8019a1e <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) {
80198f4: 69bb ldr r3, [r7, #24]
80198f6: 781b ldrb r3, [r3, #0]
80198f8: 2b02 cmp r3, #2
80198fa: f040 8092 bne.w 8019a22 <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++) {
80198fe: 2300 movs r3, #0
8019900: f887 3027 strb.w r3, [r7, #39] ; 0x27
8019904: e012 b.n 801992c <dhcp_recv+0x74>
if (netif->hwaddr[i] != reply_msg->chaddr[i]) {
8019906: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801990a: 6a3a ldr r2, [r7, #32]
801990c: 4413 add r3, r2
801990e: f893 202a ldrb.w r2, [r3, #42] ; 0x2a
8019912: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019916: 69b9 ldr r1, [r7, #24]
8019918: 440b add r3, r1
801991a: 7f1b ldrb r3, [r3, #28]
801991c: 429a cmp r2, r3
801991e: f040 8082 bne.w 8019a26 <dhcp_recv+0x16e>
for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
8019922: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
8019926: 3301 adds r3, #1
8019928: f887 3027 strb.w r3, [r7, #39] ; 0x27
801992c: 6a3b ldr r3, [r7, #32]
801992e: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
8019932: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
8019936: 429a cmp r2, r3
8019938: d203 bcs.n 8019942 <dhcp_recv+0x8a>
801993a: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
801993e: 2b05 cmp r3, #5
8019940: d9e1 bls.n 8019906 <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) {
8019942: 69bb ldr r3, [r7, #24]
8019944: 685b ldr r3, [r3, #4]
8019946: 4618 mov r0, r3
8019948: f7f6 fd2f bl 80103aa <lwip_htonl>
801994c: 4602 mov r2, r0
801994e: 69fb ldr r3, [r7, #28]
8019950: 681b ldr r3, [r3, #0]
8019952: 429a cmp r2, r3
8019954: d169 bne.n 8019a2a <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) {
8019956: 69f9 ldr r1, [r7, #28]
8019958: 6878 ldr r0, [r7, #4]
801995a: f7ff fcd9 bl 8019310 <dhcp_parse_reply>
801995e: 4603 mov r3, r0
8019960: 2b00 cmp r3, #0
8019962: d164 bne.n 8019a2e <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)) {
8019964: 4b38 ldr r3, [pc, #224] ; (8019a48 <dhcp_recv+0x190>)
8019966: 785b ldrb r3, [r3, #1]
8019968: 2b00 cmp r3, #0
801996a: d062 beq.n 8019a32 <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;
801996c: 687b ldr r3, [r7, #4]
801996e: 685b ldr r3, [r3, #4]
8019970: 617b str r3, [r7, #20]
/* read DHCP message type */
msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE);
8019972: 4b36 ldr r3, [pc, #216] ; (8019a4c <dhcp_recv+0x194>)
8019974: 685b ldr r3, [r3, #4]
8019976: 74fb strb r3, [r7, #19]
/* message type is DHCP ACK? */
if (msg_type == DHCP_ACK) {
8019978: 7cfb ldrb r3, [r7, #19]
801997a: 2b05 cmp r3, #5
801997c: d12a bne.n 80199d4 <dhcp_recv+0x11c>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n"));
/* in requesting state? */
if (dhcp->state == DHCP_STATE_REQUESTING) {
801997e: 69fb ldr r3, [r7, #28]
8019980: 795b ldrb r3, [r3, #5]
8019982: 2b01 cmp r3, #1
8019984: d112 bne.n 80199ac <dhcp_recv+0xf4>
dhcp_handle_ack(netif, msg_in);
8019986: 6979 ldr r1, [r7, #20]
8019988: 6a38 ldr r0, [r7, #32]
801998a: f7fe fe05 bl 8018598 <dhcp_handle_ack>
#if DHCP_DOES_ARP_CHECK
if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
801998e: 6a3b ldr r3, [r7, #32]
8019990: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
8019994: f003 0308 and.w r3, r3, #8
8019998: 2b00 cmp r3, #0
801999a: d003 beq.n 80199a4 <dhcp_recv+0xec>
/* check if the acknowledged lease address is already in use */
dhcp_check(netif);
801999c: 6a38 ldr r0, [r7, #32]
801999e: f7fe fb73 bl 8018088 <dhcp_check>
80199a2: e047 b.n 8019a34 <dhcp_recv+0x17c>
} else {
/* bind interface to the acknowledged lease address */
dhcp_bind(netif);
80199a4: 6a38 ldr r0, [r7, #32]
80199a6: f7ff f867 bl 8018a78 <dhcp_bind>
80199aa: e043 b.n 8019a34 <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) ||
80199ac: 69fb ldr r3, [r7, #28]
80199ae: 795b ldrb r3, [r3, #5]
80199b0: 2b03 cmp r3, #3
80199b2: d007 beq.n 80199c4 <dhcp_recv+0x10c>
80199b4: 69fb ldr r3, [r7, #28]
80199b6: 795b ldrb r3, [r3, #5]
80199b8: 2b04 cmp r3, #4
80199ba: d003 beq.n 80199c4 <dhcp_recv+0x10c>
(dhcp->state == DHCP_STATE_RENEWING)) {
80199bc: 69fb ldr r3, [r7, #28]
80199be: 795b ldrb r3, [r3, #5]
else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
80199c0: 2b05 cmp r3, #5
80199c2: d137 bne.n 8019a34 <dhcp_recv+0x17c>
dhcp_handle_ack(netif, msg_in);
80199c4: 6979 ldr r1, [r7, #20]
80199c6: 6a38 ldr r0, [r7, #32]
80199c8: f7fe fde6 bl 8018598 <dhcp_handle_ack>
dhcp_bind(netif);
80199cc: 6a38 ldr r0, [r7, #32]
80199ce: f7ff f853 bl 8018a78 <dhcp_bind>
80199d2: e02f b.n 8019a34 <dhcp_recv+0x17c>
}
}
/* received a DHCP_NAK in appropriate state? */
else if ((msg_type == DHCP_NAK) &&
80199d4: 7cfb ldrb r3, [r7, #19]
80199d6: 2b06 cmp r3, #6
80199d8: d113 bne.n 8019a02 <dhcp_recv+0x14a>
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
80199da: 69fb ldr r3, [r7, #28]
80199dc: 795b ldrb r3, [r3, #5]
else if ((msg_type == DHCP_NAK) &&
80199de: 2b03 cmp r3, #3
80199e0: d00b beq.n 80199fa <dhcp_recv+0x142>
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
80199e2: 69fb ldr r3, [r7, #28]
80199e4: 795b ldrb r3, [r3, #5]
80199e6: 2b01 cmp r3, #1
80199e8: d007 beq.n 80199fa <dhcp_recv+0x142>
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
80199ea: 69fb ldr r3, [r7, #28]
80199ec: 795b ldrb r3, [r3, #5]
((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
80199ee: 2b04 cmp r3, #4
80199f0: d003 beq.n 80199fa <dhcp_recv+0x142>
(dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
80199f2: 69fb ldr r3, [r7, #28]
80199f4: 795b ldrb r3, [r3, #5]
80199f6: 2b05 cmp r3, #5
80199f8: d103 bne.n 8019a02 <dhcp_recv+0x14a>
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n"));
dhcp_handle_nak(netif);
80199fa: 6a38 ldr r0, [r7, #32]
80199fc: f7fe fb2a bl 8018054 <dhcp_handle_nak>
8019a00: e018 b.n 8019a34 <dhcp_recv+0x17c>
}
/* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */
else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) {
8019a02: 7cfb ldrb r3, [r7, #19]
8019a04: 2b02 cmp r3, #2
8019a06: d108 bne.n 8019a1a <dhcp_recv+0x162>
8019a08: 69fb ldr r3, [r7, #28]
8019a0a: 795b ldrb r3, [r3, #5]
8019a0c: 2b06 cmp r3, #6
8019a0e: d104 bne.n 8019a1a <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);
8019a10: 6979 ldr r1, [r7, #20]
8019a12: 6a38 ldr r0, [r7, #32]
8019a14: f7fe fb6c bl 80180f0 <dhcp_handle_offer>
8019a18: e00c b.n 8019a34 <dhcp_recv+0x17c>
}
free_pbuf_and_return:
8019a1a: bf00 nop
8019a1c: e00a b.n 8019a34 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
8019a1e: bf00 nop
8019a20: e008 b.n 8019a34 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
8019a22: bf00 nop
8019a24: e006 b.n 8019a34 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
8019a26: bf00 nop
8019a28: e004 b.n 8019a34 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
8019a2a: bf00 nop
8019a2c: e002 b.n 8019a34 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
8019a2e: bf00 nop
8019a30: e000 b.n 8019a34 <dhcp_recv+0x17c>
goto free_pbuf_and_return;
8019a32: bf00 nop
pbuf_free(p);
8019a34: 6878 ldr r0, [r7, #4]
8019a36: f7f8 f857 bl 8011ae8 <pbuf_free>
}
8019a3a: bf00 nop
8019a3c: 3728 adds r7, #40 ; 0x28
8019a3e: 46bd mov sp, r7
8019a40: bd80 pop {r7, pc}
8019a42: bf00 nop
8019a44: 2000c0b4 .word 0x2000c0b4
8019a48: 2000f804 .word 0x2000f804
8019a4c: 2000f80c .word 0x2000f80c
08019a50 <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)
{
8019a50: b580 push {r7, lr}
8019a52: b088 sub sp, #32
8019a54: af00 add r7, sp, #0
8019a56: 60f8 str r0, [r7, #12]
8019a58: 60b9 str r1, [r7, #8]
8019a5a: 603b str r3, [r7, #0]
8019a5c: 4613 mov r3, r2
8019a5e: 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;);
8019a60: 68fb ldr r3, [r7, #12]
8019a62: 2b00 cmp r3, #0
8019a64: d108 bne.n 8019a78 <dhcp_create_msg+0x28>
8019a66: 4b5f ldr r3, [pc, #380] ; (8019be4 <dhcp_create_msg+0x194>)
8019a68: f240 7269 movw r2, #1897 ; 0x769
8019a6c: 495e ldr r1, [pc, #376] ; (8019be8 <dhcp_create_msg+0x198>)
8019a6e: 485f ldr r0, [pc, #380] ; (8019bec <dhcp_create_msg+0x19c>)
8019a70: f002 fd6a bl 801c548 <iprintf>
8019a74: 2300 movs r3, #0
8019a76: e0b1 b.n 8019bdc <dhcp_create_msg+0x18c>
LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
8019a78: 68bb ldr r3, [r7, #8]
8019a7a: 2b00 cmp r3, #0
8019a7c: d108 bne.n 8019a90 <dhcp_create_msg+0x40>
8019a7e: 4b59 ldr r3, [pc, #356] ; (8019be4 <dhcp_create_msg+0x194>)
8019a80: f240 726a movw r2, #1898 ; 0x76a
8019a84: 495a ldr r1, [pc, #360] ; (8019bf0 <dhcp_create_msg+0x1a0>)
8019a86: 4859 ldr r0, [pc, #356] ; (8019bec <dhcp_create_msg+0x19c>)
8019a88: f002 fd5e bl 801c548 <iprintf>
8019a8c: 2300 movs r3, #0
8019a8e: e0a5 b.n 8019bdc <dhcp_create_msg+0x18c>
p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM);
8019a90: f44f 7220 mov.w r2, #640 ; 0x280
8019a94: f44f 719a mov.w r1, #308 ; 0x134
8019a98: 2036 movs r0, #54 ; 0x36
8019a9a: f7f7 fd45 bl 8011528 <pbuf_alloc>
8019a9e: 61b8 str r0, [r7, #24]
if (p_out == NULL) {
8019aa0: 69bb ldr r3, [r7, #24]
8019aa2: 2b00 cmp r3, #0
8019aa4: d101 bne.n 8019aaa <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;
8019aa6: 2300 movs r3, #0
8019aa8: e098 b.n 8019bdc <dhcp_create_msg+0x18c>
}
LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
8019aaa: 69bb ldr r3, [r7, #24]
8019aac: 895b ldrh r3, [r3, #10]
8019aae: f5b3 7f9a cmp.w r3, #308 ; 0x134
8019ab2: d206 bcs.n 8019ac2 <dhcp_create_msg+0x72>
8019ab4: 4b4b ldr r3, [pc, #300] ; (8019be4 <dhcp_create_msg+0x194>)
8019ab6: f240 7272 movw r2, #1906 ; 0x772
8019aba: 494e ldr r1, [pc, #312] ; (8019bf4 <dhcp_create_msg+0x1a4>)
8019abc: 484b ldr r0, [pc, #300] ; (8019bec <dhcp_create_msg+0x19c>)
8019abe: f002 fd43 bl 801c548 <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)) {
8019ac2: 79fb ldrb r3, [r7, #7]
8019ac4: 2b03 cmp r3, #3
8019ac6: d103 bne.n 8019ad0 <dhcp_create_msg+0x80>
8019ac8: 68bb ldr r3, [r7, #8]
8019aca: 795b ldrb r3, [r3, #5]
8019acc: 2b03 cmp r3, #3
8019ace: d10d bne.n 8019aec <dhcp_create_msg+0x9c>
/* reuse transaction identifier in retransmissions */
if (dhcp->tries == 0) {
8019ad0: 68bb ldr r3, [r7, #8]
8019ad2: 799b ldrb r3, [r3, #6]
8019ad4: 2b00 cmp r3, #0
8019ad6: d105 bne.n 8019ae4 <dhcp_create_msg+0x94>
#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND)
xid = LWIP_RAND();
8019ad8: f002 fd4e bl 801c578 <rand>
8019adc: 4603 mov r3, r0
8019ade: 461a mov r2, r3
8019ae0: 4b45 ldr r3, [pc, #276] ; (8019bf8 <dhcp_create_msg+0x1a8>)
8019ae2: 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;
8019ae4: 4b44 ldr r3, [pc, #272] ; (8019bf8 <dhcp_create_msg+0x1a8>)
8019ae6: 681a ldr r2, [r3, #0]
8019ae8: 68bb ldr r3, [r7, #8]
8019aea: 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;
8019aec: 69bb ldr r3, [r7, #24]
8019aee: 685b ldr r3, [r3, #4]
8019af0: 617b str r3, [r7, #20]
memset(msg_out, 0, sizeof(struct dhcp_msg));
8019af2: f44f 729a mov.w r2, #308 ; 0x134
8019af6: 2100 movs r1, #0
8019af8: 6978 ldr r0, [r7, #20]
8019afa: f002 fd1c bl 801c536 <memset>
msg_out->op = DHCP_BOOTREQUEST;
8019afe: 697b ldr r3, [r7, #20]
8019b00: 2201 movs r2, #1
8019b02: 701a strb r2, [r3, #0]
/* @todo: make link layer independent */
msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET;
8019b04: 697b ldr r3, [r7, #20]
8019b06: 2201 movs r2, #1
8019b08: 705a strb r2, [r3, #1]
msg_out->hlen = netif->hwaddr_len;
8019b0a: 68fb ldr r3, [r7, #12]
8019b0c: f893 2030 ldrb.w r2, [r3, #48] ; 0x30
8019b10: 697b ldr r3, [r7, #20]
8019b12: 709a strb r2, [r3, #2]
msg_out->xid = lwip_htonl(dhcp->xid);
8019b14: 68bb ldr r3, [r7, #8]
8019b16: 681b ldr r3, [r3, #0]
8019b18: 4618 mov r0, r3
8019b1a: f7f6 fc46 bl 80103aa <lwip_htonl>
8019b1e: 4602 mov r2, r0
8019b20: 697b ldr r3, [r7, #20]
8019b22: 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) ||
8019b24: 79fb ldrb r3, [r7, #7]
8019b26: 2b08 cmp r3, #8
8019b28: d010 beq.n 8019b4c <dhcp_create_msg+0xfc>
8019b2a: 79fb ldrb r3, [r7, #7]
8019b2c: 2b04 cmp r3, #4
8019b2e: d00d beq.n 8019b4c <dhcp_create_msg+0xfc>
8019b30: 79fb ldrb r3, [r7, #7]
8019b32: 2b07 cmp r3, #7
8019b34: d00a beq.n 8019b4c <dhcp_create_msg+0xfc>
8019b36: 79fb ldrb r3, [r7, #7]
8019b38: 2b03 cmp r3, #3
8019b3a: d10c bne.n 8019b56 <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))) {
8019b3c: 68bb ldr r3, [r7, #8]
8019b3e: 795b ldrb r3, [r3, #5]
((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
8019b40: 2b05 cmp r3, #5
8019b42: d003 beq.n 8019b4c <dhcp_create_msg+0xfc>
((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
8019b44: 68bb ldr r3, [r7, #8]
8019b46: 795b ldrb r3, [r3, #5]
8019b48: 2b04 cmp r3, #4
8019b4a: d104 bne.n 8019b56 <dhcp_create_msg+0x106>
ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif));
8019b4c: 68fb ldr r3, [r7, #12]
8019b4e: 3304 adds r3, #4
8019b50: 681a ldr r2, [r3, #0]
8019b52: 697b ldr r3, [r7, #20]
8019b54: 60da str r2, [r3, #12]
}
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
8019b56: 2300 movs r3, #0
8019b58: 83fb strh r3, [r7, #30]
8019b5a: e00c b.n 8019b76 <dhcp_create_msg+0x126>
/* copy netif hardware address (padded with zeroes through memset already) */
msg_out->chaddr[i] = netif->hwaddr[i];
8019b5c: 8bfa ldrh r2, [r7, #30]
8019b5e: 8bfb ldrh r3, [r7, #30]
8019b60: 68f9 ldr r1, [r7, #12]
8019b62: 440a add r2, r1
8019b64: f892 102a ldrb.w r1, [r2, #42] ; 0x2a
8019b68: 697a ldr r2, [r7, #20]
8019b6a: 4413 add r3, r2
8019b6c: 460a mov r2, r1
8019b6e: 771a strb r2, [r3, #28]
for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
8019b70: 8bfb ldrh r3, [r7, #30]
8019b72: 3301 adds r3, #1
8019b74: 83fb strh r3, [r7, #30]
8019b76: 8bfb ldrh r3, [r7, #30]
8019b78: 2b05 cmp r3, #5
8019b7a: d9ef bls.n 8019b5c <dhcp_create_msg+0x10c>
}
msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE);
8019b7c: 697b ldr r3, [r7, #20]
8019b7e: 2200 movs r2, #0
8019b80: f042 0263 orr.w r2, r2, #99 ; 0x63
8019b84: f883 20ec strb.w r2, [r3, #236] ; 0xec
8019b88: 2200 movs r2, #0
8019b8a: f062 027d orn r2, r2, #125 ; 0x7d
8019b8e: f883 20ed strb.w r2, [r3, #237] ; 0xed
8019b92: 2200 movs r2, #0
8019b94: f042 0253 orr.w r2, r2, #83 ; 0x53
8019b98: f883 20ee strb.w r2, [r3, #238] ; 0xee
8019b9c: 2200 movs r2, #0
8019b9e: f042 0263 orr.w r2, r2, #99 ; 0x63
8019ba2: 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);
8019ba6: 697b ldr r3, [r7, #20]
8019ba8: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019bac: 2301 movs r3, #1
8019bae: 2235 movs r2, #53 ; 0x35
8019bb0: 2000 movs r0, #0
8019bb2: f7ff fadd bl 8019170 <dhcp_option>
8019bb6: 4603 mov r3, r0
8019bb8: 827b strh r3, [r7, #18]
options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type);
8019bba: 697b ldr r3, [r7, #20]
8019bbc: f103 01f0 add.w r1, r3, #240 ; 0xf0
8019bc0: 79fa ldrb r2, [r7, #7]
8019bc2: 8a7b ldrh r3, [r7, #18]
8019bc4: 4618 mov r0, r3
8019bc6: f7ff fb07 bl 80191d8 <dhcp_option_byte>
8019bca: 4603 mov r3, r0
8019bcc: 827b strh r3, [r7, #18]
if (options_out_len) {
8019bce: 683b ldr r3, [r7, #0]
8019bd0: 2b00 cmp r3, #0
8019bd2: d002 beq.n 8019bda <dhcp_create_msg+0x18a>
*options_out_len = options_out_len_loc;
8019bd4: 683b ldr r3, [r7, #0]
8019bd6: 8a7a ldrh r2, [r7, #18]
8019bd8: 801a strh r2, [r3, #0]
}
return p_out;
8019bda: 69bb ldr r3, [r7, #24]
}
8019bdc: 4618 mov r0, r3
8019bde: 3720 adds r7, #32
8019be0: 46bd mov sp, r7
8019be2: bd80 pop {r7, pc}
8019be4: 0801fc18 .word 0x0801fc18
8019be8: 0801ff38 .word 0x0801ff38
8019bec: 0801fc78 .word 0x0801fc78
8019bf0: 0801ff58 .word 0x0801ff58
8019bf4: 0801ff78 .word 0x0801ff78
8019bf8: 20008760 .word 0x20008760
08019bfc <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)
{
8019bfc: b580 push {r7, lr}
8019bfe: b084 sub sp, #16
8019c00: af00 add r7, sp, #0
8019c02: 4603 mov r3, r0
8019c04: 60b9 str r1, [r7, #8]
8019c06: 607a str r2, [r7, #4]
8019c08: 81fb strh r3, [r7, #14]
options[options_out_len++] = DHCP_OPTION_END;
8019c0a: 89fb ldrh r3, [r7, #14]
8019c0c: 1c5a adds r2, r3, #1
8019c0e: 81fa strh r2, [r7, #14]
8019c10: 461a mov r2, r3
8019c12: 68bb ldr r3, [r7, #8]
8019c14: 4413 add r3, r2
8019c16: 22ff movs r2, #255 ; 0xff
8019c18: 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)) &&
8019c1a: e007 b.n 8019c2c <dhcp_option_trailer+0x30>
(options_out_len < DHCP_OPTIONS_LEN)) {
/* add a fill/padding byte */
options[options_out_len++] = 0;
8019c1c: 89fb ldrh r3, [r7, #14]
8019c1e: 1c5a adds r2, r3, #1
8019c20: 81fa strh r2, [r7, #14]
8019c22: 461a mov r2, r3
8019c24: 68bb ldr r3, [r7, #8]
8019c26: 4413 add r3, r2
8019c28: 2200 movs r2, #0
8019c2a: 701a strb r2, [r3, #0]
while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
8019c2c: 89fb ldrh r3, [r7, #14]
8019c2e: 2b43 cmp r3, #67 ; 0x43
8019c30: d904 bls.n 8019c3c <dhcp_option_trailer+0x40>
8019c32: 89fb ldrh r3, [r7, #14]
8019c34: f003 0303 and.w r3, r3, #3
8019c38: 2b00 cmp r3, #0
8019c3a: d002 beq.n 8019c42 <dhcp_option_trailer+0x46>
8019c3c: 89fb ldrh r3, [r7, #14]
8019c3e: 2b43 cmp r3, #67 ; 0x43
8019c40: d9ec bls.n 8019c1c <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));
8019c42: 89fb ldrh r3, [r7, #14]
8019c44: 33f0 adds r3, #240 ; 0xf0
8019c46: b29b uxth r3, r3
8019c48: 4619 mov r1, r3
8019c4a: 6878 ldr r0, [r7, #4]
8019c4c: f7f7 fdc6 bl 80117dc <pbuf_realloc>
}
8019c50: bf00 nop
8019c52: 3710 adds r7, #16
8019c54: 46bd mov sp, r7
8019c56: bd80 pop {r7, pc}
08019c58 <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)
{
8019c58: b480 push {r7}
8019c5a: b085 sub sp, #20
8019c5c: af00 add r7, sp, #0
8019c5e: 6078 str r0, [r7, #4]
if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) {
8019c60: 687b ldr r3, [r7, #4]
8019c62: 2b00 cmp r3, #0
8019c64: d017 beq.n 8019c96 <dhcp_supplied_address+0x3e>
8019c66: 687b ldr r3, [r7, #4]
8019c68: 6a5b ldr r3, [r3, #36] ; 0x24
8019c6a: 2b00 cmp r3, #0
8019c6c: d013 beq.n 8019c96 <dhcp_supplied_address+0x3e>
struct dhcp *dhcp = netif_dhcp_data(netif);
8019c6e: 687b ldr r3, [r7, #4]
8019c70: 6a5b ldr r3, [r3, #36] ; 0x24
8019c72: 60fb str r3, [r7, #12]
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
8019c74: 68fb ldr r3, [r7, #12]
8019c76: 795b ldrb r3, [r3, #5]
8019c78: 2b0a cmp r3, #10
8019c7a: d007 beq.n 8019c8c <dhcp_supplied_address+0x34>
8019c7c: 68fb ldr r3, [r7, #12]
8019c7e: 795b ldrb r3, [r3, #5]
8019c80: 2b05 cmp r3, #5
8019c82: d003 beq.n 8019c8c <dhcp_supplied_address+0x34>
(dhcp->state == DHCP_STATE_REBINDING);
8019c84: 68fb ldr r3, [r7, #12]
8019c86: 795b ldrb r3, [r3, #5]
return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
8019c88: 2b04 cmp r3, #4
8019c8a: d101 bne.n 8019c90 <dhcp_supplied_address+0x38>
8019c8c: 2301 movs r3, #1
8019c8e: e000 b.n 8019c92 <dhcp_supplied_address+0x3a>
8019c90: 2300 movs r3, #0
8019c92: b2db uxtb r3, r3
8019c94: e000 b.n 8019c98 <dhcp_supplied_address+0x40>
}
return 0;
8019c96: 2300 movs r3, #0
}
8019c98: 4618 mov r0, r3
8019c9a: 3714 adds r7, #20
8019c9c: 46bd mov sp, r7
8019c9e: f85d 7b04 ldr.w r7, [sp], #4
8019ca2: 4770 bx lr
08019ca4 <etharp_free_entry>:
#endif /* ARP_QUEUEING */
/** Clean up ARP table entries */
static void
etharp_free_entry(int i)
{
8019ca4: b580 push {r7, lr}
8019ca6: b082 sub sp, #8
8019ca8: af00 add r7, sp, #0
8019caa: 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) {
8019cac: 4915 ldr r1, [pc, #84] ; (8019d04 <etharp_free_entry+0x60>)
8019cae: 687a ldr r2, [r7, #4]
8019cb0: 4613 mov r3, r2
8019cb2: 005b lsls r3, r3, #1
8019cb4: 4413 add r3, r2
8019cb6: 00db lsls r3, r3, #3
8019cb8: 440b add r3, r1
8019cba: 681b ldr r3, [r3, #0]
8019cbc: 2b00 cmp r3, #0
8019cbe: d013 beq.n 8019ce8 <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);
8019cc0: 4910 ldr r1, [pc, #64] ; (8019d04 <etharp_free_entry+0x60>)
8019cc2: 687a ldr r2, [r7, #4]
8019cc4: 4613 mov r3, r2
8019cc6: 005b lsls r3, r3, #1
8019cc8: 4413 add r3, r2
8019cca: 00db lsls r3, r3, #3
8019ccc: 440b add r3, r1
8019cce: 681b ldr r3, [r3, #0]
8019cd0: 4618 mov r0, r3
8019cd2: f7f7 ff09 bl 8011ae8 <pbuf_free>
arp_table[i].q = NULL;
8019cd6: 490b ldr r1, [pc, #44] ; (8019d04 <etharp_free_entry+0x60>)
8019cd8: 687a ldr r2, [r7, #4]
8019cda: 4613 mov r3, r2
8019cdc: 005b lsls r3, r3, #1
8019cde: 4413 add r3, r2
8019ce0: 00db lsls r3, r3, #3
8019ce2: 440b add r3, r1
8019ce4: 2200 movs r2, #0
8019ce6: 601a str r2, [r3, #0]
}
/* recycle entry for re-use */
arp_table[i].state = ETHARP_STATE_EMPTY;
8019ce8: 4906 ldr r1, [pc, #24] ; (8019d04 <etharp_free_entry+0x60>)
8019cea: 687a ldr r2, [r7, #4]
8019cec: 4613 mov r3, r2
8019cee: 005b lsls r3, r3, #1
8019cf0: 4413 add r3, r2
8019cf2: 00db lsls r3, r3, #3
8019cf4: 440b add r3, r1
8019cf6: 3314 adds r3, #20
8019cf8: 2200 movs r2, #0
8019cfa: 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 */
}
8019cfc: bf00 nop
8019cfe: 3708 adds r7, #8
8019d00: 46bd mov sp, r7
8019d02: bd80 pop {r7, pc}
8019d04: 20008764 .word 0x20008764
08019d08 <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)
{
8019d08: b580 push {r7, lr}
8019d0a: b082 sub sp, #8
8019d0c: 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) {
8019d0e: 2300 movs r3, #0
8019d10: 607b str r3, [r7, #4]
8019d12: e096 b.n 8019e42 <etharp_tmr+0x13a>
u8_t state = arp_table[i].state;
8019d14: 494f ldr r1, [pc, #316] ; (8019e54 <etharp_tmr+0x14c>)
8019d16: 687a ldr r2, [r7, #4]
8019d18: 4613 mov r3, r2
8019d1a: 005b lsls r3, r3, #1
8019d1c: 4413 add r3, r2
8019d1e: 00db lsls r3, r3, #3
8019d20: 440b add r3, r1
8019d22: 3314 adds r3, #20
8019d24: 781b ldrb r3, [r3, #0]
8019d26: 70fb strb r3, [r7, #3]
if (state != ETHARP_STATE_EMPTY
8019d28: 78fb ldrb r3, [r7, #3]
8019d2a: 2b00 cmp r3, #0
8019d2c: f000 8086 beq.w 8019e3c <etharp_tmr+0x134>
#if ETHARP_SUPPORT_STATIC_ENTRIES
&& (state != ETHARP_STATE_STATIC)
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
) {
arp_table[i].ctime++;
8019d30: 4948 ldr r1, [pc, #288] ; (8019e54 <etharp_tmr+0x14c>)
8019d32: 687a ldr r2, [r7, #4]
8019d34: 4613 mov r3, r2
8019d36: 005b lsls r3, r3, #1
8019d38: 4413 add r3, r2
8019d3a: 00db lsls r3, r3, #3
8019d3c: 440b add r3, r1
8019d3e: 3312 adds r3, #18
8019d40: 881b ldrh r3, [r3, #0]
8019d42: 3301 adds r3, #1
8019d44: b298 uxth r0, r3
8019d46: 4943 ldr r1, [pc, #268] ; (8019e54 <etharp_tmr+0x14c>)
8019d48: 687a ldr r2, [r7, #4]
8019d4a: 4613 mov r3, r2
8019d4c: 005b lsls r3, r3, #1
8019d4e: 4413 add r3, r2
8019d50: 00db lsls r3, r3, #3
8019d52: 440b add r3, r1
8019d54: 3312 adds r3, #18
8019d56: 4602 mov r2, r0
8019d58: 801a strh r2, [r3, #0]
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
8019d5a: 493e ldr r1, [pc, #248] ; (8019e54 <etharp_tmr+0x14c>)
8019d5c: 687a ldr r2, [r7, #4]
8019d5e: 4613 mov r3, r2
8019d60: 005b lsls r3, r3, #1
8019d62: 4413 add r3, r2
8019d64: 00db lsls r3, r3, #3
8019d66: 440b add r3, r1
8019d68: 3312 adds r3, #18
8019d6a: 881b ldrh r3, [r3, #0]
8019d6c: f5b3 7f96 cmp.w r3, #300 ; 0x12c
8019d70: d215 bcs.n 8019d9e <etharp_tmr+0x96>
((arp_table[i].state == ETHARP_STATE_PENDING) &&
8019d72: 4938 ldr r1, [pc, #224] ; (8019e54 <etharp_tmr+0x14c>)
8019d74: 687a ldr r2, [r7, #4]
8019d76: 4613 mov r3, r2
8019d78: 005b lsls r3, r3, #1
8019d7a: 4413 add r3, r2
8019d7c: 00db lsls r3, r3, #3
8019d7e: 440b add r3, r1
8019d80: 3314 adds r3, #20
8019d82: 781b ldrb r3, [r3, #0]
if ((arp_table[i].ctime >= ARP_MAXAGE) ||
8019d84: 2b01 cmp r3, #1
8019d86: d10e bne.n 8019da6 <etharp_tmr+0x9e>
(arp_table[i].ctime >= ARP_MAXPENDING))) {
8019d88: 4932 ldr r1, [pc, #200] ; (8019e54 <etharp_tmr+0x14c>)
8019d8a: 687a ldr r2, [r7, #4]
8019d8c: 4613 mov r3, r2
8019d8e: 005b lsls r3, r3, #1
8019d90: 4413 add r3, r2
8019d92: 00db lsls r3, r3, #3
8019d94: 440b add r3, r1
8019d96: 3312 adds r3, #18
8019d98: 881b ldrh r3, [r3, #0]
((arp_table[i].state == ETHARP_STATE_PENDING) &&
8019d9a: 2b04 cmp r3, #4
8019d9c: d903 bls.n 8019da6 <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);
8019d9e: 6878 ldr r0, [r7, #4]
8019da0: f7ff ff80 bl 8019ca4 <etharp_free_entry>
8019da4: e04a b.n 8019e3c <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) {
8019da6: 492b ldr r1, [pc, #172] ; (8019e54 <etharp_tmr+0x14c>)
8019da8: 687a ldr r2, [r7, #4]
8019daa: 4613 mov r3, r2
8019dac: 005b lsls r3, r3, #1
8019dae: 4413 add r3, r2
8019db0: 00db lsls r3, r3, #3
8019db2: 440b add r3, r1
8019db4: 3314 adds r3, #20
8019db6: 781b ldrb r3, [r3, #0]
8019db8: 2b03 cmp r3, #3
8019dba: d10a bne.n 8019dd2 <etharp_tmr+0xca>
/* Don't send more than one request every 2 seconds. */
arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2;
8019dbc: 4925 ldr r1, [pc, #148] ; (8019e54 <etharp_tmr+0x14c>)
8019dbe: 687a ldr r2, [r7, #4]
8019dc0: 4613 mov r3, r2
8019dc2: 005b lsls r3, r3, #1
8019dc4: 4413 add r3, r2
8019dc6: 00db lsls r3, r3, #3
8019dc8: 440b add r3, r1
8019dca: 3314 adds r3, #20
8019dcc: 2204 movs r2, #4
8019dce: 701a strb r2, [r3, #0]
8019dd0: e034 b.n 8019e3c <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) {
8019dd2: 4920 ldr r1, [pc, #128] ; (8019e54 <etharp_tmr+0x14c>)
8019dd4: 687a ldr r2, [r7, #4]
8019dd6: 4613 mov r3, r2
8019dd8: 005b lsls r3, r3, #1
8019dda: 4413 add r3, r2
8019ddc: 00db lsls r3, r3, #3
8019dde: 440b add r3, r1
8019de0: 3314 adds r3, #20
8019de2: 781b ldrb r3, [r3, #0]
8019de4: 2b04 cmp r3, #4
8019de6: d10a bne.n 8019dfe <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;
8019de8: 491a ldr r1, [pc, #104] ; (8019e54 <etharp_tmr+0x14c>)
8019dea: 687a ldr r2, [r7, #4]
8019dec: 4613 mov r3, r2
8019dee: 005b lsls r3, r3, #1
8019df0: 4413 add r3, r2
8019df2: 00db lsls r3, r3, #3
8019df4: 440b add r3, r1
8019df6: 3314 adds r3, #20
8019df8: 2202 movs r2, #2
8019dfa: 701a strb r2, [r3, #0]
8019dfc: e01e b.n 8019e3c <etharp_tmr+0x134>
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
8019dfe: 4915 ldr r1, [pc, #84] ; (8019e54 <etharp_tmr+0x14c>)
8019e00: 687a ldr r2, [r7, #4]
8019e02: 4613 mov r3, r2
8019e04: 005b lsls r3, r3, #1
8019e06: 4413 add r3, r2
8019e08: 00db lsls r3, r3, #3
8019e0a: 440b add r3, r1
8019e0c: 3314 adds r3, #20
8019e0e: 781b ldrb r3, [r3, #0]
8019e10: 2b01 cmp r3, #1
8019e12: d113 bne.n 8019e3c <etharp_tmr+0x134>
/* still pending, resend an ARP query */
etharp_request(arp_table[i].netif, &arp_table[i].ipaddr);
8019e14: 490f ldr r1, [pc, #60] ; (8019e54 <etharp_tmr+0x14c>)
8019e16: 687a ldr r2, [r7, #4]
8019e18: 4613 mov r3, r2
8019e1a: 005b lsls r3, r3, #1
8019e1c: 4413 add r3, r2
8019e1e: 00db lsls r3, r3, #3
8019e20: 440b add r3, r1
8019e22: 3308 adds r3, #8
8019e24: 6818 ldr r0, [r3, #0]
8019e26: 687a ldr r2, [r7, #4]
8019e28: 4613 mov r3, r2
8019e2a: 005b lsls r3, r3, #1
8019e2c: 4413 add r3, r2
8019e2e: 00db lsls r3, r3, #3
8019e30: 4a08 ldr r2, [pc, #32] ; (8019e54 <etharp_tmr+0x14c>)
8019e32: 4413 add r3, r2
8019e34: 3304 adds r3, #4
8019e36: 4619 mov r1, r3
8019e38: f000 fe72 bl 801ab20 <etharp_request>
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
8019e3c: 687b ldr r3, [r7, #4]
8019e3e: 3301 adds r3, #1
8019e40: 607b str r3, [r7, #4]
8019e42: 687b ldr r3, [r7, #4]
8019e44: 2b09 cmp r3, #9
8019e46: f77f af65 ble.w 8019d14 <etharp_tmr+0xc>
}
}
}
}
8019e4a: bf00 nop
8019e4c: 3708 adds r7, #8
8019e4e: 46bd mov sp, r7
8019e50: bd80 pop {r7, pc}
8019e52: bf00 nop
8019e54: 20008764 .word 0x20008764
08019e58 <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)
{
8019e58: b580 push {r7, lr}
8019e5a: b08a sub sp, #40 ; 0x28
8019e5c: af00 add r7, sp, #0
8019e5e: 60f8 str r0, [r7, #12]
8019e60: 460b mov r3, r1
8019e62: 607a str r2, [r7, #4]
8019e64: 72fb strb r3, [r7, #11]
s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE;
8019e66: 230a movs r3, #10
8019e68: 84fb strh r3, [r7, #38] ; 0x26
8019e6a: 230a movs r3, #10
8019e6c: 84bb strh r3, [r7, #36] ; 0x24
s16_t empty = ARP_TABLE_SIZE;
8019e6e: 230a movs r3, #10
8019e70: 847b strh r3, [r7, #34] ; 0x22
s16_t i = 0;
8019e72: 2300 movs r3, #0
8019e74: 843b strh r3, [r7, #32]
/* oldest entry with packets on queue */
s16_t old_queue = ARP_TABLE_SIZE;
8019e76: 230a movs r3, #10
8019e78: 83fb strh r3, [r7, #30]
/* its age */
u16_t age_queue = 0, age_pending = 0, age_stable = 0;
8019e7a: 2300 movs r3, #0
8019e7c: 83bb strh r3, [r7, #28]
8019e7e: 2300 movs r3, #0
8019e80: 837b strh r3, [r7, #26]
8019e82: 2300 movs r3, #0
8019e84: 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) {
8019e86: 2300 movs r3, #0
8019e88: 843b strh r3, [r7, #32]
8019e8a: e0ae b.n 8019fea <etharp_find_entry+0x192>
u8_t state = arp_table[i].state;
8019e8c: f9b7 2020 ldrsh.w r2, [r7, #32]
8019e90: 49a6 ldr r1, [pc, #664] ; (801a12c <etharp_find_entry+0x2d4>)
8019e92: 4613 mov r3, r2
8019e94: 005b lsls r3, r3, #1
8019e96: 4413 add r3, r2
8019e98: 00db lsls r3, r3, #3
8019e9a: 440b add r3, r1
8019e9c: 3314 adds r3, #20
8019e9e: 781b ldrb r3, [r3, #0]
8019ea0: 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)) {
8019ea2: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
8019ea6: 2b0a cmp r3, #10
8019ea8: d105 bne.n 8019eb6 <etharp_find_entry+0x5e>
8019eaa: 7dfb ldrb r3, [r7, #23]
8019eac: 2b00 cmp r3, #0
8019eae: d102 bne.n 8019eb6 <etharp_find_entry+0x5e>
LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i));
/* remember first empty entry */
empty = i;
8019eb0: 8c3b ldrh r3, [r7, #32]
8019eb2: 847b strh r3, [r7, #34] ; 0x22
8019eb4: e095 b.n 8019fe2 <etharp_find_entry+0x18a>
} else if (state != ETHARP_STATE_EMPTY) {
8019eb6: 7dfb ldrb r3, [r7, #23]
8019eb8: 2b00 cmp r3, #0
8019eba: f000 8092 beq.w 8019fe2 <etharp_find_entry+0x18a>
LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE",
8019ebe: 7dfb ldrb r3, [r7, #23]
8019ec0: 2b01 cmp r3, #1
8019ec2: d009 beq.n 8019ed8 <etharp_find_entry+0x80>
8019ec4: 7dfb ldrb r3, [r7, #23]
8019ec6: 2b01 cmp r3, #1
8019ec8: d806 bhi.n 8019ed8 <etharp_find_entry+0x80>
8019eca: 4b99 ldr r3, [pc, #612] ; (801a130 <etharp_find_entry+0x2d8>)
8019ecc: f44f 7292 mov.w r2, #292 ; 0x124
8019ed0: 4998 ldr r1, [pc, #608] ; (801a134 <etharp_find_entry+0x2dc>)
8019ed2: 4899 ldr r0, [pc, #612] ; (801a138 <etharp_find_entry+0x2e0>)
8019ed4: f002 fb38 bl 801c548 <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)
8019ed8: 68fb ldr r3, [r7, #12]
8019eda: 2b00 cmp r3, #0
8019edc: d020 beq.n 8019f20 <etharp_find_entry+0xc8>
8019ede: 68fb ldr r3, [r7, #12]
8019ee0: 6819 ldr r1, [r3, #0]
8019ee2: f9b7 2020 ldrsh.w r2, [r7, #32]
8019ee6: 4891 ldr r0, [pc, #580] ; (801a12c <etharp_find_entry+0x2d4>)
8019ee8: 4613 mov r3, r2
8019eea: 005b lsls r3, r3, #1
8019eec: 4413 add r3, r2
8019eee: 00db lsls r3, r3, #3
8019ef0: 4403 add r3, r0
8019ef2: 3304 adds r3, #4
8019ef4: 681b ldr r3, [r3, #0]
8019ef6: 4299 cmp r1, r3
8019ef8: d112 bne.n 8019f20 <etharp_find_entry+0xc8>
#if ETHARP_TABLE_MATCH_NETIF
&& ((netif == NULL) || (netif == arp_table[i].netif))
8019efa: 687b ldr r3, [r7, #4]
8019efc: 2b00 cmp r3, #0
8019efe: d00c beq.n 8019f1a <etharp_find_entry+0xc2>
8019f00: f9b7 2020 ldrsh.w r2, [r7, #32]
8019f04: 4989 ldr r1, [pc, #548] ; (801a12c <etharp_find_entry+0x2d4>)
8019f06: 4613 mov r3, r2
8019f08: 005b lsls r3, r3, #1
8019f0a: 4413 add r3, r2
8019f0c: 00db lsls r3, r3, #3
8019f0e: 440b add r3, r1
8019f10: 3308 adds r3, #8
8019f12: 681b ldr r3, [r3, #0]
8019f14: 687a ldr r2, [r7, #4]
8019f16: 429a cmp r2, r3
8019f18: d102 bne.n 8019f20 <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;
8019f1a: f9b7 3020 ldrsh.w r3, [r7, #32]
8019f1e: e100 b.n 801a122 <etharp_find_entry+0x2ca>
}
/* pending entry? */
if (state == ETHARP_STATE_PENDING) {
8019f20: 7dfb ldrb r3, [r7, #23]
8019f22: 2b01 cmp r3, #1
8019f24: d140 bne.n 8019fa8 <etharp_find_entry+0x150>
/* pending with queued packets? */
if (arp_table[i].q != NULL) {
8019f26: f9b7 2020 ldrsh.w r2, [r7, #32]
8019f2a: 4980 ldr r1, [pc, #512] ; (801a12c <etharp_find_entry+0x2d4>)
8019f2c: 4613 mov r3, r2
8019f2e: 005b lsls r3, r3, #1
8019f30: 4413 add r3, r2
8019f32: 00db lsls r3, r3, #3
8019f34: 440b add r3, r1
8019f36: 681b ldr r3, [r3, #0]
8019f38: 2b00 cmp r3, #0
8019f3a: d01a beq.n 8019f72 <etharp_find_entry+0x11a>
if (arp_table[i].ctime >= age_queue) {
8019f3c: f9b7 2020 ldrsh.w r2, [r7, #32]
8019f40: 497a ldr r1, [pc, #488] ; (801a12c <etharp_find_entry+0x2d4>)
8019f42: 4613 mov r3, r2
8019f44: 005b lsls r3, r3, #1
8019f46: 4413 add r3, r2
8019f48: 00db lsls r3, r3, #3
8019f4a: 440b add r3, r1
8019f4c: 3312 adds r3, #18
8019f4e: 881b ldrh r3, [r3, #0]
8019f50: 8bba ldrh r2, [r7, #28]
8019f52: 429a cmp r2, r3
8019f54: d845 bhi.n 8019fe2 <etharp_find_entry+0x18a>
old_queue = i;
8019f56: 8c3b ldrh r3, [r7, #32]
8019f58: 83fb strh r3, [r7, #30]
age_queue = arp_table[i].ctime;
8019f5a: f9b7 2020 ldrsh.w r2, [r7, #32]
8019f5e: 4973 ldr r1, [pc, #460] ; (801a12c <etharp_find_entry+0x2d4>)
8019f60: 4613 mov r3, r2
8019f62: 005b lsls r3, r3, #1
8019f64: 4413 add r3, r2
8019f66: 00db lsls r3, r3, #3
8019f68: 440b add r3, r1
8019f6a: 3312 adds r3, #18
8019f6c: 881b ldrh r3, [r3, #0]
8019f6e: 83bb strh r3, [r7, #28]
8019f70: e037 b.n 8019fe2 <etharp_find_entry+0x18a>
}
} else
/* pending without queued packets? */
{
if (arp_table[i].ctime >= age_pending) {
8019f72: f9b7 2020 ldrsh.w r2, [r7, #32]
8019f76: 496d ldr r1, [pc, #436] ; (801a12c <etharp_find_entry+0x2d4>)
8019f78: 4613 mov r3, r2
8019f7a: 005b lsls r3, r3, #1
8019f7c: 4413 add r3, r2
8019f7e: 00db lsls r3, r3, #3
8019f80: 440b add r3, r1
8019f82: 3312 adds r3, #18
8019f84: 881b ldrh r3, [r3, #0]
8019f86: 8b7a ldrh r2, [r7, #26]
8019f88: 429a cmp r2, r3
8019f8a: d82a bhi.n 8019fe2 <etharp_find_entry+0x18a>
old_pending = i;
8019f8c: 8c3b ldrh r3, [r7, #32]
8019f8e: 84fb strh r3, [r7, #38] ; 0x26
age_pending = arp_table[i].ctime;
8019f90: f9b7 2020 ldrsh.w r2, [r7, #32]
8019f94: 4965 ldr r1, [pc, #404] ; (801a12c <etharp_find_entry+0x2d4>)
8019f96: 4613 mov r3, r2
8019f98: 005b lsls r3, r3, #1
8019f9a: 4413 add r3, r2
8019f9c: 00db lsls r3, r3, #3
8019f9e: 440b add r3, r1
8019fa0: 3312 adds r3, #18
8019fa2: 881b ldrh r3, [r3, #0]
8019fa4: 837b strh r3, [r7, #26]
8019fa6: e01c b.n 8019fe2 <etharp_find_entry+0x18a>
}
}
/* stable entry? */
} else if (state >= ETHARP_STATE_STABLE) {
8019fa8: 7dfb ldrb r3, [r7, #23]
8019faa: 2b01 cmp r3, #1
8019fac: d919 bls.n 8019fe2 <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) {
8019fae: f9b7 2020 ldrsh.w r2, [r7, #32]
8019fb2: 495e ldr r1, [pc, #376] ; (801a12c <etharp_find_entry+0x2d4>)
8019fb4: 4613 mov r3, r2
8019fb6: 005b lsls r3, r3, #1
8019fb8: 4413 add r3, r2
8019fba: 00db lsls r3, r3, #3
8019fbc: 440b add r3, r1
8019fbe: 3312 adds r3, #18
8019fc0: 881b ldrh r3, [r3, #0]
8019fc2: 8b3a ldrh r2, [r7, #24]
8019fc4: 429a cmp r2, r3
8019fc6: d80c bhi.n 8019fe2 <etharp_find_entry+0x18a>
old_stable = i;
8019fc8: 8c3b ldrh r3, [r7, #32]
8019fca: 84bb strh r3, [r7, #36] ; 0x24
age_stable = arp_table[i].ctime;
8019fcc: f9b7 2020 ldrsh.w r2, [r7, #32]
8019fd0: 4956 ldr r1, [pc, #344] ; (801a12c <etharp_find_entry+0x2d4>)
8019fd2: 4613 mov r3, r2
8019fd4: 005b lsls r3, r3, #1
8019fd6: 4413 add r3, r2
8019fd8: 00db lsls r3, r3, #3
8019fda: 440b add r3, r1
8019fdc: 3312 adds r3, #18
8019fde: 881b ldrh r3, [r3, #0]
8019fe0: 833b strh r3, [r7, #24]
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
8019fe2: 8c3b ldrh r3, [r7, #32]
8019fe4: 3301 adds r3, #1
8019fe6: b29b uxth r3, r3
8019fe8: 843b strh r3, [r7, #32]
8019fea: f9b7 3020 ldrsh.w r3, [r7, #32]
8019fee: 2b09 cmp r3, #9
8019ff0: f77f af4c ble.w 8019e8c <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) ||
8019ff4: 7afb ldrb r3, [r7, #11]
8019ff6: f003 0302 and.w r3, r3, #2
8019ffa: 2b00 cmp r3, #0
8019ffc: d108 bne.n 801a010 <etharp_find_entry+0x1b8>
8019ffe: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
801a002: 2b0a cmp r3, #10
801a004: d107 bne.n 801a016 <etharp_find_entry+0x1be>
/* or no empty entry found and not allowed to recycle? */
((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) {
801a006: 7afb ldrb r3, [r7, #11]
801a008: f003 0301 and.w r3, r3, #1
801a00c: 2b00 cmp r3, #0
801a00e: d102 bne.n 801a016 <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;
801a010: f04f 33ff mov.w r3, #4294967295
801a014: e085 b.n 801a122 <etharp_find_entry+0x2ca>
*
* { ETHARP_FLAG_TRY_HARD is set at this point }
*/
/* 1) empty entry available? */
if (empty < ARP_TABLE_SIZE) {
801a016: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22
801a01a: 2b09 cmp r3, #9
801a01c: dc02 bgt.n 801a024 <etharp_find_entry+0x1cc>
i = empty;
801a01e: 8c7b ldrh r3, [r7, #34] ; 0x22
801a020: 843b strh r3, [r7, #32]
801a022: e039 b.n 801a098 <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) {
801a024: f9b7 3024 ldrsh.w r3, [r7, #36] ; 0x24
801a028: 2b09 cmp r3, #9
801a02a: dc14 bgt.n 801a056 <etharp_find_entry+0x1fe>
/* recycle oldest stable*/
i = old_stable;
801a02c: 8cbb ldrh r3, [r7, #36] ; 0x24
801a02e: 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);
801a030: f9b7 2020 ldrsh.w r2, [r7, #32]
801a034: 493d ldr r1, [pc, #244] ; (801a12c <etharp_find_entry+0x2d4>)
801a036: 4613 mov r3, r2
801a038: 005b lsls r3, r3, #1
801a03a: 4413 add r3, r2
801a03c: 00db lsls r3, r3, #3
801a03e: 440b add r3, r1
801a040: 681b ldr r3, [r3, #0]
801a042: 2b00 cmp r3, #0
801a044: d018 beq.n 801a078 <etharp_find_entry+0x220>
801a046: 4b3a ldr r3, [pc, #232] ; (801a130 <etharp_find_entry+0x2d8>)
801a048: f240 126d movw r2, #365 ; 0x16d
801a04c: 493b ldr r1, [pc, #236] ; (801a13c <etharp_find_entry+0x2e4>)
801a04e: 483a ldr r0, [pc, #232] ; (801a138 <etharp_find_entry+0x2e0>)
801a050: f002 fa7a bl 801c548 <iprintf>
801a054: e010 b.n 801a078 <etharp_find_entry+0x220>
/* 3) found recyclable pending entry without queued packets? */
} else if (old_pending < ARP_TABLE_SIZE) {
801a056: f9b7 3026 ldrsh.w r3, [r7, #38] ; 0x26
801a05a: 2b09 cmp r3, #9
801a05c: dc02 bgt.n 801a064 <etharp_find_entry+0x20c>
/* recycle oldest pending */
i = old_pending;
801a05e: 8cfb ldrh r3, [r7, #38] ; 0x26
801a060: 843b strh r3, [r7, #32]
801a062: e009 b.n 801a078 <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) {
801a064: f9b7 301e ldrsh.w r3, [r7, #30]
801a068: 2b09 cmp r3, #9
801a06a: dc02 bgt.n 801a072 <etharp_find_entry+0x21a>
/* recycle oldest pending (queued packets are free in etharp_free_entry) */
i = old_queue;
801a06c: 8bfb ldrh r3, [r7, #30]
801a06e: 843b strh r3, [r7, #32]
801a070: e002 b.n 801a078 <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;
801a072: f04f 33ff mov.w r3, #4294967295
801a076: e054 b.n 801a122 <etharp_find_entry+0x2ca>
}
/* { empty or recyclable entry found } */
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
801a078: f9b7 3020 ldrsh.w r3, [r7, #32]
801a07c: 2b09 cmp r3, #9
801a07e: dd06 ble.n 801a08e <etharp_find_entry+0x236>
801a080: 4b2b ldr r3, [pc, #172] ; (801a130 <etharp_find_entry+0x2d8>)
801a082: f240 127f movw r2, #383 ; 0x17f
801a086: 492e ldr r1, [pc, #184] ; (801a140 <etharp_find_entry+0x2e8>)
801a088: 482b ldr r0, [pc, #172] ; (801a138 <etharp_find_entry+0x2e0>)
801a08a: f002 fa5d bl 801c548 <iprintf>
etharp_free_entry(i);
801a08e: f9b7 3020 ldrsh.w r3, [r7, #32]
801a092: 4618 mov r0, r3
801a094: f7ff fe06 bl 8019ca4 <etharp_free_entry>
}
LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
801a098: f9b7 3020 ldrsh.w r3, [r7, #32]
801a09c: 2b09 cmp r3, #9
801a09e: dd06 ble.n 801a0ae <etharp_find_entry+0x256>
801a0a0: 4b23 ldr r3, [pc, #140] ; (801a130 <etharp_find_entry+0x2d8>)
801a0a2: f240 1283 movw r2, #387 ; 0x183
801a0a6: 4926 ldr r1, [pc, #152] ; (801a140 <etharp_find_entry+0x2e8>)
801a0a8: 4823 ldr r0, [pc, #140] ; (801a138 <etharp_find_entry+0x2e0>)
801a0aa: f002 fa4d bl 801c548 <iprintf>
LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
801a0ae: f9b7 2020 ldrsh.w r2, [r7, #32]
801a0b2: 491e ldr r1, [pc, #120] ; (801a12c <etharp_find_entry+0x2d4>)
801a0b4: 4613 mov r3, r2
801a0b6: 005b lsls r3, r3, #1
801a0b8: 4413 add r3, r2
801a0ba: 00db lsls r3, r3, #3
801a0bc: 440b add r3, r1
801a0be: 3314 adds r3, #20
801a0c0: 781b ldrb r3, [r3, #0]
801a0c2: 2b00 cmp r3, #0
801a0c4: d006 beq.n 801a0d4 <etharp_find_entry+0x27c>
801a0c6: 4b1a ldr r3, [pc, #104] ; (801a130 <etharp_find_entry+0x2d8>)
801a0c8: f240 1285 movw r2, #389 ; 0x185
801a0cc: 491d ldr r1, [pc, #116] ; (801a144 <etharp_find_entry+0x2ec>)
801a0ce: 481a ldr r0, [pc, #104] ; (801a138 <etharp_find_entry+0x2e0>)
801a0d0: f002 fa3a bl 801c548 <iprintf>
arp_table[i].state == ETHARP_STATE_EMPTY);
/* IP address given? */
if (ipaddr != NULL) {
801a0d4: 68fb ldr r3, [r7, #12]
801a0d6: 2b00 cmp r3, #0
801a0d8: d00b beq.n 801a0f2 <etharp_find_entry+0x29a>
/* set IP address */
ip4_addr_copy(arp_table[i].ipaddr, *ipaddr);
801a0da: f9b7 2020 ldrsh.w r2, [r7, #32]
801a0de: 68fb ldr r3, [r7, #12]
801a0e0: 6819 ldr r1, [r3, #0]
801a0e2: 4812 ldr r0, [pc, #72] ; (801a12c <etharp_find_entry+0x2d4>)
801a0e4: 4613 mov r3, r2
801a0e6: 005b lsls r3, r3, #1
801a0e8: 4413 add r3, r2
801a0ea: 00db lsls r3, r3, #3
801a0ec: 4403 add r3, r0
801a0ee: 3304 adds r3, #4
801a0f0: 6019 str r1, [r3, #0]
}
arp_table[i].ctime = 0;
801a0f2: f9b7 2020 ldrsh.w r2, [r7, #32]
801a0f6: 490d ldr r1, [pc, #52] ; (801a12c <etharp_find_entry+0x2d4>)
801a0f8: 4613 mov r3, r2
801a0fa: 005b lsls r3, r3, #1
801a0fc: 4413 add r3, r2
801a0fe: 00db lsls r3, r3, #3
801a100: 440b add r3, r1
801a102: 3312 adds r3, #18
801a104: 2200 movs r2, #0
801a106: 801a strh r2, [r3, #0]
#if ETHARP_TABLE_MATCH_NETIF
arp_table[i].netif = netif;
801a108: f9b7 2020 ldrsh.w r2, [r7, #32]
801a10c: 4907 ldr r1, [pc, #28] ; (801a12c <etharp_find_entry+0x2d4>)
801a10e: 4613 mov r3, r2
801a110: 005b lsls r3, r3, #1
801a112: 4413 add r3, r2
801a114: 00db lsls r3, r3, #3
801a116: 440b add r3, r1
801a118: 3308 adds r3, #8
801a11a: 687a ldr r2, [r7, #4]
801a11c: 601a str r2, [r3, #0]
#endif /* ETHARP_TABLE_MATCH_NETIF */
return (s16_t)i;
801a11e: f9b7 3020 ldrsh.w r3, [r7, #32]
}
801a122: 4618 mov r0, r3
801a124: 3728 adds r7, #40 ; 0x28
801a126: 46bd mov sp, r7
801a128: bd80 pop {r7, pc}
801a12a: bf00 nop
801a12c: 20008764 .word 0x20008764
801a130: 0801ffb8 .word 0x0801ffb8
801a134: 0801fff0 .word 0x0801fff0
801a138: 08020030 .word 0x08020030
801a13c: 08020058 .word 0x08020058
801a140: 08020070 .word 0x08020070
801a144: 08020084 .word 0x08020084
0801a148 <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)
{
801a148: b580 push {r7, lr}
801a14a: b088 sub sp, #32
801a14c: af02 add r7, sp, #8
801a14e: 60f8 str r0, [r7, #12]
801a150: 60b9 str r1, [r7, #8]
801a152: 607a str r2, [r7, #4]
801a154: 70fb strb r3, [r7, #3]
s16_t i;
LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
801a156: 68fb ldr r3, [r7, #12]
801a158: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
801a15c: 2b06 cmp r3, #6
801a15e: d006 beq.n 801a16e <etharp_update_arp_entry+0x26>
801a160: 4b48 ldr r3, [pc, #288] ; (801a284 <etharp_update_arp_entry+0x13c>)
801a162: f240 12a9 movw r2, #425 ; 0x1a9
801a166: 4948 ldr r1, [pc, #288] ; (801a288 <etharp_update_arp_entry+0x140>)
801a168: 4848 ldr r0, [pc, #288] ; (801a28c <etharp_update_arp_entry+0x144>)
801a16a: f002 f9ed bl 801c548 <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) ||
801a16e: 68bb ldr r3, [r7, #8]
801a170: 2b00 cmp r3, #0
801a172: d012 beq.n 801a19a <etharp_update_arp_entry+0x52>
801a174: 68bb ldr r3, [r7, #8]
801a176: 681b ldr r3, [r3, #0]
801a178: 2b00 cmp r3, #0
801a17a: d00e beq.n 801a19a <etharp_update_arp_entry+0x52>
ip4_addr_isbroadcast(ipaddr, netif) ||
801a17c: 68bb ldr r3, [r7, #8]
801a17e: 681b ldr r3, [r3, #0]
801a180: 68f9 ldr r1, [r7, #12]
801a182: 4618 mov r0, r3
801a184: f001 f91e bl 801b3c4 <ip4_addr_isbroadcast_u32>
801a188: 4603 mov r3, r0
if (ip4_addr_isany(ipaddr) ||
801a18a: 2b00 cmp r3, #0
801a18c: d105 bne.n 801a19a <etharp_update_arp_entry+0x52>
ip4_addr_ismulticast(ipaddr)) {
801a18e: 68bb ldr r3, [r7, #8]
801a190: 681b ldr r3, [r3, #0]
801a192: f003 03f0 and.w r3, r3, #240 ; 0xf0
ip4_addr_isbroadcast(ipaddr, netif) ||
801a196: 2be0 cmp r3, #224 ; 0xe0
801a198: d102 bne.n 801a1a0 <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;
801a19a: f06f 030f mvn.w r3, #15
801a19e: e06c b.n 801a27a <etharp_update_arp_entry+0x132>
}
/* find or create ARP entry */
i = etharp_find_entry(ipaddr, flags, netif);
801a1a0: 78fb ldrb r3, [r7, #3]
801a1a2: 68fa ldr r2, [r7, #12]
801a1a4: 4619 mov r1, r3
801a1a6: 68b8 ldr r0, [r7, #8]
801a1a8: f7ff fe56 bl 8019e58 <etharp_find_entry>
801a1ac: 4603 mov r3, r0
801a1ae: 82fb strh r3, [r7, #22]
/* bail out if no entry could be found */
if (i < 0) {
801a1b0: f9b7 3016 ldrsh.w r3, [r7, #22]
801a1b4: 2b00 cmp r3, #0
801a1b6: da02 bge.n 801a1be <etharp_update_arp_entry+0x76>
return (err_t)i;
801a1b8: 8afb ldrh r3, [r7, #22]
801a1ba: b25b sxtb r3, r3
801a1bc: e05d b.n 801a27a <etharp_update_arp_entry+0x132>
return ERR_VAL;
} else
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
{
/* mark it stable */
arp_table[i].state = ETHARP_STATE_STABLE;
801a1be: f9b7 2016 ldrsh.w r2, [r7, #22]
801a1c2: 4933 ldr r1, [pc, #204] ; (801a290 <etharp_update_arp_entry+0x148>)
801a1c4: 4613 mov r3, r2
801a1c6: 005b lsls r3, r3, #1
801a1c8: 4413 add r3, r2
801a1ca: 00db lsls r3, r3, #3
801a1cc: 440b add r3, r1
801a1ce: 3314 adds r3, #20
801a1d0: 2202 movs r2, #2
801a1d2: 701a strb r2, [r3, #0]
}
/* record network interface */
arp_table[i].netif = netif;
801a1d4: f9b7 2016 ldrsh.w r2, [r7, #22]
801a1d8: 492d ldr r1, [pc, #180] ; (801a290 <etharp_update_arp_entry+0x148>)
801a1da: 4613 mov r3, r2
801a1dc: 005b lsls r3, r3, #1
801a1de: 4413 add r3, r2
801a1e0: 00db lsls r3, r3, #3
801a1e2: 440b add r3, r1
801a1e4: 3308 adds r3, #8
801a1e6: 68fa ldr r2, [r7, #12]
801a1e8: 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);
801a1ea: f9b7 2016 ldrsh.w r2, [r7, #22]
801a1ee: 4613 mov r3, r2
801a1f0: 005b lsls r3, r3, #1
801a1f2: 4413 add r3, r2
801a1f4: 00db lsls r3, r3, #3
801a1f6: 3308 adds r3, #8
801a1f8: 4a25 ldr r2, [pc, #148] ; (801a290 <etharp_update_arp_entry+0x148>)
801a1fa: 4413 add r3, r2
801a1fc: 3304 adds r3, #4
801a1fe: 2206 movs r2, #6
801a200: 6879 ldr r1, [r7, #4]
801a202: 4618 mov r0, r3
801a204: f002 f973 bl 801c4ee <memcpy>
/* reset time stamp */
arp_table[i].ctime = 0;
801a208: f9b7 2016 ldrsh.w r2, [r7, #22]
801a20c: 4920 ldr r1, [pc, #128] ; (801a290 <etharp_update_arp_entry+0x148>)
801a20e: 4613 mov r3, r2
801a210: 005b lsls r3, r3, #1
801a212: 4413 add r3, r2
801a214: 00db lsls r3, r3, #3
801a216: 440b add r3, r1
801a218: 3312 adds r3, #18
801a21a: 2200 movs r2, #0
801a21c: 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) {
801a21e: f9b7 2016 ldrsh.w r2, [r7, #22]
801a222: 491b ldr r1, [pc, #108] ; (801a290 <etharp_update_arp_entry+0x148>)
801a224: 4613 mov r3, r2
801a226: 005b lsls r3, r3, #1
801a228: 4413 add r3, r2
801a22a: 00db lsls r3, r3, #3
801a22c: 440b add r3, r1
801a22e: 681b ldr r3, [r3, #0]
801a230: 2b00 cmp r3, #0
801a232: d021 beq.n 801a278 <etharp_update_arp_entry+0x130>
struct pbuf *p = arp_table[i].q;
801a234: f9b7 2016 ldrsh.w r2, [r7, #22]
801a238: 4915 ldr r1, [pc, #84] ; (801a290 <etharp_update_arp_entry+0x148>)
801a23a: 4613 mov r3, r2
801a23c: 005b lsls r3, r3, #1
801a23e: 4413 add r3, r2
801a240: 00db lsls r3, r3, #3
801a242: 440b add r3, r1
801a244: 681b ldr r3, [r3, #0]
801a246: 613b str r3, [r7, #16]
arp_table[i].q = NULL;
801a248: f9b7 2016 ldrsh.w r2, [r7, #22]
801a24c: 4910 ldr r1, [pc, #64] ; (801a290 <etharp_update_arp_entry+0x148>)
801a24e: 4613 mov r3, r2
801a250: 005b lsls r3, r3, #1
801a252: 4413 add r3, r2
801a254: 00db lsls r3, r3, #3
801a256: 440b add r3, r1
801a258: 2200 movs r2, #0
801a25a: 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);
801a25c: 68fb ldr r3, [r7, #12]
801a25e: f103 022a add.w r2, r3, #42 ; 0x2a
801a262: f44f 6300 mov.w r3, #2048 ; 0x800
801a266: 9300 str r3, [sp, #0]
801a268: 687b ldr r3, [r7, #4]
801a26a: 6939 ldr r1, [r7, #16]
801a26c: 68f8 ldr r0, [r7, #12]
801a26e: f001 ffad bl 801c1cc <ethernet_output>
/* free the queued IP packet */
pbuf_free(p);
801a272: 6938 ldr r0, [r7, #16]
801a274: f7f7 fc38 bl 8011ae8 <pbuf_free>
}
return ERR_OK;
801a278: 2300 movs r3, #0
}
801a27a: 4618 mov r0, r3
801a27c: 3718 adds r7, #24
801a27e: 46bd mov sp, r7
801a280: bd80 pop {r7, pc}
801a282: bf00 nop
801a284: 0801ffb8 .word 0x0801ffb8
801a288: 080200b0 .word 0x080200b0
801a28c: 08020030 .word 0x08020030
801a290: 20008764 .word 0x20008764
0801a294 <etharp_cleanup_netif>:
*
* @param netif points to a network interface
*/
void
etharp_cleanup_netif(struct netif *netif)
{
801a294: b580 push {r7, lr}
801a296: b084 sub sp, #16
801a298: af00 add r7, sp, #0
801a29a: 6078 str r0, [r7, #4]
int i;
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
801a29c: 2300 movs r3, #0
801a29e: 60fb str r3, [r7, #12]
801a2a0: e01e b.n 801a2e0 <etharp_cleanup_netif+0x4c>
u8_t state = arp_table[i].state;
801a2a2: 4913 ldr r1, [pc, #76] ; (801a2f0 <etharp_cleanup_netif+0x5c>)
801a2a4: 68fa ldr r2, [r7, #12]
801a2a6: 4613 mov r3, r2
801a2a8: 005b lsls r3, r3, #1
801a2aa: 4413 add r3, r2
801a2ac: 00db lsls r3, r3, #3
801a2ae: 440b add r3, r1
801a2b0: 3314 adds r3, #20
801a2b2: 781b ldrb r3, [r3, #0]
801a2b4: 72fb strb r3, [r7, #11]
if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) {
801a2b6: 7afb ldrb r3, [r7, #11]
801a2b8: 2b00 cmp r3, #0
801a2ba: d00e beq.n 801a2da <etharp_cleanup_netif+0x46>
801a2bc: 490c ldr r1, [pc, #48] ; (801a2f0 <etharp_cleanup_netif+0x5c>)
801a2be: 68fa ldr r2, [r7, #12]
801a2c0: 4613 mov r3, r2
801a2c2: 005b lsls r3, r3, #1
801a2c4: 4413 add r3, r2
801a2c6: 00db lsls r3, r3, #3
801a2c8: 440b add r3, r1
801a2ca: 3308 adds r3, #8
801a2cc: 681b ldr r3, [r3, #0]
801a2ce: 687a ldr r2, [r7, #4]
801a2d0: 429a cmp r2, r3
801a2d2: d102 bne.n 801a2da <etharp_cleanup_netif+0x46>
etharp_free_entry(i);
801a2d4: 68f8 ldr r0, [r7, #12]
801a2d6: f7ff fce5 bl 8019ca4 <etharp_free_entry>
for (i = 0; i < ARP_TABLE_SIZE; ++i) {
801a2da: 68fb ldr r3, [r7, #12]
801a2dc: 3301 adds r3, #1
801a2de: 60fb str r3, [r7, #12]
801a2e0: 68fb ldr r3, [r7, #12]
801a2e2: 2b09 cmp r3, #9
801a2e4: dddd ble.n 801a2a2 <etharp_cleanup_netif+0xe>
}
}
}
801a2e6: bf00 nop
801a2e8: 3710 adds r7, #16
801a2ea: 46bd mov sp, r7
801a2ec: bd80 pop {r7, pc}
801a2ee: bf00 nop
801a2f0: 20008764 .word 0x20008764
0801a2f4 <etharp_input>:
*
* @see pbuf_free()
*/
void
etharp_input(struct pbuf *p, struct netif *netif)
{
801a2f4: b5b0 push {r4, r5, r7, lr}
801a2f6: b08a sub sp, #40 ; 0x28
801a2f8: af04 add r7, sp, #16
801a2fa: 6078 str r0, [r7, #4]
801a2fc: 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;);
801a2fe: 683b ldr r3, [r7, #0]
801a300: 2b00 cmp r3, #0
801a302: d107 bne.n 801a314 <etharp_input+0x20>
801a304: 4b3f ldr r3, [pc, #252] ; (801a404 <etharp_input+0x110>)
801a306: f240 228a movw r2, #650 ; 0x28a
801a30a: 493f ldr r1, [pc, #252] ; (801a408 <etharp_input+0x114>)
801a30c: 483f ldr r0, [pc, #252] ; (801a40c <etharp_input+0x118>)
801a30e: f002 f91b bl 801c548 <iprintf>
801a312: e074 b.n 801a3fe <etharp_input+0x10a>
hdr = (struct etharp_hdr *)p->payload;
801a314: 687b ldr r3, [r7, #4]
801a316: 685b ldr r3, [r3, #4]
801a318: 613b str r3, [r7, #16]
/* RFC 826 "Packet Reception": */
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
801a31a: 693b ldr r3, [r7, #16]
801a31c: 881b ldrh r3, [r3, #0]
801a31e: b29b uxth r3, r3
801a320: f5b3 7f80 cmp.w r3, #256 ; 0x100
801a324: d10c bne.n 801a340 <etharp_input+0x4c>
(hdr->hwlen != ETH_HWADDR_LEN) ||
801a326: 693b ldr r3, [r7, #16]
801a328: 791b ldrb r3, [r3, #4]
if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
801a32a: 2b06 cmp r3, #6
801a32c: d108 bne.n 801a340 <etharp_input+0x4c>
(hdr->protolen != sizeof(ip4_addr_t)) ||
801a32e: 693b ldr r3, [r7, #16]
801a330: 795b ldrb r3, [r3, #5]
(hdr->hwlen != ETH_HWADDR_LEN) ||
801a332: 2b04 cmp r3, #4
801a334: d104 bne.n 801a340 <etharp_input+0x4c>
(hdr->proto != PP_HTONS(ETHTYPE_IP))) {
801a336: 693b ldr r3, [r7, #16]
801a338: 885b ldrh r3, [r3, #2]
801a33a: b29b uxth r3, r3
(hdr->protolen != sizeof(ip4_addr_t)) ||
801a33c: 2b08 cmp r3, #8
801a33e: d003 beq.n 801a348 <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);
801a340: 6878 ldr r0, [r7, #4]
801a342: f7f7 fbd1 bl 8011ae8 <pbuf_free>
return;
801a346: e05a b.n 801a3fe <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);
801a348: 693b ldr r3, [r7, #16]
801a34a: 330e adds r3, #14
801a34c: 681b ldr r3, [r3, #0]
801a34e: 60fb str r3, [r7, #12]
IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr);
801a350: 693b ldr r3, [r7, #16]
801a352: 3318 adds r3, #24
801a354: 681b ldr r3, [r3, #0]
801a356: 60bb str r3, [r7, #8]
/* this interface is not configured? */
if (ip4_addr_isany_val(*netif_ip4_addr(netif))) {
801a358: 683b ldr r3, [r7, #0]
801a35a: 3304 adds r3, #4
801a35c: 681b ldr r3, [r3, #0]
801a35e: 2b00 cmp r3, #0
801a360: d102 bne.n 801a368 <etharp_input+0x74>
for_us = 0;
801a362: 2300 movs r3, #0
801a364: 75fb strb r3, [r7, #23]
801a366: e009 b.n 801a37c <etharp_input+0x88>
} else {
/* ARP packet directed to us? */
for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif));
801a368: 68ba ldr r2, [r7, #8]
801a36a: 683b ldr r3, [r7, #0]
801a36c: 3304 adds r3, #4
801a36e: 681b ldr r3, [r3, #0]
801a370: 429a cmp r2, r3
801a372: bf0c ite eq
801a374: 2301 moveq r3, #1
801a376: 2300 movne r3, #0
801a378: b2db uxtb r3, r3
801a37a: 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),
801a37c: 693b ldr r3, [r7, #16]
801a37e: f103 0208 add.w r2, r3, #8
801a382: 7dfb ldrb r3, [r7, #23]
801a384: 2b00 cmp r3, #0
801a386: d001 beq.n 801a38c <etharp_input+0x98>
801a388: 2301 movs r3, #1
801a38a: e000 b.n 801a38e <etharp_input+0x9a>
801a38c: 2302 movs r3, #2
801a38e: f107 010c add.w r1, r7, #12
801a392: 6838 ldr r0, [r7, #0]
801a394: f7ff fed8 bl 801a148 <etharp_update_arp_entry>
for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY);
/* now act on the message itself */
switch (hdr->opcode) {
801a398: 693b ldr r3, [r7, #16]
801a39a: 88db ldrh r3, [r3, #6]
801a39c: b29b uxth r3, r3
801a39e: f5b3 7f80 cmp.w r3, #256 ; 0x100
801a3a2: d003 beq.n 801a3ac <etharp_input+0xb8>
801a3a4: f5b3 7f00 cmp.w r3, #512 ; 0x200
801a3a8: d01e beq.n 801a3e8 <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;
801a3aa: e025 b.n 801a3f8 <etharp_input+0x104>
if (for_us) {
801a3ac: 7dfb ldrb r3, [r7, #23]
801a3ae: 2b00 cmp r3, #0
801a3b0: d021 beq.n 801a3f6 <etharp_input+0x102>
(struct eth_addr *)netif->hwaddr, &hdr->shwaddr,
801a3b2: 683b ldr r3, [r7, #0]
801a3b4: f103 002a add.w r0, r3, #42 ; 0x2a
801a3b8: 693b ldr r3, [r7, #16]
801a3ba: f103 0408 add.w r4, r3, #8
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif),
801a3be: 683b ldr r3, [r7, #0]
801a3c0: f103 052a add.w r5, r3, #42 ; 0x2a
801a3c4: 683b ldr r3, [r7, #0]
801a3c6: 3304 adds r3, #4
&hdr->shwaddr, &sipaddr,
801a3c8: 693a ldr r2, [r7, #16]
801a3ca: 3208 adds r2, #8
etharp_raw(netif,
801a3cc: 2102 movs r1, #2
801a3ce: 9103 str r1, [sp, #12]
801a3d0: f107 010c add.w r1, r7, #12
801a3d4: 9102 str r1, [sp, #8]
801a3d6: 9201 str r2, [sp, #4]
801a3d8: 9300 str r3, [sp, #0]
801a3da: 462b mov r3, r5
801a3dc: 4622 mov r2, r4
801a3de: 4601 mov r1, r0
801a3e0: 6838 ldr r0, [r7, #0]
801a3e2: f000 faef bl 801a9c4 <etharp_raw>
break;
801a3e6: e006 b.n 801a3f6 <etharp_input+0x102>
dhcp_arp_reply(netif, &sipaddr);
801a3e8: f107 030c add.w r3, r7, #12
801a3ec: 4619 mov r1, r3
801a3ee: 6838 ldr r0, [r7, #0]
801a3f0: f7fe f9fe bl 80187f0 <dhcp_arp_reply>
break;
801a3f4: e000 b.n 801a3f8 <etharp_input+0x104>
break;
801a3f6: bf00 nop
}
/* free ARP packet */
pbuf_free(p);
801a3f8: 6878 ldr r0, [r7, #4]
801a3fa: f7f7 fb75 bl 8011ae8 <pbuf_free>
}
801a3fe: 3718 adds r7, #24
801a400: 46bd mov sp, r7
801a402: bdb0 pop {r4, r5, r7, pc}
801a404: 0801ffb8 .word 0x0801ffb8
801a408: 08020108 .word 0x08020108
801a40c: 08020030 .word 0x08020030
0801a410 <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)
{
801a410: b580 push {r7, lr}
801a412: b086 sub sp, #24
801a414: af02 add r7, sp, #8
801a416: 60f8 str r0, [r7, #12]
801a418: 60b9 str r1, [r7, #8]
801a41a: 4613 mov r3, r2
801a41c: 71fb strb r3, [r7, #7]
LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
801a41e: 79fa ldrb r2, [r7, #7]
801a420: 4944 ldr r1, [pc, #272] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a422: 4613 mov r3, r2
801a424: 005b lsls r3, r3, #1
801a426: 4413 add r3, r2
801a428: 00db lsls r3, r3, #3
801a42a: 440b add r3, r1
801a42c: 3314 adds r3, #20
801a42e: 781b ldrb r3, [r3, #0]
801a430: 2b01 cmp r3, #1
801a432: d806 bhi.n 801a442 <etharp_output_to_arp_index+0x32>
801a434: 4b40 ldr r3, [pc, #256] ; (801a538 <etharp_output_to_arp_index+0x128>)
801a436: f240 22ef movw r2, #751 ; 0x2ef
801a43a: 4940 ldr r1, [pc, #256] ; (801a53c <etharp_output_to_arp_index+0x12c>)
801a43c: 4840 ldr r0, [pc, #256] ; (801a540 <etharp_output_to_arp_index+0x130>)
801a43e: f002 f883 bl 801c548 <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) {
801a442: 79fa ldrb r2, [r7, #7]
801a444: 493b ldr r1, [pc, #236] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a446: 4613 mov r3, r2
801a448: 005b lsls r3, r3, #1
801a44a: 4413 add r3, r2
801a44c: 00db lsls r3, r3, #3
801a44e: 440b add r3, r1
801a450: 3314 adds r3, #20
801a452: 781b ldrb r3, [r3, #0]
801a454: 2b02 cmp r3, #2
801a456: d153 bne.n 801a500 <etharp_output_to_arp_index+0xf0>
if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) {
801a458: 79fa ldrb r2, [r7, #7]
801a45a: 4936 ldr r1, [pc, #216] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a45c: 4613 mov r3, r2
801a45e: 005b lsls r3, r3, #1
801a460: 4413 add r3, r2
801a462: 00db lsls r3, r3, #3
801a464: 440b add r3, r1
801a466: 3312 adds r3, #18
801a468: 881b ldrh r3, [r3, #0]
801a46a: f5b3 7f8e cmp.w r3, #284 ; 0x11c
801a46e: d919 bls.n 801a4a4 <etharp_output_to_arp_index+0x94>
/* issue a standard request using broadcast */
if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) {
801a470: 79fa ldrb r2, [r7, #7]
801a472: 4613 mov r3, r2
801a474: 005b lsls r3, r3, #1
801a476: 4413 add r3, r2
801a478: 00db lsls r3, r3, #3
801a47a: 4a2e ldr r2, [pc, #184] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a47c: 4413 add r3, r2
801a47e: 3304 adds r3, #4
801a480: 4619 mov r1, r3
801a482: 68f8 ldr r0, [r7, #12]
801a484: f000 fb4c bl 801ab20 <etharp_request>
801a488: 4603 mov r3, r0
801a48a: 2b00 cmp r3, #0
801a48c: d138 bne.n 801a500 <etharp_output_to_arp_index+0xf0>
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
801a48e: 79fa ldrb r2, [r7, #7]
801a490: 4928 ldr r1, [pc, #160] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a492: 4613 mov r3, r2
801a494: 005b lsls r3, r3, #1
801a496: 4413 add r3, r2
801a498: 00db lsls r3, r3, #3
801a49a: 440b add r3, r1
801a49c: 3314 adds r3, #20
801a49e: 2203 movs r2, #3
801a4a0: 701a strb r2, [r3, #0]
801a4a2: e02d b.n 801a500 <etharp_output_to_arp_index+0xf0>
}
} else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) {
801a4a4: 79fa ldrb r2, [r7, #7]
801a4a6: 4923 ldr r1, [pc, #140] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a4a8: 4613 mov r3, r2
801a4aa: 005b lsls r3, r3, #1
801a4ac: 4413 add r3, r2
801a4ae: 00db lsls r3, r3, #3
801a4b0: 440b add r3, r1
801a4b2: 3312 adds r3, #18
801a4b4: 881b ldrh r3, [r3, #0]
801a4b6: f5b3 7f87 cmp.w r3, #270 ; 0x10e
801a4ba: d321 bcc.n 801a500 <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) {
801a4bc: 79fa ldrb r2, [r7, #7]
801a4be: 4613 mov r3, r2
801a4c0: 005b lsls r3, r3, #1
801a4c2: 4413 add r3, r2
801a4c4: 00db lsls r3, r3, #3
801a4c6: 4a1b ldr r2, [pc, #108] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a4c8: 4413 add r3, r2
801a4ca: 1d19 adds r1, r3, #4
801a4cc: 79fa ldrb r2, [r7, #7]
801a4ce: 4613 mov r3, r2
801a4d0: 005b lsls r3, r3, #1
801a4d2: 4413 add r3, r2
801a4d4: 00db lsls r3, r3, #3
801a4d6: 3308 adds r3, #8
801a4d8: 4a16 ldr r2, [pc, #88] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a4da: 4413 add r3, r2
801a4dc: 3304 adds r3, #4
801a4de: 461a mov r2, r3
801a4e0: 68f8 ldr r0, [r7, #12]
801a4e2: f000 fafb bl 801aadc <etharp_request_dst>
801a4e6: 4603 mov r3, r0
801a4e8: 2b00 cmp r3, #0
801a4ea: d109 bne.n 801a500 <etharp_output_to_arp_index+0xf0>
arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
801a4ec: 79fa ldrb r2, [r7, #7]
801a4ee: 4911 ldr r1, [pc, #68] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a4f0: 4613 mov r3, r2
801a4f2: 005b lsls r3, r3, #1
801a4f4: 4413 add r3, r2
801a4f6: 00db lsls r3, r3, #3
801a4f8: 440b add r3, r1
801a4fa: 3314 adds r3, #20
801a4fc: 2203 movs r2, #3
801a4fe: 701a strb r2, [r3, #0]
}
}
}
return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP);
801a500: 68fb ldr r3, [r7, #12]
801a502: f103 012a add.w r1, r3, #42 ; 0x2a
801a506: 79fa ldrb r2, [r7, #7]
801a508: 4613 mov r3, r2
801a50a: 005b lsls r3, r3, #1
801a50c: 4413 add r3, r2
801a50e: 00db lsls r3, r3, #3
801a510: 3308 adds r3, #8
801a512: 4a08 ldr r2, [pc, #32] ; (801a534 <etharp_output_to_arp_index+0x124>)
801a514: 4413 add r3, r2
801a516: 1d1a adds r2, r3, #4
801a518: f44f 6300 mov.w r3, #2048 ; 0x800
801a51c: 9300 str r3, [sp, #0]
801a51e: 4613 mov r3, r2
801a520: 460a mov r2, r1
801a522: 68b9 ldr r1, [r7, #8]
801a524: 68f8 ldr r0, [r7, #12]
801a526: f001 fe51 bl 801c1cc <ethernet_output>
801a52a: 4603 mov r3, r0
}
801a52c: 4618 mov r0, r3
801a52e: 3710 adds r7, #16
801a530: 46bd mov sp, r7
801a532: bd80 pop {r7, pc}
801a534: 20008764 .word 0x20008764
801a538: 0801ffb8 .word 0x0801ffb8
801a53c: 08020128 .word 0x08020128
801a540: 08020030 .word 0x08020030
0801a544 <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)
{
801a544: b580 push {r7, lr}
801a546: b08a sub sp, #40 ; 0x28
801a548: af02 add r7, sp, #8
801a54a: 60f8 str r0, [r7, #12]
801a54c: 60b9 str r1, [r7, #8]
801a54e: 607a str r2, [r7, #4]
const struct eth_addr *dest;
struct eth_addr mcastaddr;
const ip4_addr_t *dst_addr = ipaddr;
801a550: 687b ldr r3, [r7, #4]
801a552: 61bb str r3, [r7, #24]
LWIP_ASSERT_CORE_LOCKED();
LWIP_ASSERT("netif != NULL", netif != NULL);
801a554: 68fb ldr r3, [r7, #12]
801a556: 2b00 cmp r3, #0
801a558: d106 bne.n 801a568 <etharp_output+0x24>
801a55a: 4b73 ldr r3, [pc, #460] ; (801a728 <etharp_output+0x1e4>)
801a55c: f240 321e movw r2, #798 ; 0x31e
801a560: 4972 ldr r1, [pc, #456] ; (801a72c <etharp_output+0x1e8>)
801a562: 4873 ldr r0, [pc, #460] ; (801a730 <etharp_output+0x1ec>)
801a564: f001 fff0 bl 801c548 <iprintf>
LWIP_ASSERT("q != NULL", q != NULL);
801a568: 68bb ldr r3, [r7, #8]
801a56a: 2b00 cmp r3, #0
801a56c: d106 bne.n 801a57c <etharp_output+0x38>
801a56e: 4b6e ldr r3, [pc, #440] ; (801a728 <etharp_output+0x1e4>)
801a570: f240 321f movw r2, #799 ; 0x31f
801a574: 496f ldr r1, [pc, #444] ; (801a734 <etharp_output+0x1f0>)
801a576: 486e ldr r0, [pc, #440] ; (801a730 <etharp_output+0x1ec>)
801a578: f001 ffe6 bl 801c548 <iprintf>
LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
801a57c: 687b ldr r3, [r7, #4]
801a57e: 2b00 cmp r3, #0
801a580: d106 bne.n 801a590 <etharp_output+0x4c>
801a582: 4b69 ldr r3, [pc, #420] ; (801a728 <etharp_output+0x1e4>)
801a584: f44f 7248 mov.w r2, #800 ; 0x320
801a588: 496b ldr r1, [pc, #428] ; (801a738 <etharp_output+0x1f4>)
801a58a: 4869 ldr r0, [pc, #420] ; (801a730 <etharp_output+0x1ec>)
801a58c: f001 ffdc bl 801c548 <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)) {
801a590: 687b ldr r3, [r7, #4]
801a592: 681b ldr r3, [r3, #0]
801a594: 68f9 ldr r1, [r7, #12]
801a596: 4618 mov r0, r3
801a598: f000 ff14 bl 801b3c4 <ip4_addr_isbroadcast_u32>
801a59c: 4603 mov r3, r0
801a59e: 2b00 cmp r3, #0
801a5a0: d002 beq.n 801a5a8 <etharp_output+0x64>
/* broadcast on Ethernet also */
dest = (const struct eth_addr *)&ethbroadcast;
801a5a2: 4b66 ldr r3, [pc, #408] ; (801a73c <etharp_output+0x1f8>)
801a5a4: 61fb str r3, [r7, #28]
801a5a6: e0af b.n 801a708 <etharp_output+0x1c4>
/* multicast destination IP address? */
} else if (ip4_addr_ismulticast(ipaddr)) {
801a5a8: 687b ldr r3, [r7, #4]
801a5aa: 681b ldr r3, [r3, #0]
801a5ac: f003 03f0 and.w r3, r3, #240 ; 0xf0
801a5b0: 2be0 cmp r3, #224 ; 0xe0
801a5b2: d118 bne.n 801a5e6 <etharp_output+0xa2>
/* Hash IP multicast address to MAC address.*/
mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0;
801a5b4: 2301 movs r3, #1
801a5b6: 743b strb r3, [r7, #16]
mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1;
801a5b8: 2300 movs r3, #0
801a5ba: 747b strb r3, [r7, #17]
mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2;
801a5bc: 235e movs r3, #94 ; 0x5e
801a5be: 74bb strb r3, [r7, #18]
mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f;
801a5c0: 687b ldr r3, [r7, #4]
801a5c2: 3301 adds r3, #1
801a5c4: 781b ldrb r3, [r3, #0]
801a5c6: f003 037f and.w r3, r3, #127 ; 0x7f
801a5ca: b2db uxtb r3, r3
801a5cc: 74fb strb r3, [r7, #19]
mcastaddr.addr[4] = ip4_addr3(ipaddr);
801a5ce: 687b ldr r3, [r7, #4]
801a5d0: 3302 adds r3, #2
801a5d2: 781b ldrb r3, [r3, #0]
801a5d4: 753b strb r3, [r7, #20]
mcastaddr.addr[5] = ip4_addr4(ipaddr);
801a5d6: 687b ldr r3, [r7, #4]
801a5d8: 3303 adds r3, #3
801a5da: 781b ldrb r3, [r3, #0]
801a5dc: 757b strb r3, [r7, #21]
/* destination Ethernet address is multicast */
dest = &mcastaddr;
801a5de: f107 0310 add.w r3, r7, #16
801a5e2: 61fb str r3, [r7, #28]
801a5e4: e090 b.n 801a708 <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)) &&
801a5e6: 687b ldr r3, [r7, #4]
801a5e8: 681a ldr r2, [r3, #0]
801a5ea: 68fb ldr r3, [r7, #12]
801a5ec: 3304 adds r3, #4
801a5ee: 681b ldr r3, [r3, #0]
801a5f0: 405a eors r2, r3
801a5f2: 68fb ldr r3, [r7, #12]
801a5f4: 3308 adds r3, #8
801a5f6: 681b ldr r3, [r3, #0]
801a5f8: 4013 ands r3, r2
801a5fa: 2b00 cmp r3, #0
801a5fc: d012 beq.n 801a624 <etharp_output+0xe0>
!ip4_addr_islinklocal(ipaddr)) {
801a5fe: 687b ldr r3, [r7, #4]
801a600: 681b ldr r3, [r3, #0]
801a602: b29b uxth r3, r3
if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
801a604: f64f 62a9 movw r2, #65193 ; 0xfea9
801a608: 4293 cmp r3, r2
801a60a: d00b beq.n 801a624 <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))) {
801a60c: 68fb ldr r3, [r7, #12]
801a60e: 330c adds r3, #12
801a610: 681b ldr r3, [r3, #0]
801a612: 2b00 cmp r3, #0
801a614: d003 beq.n 801a61e <etharp_output+0xda>
/* send to hardware address of default gateway IP address */
dst_addr = netif_ip4_gw(netif);
801a616: 68fb ldr r3, [r7, #12]
801a618: 330c adds r3, #12
801a61a: 61bb str r3, [r7, #24]
801a61c: e002 b.n 801a624 <etharp_output+0xe0>
/* no default gateway available */
} else {
/* no route to destination error (default gateway missing) */
return ERR_RTE;
801a61e: f06f 0303 mvn.w r3, #3
801a622: e07d b.n 801a720 <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) &&
801a624: 4b46 ldr r3, [pc, #280] ; (801a740 <etharp_output+0x1fc>)
801a626: 781b ldrb r3, [r3, #0]
801a628: 4619 mov r1, r3
801a62a: 4a46 ldr r2, [pc, #280] ; (801a744 <etharp_output+0x200>)
801a62c: 460b mov r3, r1
801a62e: 005b lsls r3, r3, #1
801a630: 440b add r3, r1
801a632: 00db lsls r3, r3, #3
801a634: 4413 add r3, r2
801a636: 3314 adds r3, #20
801a638: 781b ldrb r3, [r3, #0]
801a63a: 2b01 cmp r3, #1
801a63c: d925 bls.n 801a68a <etharp_output+0x146>
#if ETHARP_TABLE_MATCH_NETIF
(arp_table[etharp_cached_entry].netif == netif) &&
801a63e: 4b40 ldr r3, [pc, #256] ; (801a740 <etharp_output+0x1fc>)
801a640: 781b ldrb r3, [r3, #0]
801a642: 4619 mov r1, r3
801a644: 4a3f ldr r2, [pc, #252] ; (801a744 <etharp_output+0x200>)
801a646: 460b mov r3, r1
801a648: 005b lsls r3, r3, #1
801a64a: 440b add r3, r1
801a64c: 00db lsls r3, r3, #3
801a64e: 4413 add r3, r2
801a650: 3308 adds r3, #8
801a652: 681b ldr r3, [r3, #0]
if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
801a654: 68fa ldr r2, [r7, #12]
801a656: 429a cmp r2, r3
801a658: d117 bne.n 801a68a <etharp_output+0x146>
#endif
(ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) {
801a65a: 69bb ldr r3, [r7, #24]
801a65c: 681a ldr r2, [r3, #0]
801a65e: 4b38 ldr r3, [pc, #224] ; (801a740 <etharp_output+0x1fc>)
801a660: 781b ldrb r3, [r3, #0]
801a662: 4618 mov r0, r3
801a664: 4937 ldr r1, [pc, #220] ; (801a744 <etharp_output+0x200>)
801a666: 4603 mov r3, r0
801a668: 005b lsls r3, r3, #1
801a66a: 4403 add r3, r0
801a66c: 00db lsls r3, r3, #3
801a66e: 440b add r3, r1
801a670: 3304 adds r3, #4
801a672: 681b ldr r3, [r3, #0]
(arp_table[etharp_cached_entry].netif == netif) &&
801a674: 429a cmp r2, r3
801a676: d108 bne.n 801a68a <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);
801a678: 4b31 ldr r3, [pc, #196] ; (801a740 <etharp_output+0x1fc>)
801a67a: 781b ldrb r3, [r3, #0]
801a67c: 461a mov r2, r3
801a67e: 68b9 ldr r1, [r7, #8]
801a680: 68f8 ldr r0, [r7, #12]
801a682: f7ff fec5 bl 801a410 <etharp_output_to_arp_index>
801a686: 4603 mov r3, r0
801a688: e04a b.n 801a720 <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++) {
801a68a: 2300 movs r3, #0
801a68c: 75fb strb r3, [r7, #23]
801a68e: e031 b.n 801a6f4 <etharp_output+0x1b0>
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
801a690: 7dfa ldrb r2, [r7, #23]
801a692: 492c ldr r1, [pc, #176] ; (801a744 <etharp_output+0x200>)
801a694: 4613 mov r3, r2
801a696: 005b lsls r3, r3, #1
801a698: 4413 add r3, r2
801a69a: 00db lsls r3, r3, #3
801a69c: 440b add r3, r1
801a69e: 3314 adds r3, #20
801a6a0: 781b ldrb r3, [r3, #0]
801a6a2: 2b01 cmp r3, #1
801a6a4: d923 bls.n 801a6ee <etharp_output+0x1aa>
#if ETHARP_TABLE_MATCH_NETIF
(arp_table[i].netif == netif) &&
801a6a6: 7dfa ldrb r2, [r7, #23]
801a6a8: 4926 ldr r1, [pc, #152] ; (801a744 <etharp_output+0x200>)
801a6aa: 4613 mov r3, r2
801a6ac: 005b lsls r3, r3, #1
801a6ae: 4413 add r3, r2
801a6b0: 00db lsls r3, r3, #3
801a6b2: 440b add r3, r1
801a6b4: 3308 adds r3, #8
801a6b6: 681b ldr r3, [r3, #0]
if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
801a6b8: 68fa ldr r2, [r7, #12]
801a6ba: 429a cmp r2, r3
801a6bc: d117 bne.n 801a6ee <etharp_output+0x1aa>
#endif
(ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) {
801a6be: 69bb ldr r3, [r7, #24]
801a6c0: 6819 ldr r1, [r3, #0]
801a6c2: 7dfa ldrb r2, [r7, #23]
801a6c4: 481f ldr r0, [pc, #124] ; (801a744 <etharp_output+0x200>)
801a6c6: 4613 mov r3, r2
801a6c8: 005b lsls r3, r3, #1
801a6ca: 4413 add r3, r2
801a6cc: 00db lsls r3, r3, #3
801a6ce: 4403 add r3, r0
801a6d0: 3304 adds r3, #4
801a6d2: 681b ldr r3, [r3, #0]
(arp_table[i].netif == netif) &&
801a6d4: 4299 cmp r1, r3
801a6d6: d10a bne.n 801a6ee <etharp_output+0x1aa>
/* found an existing, stable entry */
ETHARP_SET_ADDRHINT(netif, i);
801a6d8: 4a19 ldr r2, [pc, #100] ; (801a740 <etharp_output+0x1fc>)
801a6da: 7dfb ldrb r3, [r7, #23]
801a6dc: 7013 strb r3, [r2, #0]
return etharp_output_to_arp_index(netif, q, i);
801a6de: 7dfb ldrb r3, [r7, #23]
801a6e0: 461a mov r2, r3
801a6e2: 68b9 ldr r1, [r7, #8]
801a6e4: 68f8 ldr r0, [r7, #12]
801a6e6: f7ff fe93 bl 801a410 <etharp_output_to_arp_index>
801a6ea: 4603 mov r3, r0
801a6ec: e018 b.n 801a720 <etharp_output+0x1dc>
for (i = 0; i < ARP_TABLE_SIZE; i++) {
801a6ee: 7dfb ldrb r3, [r7, #23]
801a6f0: 3301 adds r3, #1
801a6f2: 75fb strb r3, [r7, #23]
801a6f4: 7dfb ldrb r3, [r7, #23]
801a6f6: 2b09 cmp r3, #9
801a6f8: d9ca bls.n 801a690 <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);
801a6fa: 68ba ldr r2, [r7, #8]
801a6fc: 69b9 ldr r1, [r7, #24]
801a6fe: 68f8 ldr r0, [r7, #12]
801a700: f000 f822 bl 801a748 <etharp_query>
801a704: 4603 mov r3, r0
801a706: e00b b.n 801a720 <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);
801a708: 68fb ldr r3, [r7, #12]
801a70a: f103 022a add.w r2, r3, #42 ; 0x2a
801a70e: f44f 6300 mov.w r3, #2048 ; 0x800
801a712: 9300 str r3, [sp, #0]
801a714: 69fb ldr r3, [r7, #28]
801a716: 68b9 ldr r1, [r7, #8]
801a718: 68f8 ldr r0, [r7, #12]
801a71a: f001 fd57 bl 801c1cc <ethernet_output>
801a71e: 4603 mov r3, r0
}
801a720: 4618 mov r0, r3
801a722: 3720 adds r7, #32
801a724: 46bd mov sp, r7
801a726: bd80 pop {r7, pc}
801a728: 0801ffb8 .word 0x0801ffb8
801a72c: 08020108 .word 0x08020108
801a730: 08020030 .word 0x08020030
801a734: 08020158 .word 0x08020158
801a738: 080200f8 .word 0x080200f8
801a73c: 080226f0 .word 0x080226f0
801a740: 20008854 .word 0x20008854
801a744: 20008764 .word 0x20008764
0801a748 <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)
{
801a748: b580 push {r7, lr}
801a74a: b08c sub sp, #48 ; 0x30
801a74c: af02 add r7, sp, #8
801a74e: 60f8 str r0, [r7, #12]
801a750: 60b9 str r1, [r7, #8]
801a752: 607a str r2, [r7, #4]
struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr;
801a754: 68fb ldr r3, [r7, #12]
801a756: 332a adds r3, #42 ; 0x2a
801a758: 617b str r3, [r7, #20]
err_t result = ERR_MEM;
801a75a: 23ff movs r3, #255 ; 0xff
801a75c: f887 3027 strb.w r3, [r7, #39] ; 0x27
int is_new_entry = 0;
801a760: 2300 movs r3, #0
801a762: 623b str r3, [r7, #32]
s16_t i_err;
netif_addr_idx_t i;
/* non-unicast address? */
if (ip4_addr_isbroadcast(ipaddr, netif) ||
801a764: 68bb ldr r3, [r7, #8]
801a766: 681b ldr r3, [r3, #0]
801a768: 68f9 ldr r1, [r7, #12]
801a76a: 4618 mov r0, r3
801a76c: f000 fe2a bl 801b3c4 <ip4_addr_isbroadcast_u32>
801a770: 4603 mov r3, r0
801a772: 2b00 cmp r3, #0
801a774: d10c bne.n 801a790 <etharp_query+0x48>
ip4_addr_ismulticast(ipaddr) ||
801a776: 68bb ldr r3, [r7, #8]
801a778: 681b ldr r3, [r3, #0]
801a77a: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (ip4_addr_isbroadcast(ipaddr, netif) ||
801a77e: 2be0 cmp r3, #224 ; 0xe0
801a780: d006 beq.n 801a790 <etharp_query+0x48>
ip4_addr_ismulticast(ipaddr) ||
801a782: 68bb ldr r3, [r7, #8]
801a784: 2b00 cmp r3, #0
801a786: d003 beq.n 801a790 <etharp_query+0x48>
ip4_addr_isany(ipaddr)) {
801a788: 68bb ldr r3, [r7, #8]
801a78a: 681b ldr r3, [r3, #0]
801a78c: 2b00 cmp r3, #0
801a78e: d102 bne.n 801a796 <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;
801a790: f06f 030f mvn.w r3, #15
801a794: e102 b.n 801a99c <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);
801a796: 68fa ldr r2, [r7, #12]
801a798: 2101 movs r1, #1
801a79a: 68b8 ldr r0, [r7, #8]
801a79c: f7ff fb5c bl 8019e58 <etharp_find_entry>
801a7a0: 4603 mov r3, r0
801a7a2: 827b strh r3, [r7, #18]
/* could not find or create entry? */
if (i_err < 0) {
801a7a4: f9b7 3012 ldrsh.w r3, [r7, #18]
801a7a8: 2b00 cmp r3, #0
801a7aa: da02 bge.n 801a7b2 <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;
801a7ac: 8a7b ldrh r3, [r7, #18]
801a7ae: b25b sxtb r3, r3
801a7b0: e0f4 b.n 801a99c <etharp_query+0x254>
}
LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
801a7b2: 8a7b ldrh r3, [r7, #18]
801a7b4: 2b7e cmp r3, #126 ; 0x7e
801a7b6: d906 bls.n 801a7c6 <etharp_query+0x7e>
801a7b8: 4b7a ldr r3, [pc, #488] ; (801a9a4 <etharp_query+0x25c>)
801a7ba: f240 32c1 movw r2, #961 ; 0x3c1
801a7be: 497a ldr r1, [pc, #488] ; (801a9a8 <etharp_query+0x260>)
801a7c0: 487a ldr r0, [pc, #488] ; (801a9ac <etharp_query+0x264>)
801a7c2: f001 fec1 bl 801c548 <iprintf>
i = (netif_addr_idx_t)i_err;
801a7c6: 8a7b ldrh r3, [r7, #18]
801a7c8: 747b strb r3, [r7, #17]
/* mark a fresh entry as pending (we just sent a request) */
if (arp_table[i].state == ETHARP_STATE_EMPTY) {
801a7ca: 7c7a ldrb r2, [r7, #17]
801a7cc: 4978 ldr r1, [pc, #480] ; (801a9b0 <etharp_query+0x268>)
801a7ce: 4613 mov r3, r2
801a7d0: 005b lsls r3, r3, #1
801a7d2: 4413 add r3, r2
801a7d4: 00db lsls r3, r3, #3
801a7d6: 440b add r3, r1
801a7d8: 3314 adds r3, #20
801a7da: 781b ldrb r3, [r3, #0]
801a7dc: 2b00 cmp r3, #0
801a7de: d115 bne.n 801a80c <etharp_query+0xc4>
is_new_entry = 1;
801a7e0: 2301 movs r3, #1
801a7e2: 623b str r3, [r7, #32]
arp_table[i].state = ETHARP_STATE_PENDING;
801a7e4: 7c7a ldrb r2, [r7, #17]
801a7e6: 4972 ldr r1, [pc, #456] ; (801a9b0 <etharp_query+0x268>)
801a7e8: 4613 mov r3, r2
801a7ea: 005b lsls r3, r3, #1
801a7ec: 4413 add r3, r2
801a7ee: 00db lsls r3, r3, #3
801a7f0: 440b add r3, r1
801a7f2: 3314 adds r3, #20
801a7f4: 2201 movs r2, #1
801a7f6: 701a strb r2, [r3, #0]
/* record network interface for re-sending arp request in etharp_tmr */
arp_table[i].netif = netif;
801a7f8: 7c7a ldrb r2, [r7, #17]
801a7fa: 496d ldr r1, [pc, #436] ; (801a9b0 <etharp_query+0x268>)
801a7fc: 4613 mov r3, r2
801a7fe: 005b lsls r3, r3, #1
801a800: 4413 add r3, r2
801a802: 00db lsls r3, r3, #3
801a804: 440b add r3, r1
801a806: 3308 adds r3, #8
801a808: 68fa ldr r2, [r7, #12]
801a80a: 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",
801a80c: 7c7a ldrb r2, [r7, #17]
801a80e: 4968 ldr r1, [pc, #416] ; (801a9b0 <etharp_query+0x268>)
801a810: 4613 mov r3, r2
801a812: 005b lsls r3, r3, #1
801a814: 4413 add r3, r2
801a816: 00db lsls r3, r3, #3
801a818: 440b add r3, r1
801a81a: 3314 adds r3, #20
801a81c: 781b ldrb r3, [r3, #0]
801a81e: 2b01 cmp r3, #1
801a820: d011 beq.n 801a846 <etharp_query+0xfe>
801a822: 7c7a ldrb r2, [r7, #17]
801a824: 4962 ldr r1, [pc, #392] ; (801a9b0 <etharp_query+0x268>)
801a826: 4613 mov r3, r2
801a828: 005b lsls r3, r3, #1
801a82a: 4413 add r3, r2
801a82c: 00db lsls r3, r3, #3
801a82e: 440b add r3, r1
801a830: 3314 adds r3, #20
801a832: 781b ldrb r3, [r3, #0]
801a834: 2b01 cmp r3, #1
801a836: d806 bhi.n 801a846 <etharp_query+0xfe>
801a838: 4b5a ldr r3, [pc, #360] ; (801a9a4 <etharp_query+0x25c>)
801a83a: f240 32cf movw r2, #975 ; 0x3cf
801a83e: 495d ldr r1, [pc, #372] ; (801a9b4 <etharp_query+0x26c>)
801a840: 485a ldr r0, [pc, #360] ; (801a9ac <etharp_query+0x264>)
801a842: f001 fe81 bl 801c548 <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)) {
801a846: 6a3b ldr r3, [r7, #32]
801a848: 2b00 cmp r3, #0
801a84a: d102 bne.n 801a852 <etharp_query+0x10a>
801a84c: 687b ldr r3, [r7, #4]
801a84e: 2b00 cmp r3, #0
801a850: d10c bne.n 801a86c <etharp_query+0x124>
/* try to resolve it; send out ARP request */
result = etharp_request(netif, ipaddr);
801a852: 68b9 ldr r1, [r7, #8]
801a854: 68f8 ldr r0, [r7, #12]
801a856: f000 f963 bl 801ab20 <etharp_request>
801a85a: 4603 mov r3, r0
801a85c: 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) {
801a860: 687b ldr r3, [r7, #4]
801a862: 2b00 cmp r3, #0
801a864: d102 bne.n 801a86c <etharp_query+0x124>
return result;
801a866: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
801a86a: e097 b.n 801a99c <etharp_query+0x254>
}
}
/* packet given? */
LWIP_ASSERT("q != NULL", q != NULL);
801a86c: 687b ldr r3, [r7, #4]
801a86e: 2b00 cmp r3, #0
801a870: d106 bne.n 801a880 <etharp_query+0x138>
801a872: 4b4c ldr r3, [pc, #304] ; (801a9a4 <etharp_query+0x25c>)
801a874: f240 32e1 movw r2, #993 ; 0x3e1
801a878: 494f ldr r1, [pc, #316] ; (801a9b8 <etharp_query+0x270>)
801a87a: 484c ldr r0, [pc, #304] ; (801a9ac <etharp_query+0x264>)
801a87c: f001 fe64 bl 801c548 <iprintf>
/* stable entry? */
if (arp_table[i].state >= ETHARP_STATE_STABLE) {
801a880: 7c7a ldrb r2, [r7, #17]
801a882: 494b ldr r1, [pc, #300] ; (801a9b0 <etharp_query+0x268>)
801a884: 4613 mov r3, r2
801a886: 005b lsls r3, r3, #1
801a888: 4413 add r3, r2
801a88a: 00db lsls r3, r3, #3
801a88c: 440b add r3, r1
801a88e: 3314 adds r3, #20
801a890: 781b ldrb r3, [r3, #0]
801a892: 2b01 cmp r3, #1
801a894: d918 bls.n 801a8c8 <etharp_query+0x180>
/* we have a valid IP->Ethernet address mapping */
ETHARP_SET_ADDRHINT(netif, i);
801a896: 4a49 ldr r2, [pc, #292] ; (801a9bc <etharp_query+0x274>)
801a898: 7c7b ldrb r3, [r7, #17]
801a89a: 7013 strb r3, [r2, #0]
/* send the packet */
result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP);
801a89c: 7c7a ldrb r2, [r7, #17]
801a89e: 4613 mov r3, r2
801a8a0: 005b lsls r3, r3, #1
801a8a2: 4413 add r3, r2
801a8a4: 00db lsls r3, r3, #3
801a8a6: 3308 adds r3, #8
801a8a8: 4a41 ldr r2, [pc, #260] ; (801a9b0 <etharp_query+0x268>)
801a8aa: 4413 add r3, r2
801a8ac: 1d1a adds r2, r3, #4
801a8ae: f44f 6300 mov.w r3, #2048 ; 0x800
801a8b2: 9300 str r3, [sp, #0]
801a8b4: 4613 mov r3, r2
801a8b6: 697a ldr r2, [r7, #20]
801a8b8: 6879 ldr r1, [r7, #4]
801a8ba: 68f8 ldr r0, [r7, #12]
801a8bc: f001 fc86 bl 801c1cc <ethernet_output>
801a8c0: 4603 mov r3, r0
801a8c2: f887 3027 strb.w r3, [r7, #39] ; 0x27
801a8c6: e067 b.n 801a998 <etharp_query+0x250>
/* pending entry? (either just created or already pending */
} else if (arp_table[i].state == ETHARP_STATE_PENDING) {
801a8c8: 7c7a ldrb r2, [r7, #17]
801a8ca: 4939 ldr r1, [pc, #228] ; (801a9b0 <etharp_query+0x268>)
801a8cc: 4613 mov r3, r2
801a8ce: 005b lsls r3, r3, #1
801a8d0: 4413 add r3, r2
801a8d2: 00db lsls r3, r3, #3
801a8d4: 440b add r3, r1
801a8d6: 3314 adds r3, #20
801a8d8: 781b ldrb r3, [r3, #0]
801a8da: 2b01 cmp r3, #1
801a8dc: d15c bne.n 801a998 <etharp_query+0x250>
/* entry is still pending, queue the given packet 'q' */
struct pbuf *p;
int copy_needed = 0;
801a8de: 2300 movs r3, #0
801a8e0: 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;
801a8e2: 687b ldr r3, [r7, #4]
801a8e4: 61fb str r3, [r7, #28]
while (p) {
801a8e6: e01c b.n 801a922 <etharp_query+0x1da>
LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
801a8e8: 69fb ldr r3, [r7, #28]
801a8ea: 895a ldrh r2, [r3, #10]
801a8ec: 69fb ldr r3, [r7, #28]
801a8ee: 891b ldrh r3, [r3, #8]
801a8f0: 429a cmp r2, r3
801a8f2: d10a bne.n 801a90a <etharp_query+0x1c2>
801a8f4: 69fb ldr r3, [r7, #28]
801a8f6: 681b ldr r3, [r3, #0]
801a8f8: 2b00 cmp r3, #0
801a8fa: d006 beq.n 801a90a <etharp_query+0x1c2>
801a8fc: 4b29 ldr r3, [pc, #164] ; (801a9a4 <etharp_query+0x25c>)
801a8fe: f240 32f1 movw r2, #1009 ; 0x3f1
801a902: 492f ldr r1, [pc, #188] ; (801a9c0 <etharp_query+0x278>)
801a904: 4829 ldr r0, [pc, #164] ; (801a9ac <etharp_query+0x264>)
801a906: f001 fe1f bl 801c548 <iprintf>
if (PBUF_NEEDS_COPY(p)) {
801a90a: 69fb ldr r3, [r7, #28]
801a90c: 7b1b ldrb r3, [r3, #12]
801a90e: f003 0340 and.w r3, r3, #64 ; 0x40
801a912: 2b00 cmp r3, #0
801a914: d002 beq.n 801a91c <etharp_query+0x1d4>
copy_needed = 1;
801a916: 2301 movs r3, #1
801a918: 61bb str r3, [r7, #24]
break;
801a91a: e005 b.n 801a928 <etharp_query+0x1e0>
}
p = p->next;
801a91c: 69fb ldr r3, [r7, #28]
801a91e: 681b ldr r3, [r3, #0]
801a920: 61fb str r3, [r7, #28]
while (p) {
801a922: 69fb ldr r3, [r7, #28]
801a924: 2b00 cmp r3, #0
801a926: d1df bne.n 801a8e8 <etharp_query+0x1a0>
}
if (copy_needed) {
801a928: 69bb ldr r3, [r7, #24]
801a92a: 2b00 cmp r3, #0
801a92c: d007 beq.n 801a93e <etharp_query+0x1f6>
/* copy the whole packet into new pbufs */
p = pbuf_clone(PBUF_LINK, PBUF_RAM, q);
801a92e: 687a ldr r2, [r7, #4]
801a930: f44f 7120 mov.w r1, #640 ; 0x280
801a934: 200e movs r0, #14
801a936: f7f7 fb4f bl 8011fd8 <pbuf_clone>
801a93a: 61f8 str r0, [r7, #28]
801a93c: e004 b.n 801a948 <etharp_query+0x200>
} else {
/* referencing the old pbuf is enough */
p = q;
801a93e: 687b ldr r3, [r7, #4]
801a940: 61fb str r3, [r7, #28]
pbuf_ref(p);
801a942: 69f8 ldr r0, [r7, #28]
801a944: f7f7 f976 bl 8011c34 <pbuf_ref>
}
/* packet could be taken over? */
if (p != NULL) {
801a948: 69fb ldr r3, [r7, #28]
801a94a: 2b00 cmp r3, #0
801a94c: d021 beq.n 801a992 <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) {
801a94e: 7c7a ldrb r2, [r7, #17]
801a950: 4917 ldr r1, [pc, #92] ; (801a9b0 <etharp_query+0x268>)
801a952: 4613 mov r3, r2
801a954: 005b lsls r3, r3, #1
801a956: 4413 add r3, r2
801a958: 00db lsls r3, r3, #3
801a95a: 440b add r3, r1
801a95c: 681b ldr r3, [r3, #0]
801a95e: 2b00 cmp r3, #0
801a960: d00a beq.n 801a978 <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);
801a962: 7c7a ldrb r2, [r7, #17]
801a964: 4912 ldr r1, [pc, #72] ; (801a9b0 <etharp_query+0x268>)
801a966: 4613 mov r3, r2
801a968: 005b lsls r3, r3, #1
801a96a: 4413 add r3, r2
801a96c: 00db lsls r3, r3, #3
801a96e: 440b add r3, r1
801a970: 681b ldr r3, [r3, #0]
801a972: 4618 mov r0, r3
801a974: f7f7 f8b8 bl 8011ae8 <pbuf_free>
}
arp_table[i].q = p;
801a978: 7c7a ldrb r2, [r7, #17]
801a97a: 490d ldr r1, [pc, #52] ; (801a9b0 <etharp_query+0x268>)
801a97c: 4613 mov r3, r2
801a97e: 005b lsls r3, r3, #1
801a980: 4413 add r3, r2
801a982: 00db lsls r3, r3, #3
801a984: 440b add r3, r1
801a986: 69fa ldr r2, [r7, #28]
801a988: 601a str r2, [r3, #0]
result = ERR_OK;
801a98a: 2300 movs r3, #0
801a98c: f887 3027 strb.w r3, [r7, #39] ; 0x27
801a990: e002 b.n 801a998 <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;
801a992: 23ff movs r3, #255 ; 0xff
801a994: f887 3027 strb.w r3, [r7, #39] ; 0x27
}
}
return result;
801a998: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27
}
801a99c: 4618 mov r0, r3
801a99e: 3728 adds r7, #40 ; 0x28
801a9a0: 46bd mov sp, r7
801a9a2: bd80 pop {r7, pc}
801a9a4: 0801ffb8 .word 0x0801ffb8
801a9a8: 08020164 .word 0x08020164
801a9ac: 08020030 .word 0x08020030
801a9b0: 20008764 .word 0x20008764
801a9b4: 08020174 .word 0x08020174
801a9b8: 08020158 .word 0x08020158
801a9bc: 20008854 .word 0x20008854
801a9c0: 0802019c .word 0x0802019c
0801a9c4 <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)
{
801a9c4: b580 push {r7, lr}
801a9c6: b08a sub sp, #40 ; 0x28
801a9c8: af02 add r7, sp, #8
801a9ca: 60f8 str r0, [r7, #12]
801a9cc: 60b9 str r1, [r7, #8]
801a9ce: 607a str r2, [r7, #4]
801a9d0: 603b str r3, [r7, #0]
struct pbuf *p;
err_t result = ERR_OK;
801a9d2: 2300 movs r3, #0
801a9d4: 77fb strb r3, [r7, #31]
struct etharp_hdr *hdr;
LWIP_ASSERT("netif != NULL", netif != NULL);
801a9d6: 68fb ldr r3, [r7, #12]
801a9d8: 2b00 cmp r3, #0
801a9da: d106 bne.n 801a9ea <etharp_raw+0x26>
801a9dc: 4b3a ldr r3, [pc, #232] ; (801aac8 <etharp_raw+0x104>)
801a9de: f240 4257 movw r2, #1111 ; 0x457
801a9e2: 493a ldr r1, [pc, #232] ; (801aacc <etharp_raw+0x108>)
801a9e4: 483a ldr r0, [pc, #232] ; (801aad0 <etharp_raw+0x10c>)
801a9e6: f001 fdaf bl 801c548 <iprintf>
/* allocate a pbuf for the outgoing ARP request packet */
p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM);
801a9ea: f44f 7220 mov.w r2, #640 ; 0x280
801a9ee: 211c movs r1, #28
801a9f0: 200e movs r0, #14
801a9f2: f7f6 fd99 bl 8011528 <pbuf_alloc>
801a9f6: 61b8 str r0, [r7, #24]
/* could allocate a pbuf for an ARP request? */
if (p == NULL) {
801a9f8: 69bb ldr r3, [r7, #24]
801a9fa: 2b00 cmp r3, #0
801a9fc: d102 bne.n 801aa04 <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;
801a9fe: f04f 33ff mov.w r3, #4294967295
801aa02: e05d b.n 801aac0 <etharp_raw+0xfc>
}
LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
801aa04: 69bb ldr r3, [r7, #24]
801aa06: 895b ldrh r3, [r3, #10]
801aa08: 2b1b cmp r3, #27
801aa0a: d806 bhi.n 801aa1a <etharp_raw+0x56>
801aa0c: 4b2e ldr r3, [pc, #184] ; (801aac8 <etharp_raw+0x104>)
801aa0e: f240 4263 movw r2, #1123 ; 0x463
801aa12: 4930 ldr r1, [pc, #192] ; (801aad4 <etharp_raw+0x110>)
801aa14: 482e ldr r0, [pc, #184] ; (801aad0 <etharp_raw+0x10c>)
801aa16: f001 fd97 bl 801c548 <iprintf>
(p->len >= SIZEOF_ETHARP_HDR));
hdr = (struct etharp_hdr *)p->payload;
801aa1a: 69bb ldr r3, [r7, #24]
801aa1c: 685b ldr r3, [r3, #4]
801aa1e: 617b str r3, [r7, #20]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
hdr->opcode = lwip_htons(opcode);
801aa20: 8ebb ldrh r3, [r7, #52] ; 0x34
801aa22: 4618 mov r0, r3
801aa24: f7f5 fcac bl 8010380 <lwip_htons>
801aa28: 4603 mov r3, r0
801aa2a: 461a mov r2, r3
801aa2c: 697b ldr r3, [r7, #20]
801aa2e: 80da strh r2, [r3, #6]
LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
801aa30: 68fb ldr r3, [r7, #12]
801aa32: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
801aa36: 2b06 cmp r3, #6
801aa38: d006 beq.n 801aa48 <etharp_raw+0x84>
801aa3a: 4b23 ldr r3, [pc, #140] ; (801aac8 <etharp_raw+0x104>)
801aa3c: f240 426a movw r2, #1130 ; 0x46a
801aa40: 4925 ldr r1, [pc, #148] ; (801aad8 <etharp_raw+0x114>)
801aa42: 4823 ldr r0, [pc, #140] ; (801aad0 <etharp_raw+0x10c>)
801aa44: f001 fd80 bl 801c548 <iprintf>
(netif->hwaddr_len == ETH_HWADDR_LEN));
/* Write the ARP MAC-Addresses */
SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN);
801aa48: 697b ldr r3, [r7, #20]
801aa4a: 3308 adds r3, #8
801aa4c: 2206 movs r2, #6
801aa4e: 6839 ldr r1, [r7, #0]
801aa50: 4618 mov r0, r3
801aa52: f001 fd4c bl 801c4ee <memcpy>
SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN);
801aa56: 697b ldr r3, [r7, #20]
801aa58: 3312 adds r3, #18
801aa5a: 2206 movs r2, #6
801aa5c: 6af9 ldr r1, [r7, #44] ; 0x2c
801aa5e: 4618 mov r0, r3
801aa60: f001 fd45 bl 801c4ee <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);
801aa64: 697b ldr r3, [r7, #20]
801aa66: 330e adds r3, #14
801aa68: 6aba ldr r2, [r7, #40] ; 0x28
801aa6a: 6812 ldr r2, [r2, #0]
801aa6c: 601a str r2, [r3, #0]
IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr);
801aa6e: 697b ldr r3, [r7, #20]
801aa70: 3318 adds r3, #24
801aa72: 6b3a ldr r2, [r7, #48] ; 0x30
801aa74: 6812 ldr r2, [r2, #0]
801aa76: 601a str r2, [r3, #0]
hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET);
801aa78: 697b ldr r3, [r7, #20]
801aa7a: 2200 movs r2, #0
801aa7c: 701a strb r2, [r3, #0]
801aa7e: 2200 movs r2, #0
801aa80: f042 0201 orr.w r2, r2, #1
801aa84: 705a strb r2, [r3, #1]
hdr->proto = PP_HTONS(ETHTYPE_IP);
801aa86: 697b ldr r3, [r7, #20]
801aa88: 2200 movs r2, #0
801aa8a: f042 0208 orr.w r2, r2, #8
801aa8e: 709a strb r2, [r3, #2]
801aa90: 2200 movs r2, #0
801aa92: 70da strb r2, [r3, #3]
/* set hwlen and protolen */
hdr->hwlen = ETH_HWADDR_LEN;
801aa94: 697b ldr r3, [r7, #20]
801aa96: 2206 movs r2, #6
801aa98: 711a strb r2, [r3, #4]
hdr->protolen = sizeof(ip4_addr_t);
801aa9a: 697b ldr r3, [r7, #20]
801aa9c: 2204 movs r2, #4
801aa9e: 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);
801aaa0: f640 0306 movw r3, #2054 ; 0x806
801aaa4: 9300 str r3, [sp, #0]
801aaa6: 687b ldr r3, [r7, #4]
801aaa8: 68ba ldr r2, [r7, #8]
801aaaa: 69b9 ldr r1, [r7, #24]
801aaac: 68f8 ldr r0, [r7, #12]
801aaae: f001 fb8d bl 801c1cc <ethernet_output>
}
ETHARP_STATS_INC(etharp.xmit);
/* free ARP query packet */
pbuf_free(p);
801aab2: 69b8 ldr r0, [r7, #24]
801aab4: f7f7 f818 bl 8011ae8 <pbuf_free>
p = NULL;
801aab8: 2300 movs r3, #0
801aaba: 61bb str r3, [r7, #24]
/* could not allocate pbuf for ARP request */
return result;
801aabc: f997 301f ldrsb.w r3, [r7, #31]
}
801aac0: 4618 mov r0, r3
801aac2: 3720 adds r7, #32
801aac4: 46bd mov sp, r7
801aac6: bd80 pop {r7, pc}
801aac8: 0801ffb8 .word 0x0801ffb8
801aacc: 08020108 .word 0x08020108
801aad0: 08020030 .word 0x08020030
801aad4: 080201b8 .word 0x080201b8
801aad8: 080201ec .word 0x080201ec
0801aadc <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)
{
801aadc: b580 push {r7, lr}
801aade: b088 sub sp, #32
801aae0: af04 add r7, sp, #16
801aae2: 60f8 str r0, [r7, #12]
801aae4: 60b9 str r1, [r7, #8]
801aae6: 607a str r2, [r7, #4]
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
801aae8: 68fb ldr r3, [r7, #12]
801aaea: f103 012a add.w r1, r3, #42 ; 0x2a
(struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), &ethzero,
801aaee: 68fb ldr r3, [r7, #12]
801aaf0: f103 002a add.w r0, r3, #42 ; 0x2a
801aaf4: 68fb ldr r3, [r7, #12]
801aaf6: 3304 adds r3, #4
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
801aaf8: 2201 movs r2, #1
801aafa: 9203 str r2, [sp, #12]
801aafc: 68ba ldr r2, [r7, #8]
801aafe: 9202 str r2, [sp, #8]
801ab00: 4a06 ldr r2, [pc, #24] ; (801ab1c <etharp_request_dst+0x40>)
801ab02: 9201 str r2, [sp, #4]
801ab04: 9300 str r3, [sp, #0]
801ab06: 4603 mov r3, r0
801ab08: 687a ldr r2, [r7, #4]
801ab0a: 68f8 ldr r0, [r7, #12]
801ab0c: f7ff ff5a bl 801a9c4 <etharp_raw>
801ab10: 4603 mov r3, r0
ipaddr, ARP_REQUEST);
}
801ab12: 4618 mov r0, r3
801ab14: 3710 adds r7, #16
801ab16: 46bd mov sp, r7
801ab18: bd80 pop {r7, pc}
801ab1a: bf00 nop
801ab1c: 080226f8 .word 0x080226f8
0801ab20 <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)
{
801ab20: b580 push {r7, lr}
801ab22: b082 sub sp, #8
801ab24: af00 add r7, sp, #0
801ab26: 6078 str r0, [r7, #4]
801ab28: 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);
801ab2a: 4a05 ldr r2, [pc, #20] ; (801ab40 <etharp_request+0x20>)
801ab2c: 6839 ldr r1, [r7, #0]
801ab2e: 6878 ldr r0, [r7, #4]
801ab30: f7ff ffd4 bl 801aadc <etharp_request_dst>
801ab34: 4603 mov r3, r0
}
801ab36: 4618 mov r0, r3
801ab38: 3708 adds r7, #8
801ab3a: 46bd mov sp, r7
801ab3c: bd80 pop {r7, pc}
801ab3e: bf00 nop
801ab40: 080226f0 .word 0x080226f0
0801ab44 <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)
{
801ab44: b580 push {r7, lr}
801ab46: b08e sub sp, #56 ; 0x38
801ab48: af04 add r7, sp, #16
801ab4a: 6078 str r0, [r7, #4]
801ab4c: 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();
801ab4e: 4b79 ldr r3, [pc, #484] ; (801ad34 <icmp_input+0x1f0>)
801ab50: 689b ldr r3, [r3, #8]
801ab52: 627b str r3, [r7, #36] ; 0x24
hlen = IPH_HL_BYTES(iphdr_in);
801ab54: 6a7b ldr r3, [r7, #36] ; 0x24
801ab56: 781b ldrb r3, [r3, #0]
801ab58: f003 030f and.w r3, r3, #15
801ab5c: b2db uxtb r3, r3
801ab5e: 009b lsls r3, r3, #2
801ab60: b2db uxtb r3, r3
801ab62: 847b strh r3, [r7, #34] ; 0x22
if (hlen < IP_HLEN) {
801ab64: 8c7b ldrh r3, [r7, #34] ; 0x22
801ab66: 2b13 cmp r3, #19
801ab68: f240 80cd bls.w 801ad06 <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) {
801ab6c: 687b ldr r3, [r7, #4]
801ab6e: 895b ldrh r3, [r3, #10]
801ab70: 2b03 cmp r3, #3
801ab72: f240 80ca bls.w 801ad0a <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);
801ab76: 687b ldr r3, [r7, #4]
801ab78: 685b ldr r3, [r3, #4]
801ab7a: 781b ldrb r3, [r3, #0]
801ab7c: 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) {
801ab80: f897 3021 ldrb.w r3, [r7, #33] ; 0x21
801ab84: 2b00 cmp r3, #0
801ab86: f000 80b7 beq.w 801acf8 <icmp_input+0x1b4>
801ab8a: 2b08 cmp r3, #8
801ab8c: f040 80b7 bne.w 801acfe <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();
801ab90: 4b69 ldr r3, [pc, #420] ; (801ad38 <icmp_input+0x1f4>)
801ab92: 61fb str r3, [r7, #28]
/* multicast destination address? */
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
801ab94: 4b67 ldr r3, [pc, #412] ; (801ad34 <icmp_input+0x1f0>)
801ab96: 695b ldr r3, [r3, #20]
801ab98: f003 03f0 and.w r3, r3, #240 ; 0xf0
801ab9c: 2be0 cmp r3, #224 ; 0xe0
801ab9e: f000 80bb beq.w 801ad18 <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())) {
801aba2: 4b64 ldr r3, [pc, #400] ; (801ad34 <icmp_input+0x1f0>)
801aba4: 695a ldr r2, [r3, #20]
801aba6: 4b63 ldr r3, [pc, #396] ; (801ad34 <icmp_input+0x1f0>)
801aba8: 681b ldr r3, [r3, #0]
801abaa: 4619 mov r1, r3
801abac: 4610 mov r0, r2
801abae: f000 fc09 bl 801b3c4 <ip4_addr_isbroadcast_u32>
801abb2: 4603 mov r3, r0
801abb4: 2b00 cmp r3, #0
801abb6: f040 80b1 bne.w 801ad1c <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)) {
801abba: 687b ldr r3, [r7, #4]
801abbc: 891b ldrh r3, [r3, #8]
801abbe: 2b07 cmp r3, #7
801abc0: f240 80a5 bls.w 801ad0e <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)) {
801abc4: 8c7b ldrh r3, [r7, #34] ; 0x22
801abc6: 330e adds r3, #14
801abc8: 4619 mov r1, r3
801abca: 6878 ldr r0, [r7, #4]
801abcc: f7f6 fef6 bl 80119bc <pbuf_add_header>
801abd0: 4603 mov r3, r0
801abd2: 2b00 cmp r3, #0
801abd4: d04b beq.n 801ac6e <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);
801abd6: 687b ldr r3, [r7, #4]
801abd8: 891a ldrh r2, [r3, #8]
801abda: 8c7b ldrh r3, [r7, #34] ; 0x22
801abdc: 4413 add r3, r2
801abde: 837b strh r3, [r7, #26]
if (alloc_len < p->tot_len) {
801abe0: 687b ldr r3, [r7, #4]
801abe2: 891b ldrh r3, [r3, #8]
801abe4: 8b7a ldrh r2, [r7, #26]
801abe6: 429a cmp r2, r3
801abe8: f0c0 809a bcc.w 801ad20 <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);
801abec: 8b7b ldrh r3, [r7, #26]
801abee: f44f 7220 mov.w r2, #640 ; 0x280
801abf2: 4619 mov r1, r3
801abf4: 200e movs r0, #14
801abf6: f7f6 fc97 bl 8011528 <pbuf_alloc>
801abfa: 6178 str r0, [r7, #20]
if (r == NULL) {
801abfc: 697b ldr r3, [r7, #20]
801abfe: 2b00 cmp r3, #0
801ac00: f000 8090 beq.w 801ad24 <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)) {
801ac04: 697b ldr r3, [r7, #20]
801ac06: 895b ldrh r3, [r3, #10]
801ac08: 461a mov r2, r3
801ac0a: 8c7b ldrh r3, [r7, #34] ; 0x22
801ac0c: 3308 adds r3, #8
801ac0e: 429a cmp r2, r3
801ac10: d203 bcs.n 801ac1a <icmp_input+0xd6>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header"));
pbuf_free(r);
801ac12: 6978 ldr r0, [r7, #20]
801ac14: f7f6 ff68 bl 8011ae8 <pbuf_free>
goto icmperr;
801ac18: e085 b.n 801ad26 <icmp_input+0x1e2>
}
/* copy the ip header */
MEMCPY(r->payload, iphdr_in, hlen);
801ac1a: 697b ldr r3, [r7, #20]
801ac1c: 685b ldr r3, [r3, #4]
801ac1e: 8c7a ldrh r2, [r7, #34] ; 0x22
801ac20: 6a79 ldr r1, [r7, #36] ; 0x24
801ac22: 4618 mov r0, r3
801ac24: f001 fc63 bl 801c4ee <memcpy>
/* switch r->payload back to icmp header (cannot fail) */
if (pbuf_remove_header(r, hlen)) {
801ac28: 8c7b ldrh r3, [r7, #34] ; 0x22
801ac2a: 4619 mov r1, r3
801ac2c: 6978 ldr r0, [r7, #20]
801ac2e: f7f6 fed5 bl 80119dc <pbuf_remove_header>
801ac32: 4603 mov r3, r0
801ac34: 2b00 cmp r3, #0
801ac36: d009 beq.n 801ac4c <icmp_input+0x108>
LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0);
801ac38: 4b40 ldr r3, [pc, #256] ; (801ad3c <icmp_input+0x1f8>)
801ac3a: 22b6 movs r2, #182 ; 0xb6
801ac3c: 4940 ldr r1, [pc, #256] ; (801ad40 <icmp_input+0x1fc>)
801ac3e: 4841 ldr r0, [pc, #260] ; (801ad44 <icmp_input+0x200>)
801ac40: f001 fc82 bl 801c548 <iprintf>
pbuf_free(r);
801ac44: 6978 ldr r0, [r7, #20]
801ac46: f7f6 ff4f bl 8011ae8 <pbuf_free>
goto icmperr;
801ac4a: e06c b.n 801ad26 <icmp_input+0x1e2>
}
/* copy the rest of the packet without ip header */
if (pbuf_copy(r, p) != ERR_OK) {
801ac4c: 6879 ldr r1, [r7, #4]
801ac4e: 6978 ldr r0, [r7, #20]
801ac50: f7f7 f87e bl 8011d50 <pbuf_copy>
801ac54: 4603 mov r3, r0
801ac56: 2b00 cmp r3, #0
801ac58: d003 beq.n 801ac62 <icmp_input+0x11e>
LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed"));
pbuf_free(r);
801ac5a: 6978 ldr r0, [r7, #20]
801ac5c: f7f6 ff44 bl 8011ae8 <pbuf_free>
goto icmperr;
801ac60: e061 b.n 801ad26 <icmp_input+0x1e2>
}
/* free the original p */
pbuf_free(p);
801ac62: 6878 ldr r0, [r7, #4]
801ac64: f7f6 ff40 bl 8011ae8 <pbuf_free>
/* we now have an identical copy of p that has room for link headers */
p = r;
801ac68: 697b ldr r3, [r7, #20]
801ac6a: 607b str r3, [r7, #4]
801ac6c: e00f b.n 801ac8e <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)) {
801ac6e: 8c7b ldrh r3, [r7, #34] ; 0x22
801ac70: 330e adds r3, #14
801ac72: 4619 mov r1, r3
801ac74: 6878 ldr r0, [r7, #4]
801ac76: f7f6 feb1 bl 80119dc <pbuf_remove_header>
801ac7a: 4603 mov r3, r0
801ac7c: 2b00 cmp r3, #0
801ac7e: d006 beq.n 801ac8e <icmp_input+0x14a>
LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0);
801ac80: 4b2e ldr r3, [pc, #184] ; (801ad3c <icmp_input+0x1f8>)
801ac82: 22c7 movs r2, #199 ; 0xc7
801ac84: 4930 ldr r1, [pc, #192] ; (801ad48 <icmp_input+0x204>)
801ac86: 482f ldr r0, [pc, #188] ; (801ad44 <icmp_input+0x200>)
801ac88: f001 fc5e bl 801c548 <iprintf>
goto icmperr;
801ac8c: e04b b.n 801ad26 <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;
801ac8e: 687b ldr r3, [r7, #4]
801ac90: 685b ldr r3, [r3, #4]
801ac92: 613b str r3, [r7, #16]
if (pbuf_add_header(p, hlen)) {
801ac94: 8c7b ldrh r3, [r7, #34] ; 0x22
801ac96: 4619 mov r1, r3
801ac98: 6878 ldr r0, [r7, #4]
801ac9a: f7f6 fe8f bl 80119bc <pbuf_add_header>
801ac9e: 4603 mov r3, r0
801aca0: 2b00 cmp r3, #0
801aca2: d12b bne.n 801acfc <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;
801aca4: 687b ldr r3, [r7, #4]
801aca6: 685b ldr r3, [r3, #4]
801aca8: 60fb str r3, [r7, #12]
ip4_addr_copy(iphdr->src, *src);
801acaa: 69fb ldr r3, [r7, #28]
801acac: 681a ldr r2, [r3, #0]
801acae: 68fb ldr r3, [r7, #12]
801acb0: 60da str r2, [r3, #12]
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
801acb2: 4b20 ldr r3, [pc, #128] ; (801ad34 <icmp_input+0x1f0>)
801acb4: 691a ldr r2, [r3, #16]
801acb6: 68fb ldr r3, [r7, #12]
801acb8: 611a str r2, [r3, #16]
ICMPH_TYPE_SET(iecho, ICMP_ER);
801acba: 693b ldr r3, [r7, #16]
801acbc: 2200 movs r2, #0
801acbe: 701a strb r2, [r3, #0]
else {
iecho->chksum = 0;
}
#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
#else /* CHECKSUM_GEN_ICMP */
iecho->chksum = 0;
801acc0: 693b ldr r3, [r7, #16]
801acc2: 2200 movs r2, #0
801acc4: 709a strb r2, [r3, #2]
801acc6: 2200 movs r2, #0
801acc8: 70da strb r2, [r3, #3]
#endif /* CHECKSUM_GEN_ICMP */
/* Set the correct TTL and recalculate the header checksum. */
IPH_TTL_SET(iphdr, ICMP_TTL);
801acca: 68fb ldr r3, [r7, #12]
801accc: 22ff movs r2, #255 ; 0xff
801acce: 721a strb r2, [r3, #8]
IPH_CHKSUM_SET(iphdr, 0);
801acd0: 68fb ldr r3, [r7, #12]
801acd2: 2200 movs r2, #0
801acd4: 729a strb r2, [r3, #10]
801acd6: 2200 movs r2, #0
801acd8: 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,
801acda: 683b ldr r3, [r7, #0]
801acdc: 9302 str r3, [sp, #8]
801acde: 2301 movs r3, #1
801ace0: 9301 str r3, [sp, #4]
801ace2: 2300 movs r3, #0
801ace4: 9300 str r3, [sp, #0]
801ace6: 23ff movs r3, #255 ; 0xff
801ace8: 2200 movs r2, #0
801acea: 69f9 ldr r1, [r7, #28]
801acec: 6878 ldr r0, [r7, #4]
801acee: f000 fa91 bl 801b214 <ip4_output_if>
801acf2: 4603 mov r3, r0
801acf4: 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;
801acf6: e001 b.n 801acfc <icmp_input+0x1b8>
break;
801acf8: bf00 nop
801acfa: e000 b.n 801acfe <icmp_input+0x1ba>
break;
801acfc: 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);
801acfe: 6878 ldr r0, [r7, #4]
801ad00: f7f6 fef2 bl 8011ae8 <pbuf_free>
return;
801ad04: e013 b.n 801ad2e <icmp_input+0x1ea>
goto lenerr;
801ad06: bf00 nop
801ad08: e002 b.n 801ad10 <icmp_input+0x1cc>
goto lenerr;
801ad0a: bf00 nop
801ad0c: e000 b.n 801ad10 <icmp_input+0x1cc>
goto lenerr;
801ad0e: bf00 nop
lenerr:
pbuf_free(p);
801ad10: 6878 ldr r0, [r7, #4]
801ad12: f7f6 fee9 bl 8011ae8 <pbuf_free>
ICMP_STATS_INC(icmp.lenerr);
MIB2_STATS_INC(mib2.icmpinerrors);
return;
801ad16: e00a b.n 801ad2e <icmp_input+0x1ea>
goto icmperr;
801ad18: bf00 nop
801ad1a: e004 b.n 801ad26 <icmp_input+0x1e2>
goto icmperr;
801ad1c: bf00 nop
801ad1e: e002 b.n 801ad26 <icmp_input+0x1e2>
goto icmperr;
801ad20: bf00 nop
801ad22: e000 b.n 801ad26 <icmp_input+0x1e2>
goto icmperr;
801ad24: bf00 nop
#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING
icmperr:
pbuf_free(p);
801ad26: 6878 ldr r0, [r7, #4]
801ad28: f7f6 fede bl 8011ae8 <pbuf_free>
ICMP_STATS_INC(icmp.err);
MIB2_STATS_INC(mib2.icmpinerrors);
return;
801ad2c: bf00 nop
#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */
}
801ad2e: 3728 adds r7, #40 ; 0x28
801ad30: 46bd mov sp, r7
801ad32: bd80 pop {r7, pc}
801ad34: 2000c0b4 .word 0x2000c0b4
801ad38: 2000c0c8 .word 0x2000c0c8
801ad3c: 08020230 .word 0x08020230
801ad40: 08020268 .word 0x08020268
801ad44: 080202a0 .word 0x080202a0
801ad48: 080202c8 .word 0x080202c8
0801ad4c <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)
{
801ad4c: b580 push {r7, lr}
801ad4e: b082 sub sp, #8
801ad50: af00 add r7, sp, #0
801ad52: 6078 str r0, [r7, #4]
801ad54: 460b mov r3, r1
801ad56: 70fb strb r3, [r7, #3]
MIB2_STATS_INC(mib2.icmpoutdestunreachs);
icmp_send_response(p, ICMP_DUR, t);
801ad58: 78fb ldrb r3, [r7, #3]
801ad5a: 461a mov r2, r3
801ad5c: 2103 movs r1, #3
801ad5e: 6878 ldr r0, [r7, #4]
801ad60: f000 f814 bl 801ad8c <icmp_send_response>
}
801ad64: bf00 nop
801ad66: 3708 adds r7, #8
801ad68: 46bd mov sp, r7
801ad6a: bd80 pop {r7, pc}
0801ad6c <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)
{
801ad6c: b580 push {r7, lr}
801ad6e: b082 sub sp, #8
801ad70: af00 add r7, sp, #0
801ad72: 6078 str r0, [r7, #4]
801ad74: 460b mov r3, r1
801ad76: 70fb strb r3, [r7, #3]
MIB2_STATS_INC(mib2.icmpouttimeexcds);
icmp_send_response(p, ICMP_TE, t);
801ad78: 78fb ldrb r3, [r7, #3]
801ad7a: 461a mov r2, r3
801ad7c: 210b movs r1, #11
801ad7e: 6878 ldr r0, [r7, #4]
801ad80: f000 f804 bl 801ad8c <icmp_send_response>
}
801ad84: bf00 nop
801ad86: 3708 adds r7, #8
801ad88: 46bd mov sp, r7
801ad8a: bd80 pop {r7, pc}
0801ad8c <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)
{
801ad8c: b580 push {r7, lr}
801ad8e: b08c sub sp, #48 ; 0x30
801ad90: af04 add r7, sp, #16
801ad92: 6078 str r0, [r7, #4]
801ad94: 460b mov r3, r1
801ad96: 70fb strb r3, [r7, #3]
801ad98: 4613 mov r3, r2
801ad9a: 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,
801ad9c: f44f 7220 mov.w r2, #640 ; 0x280
801ada0: 2124 movs r1, #36 ; 0x24
801ada2: 2022 movs r0, #34 ; 0x22
801ada4: f7f6 fbc0 bl 8011528 <pbuf_alloc>
801ada8: 61f8 str r0, [r7, #28]
PBUF_RAM);
if (q == NULL) {
801adaa: 69fb ldr r3, [r7, #28]
801adac: 2b00 cmp r3, #0
801adae: d04c beq.n 801ae4a <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",
801adb0: 69fb ldr r3, [r7, #28]
801adb2: 895b ldrh r3, [r3, #10]
801adb4: 2b23 cmp r3, #35 ; 0x23
801adb6: d806 bhi.n 801adc6 <icmp_send_response+0x3a>
801adb8: 4b26 ldr r3, [pc, #152] ; (801ae54 <icmp_send_response+0xc8>)
801adba: f240 1269 movw r2, #361 ; 0x169
801adbe: 4926 ldr r1, [pc, #152] ; (801ae58 <icmp_send_response+0xcc>)
801adc0: 4826 ldr r0, [pc, #152] ; (801ae5c <icmp_send_response+0xd0>)
801adc2: f001 fbc1 bl 801c548 <iprintf>
(q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE)));
iphdr = (struct ip_hdr *)p->payload;
801adc6: 687b ldr r3, [r7, #4]
801adc8: 685b ldr r3, [r3, #4]
801adca: 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;
801adcc: 69fb ldr r3, [r7, #28]
801adce: 685b ldr r3, [r3, #4]
801add0: 617b str r3, [r7, #20]
icmphdr->type = type;
801add2: 697b ldr r3, [r7, #20]
801add4: 78fa ldrb r2, [r7, #3]
801add6: 701a strb r2, [r3, #0]
icmphdr->code = code;
801add8: 697b ldr r3, [r7, #20]
801adda: 78ba ldrb r2, [r7, #2]
801addc: 705a strb r2, [r3, #1]
icmphdr->id = 0;
801adde: 697b ldr r3, [r7, #20]
801ade0: 2200 movs r2, #0
801ade2: 711a strb r2, [r3, #4]
801ade4: 2200 movs r2, #0
801ade6: 715a strb r2, [r3, #5]
icmphdr->seqno = 0;
801ade8: 697b ldr r3, [r7, #20]
801adea: 2200 movs r2, #0
801adec: 719a strb r2, [r3, #6]
801adee: 2200 movs r2, #0
801adf0: 71da strb r2, [r3, #7]
/* copy fields from original packet */
SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload,
801adf2: 69fb ldr r3, [r7, #28]
801adf4: 685b ldr r3, [r3, #4]
801adf6: f103 0008 add.w r0, r3, #8
801adfa: 687b ldr r3, [r7, #4]
801adfc: 685b ldr r3, [r3, #4]
801adfe: 221c movs r2, #28
801ae00: 4619 mov r1, r3
801ae02: f001 fb74 bl 801c4ee <memcpy>
IP_HLEN + ICMP_DEST_UNREACH_DATASIZE);
ip4_addr_copy(iphdr_src, iphdr->src);
801ae06: 69bb ldr r3, [r7, #24]
801ae08: 68db ldr r3, [r3, #12]
801ae0a: 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);
801ae0c: f107 030c add.w r3, r7, #12
801ae10: 4618 mov r0, r3
801ae12: f000 f825 bl 801ae60 <ip4_route>
801ae16: 6138 str r0, [r7, #16]
#endif
if (netif != NULL) {
801ae18: 693b ldr r3, [r7, #16]
801ae1a: 2b00 cmp r3, #0
801ae1c: d011 beq.n 801ae42 <icmp_send_response+0xb6>
/* calculate checksum */
icmphdr->chksum = 0;
801ae1e: 697b ldr r3, [r7, #20]
801ae20: 2200 movs r2, #0
801ae22: 709a strb r2, [r3, #2]
801ae24: 2200 movs r2, #0
801ae26: 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);
801ae28: f107 020c add.w r2, r7, #12
801ae2c: 693b ldr r3, [r7, #16]
801ae2e: 9302 str r3, [sp, #8]
801ae30: 2301 movs r3, #1
801ae32: 9301 str r3, [sp, #4]
801ae34: 2300 movs r3, #0
801ae36: 9300 str r3, [sp, #0]
801ae38: 23ff movs r3, #255 ; 0xff
801ae3a: 2100 movs r1, #0
801ae3c: 69f8 ldr r0, [r7, #28]
801ae3e: f000 f9e9 bl 801b214 <ip4_output_if>
}
pbuf_free(q);
801ae42: 69f8 ldr r0, [r7, #28]
801ae44: f7f6 fe50 bl 8011ae8 <pbuf_free>
801ae48: e000 b.n 801ae4c <icmp_send_response+0xc0>
return;
801ae4a: bf00 nop
}
801ae4c: 3720 adds r7, #32
801ae4e: 46bd mov sp, r7
801ae50: bd80 pop {r7, pc}
801ae52: bf00 nop
801ae54: 08020230 .word 0x08020230
801ae58: 080202fc .word 0x080202fc
801ae5c: 080202a0 .word 0x080202a0
0801ae60 <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)
{
801ae60: b480 push {r7}
801ae62: b085 sub sp, #20
801ae64: af00 add r7, sp, #0
801ae66: 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) {
801ae68: 4b33 ldr r3, [pc, #204] ; (801af38 <ip4_route+0xd8>)
801ae6a: 681b ldr r3, [r3, #0]
801ae6c: 60fb str r3, [r7, #12]
801ae6e: e036 b.n 801aede <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))) {
801ae70: 68fb ldr r3, [r7, #12]
801ae72: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801ae76: f003 0301 and.w r3, r3, #1
801ae7a: b2db uxtb r3, r3
801ae7c: 2b00 cmp r3, #0
801ae7e: d02b beq.n 801aed8 <ip4_route+0x78>
801ae80: 68fb ldr r3, [r7, #12]
801ae82: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801ae86: 089b lsrs r3, r3, #2
801ae88: f003 0301 and.w r3, r3, #1
801ae8c: b2db uxtb r3, r3
801ae8e: 2b00 cmp r3, #0
801ae90: d022 beq.n 801aed8 <ip4_route+0x78>
801ae92: 68fb ldr r3, [r7, #12]
801ae94: 3304 adds r3, #4
801ae96: 681b ldr r3, [r3, #0]
801ae98: 2b00 cmp r3, #0
801ae9a: d01d beq.n 801aed8 <ip4_route+0x78>
/* network mask matches? */
if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
801ae9c: 687b ldr r3, [r7, #4]
801ae9e: 681a ldr r2, [r3, #0]
801aea0: 68fb ldr r3, [r7, #12]
801aea2: 3304 adds r3, #4
801aea4: 681b ldr r3, [r3, #0]
801aea6: 405a eors r2, r3
801aea8: 68fb ldr r3, [r7, #12]
801aeaa: 3308 adds r3, #8
801aeac: 681b ldr r3, [r3, #0]
801aeae: 4013 ands r3, r2
801aeb0: 2b00 cmp r3, #0
801aeb2: d101 bne.n 801aeb8 <ip4_route+0x58>
/* return netif on which to forward IP packet */
return netif;
801aeb4: 68fb ldr r3, [r7, #12]
801aeb6: e038 b.n 801af2a <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))) {
801aeb8: 68fb ldr r3, [r7, #12]
801aeba: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801aebe: f003 0302 and.w r3, r3, #2
801aec2: 2b00 cmp r3, #0
801aec4: d108 bne.n 801aed8 <ip4_route+0x78>
801aec6: 687b ldr r3, [r7, #4]
801aec8: 681a ldr r2, [r3, #0]
801aeca: 68fb ldr r3, [r7, #12]
801aecc: 330c adds r3, #12
801aece: 681b ldr r3, [r3, #0]
801aed0: 429a cmp r2, r3
801aed2: d101 bne.n 801aed8 <ip4_route+0x78>
/* return netif on which to forward IP packet */
return netif;
801aed4: 68fb ldr r3, [r7, #12]
801aed6: e028 b.n 801af2a <ip4_route+0xca>
NETIF_FOREACH(netif) {
801aed8: 68fb ldr r3, [r7, #12]
801aeda: 681b ldr r3, [r3, #0]
801aedc: 60fb str r3, [r7, #12]
801aede: 68fb ldr r3, [r7, #12]
801aee0: 2b00 cmp r3, #0
801aee2: d1c5 bne.n 801ae70 <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) ||
801aee4: 4b15 ldr r3, [pc, #84] ; (801af3c <ip4_route+0xdc>)
801aee6: 681b ldr r3, [r3, #0]
801aee8: 2b00 cmp r3, #0
801aeea: d01a beq.n 801af22 <ip4_route+0xc2>
801aeec: 4b13 ldr r3, [pc, #76] ; (801af3c <ip4_route+0xdc>)
801aeee: 681b ldr r3, [r3, #0]
801aef0: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801aef4: f003 0301 and.w r3, r3, #1
801aef8: 2b00 cmp r3, #0
801aefa: d012 beq.n 801af22 <ip4_route+0xc2>
801aefc: 4b0f ldr r3, [pc, #60] ; (801af3c <ip4_route+0xdc>)
801aefe: 681b ldr r3, [r3, #0]
801af00: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801af04: f003 0304 and.w r3, r3, #4
801af08: 2b00 cmp r3, #0
801af0a: d00a beq.n 801af22 <ip4_route+0xc2>
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
801af0c: 4b0b ldr r3, [pc, #44] ; (801af3c <ip4_route+0xdc>)
801af0e: 681b ldr r3, [r3, #0]
801af10: 3304 adds r3, #4
801af12: 681b ldr r3, [r3, #0]
if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
801af14: 2b00 cmp r3, #0
801af16: d004 beq.n 801af22 <ip4_route+0xc2>
ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
801af18: 687b ldr r3, [r7, #4]
801af1a: 681b ldr r3, [r3, #0]
801af1c: b2db uxtb r3, r3
801af1e: 2b7f cmp r3, #127 ; 0x7f
801af20: d101 bne.n 801af26 <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;
801af22: 2300 movs r3, #0
801af24: e001 b.n 801af2a <ip4_route+0xca>
}
return netif_default;
801af26: 4b05 ldr r3, [pc, #20] ; (801af3c <ip4_route+0xdc>)
801af28: 681b ldr r3, [r3, #0]
}
801af2a: 4618 mov r0, r3
801af2c: 3714 adds r7, #20
801af2e: 46bd mov sp, r7
801af30: f85d 7b04 ldr.w r7, [sp], #4
801af34: 4770 bx lr
801af36: bf00 nop
801af38: 2000f7d8 .word 0x2000f7d8
801af3c: 2000f7dc .word 0x2000f7dc
0801af40 <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)
{
801af40: b580 push {r7, lr}
801af42: b082 sub sp, #8
801af44: af00 add r7, sp, #0
801af46: 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)))) {
801af48: 687b ldr r3, [r7, #4]
801af4a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801af4e: f003 0301 and.w r3, r3, #1
801af52: b2db uxtb r3, r3
801af54: 2b00 cmp r3, #0
801af56: d016 beq.n 801af86 <ip4_input_accept+0x46>
801af58: 687b ldr r3, [r7, #4]
801af5a: 3304 adds r3, #4
801af5c: 681b ldr r3, [r3, #0]
801af5e: 2b00 cmp r3, #0
801af60: d011 beq.n 801af86 <ip4_input_accept+0x46>
/* unicast to this interface address? */
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
801af62: 4b0b ldr r3, [pc, #44] ; (801af90 <ip4_input_accept+0x50>)
801af64: 695a ldr r2, [r3, #20]
801af66: 687b ldr r3, [r7, #4]
801af68: 3304 adds r3, #4
801af6a: 681b ldr r3, [r3, #0]
801af6c: 429a cmp r2, r3
801af6e: d008 beq.n 801af82 <ip4_input_accept+0x42>
/* or broadcast on this interface network address? */
ip4_addr_isbroadcast(ip4_current_dest_addr(), netif)
801af70: 4b07 ldr r3, [pc, #28] ; (801af90 <ip4_input_accept+0x50>)
801af72: 695b ldr r3, [r3, #20]
801af74: 6879 ldr r1, [r7, #4]
801af76: 4618 mov r0, r3
801af78: f000 fa24 bl 801b3c4 <ip4_addr_isbroadcast_u32>
801af7c: 4603 mov r3, r0
if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
801af7e: 2b00 cmp r3, #0
801af80: d001 beq.n 801af86 <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;
801af82: 2301 movs r3, #1
801af84: e000 b.n 801af88 <ip4_input_accept+0x48>
/* accept on this netif */
return 1;
}
#endif /* LWIP_AUTOIP */
}
return 0;
801af86: 2300 movs r3, #0
}
801af88: 4618 mov r0, r3
801af8a: 3708 adds r7, #8
801af8c: 46bd mov sp, r7
801af8e: bd80 pop {r7, pc}
801af90: 2000c0b4 .word 0x2000c0b4
0801af94 <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)
{
801af94: b580 push {r7, lr}
801af96: b088 sub sp, #32
801af98: af00 add r7, sp, #0
801af9a: 6078 str r0, [r7, #4]
801af9c: 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;
801af9e: 2301 movs r3, #1
801afa0: 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;
801afa2: 687b ldr r3, [r7, #4]
801afa4: 685b ldr r3, [r3, #4]
801afa6: 61fb str r3, [r7, #28]
if (IPH_V(iphdr) != 4) {
801afa8: 69fb ldr r3, [r7, #28]
801afaa: 781b ldrb r3, [r3, #0]
801afac: 091b lsrs r3, r3, #4
801afae: b2db uxtb r3, r3
801afb0: 2b04 cmp r3, #4
801afb2: d004 beq.n 801afbe <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);
801afb4: 6878 ldr r0, [r7, #4]
801afb6: f7f6 fd97 bl 8011ae8 <pbuf_free>
IP_STATS_INC(ip.err);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinhdrerrors);
return ERR_OK;
801afba: 2300 movs r3, #0
801afbc: e121 b.n 801b202 <ip4_input+0x26e>
return ERR_OK;
}
#endif
/* obtain IP header length in bytes */
iphdr_hlen = IPH_HL_BYTES(iphdr);
801afbe: 69fb ldr r3, [r7, #28]
801afc0: 781b ldrb r3, [r3, #0]
801afc2: f003 030f and.w r3, r3, #15
801afc6: b2db uxtb r3, r3
801afc8: 009b lsls r3, r3, #2
801afca: b2db uxtb r3, r3
801afcc: 827b strh r3, [r7, #18]
/* obtain ip length in bytes */
iphdr_len = lwip_ntohs(IPH_LEN(iphdr));
801afce: 69fb ldr r3, [r7, #28]
801afd0: 885b ldrh r3, [r3, #2]
801afd2: b29b uxth r3, r3
801afd4: 4618 mov r0, r3
801afd6: f7f5 f9d3 bl 8010380 <lwip_htons>
801afda: 4603 mov r3, r0
801afdc: 823b strh r3, [r7, #16]
/* Trim pbuf. This is especially required for packets < 60 bytes. */
if (iphdr_len < p->tot_len) {
801afde: 687b ldr r3, [r7, #4]
801afe0: 891b ldrh r3, [r3, #8]
801afe2: 8a3a ldrh r2, [r7, #16]
801afe4: 429a cmp r2, r3
801afe6: d204 bcs.n 801aff2 <ip4_input+0x5e>
pbuf_realloc(p, iphdr_len);
801afe8: 8a3b ldrh r3, [r7, #16]
801afea: 4619 mov r1, r3
801afec: 6878 ldr r0, [r7, #4]
801afee: f7f6 fbf5 bl 80117dc <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)) {
801aff2: 687b ldr r3, [r7, #4]
801aff4: 895b ldrh r3, [r3, #10]
801aff6: 8a7a ldrh r2, [r7, #18]
801aff8: 429a cmp r2, r3
801affa: d807 bhi.n 801b00c <ip4_input+0x78>
801affc: 687b ldr r3, [r7, #4]
801affe: 891b ldrh r3, [r3, #8]
801b000: 8a3a ldrh r2, [r7, #16]
801b002: 429a cmp r2, r3
801b004: d802 bhi.n 801b00c <ip4_input+0x78>
801b006: 8a7b ldrh r3, [r7, #18]
801b008: 2b13 cmp r3, #19
801b00a: d804 bhi.n 801b016 <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);
801b00c: 6878 ldr r0, [r7, #4]
801b00e: f7f6 fd6b bl 8011ae8 <pbuf_free>
IP_STATS_INC(ip.lenerr);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipindiscards);
return ERR_OK;
801b012: 2300 movs r3, #0
801b014: e0f5 b.n 801b202 <ip4_input+0x26e>
}
}
#endif
/* copy IP addresses to aligned ip_addr_t */
ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest);
801b016: 69fb ldr r3, [r7, #28]
801b018: 691b ldr r3, [r3, #16]
801b01a: 4a7c ldr r2, [pc, #496] ; (801b20c <ip4_input+0x278>)
801b01c: 6153 str r3, [r2, #20]
ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
801b01e: 69fb ldr r3, [r7, #28]
801b020: 68db ldr r3, [r3, #12]
801b022: 4a7a ldr r2, [pc, #488] ; (801b20c <ip4_input+0x278>)
801b024: 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())) {
801b026: 4b79 ldr r3, [pc, #484] ; (801b20c <ip4_input+0x278>)
801b028: 695b ldr r3, [r3, #20]
801b02a: f003 03f0 and.w r3, r3, #240 ; 0xf0
801b02e: 2be0 cmp r3, #224 ; 0xe0
801b030: d112 bne.n 801b058 <ip4_input+0xc4>
netif = inp;
} else {
netif = NULL;
}
#else /* LWIP_IGMP */
if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
801b032: 683b ldr r3, [r7, #0]
801b034: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b038: f003 0301 and.w r3, r3, #1
801b03c: b2db uxtb r3, r3
801b03e: 2b00 cmp r3, #0
801b040: d007 beq.n 801b052 <ip4_input+0xbe>
801b042: 683b ldr r3, [r7, #0]
801b044: 3304 adds r3, #4
801b046: 681b ldr r3, [r3, #0]
801b048: 2b00 cmp r3, #0
801b04a: d002 beq.n 801b052 <ip4_input+0xbe>
netif = inp;
801b04c: 683b ldr r3, [r7, #0]
801b04e: 61bb str r3, [r7, #24]
801b050: e02a b.n 801b0a8 <ip4_input+0x114>
} else {
netif = NULL;
801b052: 2300 movs r3, #0
801b054: 61bb str r3, [r7, #24]
801b056: e027 b.n 801b0a8 <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)) {
801b058: 6838 ldr r0, [r7, #0]
801b05a: f7ff ff71 bl 801af40 <ip4_input_accept>
801b05e: 4603 mov r3, r0
801b060: 2b00 cmp r3, #0
801b062: d002 beq.n 801b06a <ip4_input+0xd6>
netif = inp;
801b064: 683b ldr r3, [r7, #0]
801b066: 61bb str r3, [r7, #24]
801b068: e01e b.n 801b0a8 <ip4_input+0x114>
} else {
netif = NULL;
801b06a: 2300 movs r3, #0
801b06c: 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()))
801b06e: 4b67 ldr r3, [pc, #412] ; (801b20c <ip4_input+0x278>)
801b070: 695b ldr r3, [r3, #20]
801b072: b2db uxtb r3, r3
801b074: 2b7f cmp r3, #127 ; 0x7f
801b076: d017 beq.n 801b0a8 <ip4_input+0x114>
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
{
#if !LWIP_SINGLE_NETIF
NETIF_FOREACH(netif) {
801b078: 4b65 ldr r3, [pc, #404] ; (801b210 <ip4_input+0x27c>)
801b07a: 681b ldr r3, [r3, #0]
801b07c: 61bb str r3, [r7, #24]
801b07e: e00e b.n 801b09e <ip4_input+0x10a>
if (netif == inp) {
801b080: 69ba ldr r2, [r7, #24]
801b082: 683b ldr r3, [r7, #0]
801b084: 429a cmp r2, r3
801b086: d006 beq.n 801b096 <ip4_input+0x102>
/* we checked that before already */
continue;
}
if (ip4_input_accept(netif)) {
801b088: 69b8 ldr r0, [r7, #24]
801b08a: f7ff ff59 bl 801af40 <ip4_input_accept>
801b08e: 4603 mov r3, r0
801b090: 2b00 cmp r3, #0
801b092: d108 bne.n 801b0a6 <ip4_input+0x112>
801b094: e000 b.n 801b098 <ip4_input+0x104>
continue;
801b096: bf00 nop
NETIF_FOREACH(netif) {
801b098: 69bb ldr r3, [r7, #24]
801b09a: 681b ldr r3, [r3, #0]
801b09c: 61bb str r3, [r7, #24]
801b09e: 69bb ldr r3, [r7, #24]
801b0a0: 2b00 cmp r3, #0
801b0a2: d1ed bne.n 801b080 <ip4_input+0xec>
801b0a4: e000 b.n 801b0a8 <ip4_input+0x114>
break;
801b0a6: 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) {
801b0a8: 69bb ldr r3, [r7, #24]
801b0aa: 2b00 cmp r3, #0
801b0ac: d111 bne.n 801b0d2 <ip4_input+0x13e>
/* remote port is DHCP server? */
if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
801b0ae: 69fb ldr r3, [r7, #28]
801b0b0: 7a5b ldrb r3, [r3, #9]
801b0b2: 2b11 cmp r3, #17
801b0b4: d10d bne.n 801b0d2 <ip4_input+0x13e>
const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen);
801b0b6: 8a7b ldrh r3, [r7, #18]
801b0b8: 69fa ldr r2, [r7, #28]
801b0ba: 4413 add r3, r2
801b0bc: 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)) {
801b0be: 68fb ldr r3, [r7, #12]
801b0c0: 885b ldrh r3, [r3, #2]
801b0c2: b29b uxth r3, r3
801b0c4: f5b3 4f88 cmp.w r3, #17408 ; 0x4400
801b0c8: d103 bne.n 801b0d2 <ip4_input+0x13e>
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n"));
netif = inp;
801b0ca: 683b ldr r3, [r7, #0]
801b0cc: 61bb str r3, [r7, #24]
check_ip_src = 0;
801b0ce: 2300 movs r3, #0
801b0d0: 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
801b0d2: 697b ldr r3, [r7, #20]
801b0d4: 2b00 cmp r3, #0
801b0d6: d017 beq.n 801b108 <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())
801b0d8: 4b4c ldr r3, [pc, #304] ; (801b20c <ip4_input+0x278>)
801b0da: 691b ldr r3, [r3, #16]
801b0dc: 2b00 cmp r3, #0
801b0de: d013 beq.n 801b108 <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)) ||
801b0e0: 4b4a ldr r3, [pc, #296] ; (801b20c <ip4_input+0x278>)
801b0e2: 691b ldr r3, [r3, #16]
801b0e4: 6839 ldr r1, [r7, #0]
801b0e6: 4618 mov r0, r3
801b0e8: f000 f96c bl 801b3c4 <ip4_addr_isbroadcast_u32>
801b0ec: 4603 mov r3, r0
801b0ee: 2b00 cmp r3, #0
801b0f0: d105 bne.n 801b0fe <ip4_input+0x16a>
(ip4_addr_ismulticast(ip4_current_src_addr()))) {
801b0f2: 4b46 ldr r3, [pc, #280] ; (801b20c <ip4_input+0x278>)
801b0f4: 691b ldr r3, [r3, #16]
801b0f6: f003 03f0 and.w r3, r3, #240 ; 0xf0
if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
801b0fa: 2be0 cmp r3, #224 ; 0xe0
801b0fc: d104 bne.n 801b108 <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);
801b0fe: 6878 ldr r0, [r7, #4]
801b100: f7f6 fcf2 bl 8011ae8 <pbuf_free>
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinaddrerrors);
MIB2_STATS_INC(mib2.ipindiscards);
return ERR_OK;
801b104: 2300 movs r3, #0
801b106: e07c b.n 801b202 <ip4_input+0x26e>
}
}
/* packet not for us? */
if (netif == NULL) {
801b108: 69bb ldr r3, [r7, #24]
801b10a: 2b00 cmp r3, #0
801b10c: d104 bne.n 801b118 <ip4_input+0x184>
{
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinaddrerrors);
MIB2_STATS_INC(mib2.ipindiscards);
}
pbuf_free(p);
801b10e: 6878 ldr r0, [r7, #4]
801b110: f7f6 fcea bl 8011ae8 <pbuf_free>
return ERR_OK;
801b114: 2300 movs r3, #0
801b116: e074 b.n 801b202 <ip4_input+0x26e>
}
/* packet consists of multiple fragments? */
if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
801b118: 69fb ldr r3, [r7, #28]
801b11a: 88db ldrh r3, [r3, #6]
801b11c: b29b uxth r3, r3
801b11e: 461a mov r2, r3
801b120: f64f 733f movw r3, #65343 ; 0xff3f
801b124: 4013 ands r3, r2
801b126: 2b00 cmp r3, #0
801b128: d00b beq.n 801b142 <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);
801b12a: 6878 ldr r0, [r7, #4]
801b12c: f000 fc90 bl 801ba50 <ip4_reass>
801b130: 6078 str r0, [r7, #4]
/* packet not fully reassembled yet? */
if (p == NULL) {
801b132: 687b ldr r3, [r7, #4]
801b134: 2b00 cmp r3, #0
801b136: d101 bne.n 801b13c <ip4_input+0x1a8>
return ERR_OK;
801b138: 2300 movs r3, #0
801b13a: e062 b.n 801b202 <ip4_input+0x26e>
}
iphdr = (const struct ip_hdr *)p->payload;
801b13c: 687b ldr r3, [r7, #4]
801b13e: 685b ldr r3, [r3, #4]
801b140: 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;
801b142: 4a32 ldr r2, [pc, #200] ; (801b20c <ip4_input+0x278>)
801b144: 69bb ldr r3, [r7, #24]
801b146: 6013 str r3, [r2, #0]
ip_data.current_input_netif = inp;
801b148: 4a30 ldr r2, [pc, #192] ; (801b20c <ip4_input+0x278>)
801b14a: 683b ldr r3, [r7, #0]
801b14c: 6053 str r3, [r2, #4]
ip_data.current_ip4_header = iphdr;
801b14e: 4a2f ldr r2, [pc, #188] ; (801b20c <ip4_input+0x278>)
801b150: 69fb ldr r3, [r7, #28]
801b152: 6093 str r3, [r2, #8]
ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr);
801b154: 69fb ldr r3, [r7, #28]
801b156: 781b ldrb r3, [r3, #0]
801b158: f003 030f and.w r3, r3, #15
801b15c: b2db uxtb r3, r3
801b15e: 009b lsls r3, r3, #2
801b160: b2db uxtb r3, r3
801b162: b29a uxth r2, r3
801b164: 4b29 ldr r3, [pc, #164] ; (801b20c <ip4_input+0x278>)
801b166: 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. */
801b168: 8a7b ldrh r3, [r7, #18]
801b16a: 4619 mov r1, r3
801b16c: 6878 ldr r0, [r7, #4]
801b16e: f7f6 fc35 bl 80119dc <pbuf_remove_header>
switch (IPH_PROTO(iphdr)) {
801b172: 69fb ldr r3, [r7, #28]
801b174: 7a5b ldrb r3, [r3, #9]
801b176: 2b06 cmp r3, #6
801b178: d009 beq.n 801b18e <ip4_input+0x1fa>
801b17a: 2b11 cmp r3, #17
801b17c: d002 beq.n 801b184 <ip4_input+0x1f0>
801b17e: 2b01 cmp r3, #1
801b180: d00a beq.n 801b198 <ip4_input+0x204>
801b182: e00e b.n 801b1a2 <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);
801b184: 6839 ldr r1, [r7, #0]
801b186: 6878 ldr r0, [r7, #4]
801b188: f7fc fada bl 8017740 <udp_input>
break;
801b18c: e026 b.n 801b1dc <ip4_input+0x248>
#endif /* LWIP_UDP */
#if LWIP_TCP
case IP_PROTO_TCP:
MIB2_STATS_INC(mib2.ipindelivers);
tcp_input(p, inp);
801b18e: 6839 ldr r1, [r7, #0]
801b190: 6878 ldr r0, [r7, #4]
801b192: f7f8 fae1 bl 8013758 <tcp_input>
break;
801b196: e021 b.n 801b1dc <ip4_input+0x248>
#endif /* LWIP_TCP */
#if LWIP_ICMP
case IP_PROTO_ICMP:
MIB2_STATS_INC(mib2.ipindelivers);
icmp_input(p, inp);
801b198: 6839 ldr r1, [r7, #0]
801b19a: 6878 ldr r0, [r7, #4]
801b19c: f7ff fcd2 bl 801ab44 <icmp_input>
break;
801b1a0: e01c b.n 801b1dc <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) &&
801b1a2: 4b1a ldr r3, [pc, #104] ; (801b20c <ip4_input+0x278>)
801b1a4: 695b ldr r3, [r3, #20]
801b1a6: 69b9 ldr r1, [r7, #24]
801b1a8: 4618 mov r0, r3
801b1aa: f000 f90b bl 801b3c4 <ip4_addr_isbroadcast_u32>
801b1ae: 4603 mov r3, r0
801b1b0: 2b00 cmp r3, #0
801b1b2: d10f bne.n 801b1d4 <ip4_input+0x240>
!ip4_addr_ismulticast(ip4_current_dest_addr())) {
801b1b4: 4b15 ldr r3, [pc, #84] ; (801b20c <ip4_input+0x278>)
801b1b6: 695b ldr r3, [r3, #20]
801b1b8: f003 03f0 and.w r3, r3, #240 ; 0xf0
if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
801b1bc: 2be0 cmp r3, #224 ; 0xe0
801b1be: d009 beq.n 801b1d4 <ip4_input+0x240>
pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */
801b1c0: f9b7 3012 ldrsh.w r3, [r7, #18]
801b1c4: 4619 mov r1, r3
801b1c6: 6878 ldr r0, [r7, #4]
801b1c8: f7f6 fc7b bl 8011ac2 <pbuf_header_force>
icmp_dest_unreach(p, ICMP_DUR_PROTO);
801b1cc: 2102 movs r1, #2
801b1ce: 6878 ldr r0, [r7, #4]
801b1d0: f7ff fdbc bl 801ad4c <icmp_dest_unreach>
IP_STATS_INC(ip.proterr);
IP_STATS_INC(ip.drop);
MIB2_STATS_INC(mib2.ipinunknownprotos);
}
pbuf_free(p);
801b1d4: 6878 ldr r0, [r7, #4]
801b1d6: f7f6 fc87 bl 8011ae8 <pbuf_free>
break;
801b1da: bf00 nop
}
}
/* @todo: this is not really necessary... */
ip_data.current_netif = NULL;
801b1dc: 4b0b ldr r3, [pc, #44] ; (801b20c <ip4_input+0x278>)
801b1de: 2200 movs r2, #0
801b1e0: 601a str r2, [r3, #0]
ip_data.current_input_netif = NULL;
801b1e2: 4b0a ldr r3, [pc, #40] ; (801b20c <ip4_input+0x278>)
801b1e4: 2200 movs r2, #0
801b1e6: 605a str r2, [r3, #4]
ip_data.current_ip4_header = NULL;
801b1e8: 4b08 ldr r3, [pc, #32] ; (801b20c <ip4_input+0x278>)
801b1ea: 2200 movs r2, #0
801b1ec: 609a str r2, [r3, #8]
ip_data.current_ip_header_tot_len = 0;
801b1ee: 4b07 ldr r3, [pc, #28] ; (801b20c <ip4_input+0x278>)
801b1f0: 2200 movs r2, #0
801b1f2: 819a strh r2, [r3, #12]
ip4_addr_set_any(ip4_current_src_addr());
801b1f4: 4b05 ldr r3, [pc, #20] ; (801b20c <ip4_input+0x278>)
801b1f6: 2200 movs r2, #0
801b1f8: 611a str r2, [r3, #16]
ip4_addr_set_any(ip4_current_dest_addr());
801b1fa: 4b04 ldr r3, [pc, #16] ; (801b20c <ip4_input+0x278>)
801b1fc: 2200 movs r2, #0
801b1fe: 615a str r2, [r3, #20]
return ERR_OK;
801b200: 2300 movs r3, #0
}
801b202: 4618 mov r0, r3
801b204: 3720 adds r7, #32
801b206: 46bd mov sp, r7
801b208: bd80 pop {r7, pc}
801b20a: bf00 nop
801b20c: 2000c0b4 .word 0x2000c0b4
801b210: 2000f7d8 .word 0x2000f7d8
0801b214 <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)
{
801b214: b580 push {r7, lr}
801b216: b08a sub sp, #40 ; 0x28
801b218: af04 add r7, sp, #16
801b21a: 60f8 str r0, [r7, #12]
801b21c: 60b9 str r1, [r7, #8]
801b21e: 607a str r2, [r7, #4]
801b220: 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;
801b222: 68bb ldr r3, [r7, #8]
801b224: 617b str r3, [r7, #20]
if (dest != LWIP_IP_HDRINCL) {
801b226: 687b ldr r3, [r7, #4]
801b228: 2b00 cmp r3, #0
801b22a: d009 beq.n 801b240 <ip4_output_if+0x2c>
if (ip4_addr_isany(src)) {
801b22c: 68bb ldr r3, [r7, #8]
801b22e: 2b00 cmp r3, #0
801b230: d003 beq.n 801b23a <ip4_output_if+0x26>
801b232: 68bb ldr r3, [r7, #8]
801b234: 681b ldr r3, [r3, #0]
801b236: 2b00 cmp r3, #0
801b238: d102 bne.n 801b240 <ip4_output_if+0x2c>
src_used = netif_ip4_addr(netif);
801b23a: 6abb ldr r3, [r7, #40] ; 0x28
801b23c: 3304 adds r3, #4
801b23e: 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);
801b240: 78fa ldrb r2, [r7, #3]
801b242: 6abb ldr r3, [r7, #40] ; 0x28
801b244: 9302 str r3, [sp, #8]
801b246: f897 3024 ldrb.w r3, [r7, #36] ; 0x24
801b24a: 9301 str r3, [sp, #4]
801b24c: f897 3020 ldrb.w r3, [r7, #32]
801b250: 9300 str r3, [sp, #0]
801b252: 4613 mov r3, r2
801b254: 687a ldr r2, [r7, #4]
801b256: 6979 ldr r1, [r7, #20]
801b258: 68f8 ldr r0, [r7, #12]
801b25a: f000 f805 bl 801b268 <ip4_output_if_src>
801b25e: 4603 mov r3, r0
#endif /* IP_OPTIONS_SEND */
}
801b260: 4618 mov r0, r3
801b262: 3718 adds r7, #24
801b264: 46bd mov sp, r7
801b266: bd80 pop {r7, pc}
0801b268 <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)
{
801b268: b580 push {r7, lr}
801b26a: b088 sub sp, #32
801b26c: af00 add r7, sp, #0
801b26e: 60f8 str r0, [r7, #12]
801b270: 60b9 str r1, [r7, #8]
801b272: 607a str r2, [r7, #4]
801b274: 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);
801b276: 68fb ldr r3, [r7, #12]
801b278: 7b9b ldrb r3, [r3, #14]
801b27a: 2b01 cmp r3, #1
801b27c: d006 beq.n 801b28c <ip4_output_if_src+0x24>
801b27e: 4b4b ldr r3, [pc, #300] ; (801b3ac <ip4_output_if_src+0x144>)
801b280: f44f 7255 mov.w r2, #852 ; 0x354
801b284: 494a ldr r1, [pc, #296] ; (801b3b0 <ip4_output_if_src+0x148>)
801b286: 484b ldr r0, [pc, #300] ; (801b3b4 <ip4_output_if_src+0x14c>)
801b288: f001 f95e bl 801c548 <iprintf>
MIB2_STATS_INC(mib2.ipoutrequests);
/* Should the IP header be generated or is it already included in p? */
if (dest != LWIP_IP_HDRINCL) {
801b28c: 687b ldr r3, [r7, #4]
801b28e: 2b00 cmp r3, #0
801b290: d060 beq.n 801b354 <ip4_output_if_src+0xec>
u16_t ip_hlen = IP_HLEN;
801b292: 2314 movs r3, #20
801b294: 837b strh r3, [r7, #26]
}
#endif /* CHECKSUM_GEN_IP_INLINE */
}
#endif /* IP_OPTIONS_SEND */
/* generate IP header */
if (pbuf_add_header(p, IP_HLEN)) {
801b296: 2114 movs r1, #20
801b298: 68f8 ldr r0, [r7, #12]
801b29a: f7f6 fb8f bl 80119bc <pbuf_add_header>
801b29e: 4603 mov r3, r0
801b2a0: 2b00 cmp r3, #0
801b2a2: d002 beq.n 801b2aa <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;
801b2a4: f06f 0301 mvn.w r3, #1
801b2a8: e07c b.n 801b3a4 <ip4_output_if_src+0x13c>
}
iphdr = (struct ip_hdr *)p->payload;
801b2aa: 68fb ldr r3, [r7, #12]
801b2ac: 685b ldr r3, [r3, #4]
801b2ae: 61fb str r3, [r7, #28]
LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
801b2b0: 68fb ldr r3, [r7, #12]
801b2b2: 895b ldrh r3, [r3, #10]
801b2b4: 2b13 cmp r3, #19
801b2b6: d806 bhi.n 801b2c6 <ip4_output_if_src+0x5e>
801b2b8: 4b3c ldr r3, [pc, #240] ; (801b3ac <ip4_output_if_src+0x144>)
801b2ba: f240 3289 movw r2, #905 ; 0x389
801b2be: 493e ldr r1, [pc, #248] ; (801b3b8 <ip4_output_if_src+0x150>)
801b2c0: 483c ldr r0, [pc, #240] ; (801b3b4 <ip4_output_if_src+0x14c>)
801b2c2: f001 f941 bl 801c548 <iprintf>
(p->len >= sizeof(struct ip_hdr)));
IPH_TTL_SET(iphdr, ttl);
801b2c6: 69fb ldr r3, [r7, #28]
801b2c8: 78fa ldrb r2, [r7, #3]
801b2ca: 721a strb r2, [r3, #8]
IPH_PROTO_SET(iphdr, proto);
801b2cc: 69fb ldr r3, [r7, #28]
801b2ce: f897 202c ldrb.w r2, [r7, #44] ; 0x2c
801b2d2: 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);
801b2d4: 687b ldr r3, [r7, #4]
801b2d6: 681a ldr r2, [r3, #0]
801b2d8: 69fb ldr r3, [r7, #28]
801b2da: 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);
801b2dc: 8b7b ldrh r3, [r7, #26]
801b2de: 089b lsrs r3, r3, #2
801b2e0: b29b uxth r3, r3
801b2e2: b2db uxtb r3, r3
801b2e4: f043 0340 orr.w r3, r3, #64 ; 0x40
801b2e8: b2da uxtb r2, r3
801b2ea: 69fb ldr r3, [r7, #28]
801b2ec: 701a strb r2, [r3, #0]
IPH_TOS_SET(iphdr, tos);
801b2ee: 69fb ldr r3, [r7, #28]
801b2f0: f897 2028 ldrb.w r2, [r7, #40] ; 0x28
801b2f4: 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));
801b2f6: 68fb ldr r3, [r7, #12]
801b2f8: 891b ldrh r3, [r3, #8]
801b2fa: 4618 mov r0, r3
801b2fc: f7f5 f840 bl 8010380 <lwip_htons>
801b300: 4603 mov r3, r0
801b302: 461a mov r2, r3
801b304: 69fb ldr r3, [r7, #28]
801b306: 805a strh r2, [r3, #2]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += iphdr->_len;
#endif /* CHECKSUM_GEN_IP_INLINE */
IPH_OFFSET_SET(iphdr, 0);
801b308: 69fb ldr r3, [r7, #28]
801b30a: 2200 movs r2, #0
801b30c: 719a strb r2, [r3, #6]
801b30e: 2200 movs r2, #0
801b310: 71da strb r2, [r3, #7]
IPH_ID_SET(iphdr, lwip_htons(ip_id));
801b312: 4b2a ldr r3, [pc, #168] ; (801b3bc <ip4_output_if_src+0x154>)
801b314: 881b ldrh r3, [r3, #0]
801b316: 4618 mov r0, r3
801b318: f7f5 f832 bl 8010380 <lwip_htons>
801b31c: 4603 mov r3, r0
801b31e: 461a mov r2, r3
801b320: 69fb ldr r3, [r7, #28]
801b322: 809a strh r2, [r3, #4]
#if CHECKSUM_GEN_IP_INLINE
chk_sum += iphdr->_id;
#endif /* CHECKSUM_GEN_IP_INLINE */
++ip_id;
801b324: 4b25 ldr r3, [pc, #148] ; (801b3bc <ip4_output_if_src+0x154>)
801b326: 881b ldrh r3, [r3, #0]
801b328: 3301 adds r3, #1
801b32a: b29a uxth r2, r3
801b32c: 4b23 ldr r3, [pc, #140] ; (801b3bc <ip4_output_if_src+0x154>)
801b32e: 801a strh r2, [r3, #0]
if (src == NULL) {
801b330: 68bb ldr r3, [r7, #8]
801b332: 2b00 cmp r3, #0
801b334: d104 bne.n 801b340 <ip4_output_if_src+0xd8>
ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
801b336: 4b22 ldr r3, [pc, #136] ; (801b3c0 <ip4_output_if_src+0x158>)
801b338: 681a ldr r2, [r3, #0]
801b33a: 69fb ldr r3, [r7, #28]
801b33c: 60da str r2, [r3, #12]
801b33e: e003 b.n 801b348 <ip4_output_if_src+0xe0>
} else {
/* src cannot be NULL here */
ip4_addr_copy(iphdr->src, *src);
801b340: 68bb ldr r3, [r7, #8]
801b342: 681a ldr r2, [r3, #0]
801b344: 69fb ldr r3, [r7, #28]
801b346: 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);
801b348: 69fb ldr r3, [r7, #28]
801b34a: 2200 movs r2, #0
801b34c: 729a strb r2, [r3, #10]
801b34e: 2200 movs r2, #0
801b350: 72da strb r2, [r3, #11]
801b352: e00f b.n 801b374 <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) {
801b354: 68fb ldr r3, [r7, #12]
801b356: 895b ldrh r3, [r3, #10]
801b358: 2b13 cmp r3, #19
801b35a: d802 bhi.n 801b362 <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;
801b35c: f06f 0301 mvn.w r3, #1
801b360: e020 b.n 801b3a4 <ip4_output_if_src+0x13c>
}
iphdr = (struct ip_hdr *)p->payload;
801b362: 68fb ldr r3, [r7, #12]
801b364: 685b ldr r3, [r3, #4]
801b366: 61fb str r3, [r7, #28]
ip4_addr_copy(dest_addr, iphdr->dest);
801b368: 69fb ldr r3, [r7, #28]
801b36a: 691b ldr r3, [r3, #16]
801b36c: 617b str r3, [r7, #20]
dest = &dest_addr;
801b36e: f107 0314 add.w r3, r7, #20
801b372: 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)) {
801b374: 6b3b ldr r3, [r7, #48] ; 0x30
801b376: 8d1b ldrh r3, [r3, #40] ; 0x28
801b378: 2b00 cmp r3, #0
801b37a: d00c beq.n 801b396 <ip4_output_if_src+0x12e>
801b37c: 68fb ldr r3, [r7, #12]
801b37e: 891a ldrh r2, [r3, #8]
801b380: 6b3b ldr r3, [r7, #48] ; 0x30
801b382: 8d1b ldrh r3, [r3, #40] ; 0x28
801b384: 429a cmp r2, r3
801b386: d906 bls.n 801b396 <ip4_output_if_src+0x12e>
return ip4_frag(p, netif, dest);
801b388: 687a ldr r2, [r7, #4]
801b38a: 6b39 ldr r1, [r7, #48] ; 0x30
801b38c: 68f8 ldr r0, [r7, #12]
801b38e: f000 fd4b bl 801be28 <ip4_frag>
801b392: 4603 mov r3, r0
801b394: e006 b.n 801b3a4 <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);
801b396: 6b3b ldr r3, [r7, #48] ; 0x30
801b398: 695b ldr r3, [r3, #20]
801b39a: 687a ldr r2, [r7, #4]
801b39c: 68f9 ldr r1, [r7, #12]
801b39e: 6b38 ldr r0, [r7, #48] ; 0x30
801b3a0: 4798 blx r3
801b3a2: 4603 mov r3, r0
}
801b3a4: 4618 mov r0, r3
801b3a6: 3720 adds r7, #32
801b3a8: 46bd mov sp, r7
801b3aa: bd80 pop {r7, pc}
801b3ac: 08020328 .word 0x08020328
801b3b0: 0802035c .word 0x0802035c
801b3b4: 08020368 .word 0x08020368
801b3b8: 08020390 .word 0x08020390
801b3bc: 20008856 .word 0x20008856
801b3c0: 080226e8 .word 0x080226e8
0801b3c4 <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)
{
801b3c4: b480 push {r7}
801b3c6: b085 sub sp, #20
801b3c8: af00 add r7, sp, #0
801b3ca: 6078 str r0, [r7, #4]
801b3cc: 6039 str r1, [r7, #0]
ip4_addr_t ipaddr;
ip4_addr_set_u32(&ipaddr, addr);
801b3ce: 687b ldr r3, [r7, #4]
801b3d0: 60fb str r3, [r7, #12]
/* all ones (broadcast) or all zeroes (old skool broadcast) */
if ((~addr == IPADDR_ANY) ||
801b3d2: 687b ldr r3, [r7, #4]
801b3d4: f1b3 3fff cmp.w r3, #4294967295
801b3d8: d002 beq.n 801b3e0 <ip4_addr_isbroadcast_u32+0x1c>
801b3da: 687b ldr r3, [r7, #4]
801b3dc: 2b00 cmp r3, #0
801b3de: d101 bne.n 801b3e4 <ip4_addr_isbroadcast_u32+0x20>
(addr == IPADDR_ANY)) {
return 1;
801b3e0: 2301 movs r3, #1
801b3e2: e02a b.n 801b43a <ip4_addr_isbroadcast_u32+0x76>
/* no broadcast support on this network interface? */
} else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) {
801b3e4: 683b ldr r3, [r7, #0]
801b3e6: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801b3ea: f003 0302 and.w r3, r3, #2
801b3ee: 2b00 cmp r3, #0
801b3f0: d101 bne.n 801b3f6 <ip4_addr_isbroadcast_u32+0x32>
/* the given address cannot be a broadcast address
* nor can we check against any broadcast addresses */
return 0;
801b3f2: 2300 movs r3, #0
801b3f4: e021 b.n 801b43a <ip4_addr_isbroadcast_u32+0x76>
/* address matches network interface address exactly? => no broadcast */
} else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) {
801b3f6: 683b ldr r3, [r7, #0]
801b3f8: 3304 adds r3, #4
801b3fa: 681b ldr r3, [r3, #0]
801b3fc: 687a ldr r2, [r7, #4]
801b3fe: 429a cmp r2, r3
801b400: d101 bne.n 801b406 <ip4_addr_isbroadcast_u32+0x42>
return 0;
801b402: 2300 movs r3, #0
801b404: e019 b.n 801b43a <ip4_addr_isbroadcast_u32+0x76>
/* on the same (sub) network... */
} else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif))
801b406: 68fa ldr r2, [r7, #12]
801b408: 683b ldr r3, [r7, #0]
801b40a: 3304 adds r3, #4
801b40c: 681b ldr r3, [r3, #0]
801b40e: 405a eors r2, r3
801b410: 683b ldr r3, [r7, #0]
801b412: 3308 adds r3, #8
801b414: 681b ldr r3, [r3, #0]
801b416: 4013 ands r3, r2
801b418: 2b00 cmp r3, #0
801b41a: d10d bne.n 801b438 <ip4_addr_isbroadcast_u32+0x74>
/* ...and host identifier bits are all ones? =>... */
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
801b41c: 683b ldr r3, [r7, #0]
801b41e: 3308 adds r3, #8
801b420: 681b ldr r3, [r3, #0]
801b422: 43da mvns r2, r3
801b424: 687b ldr r3, [r7, #4]
801b426: 401a ands r2, r3
(IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) {
801b428: 683b ldr r3, [r7, #0]
801b42a: 3308 adds r3, #8
801b42c: 681b ldr r3, [r3, #0]
801b42e: 43db mvns r3, r3
&& ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
801b430: 429a cmp r2, r3
801b432: d101 bne.n 801b438 <ip4_addr_isbroadcast_u32+0x74>
/* => network broadcast address */
return 1;
801b434: 2301 movs r3, #1
801b436: e000 b.n 801b43a <ip4_addr_isbroadcast_u32+0x76>
} else {
return 0;
801b438: 2300 movs r3, #0
}
}
801b43a: 4618 mov r0, r3
801b43c: 3714 adds r7, #20
801b43e: 46bd mov sp, r7
801b440: f85d 7b04 ldr.w r7, [sp], #4
801b444: 4770 bx lr
...
0801b448 <ip_reass_tmr>:
*
* Should be called every 1000 msec (defined by IP_TMR_INTERVAL).
*/
void
ip_reass_tmr(void)
{
801b448: b580 push {r7, lr}
801b44a: b084 sub sp, #16
801b44c: af00 add r7, sp, #0
struct ip_reassdata *r, *prev = NULL;
801b44e: 2300 movs r3, #0
801b450: 60bb str r3, [r7, #8]
r = reassdatagrams;
801b452: 4b12 ldr r3, [pc, #72] ; (801b49c <ip_reass_tmr+0x54>)
801b454: 681b ldr r3, [r3, #0]
801b456: 60fb str r3, [r7, #12]
while (r != NULL) {
801b458: e018 b.n 801b48c <ip_reass_tmr+0x44>
/* Decrement the timer. Once it reaches 0,
* clean up the incomplete fragment assembly */
if (r->timer > 0) {
801b45a: 68fb ldr r3, [r7, #12]
801b45c: 7fdb ldrb r3, [r3, #31]
801b45e: 2b00 cmp r3, #0
801b460: d00b beq.n 801b47a <ip_reass_tmr+0x32>
r->timer--;
801b462: 68fb ldr r3, [r7, #12]
801b464: 7fdb ldrb r3, [r3, #31]
801b466: 3b01 subs r3, #1
801b468: b2da uxtb r2, r3
801b46a: 68fb ldr r3, [r7, #12]
801b46c: 77da strb r2, [r3, #31]
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer));
prev = r;
801b46e: 68fb ldr r3, [r7, #12]
801b470: 60bb str r3, [r7, #8]
r = r->next;
801b472: 68fb ldr r3, [r7, #12]
801b474: 681b ldr r3, [r3, #0]
801b476: 60fb str r3, [r7, #12]
801b478: e008 b.n 801b48c <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;
801b47a: 68fb ldr r3, [r7, #12]
801b47c: 607b str r3, [r7, #4]
/* get the next pointer before freeing */
r = r->next;
801b47e: 68fb ldr r3, [r7, #12]
801b480: 681b ldr r3, [r3, #0]
801b482: 60fb str r3, [r7, #12]
/* free the helper struct and all enqueued pbufs */
ip_reass_free_complete_datagram(tmp, prev);
801b484: 68b9 ldr r1, [r7, #8]
801b486: 6878 ldr r0, [r7, #4]
801b488: f000 f80a bl 801b4a0 <ip_reass_free_complete_datagram>
while (r != NULL) {
801b48c: 68fb ldr r3, [r7, #12]
801b48e: 2b00 cmp r3, #0
801b490: d1e3 bne.n 801b45a <ip_reass_tmr+0x12>
}
}
}
801b492: bf00 nop
801b494: 3710 adds r7, #16
801b496: 46bd mov sp, r7
801b498: bd80 pop {r7, pc}
801b49a: bf00 nop
801b49c: 20008858 .word 0x20008858
0801b4a0 <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)
{
801b4a0: b580 push {r7, lr}
801b4a2: b088 sub sp, #32
801b4a4: af00 add r7, sp, #0
801b4a6: 6078 str r0, [r7, #4]
801b4a8: 6039 str r1, [r7, #0]
u16_t pbufs_freed = 0;
801b4aa: 2300 movs r3, #0
801b4ac: 83fb strh r3, [r7, #30]
u16_t clen;
struct pbuf *p;
struct ip_reass_helper *iprh;
LWIP_ASSERT("prev != ipr", prev != ipr);
801b4ae: 683a ldr r2, [r7, #0]
801b4b0: 687b ldr r3, [r7, #4]
801b4b2: 429a cmp r2, r3
801b4b4: d105 bne.n 801b4c2 <ip_reass_free_complete_datagram+0x22>
801b4b6: 4b45 ldr r3, [pc, #276] ; (801b5cc <ip_reass_free_complete_datagram+0x12c>)
801b4b8: 22ab movs r2, #171 ; 0xab
801b4ba: 4945 ldr r1, [pc, #276] ; (801b5d0 <ip_reass_free_complete_datagram+0x130>)
801b4bc: 4845 ldr r0, [pc, #276] ; (801b5d4 <ip_reass_free_complete_datagram+0x134>)
801b4be: f001 f843 bl 801c548 <iprintf>
if (prev != NULL) {
801b4c2: 683b ldr r3, [r7, #0]
801b4c4: 2b00 cmp r3, #0
801b4c6: d00a beq.n 801b4de <ip_reass_free_complete_datagram+0x3e>
LWIP_ASSERT("prev->next == ipr", prev->next == ipr);
801b4c8: 683b ldr r3, [r7, #0]
801b4ca: 681b ldr r3, [r3, #0]
801b4cc: 687a ldr r2, [r7, #4]
801b4ce: 429a cmp r2, r3
801b4d0: d005 beq.n 801b4de <ip_reass_free_complete_datagram+0x3e>
801b4d2: 4b3e ldr r3, [pc, #248] ; (801b5cc <ip_reass_free_complete_datagram+0x12c>)
801b4d4: 22ad movs r2, #173 ; 0xad
801b4d6: 4940 ldr r1, [pc, #256] ; (801b5d8 <ip_reass_free_complete_datagram+0x138>)
801b4d8: 483e ldr r0, [pc, #248] ; (801b5d4 <ip_reass_free_complete_datagram+0x134>)
801b4da: f001 f835 bl 801c548 <iprintf>
}
MIB2_STATS_INC(mib2.ipreasmfails);
#if LWIP_ICMP
iprh = (struct ip_reass_helper *)ipr->p->payload;
801b4de: 687b ldr r3, [r7, #4]
801b4e0: 685b ldr r3, [r3, #4]
801b4e2: 685b ldr r3, [r3, #4]
801b4e4: 617b str r3, [r7, #20]
if (iprh->start == 0) {
801b4e6: 697b ldr r3, [r7, #20]
801b4e8: 889b ldrh r3, [r3, #4]
801b4ea: b29b uxth r3, r3
801b4ec: 2b00 cmp r3, #0
801b4ee: d12a bne.n 801b546 <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;
801b4f0: 687b ldr r3, [r7, #4]
801b4f2: 685b ldr r3, [r3, #4]
801b4f4: 61bb str r3, [r7, #24]
ipr->p = iprh->next_pbuf;
801b4f6: 697b ldr r3, [r7, #20]
801b4f8: 681a ldr r2, [r3, #0]
801b4fa: 687b ldr r3, [r7, #4]
801b4fc: 605a str r2, [r3, #4]
/* Then, copy the original header into it. */
SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
801b4fe: 69bb ldr r3, [r7, #24]
801b500: 6858 ldr r0, [r3, #4]
801b502: 687b ldr r3, [r7, #4]
801b504: 3308 adds r3, #8
801b506: 2214 movs r2, #20
801b508: 4619 mov r1, r3
801b50a: f000 fff0 bl 801c4ee <memcpy>
icmp_time_exceeded(p, ICMP_TE_FRAG);
801b50e: 2101 movs r1, #1
801b510: 69b8 ldr r0, [r7, #24]
801b512: f7ff fc2b bl 801ad6c <icmp_time_exceeded>
clen = pbuf_clen(p);
801b516: 69b8 ldr r0, [r7, #24]
801b518: f7f6 fb74 bl 8011c04 <pbuf_clen>
801b51c: 4603 mov r3, r0
801b51e: 827b strh r3, [r7, #18]
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
801b520: 8bfa ldrh r2, [r7, #30]
801b522: 8a7b ldrh r3, [r7, #18]
801b524: 4413 add r3, r2
801b526: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
801b52a: db05 blt.n 801b538 <ip_reass_free_complete_datagram+0x98>
801b52c: 4b27 ldr r3, [pc, #156] ; (801b5cc <ip_reass_free_complete_datagram+0x12c>)
801b52e: 22bc movs r2, #188 ; 0xbc
801b530: 492a ldr r1, [pc, #168] ; (801b5dc <ip_reass_free_complete_datagram+0x13c>)
801b532: 4828 ldr r0, [pc, #160] ; (801b5d4 <ip_reass_free_complete_datagram+0x134>)
801b534: f001 f808 bl 801c548 <iprintf>
pbufs_freed = (u16_t)(pbufs_freed + clen);
801b538: 8bfa ldrh r2, [r7, #30]
801b53a: 8a7b ldrh r3, [r7, #18]
801b53c: 4413 add r3, r2
801b53e: 83fb strh r3, [r7, #30]
pbuf_free(p);
801b540: 69b8 ldr r0, [r7, #24]
801b542: f7f6 fad1 bl 8011ae8 <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;
801b546: 687b ldr r3, [r7, #4]
801b548: 685b ldr r3, [r3, #4]
801b54a: 61bb str r3, [r7, #24]
while (p != NULL) {
801b54c: e01f b.n 801b58e <ip_reass_free_complete_datagram+0xee>
struct pbuf *pcur;
iprh = (struct ip_reass_helper *)p->payload;
801b54e: 69bb ldr r3, [r7, #24]
801b550: 685b ldr r3, [r3, #4]
801b552: 617b str r3, [r7, #20]
pcur = p;
801b554: 69bb ldr r3, [r7, #24]
801b556: 60fb str r3, [r7, #12]
/* get the next pointer before freeing */
p = iprh->next_pbuf;
801b558: 697b ldr r3, [r7, #20]
801b55a: 681b ldr r3, [r3, #0]
801b55c: 61bb str r3, [r7, #24]
clen = pbuf_clen(pcur);
801b55e: 68f8 ldr r0, [r7, #12]
801b560: f7f6 fb50 bl 8011c04 <pbuf_clen>
801b564: 4603 mov r3, r0
801b566: 827b strh r3, [r7, #18]
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
801b568: 8bfa ldrh r2, [r7, #30]
801b56a: 8a7b ldrh r3, [r7, #18]
801b56c: 4413 add r3, r2
801b56e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
801b572: db05 blt.n 801b580 <ip_reass_free_complete_datagram+0xe0>
801b574: 4b15 ldr r3, [pc, #84] ; (801b5cc <ip_reass_free_complete_datagram+0x12c>)
801b576: 22cc movs r2, #204 ; 0xcc
801b578: 4918 ldr r1, [pc, #96] ; (801b5dc <ip_reass_free_complete_datagram+0x13c>)
801b57a: 4816 ldr r0, [pc, #88] ; (801b5d4 <ip_reass_free_complete_datagram+0x134>)
801b57c: f000 ffe4 bl 801c548 <iprintf>
pbufs_freed = (u16_t)(pbufs_freed + clen);
801b580: 8bfa ldrh r2, [r7, #30]
801b582: 8a7b ldrh r3, [r7, #18]
801b584: 4413 add r3, r2
801b586: 83fb strh r3, [r7, #30]
pbuf_free(pcur);
801b588: 68f8 ldr r0, [r7, #12]
801b58a: f7f6 faad bl 8011ae8 <pbuf_free>
while (p != NULL) {
801b58e: 69bb ldr r3, [r7, #24]
801b590: 2b00 cmp r3, #0
801b592: d1dc bne.n 801b54e <ip_reass_free_complete_datagram+0xae>
}
/* Then, unchain the struct ip_reassdata from the list and free it. */
ip_reass_dequeue_datagram(ipr, prev);
801b594: 6839 ldr r1, [r7, #0]
801b596: 6878 ldr r0, [r7, #4]
801b598: f000 f8c2 bl 801b720 <ip_reass_dequeue_datagram>
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
801b59c: 4b10 ldr r3, [pc, #64] ; (801b5e0 <ip_reass_free_complete_datagram+0x140>)
801b59e: 881b ldrh r3, [r3, #0]
801b5a0: 8bfa ldrh r2, [r7, #30]
801b5a2: 429a cmp r2, r3
801b5a4: d905 bls.n 801b5b2 <ip_reass_free_complete_datagram+0x112>
801b5a6: 4b09 ldr r3, [pc, #36] ; (801b5cc <ip_reass_free_complete_datagram+0x12c>)
801b5a8: 22d2 movs r2, #210 ; 0xd2
801b5aa: 490e ldr r1, [pc, #56] ; (801b5e4 <ip_reass_free_complete_datagram+0x144>)
801b5ac: 4809 ldr r0, [pc, #36] ; (801b5d4 <ip_reass_free_complete_datagram+0x134>)
801b5ae: f000 ffcb bl 801c548 <iprintf>
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
801b5b2: 4b0b ldr r3, [pc, #44] ; (801b5e0 <ip_reass_free_complete_datagram+0x140>)
801b5b4: 881a ldrh r2, [r3, #0]
801b5b6: 8bfb ldrh r3, [r7, #30]
801b5b8: 1ad3 subs r3, r2, r3
801b5ba: b29a uxth r2, r3
801b5bc: 4b08 ldr r3, [pc, #32] ; (801b5e0 <ip_reass_free_complete_datagram+0x140>)
801b5be: 801a strh r2, [r3, #0]
return pbufs_freed;
801b5c0: 8bfb ldrh r3, [r7, #30]
}
801b5c2: 4618 mov r0, r3
801b5c4: 3720 adds r7, #32
801b5c6: 46bd mov sp, r7
801b5c8: bd80 pop {r7, pc}
801b5ca: bf00 nop
801b5cc: 080203c0 .word 0x080203c0
801b5d0: 080203fc .word 0x080203fc
801b5d4: 08020408 .word 0x08020408
801b5d8: 08020430 .word 0x08020430
801b5dc: 08020444 .word 0x08020444
801b5e0: 2000885c .word 0x2000885c
801b5e4: 08020464 .word 0x08020464
0801b5e8 <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)
{
801b5e8: b580 push {r7, lr}
801b5ea: b08a sub sp, #40 ; 0x28
801b5ec: af00 add r7, sp, #0
801b5ee: 6078 str r0, [r7, #4]
801b5f0: 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;
801b5f2: 2300 movs r3, #0
801b5f4: 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;
801b5f6: 2300 movs r3, #0
801b5f8: 623b str r3, [r7, #32]
prev = NULL;
801b5fa: 2300 movs r3, #0
801b5fc: 61fb str r3, [r7, #28]
oldest_prev = NULL;
801b5fe: 2300 movs r3, #0
801b600: 61bb str r3, [r7, #24]
other_datagrams = 0;
801b602: 2300 movs r3, #0
801b604: 613b str r3, [r7, #16]
r = reassdatagrams;
801b606: 4b28 ldr r3, [pc, #160] ; (801b6a8 <ip_reass_remove_oldest_datagram+0xc0>)
801b608: 681b ldr r3, [r3, #0]
801b60a: 627b str r3, [r7, #36] ; 0x24
while (r != NULL) {
801b60c: e030 b.n 801b670 <ip_reass_remove_oldest_datagram+0x88>
if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
801b60e: 6a7b ldr r3, [r7, #36] ; 0x24
801b610: 695a ldr r2, [r3, #20]
801b612: 687b ldr r3, [r7, #4]
801b614: 68db ldr r3, [r3, #12]
801b616: 429a cmp r2, r3
801b618: d10c bne.n 801b634 <ip_reass_remove_oldest_datagram+0x4c>
801b61a: 6a7b ldr r3, [r7, #36] ; 0x24
801b61c: 699a ldr r2, [r3, #24]
801b61e: 687b ldr r3, [r7, #4]
801b620: 691b ldr r3, [r3, #16]
801b622: 429a cmp r2, r3
801b624: d106 bne.n 801b634 <ip_reass_remove_oldest_datagram+0x4c>
801b626: 6a7b ldr r3, [r7, #36] ; 0x24
801b628: 899a ldrh r2, [r3, #12]
801b62a: 687b ldr r3, [r7, #4]
801b62c: 889b ldrh r3, [r3, #4]
801b62e: b29b uxth r3, r3
801b630: 429a cmp r2, r3
801b632: d014 beq.n 801b65e <ip_reass_remove_oldest_datagram+0x76>
/* Not the same datagram as fraghdr */
other_datagrams++;
801b634: 693b ldr r3, [r7, #16]
801b636: 3301 adds r3, #1
801b638: 613b str r3, [r7, #16]
if (oldest == NULL) {
801b63a: 6a3b ldr r3, [r7, #32]
801b63c: 2b00 cmp r3, #0
801b63e: d104 bne.n 801b64a <ip_reass_remove_oldest_datagram+0x62>
oldest = r;
801b640: 6a7b ldr r3, [r7, #36] ; 0x24
801b642: 623b str r3, [r7, #32]
oldest_prev = prev;
801b644: 69fb ldr r3, [r7, #28]
801b646: 61bb str r3, [r7, #24]
801b648: e009 b.n 801b65e <ip_reass_remove_oldest_datagram+0x76>
} else if (r->timer <= oldest->timer) {
801b64a: 6a7b ldr r3, [r7, #36] ; 0x24
801b64c: 7fda ldrb r2, [r3, #31]
801b64e: 6a3b ldr r3, [r7, #32]
801b650: 7fdb ldrb r3, [r3, #31]
801b652: 429a cmp r2, r3
801b654: d803 bhi.n 801b65e <ip_reass_remove_oldest_datagram+0x76>
/* older than the previous oldest */
oldest = r;
801b656: 6a7b ldr r3, [r7, #36] ; 0x24
801b658: 623b str r3, [r7, #32]
oldest_prev = prev;
801b65a: 69fb ldr r3, [r7, #28]
801b65c: 61bb str r3, [r7, #24]
}
}
if (r->next != NULL) {
801b65e: 6a7b ldr r3, [r7, #36] ; 0x24
801b660: 681b ldr r3, [r3, #0]
801b662: 2b00 cmp r3, #0
801b664: d001 beq.n 801b66a <ip_reass_remove_oldest_datagram+0x82>
prev = r;
801b666: 6a7b ldr r3, [r7, #36] ; 0x24
801b668: 61fb str r3, [r7, #28]
}
r = r->next;
801b66a: 6a7b ldr r3, [r7, #36] ; 0x24
801b66c: 681b ldr r3, [r3, #0]
801b66e: 627b str r3, [r7, #36] ; 0x24
while (r != NULL) {
801b670: 6a7b ldr r3, [r7, #36] ; 0x24
801b672: 2b00 cmp r3, #0
801b674: d1cb bne.n 801b60e <ip_reass_remove_oldest_datagram+0x26>
}
if (oldest != NULL) {
801b676: 6a3b ldr r3, [r7, #32]
801b678: 2b00 cmp r3, #0
801b67a: d008 beq.n 801b68e <ip_reass_remove_oldest_datagram+0xa6>
pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev);
801b67c: 69b9 ldr r1, [r7, #24]
801b67e: 6a38 ldr r0, [r7, #32]
801b680: f7ff ff0e bl 801b4a0 <ip_reass_free_complete_datagram>
801b684: 60f8 str r0, [r7, #12]
pbufs_freed += pbufs_freed_current;
801b686: 697a ldr r2, [r7, #20]
801b688: 68fb ldr r3, [r7, #12]
801b68a: 4413 add r3, r2
801b68c: 617b str r3, [r7, #20]
}
} while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1));
801b68e: 697a ldr r2, [r7, #20]
801b690: 683b ldr r3, [r7, #0]
801b692: 429a cmp r2, r3
801b694: da02 bge.n 801b69c <ip_reass_remove_oldest_datagram+0xb4>
801b696: 693b ldr r3, [r7, #16]
801b698: 2b01 cmp r3, #1
801b69a: dcac bgt.n 801b5f6 <ip_reass_remove_oldest_datagram+0xe>
return pbufs_freed;
801b69c: 697b ldr r3, [r7, #20]
}
801b69e: 4618 mov r0, r3
801b6a0: 3728 adds r7, #40 ; 0x28
801b6a2: 46bd mov sp, r7
801b6a4: bd80 pop {r7, pc}
801b6a6: bf00 nop
801b6a8: 20008858 .word 0x20008858
0801b6ac <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)
{
801b6ac: b580 push {r7, lr}
801b6ae: b084 sub sp, #16
801b6b0: af00 add r7, sp, #0
801b6b2: 6078 str r0, [r7, #4]
801b6b4: 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);
801b6b6: 2004 movs r0, #4
801b6b8: f7f5 fb18 bl 8010cec <memp_malloc>
801b6bc: 60f8 str r0, [r7, #12]
if (ipr == NULL) {
801b6be: 68fb ldr r3, [r7, #12]
801b6c0: 2b00 cmp r3, #0
801b6c2: d110 bne.n 801b6e6 <ip_reass_enqueue_new_datagram+0x3a>
#if IP_REASS_FREE_OLDEST
if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) {
801b6c4: 6839 ldr r1, [r7, #0]
801b6c6: 6878 ldr r0, [r7, #4]
801b6c8: f7ff ff8e bl 801b5e8 <ip_reass_remove_oldest_datagram>
801b6cc: 4602 mov r2, r0
801b6ce: 683b ldr r3, [r7, #0]
801b6d0: 4293 cmp r3, r2
801b6d2: dc03 bgt.n 801b6dc <ip_reass_enqueue_new_datagram+0x30>
ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
801b6d4: 2004 movs r0, #4
801b6d6: f7f5 fb09 bl 8010cec <memp_malloc>
801b6da: 60f8 str r0, [r7, #12]
}
if (ipr == NULL)
801b6dc: 68fb ldr r3, [r7, #12]
801b6de: 2b00 cmp r3, #0
801b6e0: d101 bne.n 801b6e6 <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;
801b6e2: 2300 movs r3, #0
801b6e4: e016 b.n 801b714 <ip_reass_enqueue_new_datagram+0x68>
}
}
memset(ipr, 0, sizeof(struct ip_reassdata));
801b6e6: 2220 movs r2, #32
801b6e8: 2100 movs r1, #0
801b6ea: 68f8 ldr r0, [r7, #12]
801b6ec: f000 ff23 bl 801c536 <memset>
ipr->timer = IP_REASS_MAXAGE;
801b6f0: 68fb ldr r3, [r7, #12]
801b6f2: 220f movs r2, #15
801b6f4: 77da strb r2, [r3, #31]
/* enqueue the new structure to the front of the list */
ipr->next = reassdatagrams;
801b6f6: 4b09 ldr r3, [pc, #36] ; (801b71c <ip_reass_enqueue_new_datagram+0x70>)
801b6f8: 681a ldr r2, [r3, #0]
801b6fa: 68fb ldr r3, [r7, #12]
801b6fc: 601a str r2, [r3, #0]
reassdatagrams = ipr;
801b6fe: 4a07 ldr r2, [pc, #28] ; (801b71c <ip_reass_enqueue_new_datagram+0x70>)
801b700: 68fb ldr r3, [r7, #12]
801b702: 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);
801b704: 68fb ldr r3, [r7, #12]
801b706: 3308 adds r3, #8
801b708: 2214 movs r2, #20
801b70a: 6879 ldr r1, [r7, #4]
801b70c: 4618 mov r0, r3
801b70e: f000 feee bl 801c4ee <memcpy>
return ipr;
801b712: 68fb ldr r3, [r7, #12]
}
801b714: 4618 mov r0, r3
801b716: 3710 adds r7, #16
801b718: 46bd mov sp, r7
801b71a: bd80 pop {r7, pc}
801b71c: 20008858 .word 0x20008858
0801b720 <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)
{
801b720: b580 push {r7, lr}
801b722: b082 sub sp, #8
801b724: af00 add r7, sp, #0
801b726: 6078 str r0, [r7, #4]
801b728: 6039 str r1, [r7, #0]
/* dequeue the reass struct */
if (reassdatagrams == ipr) {
801b72a: 4b10 ldr r3, [pc, #64] ; (801b76c <ip_reass_dequeue_datagram+0x4c>)
801b72c: 681b ldr r3, [r3, #0]
801b72e: 687a ldr r2, [r7, #4]
801b730: 429a cmp r2, r3
801b732: d104 bne.n 801b73e <ip_reass_dequeue_datagram+0x1e>
/* it was the first in the list */
reassdatagrams = ipr->next;
801b734: 687b ldr r3, [r7, #4]
801b736: 681b ldr r3, [r3, #0]
801b738: 4a0c ldr r2, [pc, #48] ; (801b76c <ip_reass_dequeue_datagram+0x4c>)
801b73a: 6013 str r3, [r2, #0]
801b73c: e00d b.n 801b75a <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);
801b73e: 683b ldr r3, [r7, #0]
801b740: 2b00 cmp r3, #0
801b742: d106 bne.n 801b752 <ip_reass_dequeue_datagram+0x32>
801b744: 4b0a ldr r3, [pc, #40] ; (801b770 <ip_reass_dequeue_datagram+0x50>)
801b746: f240 1245 movw r2, #325 ; 0x145
801b74a: 490a ldr r1, [pc, #40] ; (801b774 <ip_reass_dequeue_datagram+0x54>)
801b74c: 480a ldr r0, [pc, #40] ; (801b778 <ip_reass_dequeue_datagram+0x58>)
801b74e: f000 fefb bl 801c548 <iprintf>
prev->next = ipr->next;
801b752: 687b ldr r3, [r7, #4]
801b754: 681a ldr r2, [r3, #0]
801b756: 683b ldr r3, [r7, #0]
801b758: 601a str r2, [r3, #0]
}
/* now we can free the ip_reassdata struct */
memp_free(MEMP_REASSDATA, ipr);
801b75a: 6879 ldr r1, [r7, #4]
801b75c: 2004 movs r0, #4
801b75e: f7f5 fb17 bl 8010d90 <memp_free>
}
801b762: bf00 nop
801b764: 3708 adds r7, #8
801b766: 46bd mov sp, r7
801b768: bd80 pop {r7, pc}
801b76a: bf00 nop
801b76c: 20008858 .word 0x20008858
801b770: 080203c0 .word 0x080203c0
801b774: 08020488 .word 0x08020488
801b778: 08020408 .word 0x08020408
0801b77c <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)
{
801b77c: b580 push {r7, lr}
801b77e: b08c sub sp, #48 ; 0x30
801b780: af00 add r7, sp, #0
801b782: 60f8 str r0, [r7, #12]
801b784: 60b9 str r1, [r7, #8]
801b786: 607a str r2, [r7, #4]
struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL;
801b788: 2300 movs r3, #0
801b78a: 62bb str r3, [r7, #40] ; 0x28
struct pbuf *q;
u16_t offset, len;
u8_t hlen;
struct ip_hdr *fraghdr;
int valid = 1;
801b78c: 2301 movs r3, #1
801b78e: 623b str r3, [r7, #32]
/* Extract length and fragment offset from current fragment */
fraghdr = (struct ip_hdr *)new_p->payload;
801b790: 68bb ldr r3, [r7, #8]
801b792: 685b ldr r3, [r3, #4]
801b794: 61fb str r3, [r7, #28]
len = lwip_ntohs(IPH_LEN(fraghdr));
801b796: 69fb ldr r3, [r7, #28]
801b798: 885b ldrh r3, [r3, #2]
801b79a: b29b uxth r3, r3
801b79c: 4618 mov r0, r3
801b79e: f7f4 fdef bl 8010380 <lwip_htons>
801b7a2: 4603 mov r3, r0
801b7a4: 837b strh r3, [r7, #26]
hlen = IPH_HL_BYTES(fraghdr);
801b7a6: 69fb ldr r3, [r7, #28]
801b7a8: 781b ldrb r3, [r3, #0]
801b7aa: f003 030f and.w r3, r3, #15
801b7ae: b2db uxtb r3, r3
801b7b0: 009b lsls r3, r3, #2
801b7b2: 767b strb r3, [r7, #25]
if (hlen > len) {
801b7b4: 7e7b ldrb r3, [r7, #25]
801b7b6: b29b uxth r3, r3
801b7b8: 8b7a ldrh r2, [r7, #26]
801b7ba: 429a cmp r2, r3
801b7bc: d202 bcs.n 801b7c4 <ip_reass_chain_frag_into_datagram_and_validate+0x48>
/* invalid datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801b7be: f04f 33ff mov.w r3, #4294967295
801b7c2: e135 b.n 801ba30 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
len = (u16_t)(len - hlen);
801b7c4: 7e7b ldrb r3, [r7, #25]
801b7c6: b29b uxth r3, r3
801b7c8: 8b7a ldrh r2, [r7, #26]
801b7ca: 1ad3 subs r3, r2, r3
801b7cc: 837b strh r3, [r7, #26]
offset = IPH_OFFSET_BYTES(fraghdr);
801b7ce: 69fb ldr r3, [r7, #28]
801b7d0: 88db ldrh r3, [r3, #6]
801b7d2: b29b uxth r3, r3
801b7d4: 4618 mov r0, r3
801b7d6: f7f4 fdd3 bl 8010380 <lwip_htons>
801b7da: 4603 mov r3, r0
801b7dc: f3c3 030c ubfx r3, r3, #0, #13
801b7e0: b29b uxth r3, r3
801b7e2: 00db lsls r3, r3, #3
801b7e4: 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;
801b7e6: 68bb ldr r3, [r7, #8]
801b7e8: 685b ldr r3, [r3, #4]
801b7ea: 62fb str r3, [r7, #44] ; 0x2c
iprh->next_pbuf = NULL;
801b7ec: 6afb ldr r3, [r7, #44] ; 0x2c
801b7ee: 2200 movs r2, #0
801b7f0: 701a strb r2, [r3, #0]
801b7f2: 2200 movs r2, #0
801b7f4: 705a strb r2, [r3, #1]
801b7f6: 2200 movs r2, #0
801b7f8: 709a strb r2, [r3, #2]
801b7fa: 2200 movs r2, #0
801b7fc: 70da strb r2, [r3, #3]
iprh->start = offset;
801b7fe: 6afb ldr r3, [r7, #44] ; 0x2c
801b800: 8afa ldrh r2, [r7, #22]
801b802: 809a strh r2, [r3, #4]
iprh->end = (u16_t)(offset + len);
801b804: 8afa ldrh r2, [r7, #22]
801b806: 8b7b ldrh r3, [r7, #26]
801b808: 4413 add r3, r2
801b80a: b29a uxth r2, r3
801b80c: 6afb ldr r3, [r7, #44] ; 0x2c
801b80e: 80da strh r2, [r3, #6]
if (iprh->end < offset) {
801b810: 6afb ldr r3, [r7, #44] ; 0x2c
801b812: 88db ldrh r3, [r3, #6]
801b814: b29b uxth r3, r3
801b816: 8afa ldrh r2, [r7, #22]
801b818: 429a cmp r2, r3
801b81a: d902 bls.n 801b822 <ip_reass_chain_frag_into_datagram_and_validate+0xa6>
/* u16_t overflow, cannot handle this */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801b81c: f04f 33ff mov.w r3, #4294967295
801b820: e106 b.n 801ba30 <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;) {
801b822: 68fb ldr r3, [r7, #12]
801b824: 685b ldr r3, [r3, #4]
801b826: 627b str r3, [r7, #36] ; 0x24
801b828: e068 b.n 801b8fc <ip_reass_chain_frag_into_datagram_and_validate+0x180>
iprh_tmp = (struct ip_reass_helper *)q->payload;
801b82a: 6a7b ldr r3, [r7, #36] ; 0x24
801b82c: 685b ldr r3, [r3, #4]
801b82e: 613b str r3, [r7, #16]
if (iprh->start < iprh_tmp->start) {
801b830: 6afb ldr r3, [r7, #44] ; 0x2c
801b832: 889b ldrh r3, [r3, #4]
801b834: b29a uxth r2, r3
801b836: 693b ldr r3, [r7, #16]
801b838: 889b ldrh r3, [r3, #4]
801b83a: b29b uxth r3, r3
801b83c: 429a cmp r2, r3
801b83e: d235 bcs.n 801b8ac <ip_reass_chain_frag_into_datagram_and_validate+0x130>
/* the new pbuf should be inserted before this */
iprh->next_pbuf = q;
801b840: 6afb ldr r3, [r7, #44] ; 0x2c
801b842: 6a7a ldr r2, [r7, #36] ; 0x24
801b844: 601a str r2, [r3, #0]
if (iprh_prev != NULL) {
801b846: 6abb ldr r3, [r7, #40] ; 0x28
801b848: 2b00 cmp r3, #0
801b84a: d020 beq.n 801b88e <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)) {
801b84c: 6afb ldr r3, [r7, #44] ; 0x2c
801b84e: 889b ldrh r3, [r3, #4]
801b850: b29a uxth r2, r3
801b852: 6abb ldr r3, [r7, #40] ; 0x28
801b854: 88db ldrh r3, [r3, #6]
801b856: b29b uxth r3, r3
801b858: 429a cmp r2, r3
801b85a: d307 bcc.n 801b86c <ip_reass_chain_frag_into_datagram_and_validate+0xf0>
801b85c: 6afb ldr r3, [r7, #44] ; 0x2c
801b85e: 88db ldrh r3, [r3, #6]
801b860: b29a uxth r2, r3
801b862: 693b ldr r3, [r7, #16]
801b864: 889b ldrh r3, [r3, #4]
801b866: b29b uxth r3, r3
801b868: 429a cmp r2, r3
801b86a: d902 bls.n 801b872 <ip_reass_chain_frag_into_datagram_and_validate+0xf6>
/* fragment overlaps with previous or following, throw away */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801b86c: f04f 33ff mov.w r3, #4294967295
801b870: e0de b.n 801ba30 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
}
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
801b872: 6abb ldr r3, [r7, #40] ; 0x28
801b874: 68ba ldr r2, [r7, #8]
801b876: 601a str r2, [r3, #0]
if (iprh_prev->end != iprh->start) {
801b878: 6abb ldr r3, [r7, #40] ; 0x28
801b87a: 88db ldrh r3, [r3, #6]
801b87c: b29a uxth r2, r3
801b87e: 6afb ldr r3, [r7, #44] ; 0x2c
801b880: 889b ldrh r3, [r3, #4]
801b882: b29b uxth r3, r3
801b884: 429a cmp r2, r3
801b886: d03d beq.n 801b904 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
801b888: 2300 movs r3, #0
801b88a: 623b str r3, [r7, #32]
}
#endif /* IP_REASS_CHECK_OVERLAP */
/* fragment with the lowest offset */
ipr->p = new_p;
}
break;
801b88c: e03a b.n 801b904 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
if (iprh->end > iprh_tmp->start) {
801b88e: 6afb ldr r3, [r7, #44] ; 0x2c
801b890: 88db ldrh r3, [r3, #6]
801b892: b29a uxth r2, r3
801b894: 693b ldr r3, [r7, #16]
801b896: 889b ldrh r3, [r3, #4]
801b898: b29b uxth r3, r3
801b89a: 429a cmp r2, r3
801b89c: d902 bls.n 801b8a4 <ip_reass_chain_frag_into_datagram_and_validate+0x128>
return IP_REASS_VALIDATE_PBUF_DROPPED;
801b89e: f04f 33ff mov.w r3, #4294967295
801b8a2: e0c5 b.n 801ba30 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
ipr->p = new_p;
801b8a4: 68fb ldr r3, [r7, #12]
801b8a6: 68ba ldr r2, [r7, #8]
801b8a8: 605a str r2, [r3, #4]
break;
801b8aa: e02b b.n 801b904 <ip_reass_chain_frag_into_datagram_and_validate+0x188>
} else if (iprh->start == iprh_tmp->start) {
801b8ac: 6afb ldr r3, [r7, #44] ; 0x2c
801b8ae: 889b ldrh r3, [r3, #4]
801b8b0: b29a uxth r2, r3
801b8b2: 693b ldr r3, [r7, #16]
801b8b4: 889b ldrh r3, [r3, #4]
801b8b6: b29b uxth r3, r3
801b8b8: 429a cmp r2, r3
801b8ba: d102 bne.n 801b8c2 <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;
801b8bc: f04f 33ff mov.w r3, #4294967295
801b8c0: e0b6 b.n 801ba30 <ip_reass_chain_frag_into_datagram_and_validate+0x2b4>
#if IP_REASS_CHECK_OVERLAP
} else if (iprh->start < iprh_tmp->end) {
801b8c2: 6afb ldr r3, [r7, #44] ; 0x2c
801b8c4: 889b ldrh r3, [r3, #4]
801b8c6: b29a uxth r2, r3
801b8c8: 693b ldr r3, [r7, #16]
801b8ca: 88db ldrh r3, [r3, #6]
801b8cc: b29b uxth r3, r3
801b8ce: 429a cmp r2, r3
801b8d0: d202 bcs.n 801b8d8 <ip_reass_chain_frag_into_datagram_and_validate+0x15c>
/* overlap: no need to keep the new datagram */
return IP_REASS_VALIDATE_PBUF_DROPPED;
801b8d2: f04f 33ff mov.w r3, #4294967295
801b8d6: e0ab b.n 801ba30 <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) {
801b8d8: 6abb ldr r3, [r7, #40] ; 0x28
801b8da: 2b00 cmp r3, #0
801b8dc: d009 beq.n 801b8f2 <ip_reass_chain_frag_into_datagram_and_validate+0x176>
if (iprh_prev->end != iprh_tmp->start) {
801b8de: 6abb ldr r3, [r7, #40] ; 0x28
801b8e0: 88db ldrh r3, [r3, #6]
801b8e2: b29a uxth r2, r3
801b8e4: 693b ldr r3, [r7, #16]
801b8e6: 889b ldrh r3, [r3, #4]
801b8e8: b29b uxth r3, r3
801b8ea: 429a cmp r2, r3
801b8ec: d001 beq.n 801b8f2 <ip_reass_chain_frag_into_datagram_and_validate+0x176>
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
801b8ee: 2300 movs r3, #0
801b8f0: 623b str r3, [r7, #32]
}
}
}
q = iprh_tmp->next_pbuf;
801b8f2: 693b ldr r3, [r7, #16]
801b8f4: 681b ldr r3, [r3, #0]
801b8f6: 627b str r3, [r7, #36] ; 0x24
iprh_prev = iprh_tmp;
801b8f8: 693b ldr r3, [r7, #16]
801b8fa: 62bb str r3, [r7, #40] ; 0x28
for (q = ipr->p; q != NULL;) {
801b8fc: 6a7b ldr r3, [r7, #36] ; 0x24
801b8fe: 2b00 cmp r3, #0
801b900: d193 bne.n 801b82a <ip_reass_chain_frag_into_datagram_and_validate+0xae>
801b902: e000 b.n 801b906 <ip_reass_chain_frag_into_datagram_and_validate+0x18a>
break;
801b904: bf00 nop
}
/* If q is NULL, then we made it to the end of the list. Determine what to do now */
if (q == NULL) {
801b906: 6a7b ldr r3, [r7, #36] ; 0x24
801b908: 2b00 cmp r3, #0
801b90a: d12d bne.n 801b968 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
if (iprh_prev != NULL) {
801b90c: 6abb ldr r3, [r7, #40] ; 0x28
801b90e: 2b00 cmp r3, #0
801b910: d01c beq.n 801b94c <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);
801b912: 6abb ldr r3, [r7, #40] ; 0x28
801b914: 88db ldrh r3, [r3, #6]
801b916: b29a uxth r2, r3
801b918: 6afb ldr r3, [r7, #44] ; 0x2c
801b91a: 889b ldrh r3, [r3, #4]
801b91c: b29b uxth r3, r3
801b91e: 429a cmp r2, r3
801b920: d906 bls.n 801b930 <ip_reass_chain_frag_into_datagram_and_validate+0x1b4>
801b922: 4b45 ldr r3, [pc, #276] ; (801ba38 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801b924: f44f 72db mov.w r2, #438 ; 0x1b6
801b928: 4944 ldr r1, [pc, #272] ; (801ba3c <ip_reass_chain_frag_into_datagram_and_validate+0x2c0>)
801b92a: 4845 ldr r0, [pc, #276] ; (801ba40 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801b92c: f000 fe0c bl 801c548 <iprintf>
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
801b930: 6abb ldr r3, [r7, #40] ; 0x28
801b932: 68ba ldr r2, [r7, #8]
801b934: 601a str r2, [r3, #0]
if (iprh_prev->end != iprh->start) {
801b936: 6abb ldr r3, [r7, #40] ; 0x28
801b938: 88db ldrh r3, [r3, #6]
801b93a: b29a uxth r2, r3
801b93c: 6afb ldr r3, [r7, #44] ; 0x2c
801b93e: 889b ldrh r3, [r3, #4]
801b940: b29b uxth r3, r3
801b942: 429a cmp r2, r3
801b944: d010 beq.n 801b968 <ip_reass_chain_frag_into_datagram_and_validate+0x1ec>
valid = 0;
801b946: 2300 movs r3, #0
801b948: 623b str r3, [r7, #32]
801b94a: e00d b.n 801b968 <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!",
801b94c: 68fb ldr r3, [r7, #12]
801b94e: 685b ldr r3, [r3, #4]
801b950: 2b00 cmp r3, #0
801b952: d006 beq.n 801b962 <ip_reass_chain_frag_into_datagram_and_validate+0x1e6>
801b954: 4b38 ldr r3, [pc, #224] ; (801ba38 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801b956: f240 12bf movw r2, #447 ; 0x1bf
801b95a: 493a ldr r1, [pc, #232] ; (801ba44 <ip_reass_chain_frag_into_datagram_and_validate+0x2c8>)
801b95c: 4838 ldr r0, [pc, #224] ; (801ba40 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801b95e: f000 fdf3 bl 801c548 <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;
801b962: 68fb ldr r3, [r7, #12]
801b964: 68ba ldr r2, [r7, #8]
801b966: 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)) {
801b968: 687b ldr r3, [r7, #4]
801b96a: 2b00 cmp r3, #0
801b96c: d105 bne.n 801b97a <ip_reass_chain_frag_into_datagram_and_validate+0x1fe>
801b96e: 68fb ldr r3, [r7, #12]
801b970: 7f9b ldrb r3, [r3, #30]
801b972: f003 0301 and.w r3, r3, #1
801b976: 2b00 cmp r3, #0
801b978: d059 beq.n 801ba2e <ip_reass_chain_frag_into_datagram_and_validate+0x2b2>
/* and had no holes so far */
if (valid) {
801b97a: 6a3b ldr r3, [r7, #32]
801b97c: 2b00 cmp r3, #0
801b97e: d04f beq.n 801ba20 <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)) {
801b980: 68fb ldr r3, [r7, #12]
801b982: 685b ldr r3, [r3, #4]
801b984: 2b00 cmp r3, #0
801b986: d006 beq.n 801b996 <ip_reass_chain_frag_into_datagram_and_validate+0x21a>
801b988: 68fb ldr r3, [r7, #12]
801b98a: 685b ldr r3, [r3, #4]
801b98c: 685b ldr r3, [r3, #4]
801b98e: 889b ldrh r3, [r3, #4]
801b990: b29b uxth r3, r3
801b992: 2b00 cmp r3, #0
801b994: d002 beq.n 801b99c <ip_reass_chain_frag_into_datagram_and_validate+0x220>
valid = 0;
801b996: 2300 movs r3, #0
801b998: 623b str r3, [r7, #32]
801b99a: e041 b.n 801ba20 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
} else {
/* and check that there are no holes after this datagram */
iprh_prev = iprh;
801b99c: 6afb ldr r3, [r7, #44] ; 0x2c
801b99e: 62bb str r3, [r7, #40] ; 0x28
q = iprh->next_pbuf;
801b9a0: 6afb ldr r3, [r7, #44] ; 0x2c
801b9a2: 681b ldr r3, [r3, #0]
801b9a4: 627b str r3, [r7, #36] ; 0x24
while (q != NULL) {
801b9a6: e012 b.n 801b9ce <ip_reass_chain_frag_into_datagram_and_validate+0x252>
iprh = (struct ip_reass_helper *)q->payload;
801b9a8: 6a7b ldr r3, [r7, #36] ; 0x24
801b9aa: 685b ldr r3, [r3, #4]
801b9ac: 62fb str r3, [r7, #44] ; 0x2c
if (iprh_prev->end != iprh->start) {
801b9ae: 6abb ldr r3, [r7, #40] ; 0x28
801b9b0: 88db ldrh r3, [r3, #6]
801b9b2: b29a uxth r2, r3
801b9b4: 6afb ldr r3, [r7, #44] ; 0x2c
801b9b6: 889b ldrh r3, [r3, #4]
801b9b8: b29b uxth r3, r3
801b9ba: 429a cmp r2, r3
801b9bc: d002 beq.n 801b9c4 <ip_reass_chain_frag_into_datagram_and_validate+0x248>
valid = 0;
801b9be: 2300 movs r3, #0
801b9c0: 623b str r3, [r7, #32]
break;
801b9c2: e007 b.n 801b9d4 <ip_reass_chain_frag_into_datagram_and_validate+0x258>
}
iprh_prev = iprh;
801b9c4: 6afb ldr r3, [r7, #44] ; 0x2c
801b9c6: 62bb str r3, [r7, #40] ; 0x28
q = iprh->next_pbuf;
801b9c8: 6afb ldr r3, [r7, #44] ; 0x2c
801b9ca: 681b ldr r3, [r3, #0]
801b9cc: 627b str r3, [r7, #36] ; 0x24
while (q != NULL) {
801b9ce: 6a7b ldr r3, [r7, #36] ; 0x24
801b9d0: 2b00 cmp r3, #0
801b9d2: d1e9 bne.n 801b9a8 <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) {
801b9d4: 6a3b ldr r3, [r7, #32]
801b9d6: 2b00 cmp r3, #0
801b9d8: d022 beq.n 801ba20 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
LWIP_ASSERT("sanity check", ipr->p != NULL);
801b9da: 68fb ldr r3, [r7, #12]
801b9dc: 685b ldr r3, [r3, #4]
801b9de: 2b00 cmp r3, #0
801b9e0: d106 bne.n 801b9f0 <ip_reass_chain_frag_into_datagram_and_validate+0x274>
801b9e2: 4b15 ldr r3, [pc, #84] ; (801ba38 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801b9e4: f240 12df movw r2, #479 ; 0x1df
801b9e8: 4917 ldr r1, [pc, #92] ; (801ba48 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
801b9ea: 4815 ldr r0, [pc, #84] ; (801ba40 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801b9ec: f000 fdac bl 801c548 <iprintf>
LWIP_ASSERT("sanity check",
801b9f0: 68fb ldr r3, [r7, #12]
801b9f2: 685b ldr r3, [r3, #4]
801b9f4: 685b ldr r3, [r3, #4]
801b9f6: 6afa ldr r2, [r7, #44] ; 0x2c
801b9f8: 429a cmp r2, r3
801b9fa: d106 bne.n 801ba0a <ip_reass_chain_frag_into_datagram_and_validate+0x28e>
801b9fc: 4b0e ldr r3, [pc, #56] ; (801ba38 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801b9fe: f240 12e1 movw r2, #481 ; 0x1e1
801ba02: 4911 ldr r1, [pc, #68] ; (801ba48 <ip_reass_chain_frag_into_datagram_and_validate+0x2cc>)
801ba04: 480e ldr r0, [pc, #56] ; (801ba40 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801ba06: f000 fd9f bl 801c548 <iprintf>
((struct ip_reass_helper *)ipr->p->payload) != iprh);
LWIP_ASSERT("validate_datagram:next_pbuf!=NULL",
801ba0a: 6afb ldr r3, [r7, #44] ; 0x2c
801ba0c: 681b ldr r3, [r3, #0]
801ba0e: 2b00 cmp r3, #0
801ba10: d006 beq.n 801ba20 <ip_reass_chain_frag_into_datagram_and_validate+0x2a4>
801ba12: 4b09 ldr r3, [pc, #36] ; (801ba38 <ip_reass_chain_frag_into_datagram_and_validate+0x2bc>)
801ba14: f240 12e3 movw r2, #483 ; 0x1e3
801ba18: 490c ldr r1, [pc, #48] ; (801ba4c <ip_reass_chain_frag_into_datagram_and_validate+0x2d0>)
801ba1a: 4809 ldr r0, [pc, #36] ; (801ba40 <ip_reass_chain_frag_into_datagram_and_validate+0x2c4>)
801ba1c: f000 fd94 bl 801c548 <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;
801ba20: 6a3b ldr r3, [r7, #32]
801ba22: 2b00 cmp r3, #0
801ba24: bf14 ite ne
801ba26: 2301 movne r3, #1
801ba28: 2300 moveq r3, #0
801ba2a: b2db uxtb r3, r3
801ba2c: e000 b.n 801ba30 <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! */
801ba2e: 2300 movs r3, #0
}
801ba30: 4618 mov r0, r3
801ba32: 3730 adds r7, #48 ; 0x30
801ba34: 46bd mov sp, r7
801ba36: bd80 pop {r7, pc}
801ba38: 080203c0 .word 0x080203c0
801ba3c: 080204a4 .word 0x080204a4
801ba40: 08020408 .word 0x08020408
801ba44: 080204c4 .word 0x080204c4
801ba48: 080204fc .word 0x080204fc
801ba4c: 0802050c .word 0x0802050c
0801ba50 <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)
{
801ba50: b580 push {r7, lr}
801ba52: b08e sub sp, #56 ; 0x38
801ba54: af00 add r7, sp, #0
801ba56: 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;
801ba58: 687b ldr r3, [r7, #4]
801ba5a: 685b ldr r3, [r3, #4]
801ba5c: 62bb str r3, [r7, #40] ; 0x28
if (IPH_HL_BYTES(fraghdr) != IP_HLEN) {
801ba5e: 6abb ldr r3, [r7, #40] ; 0x28
801ba60: 781b ldrb r3, [r3, #0]
801ba62: f003 030f and.w r3, r3, #15
801ba66: b2db uxtb r3, r3
801ba68: 009b lsls r3, r3, #2
801ba6a: b2db uxtb r3, r3
801ba6c: 2b14 cmp r3, #20
801ba6e: f040 8167 bne.w 801bd40 <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);
801ba72: 6abb ldr r3, [r7, #40] ; 0x28
801ba74: 88db ldrh r3, [r3, #6]
801ba76: b29b uxth r3, r3
801ba78: 4618 mov r0, r3
801ba7a: f7f4 fc81 bl 8010380 <lwip_htons>
801ba7e: 4603 mov r3, r0
801ba80: f3c3 030c ubfx r3, r3, #0, #13
801ba84: b29b uxth r3, r3
801ba86: 00db lsls r3, r3, #3
801ba88: 84fb strh r3, [r7, #38] ; 0x26
len = lwip_ntohs(IPH_LEN(fraghdr));
801ba8a: 6abb ldr r3, [r7, #40] ; 0x28
801ba8c: 885b ldrh r3, [r3, #2]
801ba8e: b29b uxth r3, r3
801ba90: 4618 mov r0, r3
801ba92: f7f4 fc75 bl 8010380 <lwip_htons>
801ba96: 4603 mov r3, r0
801ba98: 84bb strh r3, [r7, #36] ; 0x24
hlen = IPH_HL_BYTES(fraghdr);
801ba9a: 6abb ldr r3, [r7, #40] ; 0x28
801ba9c: 781b ldrb r3, [r3, #0]
801ba9e: f003 030f and.w r3, r3, #15
801baa2: b2db uxtb r3, r3
801baa4: 009b lsls r3, r3, #2
801baa6: f887 3023 strb.w r3, [r7, #35] ; 0x23
if (hlen > len) {
801baaa: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
801baae: b29b uxth r3, r3
801bab0: 8cba ldrh r2, [r7, #36] ; 0x24
801bab2: 429a cmp r2, r3
801bab4: f0c0 8146 bcc.w 801bd44 <ip4_reass+0x2f4>
/* invalid datagram */
goto nullreturn;
}
len = (u16_t)(len - hlen);
801bab8: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
801babc: b29b uxth r3, r3
801babe: 8cba ldrh r2, [r7, #36] ; 0x24
801bac0: 1ad3 subs r3, r2, r3
801bac2: 84bb strh r3, [r7, #36] ; 0x24
/* Check if we are allowed to enqueue more datagrams. */
clen = pbuf_clen(p);
801bac4: 6878 ldr r0, [r7, #4]
801bac6: f7f6 f89d bl 8011c04 <pbuf_clen>
801baca: 4603 mov r3, r0
801bacc: 843b strh r3, [r7, #32]
if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) {
801bace: 4ba3 ldr r3, [pc, #652] ; (801bd5c <ip4_reass+0x30c>)
801bad0: 881b ldrh r3, [r3, #0]
801bad2: 461a mov r2, r3
801bad4: 8c3b ldrh r3, [r7, #32]
801bad6: 4413 add r3, r2
801bad8: 2b0a cmp r3, #10
801bada: dd10 ble.n 801bafe <ip4_reass+0xae>
#if IP_REASS_FREE_OLDEST
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
801badc: 8c3b ldrh r3, [r7, #32]
801bade: 4619 mov r1, r3
801bae0: 6ab8 ldr r0, [r7, #40] ; 0x28
801bae2: f7ff fd81 bl 801b5e8 <ip_reass_remove_oldest_datagram>
801bae6: 4603 mov r3, r0
801bae8: 2b00 cmp r3, #0
801baea: f000 812d beq.w 801bd48 <ip4_reass+0x2f8>
((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS))
801baee: 4b9b ldr r3, [pc, #620] ; (801bd5c <ip4_reass+0x30c>)
801baf0: 881b ldrh r3, [r3, #0]
801baf2: 461a mov r2, r3
801baf4: 8c3b ldrh r3, [r7, #32]
801baf6: 4413 add r3, r2
if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
801baf8: 2b0a cmp r3, #10
801bafa: f300 8125 bgt.w 801bd48 <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) {
801bafe: 4b98 ldr r3, [pc, #608] ; (801bd60 <ip4_reass+0x310>)
801bb00: 681b ldr r3, [r3, #0]
801bb02: 633b str r3, [r7, #48] ; 0x30
801bb04: e015 b.n 801bb32 <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)) {
801bb06: 6b3b ldr r3, [r7, #48] ; 0x30
801bb08: 695a ldr r2, [r3, #20]
801bb0a: 6abb ldr r3, [r7, #40] ; 0x28
801bb0c: 68db ldr r3, [r3, #12]
801bb0e: 429a cmp r2, r3
801bb10: d10c bne.n 801bb2c <ip4_reass+0xdc>
801bb12: 6b3b ldr r3, [r7, #48] ; 0x30
801bb14: 699a ldr r2, [r3, #24]
801bb16: 6abb ldr r3, [r7, #40] ; 0x28
801bb18: 691b ldr r3, [r3, #16]
801bb1a: 429a cmp r2, r3
801bb1c: d106 bne.n 801bb2c <ip4_reass+0xdc>
801bb1e: 6b3b ldr r3, [r7, #48] ; 0x30
801bb20: 899a ldrh r2, [r3, #12]
801bb22: 6abb ldr r3, [r7, #40] ; 0x28
801bb24: 889b ldrh r3, [r3, #4]
801bb26: b29b uxth r3, r3
801bb28: 429a cmp r2, r3
801bb2a: d006 beq.n 801bb3a <ip4_reass+0xea>
for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
801bb2c: 6b3b ldr r3, [r7, #48] ; 0x30
801bb2e: 681b ldr r3, [r3, #0]
801bb30: 633b str r3, [r7, #48] ; 0x30
801bb32: 6b3b ldr r3, [r7, #48] ; 0x30
801bb34: 2b00 cmp r3, #0
801bb36: d1e6 bne.n 801bb06 <ip4_reass+0xb6>
801bb38: e000 b.n 801bb3c <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;
801bb3a: bf00 nop
}
}
if (ipr == NULL) {
801bb3c: 6b3b ldr r3, [r7, #48] ; 0x30
801bb3e: 2b00 cmp r3, #0
801bb40: d109 bne.n 801bb56 <ip4_reass+0x106>
/* Enqueue a new datagram into the datagram queue */
ipr = ip_reass_enqueue_new_datagram(fraghdr, clen);
801bb42: 8c3b ldrh r3, [r7, #32]
801bb44: 4619 mov r1, r3
801bb46: 6ab8 ldr r0, [r7, #40] ; 0x28
801bb48: f7ff fdb0 bl 801b6ac <ip_reass_enqueue_new_datagram>
801bb4c: 6338 str r0, [r7, #48] ; 0x30
/* Bail if unable to enqueue */
if (ipr == NULL) {
801bb4e: 6b3b ldr r3, [r7, #48] ; 0x30
801bb50: 2b00 cmp r3, #0
801bb52: d11c bne.n 801bb8e <ip4_reass+0x13e>
goto nullreturn;
801bb54: e0f9 b.n 801bd4a <ip4_reass+0x2fa>
}
} else {
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
801bb56: 6abb ldr r3, [r7, #40] ; 0x28
801bb58: 88db ldrh r3, [r3, #6]
801bb5a: b29b uxth r3, r3
801bb5c: 4618 mov r0, r3
801bb5e: f7f4 fc0f bl 8010380 <lwip_htons>
801bb62: 4603 mov r3, r0
801bb64: f3c3 030c ubfx r3, r3, #0, #13
801bb68: 2b00 cmp r3, #0
801bb6a: d110 bne.n 801bb8e <ip4_reass+0x13e>
((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) {
801bb6c: 6b3b ldr r3, [r7, #48] ; 0x30
801bb6e: 89db ldrh r3, [r3, #14]
801bb70: 4618 mov r0, r3
801bb72: f7f4 fc05 bl 8010380 <lwip_htons>
801bb76: 4603 mov r3, r0
801bb78: f3c3 030c ubfx r3, r3, #0, #13
if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
801bb7c: 2b00 cmp r3, #0
801bb7e: d006 beq.n 801bb8e <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);
801bb80: 6b3b ldr r3, [r7, #48] ; 0x30
801bb82: 3308 adds r3, #8
801bb84: 2214 movs r2, #20
801bb86: 6ab9 ldr r1, [r7, #40] ; 0x28
801bb88: 4618 mov r0, r3
801bb8a: f000 fcb0 bl 801c4ee <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;
801bb8e: 6abb ldr r3, [r7, #40] ; 0x28
801bb90: 88db ldrh r3, [r3, #6]
801bb92: b29b uxth r3, r3
801bb94: f003 0320 and.w r3, r3, #32
801bb98: 2b00 cmp r3, #0
801bb9a: bf0c ite eq
801bb9c: 2301 moveq r3, #1
801bb9e: 2300 movne r3, #0
801bba0: b2db uxtb r3, r3
801bba2: 61fb str r3, [r7, #28]
if (is_last) {
801bba4: 69fb ldr r3, [r7, #28]
801bba6: 2b00 cmp r3, #0
801bba8: d00e beq.n 801bbc8 <ip4_reass+0x178>
u16_t datagram_len = (u16_t)(offset + len);
801bbaa: 8cfa ldrh r2, [r7, #38] ; 0x26
801bbac: 8cbb ldrh r3, [r7, #36] ; 0x24
801bbae: 4413 add r3, r2
801bbb0: 837b strh r3, [r7, #26]
if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) {
801bbb2: 8b7a ldrh r2, [r7, #26]
801bbb4: 8cfb ldrh r3, [r7, #38] ; 0x26
801bbb6: 429a cmp r2, r3
801bbb8: f0c0 80a0 bcc.w 801bcfc <ip4_reass+0x2ac>
801bbbc: 8b7b ldrh r3, [r7, #26]
801bbbe: f64f 72eb movw r2, #65515 ; 0xffeb
801bbc2: 4293 cmp r3, r2
801bbc4: f200 809a bhi.w 801bcfc <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);
801bbc8: 69fa ldr r2, [r7, #28]
801bbca: 6879 ldr r1, [r7, #4]
801bbcc: 6b38 ldr r0, [r7, #48] ; 0x30
801bbce: f7ff fdd5 bl 801b77c <ip_reass_chain_frag_into_datagram_and_validate>
801bbd2: 6178 str r0, [r7, #20]
if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) {
801bbd4: 697b ldr r3, [r7, #20]
801bbd6: f1b3 3fff cmp.w r3, #4294967295
801bbda: f000 8091 beq.w 801bd00 <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);
801bbde: 4b5f ldr r3, [pc, #380] ; (801bd5c <ip4_reass+0x30c>)
801bbe0: 881a ldrh r2, [r3, #0]
801bbe2: 8c3b ldrh r3, [r7, #32]
801bbe4: 4413 add r3, r2
801bbe6: b29a uxth r2, r3
801bbe8: 4b5c ldr r3, [pc, #368] ; (801bd5c <ip4_reass+0x30c>)
801bbea: 801a strh r2, [r3, #0]
if (is_last) {
801bbec: 69fb ldr r3, [r7, #28]
801bbee: 2b00 cmp r3, #0
801bbf0: d00d beq.n 801bc0e <ip4_reass+0x1be>
u16_t datagram_len = (u16_t)(offset + len);
801bbf2: 8cfa ldrh r2, [r7, #38] ; 0x26
801bbf4: 8cbb ldrh r3, [r7, #36] ; 0x24
801bbf6: 4413 add r3, r2
801bbf8: 827b strh r3, [r7, #18]
ipr->datagram_len = datagram_len;
801bbfa: 6b3b ldr r3, [r7, #48] ; 0x30
801bbfc: 8a7a ldrh r2, [r7, #18]
801bbfe: 839a strh r2, [r3, #28]
ipr->flags |= IP_REASS_FLAG_LASTFRAG;
801bc00: 6b3b ldr r3, [r7, #48] ; 0x30
801bc02: 7f9b ldrb r3, [r3, #30]
801bc04: f043 0301 orr.w r3, r3, #1
801bc08: b2da uxtb r2, r3
801bc0a: 6b3b ldr r3, [r7, #48] ; 0x30
801bc0c: 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) {
801bc0e: 697b ldr r3, [r7, #20]
801bc10: 2b01 cmp r3, #1
801bc12: d171 bne.n 801bcf8 <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);
801bc14: 6b3b ldr r3, [r7, #48] ; 0x30
801bc16: 8b9b ldrh r3, [r3, #28]
801bc18: 3314 adds r3, #20
801bc1a: 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;
801bc1c: 6b3b ldr r3, [r7, #48] ; 0x30
801bc1e: 685b ldr r3, [r3, #4]
801bc20: 685b ldr r3, [r3, #4]
801bc22: 681b ldr r3, [r3, #0]
801bc24: 637b str r3, [r7, #52] ; 0x34
/* copy the original ip header back to the first pbuf */
fraghdr = (struct ip_hdr *)(ipr->p->payload);
801bc26: 6b3b ldr r3, [r7, #48] ; 0x30
801bc28: 685b ldr r3, [r3, #4]
801bc2a: 685b ldr r3, [r3, #4]
801bc2c: 62bb str r3, [r7, #40] ; 0x28
SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN);
801bc2e: 6b3b ldr r3, [r7, #48] ; 0x30
801bc30: 3308 adds r3, #8
801bc32: 2214 movs r2, #20
801bc34: 4619 mov r1, r3
801bc36: 6ab8 ldr r0, [r7, #40] ; 0x28
801bc38: f000 fc59 bl 801c4ee <memcpy>
IPH_LEN_SET(fraghdr, lwip_htons(datagram_len));
801bc3c: 8a3b ldrh r3, [r7, #16]
801bc3e: 4618 mov r0, r3
801bc40: f7f4 fb9e bl 8010380 <lwip_htons>
801bc44: 4603 mov r3, r0
801bc46: 461a mov r2, r3
801bc48: 6abb ldr r3, [r7, #40] ; 0x28
801bc4a: 805a strh r2, [r3, #2]
IPH_OFFSET_SET(fraghdr, 0);
801bc4c: 6abb ldr r3, [r7, #40] ; 0x28
801bc4e: 2200 movs r2, #0
801bc50: 719a strb r2, [r3, #6]
801bc52: 2200 movs r2, #0
801bc54: 71da strb r2, [r3, #7]
IPH_CHKSUM_SET(fraghdr, 0);
801bc56: 6abb ldr r3, [r7, #40] ; 0x28
801bc58: 2200 movs r2, #0
801bc5a: 729a strb r2, [r3, #10]
801bc5c: 2200 movs r2, #0
801bc5e: 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;
801bc60: 6b3b ldr r3, [r7, #48] ; 0x30
801bc62: 685b ldr r3, [r3, #4]
801bc64: 607b str r3, [r7, #4]
/* chain together the pbufs contained within the reass_data list. */
while (r != NULL) {
801bc66: e00d b.n 801bc84 <ip4_reass+0x234>
iprh = (struct ip_reass_helper *)r->payload;
801bc68: 6b7b ldr r3, [r7, #52] ; 0x34
801bc6a: 685b ldr r3, [r3, #4]
801bc6c: 60fb str r3, [r7, #12]
/* hide the ip header for every succeeding fragment */
pbuf_remove_header(r, IP_HLEN);
801bc6e: 2114 movs r1, #20
801bc70: 6b78 ldr r0, [r7, #52] ; 0x34
801bc72: f7f5 feb3 bl 80119dc <pbuf_remove_header>
pbuf_cat(p, r);
801bc76: 6b79 ldr r1, [r7, #52] ; 0x34
801bc78: 6878 ldr r0, [r7, #4]
801bc7a: f7f6 f803 bl 8011c84 <pbuf_cat>
r = iprh->next_pbuf;
801bc7e: 68fb ldr r3, [r7, #12]
801bc80: 681b ldr r3, [r3, #0]
801bc82: 637b str r3, [r7, #52] ; 0x34
while (r != NULL) {
801bc84: 6b7b ldr r3, [r7, #52] ; 0x34
801bc86: 2b00 cmp r3, #0
801bc88: d1ee bne.n 801bc68 <ip4_reass+0x218>
}
/* find the previous entry in the linked list */
if (ipr == reassdatagrams) {
801bc8a: 4b35 ldr r3, [pc, #212] ; (801bd60 <ip4_reass+0x310>)
801bc8c: 681b ldr r3, [r3, #0]
801bc8e: 6b3a ldr r2, [r7, #48] ; 0x30
801bc90: 429a cmp r2, r3
801bc92: d102 bne.n 801bc9a <ip4_reass+0x24a>
ipr_prev = NULL;
801bc94: 2300 movs r3, #0
801bc96: 62fb str r3, [r7, #44] ; 0x2c
801bc98: e010 b.n 801bcbc <ip4_reass+0x26c>
} else {
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
801bc9a: 4b31 ldr r3, [pc, #196] ; (801bd60 <ip4_reass+0x310>)
801bc9c: 681b ldr r3, [r3, #0]
801bc9e: 62fb str r3, [r7, #44] ; 0x2c
801bca0: e007 b.n 801bcb2 <ip4_reass+0x262>
if (ipr_prev->next == ipr) {
801bca2: 6afb ldr r3, [r7, #44] ; 0x2c
801bca4: 681b ldr r3, [r3, #0]
801bca6: 6b3a ldr r2, [r7, #48] ; 0x30
801bca8: 429a cmp r2, r3
801bcaa: d006 beq.n 801bcba <ip4_reass+0x26a>
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
801bcac: 6afb ldr r3, [r7, #44] ; 0x2c
801bcae: 681b ldr r3, [r3, #0]
801bcb0: 62fb str r3, [r7, #44] ; 0x2c
801bcb2: 6afb ldr r3, [r7, #44] ; 0x2c
801bcb4: 2b00 cmp r3, #0
801bcb6: d1f4 bne.n 801bca2 <ip4_reass+0x252>
801bcb8: e000 b.n 801bcbc <ip4_reass+0x26c>
break;
801bcba: bf00 nop
}
}
}
/* release the sources allocate for the fragment queue entry */
ip_reass_dequeue_datagram(ipr, ipr_prev);
801bcbc: 6af9 ldr r1, [r7, #44] ; 0x2c
801bcbe: 6b38 ldr r0, [r7, #48] ; 0x30
801bcc0: f7ff fd2e bl 801b720 <ip_reass_dequeue_datagram>
/* and adjust the number of pbufs currently queued for reassembly. */
clen = pbuf_clen(p);
801bcc4: 6878 ldr r0, [r7, #4]
801bcc6: f7f5 ff9d bl 8011c04 <pbuf_clen>
801bcca: 4603 mov r3, r0
801bccc: 843b strh r3, [r7, #32]
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
801bcce: 4b23 ldr r3, [pc, #140] ; (801bd5c <ip4_reass+0x30c>)
801bcd0: 881b ldrh r3, [r3, #0]
801bcd2: 8c3a ldrh r2, [r7, #32]
801bcd4: 429a cmp r2, r3
801bcd6: d906 bls.n 801bce6 <ip4_reass+0x296>
801bcd8: 4b22 ldr r3, [pc, #136] ; (801bd64 <ip4_reass+0x314>)
801bcda: f240 229b movw r2, #667 ; 0x29b
801bcde: 4922 ldr r1, [pc, #136] ; (801bd68 <ip4_reass+0x318>)
801bce0: 4822 ldr r0, [pc, #136] ; (801bd6c <ip4_reass+0x31c>)
801bce2: f000 fc31 bl 801c548 <iprintf>
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen);
801bce6: 4b1d ldr r3, [pc, #116] ; (801bd5c <ip4_reass+0x30c>)
801bce8: 881a ldrh r2, [r3, #0]
801bcea: 8c3b ldrh r3, [r7, #32]
801bcec: 1ad3 subs r3, r2, r3
801bcee: b29a uxth r2, r3
801bcf0: 4b1a ldr r3, [pc, #104] ; (801bd5c <ip4_reass+0x30c>)
801bcf2: 801a strh r2, [r3, #0]
MIB2_STATS_INC(mib2.ipreasmoks);
/* Return the pbuf chain */
return p;
801bcf4: 687b ldr r3, [r7, #4]
801bcf6: e02c b.n 801bd52 <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;
801bcf8: 2300 movs r3, #0
801bcfa: e02a b.n 801bd52 <ip4_reass+0x302>
nullreturn_ipr:
801bcfc: bf00 nop
801bcfe: e000 b.n 801bd02 <ip4_reass+0x2b2>
goto nullreturn_ipr;
801bd00: bf00 nop
LWIP_ASSERT("ipr != NULL", ipr != NULL);
801bd02: 6b3b ldr r3, [r7, #48] ; 0x30
801bd04: 2b00 cmp r3, #0
801bd06: d106 bne.n 801bd16 <ip4_reass+0x2c6>
801bd08: 4b16 ldr r3, [pc, #88] ; (801bd64 <ip4_reass+0x314>)
801bd0a: f44f 722a mov.w r2, #680 ; 0x2a8
801bd0e: 4918 ldr r1, [pc, #96] ; (801bd70 <ip4_reass+0x320>)
801bd10: 4816 ldr r0, [pc, #88] ; (801bd6c <ip4_reass+0x31c>)
801bd12: f000 fc19 bl 801c548 <iprintf>
if (ipr->p == NULL) {
801bd16: 6b3b ldr r3, [r7, #48] ; 0x30
801bd18: 685b ldr r3, [r3, #4]
801bd1a: 2b00 cmp r3, #0
801bd1c: d114 bne.n 801bd48 <ip4_reass+0x2f8>
/* dropped pbuf after creating a new datagram entry: remove the entry, too */
LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams);
801bd1e: 4b10 ldr r3, [pc, #64] ; (801bd60 <ip4_reass+0x310>)
801bd20: 681b ldr r3, [r3, #0]
801bd22: 6b3a ldr r2, [r7, #48] ; 0x30
801bd24: 429a cmp r2, r3
801bd26: d006 beq.n 801bd36 <ip4_reass+0x2e6>
801bd28: 4b0e ldr r3, [pc, #56] ; (801bd64 <ip4_reass+0x314>)
801bd2a: f240 22ab movw r2, #683 ; 0x2ab
801bd2e: 4911 ldr r1, [pc, #68] ; (801bd74 <ip4_reass+0x324>)
801bd30: 480e ldr r0, [pc, #56] ; (801bd6c <ip4_reass+0x31c>)
801bd32: f000 fc09 bl 801c548 <iprintf>
ip_reass_dequeue_datagram(ipr, NULL);
801bd36: 2100 movs r1, #0
801bd38: 6b38 ldr r0, [r7, #48] ; 0x30
801bd3a: f7ff fcf1 bl 801b720 <ip_reass_dequeue_datagram>
801bd3e: e004 b.n 801bd4a <ip4_reass+0x2fa>
goto nullreturn;
801bd40: bf00 nop
801bd42: e002 b.n 801bd4a <ip4_reass+0x2fa>
goto nullreturn;
801bd44: bf00 nop
801bd46: e000 b.n 801bd4a <ip4_reass+0x2fa>
}
nullreturn:
801bd48: bf00 nop
LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n"));
IPFRAG_STATS_INC(ip_frag.drop);
pbuf_free(p);
801bd4a: 6878 ldr r0, [r7, #4]
801bd4c: f7f5 fecc bl 8011ae8 <pbuf_free>
return NULL;
801bd50: 2300 movs r3, #0
}
801bd52: 4618 mov r0, r3
801bd54: 3738 adds r7, #56 ; 0x38
801bd56: 46bd mov sp, r7
801bd58: bd80 pop {r7, pc}
801bd5a: bf00 nop
801bd5c: 2000885c .word 0x2000885c
801bd60: 20008858 .word 0x20008858
801bd64: 080203c0 .word 0x080203c0
801bd68: 08020530 .word 0x08020530
801bd6c: 08020408 .word 0x08020408
801bd70: 0802054c .word 0x0802054c
801bd74: 08020558 .word 0x08020558
0801bd78 <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)
{
801bd78: b580 push {r7, lr}
801bd7a: af00 add r7, sp, #0
return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF);
801bd7c: 2005 movs r0, #5
801bd7e: f7f4 ffb5 bl 8010cec <memp_malloc>
801bd82: 4603 mov r3, r0
}
801bd84: 4618 mov r0, r3
801bd86: bd80 pop {r7, pc}
0801bd88 <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)
{
801bd88: b580 push {r7, lr}
801bd8a: b082 sub sp, #8
801bd8c: af00 add r7, sp, #0
801bd8e: 6078 str r0, [r7, #4]
LWIP_ASSERT("p != NULL", p != NULL);
801bd90: 687b ldr r3, [r7, #4]
801bd92: 2b00 cmp r3, #0
801bd94: d106 bne.n 801bda4 <ip_frag_free_pbuf_custom_ref+0x1c>
801bd96: 4b07 ldr r3, [pc, #28] ; (801bdb4 <ip_frag_free_pbuf_custom_ref+0x2c>)
801bd98: f44f 7231 mov.w r2, #708 ; 0x2c4
801bd9c: 4906 ldr r1, [pc, #24] ; (801bdb8 <ip_frag_free_pbuf_custom_ref+0x30>)
801bd9e: 4807 ldr r0, [pc, #28] ; (801bdbc <ip_frag_free_pbuf_custom_ref+0x34>)
801bda0: f000 fbd2 bl 801c548 <iprintf>
memp_free(MEMP_FRAG_PBUF, p);
801bda4: 6879 ldr r1, [r7, #4]
801bda6: 2005 movs r0, #5
801bda8: f7f4 fff2 bl 8010d90 <memp_free>
}
801bdac: bf00 nop
801bdae: 3708 adds r7, #8
801bdb0: 46bd mov sp, r7
801bdb2: bd80 pop {r7, pc}
801bdb4: 080203c0 .word 0x080203c0
801bdb8: 08020578 .word 0x08020578
801bdbc: 08020408 .word 0x08020408
0801bdc0 <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)
{
801bdc0: b580 push {r7, lr}
801bdc2: b084 sub sp, #16
801bdc4: af00 add r7, sp, #0
801bdc6: 6078 str r0, [r7, #4]
struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p;
801bdc8: 687b ldr r3, [r7, #4]
801bdca: 60fb str r3, [r7, #12]
LWIP_ASSERT("pcr != NULL", pcr != NULL);
801bdcc: 68fb ldr r3, [r7, #12]
801bdce: 2b00 cmp r3, #0
801bdd0: d106 bne.n 801bde0 <ipfrag_free_pbuf_custom+0x20>
801bdd2: 4b11 ldr r3, [pc, #68] ; (801be18 <ipfrag_free_pbuf_custom+0x58>)
801bdd4: f240 22ce movw r2, #718 ; 0x2ce
801bdd8: 4910 ldr r1, [pc, #64] ; (801be1c <ipfrag_free_pbuf_custom+0x5c>)
801bdda: 4811 ldr r0, [pc, #68] ; (801be20 <ipfrag_free_pbuf_custom+0x60>)
801bddc: f000 fbb4 bl 801c548 <iprintf>
LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p);
801bde0: 68fa ldr r2, [r7, #12]
801bde2: 687b ldr r3, [r7, #4]
801bde4: 429a cmp r2, r3
801bde6: d006 beq.n 801bdf6 <ipfrag_free_pbuf_custom+0x36>
801bde8: 4b0b ldr r3, [pc, #44] ; (801be18 <ipfrag_free_pbuf_custom+0x58>)
801bdea: f240 22cf movw r2, #719 ; 0x2cf
801bdee: 490d ldr r1, [pc, #52] ; (801be24 <ipfrag_free_pbuf_custom+0x64>)
801bdf0: 480b ldr r0, [pc, #44] ; (801be20 <ipfrag_free_pbuf_custom+0x60>)
801bdf2: f000 fba9 bl 801c548 <iprintf>
if (pcr->original != NULL) {
801bdf6: 68fb ldr r3, [r7, #12]
801bdf8: 695b ldr r3, [r3, #20]
801bdfa: 2b00 cmp r3, #0
801bdfc: d004 beq.n 801be08 <ipfrag_free_pbuf_custom+0x48>
pbuf_free(pcr->original);
801bdfe: 68fb ldr r3, [r7, #12]
801be00: 695b ldr r3, [r3, #20]
801be02: 4618 mov r0, r3
801be04: f7f5 fe70 bl 8011ae8 <pbuf_free>
}
ip_frag_free_pbuf_custom_ref(pcr);
801be08: 68f8 ldr r0, [r7, #12]
801be0a: f7ff ffbd bl 801bd88 <ip_frag_free_pbuf_custom_ref>
}
801be0e: bf00 nop
801be10: 3710 adds r7, #16
801be12: 46bd mov sp, r7
801be14: bd80 pop {r7, pc}
801be16: bf00 nop
801be18: 080203c0 .word 0x080203c0
801be1c: 08020584 .word 0x08020584
801be20: 08020408 .word 0x08020408
801be24: 08020590 .word 0x08020590
0801be28 <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)
{
801be28: b580 push {r7, lr}
801be2a: b094 sub sp, #80 ; 0x50
801be2c: af02 add r7, sp, #8
801be2e: 60f8 str r0, [r7, #12]
801be30: 60b9 str r1, [r7, #8]
801be32: 607a str r2, [r7, #4]
struct pbuf *rambuf;
#if !LWIP_NETIF_TX_SINGLE_PBUF
struct pbuf *newpbuf;
u16_t newpbuflen = 0;
801be34: 2300 movs r3, #0
801be36: 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);
801be3a: 68bb ldr r3, [r7, #8]
801be3c: 8d1b ldrh r3, [r3, #40] ; 0x28
801be3e: 3b14 subs r3, #20
801be40: 2b00 cmp r3, #0
801be42: da00 bge.n 801be46 <ip4_frag+0x1e>
801be44: 3307 adds r3, #7
801be46: 10db asrs r3, r3, #3
801be48: 877b strh r3, [r7, #58] ; 0x3a
u16_t left, fragsize;
u16_t ofo;
int last;
u16_t poff = IP_HLEN;
801be4a: 2314 movs r3, #20
801be4c: 87fb strh r3, [r7, #62] ; 0x3e
u16_t tmp;
int mf_set;
original_iphdr = (struct ip_hdr *)p->payload;
801be4e: 68fb ldr r3, [r7, #12]
801be50: 685b ldr r3, [r3, #4]
801be52: 637b str r3, [r7, #52] ; 0x34
iphdr = original_iphdr;
801be54: 6b7b ldr r3, [r7, #52] ; 0x34
801be56: 633b str r3, [r7, #48] ; 0x30
if (IPH_HL_BYTES(iphdr) != IP_HLEN) {
801be58: 6b3b ldr r3, [r7, #48] ; 0x30
801be5a: 781b ldrb r3, [r3, #0]
801be5c: f003 030f and.w r3, r3, #15
801be60: b2db uxtb r3, r3
801be62: 009b lsls r3, r3, #2
801be64: b2db uxtb r3, r3
801be66: 2b14 cmp r3, #20
801be68: d002 beq.n 801be70 <ip4_frag+0x48>
/* ip4_frag() does not support IP options */
return ERR_VAL;
801be6a: f06f 0305 mvn.w r3, #5
801be6e: e10f b.n 801c090 <ip4_frag+0x268>
}
LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
801be70: 68fb ldr r3, [r7, #12]
801be72: 895b ldrh r3, [r3, #10]
801be74: 2b13 cmp r3, #19
801be76: d809 bhi.n 801be8c <ip4_frag+0x64>
801be78: 4b87 ldr r3, [pc, #540] ; (801c098 <ip4_frag+0x270>)
801be7a: f44f 723f mov.w r2, #764 ; 0x2fc
801be7e: 4987 ldr r1, [pc, #540] ; (801c09c <ip4_frag+0x274>)
801be80: 4887 ldr r0, [pc, #540] ; (801c0a0 <ip4_frag+0x278>)
801be82: f000 fb61 bl 801c548 <iprintf>
801be86: f06f 0305 mvn.w r3, #5
801be8a: e101 b.n 801c090 <ip4_frag+0x268>
/* Save original offset */
tmp = lwip_ntohs(IPH_OFFSET(iphdr));
801be8c: 6b3b ldr r3, [r7, #48] ; 0x30
801be8e: 88db ldrh r3, [r3, #6]
801be90: b29b uxth r3, r3
801be92: 4618 mov r0, r3
801be94: f7f4 fa74 bl 8010380 <lwip_htons>
801be98: 4603 mov r3, r0
801be9a: 87bb strh r3, [r7, #60] ; 0x3c
ofo = tmp & IP_OFFMASK;
801be9c: 8fbb ldrh r3, [r7, #60] ; 0x3c
801be9e: f3c3 030c ubfx r3, r3, #0, #13
801bea2: 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;
801bea6: 8fbb ldrh r3, [r7, #60] ; 0x3c
801bea8: f403 5300 and.w r3, r3, #8192 ; 0x2000
801beac: 62fb str r3, [r7, #44] ; 0x2c
left = (u16_t)(p->tot_len - IP_HLEN);
801beae: 68fb ldr r3, [r7, #12]
801beb0: 891b ldrh r3, [r3, #8]
801beb2: 3b14 subs r3, #20
801beb4: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
while (left) {
801beb8: e0e0 b.n 801c07c <ip4_frag+0x254>
/* Fill this fragment */
fragsize = LWIP_MIN(left, (u16_t)(nfb * 8));
801beba: 8f7b ldrh r3, [r7, #58] ; 0x3a
801bebc: 00db lsls r3, r3, #3
801bebe: b29b uxth r3, r3
801bec0: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
801bec4: 4293 cmp r3, r2
801bec6: bf28 it cs
801bec8: 4613 movcs r3, r2
801beca: 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);
801becc: f44f 7220 mov.w r2, #640 ; 0x280
801bed0: 2114 movs r1, #20
801bed2: 200e movs r0, #14
801bed4: f7f5 fb28 bl 8011528 <pbuf_alloc>
801bed8: 6278 str r0, [r7, #36] ; 0x24
if (rambuf == NULL) {
801beda: 6a7b ldr r3, [r7, #36] ; 0x24
801bedc: 2b00 cmp r3, #0
801bede: f000 80d4 beq.w 801c08a <ip4_frag+0x262>
goto memerr;
}
LWIP_ASSERT("this needs a pbuf in one piece!",
801bee2: 6a7b ldr r3, [r7, #36] ; 0x24
801bee4: 895b ldrh r3, [r3, #10]
801bee6: 2b13 cmp r3, #19
801bee8: d806 bhi.n 801bef8 <ip4_frag+0xd0>
801beea: 4b6b ldr r3, [pc, #428] ; (801c098 <ip4_frag+0x270>)
801beec: f240 3225 movw r2, #805 ; 0x325
801bef0: 496c ldr r1, [pc, #432] ; (801c0a4 <ip4_frag+0x27c>)
801bef2: 486b ldr r0, [pc, #428] ; (801c0a0 <ip4_frag+0x278>)
801bef4: f000 fb28 bl 801c548 <iprintf>
(rambuf->len >= (IP_HLEN)));
SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN);
801bef8: 6a7b ldr r3, [r7, #36] ; 0x24
801befa: 685b ldr r3, [r3, #4]
801befc: 2214 movs r2, #20
801befe: 6b79 ldr r1, [r7, #52] ; 0x34
801bf00: 4618 mov r0, r3
801bf02: f000 faf4 bl 801c4ee <memcpy>
iphdr = (struct ip_hdr *)rambuf->payload;
801bf06: 6a7b ldr r3, [r7, #36] ; 0x24
801bf08: 685b ldr r3, [r3, #4]
801bf0a: 633b str r3, [r7, #48] ; 0x30
left_to_copy = fragsize;
801bf0c: 8d7b ldrh r3, [r7, #42] ; 0x2a
801bf0e: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
while (left_to_copy) {
801bf12: e064 b.n 801bfde <ip4_frag+0x1b6>
struct pbuf_custom_ref *pcr;
u16_t plen = (u16_t)(p->len - poff);
801bf14: 68fb ldr r3, [r7, #12]
801bf16: 895a ldrh r2, [r3, #10]
801bf18: 8ffb ldrh r3, [r7, #62] ; 0x3e
801bf1a: 1ad3 subs r3, r2, r3
801bf1c: 83fb strh r3, [r7, #30]
LWIP_ASSERT("p->len >= poff", p->len >= poff);
801bf1e: 68fb ldr r3, [r7, #12]
801bf20: 895b ldrh r3, [r3, #10]
801bf22: 8ffa ldrh r2, [r7, #62] ; 0x3e
801bf24: 429a cmp r2, r3
801bf26: d906 bls.n 801bf36 <ip4_frag+0x10e>
801bf28: 4b5b ldr r3, [pc, #364] ; (801c098 <ip4_frag+0x270>)
801bf2a: f240 322d movw r2, #813 ; 0x32d
801bf2e: 495e ldr r1, [pc, #376] ; (801c0a8 <ip4_frag+0x280>)
801bf30: 485b ldr r0, [pc, #364] ; (801c0a0 <ip4_frag+0x278>)
801bf32: f000 fb09 bl 801c548 <iprintf>
newpbuflen = LWIP_MIN(left_to_copy, plen);
801bf36: 8bfa ldrh r2, [r7, #30]
801bf38: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
801bf3c: 4293 cmp r3, r2
801bf3e: bf28 it cs
801bf40: 4613 movcs r3, r2
801bf42: f8a7 3046 strh.w r3, [r7, #70] ; 0x46
/* Is this pbuf already empty? */
if (!newpbuflen) {
801bf46: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
801bf4a: 2b00 cmp r3, #0
801bf4c: d105 bne.n 801bf5a <ip4_frag+0x132>
poff = 0;
801bf4e: 2300 movs r3, #0
801bf50: 87fb strh r3, [r7, #62] ; 0x3e
p = p->next;
801bf52: 68fb ldr r3, [r7, #12]
801bf54: 681b ldr r3, [r3, #0]
801bf56: 60fb str r3, [r7, #12]
continue;
801bf58: e041 b.n 801bfde <ip4_frag+0x1b6>
}
pcr = ip_frag_alloc_pbuf_custom_ref();
801bf5a: f7ff ff0d bl 801bd78 <ip_frag_alloc_pbuf_custom_ref>
801bf5e: 61b8 str r0, [r7, #24]
if (pcr == NULL) {
801bf60: 69bb ldr r3, [r7, #24]
801bf62: 2b00 cmp r3, #0
801bf64: d103 bne.n 801bf6e <ip4_frag+0x146>
pbuf_free(rambuf);
801bf66: 6a78 ldr r0, [r7, #36] ; 0x24
801bf68: f7f5 fdbe bl 8011ae8 <pbuf_free>
goto memerr;
801bf6c: e08e b.n 801c08c <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,
801bf6e: 69b8 ldr r0, [r7, #24]
(u8_t *)p->payload + poff, newpbuflen);
801bf70: 68fb ldr r3, [r7, #12]
801bf72: 685a ldr r2, [r3, #4]
newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
801bf74: 8ffb ldrh r3, [r7, #62] ; 0x3e
801bf76: 4413 add r3, r2
801bf78: f8b7 1046 ldrh.w r1, [r7, #70] ; 0x46
801bf7c: f8b7 2046 ldrh.w r2, [r7, #70] ; 0x46
801bf80: 9201 str r2, [sp, #4]
801bf82: 9300 str r3, [sp, #0]
801bf84: 4603 mov r3, r0
801bf86: 2241 movs r2, #65 ; 0x41
801bf88: 2000 movs r0, #0
801bf8a: f7f5 fbf3 bl 8011774 <pbuf_alloced_custom>
801bf8e: 6178 str r0, [r7, #20]
if (newpbuf == NULL) {
801bf90: 697b ldr r3, [r7, #20]
801bf92: 2b00 cmp r3, #0
801bf94: d106 bne.n 801bfa4 <ip4_frag+0x17c>
ip_frag_free_pbuf_custom_ref(pcr);
801bf96: 69b8 ldr r0, [r7, #24]
801bf98: f7ff fef6 bl 801bd88 <ip_frag_free_pbuf_custom_ref>
pbuf_free(rambuf);
801bf9c: 6a78 ldr r0, [r7, #36] ; 0x24
801bf9e: f7f5 fda3 bl 8011ae8 <pbuf_free>
goto memerr;
801bfa2: e073 b.n 801c08c <ip4_frag+0x264>
}
pbuf_ref(p);
801bfa4: 68f8 ldr r0, [r7, #12]
801bfa6: f7f5 fe45 bl 8011c34 <pbuf_ref>
pcr->original = p;
801bfaa: 69bb ldr r3, [r7, #24]
801bfac: 68fa ldr r2, [r7, #12]
801bfae: 615a str r2, [r3, #20]
pcr->pc.custom_free_function = ipfrag_free_pbuf_custom;
801bfb0: 69bb ldr r3, [r7, #24]
801bfb2: 4a3e ldr r2, [pc, #248] ; (801c0ac <ip4_frag+0x284>)
801bfb4: 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);
801bfb6: 6979 ldr r1, [r7, #20]
801bfb8: 6a78 ldr r0, [r7, #36] ; 0x24
801bfba: f7f5 fe63 bl 8011c84 <pbuf_cat>
left_to_copy = (u16_t)(left_to_copy - newpbuflen);
801bfbe: f8b7 2044 ldrh.w r2, [r7, #68] ; 0x44
801bfc2: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
801bfc6: 1ad3 subs r3, r2, r3
801bfc8: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
if (left_to_copy) {
801bfcc: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
801bfd0: 2b00 cmp r3, #0
801bfd2: d004 beq.n 801bfde <ip4_frag+0x1b6>
poff = 0;
801bfd4: 2300 movs r3, #0
801bfd6: 87fb strh r3, [r7, #62] ; 0x3e
p = p->next;
801bfd8: 68fb ldr r3, [r7, #12]
801bfda: 681b ldr r3, [r3, #0]
801bfdc: 60fb str r3, [r7, #12]
while (left_to_copy) {
801bfde: f8b7 3044 ldrh.w r3, [r7, #68] ; 0x44
801bfe2: 2b00 cmp r3, #0
801bfe4: d196 bne.n 801bf14 <ip4_frag+0xec>
}
}
poff = (u16_t)(poff + newpbuflen);
801bfe6: 8ffa ldrh r2, [r7, #62] ; 0x3e
801bfe8: f8b7 3046 ldrh.w r3, [r7, #70] ; 0x46
801bfec: 4413 add r3, r2
801bfee: 87fb strh r3, [r7, #62] ; 0x3e
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
/* Correct header */
last = (left <= netif->mtu - IP_HLEN);
801bff0: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
801bff4: 68bb ldr r3, [r7, #8]
801bff6: 8d1b ldrh r3, [r3, #40] ; 0x28
801bff8: 3b14 subs r3, #20
801bffa: 429a cmp r2, r3
801bffc: bfd4 ite le
801bffe: 2301 movle r3, #1
801c000: 2300 movgt r3, #0
801c002: b2db uxtb r3, r3
801c004: 623b str r3, [r7, #32]
/* Set new offset and MF flag */
tmp = (IP_OFFMASK & (ofo));
801c006: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40
801c00a: f3c3 030c ubfx r3, r3, #0, #13
801c00e: 87bb strh r3, [r7, #60] ; 0x3c
if (!last || mf_set) {
801c010: 6a3b ldr r3, [r7, #32]
801c012: 2b00 cmp r3, #0
801c014: d002 beq.n 801c01c <ip4_frag+0x1f4>
801c016: 6afb ldr r3, [r7, #44] ; 0x2c
801c018: 2b00 cmp r3, #0
801c01a: d003 beq.n 801c024 <ip4_frag+0x1fc>
/* the last fragment has MF set if the input frame had it */
tmp = tmp | IP_MF;
801c01c: 8fbb ldrh r3, [r7, #60] ; 0x3c
801c01e: f443 5300 orr.w r3, r3, #8192 ; 0x2000
801c022: 87bb strh r3, [r7, #60] ; 0x3c
}
IPH_OFFSET_SET(iphdr, lwip_htons(tmp));
801c024: 8fbb ldrh r3, [r7, #60] ; 0x3c
801c026: 4618 mov r0, r3
801c028: f7f4 f9aa bl 8010380 <lwip_htons>
801c02c: 4603 mov r3, r0
801c02e: 461a mov r2, r3
801c030: 6b3b ldr r3, [r7, #48] ; 0x30
801c032: 80da strh r2, [r3, #6]
IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN)));
801c034: 8d7b ldrh r3, [r7, #42] ; 0x2a
801c036: 3314 adds r3, #20
801c038: b29b uxth r3, r3
801c03a: 4618 mov r0, r3
801c03c: f7f4 f9a0 bl 8010380 <lwip_htons>
801c040: 4603 mov r3, r0
801c042: 461a mov r2, r3
801c044: 6b3b ldr r3, [r7, #48] ; 0x30
801c046: 805a strh r2, [r3, #2]
IPH_CHKSUM_SET(iphdr, 0);
801c048: 6b3b ldr r3, [r7, #48] ; 0x30
801c04a: 2200 movs r2, #0
801c04c: 729a strb r2, [r3, #10]
801c04e: 2200 movs r2, #0
801c050: 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);
801c052: 68bb ldr r3, [r7, #8]
801c054: 695b ldr r3, [r3, #20]
801c056: 687a ldr r2, [r7, #4]
801c058: 6a79 ldr r1, [r7, #36] ; 0x24
801c05a: 68b8 ldr r0, [r7, #8]
801c05c: 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);
801c05e: 6a78 ldr r0, [r7, #36] ; 0x24
801c060: f7f5 fd42 bl 8011ae8 <pbuf_free>
left = (u16_t)(left - fragsize);
801c064: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42
801c068: 8d7b ldrh r3, [r7, #42] ; 0x2a
801c06a: 1ad3 subs r3, r2, r3
801c06c: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
ofo = (u16_t)(ofo + nfb);
801c070: f8b7 2040 ldrh.w r2, [r7, #64] ; 0x40
801c074: 8f7b ldrh r3, [r7, #58] ; 0x3a
801c076: 4413 add r3, r2
801c078: f8a7 3040 strh.w r3, [r7, #64] ; 0x40
while (left) {
801c07c: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
801c080: 2b00 cmp r3, #0
801c082: f47f af1a bne.w 801beba <ip4_frag+0x92>
}
MIB2_STATS_INC(mib2.ipfragoks);
return ERR_OK;
801c086: 2300 movs r3, #0
801c088: e002 b.n 801c090 <ip4_frag+0x268>
goto memerr;
801c08a: bf00 nop
memerr:
MIB2_STATS_INC(mib2.ipfragfails);
return ERR_MEM;
801c08c: f04f 33ff mov.w r3, #4294967295
}
801c090: 4618 mov r0, r3
801c092: 3748 adds r7, #72 ; 0x48
801c094: 46bd mov sp, r7
801c096: bd80 pop {r7, pc}
801c098: 080203c0 .word 0x080203c0
801c09c: 0802059c .word 0x0802059c
801c0a0: 08020408 .word 0x08020408
801c0a4: 080205b8 .word 0x080205b8
801c0a8: 080205d8 .word 0x080205d8
801c0ac: 0801bdc1 .word 0x0801bdc1
0801c0b0 <ethernet_input>:
* @see ETHARP_SUPPORT_VLAN
* @see LWIP_HOOK_VLAN_CHECK
*/
err_t
ethernet_input(struct pbuf *p, struct netif *netif)
{
801c0b0: b580 push {r7, lr}
801c0b2: b086 sub sp, #24
801c0b4: af00 add r7, sp, #0
801c0b6: 6078 str r0, [r7, #4]
801c0b8: 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;
801c0ba: 230e movs r3, #14
801c0bc: 82fb strh r3, [r7, #22]
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
LWIP_ASSERT_CORE_LOCKED();
if (p->len <= SIZEOF_ETH_HDR) {
801c0be: 687b ldr r3, [r7, #4]
801c0c0: 895b ldrh r3, [r3, #10]
801c0c2: 2b0e cmp r3, #14
801c0c4: d96e bls.n 801c1a4 <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) {
801c0c6: 687b ldr r3, [r7, #4]
801c0c8: 7bdb ldrb r3, [r3, #15]
801c0ca: 2b00 cmp r3, #0
801c0cc: d106 bne.n 801c0dc <ethernet_input+0x2c>
p->if_idx = netif_get_index(netif);
801c0ce: 683b ldr r3, [r7, #0]
801c0d0: f893 3034 ldrb.w r3, [r3, #52] ; 0x34
801c0d4: 3301 adds r3, #1
801c0d6: b2da uxtb r2, r3
801c0d8: 687b ldr r3, [r7, #4]
801c0da: 73da strb r2, [r3, #15]
}
/* points to packet payload, which starts with an Ethernet header */
ethhdr = (struct eth_hdr *)p->payload;
801c0dc: 687b ldr r3, [r7, #4]
801c0de: 685b ldr r3, [r3, #4]
801c0e0: 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;
801c0e2: 693b ldr r3, [r7, #16]
801c0e4: 7b1a ldrb r2, [r3, #12]
801c0e6: 7b5b ldrb r3, [r3, #13]
801c0e8: 021b lsls r3, r3, #8
801c0ea: 4313 orrs r3, r2
801c0ec: 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) {
801c0ee: 693b ldr r3, [r7, #16]
801c0f0: 781b ldrb r3, [r3, #0]
801c0f2: f003 0301 and.w r3, r3, #1
801c0f6: 2b00 cmp r3, #0
801c0f8: d023 beq.n 801c142 <ethernet_input+0x92>
/* this might be a multicast or broadcast packet */
if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) {
801c0fa: 693b ldr r3, [r7, #16]
801c0fc: 781b ldrb r3, [r3, #0]
801c0fe: 2b01 cmp r3, #1
801c100: d10f bne.n 801c122 <ethernet_input+0x72>
#if LWIP_IPV4
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
801c102: 693b ldr r3, [r7, #16]
801c104: 785b ldrb r3, [r3, #1]
801c106: 2b00 cmp r3, #0
801c108: d11b bne.n 801c142 <ethernet_input+0x92>
(ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) {
801c10a: 693b ldr r3, [r7, #16]
801c10c: 789b ldrb r3, [r3, #2]
if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
801c10e: 2b5e cmp r3, #94 ; 0x5e
801c110: d117 bne.n 801c142 <ethernet_input+0x92>
/* mark the pbuf as link-layer multicast */
p->flags |= PBUF_FLAG_LLMCAST;
801c112: 687b ldr r3, [r7, #4]
801c114: 7b5b ldrb r3, [r3, #13]
801c116: f043 0310 orr.w r3, r3, #16
801c11a: b2da uxtb r2, r3
801c11c: 687b ldr r3, [r7, #4]
801c11e: 735a strb r2, [r3, #13]
801c120: e00f b.n 801c142 <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)) {
801c122: 693b ldr r3, [r7, #16]
801c124: 2206 movs r2, #6
801c126: 4928 ldr r1, [pc, #160] ; (801c1c8 <ethernet_input+0x118>)
801c128: 4618 mov r0, r3
801c12a: f000 f9d1 bl 801c4d0 <memcmp>
801c12e: 4603 mov r3, r0
801c130: 2b00 cmp r3, #0
801c132: d106 bne.n 801c142 <ethernet_input+0x92>
/* mark the pbuf as link-layer broadcast */
p->flags |= PBUF_FLAG_LLBCAST;
801c134: 687b ldr r3, [r7, #4]
801c136: 7b5b ldrb r3, [r3, #13]
801c138: f043 0308 orr.w r3, r3, #8
801c13c: b2da uxtb r2, r3
801c13e: 687b ldr r3, [r7, #4]
801c140: 735a strb r2, [r3, #13]
}
}
switch (type) {
801c142: 89fb ldrh r3, [r7, #14]
801c144: 2b08 cmp r3, #8
801c146: d003 beq.n 801c150 <ethernet_input+0xa0>
801c148: f5b3 6fc1 cmp.w r3, #1544 ; 0x608
801c14c: d014 beq.n 801c178 <ethernet_input+0xc8>
}
#endif
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
goto free_and_return;
801c14e: e032 b.n 801c1b6 <ethernet_input+0x106>
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
801c150: 683b ldr r3, [r7, #0]
801c152: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801c156: f003 0308 and.w r3, r3, #8
801c15a: 2b00 cmp r3, #0
801c15c: d024 beq.n 801c1a8 <ethernet_input+0xf8>
if (pbuf_remove_header(p, next_hdr_offset)) {
801c15e: 8afb ldrh r3, [r7, #22]
801c160: 4619 mov r1, r3
801c162: 6878 ldr r0, [r7, #4]
801c164: f7f5 fc3a bl 80119dc <pbuf_remove_header>
801c168: 4603 mov r3, r0
801c16a: 2b00 cmp r3, #0
801c16c: d11e bne.n 801c1ac <ethernet_input+0xfc>
ip4_input(p, netif);
801c16e: 6839 ldr r1, [r7, #0]
801c170: 6878 ldr r0, [r7, #4]
801c172: f7fe ff0f bl 801af94 <ip4_input>
break;
801c176: e013 b.n 801c1a0 <ethernet_input+0xf0>
if (!(netif->flags & NETIF_FLAG_ETHARP)) {
801c178: 683b ldr r3, [r7, #0]
801c17a: f893 3031 ldrb.w r3, [r3, #49] ; 0x31
801c17e: f003 0308 and.w r3, r3, #8
801c182: 2b00 cmp r3, #0
801c184: d014 beq.n 801c1b0 <ethernet_input+0x100>
if (pbuf_remove_header(p, next_hdr_offset)) {
801c186: 8afb ldrh r3, [r7, #22]
801c188: 4619 mov r1, r3
801c18a: 6878 ldr r0, [r7, #4]
801c18c: f7f5 fc26 bl 80119dc <pbuf_remove_header>
801c190: 4603 mov r3, r0
801c192: 2b00 cmp r3, #0
801c194: d10e bne.n 801c1b4 <ethernet_input+0x104>
etharp_input(p, netif);
801c196: 6839 ldr r1, [r7, #0]
801c198: 6878 ldr r0, [r7, #4]
801c19a: f7fe f8ab bl 801a2f4 <etharp_input>
break;
801c19e: bf00 nop
}
/* This means the pbuf is freed or consumed,
so the caller doesn't have to free it again */
return ERR_OK;
801c1a0: 2300 movs r3, #0
801c1a2: e00c b.n 801c1be <ethernet_input+0x10e>
goto free_and_return;
801c1a4: bf00 nop
801c1a6: e006 b.n 801c1b6 <ethernet_input+0x106>
goto free_and_return;
801c1a8: bf00 nop
801c1aa: e004 b.n 801c1b6 <ethernet_input+0x106>
goto free_and_return;
801c1ac: bf00 nop
801c1ae: e002 b.n 801c1b6 <ethernet_input+0x106>
goto free_and_return;
801c1b0: bf00 nop
801c1b2: e000 b.n 801c1b6 <ethernet_input+0x106>
goto free_and_return;
801c1b4: bf00 nop
free_and_return:
pbuf_free(p);
801c1b6: 6878 ldr r0, [r7, #4]
801c1b8: f7f5 fc96 bl 8011ae8 <pbuf_free>
return ERR_OK;
801c1bc: 2300 movs r3, #0
}
801c1be: 4618 mov r0, r3
801c1c0: 3718 adds r7, #24
801c1c2: 46bd mov sp, r7
801c1c4: bd80 pop {r7, pc}
801c1c6: bf00 nop
801c1c8: 080226f0 .word 0x080226f0
0801c1cc <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) {
801c1cc: b580 push {r7, lr}
801c1ce: b086 sub sp, #24
801c1d0: af00 add r7, sp, #0
801c1d2: 60f8 str r0, [r7, #12]
801c1d4: 60b9 str r1, [r7, #8]
801c1d6: 607a str r2, [r7, #4]
801c1d8: 603b str r3, [r7, #0]
struct eth_hdr *ethhdr;
u16_t eth_type_be = lwip_htons(eth_type);
801c1da: 8c3b ldrh r3, [r7, #32]
801c1dc: 4618 mov r0, r3
801c1de: f7f4 f8cf bl 8010380 <lwip_htons>
801c1e2: 4603 mov r3, r0
801c1e4: 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) {
801c1e6: 210e movs r1, #14
801c1e8: 68b8 ldr r0, [r7, #8]
801c1ea: f7f5 fbe7 bl 80119bc <pbuf_add_header>
801c1ee: 4603 mov r3, r0
801c1f0: 2b00 cmp r3, #0
801c1f2: d125 bne.n 801c240 <ethernet_output+0x74>
}
}
LWIP_ASSERT_CORE_LOCKED();
ethhdr = (struct eth_hdr *)p->payload;
801c1f4: 68bb ldr r3, [r7, #8]
801c1f6: 685b ldr r3, [r3, #4]
801c1f8: 613b str r3, [r7, #16]
ethhdr->type = eth_type_be;
801c1fa: 693b ldr r3, [r7, #16]
801c1fc: 8afa ldrh r2, [r7, #22]
801c1fe: 819a strh r2, [r3, #12]
SMEMCPY(&ethhdr->dest, dst, ETH_HWADDR_LEN);
801c200: 693b ldr r3, [r7, #16]
801c202: 2206 movs r2, #6
801c204: 6839 ldr r1, [r7, #0]
801c206: 4618 mov r0, r3
801c208: f000 f971 bl 801c4ee <memcpy>
SMEMCPY(&ethhdr->src, src, ETH_HWADDR_LEN);
801c20c: 693b ldr r3, [r7, #16]
801c20e: 3306 adds r3, #6
801c210: 2206 movs r2, #6
801c212: 6879 ldr r1, [r7, #4]
801c214: 4618 mov r0, r3
801c216: f000 f96a bl 801c4ee <memcpy>
LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
801c21a: 68fb ldr r3, [r7, #12]
801c21c: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
801c220: 2b06 cmp r3, #6
801c222: d006 beq.n 801c232 <ethernet_output+0x66>
801c224: 4b0a ldr r3, [pc, #40] ; (801c250 <ethernet_output+0x84>)
801c226: f240 1233 movw r2, #307 ; 0x133
801c22a: 490a ldr r1, [pc, #40] ; (801c254 <ethernet_output+0x88>)
801c22c: 480a ldr r0, [pc, #40] ; (801c258 <ethernet_output+0x8c>)
801c22e: f000 f98b bl 801c548 <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);
801c232: 68fb ldr r3, [r7, #12]
801c234: 699b ldr r3, [r3, #24]
801c236: 68b9 ldr r1, [r7, #8]
801c238: 68f8 ldr r0, [r7, #12]
801c23a: 4798 blx r3
801c23c: 4603 mov r3, r0
801c23e: e002 b.n 801c246 <ethernet_output+0x7a>
goto pbuf_header_failed;
801c240: 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;
801c242: f06f 0301 mvn.w r3, #1
}
801c246: 4618 mov r0, r3
801c248: 3718 adds r7, #24
801c24a: 46bd mov sp, r7
801c24c: bd80 pop {r7, pc}
801c24e: bf00 nop
801c250: 080205e8 .word 0x080205e8
801c254: 08020620 .word 0x08020620
801c258: 08020654 .word 0x08020654
0801c25c <sys_mbox_new>:
#endif
/*-----------------------------------------------------------------------------------*/
// Creates an empty mailbox.
err_t sys_mbox_new(sys_mbox_t *mbox, int size)
{
801c25c: b580 push {r7, lr}
801c25e: b086 sub sp, #24
801c260: af00 add r7, sp, #0
801c262: 6078 str r0, [r7, #4]
801c264: 6039 str r1, [r7, #0]
#if (osCMSIS < 0x20000U)
osMessageQDef(QUEUE, size, void *);
801c266: 683b ldr r3, [r7, #0]
801c268: 60bb str r3, [r7, #8]
801c26a: 2304 movs r3, #4
801c26c: 60fb str r3, [r7, #12]
801c26e: 2300 movs r3, #0
801c270: 613b str r3, [r7, #16]
801c272: 2300 movs r3, #0
801c274: 617b str r3, [r7, #20]
*mbox = osMessageCreate(osMessageQ(QUEUE), NULL);
801c276: f107 0308 add.w r3, r7, #8
801c27a: 2100 movs r1, #0
801c27c: 4618 mov r0, r3
801c27e: f7f1 f88d bl 800d39c <osMessageCreate>
801c282: 4602 mov r2, r0
801c284: 687b ldr r3, [r7, #4]
801c286: 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)
801c288: 687b ldr r3, [r7, #4]
801c28a: 681b ldr r3, [r3, #0]
801c28c: 2b00 cmp r3, #0
801c28e: d102 bne.n 801c296 <sys_mbox_new+0x3a>
return ERR_MEM;
801c290: f04f 33ff mov.w r3, #4294967295
801c294: e000 b.n 801c298 <sys_mbox_new+0x3c>
return ERR_OK;
801c296: 2300 movs r3, #0
}
801c298: 4618 mov r0, r3
801c29a: 3718 adds r7, #24
801c29c: 46bd mov sp, r7
801c29e: bd80 pop {r7, pc}
0801c2a0 <sys_mbox_trypost>:
/*-----------------------------------------------------------------------------------*/
// Try to post the "msg" to the mailbox.
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
{
801c2a0: b580 push {r7, lr}
801c2a2: b084 sub sp, #16
801c2a4: af00 add r7, sp, #0
801c2a6: 6078 str r0, [r7, #4]
801c2a8: 6039 str r1, [r7, #0]
err_t result;
#if (osCMSIS < 0x20000U)
if(osMessagePut(*mbox, (uint32_t)msg, 0) == osOK)
801c2aa: 687b ldr r3, [r7, #4]
801c2ac: 681b ldr r3, [r3, #0]
801c2ae: 6839 ldr r1, [r7, #0]
801c2b0: 2200 movs r2, #0
801c2b2: 4618 mov r0, r3
801c2b4: f7f1 f89c bl 800d3f0 <osMessagePut>
801c2b8: 4603 mov r3, r0
801c2ba: 2b00 cmp r3, #0
801c2bc: d102 bne.n 801c2c4 <sys_mbox_trypost+0x24>
#else
if(osMessageQueuePut(*mbox, &msg, 0, 0) == osOK)
#endif
{
result = ERR_OK;
801c2be: 2300 movs r3, #0
801c2c0: 73fb strb r3, [r7, #15]
801c2c2: e001 b.n 801c2c8 <sys_mbox_trypost+0x28>
}
else
{
// could not post, queue must be full
result = ERR_MEM;
801c2c4: 23ff movs r3, #255 ; 0xff
801c2c6: 73fb strb r3, [r7, #15]
#if SYS_STATS
lwip_stats.sys.mbox.err++;
#endif /* SYS_STATS */
}
return result;
801c2c8: f997 300f ldrsb.w r3, [r7, #15]
}
801c2cc: 4618 mov r0, r3
801c2ce: 3710 adds r7, #16
801c2d0: 46bd mov sp, r7
801c2d2: bd80 pop {r7, pc}
0801c2d4 <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)
{
801c2d4: b580 push {r7, lr}
801c2d6: b08c sub sp, #48 ; 0x30
801c2d8: af00 add r7, sp, #0
801c2da: 61f8 str r0, [r7, #28]
801c2dc: 61b9 str r1, [r7, #24]
801c2de: 617a str r2, [r7, #20]
#if (osCMSIS < 0x20000U)
osEvent event;
uint32_t starttime = osKernelSysTick();
801c2e0: f7f0 fe8b bl 800cffa <osKernelSysTick>
801c2e4: 62f8 str r0, [r7, #44] ; 0x2c
#else
osStatus_t status;
uint32_t starttime = osKernelGetTickCount();
#endif
if(timeout != 0)
801c2e6: 697b ldr r3, [r7, #20]
801c2e8: 2b00 cmp r3, #0
801c2ea: d017 beq.n 801c31c <sys_arch_mbox_fetch+0x48>
{
#if (osCMSIS < 0x20000U)
event = osMessageGet (*mbox, timeout);
801c2ec: 69fb ldr r3, [r7, #28]
801c2ee: 6819 ldr r1, [r3, #0]
801c2f0: f107 0320 add.w r3, r7, #32
801c2f4: 697a ldr r2, [r7, #20]
801c2f6: 4618 mov r0, r3
801c2f8: f7f1 f8ba bl 800d470 <osMessageGet>
if(event.status == osEventMessage)
801c2fc: 6a3b ldr r3, [r7, #32]
801c2fe: 2b10 cmp r3, #16
801c300: d109 bne.n 801c316 <sys_arch_mbox_fetch+0x42>
{
*msg = (void *)event.value.v;
801c302: 6a7b ldr r3, [r7, #36] ; 0x24
801c304: 461a mov r2, r3
801c306: 69bb ldr r3, [r7, #24]
801c308: 601a str r2, [r3, #0]
return (osKernelSysTick() - starttime);
801c30a: f7f0 fe76 bl 800cffa <osKernelSysTick>
801c30e: 4602 mov r2, r0
801c310: 6afb ldr r3, [r7, #44] ; 0x2c
801c312: 1ad3 subs r3, r2, r3
801c314: e019 b.n 801c34a <sys_arch_mbox_fetch+0x76>
return (osKernelGetTickCount() - starttime);
}
#endif
else
{
return SYS_ARCH_TIMEOUT;
801c316: f04f 33ff mov.w r3, #4294967295
801c31a: e016 b.n 801c34a <sys_arch_mbox_fetch+0x76>
}
}
else
{
#if (osCMSIS < 0x20000U)
event = osMessageGet (*mbox, osWaitForever);
801c31c: 69fb ldr r3, [r7, #28]
801c31e: 6819 ldr r1, [r3, #0]
801c320: 463b mov r3, r7
801c322: f04f 32ff mov.w r2, #4294967295
801c326: 4618 mov r0, r3
801c328: f7f1 f8a2 bl 800d470 <osMessageGet>
801c32c: f107 0320 add.w r3, r7, #32
801c330: 463a mov r2, r7
801c332: ca07 ldmia r2, {r0, r1, r2}
801c334: e883 0007 stmia.w r3, {r0, r1, r2}
*msg = (void *)event.value.v;
801c338: 6a7b ldr r3, [r7, #36] ; 0x24
801c33a: 461a mov r2, r3
801c33c: 69bb ldr r3, [r7, #24]
801c33e: 601a str r2, [r3, #0]
return (osKernelSysTick() - starttime);
801c340: f7f0 fe5b bl 800cffa <osKernelSysTick>
801c344: 4602 mov r2, r0
801c346: 6afb ldr r3, [r7, #44] ; 0x2c
801c348: 1ad3 subs r3, r2, r3
#else
osMessageQueueGet(*mbox, msg, 0, osWaitForever );
return (osKernelGetTickCount() - starttime);
#endif
}
}
801c34a: 4618 mov r0, r3
801c34c: 3730 adds r7, #48 ; 0x30
801c34e: 46bd mov sp, r7
801c350: bd80 pop {r7, pc}
0801c352 <sys_mbox_valid>:
return SYS_MBOX_EMPTY;
}
}
/*----------------------------------------------------------------------------------*/
int sys_mbox_valid(sys_mbox_t *mbox)
{
801c352: b480 push {r7}
801c354: b083 sub sp, #12
801c356: af00 add r7, sp, #0
801c358: 6078 str r0, [r7, #4]
if (*mbox == SYS_MBOX_NULL)
801c35a: 687b ldr r3, [r7, #4]
801c35c: 681b ldr r3, [r3, #0]
801c35e: 2b00 cmp r3, #0
801c360: d101 bne.n 801c366 <sys_mbox_valid+0x14>
return 0;
801c362: 2300 movs r3, #0
801c364: e000 b.n 801c368 <sys_mbox_valid+0x16>
else
return 1;
801c366: 2301 movs r3, #1
}
801c368: 4618 mov r0, r3
801c36a: 370c adds r7, #12
801c36c: 46bd mov sp, r7
801c36e: f85d 7b04 ldr.w r7, [sp], #4
801c372: 4770 bx lr
0801c374 <sys_init>:
#else
osMutexId_t lwip_sys_mutex;
#endif
// Initialize sys arch
void sys_init(void)
{
801c374: b580 push {r7, lr}
801c376: af00 add r7, sp, #0
#if (osCMSIS < 0x20000U)
lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex));
801c378: 4803 ldr r0, [pc, #12] ; (801c388 <sys_init+0x14>)
801c37a: f7f0 feae bl 800d0da <osMutexCreate>
801c37e: 4602 mov r2, r0
801c380: 4b02 ldr r3, [pc, #8] ; (801c38c <sys_init+0x18>)
801c382: 601a str r2, [r3, #0]
#else
lwip_sys_mutex = osMutexNew(NULL);
#endif
}
801c384: bf00 nop
801c386: bd80 pop {r7, pc}
801c388: 08022700 .word 0x08022700
801c38c: 2000f830 .word 0x2000f830
0801c390 <sys_mutex_new>:
/* Mutexes*/
/*-----------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------*/
#if LWIP_COMPAT_MUTEX == 0
/* Create a new mutex*/
err_t sys_mutex_new(sys_mutex_t *mutex) {
801c390: b580 push {r7, lr}
801c392: b084 sub sp, #16
801c394: af00 add r7, sp, #0
801c396: 6078 str r0, [r7, #4]
#if (osCMSIS < 0x20000U)
osMutexDef(MUTEX);
801c398: 2300 movs r3, #0
801c39a: 60bb str r3, [r7, #8]
801c39c: 2300 movs r3, #0
801c39e: 60fb str r3, [r7, #12]
*mutex = osMutexCreate(osMutex(MUTEX));
801c3a0: f107 0308 add.w r3, r7, #8
801c3a4: 4618 mov r0, r3
801c3a6: f7f0 fe98 bl 800d0da <osMutexCreate>
801c3aa: 4602 mov r2, r0
801c3ac: 687b ldr r3, [r7, #4]
801c3ae: 601a str r2, [r3, #0]
#else
*mutex = osMutexNew(NULL);
#endif
if(*mutex == NULL)
801c3b0: 687b ldr r3, [r7, #4]
801c3b2: 681b ldr r3, [r3, #0]
801c3b4: 2b00 cmp r3, #0
801c3b6: d102 bne.n 801c3be <sys_mutex_new+0x2e>
{
#if SYS_STATS
++lwip_stats.sys.mutex.err;
#endif /* SYS_STATS */
return ERR_MEM;
801c3b8: f04f 33ff mov.w r3, #4294967295
801c3bc: e000 b.n 801c3c0 <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;
801c3be: 2300 movs r3, #0
}
801c3c0: 4618 mov r0, r3
801c3c2: 3710 adds r7, #16
801c3c4: 46bd mov sp, r7
801c3c6: bd80 pop {r7, pc}
0801c3c8 <sys_mutex_lock>:
osMutexDelete(*mutex);
}
/*-----------------------------------------------------------------------------------*/
/* Lock a mutex*/
void sys_mutex_lock(sys_mutex_t *mutex)
{
801c3c8: b580 push {r7, lr}
801c3ca: b082 sub sp, #8
801c3cc: af00 add r7, sp, #0
801c3ce: 6078 str r0, [r7, #4]
#if (osCMSIS < 0x20000U)
osMutexWait(*mutex, osWaitForever);
801c3d0: 687b ldr r3, [r7, #4]
801c3d2: 681b ldr r3, [r3, #0]
801c3d4: f04f 31ff mov.w r1, #4294967295
801c3d8: 4618 mov r0, r3
801c3da: f7f0 fe97 bl 800d10c <osMutexWait>
#else
osMutexAcquire(*mutex, osWaitForever);
#endif
}
801c3de: bf00 nop
801c3e0: 3708 adds r7, #8
801c3e2: 46bd mov sp, r7
801c3e4: bd80 pop {r7, pc}
0801c3e6 <sys_mutex_unlock>:
/*-----------------------------------------------------------------------------------*/
/* Unlock a mutex*/
void sys_mutex_unlock(sys_mutex_t *mutex)
{
801c3e6: b580 push {r7, lr}
801c3e8: b082 sub sp, #8
801c3ea: af00 add r7, sp, #0
801c3ec: 6078 str r0, [r7, #4]
osMutexRelease(*mutex);
801c3ee: 687b ldr r3, [r7, #4]
801c3f0: 681b ldr r3, [r3, #0]
801c3f2: 4618 mov r0, r3
801c3f4: f7f0 fed8 bl 800d1a8 <osMutexRelease>
}
801c3f8: bf00 nop
801c3fa: 3708 adds r7, #8
801c3fc: 46bd mov sp, r7
801c3fe: bd80 pop {r7, pc}
0801c400 <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)
{
801c400: b580 push {r7, lr}
801c402: b08c sub sp, #48 ; 0x30
801c404: af00 add r7, sp, #0
801c406: 60f8 str r0, [r7, #12]
801c408: 60b9 str r1, [r7, #8]
801c40a: 607a str r2, [r7, #4]
801c40c: 603b str r3, [r7, #0]
#if (osCMSIS < 0x20000U)
const osThreadDef_t os_thread_def = { (char *)name, (os_pthread)thread, (osPriority)prio, 0, stacksize};
801c40e: f107 0314 add.w r3, r7, #20
801c412: 2200 movs r2, #0
801c414: 601a str r2, [r3, #0]
801c416: 605a str r2, [r3, #4]
801c418: 609a str r2, [r3, #8]
801c41a: 60da str r2, [r3, #12]
801c41c: 611a str r2, [r3, #16]
801c41e: 615a str r2, [r3, #20]
801c420: 619a str r2, [r3, #24]
801c422: 68fb ldr r3, [r7, #12]
801c424: 617b str r3, [r7, #20]
801c426: 68bb ldr r3, [r7, #8]
801c428: 61bb str r3, [r7, #24]
801c42a: 6bbb ldr r3, [r7, #56] ; 0x38
801c42c: b21b sxth r3, r3
801c42e: 83bb strh r3, [r7, #28]
801c430: 683b ldr r3, [r7, #0]
801c432: 627b str r3, [r7, #36] ; 0x24
return osThreadCreate(&os_thread_def, arg);
801c434: f107 0314 add.w r3, r7, #20
801c438: 6879 ldr r1, [r7, #4]
801c43a: 4618 mov r0, r3
801c43c: f7f0 fded bl 800d01a <osThreadCreate>
801c440: 4603 mov r3, r0
.stack_size = stacksize,
.priority = (osPriority_t)prio,
};
return osThreadNew(thread, arg, &attributes);
#endif
}
801c442: 4618 mov r0, r3
801c444: 3730 adds r7, #48 ; 0x30
801c446: 46bd mov sp, r7
801c448: bd80 pop {r7, pc}
...
0801c44c <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)
{
801c44c: b580 push {r7, lr}
801c44e: af00 add r7, sp, #0
#if (osCMSIS < 0x20000U)
osMutexWait(lwip_sys_mutex, osWaitForever);
801c450: 4b04 ldr r3, [pc, #16] ; (801c464 <sys_arch_protect+0x18>)
801c452: 681b ldr r3, [r3, #0]
801c454: f04f 31ff mov.w r1, #4294967295
801c458: 4618 mov r0, r3
801c45a: f7f0 fe57 bl 800d10c <osMutexWait>
#else
osMutexAcquire(lwip_sys_mutex, osWaitForever);
#endif
return (sys_prot_t)1;
801c45e: 2301 movs r3, #1
}
801c460: 4618 mov r0, r3
801c462: bd80 pop {r7, pc}
801c464: 2000f830 .word 0x2000f830
0801c468 <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)
{
801c468: b580 push {r7, lr}
801c46a: b082 sub sp, #8
801c46c: af00 add r7, sp, #0
801c46e: 6078 str r0, [r7, #4]
( void ) pval;
osMutexRelease(lwip_sys_mutex);
801c470: 4b04 ldr r3, [pc, #16] ; (801c484 <sys_arch_unprotect+0x1c>)
801c472: 681b ldr r3, [r3, #0]
801c474: 4618 mov r0, r3
801c476: f7f0 fe97 bl 800d1a8 <osMutexRelease>
}
801c47a: bf00 nop
801c47c: 3708 adds r7, #8
801c47e: 46bd mov sp, r7
801c480: bd80 pop {r7, pc}
801c482: bf00 nop
801c484: 2000f830 .word 0x2000f830
0801c488 <__libc_init_array>:
801c488: b570 push {r4, r5, r6, lr}
801c48a: 4e0d ldr r6, [pc, #52] ; (801c4c0 <__libc_init_array+0x38>)
801c48c: 4c0d ldr r4, [pc, #52] ; (801c4c4 <__libc_init_array+0x3c>)
801c48e: 1ba4 subs r4, r4, r6
801c490: 10a4 asrs r4, r4, #2
801c492: 2500 movs r5, #0
801c494: 42a5 cmp r5, r4
801c496: d109 bne.n 801c4ac <__libc_init_array+0x24>
801c498: 4e0b ldr r6, [pc, #44] ; (801c4c8 <__libc_init_array+0x40>)
801c49a: 4c0c ldr r4, [pc, #48] ; (801c4cc <__libc_init_array+0x44>)
801c49c: f001 f914 bl 801d6c8 <_init>
801c4a0: 1ba4 subs r4, r4, r6
801c4a2: 10a4 asrs r4, r4, #2
801c4a4: 2500 movs r5, #0
801c4a6: 42a5 cmp r5, r4
801c4a8: d105 bne.n 801c4b6 <__libc_init_array+0x2e>
801c4aa: bd70 pop {r4, r5, r6, pc}
801c4ac: f856 3025 ldr.w r3, [r6, r5, lsl #2]
801c4b0: 4798 blx r3
801c4b2: 3501 adds r5, #1
801c4b4: e7ee b.n 801c494 <__libc_init_array+0xc>
801c4b6: f856 3025 ldr.w r3, [r6, r5, lsl #2]
801c4ba: 4798 blx r3
801c4bc: 3501 adds r5, #1
801c4be: e7f2 b.n 801c4a6 <__libc_init_array+0x1e>
801c4c0: 080227a8 .word 0x080227a8
801c4c4: 080227a8 .word 0x080227a8
801c4c8: 080227a8 .word 0x080227a8
801c4cc: 080227ac .word 0x080227ac
0801c4d0 <memcmp>:
801c4d0: b530 push {r4, r5, lr}
801c4d2: 2400 movs r4, #0
801c4d4: 42a2 cmp r2, r4
801c4d6: d101 bne.n 801c4dc <memcmp+0xc>
801c4d8: 2000 movs r0, #0
801c4da: e007 b.n 801c4ec <memcmp+0x1c>
801c4dc: 5d03 ldrb r3, [r0, r4]
801c4de: 3401 adds r4, #1
801c4e0: 190d adds r5, r1, r4
801c4e2: f815 5c01 ldrb.w r5, [r5, #-1]
801c4e6: 42ab cmp r3, r5
801c4e8: d0f4 beq.n 801c4d4 <memcmp+0x4>
801c4ea: 1b58 subs r0, r3, r5
801c4ec: bd30 pop {r4, r5, pc}
0801c4ee <memcpy>:
801c4ee: b510 push {r4, lr}
801c4f0: 1e43 subs r3, r0, #1
801c4f2: 440a add r2, r1
801c4f4: 4291 cmp r1, r2
801c4f6: d100 bne.n 801c4fa <memcpy+0xc>
801c4f8: bd10 pop {r4, pc}
801c4fa: f811 4b01 ldrb.w r4, [r1], #1
801c4fe: f803 4f01 strb.w r4, [r3, #1]!
801c502: e7f7 b.n 801c4f4 <memcpy+0x6>
0801c504 <memmove>:
801c504: 4288 cmp r0, r1
801c506: b510 push {r4, lr}
801c508: eb01 0302 add.w r3, r1, r2
801c50c: d807 bhi.n 801c51e <memmove+0x1a>
801c50e: 1e42 subs r2, r0, #1
801c510: 4299 cmp r1, r3
801c512: d00a beq.n 801c52a <memmove+0x26>
801c514: f811 4b01 ldrb.w r4, [r1], #1
801c518: f802 4f01 strb.w r4, [r2, #1]!
801c51c: e7f8 b.n 801c510 <memmove+0xc>
801c51e: 4283 cmp r3, r0
801c520: d9f5 bls.n 801c50e <memmove+0xa>
801c522: 1881 adds r1, r0, r2
801c524: 1ad2 subs r2, r2, r3
801c526: 42d3 cmn r3, r2
801c528: d100 bne.n 801c52c <memmove+0x28>
801c52a: bd10 pop {r4, pc}
801c52c: f813 4d01 ldrb.w r4, [r3, #-1]!
801c530: f801 4d01 strb.w r4, [r1, #-1]!
801c534: e7f7 b.n 801c526 <memmove+0x22>
0801c536 <memset>:
801c536: 4402 add r2, r0
801c538: 4603 mov r3, r0
801c53a: 4293 cmp r3, r2
801c53c: d100 bne.n 801c540 <memset+0xa>
801c53e: 4770 bx lr
801c540: f803 1b01 strb.w r1, [r3], #1
801c544: e7f9 b.n 801c53a <memset+0x4>
...
0801c548 <iprintf>:
801c548: b40f push {r0, r1, r2, r3}
801c54a: 4b0a ldr r3, [pc, #40] ; (801c574 <iprintf+0x2c>)
801c54c: b513 push {r0, r1, r4, lr}
801c54e: 681c ldr r4, [r3, #0]
801c550: b124 cbz r4, 801c55c <iprintf+0x14>
801c552: 69a3 ldr r3, [r4, #24]
801c554: b913 cbnz r3, 801c55c <iprintf+0x14>
801c556: 4620 mov r0, r4
801c558: f000 f8a2 bl 801c6a0 <__sinit>
801c55c: ab05 add r3, sp, #20
801c55e: 9a04 ldr r2, [sp, #16]
801c560: 68a1 ldr r1, [r4, #8]
801c562: 9301 str r3, [sp, #4]
801c564: 4620 mov r0, r4
801c566: f000 fb51 bl 801cc0c <_vfiprintf_r>
801c56a: b002 add sp, #8
801c56c: e8bd 4010 ldmia.w sp!, {r4, lr}
801c570: b004 add sp, #16
801c572: 4770 bx lr
801c574: 20000070 .word 0x20000070
0801c578 <rand>:
801c578: b538 push {r3, r4, r5, lr}
801c57a: 4b13 ldr r3, [pc, #76] ; (801c5c8 <rand+0x50>)
801c57c: 681c ldr r4, [r3, #0]
801c57e: 6ba3 ldr r3, [r4, #56] ; 0x38
801c580: b97b cbnz r3, 801c5a2 <rand+0x2a>
801c582: 2018 movs r0, #24
801c584: f000 f916 bl 801c7b4 <malloc>
801c588: 4a10 ldr r2, [pc, #64] ; (801c5cc <rand+0x54>)
801c58a: 4b11 ldr r3, [pc, #68] ; (801c5d0 <rand+0x58>)
801c58c: 63a0 str r0, [r4, #56] ; 0x38
801c58e: e9c0 2300 strd r2, r3, [r0]
801c592: 4b10 ldr r3, [pc, #64] ; (801c5d4 <rand+0x5c>)
801c594: 6083 str r3, [r0, #8]
801c596: 230b movs r3, #11
801c598: 8183 strh r3, [r0, #12]
801c59a: 2201 movs r2, #1
801c59c: 2300 movs r3, #0
801c59e: e9c0 2304 strd r2, r3, [r0, #16]
801c5a2: 6ba1 ldr r1, [r4, #56] ; 0x38
801c5a4: 480c ldr r0, [pc, #48] ; (801c5d8 <rand+0x60>)
801c5a6: 690a ldr r2, [r1, #16]
801c5a8: 694b ldr r3, [r1, #20]
801c5aa: 4c0c ldr r4, [pc, #48] ; (801c5dc <rand+0x64>)
801c5ac: 4350 muls r0, r2
801c5ae: fb04 0003 mla r0, r4, r3, r0
801c5b2: fba2 2304 umull r2, r3, r2, r4
801c5b6: 4403 add r3, r0
801c5b8: 1c54 adds r4, r2, #1
801c5ba: f143 0500 adc.w r5, r3, #0
801c5be: e9c1 4504 strd r4, r5, [r1, #16]
801c5c2: f025 4000 bic.w r0, r5, #2147483648 ; 0x80000000
801c5c6: bd38 pop {r3, r4, r5, pc}
801c5c8: 20000070 .word 0x20000070
801c5cc: abcd330e .word 0xabcd330e
801c5d0: e66d1234 .word 0xe66d1234
801c5d4: 0005deec .word 0x0005deec
801c5d8: 5851f42d .word 0x5851f42d
801c5dc: 4c957f2d .word 0x4c957f2d
0801c5e0 <siprintf>:
801c5e0: b40e push {r1, r2, r3}
801c5e2: b500 push {lr}
801c5e4: b09c sub sp, #112 ; 0x70
801c5e6: ab1d add r3, sp, #116 ; 0x74
801c5e8: 9002 str r0, [sp, #8]
801c5ea: 9006 str r0, [sp, #24]
801c5ec: f06f 4100 mvn.w r1, #2147483648 ; 0x80000000
801c5f0: 4809 ldr r0, [pc, #36] ; (801c618 <siprintf+0x38>)
801c5f2: 9107 str r1, [sp, #28]
801c5f4: 9104 str r1, [sp, #16]
801c5f6: 4909 ldr r1, [pc, #36] ; (801c61c <siprintf+0x3c>)
801c5f8: f853 2b04 ldr.w r2, [r3], #4
801c5fc: 9105 str r1, [sp, #20]
801c5fe: 6800 ldr r0, [r0, #0]
801c600: 9301 str r3, [sp, #4]
801c602: a902 add r1, sp, #8
801c604: f000 f9e0 bl 801c9c8 <_svfiprintf_r>
801c608: 9b02 ldr r3, [sp, #8]
801c60a: 2200 movs r2, #0
801c60c: 701a strb r2, [r3, #0]
801c60e: b01c add sp, #112 ; 0x70
801c610: f85d eb04 ldr.w lr, [sp], #4
801c614: b003 add sp, #12
801c616: 4770 bx lr
801c618: 20000070 .word 0x20000070
801c61c: ffff0208 .word 0xffff0208
0801c620 <std>:
801c620: 2300 movs r3, #0
801c622: b510 push {r4, lr}
801c624: 4604 mov r4, r0
801c626: e9c0 3300 strd r3, r3, [r0]
801c62a: 6083 str r3, [r0, #8]
801c62c: 8181 strh r1, [r0, #12]
801c62e: 6643 str r3, [r0, #100] ; 0x64
801c630: 81c2 strh r2, [r0, #14]
801c632: e9c0 3304 strd r3, r3, [r0, #16]
801c636: 6183 str r3, [r0, #24]
801c638: 4619 mov r1, r3
801c63a: 2208 movs r2, #8
801c63c: 305c adds r0, #92 ; 0x5c
801c63e: f7ff ff7a bl 801c536 <memset>
801c642: 4b05 ldr r3, [pc, #20] ; (801c658 <std+0x38>)
801c644: 6263 str r3, [r4, #36] ; 0x24
801c646: 4b05 ldr r3, [pc, #20] ; (801c65c <std+0x3c>)
801c648: 62a3 str r3, [r4, #40] ; 0x28
801c64a: 4b05 ldr r3, [pc, #20] ; (801c660 <std+0x40>)
801c64c: 62e3 str r3, [r4, #44] ; 0x2c
801c64e: 4b05 ldr r3, [pc, #20] ; (801c664 <std+0x44>)
801c650: 6224 str r4, [r4, #32]
801c652: 6323 str r3, [r4, #48] ; 0x30
801c654: bd10 pop {r4, pc}
801c656: bf00 nop
801c658: 0801d169 .word 0x0801d169
801c65c: 0801d18b .word 0x0801d18b
801c660: 0801d1c3 .word 0x0801d1c3
801c664: 0801d1e7 .word 0x0801d1e7
0801c668 <_cleanup_r>:
801c668: 4901 ldr r1, [pc, #4] ; (801c670 <_cleanup_r+0x8>)
801c66a: f000 b885 b.w 801c778 <_fwalk_reent>
801c66e: bf00 nop
801c670: 0801d4c1 .word 0x0801d4c1
0801c674 <__sfmoreglue>:
801c674: b570 push {r4, r5, r6, lr}
801c676: 1e4a subs r2, r1, #1
801c678: 2568 movs r5, #104 ; 0x68
801c67a: 4355 muls r5, r2
801c67c: 460e mov r6, r1
801c67e: f105 0174 add.w r1, r5, #116 ; 0x74
801c682: f000 f8ed bl 801c860 <_malloc_r>
801c686: 4604 mov r4, r0
801c688: b140 cbz r0, 801c69c <__sfmoreglue+0x28>
801c68a: 2100 movs r1, #0
801c68c: e9c0 1600 strd r1, r6, [r0]
801c690: 300c adds r0, #12
801c692: 60a0 str r0, [r4, #8]
801c694: f105 0268 add.w r2, r5, #104 ; 0x68
801c698: f7ff ff4d bl 801c536 <memset>
801c69c: 4620 mov r0, r4
801c69e: bd70 pop {r4, r5, r6, pc}
0801c6a0 <__sinit>:
801c6a0: 6983 ldr r3, [r0, #24]
801c6a2: b510 push {r4, lr}
801c6a4: 4604 mov r4, r0
801c6a6: bb33 cbnz r3, 801c6f6 <__sinit+0x56>
801c6a8: e9c0 3312 strd r3, r3, [r0, #72] ; 0x48
801c6ac: 6503 str r3, [r0, #80] ; 0x50
801c6ae: 4b12 ldr r3, [pc, #72] ; (801c6f8 <__sinit+0x58>)
801c6b0: 4a12 ldr r2, [pc, #72] ; (801c6fc <__sinit+0x5c>)
801c6b2: 681b ldr r3, [r3, #0]
801c6b4: 6282 str r2, [r0, #40] ; 0x28
801c6b6: 4298 cmp r0, r3
801c6b8: bf04 itt eq
801c6ba: 2301 moveq r3, #1
801c6bc: 6183 streq r3, [r0, #24]
801c6be: f000 f81f bl 801c700 <__sfp>
801c6c2: 6060 str r0, [r4, #4]
801c6c4: 4620 mov r0, r4
801c6c6: f000 f81b bl 801c700 <__sfp>
801c6ca: 60a0 str r0, [r4, #8]
801c6cc: 4620 mov r0, r4
801c6ce: f000 f817 bl 801c700 <__sfp>
801c6d2: 2200 movs r2, #0
801c6d4: 60e0 str r0, [r4, #12]
801c6d6: 2104 movs r1, #4
801c6d8: 6860 ldr r0, [r4, #4]
801c6da: f7ff ffa1 bl 801c620 <std>
801c6de: 2201 movs r2, #1
801c6e0: 2109 movs r1, #9
801c6e2: 68a0 ldr r0, [r4, #8]
801c6e4: f7ff ff9c bl 801c620 <std>
801c6e8: 2202 movs r2, #2
801c6ea: 2112 movs r1, #18
801c6ec: 68e0 ldr r0, [r4, #12]
801c6ee: f7ff ff97 bl 801c620 <std>
801c6f2: 2301 movs r3, #1
801c6f4: 61a3 str r3, [r4, #24]
801c6f6: bd10 pop {r4, pc}
801c6f8: 08022708 .word 0x08022708
801c6fc: 0801c669 .word 0x0801c669
0801c700 <__sfp>:
801c700: b5f8 push {r3, r4, r5, r6, r7, lr}
801c702: 4b1b ldr r3, [pc, #108] ; (801c770 <__sfp+0x70>)
801c704: 681e ldr r6, [r3, #0]
801c706: 69b3 ldr r3, [r6, #24]
801c708: 4607 mov r7, r0
801c70a: b913 cbnz r3, 801c712 <__sfp+0x12>
801c70c: 4630 mov r0, r6
801c70e: f7ff ffc7 bl 801c6a0 <__sinit>
801c712: 3648 adds r6, #72 ; 0x48
801c714: e9d6 3401 ldrd r3, r4, [r6, #4]
801c718: 3b01 subs r3, #1
801c71a: d503 bpl.n 801c724 <__sfp+0x24>
801c71c: 6833 ldr r3, [r6, #0]
801c71e: b133 cbz r3, 801c72e <__sfp+0x2e>
801c720: 6836 ldr r6, [r6, #0]
801c722: e7f7 b.n 801c714 <__sfp+0x14>
801c724: f9b4 500c ldrsh.w r5, [r4, #12]
801c728: b16d cbz r5, 801c746 <__sfp+0x46>
801c72a: 3468 adds r4, #104 ; 0x68
801c72c: e7f4 b.n 801c718 <__sfp+0x18>
801c72e: 2104 movs r1, #4
801c730: 4638 mov r0, r7
801c732: f7ff ff9f bl 801c674 <__sfmoreglue>
801c736: 6030 str r0, [r6, #0]
801c738: 2800 cmp r0, #0
801c73a: d1f1 bne.n 801c720 <__sfp+0x20>
801c73c: 230c movs r3, #12
801c73e: 603b str r3, [r7, #0]
801c740: 4604 mov r4, r0
801c742: 4620 mov r0, r4
801c744: bdf8 pop {r3, r4, r5, r6, r7, pc}
801c746: 4b0b ldr r3, [pc, #44] ; (801c774 <__sfp+0x74>)
801c748: 6665 str r5, [r4, #100] ; 0x64
801c74a: e9c4 5500 strd r5, r5, [r4]
801c74e: 60a5 str r5, [r4, #8]
801c750: e9c4 3503 strd r3, r5, [r4, #12]
801c754: e9c4 5505 strd r5, r5, [r4, #20]
801c758: 2208 movs r2, #8
801c75a: 4629 mov r1, r5
801c75c: f104 005c add.w r0, r4, #92 ; 0x5c
801c760: f7ff fee9 bl 801c536 <memset>
801c764: e9c4 550d strd r5, r5, [r4, #52] ; 0x34
801c768: e9c4 5512 strd r5, r5, [r4, #72] ; 0x48
801c76c: e7e9 b.n 801c742 <__sfp+0x42>
801c76e: bf00 nop
801c770: 08022708 .word 0x08022708
801c774: ffff0001 .word 0xffff0001
0801c778 <_fwalk_reent>:
801c778: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
801c77c: 4680 mov r8, r0
801c77e: 4689 mov r9, r1
801c780: f100 0448 add.w r4, r0, #72 ; 0x48
801c784: 2600 movs r6, #0
801c786: b914 cbnz r4, 801c78e <_fwalk_reent+0x16>
801c788: 4630 mov r0, r6
801c78a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
801c78e: e9d4 7501 ldrd r7, r5, [r4, #4]
801c792: 3f01 subs r7, #1
801c794: d501 bpl.n 801c79a <_fwalk_reent+0x22>
801c796: 6824 ldr r4, [r4, #0]
801c798: e7f5 b.n 801c786 <_fwalk_reent+0xe>
801c79a: 89ab ldrh r3, [r5, #12]
801c79c: 2b01 cmp r3, #1
801c79e: d907 bls.n 801c7b0 <_fwalk_reent+0x38>
801c7a0: f9b5 300e ldrsh.w r3, [r5, #14]
801c7a4: 3301 adds r3, #1
801c7a6: d003 beq.n 801c7b0 <_fwalk_reent+0x38>
801c7a8: 4629 mov r1, r5
801c7aa: 4640 mov r0, r8
801c7ac: 47c8 blx r9
801c7ae: 4306 orrs r6, r0
801c7b0: 3568 adds r5, #104 ; 0x68
801c7b2: e7ee b.n 801c792 <_fwalk_reent+0x1a>
0801c7b4 <malloc>:
801c7b4: 4b02 ldr r3, [pc, #8] ; (801c7c0 <malloc+0xc>)
801c7b6: 4601 mov r1, r0
801c7b8: 6818 ldr r0, [r3, #0]
801c7ba: f000 b851 b.w 801c860 <_malloc_r>
801c7be: bf00 nop
801c7c0: 20000070 .word 0x20000070
0801c7c4 <_free_r>:
801c7c4: b538 push {r3, r4, r5, lr}
801c7c6: 4605 mov r5, r0
801c7c8: 2900 cmp r1, #0
801c7ca: d045 beq.n 801c858 <_free_r+0x94>
801c7cc: f851 3c04 ldr.w r3, [r1, #-4]
801c7d0: 1f0c subs r4, r1, #4
801c7d2: 2b00 cmp r3, #0
801c7d4: bfb8 it lt
801c7d6: 18e4 addlt r4, r4, r3
801c7d8: f000 ff12 bl 801d600 <__malloc_lock>
801c7dc: 4a1f ldr r2, [pc, #124] ; (801c85c <_free_r+0x98>)
801c7de: 6813 ldr r3, [r2, #0]
801c7e0: 4610 mov r0, r2
801c7e2: b933 cbnz r3, 801c7f2 <_free_r+0x2e>
801c7e4: 6063 str r3, [r4, #4]
801c7e6: 6014 str r4, [r2, #0]
801c7e8: 4628 mov r0, r5
801c7ea: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
801c7ee: f000 bf08 b.w 801d602 <__malloc_unlock>
801c7f2: 42a3 cmp r3, r4
801c7f4: d90c bls.n 801c810 <_free_r+0x4c>
801c7f6: 6821 ldr r1, [r4, #0]
801c7f8: 1862 adds r2, r4, r1
801c7fa: 4293 cmp r3, r2
801c7fc: bf04 itt eq
801c7fe: 681a ldreq r2, [r3, #0]
801c800: 685b ldreq r3, [r3, #4]
801c802: 6063 str r3, [r4, #4]
801c804: bf04 itt eq
801c806: 1852 addeq r2, r2, r1
801c808: 6022 streq r2, [r4, #0]
801c80a: 6004 str r4, [r0, #0]
801c80c: e7ec b.n 801c7e8 <_free_r+0x24>
801c80e: 4613 mov r3, r2
801c810: 685a ldr r2, [r3, #4]
801c812: b10a cbz r2, 801c818 <_free_r+0x54>
801c814: 42a2 cmp r2, r4
801c816: d9fa bls.n 801c80e <_free_r+0x4a>
801c818: 6819 ldr r1, [r3, #0]
801c81a: 1858 adds r0, r3, r1
801c81c: 42a0 cmp r0, r4
801c81e: d10b bne.n 801c838 <_free_r+0x74>
801c820: 6820 ldr r0, [r4, #0]
801c822: 4401 add r1, r0
801c824: 1858 adds r0, r3, r1
801c826: 4282 cmp r2, r0
801c828: 6019 str r1, [r3, #0]
801c82a: d1dd bne.n 801c7e8 <_free_r+0x24>
801c82c: 6810 ldr r0, [r2, #0]
801c82e: 6852 ldr r2, [r2, #4]
801c830: 605a str r2, [r3, #4]
801c832: 4401 add r1, r0
801c834: 6019 str r1, [r3, #0]
801c836: e7d7 b.n 801c7e8 <_free_r+0x24>
801c838: d902 bls.n 801c840 <_free_r+0x7c>
801c83a: 230c movs r3, #12
801c83c: 602b str r3, [r5, #0]
801c83e: e7d3 b.n 801c7e8 <_free_r+0x24>
801c840: 6820 ldr r0, [r4, #0]
801c842: 1821 adds r1, r4, r0
801c844: 428a cmp r2, r1
801c846: bf04 itt eq
801c848: 6811 ldreq r1, [r2, #0]
801c84a: 6852 ldreq r2, [r2, #4]
801c84c: 6062 str r2, [r4, #4]
801c84e: bf04 itt eq
801c850: 1809 addeq r1, r1, r0
801c852: 6021 streq r1, [r4, #0]
801c854: 605c str r4, [r3, #4]
801c856: e7c7 b.n 801c7e8 <_free_r+0x24>
801c858: bd38 pop {r3, r4, r5, pc}
801c85a: bf00 nop
801c85c: 20008860 .word 0x20008860
0801c860 <_malloc_r>:
801c860: b570 push {r4, r5, r6, lr}
801c862: 1ccd adds r5, r1, #3
801c864: f025 0503 bic.w r5, r5, #3
801c868: 3508 adds r5, #8
801c86a: 2d0c cmp r5, #12
801c86c: bf38 it cc
801c86e: 250c movcc r5, #12
801c870: 2d00 cmp r5, #0
801c872: 4606 mov r6, r0
801c874: db01 blt.n 801c87a <_malloc_r+0x1a>
801c876: 42a9 cmp r1, r5
801c878: d903 bls.n 801c882 <_malloc_r+0x22>
801c87a: 230c movs r3, #12
801c87c: 6033 str r3, [r6, #0]
801c87e: 2000 movs r0, #0
801c880: bd70 pop {r4, r5, r6, pc}
801c882: f000 febd bl 801d600 <__malloc_lock>
801c886: 4a21 ldr r2, [pc, #132] ; (801c90c <_malloc_r+0xac>)
801c888: 6814 ldr r4, [r2, #0]
801c88a: 4621 mov r1, r4
801c88c: b991 cbnz r1, 801c8b4 <_malloc_r+0x54>
801c88e: 4c20 ldr r4, [pc, #128] ; (801c910 <_malloc_r+0xb0>)
801c890: 6823 ldr r3, [r4, #0]
801c892: b91b cbnz r3, 801c89c <_malloc_r+0x3c>
801c894: 4630 mov r0, r6
801c896: f000 fc57 bl 801d148 <_sbrk_r>
801c89a: 6020 str r0, [r4, #0]
801c89c: 4629 mov r1, r5
801c89e: 4630 mov r0, r6
801c8a0: f000 fc52 bl 801d148 <_sbrk_r>
801c8a4: 1c43 adds r3, r0, #1
801c8a6: d124 bne.n 801c8f2 <_malloc_r+0x92>
801c8a8: 230c movs r3, #12
801c8aa: 6033 str r3, [r6, #0]
801c8ac: 4630 mov r0, r6
801c8ae: f000 fea8 bl 801d602 <__malloc_unlock>
801c8b2: e7e4 b.n 801c87e <_malloc_r+0x1e>
801c8b4: 680b ldr r3, [r1, #0]
801c8b6: 1b5b subs r3, r3, r5
801c8b8: d418 bmi.n 801c8ec <_malloc_r+0x8c>
801c8ba: 2b0b cmp r3, #11
801c8bc: d90f bls.n 801c8de <_malloc_r+0x7e>
801c8be: 600b str r3, [r1, #0]
801c8c0: 50cd str r5, [r1, r3]
801c8c2: 18cc adds r4, r1, r3
801c8c4: 4630 mov r0, r6
801c8c6: f000 fe9c bl 801d602 <__malloc_unlock>
801c8ca: f104 000b add.w r0, r4, #11
801c8ce: 1d23 adds r3, r4, #4
801c8d0: f020 0007 bic.w r0, r0, #7
801c8d4: 1ac3 subs r3, r0, r3
801c8d6: d0d3 beq.n 801c880 <_malloc_r+0x20>
801c8d8: 425a negs r2, r3
801c8da: 50e2 str r2, [r4, r3]
801c8dc: e7d0 b.n 801c880 <_malloc_r+0x20>
801c8de: 428c cmp r4, r1
801c8e0: 684b ldr r3, [r1, #4]
801c8e2: bf16 itet ne
801c8e4: 6063 strne r3, [r4, #4]
801c8e6: 6013 streq r3, [r2, #0]
801c8e8: 460c movne r4, r1
801c8ea: e7eb b.n 801c8c4 <_malloc_r+0x64>
801c8ec: 460c mov r4, r1
801c8ee: 6849 ldr r1, [r1, #4]
801c8f0: e7cc b.n 801c88c <_malloc_r+0x2c>
801c8f2: 1cc4 adds r4, r0, #3
801c8f4: f024 0403 bic.w r4, r4, #3
801c8f8: 42a0 cmp r0, r4
801c8fa: d005 beq.n 801c908 <_malloc_r+0xa8>
801c8fc: 1a21 subs r1, r4, r0
801c8fe: 4630 mov r0, r6
801c900: f000 fc22 bl 801d148 <_sbrk_r>
801c904: 3001 adds r0, #1
801c906: d0cf beq.n 801c8a8 <_malloc_r+0x48>
801c908: 6025 str r5, [r4, #0]
801c90a: e7db b.n 801c8c4 <_malloc_r+0x64>
801c90c: 20008860 .word 0x20008860
801c910: 20008864 .word 0x20008864
0801c914 <__ssputs_r>:
801c914: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
801c918: 688e ldr r6, [r1, #8]
801c91a: 429e cmp r6, r3
801c91c: 4682 mov sl, r0
801c91e: 460c mov r4, r1
801c920: 4690 mov r8, r2
801c922: 4699 mov r9, r3
801c924: d837 bhi.n 801c996 <__ssputs_r+0x82>
801c926: 898a ldrh r2, [r1, #12]
801c928: f412 6f90 tst.w r2, #1152 ; 0x480
801c92c: d031 beq.n 801c992 <__ssputs_r+0x7e>
801c92e: 6825 ldr r5, [r4, #0]
801c930: 6909 ldr r1, [r1, #16]
801c932: 1a6f subs r7, r5, r1
801c934: 6965 ldr r5, [r4, #20]
801c936: 2302 movs r3, #2
801c938: eb05 0545 add.w r5, r5, r5, lsl #1
801c93c: fb95 f5f3 sdiv r5, r5, r3
801c940: f109 0301 add.w r3, r9, #1
801c944: 443b add r3, r7
801c946: 429d cmp r5, r3
801c948: bf38 it cc
801c94a: 461d movcc r5, r3
801c94c: 0553 lsls r3, r2, #21
801c94e: d530 bpl.n 801c9b2 <__ssputs_r+0x9e>
801c950: 4629 mov r1, r5
801c952: f7ff ff85 bl 801c860 <_malloc_r>
801c956: 4606 mov r6, r0
801c958: b950 cbnz r0, 801c970 <__ssputs_r+0x5c>
801c95a: 230c movs r3, #12
801c95c: f8ca 3000 str.w r3, [sl]
801c960: 89a3 ldrh r3, [r4, #12]
801c962: f043 0340 orr.w r3, r3, #64 ; 0x40
801c966: 81a3 strh r3, [r4, #12]
801c968: f04f 30ff mov.w r0, #4294967295
801c96c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
801c970: 463a mov r2, r7
801c972: 6921 ldr r1, [r4, #16]
801c974: f7ff fdbb bl 801c4ee <memcpy>
801c978: 89a3 ldrh r3, [r4, #12]
801c97a: f423 6390 bic.w r3, r3, #1152 ; 0x480
801c97e: f043 0380 orr.w r3, r3, #128 ; 0x80
801c982: 81a3 strh r3, [r4, #12]
801c984: 6126 str r6, [r4, #16]
801c986: 6165 str r5, [r4, #20]
801c988: 443e add r6, r7
801c98a: 1bed subs r5, r5, r7
801c98c: 6026 str r6, [r4, #0]
801c98e: 60a5 str r5, [r4, #8]
801c990: 464e mov r6, r9
801c992: 454e cmp r6, r9
801c994: d900 bls.n 801c998 <__ssputs_r+0x84>
801c996: 464e mov r6, r9
801c998: 4632 mov r2, r6
801c99a: 4641 mov r1, r8
801c99c: 6820 ldr r0, [r4, #0]
801c99e: f7ff fdb1 bl 801c504 <memmove>
801c9a2: 68a3 ldr r3, [r4, #8]
801c9a4: 1b9b subs r3, r3, r6
801c9a6: 60a3 str r3, [r4, #8]
801c9a8: 6823 ldr r3, [r4, #0]
801c9aa: 441e add r6, r3
801c9ac: 6026 str r6, [r4, #0]
801c9ae: 2000 movs r0, #0
801c9b0: e7dc b.n 801c96c <__ssputs_r+0x58>
801c9b2: 462a mov r2, r5
801c9b4: f000 fe26 bl 801d604 <_realloc_r>
801c9b8: 4606 mov r6, r0
801c9ba: 2800 cmp r0, #0
801c9bc: d1e2 bne.n 801c984 <__ssputs_r+0x70>
801c9be: 6921 ldr r1, [r4, #16]
801c9c0: 4650 mov r0, sl
801c9c2: f7ff feff bl 801c7c4 <_free_r>
801c9c6: e7c8 b.n 801c95a <__ssputs_r+0x46>
0801c9c8 <_svfiprintf_r>:
801c9c8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
801c9cc: 461d mov r5, r3
801c9ce: 898b ldrh r3, [r1, #12]
801c9d0: 061f lsls r7, r3, #24
801c9d2: b09d sub sp, #116 ; 0x74
801c9d4: 4680 mov r8, r0
801c9d6: 460c mov r4, r1
801c9d8: 4616 mov r6, r2
801c9da: d50f bpl.n 801c9fc <_svfiprintf_r+0x34>
801c9dc: 690b ldr r3, [r1, #16]
801c9de: b96b cbnz r3, 801c9fc <_svfiprintf_r+0x34>
801c9e0: 2140 movs r1, #64 ; 0x40
801c9e2: f7ff ff3d bl 801c860 <_malloc_r>
801c9e6: 6020 str r0, [r4, #0]
801c9e8: 6120 str r0, [r4, #16]
801c9ea: b928 cbnz r0, 801c9f8 <_svfiprintf_r+0x30>
801c9ec: 230c movs r3, #12
801c9ee: f8c8 3000 str.w r3, [r8]
801c9f2: f04f 30ff mov.w r0, #4294967295
801c9f6: e0c8 b.n 801cb8a <_svfiprintf_r+0x1c2>
801c9f8: 2340 movs r3, #64 ; 0x40
801c9fa: 6163 str r3, [r4, #20]
801c9fc: 2300 movs r3, #0
801c9fe: 9309 str r3, [sp, #36] ; 0x24
801ca00: 2320 movs r3, #32
801ca02: f88d 3029 strb.w r3, [sp, #41] ; 0x29
801ca06: 2330 movs r3, #48 ; 0x30
801ca08: f88d 302a strb.w r3, [sp, #42] ; 0x2a
801ca0c: 9503 str r5, [sp, #12]
801ca0e: f04f 0b01 mov.w fp, #1
801ca12: 4637 mov r7, r6
801ca14: 463d mov r5, r7
801ca16: f815 3b01 ldrb.w r3, [r5], #1
801ca1a: b10b cbz r3, 801ca20 <_svfiprintf_r+0x58>
801ca1c: 2b25 cmp r3, #37 ; 0x25
801ca1e: d13e bne.n 801ca9e <_svfiprintf_r+0xd6>
801ca20: ebb7 0a06 subs.w sl, r7, r6
801ca24: d00b beq.n 801ca3e <_svfiprintf_r+0x76>
801ca26: 4653 mov r3, sl
801ca28: 4632 mov r2, r6
801ca2a: 4621 mov r1, r4
801ca2c: 4640 mov r0, r8
801ca2e: f7ff ff71 bl 801c914 <__ssputs_r>
801ca32: 3001 adds r0, #1
801ca34: f000 80a4 beq.w 801cb80 <_svfiprintf_r+0x1b8>
801ca38: 9b09 ldr r3, [sp, #36] ; 0x24
801ca3a: 4453 add r3, sl
801ca3c: 9309 str r3, [sp, #36] ; 0x24
801ca3e: 783b ldrb r3, [r7, #0]
801ca40: 2b00 cmp r3, #0
801ca42: f000 809d beq.w 801cb80 <_svfiprintf_r+0x1b8>
801ca46: 2300 movs r3, #0
801ca48: f04f 32ff mov.w r2, #4294967295
801ca4c: e9cd 2305 strd r2, r3, [sp, #20]
801ca50: 9304 str r3, [sp, #16]
801ca52: 9307 str r3, [sp, #28]
801ca54: f88d 3053 strb.w r3, [sp, #83] ; 0x53
801ca58: 931a str r3, [sp, #104] ; 0x68
801ca5a: 462f mov r7, r5
801ca5c: 2205 movs r2, #5
801ca5e: f817 1b01 ldrb.w r1, [r7], #1
801ca62: 4850 ldr r0, [pc, #320] ; (801cba4 <_svfiprintf_r+0x1dc>)
801ca64: f7e3 fbd4 bl 8000210 <memchr>
801ca68: 9b04 ldr r3, [sp, #16]
801ca6a: b9d0 cbnz r0, 801caa2 <_svfiprintf_r+0xda>
801ca6c: 06d9 lsls r1, r3, #27
801ca6e: bf44 itt mi
801ca70: 2220 movmi r2, #32
801ca72: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
801ca76: 071a lsls r2, r3, #28
801ca78: bf44 itt mi
801ca7a: 222b movmi r2, #43 ; 0x2b
801ca7c: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
801ca80: 782a ldrb r2, [r5, #0]
801ca82: 2a2a cmp r2, #42 ; 0x2a
801ca84: d015 beq.n 801cab2 <_svfiprintf_r+0xea>
801ca86: 9a07 ldr r2, [sp, #28]
801ca88: 462f mov r7, r5
801ca8a: 2000 movs r0, #0
801ca8c: 250a movs r5, #10
801ca8e: 4639 mov r1, r7
801ca90: f811 3b01 ldrb.w r3, [r1], #1
801ca94: 3b30 subs r3, #48 ; 0x30
801ca96: 2b09 cmp r3, #9
801ca98: d94d bls.n 801cb36 <_svfiprintf_r+0x16e>
801ca9a: b1b8 cbz r0, 801cacc <_svfiprintf_r+0x104>
801ca9c: e00f b.n 801cabe <_svfiprintf_r+0xf6>
801ca9e: 462f mov r7, r5
801caa0: e7b8 b.n 801ca14 <_svfiprintf_r+0x4c>
801caa2: 4a40 ldr r2, [pc, #256] ; (801cba4 <_svfiprintf_r+0x1dc>)
801caa4: 1a80 subs r0, r0, r2
801caa6: fa0b f000 lsl.w r0, fp, r0
801caaa: 4318 orrs r0, r3
801caac: 9004 str r0, [sp, #16]
801caae: 463d mov r5, r7
801cab0: e7d3 b.n 801ca5a <_svfiprintf_r+0x92>
801cab2: 9a03 ldr r2, [sp, #12]
801cab4: 1d11 adds r1, r2, #4
801cab6: 6812 ldr r2, [r2, #0]
801cab8: 9103 str r1, [sp, #12]
801caba: 2a00 cmp r2, #0
801cabc: db01 blt.n 801cac2 <_svfiprintf_r+0xfa>
801cabe: 9207 str r2, [sp, #28]
801cac0: e004 b.n 801cacc <_svfiprintf_r+0x104>
801cac2: 4252 negs r2, r2
801cac4: f043 0302 orr.w r3, r3, #2
801cac8: 9207 str r2, [sp, #28]
801caca: 9304 str r3, [sp, #16]
801cacc: 783b ldrb r3, [r7, #0]
801cace: 2b2e cmp r3, #46 ; 0x2e
801cad0: d10c bne.n 801caec <_svfiprintf_r+0x124>
801cad2: 787b ldrb r3, [r7, #1]
801cad4: 2b2a cmp r3, #42 ; 0x2a
801cad6: d133 bne.n 801cb40 <_svfiprintf_r+0x178>
801cad8: 9b03 ldr r3, [sp, #12]
801cada: 1d1a adds r2, r3, #4
801cadc: 681b ldr r3, [r3, #0]
801cade: 9203 str r2, [sp, #12]
801cae0: 2b00 cmp r3, #0
801cae2: bfb8 it lt
801cae4: f04f 33ff movlt.w r3, #4294967295
801cae8: 3702 adds r7, #2
801caea: 9305 str r3, [sp, #20]
801caec: 4d2e ldr r5, [pc, #184] ; (801cba8 <_svfiprintf_r+0x1e0>)
801caee: 7839 ldrb r1, [r7, #0]
801caf0: 2203 movs r2, #3
801caf2: 4628 mov r0, r5
801caf4: f7e3 fb8c bl 8000210 <memchr>
801caf8: b138 cbz r0, 801cb0a <_svfiprintf_r+0x142>
801cafa: 2340 movs r3, #64 ; 0x40
801cafc: 1b40 subs r0, r0, r5
801cafe: fa03 f000 lsl.w r0, r3, r0
801cb02: 9b04 ldr r3, [sp, #16]
801cb04: 4303 orrs r3, r0
801cb06: 3701 adds r7, #1
801cb08: 9304 str r3, [sp, #16]
801cb0a: 7839 ldrb r1, [r7, #0]
801cb0c: 4827 ldr r0, [pc, #156] ; (801cbac <_svfiprintf_r+0x1e4>)
801cb0e: f88d 1028 strb.w r1, [sp, #40] ; 0x28
801cb12: 2206 movs r2, #6
801cb14: 1c7e adds r6, r7, #1
801cb16: f7e3 fb7b bl 8000210 <memchr>
801cb1a: 2800 cmp r0, #0
801cb1c: d038 beq.n 801cb90 <_svfiprintf_r+0x1c8>
801cb1e: 4b24 ldr r3, [pc, #144] ; (801cbb0 <_svfiprintf_r+0x1e8>)
801cb20: bb13 cbnz r3, 801cb68 <_svfiprintf_r+0x1a0>
801cb22: 9b03 ldr r3, [sp, #12]
801cb24: 3307 adds r3, #7
801cb26: f023 0307 bic.w r3, r3, #7
801cb2a: 3308 adds r3, #8
801cb2c: 9303 str r3, [sp, #12]
801cb2e: 9b09 ldr r3, [sp, #36] ; 0x24
801cb30: 444b add r3, r9
801cb32: 9309 str r3, [sp, #36] ; 0x24
801cb34: e76d b.n 801ca12 <_svfiprintf_r+0x4a>
801cb36: fb05 3202 mla r2, r5, r2, r3
801cb3a: 2001 movs r0, #1
801cb3c: 460f mov r7, r1
801cb3e: e7a6 b.n 801ca8e <_svfiprintf_r+0xc6>
801cb40: 2300 movs r3, #0
801cb42: 3701 adds r7, #1
801cb44: 9305 str r3, [sp, #20]
801cb46: 4619 mov r1, r3
801cb48: 250a movs r5, #10
801cb4a: 4638 mov r0, r7
801cb4c: f810 2b01 ldrb.w r2, [r0], #1
801cb50: 3a30 subs r2, #48 ; 0x30
801cb52: 2a09 cmp r2, #9
801cb54: d903 bls.n 801cb5e <_svfiprintf_r+0x196>
801cb56: 2b00 cmp r3, #0
801cb58: d0c8 beq.n 801caec <_svfiprintf_r+0x124>
801cb5a: 9105 str r1, [sp, #20]
801cb5c: e7c6 b.n 801caec <_svfiprintf_r+0x124>
801cb5e: fb05 2101 mla r1, r5, r1, r2
801cb62: 2301 movs r3, #1
801cb64: 4607 mov r7, r0
801cb66: e7f0 b.n 801cb4a <_svfiprintf_r+0x182>
801cb68: ab03 add r3, sp, #12
801cb6a: 9300 str r3, [sp, #0]
801cb6c: 4622 mov r2, r4
801cb6e: 4b11 ldr r3, [pc, #68] ; (801cbb4 <_svfiprintf_r+0x1ec>)
801cb70: a904 add r1, sp, #16
801cb72: 4640 mov r0, r8
801cb74: f3af 8000 nop.w
801cb78: f1b0 3fff cmp.w r0, #4294967295
801cb7c: 4681 mov r9, r0
801cb7e: d1d6 bne.n 801cb2e <_svfiprintf_r+0x166>
801cb80: 89a3 ldrh r3, [r4, #12]
801cb82: 065b lsls r3, r3, #25
801cb84: f53f af35 bmi.w 801c9f2 <_svfiprintf_r+0x2a>
801cb88: 9809 ldr r0, [sp, #36] ; 0x24
801cb8a: b01d add sp, #116 ; 0x74
801cb8c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
801cb90: ab03 add r3, sp, #12
801cb92: 9300 str r3, [sp, #0]
801cb94: 4622 mov r2, r4
801cb96: 4b07 ldr r3, [pc, #28] ; (801cbb4 <_svfiprintf_r+0x1ec>)
801cb98: a904 add r1, sp, #16
801cb9a: 4640 mov r0, r8
801cb9c: f000 f9c2 bl 801cf24 <_printf_i>
801cba0: e7ea b.n 801cb78 <_svfiprintf_r+0x1b0>
801cba2: bf00 nop
801cba4: 0802276c .word 0x0802276c
801cba8: 08022772 .word 0x08022772
801cbac: 08022776 .word 0x08022776
801cbb0: 00000000 .word 0x00000000
801cbb4: 0801c915 .word 0x0801c915
0801cbb8 <__sfputc_r>:
801cbb8: 6893 ldr r3, [r2, #8]
801cbba: 3b01 subs r3, #1
801cbbc: 2b00 cmp r3, #0
801cbbe: b410 push {r4}
801cbc0: 6093 str r3, [r2, #8]
801cbc2: da08 bge.n 801cbd6 <__sfputc_r+0x1e>
801cbc4: 6994 ldr r4, [r2, #24]
801cbc6: 42a3 cmp r3, r4
801cbc8: db01 blt.n 801cbce <__sfputc_r+0x16>
801cbca: 290a cmp r1, #10
801cbcc: d103 bne.n 801cbd6 <__sfputc_r+0x1e>
801cbce: f85d 4b04 ldr.w r4, [sp], #4
801cbd2: f000 bb0d b.w 801d1f0 <__swbuf_r>
801cbd6: 6813 ldr r3, [r2, #0]
801cbd8: 1c58 adds r0, r3, #1
801cbda: 6010 str r0, [r2, #0]
801cbdc: 7019 strb r1, [r3, #0]
801cbde: 4608 mov r0, r1
801cbe0: f85d 4b04 ldr.w r4, [sp], #4
801cbe4: 4770 bx lr
0801cbe6 <__sfputs_r>:
801cbe6: b5f8 push {r3, r4, r5, r6, r7, lr}
801cbe8: 4606 mov r6, r0
801cbea: 460f mov r7, r1
801cbec: 4614 mov r4, r2
801cbee: 18d5 adds r5, r2, r3
801cbf0: 42ac cmp r4, r5
801cbf2: d101 bne.n 801cbf8 <__sfputs_r+0x12>
801cbf4: 2000 movs r0, #0
801cbf6: e007 b.n 801cc08 <__sfputs_r+0x22>
801cbf8: 463a mov r2, r7
801cbfa: f814 1b01 ldrb.w r1, [r4], #1
801cbfe: 4630 mov r0, r6
801cc00: f7ff ffda bl 801cbb8 <__sfputc_r>
801cc04: 1c43 adds r3, r0, #1
801cc06: d1f3 bne.n 801cbf0 <__sfputs_r+0xa>
801cc08: bdf8 pop {r3, r4, r5, r6, r7, pc}
...
0801cc0c <_vfiprintf_r>:
801cc0c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
801cc10: 460c mov r4, r1
801cc12: b09d sub sp, #116 ; 0x74
801cc14: 4617 mov r7, r2
801cc16: 461d mov r5, r3
801cc18: 4606 mov r6, r0
801cc1a: b118 cbz r0, 801cc24 <_vfiprintf_r+0x18>
801cc1c: 6983 ldr r3, [r0, #24]
801cc1e: b90b cbnz r3, 801cc24 <_vfiprintf_r+0x18>
801cc20: f7ff fd3e bl 801c6a0 <__sinit>
801cc24: 4b7c ldr r3, [pc, #496] ; (801ce18 <_vfiprintf_r+0x20c>)
801cc26: 429c cmp r4, r3
801cc28: d158 bne.n 801ccdc <_vfiprintf_r+0xd0>
801cc2a: 6874 ldr r4, [r6, #4]
801cc2c: 89a3 ldrh r3, [r4, #12]
801cc2e: 0718 lsls r0, r3, #28
801cc30: d55e bpl.n 801ccf0 <_vfiprintf_r+0xe4>
801cc32: 6923 ldr r3, [r4, #16]
801cc34: 2b00 cmp r3, #0
801cc36: d05b beq.n 801ccf0 <_vfiprintf_r+0xe4>
801cc38: 2300 movs r3, #0
801cc3a: 9309 str r3, [sp, #36] ; 0x24
801cc3c: 2320 movs r3, #32
801cc3e: f88d 3029 strb.w r3, [sp, #41] ; 0x29
801cc42: 2330 movs r3, #48 ; 0x30
801cc44: f88d 302a strb.w r3, [sp, #42] ; 0x2a
801cc48: 9503 str r5, [sp, #12]
801cc4a: f04f 0b01 mov.w fp, #1
801cc4e: 46b8 mov r8, r7
801cc50: 4645 mov r5, r8
801cc52: f815 3b01 ldrb.w r3, [r5], #1
801cc56: b10b cbz r3, 801cc5c <_vfiprintf_r+0x50>
801cc58: 2b25 cmp r3, #37 ; 0x25
801cc5a: d154 bne.n 801cd06 <_vfiprintf_r+0xfa>
801cc5c: ebb8 0a07 subs.w sl, r8, r7
801cc60: d00b beq.n 801cc7a <_vfiprintf_r+0x6e>
801cc62: 4653 mov r3, sl
801cc64: 463a mov r2, r7
801cc66: 4621 mov r1, r4
801cc68: 4630 mov r0, r6
801cc6a: f7ff ffbc bl 801cbe6 <__sfputs_r>
801cc6e: 3001 adds r0, #1
801cc70: f000 80c2 beq.w 801cdf8 <_vfiprintf_r+0x1ec>
801cc74: 9b09 ldr r3, [sp, #36] ; 0x24
801cc76: 4453 add r3, sl
801cc78: 9309 str r3, [sp, #36] ; 0x24
801cc7a: f898 3000 ldrb.w r3, [r8]
801cc7e: 2b00 cmp r3, #0
801cc80: f000 80ba beq.w 801cdf8 <_vfiprintf_r+0x1ec>
801cc84: 2300 movs r3, #0
801cc86: f04f 32ff mov.w r2, #4294967295
801cc8a: e9cd 2305 strd r2, r3, [sp, #20]
801cc8e: 9304 str r3, [sp, #16]
801cc90: 9307 str r3, [sp, #28]
801cc92: f88d 3053 strb.w r3, [sp, #83] ; 0x53
801cc96: 931a str r3, [sp, #104] ; 0x68
801cc98: 46a8 mov r8, r5
801cc9a: 2205 movs r2, #5
801cc9c: f818 1b01 ldrb.w r1, [r8], #1
801cca0: 485e ldr r0, [pc, #376] ; (801ce1c <_vfiprintf_r+0x210>)
801cca2: f7e3 fab5 bl 8000210 <memchr>
801cca6: 9b04 ldr r3, [sp, #16]
801cca8: bb78 cbnz r0, 801cd0a <_vfiprintf_r+0xfe>
801ccaa: 06d9 lsls r1, r3, #27
801ccac: bf44 itt mi
801ccae: 2220 movmi r2, #32
801ccb0: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
801ccb4: 071a lsls r2, r3, #28
801ccb6: bf44 itt mi
801ccb8: 222b movmi r2, #43 ; 0x2b
801ccba: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
801ccbe: 782a ldrb r2, [r5, #0]
801ccc0: 2a2a cmp r2, #42 ; 0x2a
801ccc2: d02a beq.n 801cd1a <_vfiprintf_r+0x10e>
801ccc4: 9a07 ldr r2, [sp, #28]
801ccc6: 46a8 mov r8, r5
801ccc8: 2000 movs r0, #0
801ccca: 250a movs r5, #10
801cccc: 4641 mov r1, r8
801ccce: f811 3b01 ldrb.w r3, [r1], #1
801ccd2: 3b30 subs r3, #48 ; 0x30
801ccd4: 2b09 cmp r3, #9
801ccd6: d969 bls.n 801cdac <_vfiprintf_r+0x1a0>
801ccd8: b360 cbz r0, 801cd34 <_vfiprintf_r+0x128>
801ccda: e024 b.n 801cd26 <_vfiprintf_r+0x11a>
801ccdc: 4b50 ldr r3, [pc, #320] ; (801ce20 <_vfiprintf_r+0x214>)
801ccde: 429c cmp r4, r3
801cce0: d101 bne.n 801cce6 <_vfiprintf_r+0xda>
801cce2: 68b4 ldr r4, [r6, #8]
801cce4: e7a2 b.n 801cc2c <_vfiprintf_r+0x20>
801cce6: 4b4f ldr r3, [pc, #316] ; (801ce24 <_vfiprintf_r+0x218>)
801cce8: 429c cmp r4, r3
801ccea: bf08 it eq
801ccec: 68f4 ldreq r4, [r6, #12]
801ccee: e79d b.n 801cc2c <_vfiprintf_r+0x20>
801ccf0: 4621 mov r1, r4
801ccf2: 4630 mov r0, r6
801ccf4: f000 fae0 bl 801d2b8 <__swsetup_r>
801ccf8: 2800 cmp r0, #0
801ccfa: d09d beq.n 801cc38 <_vfiprintf_r+0x2c>
801ccfc: f04f 30ff mov.w r0, #4294967295
801cd00: b01d add sp, #116 ; 0x74
801cd02: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
801cd06: 46a8 mov r8, r5
801cd08: e7a2 b.n 801cc50 <_vfiprintf_r+0x44>
801cd0a: 4a44 ldr r2, [pc, #272] ; (801ce1c <_vfiprintf_r+0x210>)
801cd0c: 1a80 subs r0, r0, r2
801cd0e: fa0b f000 lsl.w r0, fp, r0
801cd12: 4318 orrs r0, r3
801cd14: 9004 str r0, [sp, #16]
801cd16: 4645 mov r5, r8
801cd18: e7be b.n 801cc98 <_vfiprintf_r+0x8c>
801cd1a: 9a03 ldr r2, [sp, #12]
801cd1c: 1d11 adds r1, r2, #4
801cd1e: 6812 ldr r2, [r2, #0]
801cd20: 9103 str r1, [sp, #12]
801cd22: 2a00 cmp r2, #0
801cd24: db01 blt.n 801cd2a <_vfiprintf_r+0x11e>
801cd26: 9207 str r2, [sp, #28]
801cd28: e004 b.n 801cd34 <_vfiprintf_r+0x128>
801cd2a: 4252 negs r2, r2
801cd2c: f043 0302 orr.w r3, r3, #2
801cd30: 9207 str r2, [sp, #28]
801cd32: 9304 str r3, [sp, #16]
801cd34: f898 3000 ldrb.w r3, [r8]
801cd38: 2b2e cmp r3, #46 ; 0x2e
801cd3a: d10e bne.n 801cd5a <_vfiprintf_r+0x14e>
801cd3c: f898 3001 ldrb.w r3, [r8, #1]
801cd40: 2b2a cmp r3, #42 ; 0x2a
801cd42: d138 bne.n 801cdb6 <_vfiprintf_r+0x1aa>
801cd44: 9b03 ldr r3, [sp, #12]
801cd46: 1d1a adds r2, r3, #4
801cd48: 681b ldr r3, [r3, #0]
801cd4a: 9203 str r2, [sp, #12]
801cd4c: 2b00 cmp r3, #0
801cd4e: bfb8 it lt
801cd50: f04f 33ff movlt.w r3, #4294967295
801cd54: f108 0802 add.w r8, r8, #2
801cd58: 9305 str r3, [sp, #20]
801cd5a: 4d33 ldr r5, [pc, #204] ; (801ce28 <_vfiprintf_r+0x21c>)
801cd5c: f898 1000 ldrb.w r1, [r8]
801cd60: 2203 movs r2, #3
801cd62: 4628 mov r0, r5
801cd64: f7e3 fa54 bl 8000210 <memchr>
801cd68: b140 cbz r0, 801cd7c <_vfiprintf_r+0x170>
801cd6a: 2340 movs r3, #64 ; 0x40
801cd6c: 1b40 subs r0, r0, r5
801cd6e: fa03 f000 lsl.w r0, r3, r0
801cd72: 9b04 ldr r3, [sp, #16]
801cd74: 4303 orrs r3, r0
801cd76: f108 0801 add.w r8, r8, #1
801cd7a: 9304 str r3, [sp, #16]
801cd7c: f898 1000 ldrb.w r1, [r8]
801cd80: 482a ldr r0, [pc, #168] ; (801ce2c <_vfiprintf_r+0x220>)
801cd82: f88d 1028 strb.w r1, [sp, #40] ; 0x28
801cd86: 2206 movs r2, #6
801cd88: f108 0701 add.w r7, r8, #1
801cd8c: f7e3 fa40 bl 8000210 <memchr>
801cd90: 2800 cmp r0, #0
801cd92: d037 beq.n 801ce04 <_vfiprintf_r+0x1f8>
801cd94: 4b26 ldr r3, [pc, #152] ; (801ce30 <_vfiprintf_r+0x224>)
801cd96: bb1b cbnz r3, 801cde0 <_vfiprintf_r+0x1d4>
801cd98: 9b03 ldr r3, [sp, #12]
801cd9a: 3307 adds r3, #7
801cd9c: f023 0307 bic.w r3, r3, #7
801cda0: 3308 adds r3, #8
801cda2: 9303 str r3, [sp, #12]
801cda4: 9b09 ldr r3, [sp, #36] ; 0x24
801cda6: 444b add r3, r9
801cda8: 9309 str r3, [sp, #36] ; 0x24
801cdaa: e750 b.n 801cc4e <_vfiprintf_r+0x42>
801cdac: fb05 3202 mla r2, r5, r2, r3
801cdb0: 2001 movs r0, #1
801cdb2: 4688 mov r8, r1
801cdb4: e78a b.n 801cccc <_vfiprintf_r+0xc0>
801cdb6: 2300 movs r3, #0
801cdb8: f108 0801 add.w r8, r8, #1
801cdbc: 9305 str r3, [sp, #20]
801cdbe: 4619 mov r1, r3
801cdc0: 250a movs r5, #10
801cdc2: 4640 mov r0, r8
801cdc4: f810 2b01 ldrb.w r2, [r0], #1
801cdc8: 3a30 subs r2, #48 ; 0x30
801cdca: 2a09 cmp r2, #9
801cdcc: d903 bls.n 801cdd6 <_vfiprintf_r+0x1ca>
801cdce: 2b00 cmp r3, #0
801cdd0: d0c3 beq.n 801cd5a <_vfiprintf_r+0x14e>
801cdd2: 9105 str r1, [sp, #20]
801cdd4: e7c1 b.n 801cd5a <_vfiprintf_r+0x14e>
801cdd6: fb05 2101 mla r1, r5, r1, r2
801cdda: 2301 movs r3, #1
801cddc: 4680 mov r8, r0
801cdde: e7f0 b.n 801cdc2 <_vfiprintf_r+0x1b6>
801cde0: ab03 add r3, sp, #12
801cde2: 9300 str r3, [sp, #0]
801cde4: 4622 mov r2, r4
801cde6: 4b13 ldr r3, [pc, #76] ; (801ce34 <_vfiprintf_r+0x228>)
801cde8: a904 add r1, sp, #16
801cdea: 4630 mov r0, r6
801cdec: f3af 8000 nop.w
801cdf0: f1b0 3fff cmp.w r0, #4294967295
801cdf4: 4681 mov r9, r0
801cdf6: d1d5 bne.n 801cda4 <_vfiprintf_r+0x198>
801cdf8: 89a3 ldrh r3, [r4, #12]
801cdfa: 065b lsls r3, r3, #25
801cdfc: f53f af7e bmi.w 801ccfc <_vfiprintf_r+0xf0>
801ce00: 9809 ldr r0, [sp, #36] ; 0x24
801ce02: e77d b.n 801cd00 <_vfiprintf_r+0xf4>
801ce04: ab03 add r3, sp, #12
801ce06: 9300 str r3, [sp, #0]
801ce08: 4622 mov r2, r4
801ce0a: 4b0a ldr r3, [pc, #40] ; (801ce34 <_vfiprintf_r+0x228>)
801ce0c: a904 add r1, sp, #16
801ce0e: 4630 mov r0, r6
801ce10: f000 f888 bl 801cf24 <_printf_i>
801ce14: e7ec b.n 801cdf0 <_vfiprintf_r+0x1e4>
801ce16: bf00 nop
801ce18: 0802272c .word 0x0802272c
801ce1c: 0802276c .word 0x0802276c
801ce20: 0802274c .word 0x0802274c
801ce24: 0802270c .word 0x0802270c
801ce28: 08022772 .word 0x08022772
801ce2c: 08022776 .word 0x08022776
801ce30: 00000000 .word 0x00000000
801ce34: 0801cbe7 .word 0x0801cbe7
0801ce38 <_printf_common>:
801ce38: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
801ce3c: 4691 mov r9, r2
801ce3e: 461f mov r7, r3
801ce40: 688a ldr r2, [r1, #8]
801ce42: 690b ldr r3, [r1, #16]
801ce44: f8dd 8020 ldr.w r8, [sp, #32]
801ce48: 4293 cmp r3, r2
801ce4a: bfb8 it lt
801ce4c: 4613 movlt r3, r2
801ce4e: f8c9 3000 str.w r3, [r9]
801ce52: f891 2043 ldrb.w r2, [r1, #67] ; 0x43
801ce56: 4606 mov r6, r0
801ce58: 460c mov r4, r1
801ce5a: b112 cbz r2, 801ce62 <_printf_common+0x2a>
801ce5c: 3301 adds r3, #1
801ce5e: f8c9 3000 str.w r3, [r9]
801ce62: 6823 ldr r3, [r4, #0]
801ce64: 0699 lsls r1, r3, #26
801ce66: bf42 ittt mi
801ce68: f8d9 3000 ldrmi.w r3, [r9]
801ce6c: 3302 addmi r3, #2
801ce6e: f8c9 3000 strmi.w r3, [r9]
801ce72: 6825 ldr r5, [r4, #0]
801ce74: f015 0506 ands.w r5, r5, #6
801ce78: d107 bne.n 801ce8a <_printf_common+0x52>
801ce7a: f104 0a19 add.w sl, r4, #25
801ce7e: 68e3 ldr r3, [r4, #12]
801ce80: f8d9 2000 ldr.w r2, [r9]
801ce84: 1a9b subs r3, r3, r2
801ce86: 42ab cmp r3, r5
801ce88: dc28 bgt.n 801cedc <_printf_common+0xa4>
801ce8a: f894 3043 ldrb.w r3, [r4, #67] ; 0x43
801ce8e: 6822 ldr r2, [r4, #0]
801ce90: 3300 adds r3, #0
801ce92: bf18 it ne
801ce94: 2301 movne r3, #1
801ce96: 0692 lsls r2, r2, #26
801ce98: d42d bmi.n 801cef6 <_printf_common+0xbe>
801ce9a: f104 0243 add.w r2, r4, #67 ; 0x43
801ce9e: 4639 mov r1, r7
801cea0: 4630 mov r0, r6
801cea2: 47c0 blx r8
801cea4: 3001 adds r0, #1
801cea6: d020 beq.n 801ceea <_printf_common+0xb2>
801cea8: 6823 ldr r3, [r4, #0]
801ceaa: 68e5 ldr r5, [r4, #12]
801ceac: f8d9 2000 ldr.w r2, [r9]
801ceb0: f003 0306 and.w r3, r3, #6
801ceb4: 2b04 cmp r3, #4
801ceb6: bf08 it eq
801ceb8: 1aad subeq r5, r5, r2
801ceba: 68a3 ldr r3, [r4, #8]
801cebc: 6922 ldr r2, [r4, #16]
801cebe: bf0c ite eq
801cec0: ea25 75e5 biceq.w r5, r5, r5, asr #31
801cec4: 2500 movne r5, #0
801cec6: 4293 cmp r3, r2
801cec8: bfc4 itt gt
801ceca: 1a9b subgt r3, r3, r2
801cecc: 18ed addgt r5, r5, r3
801cece: f04f 0900 mov.w r9, #0
801ced2: 341a adds r4, #26
801ced4: 454d cmp r5, r9
801ced6: d11a bne.n 801cf0e <_printf_common+0xd6>
801ced8: 2000 movs r0, #0
801ceda: e008 b.n 801ceee <_printf_common+0xb6>
801cedc: 2301 movs r3, #1
801cede: 4652 mov r2, sl
801cee0: 4639 mov r1, r7
801cee2: 4630 mov r0, r6
801cee4: 47c0 blx r8
801cee6: 3001 adds r0, #1
801cee8: d103 bne.n 801cef2 <_printf_common+0xba>
801ceea: f04f 30ff mov.w r0, #4294967295
801ceee: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
801cef2: 3501 adds r5, #1
801cef4: e7c3 b.n 801ce7e <_printf_common+0x46>
801cef6: 18e1 adds r1, r4, r3
801cef8: 1c5a adds r2, r3, #1
801cefa: 2030 movs r0, #48 ; 0x30
801cefc: f881 0043 strb.w r0, [r1, #67] ; 0x43
801cf00: 4422 add r2, r4
801cf02: f894 1045 ldrb.w r1, [r4, #69] ; 0x45
801cf06: f882 1043 strb.w r1, [r2, #67] ; 0x43
801cf0a: 3302 adds r3, #2
801cf0c: e7c5 b.n 801ce9a <_printf_common+0x62>
801cf0e: 2301 movs r3, #1
801cf10: 4622 mov r2, r4
801cf12: 4639 mov r1, r7
801cf14: 4630 mov r0, r6
801cf16: 47c0 blx r8
801cf18: 3001 adds r0, #1
801cf1a: d0e6 beq.n 801ceea <_printf_common+0xb2>
801cf1c: f109 0901 add.w r9, r9, #1
801cf20: e7d8 b.n 801ced4 <_printf_common+0x9c>
...
0801cf24 <_printf_i>:
801cf24: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
801cf28: f101 0c43 add.w ip, r1, #67 ; 0x43
801cf2c: 460c mov r4, r1
801cf2e: 7e09 ldrb r1, [r1, #24]
801cf30: b085 sub sp, #20
801cf32: 296e cmp r1, #110 ; 0x6e
801cf34: 4617 mov r7, r2
801cf36: 4606 mov r6, r0
801cf38: 4698 mov r8, r3
801cf3a: 9a0c ldr r2, [sp, #48] ; 0x30
801cf3c: f000 80b3 beq.w 801d0a6 <_printf_i+0x182>
801cf40: d822 bhi.n 801cf88 <_printf_i+0x64>
801cf42: 2963 cmp r1, #99 ; 0x63
801cf44: d036 beq.n 801cfb4 <_printf_i+0x90>
801cf46: d80a bhi.n 801cf5e <_printf_i+0x3a>
801cf48: 2900 cmp r1, #0
801cf4a: f000 80b9 beq.w 801d0c0 <_printf_i+0x19c>
801cf4e: 2958 cmp r1, #88 ; 0x58
801cf50: f000 8083 beq.w 801d05a <_printf_i+0x136>
801cf54: f104 0542 add.w r5, r4, #66 ; 0x42
801cf58: f884 1042 strb.w r1, [r4, #66] ; 0x42
801cf5c: e032 b.n 801cfc4 <_printf_i+0xa0>
801cf5e: 2964 cmp r1, #100 ; 0x64
801cf60: d001 beq.n 801cf66 <_printf_i+0x42>
801cf62: 2969 cmp r1, #105 ; 0x69
801cf64: d1f6 bne.n 801cf54 <_printf_i+0x30>
801cf66: 6820 ldr r0, [r4, #0]
801cf68: 6813 ldr r3, [r2, #0]
801cf6a: 0605 lsls r5, r0, #24
801cf6c: f103 0104 add.w r1, r3, #4
801cf70: d52a bpl.n 801cfc8 <_printf_i+0xa4>
801cf72: 681b ldr r3, [r3, #0]
801cf74: 6011 str r1, [r2, #0]
801cf76: 2b00 cmp r3, #0
801cf78: da03 bge.n 801cf82 <_printf_i+0x5e>
801cf7a: 222d movs r2, #45 ; 0x2d
801cf7c: 425b negs r3, r3
801cf7e: f884 2043 strb.w r2, [r4, #67] ; 0x43
801cf82: 486f ldr r0, [pc, #444] ; (801d140 <_printf_i+0x21c>)
801cf84: 220a movs r2, #10
801cf86: e039 b.n 801cffc <_printf_i+0xd8>
801cf88: 2973 cmp r1, #115 ; 0x73
801cf8a: f000 809d beq.w 801d0c8 <_printf_i+0x1a4>
801cf8e: d808 bhi.n 801cfa2 <_printf_i+0x7e>
801cf90: 296f cmp r1, #111 ; 0x6f
801cf92: d020 beq.n 801cfd6 <_printf_i+0xb2>
801cf94: 2970 cmp r1, #112 ; 0x70
801cf96: d1dd bne.n 801cf54 <_printf_i+0x30>
801cf98: 6823 ldr r3, [r4, #0]
801cf9a: f043 0320 orr.w r3, r3, #32
801cf9e: 6023 str r3, [r4, #0]
801cfa0: e003 b.n 801cfaa <_printf_i+0x86>
801cfa2: 2975 cmp r1, #117 ; 0x75
801cfa4: d017 beq.n 801cfd6 <_printf_i+0xb2>
801cfa6: 2978 cmp r1, #120 ; 0x78
801cfa8: d1d4 bne.n 801cf54 <_printf_i+0x30>
801cfaa: 2378 movs r3, #120 ; 0x78
801cfac: f884 3045 strb.w r3, [r4, #69] ; 0x45
801cfb0: 4864 ldr r0, [pc, #400] ; (801d144 <_printf_i+0x220>)
801cfb2: e055 b.n 801d060 <_printf_i+0x13c>
801cfb4: 6813 ldr r3, [r2, #0]
801cfb6: 1d19 adds r1, r3, #4
801cfb8: 681b ldr r3, [r3, #0]
801cfba: 6011 str r1, [r2, #0]
801cfbc: f104 0542 add.w r5, r4, #66 ; 0x42
801cfc0: f884 3042 strb.w r3, [r4, #66] ; 0x42
801cfc4: 2301 movs r3, #1
801cfc6: e08c b.n 801d0e2 <_printf_i+0x1be>
801cfc8: 681b ldr r3, [r3, #0]
801cfca: 6011 str r1, [r2, #0]
801cfcc: f010 0f40 tst.w r0, #64 ; 0x40
801cfd0: bf18 it ne
801cfd2: b21b sxthne r3, r3
801cfd4: e7cf b.n 801cf76 <_printf_i+0x52>
801cfd6: 6813 ldr r3, [r2, #0]
801cfd8: 6825 ldr r5, [r4, #0]
801cfda: 1d18 adds r0, r3, #4
801cfdc: 6010 str r0, [r2, #0]
801cfde: 0628 lsls r0, r5, #24
801cfe0: d501 bpl.n 801cfe6 <_printf_i+0xc2>
801cfe2: 681b ldr r3, [r3, #0]
801cfe4: e002 b.n 801cfec <_printf_i+0xc8>
801cfe6: 0668 lsls r0, r5, #25
801cfe8: d5fb bpl.n 801cfe2 <_printf_i+0xbe>
801cfea: 881b ldrh r3, [r3, #0]
801cfec: 4854 ldr r0, [pc, #336] ; (801d140 <_printf_i+0x21c>)
801cfee: 296f cmp r1, #111 ; 0x6f
801cff0: bf14 ite ne
801cff2: 220a movne r2, #10
801cff4: 2208 moveq r2, #8
801cff6: 2100 movs r1, #0
801cff8: f884 1043 strb.w r1, [r4, #67] ; 0x43
801cffc: 6865 ldr r5, [r4, #4]
801cffe: 60a5 str r5, [r4, #8]
801d000: 2d00 cmp r5, #0
801d002: f2c0 8095 blt.w 801d130 <_printf_i+0x20c>
801d006: 6821 ldr r1, [r4, #0]
801d008: f021 0104 bic.w r1, r1, #4
801d00c: 6021 str r1, [r4, #0]
801d00e: 2b00 cmp r3, #0
801d010: d13d bne.n 801d08e <_printf_i+0x16a>
801d012: 2d00 cmp r5, #0
801d014: f040 808e bne.w 801d134 <_printf_i+0x210>
801d018: 4665 mov r5, ip
801d01a: 2a08 cmp r2, #8
801d01c: d10b bne.n 801d036 <_printf_i+0x112>
801d01e: 6823 ldr r3, [r4, #0]
801d020: 07db lsls r3, r3, #31
801d022: d508 bpl.n 801d036 <_printf_i+0x112>
801d024: 6923 ldr r3, [r4, #16]
801d026: 6862 ldr r2, [r4, #4]
801d028: 429a cmp r2, r3
801d02a: bfde ittt le
801d02c: 2330 movle r3, #48 ; 0x30
801d02e: f805 3c01 strble.w r3, [r5, #-1]
801d032: f105 35ff addle.w r5, r5, #4294967295
801d036: ebac 0305 sub.w r3, ip, r5
801d03a: 6123 str r3, [r4, #16]
801d03c: f8cd 8000 str.w r8, [sp]
801d040: 463b mov r3, r7
801d042: aa03 add r2, sp, #12
801d044: 4621 mov r1, r4
801d046: 4630 mov r0, r6
801d048: f7ff fef6 bl 801ce38 <_printf_common>
801d04c: 3001 adds r0, #1
801d04e: d14d bne.n 801d0ec <_printf_i+0x1c8>
801d050: f04f 30ff mov.w r0, #4294967295
801d054: b005 add sp, #20
801d056: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
801d05a: 4839 ldr r0, [pc, #228] ; (801d140 <_printf_i+0x21c>)
801d05c: f884 1045 strb.w r1, [r4, #69] ; 0x45
801d060: 6813 ldr r3, [r2, #0]
801d062: 6821 ldr r1, [r4, #0]
801d064: 1d1d adds r5, r3, #4
801d066: 681b ldr r3, [r3, #0]
801d068: 6015 str r5, [r2, #0]
801d06a: 060a lsls r2, r1, #24
801d06c: d50b bpl.n 801d086 <_printf_i+0x162>
801d06e: 07ca lsls r2, r1, #31
801d070: bf44 itt mi
801d072: f041 0120 orrmi.w r1, r1, #32
801d076: 6021 strmi r1, [r4, #0]
801d078: b91b cbnz r3, 801d082 <_printf_i+0x15e>
801d07a: 6822 ldr r2, [r4, #0]
801d07c: f022 0220 bic.w r2, r2, #32
801d080: 6022 str r2, [r4, #0]
801d082: 2210 movs r2, #16
801d084: e7b7 b.n 801cff6 <_printf_i+0xd2>
801d086: 064d lsls r5, r1, #25
801d088: bf48 it mi
801d08a: b29b uxthmi r3, r3
801d08c: e7ef b.n 801d06e <_printf_i+0x14a>
801d08e: 4665 mov r5, ip
801d090: fbb3 f1f2 udiv r1, r3, r2
801d094: fb02 3311 mls r3, r2, r1, r3
801d098: 5cc3 ldrb r3, [r0, r3]
801d09a: f805 3d01 strb.w r3, [r5, #-1]!
801d09e: 460b mov r3, r1
801d0a0: 2900 cmp r1, #0
801d0a2: d1f5 bne.n 801d090 <_printf_i+0x16c>
801d0a4: e7b9 b.n 801d01a <_printf_i+0xf6>
801d0a6: 6813 ldr r3, [r2, #0]
801d0a8: 6825 ldr r5, [r4, #0]
801d0aa: 6961 ldr r1, [r4, #20]
801d0ac: 1d18 adds r0, r3, #4
801d0ae: 6010 str r0, [r2, #0]
801d0b0: 0628 lsls r0, r5, #24
801d0b2: 681b ldr r3, [r3, #0]
801d0b4: d501 bpl.n 801d0ba <_printf_i+0x196>
801d0b6: 6019 str r1, [r3, #0]
801d0b8: e002 b.n 801d0c0 <_printf_i+0x19c>
801d0ba: 066a lsls r2, r5, #25
801d0bc: d5fb bpl.n 801d0b6 <_printf_i+0x192>
801d0be: 8019 strh r1, [r3, #0]
801d0c0: 2300 movs r3, #0
801d0c2: 6123 str r3, [r4, #16]
801d0c4: 4665 mov r5, ip
801d0c6: e7b9 b.n 801d03c <_printf_i+0x118>
801d0c8: 6813 ldr r3, [r2, #0]
801d0ca: 1d19 adds r1, r3, #4
801d0cc: 6011 str r1, [r2, #0]
801d0ce: 681d ldr r5, [r3, #0]
801d0d0: 6862 ldr r2, [r4, #4]
801d0d2: 2100 movs r1, #0
801d0d4: 4628 mov r0, r5
801d0d6: f7e3 f89b bl 8000210 <memchr>
801d0da: b108 cbz r0, 801d0e0 <_printf_i+0x1bc>
801d0dc: 1b40 subs r0, r0, r5
801d0de: 6060 str r0, [r4, #4]
801d0e0: 6863 ldr r3, [r4, #4]
801d0e2: 6123 str r3, [r4, #16]
801d0e4: 2300 movs r3, #0
801d0e6: f884 3043 strb.w r3, [r4, #67] ; 0x43
801d0ea: e7a7 b.n 801d03c <_printf_i+0x118>
801d0ec: 6923 ldr r3, [r4, #16]
801d0ee: 462a mov r2, r5
801d0f0: 4639 mov r1, r7
801d0f2: 4630 mov r0, r6
801d0f4: 47c0 blx r8
801d0f6: 3001 adds r0, #1
801d0f8: d0aa beq.n 801d050 <_printf_i+0x12c>
801d0fa: 6823 ldr r3, [r4, #0]
801d0fc: 079b lsls r3, r3, #30
801d0fe: d413 bmi.n 801d128 <_printf_i+0x204>
801d100: 68e0 ldr r0, [r4, #12]
801d102: 9b03 ldr r3, [sp, #12]
801d104: 4298 cmp r0, r3
801d106: bfb8 it lt
801d108: 4618 movlt r0, r3
801d10a: e7a3 b.n 801d054 <_printf_i+0x130>
801d10c: 2301 movs r3, #1
801d10e: 464a mov r2, r9
801d110: 4639 mov r1, r7
801d112: 4630 mov r0, r6
801d114: 47c0 blx r8
801d116: 3001 adds r0, #1
801d118: d09a beq.n 801d050 <_printf_i+0x12c>
801d11a: 3501 adds r5, #1
801d11c: 68e3 ldr r3, [r4, #12]
801d11e: 9a03 ldr r2, [sp, #12]
801d120: 1a9b subs r3, r3, r2
801d122: 42ab cmp r3, r5
801d124: dcf2 bgt.n 801d10c <_printf_i+0x1e8>
801d126: e7eb b.n 801d100 <_printf_i+0x1dc>
801d128: 2500 movs r5, #0
801d12a: f104 0919 add.w r9, r4, #25
801d12e: e7f5 b.n 801d11c <_printf_i+0x1f8>
801d130: 2b00 cmp r3, #0
801d132: d1ac bne.n 801d08e <_printf_i+0x16a>
801d134: 7803 ldrb r3, [r0, #0]
801d136: f884 3042 strb.w r3, [r4, #66] ; 0x42
801d13a: f104 0542 add.w r5, r4, #66 ; 0x42
801d13e: e76c b.n 801d01a <_printf_i+0xf6>
801d140: 0802277d .word 0x0802277d
801d144: 0802278e .word 0x0802278e
0801d148 <_sbrk_r>:
801d148: b538 push {r3, r4, r5, lr}
801d14a: 4c06 ldr r4, [pc, #24] ; (801d164 <_sbrk_r+0x1c>)
801d14c: 2300 movs r3, #0
801d14e: 4605 mov r5, r0
801d150: 4608 mov r0, r1
801d152: 6023 str r3, [r4, #0]
801d154: f7e7 fd0a bl 8004b6c <_sbrk>
801d158: 1c43 adds r3, r0, #1
801d15a: d102 bne.n 801d162 <_sbrk_r+0x1a>
801d15c: 6823 ldr r3, [r4, #0]
801d15e: b103 cbz r3, 801d162 <_sbrk_r+0x1a>
801d160: 602b str r3, [r5, #0]
801d162: bd38 pop {r3, r4, r5, pc}
801d164: 2000f82c .word 0x2000f82c
0801d168 <__sread>:
801d168: b510 push {r4, lr}
801d16a: 460c mov r4, r1
801d16c: f9b1 100e ldrsh.w r1, [r1, #14]
801d170: f000 fa6e bl 801d650 <_read_r>
801d174: 2800 cmp r0, #0
801d176: bfab itete ge
801d178: 6d63 ldrge r3, [r4, #84] ; 0x54
801d17a: 89a3 ldrhlt r3, [r4, #12]
801d17c: 181b addge r3, r3, r0
801d17e: f423 5380 biclt.w r3, r3, #4096 ; 0x1000
801d182: bfac ite ge
801d184: 6563 strge r3, [r4, #84] ; 0x54
801d186: 81a3 strhlt r3, [r4, #12]
801d188: bd10 pop {r4, pc}
0801d18a <__swrite>:
801d18a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
801d18e: 461f mov r7, r3
801d190: 898b ldrh r3, [r1, #12]
801d192: 05db lsls r3, r3, #23
801d194: 4605 mov r5, r0
801d196: 460c mov r4, r1
801d198: 4616 mov r6, r2
801d19a: d505 bpl.n 801d1a8 <__swrite+0x1e>
801d19c: 2302 movs r3, #2
801d19e: 2200 movs r2, #0
801d1a0: f9b1 100e ldrsh.w r1, [r1, #14]
801d1a4: f000 f9b6 bl 801d514 <_lseek_r>
801d1a8: 89a3 ldrh r3, [r4, #12]
801d1aa: f9b4 100e ldrsh.w r1, [r4, #14]
801d1ae: f423 5380 bic.w r3, r3, #4096 ; 0x1000
801d1b2: 81a3 strh r3, [r4, #12]
801d1b4: 4632 mov r2, r6
801d1b6: 463b mov r3, r7
801d1b8: 4628 mov r0, r5
801d1ba: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr}
801d1be: f000 b869 b.w 801d294 <_write_r>
0801d1c2 <__sseek>:
801d1c2: b510 push {r4, lr}
801d1c4: 460c mov r4, r1
801d1c6: f9b1 100e ldrsh.w r1, [r1, #14]
801d1ca: f000 f9a3 bl 801d514 <_lseek_r>
801d1ce: 1c43 adds r3, r0, #1
801d1d0: 89a3 ldrh r3, [r4, #12]
801d1d2: bf15 itete ne
801d1d4: 6560 strne r0, [r4, #84] ; 0x54
801d1d6: f423 5380 biceq.w r3, r3, #4096 ; 0x1000
801d1da: f443 5380 orrne.w r3, r3, #4096 ; 0x1000
801d1de: 81a3 strheq r3, [r4, #12]
801d1e0: bf18 it ne
801d1e2: 81a3 strhne r3, [r4, #12]
801d1e4: bd10 pop {r4, pc}
0801d1e6 <__sclose>:
801d1e6: f9b1 100e ldrsh.w r1, [r1, #14]
801d1ea: f000 b8d3 b.w 801d394 <_close_r>
...
0801d1f0 <__swbuf_r>:
801d1f0: b5f8 push {r3, r4, r5, r6, r7, lr}
801d1f2: 460e mov r6, r1
801d1f4: 4614 mov r4, r2
801d1f6: 4605 mov r5, r0
801d1f8: b118 cbz r0, 801d202 <__swbuf_r+0x12>
801d1fa: 6983 ldr r3, [r0, #24]
801d1fc: b90b cbnz r3, 801d202 <__swbuf_r+0x12>
801d1fe: f7ff fa4f bl 801c6a0 <__sinit>
801d202: 4b21 ldr r3, [pc, #132] ; (801d288 <__swbuf_r+0x98>)
801d204: 429c cmp r4, r3
801d206: d12a bne.n 801d25e <__swbuf_r+0x6e>
801d208: 686c ldr r4, [r5, #4]
801d20a: 69a3 ldr r3, [r4, #24]
801d20c: 60a3 str r3, [r4, #8]
801d20e: 89a3 ldrh r3, [r4, #12]
801d210: 071a lsls r2, r3, #28
801d212: d52e bpl.n 801d272 <__swbuf_r+0x82>
801d214: 6923 ldr r3, [r4, #16]
801d216: b363 cbz r3, 801d272 <__swbuf_r+0x82>
801d218: 6923 ldr r3, [r4, #16]
801d21a: 6820 ldr r0, [r4, #0]
801d21c: 1ac0 subs r0, r0, r3
801d21e: 6963 ldr r3, [r4, #20]
801d220: b2f6 uxtb r6, r6
801d222: 4283 cmp r3, r0
801d224: 4637 mov r7, r6
801d226: dc04 bgt.n 801d232 <__swbuf_r+0x42>
801d228: 4621 mov r1, r4
801d22a: 4628 mov r0, r5
801d22c: f000 f948 bl 801d4c0 <_fflush_r>
801d230: bb28 cbnz r0, 801d27e <__swbuf_r+0x8e>
801d232: 68a3 ldr r3, [r4, #8]
801d234: 3b01 subs r3, #1
801d236: 60a3 str r3, [r4, #8]
801d238: 6823 ldr r3, [r4, #0]
801d23a: 1c5a adds r2, r3, #1
801d23c: 6022 str r2, [r4, #0]
801d23e: 701e strb r6, [r3, #0]
801d240: 6963 ldr r3, [r4, #20]
801d242: 3001 adds r0, #1
801d244: 4283 cmp r3, r0
801d246: d004 beq.n 801d252 <__swbuf_r+0x62>
801d248: 89a3 ldrh r3, [r4, #12]
801d24a: 07db lsls r3, r3, #31
801d24c: d519 bpl.n 801d282 <__swbuf_r+0x92>
801d24e: 2e0a cmp r6, #10
801d250: d117 bne.n 801d282 <__swbuf_r+0x92>
801d252: 4621 mov r1, r4
801d254: 4628 mov r0, r5
801d256: f000 f933 bl 801d4c0 <_fflush_r>
801d25a: b190 cbz r0, 801d282 <__swbuf_r+0x92>
801d25c: e00f b.n 801d27e <__swbuf_r+0x8e>
801d25e: 4b0b ldr r3, [pc, #44] ; (801d28c <__swbuf_r+0x9c>)
801d260: 429c cmp r4, r3
801d262: d101 bne.n 801d268 <__swbuf_r+0x78>
801d264: 68ac ldr r4, [r5, #8]
801d266: e7d0 b.n 801d20a <__swbuf_r+0x1a>
801d268: 4b09 ldr r3, [pc, #36] ; (801d290 <__swbuf_r+0xa0>)
801d26a: 429c cmp r4, r3
801d26c: bf08 it eq
801d26e: 68ec ldreq r4, [r5, #12]
801d270: e7cb b.n 801d20a <__swbuf_r+0x1a>
801d272: 4621 mov r1, r4
801d274: 4628 mov r0, r5
801d276: f000 f81f bl 801d2b8 <__swsetup_r>
801d27a: 2800 cmp r0, #0
801d27c: d0cc beq.n 801d218 <__swbuf_r+0x28>
801d27e: f04f 37ff mov.w r7, #4294967295
801d282: 4638 mov r0, r7
801d284: bdf8 pop {r3, r4, r5, r6, r7, pc}
801d286: bf00 nop
801d288: 0802272c .word 0x0802272c
801d28c: 0802274c .word 0x0802274c
801d290: 0802270c .word 0x0802270c
0801d294 <_write_r>:
801d294: b538 push {r3, r4, r5, lr}
801d296: 4c07 ldr r4, [pc, #28] ; (801d2b4 <_write_r+0x20>)
801d298: 4605 mov r5, r0
801d29a: 4608 mov r0, r1
801d29c: 4611 mov r1, r2
801d29e: 2200 movs r2, #0
801d2a0: 6022 str r2, [r4, #0]
801d2a2: 461a mov r2, r3
801d2a4: f7e7 fc11 bl 8004aca <_write>
801d2a8: 1c43 adds r3, r0, #1
801d2aa: d102 bne.n 801d2b2 <_write_r+0x1e>
801d2ac: 6823 ldr r3, [r4, #0]
801d2ae: b103 cbz r3, 801d2b2 <_write_r+0x1e>
801d2b0: 602b str r3, [r5, #0]
801d2b2: bd38 pop {r3, r4, r5, pc}
801d2b4: 2000f82c .word 0x2000f82c
0801d2b8 <__swsetup_r>:
801d2b8: 4b32 ldr r3, [pc, #200] ; (801d384 <__swsetup_r+0xcc>)
801d2ba: b570 push {r4, r5, r6, lr}
801d2bc: 681d ldr r5, [r3, #0]
801d2be: 4606 mov r6, r0
801d2c0: 460c mov r4, r1
801d2c2: b125 cbz r5, 801d2ce <__swsetup_r+0x16>
801d2c4: 69ab ldr r3, [r5, #24]
801d2c6: b913 cbnz r3, 801d2ce <__swsetup_r+0x16>
801d2c8: 4628 mov r0, r5
801d2ca: f7ff f9e9 bl 801c6a0 <__sinit>
801d2ce: 4b2e ldr r3, [pc, #184] ; (801d388 <__swsetup_r+0xd0>)
801d2d0: 429c cmp r4, r3
801d2d2: d10f bne.n 801d2f4 <__swsetup_r+0x3c>
801d2d4: 686c ldr r4, [r5, #4]
801d2d6: f9b4 300c ldrsh.w r3, [r4, #12]
801d2da: b29a uxth r2, r3
801d2dc: 0715 lsls r5, r2, #28
801d2de: d42c bmi.n 801d33a <__swsetup_r+0x82>
801d2e0: 06d0 lsls r0, r2, #27
801d2e2: d411 bmi.n 801d308 <__swsetup_r+0x50>
801d2e4: 2209 movs r2, #9
801d2e6: 6032 str r2, [r6, #0]
801d2e8: f043 0340 orr.w r3, r3, #64 ; 0x40
801d2ec: 81a3 strh r3, [r4, #12]
801d2ee: f04f 30ff mov.w r0, #4294967295
801d2f2: e03e b.n 801d372 <__swsetup_r+0xba>
801d2f4: 4b25 ldr r3, [pc, #148] ; (801d38c <__swsetup_r+0xd4>)
801d2f6: 429c cmp r4, r3
801d2f8: d101 bne.n 801d2fe <__swsetup_r+0x46>
801d2fa: 68ac ldr r4, [r5, #8]
801d2fc: e7eb b.n 801d2d6 <__swsetup_r+0x1e>
801d2fe: 4b24 ldr r3, [pc, #144] ; (801d390 <__swsetup_r+0xd8>)
801d300: 429c cmp r4, r3
801d302: bf08 it eq
801d304: 68ec ldreq r4, [r5, #12]
801d306: e7e6 b.n 801d2d6 <__swsetup_r+0x1e>
801d308: 0751 lsls r1, r2, #29
801d30a: d512 bpl.n 801d332 <__swsetup_r+0x7a>
801d30c: 6b61 ldr r1, [r4, #52] ; 0x34
801d30e: b141 cbz r1, 801d322 <__swsetup_r+0x6a>
801d310: f104 0344 add.w r3, r4, #68 ; 0x44
801d314: 4299 cmp r1, r3
801d316: d002 beq.n 801d31e <__swsetup_r+0x66>
801d318: 4630 mov r0, r6
801d31a: f7ff fa53 bl 801c7c4 <_free_r>
801d31e: 2300 movs r3, #0
801d320: 6363 str r3, [r4, #52] ; 0x34
801d322: 89a3 ldrh r3, [r4, #12]
801d324: f023 0324 bic.w r3, r3, #36 ; 0x24
801d328: 81a3 strh r3, [r4, #12]
801d32a: 2300 movs r3, #0
801d32c: 6063 str r3, [r4, #4]
801d32e: 6923 ldr r3, [r4, #16]
801d330: 6023 str r3, [r4, #0]
801d332: 89a3 ldrh r3, [r4, #12]
801d334: f043 0308 orr.w r3, r3, #8
801d338: 81a3 strh r3, [r4, #12]
801d33a: 6923 ldr r3, [r4, #16]
801d33c: b94b cbnz r3, 801d352 <__swsetup_r+0x9a>
801d33e: 89a3 ldrh r3, [r4, #12]
801d340: f403 7320 and.w r3, r3, #640 ; 0x280
801d344: f5b3 7f00 cmp.w r3, #512 ; 0x200
801d348: d003 beq.n 801d352 <__swsetup_r+0x9a>
801d34a: 4621 mov r1, r4
801d34c: 4630 mov r0, r6
801d34e: f000 f917 bl 801d580 <__smakebuf_r>
801d352: 89a2 ldrh r2, [r4, #12]
801d354: f012 0301 ands.w r3, r2, #1
801d358: d00c beq.n 801d374 <__swsetup_r+0xbc>
801d35a: 2300 movs r3, #0
801d35c: 60a3 str r3, [r4, #8]
801d35e: 6963 ldr r3, [r4, #20]
801d360: 425b negs r3, r3
801d362: 61a3 str r3, [r4, #24]
801d364: 6923 ldr r3, [r4, #16]
801d366: b953 cbnz r3, 801d37e <__swsetup_r+0xc6>
801d368: f9b4 300c ldrsh.w r3, [r4, #12]
801d36c: f013 0080 ands.w r0, r3, #128 ; 0x80
801d370: d1ba bne.n 801d2e8 <__swsetup_r+0x30>
801d372: bd70 pop {r4, r5, r6, pc}
801d374: 0792 lsls r2, r2, #30
801d376: bf58 it pl
801d378: 6963 ldrpl r3, [r4, #20]
801d37a: 60a3 str r3, [r4, #8]
801d37c: e7f2 b.n 801d364 <__swsetup_r+0xac>
801d37e: 2000 movs r0, #0
801d380: e7f7 b.n 801d372 <__swsetup_r+0xba>
801d382: bf00 nop
801d384: 20000070 .word 0x20000070
801d388: 0802272c .word 0x0802272c
801d38c: 0802274c .word 0x0802274c
801d390: 0802270c .word 0x0802270c
0801d394 <_close_r>:
801d394: b538 push {r3, r4, r5, lr}
801d396: 4c06 ldr r4, [pc, #24] ; (801d3b0 <_close_r+0x1c>)
801d398: 2300 movs r3, #0
801d39a: 4605 mov r5, r0
801d39c: 4608 mov r0, r1
801d39e: 6023 str r3, [r4, #0]
801d3a0: f7e7 fbaf bl 8004b02 <_close>
801d3a4: 1c43 adds r3, r0, #1
801d3a6: d102 bne.n 801d3ae <_close_r+0x1a>
801d3a8: 6823 ldr r3, [r4, #0]
801d3aa: b103 cbz r3, 801d3ae <_close_r+0x1a>
801d3ac: 602b str r3, [r5, #0]
801d3ae: bd38 pop {r3, r4, r5, pc}
801d3b0: 2000f82c .word 0x2000f82c
0801d3b4 <__sflush_r>:
801d3b4: 898a ldrh r2, [r1, #12]
801d3b6: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
801d3ba: 4605 mov r5, r0
801d3bc: 0710 lsls r0, r2, #28
801d3be: 460c mov r4, r1
801d3c0: d458 bmi.n 801d474 <__sflush_r+0xc0>
801d3c2: 684b ldr r3, [r1, #4]
801d3c4: 2b00 cmp r3, #0
801d3c6: dc05 bgt.n 801d3d4 <__sflush_r+0x20>
801d3c8: 6c0b ldr r3, [r1, #64] ; 0x40
801d3ca: 2b00 cmp r3, #0
801d3cc: dc02 bgt.n 801d3d4 <__sflush_r+0x20>
801d3ce: 2000 movs r0, #0
801d3d0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
801d3d4: 6ae6 ldr r6, [r4, #44] ; 0x2c
801d3d6: 2e00 cmp r6, #0
801d3d8: d0f9 beq.n 801d3ce <__sflush_r+0x1a>
801d3da: 2300 movs r3, #0
801d3dc: f412 5280 ands.w r2, r2, #4096 ; 0x1000
801d3e0: 682f ldr r7, [r5, #0]
801d3e2: 6a21 ldr r1, [r4, #32]
801d3e4: 602b str r3, [r5, #0]
801d3e6: d032 beq.n 801d44e <__sflush_r+0x9a>
801d3e8: 6d60 ldr r0, [r4, #84] ; 0x54
801d3ea: 89a3 ldrh r3, [r4, #12]
801d3ec: 075a lsls r2, r3, #29
801d3ee: d505 bpl.n 801d3fc <__sflush_r+0x48>
801d3f0: 6863 ldr r3, [r4, #4]
801d3f2: 1ac0 subs r0, r0, r3
801d3f4: 6b63 ldr r3, [r4, #52] ; 0x34
801d3f6: b10b cbz r3, 801d3fc <__sflush_r+0x48>
801d3f8: 6c23 ldr r3, [r4, #64] ; 0x40
801d3fa: 1ac0 subs r0, r0, r3
801d3fc: 2300 movs r3, #0
801d3fe: 4602 mov r2, r0
801d400: 6ae6 ldr r6, [r4, #44] ; 0x2c
801d402: 6a21 ldr r1, [r4, #32]
801d404: 4628 mov r0, r5
801d406: 47b0 blx r6
801d408: 1c43 adds r3, r0, #1
801d40a: 89a3 ldrh r3, [r4, #12]
801d40c: d106 bne.n 801d41c <__sflush_r+0x68>
801d40e: 6829 ldr r1, [r5, #0]
801d410: 291d cmp r1, #29
801d412: d848 bhi.n 801d4a6 <__sflush_r+0xf2>
801d414: 4a29 ldr r2, [pc, #164] ; (801d4bc <__sflush_r+0x108>)
801d416: 40ca lsrs r2, r1
801d418: 07d6 lsls r6, r2, #31
801d41a: d544 bpl.n 801d4a6 <__sflush_r+0xf2>
801d41c: 2200 movs r2, #0
801d41e: 6062 str r2, [r4, #4]
801d420: 04d9 lsls r1, r3, #19
801d422: 6922 ldr r2, [r4, #16]
801d424: 6022 str r2, [r4, #0]
801d426: d504 bpl.n 801d432 <__sflush_r+0x7e>
801d428: 1c42 adds r2, r0, #1
801d42a: d101 bne.n 801d430 <__sflush_r+0x7c>
801d42c: 682b ldr r3, [r5, #0]
801d42e: b903 cbnz r3, 801d432 <__sflush_r+0x7e>
801d430: 6560 str r0, [r4, #84] ; 0x54
801d432: 6b61 ldr r1, [r4, #52] ; 0x34
801d434: 602f str r7, [r5, #0]
801d436: 2900 cmp r1, #0
801d438: d0c9 beq.n 801d3ce <__sflush_r+0x1a>
801d43a: f104 0344 add.w r3, r4, #68 ; 0x44
801d43e: 4299 cmp r1, r3
801d440: d002 beq.n 801d448 <__sflush_r+0x94>
801d442: 4628 mov r0, r5
801d444: f7ff f9be bl 801c7c4 <_free_r>
801d448: 2000 movs r0, #0
801d44a: 6360 str r0, [r4, #52] ; 0x34
801d44c: e7c0 b.n 801d3d0 <__sflush_r+0x1c>
801d44e: 2301 movs r3, #1
801d450: 4628 mov r0, r5
801d452: 47b0 blx r6
801d454: 1c41 adds r1, r0, #1
801d456: d1c8 bne.n 801d3ea <__sflush_r+0x36>
801d458: 682b ldr r3, [r5, #0]
801d45a: 2b00 cmp r3, #0
801d45c: d0c5 beq.n 801d3ea <__sflush_r+0x36>
801d45e: 2b1d cmp r3, #29
801d460: d001 beq.n 801d466 <__sflush_r+0xb2>
801d462: 2b16 cmp r3, #22
801d464: d101 bne.n 801d46a <__sflush_r+0xb6>
801d466: 602f str r7, [r5, #0]
801d468: e7b1 b.n 801d3ce <__sflush_r+0x1a>
801d46a: 89a3 ldrh r3, [r4, #12]
801d46c: f043 0340 orr.w r3, r3, #64 ; 0x40
801d470: 81a3 strh r3, [r4, #12]
801d472: e7ad b.n 801d3d0 <__sflush_r+0x1c>
801d474: 690f ldr r7, [r1, #16]
801d476: 2f00 cmp r7, #0
801d478: d0a9 beq.n 801d3ce <__sflush_r+0x1a>
801d47a: 0793 lsls r3, r2, #30
801d47c: 680e ldr r6, [r1, #0]
801d47e: bf08 it eq
801d480: 694b ldreq r3, [r1, #20]
801d482: 600f str r7, [r1, #0]
801d484: bf18 it ne
801d486: 2300 movne r3, #0
801d488: eba6 0807 sub.w r8, r6, r7
801d48c: 608b str r3, [r1, #8]
801d48e: f1b8 0f00 cmp.w r8, #0
801d492: dd9c ble.n 801d3ce <__sflush_r+0x1a>
801d494: 4643 mov r3, r8
801d496: 463a mov r2, r7
801d498: 6a21 ldr r1, [r4, #32]
801d49a: 6aa6 ldr r6, [r4, #40] ; 0x28
801d49c: 4628 mov r0, r5
801d49e: 47b0 blx r6
801d4a0: 2800 cmp r0, #0
801d4a2: dc06 bgt.n 801d4b2 <__sflush_r+0xfe>
801d4a4: 89a3 ldrh r3, [r4, #12]
801d4a6: f043 0340 orr.w r3, r3, #64 ; 0x40
801d4aa: 81a3 strh r3, [r4, #12]
801d4ac: f04f 30ff mov.w r0, #4294967295
801d4b0: e78e b.n 801d3d0 <__sflush_r+0x1c>
801d4b2: 4407 add r7, r0
801d4b4: eba8 0800 sub.w r8, r8, r0
801d4b8: e7e9 b.n 801d48e <__sflush_r+0xda>
801d4ba: bf00 nop
801d4bc: 20400001 .word 0x20400001
0801d4c0 <_fflush_r>:
801d4c0: b538 push {r3, r4, r5, lr}
801d4c2: 690b ldr r3, [r1, #16]
801d4c4: 4605 mov r5, r0
801d4c6: 460c mov r4, r1
801d4c8: b1db cbz r3, 801d502 <_fflush_r+0x42>
801d4ca: b118 cbz r0, 801d4d4 <_fflush_r+0x14>
801d4cc: 6983 ldr r3, [r0, #24]
801d4ce: b90b cbnz r3, 801d4d4 <_fflush_r+0x14>
801d4d0: f7ff f8e6 bl 801c6a0 <__sinit>
801d4d4: 4b0c ldr r3, [pc, #48] ; (801d508 <_fflush_r+0x48>)
801d4d6: 429c cmp r4, r3
801d4d8: d109 bne.n 801d4ee <_fflush_r+0x2e>
801d4da: 686c ldr r4, [r5, #4]
801d4dc: f9b4 300c ldrsh.w r3, [r4, #12]
801d4e0: b17b cbz r3, 801d502 <_fflush_r+0x42>
801d4e2: 4621 mov r1, r4
801d4e4: 4628 mov r0, r5
801d4e6: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
801d4ea: f7ff bf63 b.w 801d3b4 <__sflush_r>
801d4ee: 4b07 ldr r3, [pc, #28] ; (801d50c <_fflush_r+0x4c>)
801d4f0: 429c cmp r4, r3
801d4f2: d101 bne.n 801d4f8 <_fflush_r+0x38>
801d4f4: 68ac ldr r4, [r5, #8]
801d4f6: e7f1 b.n 801d4dc <_fflush_r+0x1c>
801d4f8: 4b05 ldr r3, [pc, #20] ; (801d510 <_fflush_r+0x50>)
801d4fa: 429c cmp r4, r3
801d4fc: bf08 it eq
801d4fe: 68ec ldreq r4, [r5, #12]
801d500: e7ec b.n 801d4dc <_fflush_r+0x1c>
801d502: 2000 movs r0, #0
801d504: bd38 pop {r3, r4, r5, pc}
801d506: bf00 nop
801d508: 0802272c .word 0x0802272c
801d50c: 0802274c .word 0x0802274c
801d510: 0802270c .word 0x0802270c
0801d514 <_lseek_r>:
801d514: b538 push {r3, r4, r5, lr}
801d516: 4c07 ldr r4, [pc, #28] ; (801d534 <_lseek_r+0x20>)
801d518: 4605 mov r5, r0
801d51a: 4608 mov r0, r1
801d51c: 4611 mov r1, r2
801d51e: 2200 movs r2, #0
801d520: 6022 str r2, [r4, #0]
801d522: 461a mov r2, r3
801d524: f7e7 fb14 bl 8004b50 <_lseek>
801d528: 1c43 adds r3, r0, #1
801d52a: d102 bne.n 801d532 <_lseek_r+0x1e>
801d52c: 6823 ldr r3, [r4, #0]
801d52e: b103 cbz r3, 801d532 <_lseek_r+0x1e>
801d530: 602b str r3, [r5, #0]
801d532: bd38 pop {r3, r4, r5, pc}
801d534: 2000f82c .word 0x2000f82c
0801d538 <__swhatbuf_r>:
801d538: b570 push {r4, r5, r6, lr}
801d53a: 460e mov r6, r1
801d53c: f9b1 100e ldrsh.w r1, [r1, #14]
801d540: 2900 cmp r1, #0
801d542: b096 sub sp, #88 ; 0x58
801d544: 4614 mov r4, r2
801d546: 461d mov r5, r3
801d548: da07 bge.n 801d55a <__swhatbuf_r+0x22>
801d54a: 2300 movs r3, #0
801d54c: 602b str r3, [r5, #0]
801d54e: 89b3 ldrh r3, [r6, #12]
801d550: 061a lsls r2, r3, #24
801d552: d410 bmi.n 801d576 <__swhatbuf_r+0x3e>
801d554: f44f 6380 mov.w r3, #1024 ; 0x400
801d558: e00e b.n 801d578 <__swhatbuf_r+0x40>
801d55a: 466a mov r2, sp
801d55c: f000 f88a bl 801d674 <_fstat_r>
801d560: 2800 cmp r0, #0
801d562: dbf2 blt.n 801d54a <__swhatbuf_r+0x12>
801d564: 9a01 ldr r2, [sp, #4]
801d566: f402 4270 and.w r2, r2, #61440 ; 0xf000
801d56a: f5a2 5300 sub.w r3, r2, #8192 ; 0x2000
801d56e: 425a negs r2, r3
801d570: 415a adcs r2, r3
801d572: 602a str r2, [r5, #0]
801d574: e7ee b.n 801d554 <__swhatbuf_r+0x1c>
801d576: 2340 movs r3, #64 ; 0x40
801d578: 2000 movs r0, #0
801d57a: 6023 str r3, [r4, #0]
801d57c: b016 add sp, #88 ; 0x58
801d57e: bd70 pop {r4, r5, r6, pc}
0801d580 <__smakebuf_r>:
801d580: 898b ldrh r3, [r1, #12]
801d582: b573 push {r0, r1, r4, r5, r6, lr}
801d584: 079d lsls r5, r3, #30
801d586: 4606 mov r6, r0
801d588: 460c mov r4, r1
801d58a: d507 bpl.n 801d59c <__smakebuf_r+0x1c>
801d58c: f104 0347 add.w r3, r4, #71 ; 0x47
801d590: 6023 str r3, [r4, #0]
801d592: 6123 str r3, [r4, #16]
801d594: 2301 movs r3, #1
801d596: 6163 str r3, [r4, #20]
801d598: b002 add sp, #8
801d59a: bd70 pop {r4, r5, r6, pc}
801d59c: ab01 add r3, sp, #4
801d59e: 466a mov r2, sp
801d5a0: f7ff ffca bl 801d538 <__swhatbuf_r>
801d5a4: 9900 ldr r1, [sp, #0]
801d5a6: 4605 mov r5, r0
801d5a8: 4630 mov r0, r6
801d5aa: f7ff f959 bl 801c860 <_malloc_r>
801d5ae: b948 cbnz r0, 801d5c4 <__smakebuf_r+0x44>
801d5b0: f9b4 300c ldrsh.w r3, [r4, #12]
801d5b4: 059a lsls r2, r3, #22
801d5b6: d4ef bmi.n 801d598 <__smakebuf_r+0x18>
801d5b8: f023 0303 bic.w r3, r3, #3
801d5bc: f043 0302 orr.w r3, r3, #2
801d5c0: 81a3 strh r3, [r4, #12]
801d5c2: e7e3 b.n 801d58c <__smakebuf_r+0xc>
801d5c4: 4b0d ldr r3, [pc, #52] ; (801d5fc <__smakebuf_r+0x7c>)
801d5c6: 62b3 str r3, [r6, #40] ; 0x28
801d5c8: 89a3 ldrh r3, [r4, #12]
801d5ca: 6020 str r0, [r4, #0]
801d5cc: f043 0380 orr.w r3, r3, #128 ; 0x80
801d5d0: 81a3 strh r3, [r4, #12]
801d5d2: 9b00 ldr r3, [sp, #0]
801d5d4: 6163 str r3, [r4, #20]
801d5d6: 9b01 ldr r3, [sp, #4]
801d5d8: 6120 str r0, [r4, #16]
801d5da: b15b cbz r3, 801d5f4 <__smakebuf_r+0x74>
801d5dc: f9b4 100e ldrsh.w r1, [r4, #14]
801d5e0: 4630 mov r0, r6
801d5e2: f000 f859 bl 801d698 <_isatty_r>
801d5e6: b128 cbz r0, 801d5f4 <__smakebuf_r+0x74>
801d5e8: 89a3 ldrh r3, [r4, #12]
801d5ea: f023 0303 bic.w r3, r3, #3
801d5ee: f043 0301 orr.w r3, r3, #1
801d5f2: 81a3 strh r3, [r4, #12]
801d5f4: 89a3 ldrh r3, [r4, #12]
801d5f6: 431d orrs r5, r3
801d5f8: 81a5 strh r5, [r4, #12]
801d5fa: e7cd b.n 801d598 <__smakebuf_r+0x18>
801d5fc: 0801c669 .word 0x0801c669
0801d600 <__malloc_lock>:
801d600: 4770 bx lr
0801d602 <__malloc_unlock>:
801d602: 4770 bx lr
0801d604 <_realloc_r>:
801d604: b5f8 push {r3, r4, r5, r6, r7, lr}
801d606: 4607 mov r7, r0
801d608: 4614 mov r4, r2
801d60a: 460e mov r6, r1
801d60c: b921 cbnz r1, 801d618 <_realloc_r+0x14>
801d60e: 4611 mov r1, r2
801d610: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr}
801d614: f7ff b924 b.w 801c860 <_malloc_r>
801d618: b922 cbnz r2, 801d624 <_realloc_r+0x20>
801d61a: f7ff f8d3 bl 801c7c4 <_free_r>
801d61e: 4625 mov r5, r4
801d620: 4628 mov r0, r5
801d622: bdf8 pop {r3, r4, r5, r6, r7, pc}
801d624: f000 f848 bl 801d6b8 <_malloc_usable_size_r>
801d628: 42a0 cmp r0, r4
801d62a: d20f bcs.n 801d64c <_realloc_r+0x48>
801d62c: 4621 mov r1, r4
801d62e: 4638 mov r0, r7
801d630: f7ff f916 bl 801c860 <_malloc_r>
801d634: 4605 mov r5, r0
801d636: 2800 cmp r0, #0
801d638: d0f2 beq.n 801d620 <_realloc_r+0x1c>
801d63a: 4631 mov r1, r6
801d63c: 4622 mov r2, r4
801d63e: f7fe ff56 bl 801c4ee <memcpy>
801d642: 4631 mov r1, r6
801d644: 4638 mov r0, r7
801d646: f7ff f8bd bl 801c7c4 <_free_r>
801d64a: e7e9 b.n 801d620 <_realloc_r+0x1c>
801d64c: 4635 mov r5, r6
801d64e: e7e7 b.n 801d620 <_realloc_r+0x1c>
0801d650 <_read_r>:
801d650: b538 push {r3, r4, r5, lr}
801d652: 4c07 ldr r4, [pc, #28] ; (801d670 <_read_r+0x20>)
801d654: 4605 mov r5, r0
801d656: 4608 mov r0, r1
801d658: 4611 mov r1, r2
801d65a: 2200 movs r2, #0
801d65c: 6022 str r2, [r4, #0]
801d65e: 461a mov r2, r3
801d660: f7e7 fa16 bl 8004a90 <_read>
801d664: 1c43 adds r3, r0, #1
801d666: d102 bne.n 801d66e <_read_r+0x1e>
801d668: 6823 ldr r3, [r4, #0]
801d66a: b103 cbz r3, 801d66e <_read_r+0x1e>
801d66c: 602b str r3, [r5, #0]
801d66e: bd38 pop {r3, r4, r5, pc}
801d670: 2000f82c .word 0x2000f82c
0801d674 <_fstat_r>:
801d674: b538 push {r3, r4, r5, lr}
801d676: 4c07 ldr r4, [pc, #28] ; (801d694 <_fstat_r+0x20>)
801d678: 2300 movs r3, #0
801d67a: 4605 mov r5, r0
801d67c: 4608 mov r0, r1
801d67e: 4611 mov r1, r2
801d680: 6023 str r3, [r4, #0]
801d682: f7e7 fa4a bl 8004b1a <_fstat>
801d686: 1c43 adds r3, r0, #1
801d688: d102 bne.n 801d690 <_fstat_r+0x1c>
801d68a: 6823 ldr r3, [r4, #0]
801d68c: b103 cbz r3, 801d690 <_fstat_r+0x1c>
801d68e: 602b str r3, [r5, #0]
801d690: bd38 pop {r3, r4, r5, pc}
801d692: bf00 nop
801d694: 2000f82c .word 0x2000f82c
0801d698 <_isatty_r>:
801d698: b538 push {r3, r4, r5, lr}
801d69a: 4c06 ldr r4, [pc, #24] ; (801d6b4 <_isatty_r+0x1c>)
801d69c: 2300 movs r3, #0
801d69e: 4605 mov r5, r0
801d6a0: 4608 mov r0, r1
801d6a2: 6023 str r3, [r4, #0]
801d6a4: f7e7 fa49 bl 8004b3a <_isatty>
801d6a8: 1c43 adds r3, r0, #1
801d6aa: d102 bne.n 801d6b2 <_isatty_r+0x1a>
801d6ac: 6823 ldr r3, [r4, #0]
801d6ae: b103 cbz r3, 801d6b2 <_isatty_r+0x1a>
801d6b0: 602b str r3, [r5, #0]
801d6b2: bd38 pop {r3, r4, r5, pc}
801d6b4: 2000f82c .word 0x2000f82c
0801d6b8 <_malloc_usable_size_r>:
801d6b8: f851 3c04 ldr.w r3, [r1, #-4]
801d6bc: 1f18 subs r0, r3, #4
801d6be: 2b00 cmp r3, #0
801d6c0: bfbc itt lt
801d6c2: 580b ldrlt r3, [r1, r0]
801d6c4: 18c0 addlt r0, r0, r3
801d6c6: 4770 bx lr
0801d6c8 <_init>:
801d6c8: b5f8 push {r3, r4, r5, r6, r7, lr}
801d6ca: bf00 nop
801d6cc: bcf8 pop {r3, r4, r5, r6, r7}
801d6ce: bc08 pop {r3}
801d6d0: 469e mov lr, r3
801d6d2: 4770 bx lr
0801d6d4 <_fini>:
801d6d4: b5f8 push {r3, r4, r5, r6, r7, lr}
801d6d6: bf00 nop
801d6d8: bcf8 pop {r3, r4, r5, r6, r7}
801d6da: bc08 pop {r3}
801d6dc: 469e mov lr, r3
801d6de: 4770 bx lr